(0) Obligation:

Clauses:

f(X) :- ','(p(X), q(X)).
p(a) :- !.
p(X) :- p(Y).
q(b).

Query: f(a)

(1) PrologToTRSTransformerProof (SOUND transformation)

Transformed Prolog program to TRS.

(2) Obligation:

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

f1_inU1(f24_in)
U1(f24_out1(T9)) → f1_out1(T9)
f31_inf31_out1
f33_inf33_out1(b)
f24_inU2(f31_in)
U2(f31_out1) → U3(f33_in)
U3(f33_out1(T9)) → f24_out1(T9)

Q is empty.

(3) QTRSRRRProof (EQUIVALENT transformation)

Used ordering:
Knuth-Bendix order [KBO] with precedence:
f1in > U11 > f1out11 > f24in > U21 > U31 > b > f33in > f33out11 > f31in > f31out1 > f24out11

and weight map:

f1_in=5
f24_in=4
f31_in=2
f31_out1=1
f33_in=2
b=1
U1_1=1
f24_out1_1=2
f1_out1_1=3
f33_out1_1=1
U2_1=2
U3_1=1

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

f1_inU1(f24_in)
U1(f24_out1(T9)) → f1_out1(T9)
f31_inf31_out1
f33_inf33_out1(b)
f24_inU2(f31_in)
U2(f31_out1) → U3(f33_in)
U3(f33_out1(T9)) → f24_out1(T9)


(4) Obligation:

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

(5) RisEmptyProof (EQUIVALENT transformation)

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

(6) YES