(0) Obligation:

Clauses:

p(X, Y, Z) :- ','(=(X, Y), ','(=(Z, 1), !)).
p(X, Y, Z) :- ','(=(Z, 1), ','(=(Y, X), p(X, Y, Z))).
=(X, X).

Query: p(a,a,a)

(1) BuiltinConflictTransformerProof (EQUIVALENT transformation)

Renamed defined predicates conflicting with built-in predicates [PROLOG].

(2) Obligation:

Clauses:

p(X, Y, Z) :- ','(user_defined_=(X, Y), ','(user_defined_=(Z, 1), !)).
p(X, Y, Z) :- ','(user_defined_=(Z, 1), ','(user_defined_=(Y, X), p(X, Y, Z))).
user_defined_=(X, X).

Query: p(a,a,a)

(3) PrologToTRSTransformerProof (SOUND transformation)

Transformed Prolog program to TRS.

(4) Obligation:

Q restricted rewrite system:
The TRS R consists of the following rules:

f3_inf3_out1(1)
f3_inU1(f56_in)
U1(f56_out1) → f3_out1(1)
f3_inU2(f56_in)
U2(f56_out1) → f3_out1(1)
f56_inf56_out1

Q is empty.

(5) QTRSRRRProof (EQUIVALENT transformation)

Used ordering:
Knuth-Bendix order [KBO] with precedence:
f3in > U21 > f56in > f56out1 > U11 > 1 > f3out11

and weight map:

f3_in=3
1=2
f56_in=1
f56_out1=1
f3_out1_1=1
U1_1=2
U2_1=2

The variable weight is 1With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:

f3_inf3_out1(1)
f3_inU1(f56_in)
U1(f56_out1) → f3_out1(1)
f3_inU2(f56_in)
U2(f56_out1) → f3_out1(1)
f56_inf56_out1


(6) Obligation:

Q restricted rewrite system:
R is empty.
Q is empty.

(7) RisEmptyProof (EQUIVALENT transformation)

The TRS R is empty. Hence, termination is trivially proven.

(8) YES