(0) Obligation:

Clauses:

h(X) :- ','(f(X), g(X)).
f(c(0, X1)).
f(c(X, Y)) :- ','(no(zero(X)), ','(p(X, P), f(c(P, s(Y))))).
g(c(X2, 0)).
g(c(X, Y)) :- ','(no(zero(Y)), ','(p(Y, P), g(c(s(X), P)))).
p(0, 0).
p(s(X), X).
zero(0).
no(X) :- ','(X, ','(!, failure(a))).
no(X3).
failure(b).

Queries:

h(g).

(1) PrologToDTProblemTransformerProof (SOUND transformation)

Built DT problem from termination graph.

(2) Obligation:

Triples:

g193(T118, s(T132)) :- g193(s(T118), T132).
f235(s(T188), T175) :- f235(T188, s(T175)).
h1(c(0, s(s(s(s(s(s(s(s(T104)))))))))) :- g193(s(s(s(s(s(s(s(0))))))), T104).
h1(c(s(T159), T140)) :- f235(T159, T140).
h1(c(s(T159), T140)) :- ','(fc235(T159, T140), g193(T159, T140)).

Clauses:

gc193(T112, 0).
gc193(T118, s(T132)) :- gc193(s(T118), T132).
fc235(0, T168).
fc235(s(T188), T175) :- fc235(T188, s(T175)).

Afs:

h1(x1)  =  h1(x1)

(3) TriplesToPiDPProof (SOUND transformation)

We use the technique of [LOPSTR]. With regard to the inferred argument filtering the predicates were used in the following modes:
h1_in: (b)
g193_in: (b,b)
f235_in: (b,b)
fc235_in: (b,b)
Transforming TRIPLES into the following Term Rewriting System:
Pi DP problem:
The TRS P consists of the following rules:

H1_IN_G(c(0, s(s(s(s(s(s(s(s(T104)))))))))) → U3_G(T104, g193_in_gg(s(s(s(s(s(s(s(0))))))), T104))
H1_IN_G(c(0, s(s(s(s(s(s(s(s(T104)))))))))) → G193_IN_GG(s(s(s(s(s(s(s(0))))))), T104)
G193_IN_GG(T118, s(T132)) → U1_GG(T118, T132, g193_in_gg(s(T118), T132))
G193_IN_GG(T118, s(T132)) → G193_IN_GG(s(T118), T132)
H1_IN_G(c(s(T159), T140)) → U4_G(T159, T140, f235_in_gg(T159, T140))
H1_IN_G(c(s(T159), T140)) → F235_IN_GG(T159, T140)
F235_IN_GG(s(T188), T175) → U2_GG(T188, T175, f235_in_gg(T188, s(T175)))
F235_IN_GG(s(T188), T175) → F235_IN_GG(T188, s(T175))
H1_IN_G(c(s(T159), T140)) → U5_G(T159, T140, fc235_in_gg(T159, T140))
U5_G(T159, T140, fc235_out_gg(T159, T140)) → U6_G(T159, T140, g193_in_gg(T159, T140))
U5_G(T159, T140, fc235_out_gg(T159, T140)) → G193_IN_GG(T159, T140)

The TRS R consists of the following rules:

fc235_in_gg(0, T168) → fc235_out_gg(0, T168)
fc235_in_gg(s(T188), T175) → U9_gg(T188, T175, fc235_in_gg(T188, s(T175)))
U9_gg(T188, T175, fc235_out_gg(T188, s(T175))) → fc235_out_gg(s(T188), T175)

Pi is empty.
We have to consider all (P,R,Pi)-chains

Infinitary Constructor Rewriting Termination of PiDP implies Termination of TRIPLES

(4) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

