(0) Obligation:

Clauses:

duplicate([], []).
duplicate(X, .(H, .(H, Z))) :- ','(no(empty(X)), ','(head(X, H), ','(tail(X, T), duplicate(T, Z)))).
head([], X1).
head(.(H, X2), H).
tail([], []).
tail(.(X3, T), T).
empty([]).
no(X) :- ','(X, ','(!, failure(a))).
no(X4).
failure(b).

Query: duplicate(g,a)

(1) PrologToTRSTransformerProof (SOUND transformation)

Transformed Prolog program to TRS.

(2) Obligation:

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

f3_in([]) → f3_out1
f3_in(.(T35, T36)) → U1(f3_in(T36), .(T35, T36))
U1(f3_out1, .(T35, T36)) → f3_out1

Q is empty.

(3) QTRSRRRProof (EQUIVALENT transformation)

Used ordering:
Polynomial interpretation [POLO]:

POL(.(x1, x2)) = x1 + 2·x2   
POL(U1(x1, x2)) = x1 + x2   
POL([]) = 2   
POL(f3_in(x1)) = 2·x1   
POL(f3_out1) = 1   
With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:

f3_in([]) → f3_out1


(4) Obligation:

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

f3_in(.(T35, T36)) → U1(f3_in(T36), .(T35, T36))
U1(f3_out1, .(T35, T36)) → f3_out1

Q is empty.

(5) QTRSRRRProof (EQUIVALENT transformation)

Used ordering:
Polynomial interpretation [POLO]:

POL(.(x1, x2)) = 1 + x1 + 2·x2   
POL(U1(x1, x2)) = x1 + x2   
POL(f3_in(x1)) = 2 + 2·x1   
POL(f3_out1) = 0   
With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:

f3_in(.(T35, T36)) → U1(f3_in(T36), .(T35, T36))
U1(f3_out1, .(T35, T36)) → f3_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