From my Popper example constants1 which is (originally?) from Metagol. hakank: ''' pos(p(1,2)). pos(p(1,3)). pos(p(1,4)). pos(p(1,1)). pos(p(2,2)). pos(p(4,4)). neg(p(2,4)). neg(p(3,4)). neg(p(3,1)). ''' GPT4: ''' Based on the positive and negative examples, it seems that the pattern here is that for a predicate p(x, y), it is true (positive) if x is 1 or x and y are equal. Here's a summary of the pattern: Positive examples: p(1, _): p is true when the first argument is 1, regardless of the second argument. p(x, x): p is true when both arguments are equal. Negative examples: If the first argument is not 1 and the arguments are not equal, p is false. In other words, p is true when x = 1 or x = y, otherwise it is false. ''' hakank: ''' Please write a Prolog program for this. ''' GPT4: ''' Here is a Prolog program representing the pattern: p(X, _) :- X = 1. p(X, Y) :- X = Y. The first clause states that if the first argument X is 1, then the predicate p is true. The second clause states that if both arguments X and Y are equal, then the predicate p is true. ''' Nice!