H1_IN_G(c(0, s(s(s(s(s(s(s(s(T104)))))))))) → U3_G(T104, g193_in_gg(s(s(s(s(s(s(s(0))))))), T104))
H1_IN_G(c(0, s(s(s(s(s(s(s(s(T104)))))))))) → G193_IN_GG(s(s(s(s(s(s(s(0))))))), T104)
G193_IN_GG(T118, s(T132)) → U1_GG(T118, T132, g193_in_gg(s(T118), T132))
G193_IN_GG(T118, s(T132)) → G193_IN_GG(s(T118), T132)
H1_IN_G(c(s(T159), T140)) → U4_G(T159, T140, f235_in_gg(T159, T140))
H1_IN_G(c(s(T159), T140)) → F235_IN_GG(T159, T140)
F235_IN_GG(s(T188), T175) → U2_GG(T188, T175, f235_in_gg(T188, s(T175)))
F235_IN_GG(s(T188), T175) → F235_IN_GG(T188, s(T175))
H1_IN_G(c(s(T159), T140)) → U5_G(T159, T140, fc235_in_gg(T159, T140))
U5_G(T159, T140, fc235_out_gg(T159, T140)) → U6_G(T159, T140, g193_in_gg(T159, T140))
U5_G(T159, T140, fc235_out_gg(T159, T140)) → G193_IN_GG(T159, T140)

The TRS R consists of the following rules:

fc235_in_gg(0, T168) → fc235_out_gg(0, T168)
fc235_in_gg(s(T188), T175) → U9_gg(T188, T175, fc235_in_gg(T188, s(T175)))
U9_gg(T188, T175, fc235_out_gg(T188, s(T175))) → fc235_out_gg(s(T188), T175)

Pi is empty.
We have to consider all (P,R,Pi)-chains

(5) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LOPSTR] contains 2 SCCs with 9 less nodes.

(6) Complex Obligation (AND)

(7) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

F235_IN_GG(s(T188), T175) → F235_IN_GG(T188, s(T175))

The TRS R consists of the following rules:

fc235_in_gg(0, T168) → fc235_out_gg(0, T168)
fc235_in_gg(s(T188), T175) → U9_gg(T188, T175, fc235_in_gg(T188, s(T175)))
U9_gg(T188, T175, fc235_out_gg(T188, s(T175))) → fc235_out_gg(s(T188), T175)

Pi is empty.
We have to consider all (P,R,Pi)-chains

(8) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(9) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

F235_IN_GG(s(T188), T175) → F235_IN_GG(T188, s(T175))

R is empty.
Pi is empty.
We have to consider all (P,R,Pi)-chains

(10) PiDPToQDPProof (EQUIVALENT transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(11) Obligation:

Q DP problem:
The TRS P consists of the following rules:

F235_IN_GG(s(T188), T175) → F235_IN_GG(T188, s(T175))

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.

(12) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • F235_IN_GG(s(T188), T175) → F235_IN_GG(T188, s(T175))
    The graph contains the following edges 1 > 1

(13) YES

(14) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

G193_IN_GG(T118, s(T132)) → G193_IN_GG(s(T118), T132)

The TRS R consists of the following rules:

fc235_in_gg(0, T168) → fc235_out_gg(0, T168)
fc235_in_gg(s(T188), T175) → U9_gg(T188, T175, fc235_in_gg(T188, s(T175)))
U9_gg(T188, T175, fc235_out_gg(T188, s(T175))) → fc235_out_gg(s(T188), T175)

Pi is empty.
We have to consider all (P,R,Pi)-chains

(15) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(16) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

G193_IN_GG(T118, s(T132)) → G193_IN_GG(s(T118), T132)

R is empty.
Pi is empty.
We have to consider all (P,R,Pi)-chains

(17) PiDPToQDPProof (EQUIVALENT transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(18) Obligation:

Q DP problem:
The TRS P consists of the following rules:

G193_IN_GG(T118, s(T132)) → G193_IN_GG(s(T118), T132)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.

(19) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • G193_IN_GG(T118, s(T132)) → G193_IN_GG(s(T118), T132)
    The graph contains the following edges 2 > 2

(20) YES