Prolog Language Control structures Conjunction (logical AND)


Conjunction (logical AND) is represented by the comma , operator (among other roles).

Conjunction between clauses can appear in a query:

?- X = 1, Y = 2.

Conjunction can also appear between the subgoal clauses in the body of a rule:

triangleSides(X,Y,Z) :-
    X + Y > Z, X + Z > Y, Y + Z > X.