Define a relation xyz(X) that is true if X is a xyz sequence. A xyz sequence is a sequence that consists of either the number 0, or the number 1 followed by two other xyz sequences.
Some xyz sequences:
xyz([0]).
xyz([1,0,1,0,0]).
And, the following are not considered xyz sequences:
xyz([1,1,0,0]).
xyz([0,1,0]).
xyz([1,1,0]).
xyz([1,0,1,1,1,1,1,0,1]).
Can someone help me with how to approach this problem?