(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).

Query: h(g)

(1) PrologToPrologProblemTransformerProof (SOUND transformation)

Built Prolog problem from termination graph ICLP10.

(2) Obligation:

Clauses:

gA(T112, 0).
gA(T118, s(T132)) :- gA(s(T118), T132).
fB(0, T168).
fB(s(T188), T175) :- fB(T188, s(T175)).
hC(c(0, 0)).
hC(c(0, s(0))).
hC(c(0, s(s(0)))).
hC(c(0, s(s(s(0))))).
hC(c(0, s(s(s(s(0)))))).
hC(c(0, s(s(s(s(s(0))))))).
hC(c(0, s(s(s(s(s(s(0)))))))).
hC(c(0, s(s(s(s(s(s(s(0))))))))).
hC(c(0, s(s(s(s(s(s(s(s(T104)))))))))) :- gA(s(s(s(s(s(s(s(0))))))), T104).
hC(c(s(T159), T140)) :- fB(T159, T140).
hC(c(s(T159), T140)) :- ','(fB(T159, T140), gA(T159, T140)).

Query: hC(g)

(3) PrologToPiTRSProof (SOUND transformation)

We use the technique of [TOCL09]. With regard to the inferred argument filtering the predicates were used in the following modes:
hC_in: (b)
gA_in: (b,b)
fB_in: (b,b)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

hC_in_g(c(0, 0)) → hC_out_g(c(0, 0))
hC_in_g(c(0, s(0))) → hC_out_g(c(0, s(0)))
hC_in_g(c(0, s(s(0)))) → hC_out_g(c(0, s(s(0))))
hC_in_g(c(0, s(s(s(0))))) → hC_out_g(c(0, s(s(s(0)))))
hC_in_g(c(0, s(s(s(s(0)))))) → hC_out_g(c(0, s(s(s(s(0))))))
hC_in_g(c(0, s(s(s(s(s(0))))))) → hC_out_g(c(0, s(s(s(s(s(0)))))))
hC_in_g(c(0, s(s(s(s(s(s(0)))))))) → hC_out_g(c(0, s(s(s(s(s(s(0))))))))
hC_in_g(c(0, s(s(s(s(s(s(s(0))))))))) → hC_out_g(c(0, s(s(s(s(s(s(s(0)))))))))
hC_in_g(c(0, s(s(s(s(s(s(s(s(T104)))))))))) → U3_g(T104, gA_in_gg(s(s(s(s(s(s(s(0))))))), T104))
gA_in_gg(T112, 0) → gA_out_gg(T112, 0)
gA_in_gg(T118, s(T132)) → U1_gg(T118, T132, gA_in_gg(s(T118), T132))
U1_gg(T118, T132, gA_out_gg(s(T118), T132)) → gA_out_gg(T118, s(T132))
U3_g(T104, gA_out_gg(s(s(s(s(s(s(s(0))))))), T104)) → hC_out_g(c(0, s(s(s(s(s(s(s(s(T104))))))))))
hC_in_g(c(s(T159), T140)) → U4_g(T159, T140, fB_in_gg(T159, T140))
fB_in_gg(0, T168) → fB_out_gg(0, T168)
fB_in_gg(s(T188), T175) → U2_gg(T188, T175, fB_in_gg(T188, s(T175)))
U2_gg(T188, T175, fB_out_gg(T188, s(T175))) → fB_out_gg(s(T188), T175)
U4_g(T159, T140, fB_out_gg(T159, T140)) → hC_out_g(c(s(T159), T140))
U4_g(T159, T140, fB_out_gg(T159, T140)) → U5_g(T159, T140, gA_in_gg(T159, T140))
U5_g(T159, T140, gA_out_gg(T159, T140)) → hC_out_g(c(s(T159), T140))

The argument filtering Pi contains the following mapping:
hC_in_g(x1)  =  hC_in_g(x1)
c(x1, x2)  =  c(x1, x2)
0  =  0
hC_out_g(x1)  =  hC_out_g
s(x1)  =  s(x1)
U3_g(x1, x2)  =  U3_g(x2)
gA_in_gg(x1, x2)  =  gA_in_gg(x1, x2)
gA_out_gg(x1, x2)  =  gA_out_gg
U1_gg(x1, x2, x3)  =  U1_gg(x3)
U4_g(x1, x2, x3)  =  U4_g(x1, x2, x3)
fB_in_gg(x1, x2)  =  fB_in_gg(x1, x2)
fB_out_gg(x1, x2)  =  fB_out_gg
U2_gg(x1, x2, x3)  =  U2_gg(x3)
U5_g(x1, x2, x3)  =  U5_g(x3)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog

(4) Obligation:

Pi-finite rewrite system:
The TRS R consists of the following rules:

hC_in_g(c(0, 0)) → hC_out_g(c(0, 0))
hC_in_g(c(0, s(0))) → hC_out_g(c(0, s(0)))
hC_in_g(c(0, s(s(0)))) → hC_out_g(c(0, s(s(0))))
hC_in_g(c(0, s(s(s(0))))) → hC_out_g(c(0, s(s(s(0)))))
hC_in_g(c(0, s(s(s(s(0)))))) → hC_out_g(c(0, s(s(s(s(0))))))
hC_in_g(c(0, s(s(s(s(s(0))))))) → hC_out_g(c(0, s(s(s(s(s(0)))))))
hC_in_g(c(0, s(s(s(s(s(s(0)))))))) → hC_out_g(c(0, s(s(s(s(s(s(0))))))))
hC_in_g(c(0, s(s(s(s(s(s(s(0))))))))) → hC_out_g(c(0, s(s(s(s(s(s(s(0)))))))))
hC_in_g(c(0, s(s(s(s(s(s(s(s(T104)))))))))) → U3_g(T104, gA_in_gg(s(s(s(s(s(s(s(0))))))), T104))
gA_in_gg(T112, 0) → gA_out_gg(T112, 0)
gA_in_gg(T118, s(T132)) → U1_gg(T118, T132, gA_in_gg(s(T118), T132))
U1_gg(T118, T132, gA_out_gg(s(T118), T132)) → gA_out_gg(T118, s(T132))
U3_g(T104, gA_out_gg(s(s(s(s(s(s(s(0))))))), T104)) → hC_out_g(c(0, s(s(s(s(s(s(s(s(T104))))))))))
hC_in_g(c(s(T159), T140)) → U4_g(T159, T140, fB_in_gg(T159, T140))
fB_in_gg(0, T168) → fB_out_gg(0, T168)
fB_in_gg(s(T188), T175) → U2_gg(T188, T175, fB_in_gg(T188, s(T175)))
U2_gg(T188, T175, fB_out_gg(T188, s(T175))) → fB_out_gg(s(T188), T175)
U4_g(T159, T140, fB_out_gg(T159, T140)) → hC_out_g(c(s(T159), T140))
U4_g(T159, T140, fB_out_gg(T159, T140)) → U5_g(T159, T140, gA_in_gg(T159, T140))
U5_g(T159, T140, gA_out_gg(T159, T140)) → hC_out_g(c(s(T159), T140))

The argument filtering Pi contains the following mapping:
hC_in_g(x1)  =  hC_in_g(x1)
c(x1, x2)  =  c(x1, x2)
0  =  0
hC_out_g(x1)  =  hC_out_g
s(x1)  =  s(x1)
U3_g(x1, x2)  =  U3_g(x2)
gA_in_gg(x1, x2)  =  gA_in_gg(x1, x2)
gA_out_gg(x1, x2)  =  gA_out_gg
U1_gg(x1, x2, x3)  =  U1_gg(x3)
U4_g(x1, x2, x3)  =  U4_g(x1, x2, x3)
fB_in_gg(x1, x2)  =  fB_in_gg(x1, x2)
fB_out_gg(x1, x2)  =  fB_out_gg
U2_gg(x1, x2, x3)  =  U2_gg(x3)
U5_g(x1, x2, x3)  =  U5_g(x3)

(5) DependencyPairsProof (EQUIVALENT transformation)

Using Dependency Pairs [AG00,LOPSTR] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

HC_IN_G(c(0, s(s(s(s(s(s(s(s(T104)))))))))) → U3_G(T104, gA_in_gg(s(s(s(s(s(s(s(0))))))), T104))
HC_IN_G(c(0, s(s(s(s(s(s(s(s(T104)))))))))) → GA_IN_GG(s(s(s(s(s(s(s(0))))))), T104)
GA_IN_GG(T118, s(T132)) → U1_GG(T118, T132, gA_in_gg(s(T118), T132))
GA_IN_GG(T118, s(T132)) → GA_IN_GG(s(T118), T132)
HC_IN_G(c(s(T159), T140)) → U4_G(T159, T140, fB_in_gg(T159, T140))
HC_IN_G(c(s(T159), T140)) → FB_IN_GG(T159, T140)
FB_IN_GG(s(T188), T175) → U2_GG(T188, T175, fB_in_gg(T188, s(T175)))
FB_IN_GG(s(T188), T175) → FB_IN_GG(T188, s(T175))
U4_G(T159, T140, fB_out_gg(T159, T140)) → U5_G(T159, T140, gA_in_gg(T159, T140))
U4_G(T159, T140, fB_out_gg(T159, T140)) → GA_IN_GG(T159, T140)

The TRS R consists of the following rules:

hC_in_g(c(0, 0)) → hC_out_g(c(0, 0))
hC_in_g(c(0, s(0))) → hC_out_g(c(0, s(0)))
hC_in_g(c(0, s(s(0)))) → hC_out_g(c(0, s(s(0))))
hC_in_g(c(0, s(s(s(0))))) → hC_out_g(c(0, s(s(s(0)))))
hC_in_g(c(0, s(s(s(s(0)))))) → hC_out_g(c(0, s(s(s(s(0))))))
hC_in_g(c(0, s(s(s(s(s(0))))))) → hC_out_g(c(0, s(s(s(s(s(0)))))))
hC_in_g(c(0, s(s(s(s(s(s(0)))))))) → hC_out_g(c(0, s(s(s(s(s(s(0))))))))
hC_in_g(c(0, s(s(s(s(s(s(s(0))))))))) → hC_out_g(c(0, s(s(s(s(s(s(s(0)))))))))
hC_in_g(c(0, s(s(s(s(s(s(s(s(T104)))))))))) → U3_g(T104, gA_in_gg(s(s(s(s(s(s(s(0))))))), T104))
gA_in_gg(T112, 0) → gA_out_gg(T112, 0)
gA_in_gg(T118, s(T132)) → U1_gg(T118, T132, gA_in_gg(s(T118), T132))
U1_gg(T118, T132, gA_out_gg(s(T118), T132)) → gA_out_gg(T118, s(T132))
U3_g(T104, gA_out_gg(s(s(s(s(s(s(s(0))))))), T104)) → hC_out_g(c(0, s(s(s(s(s(s(s(s(T104))))))))))
hC_in_g(c(s(T159), T140)) → U4_g(T159, T140, fB_in_gg(T159, T140))
fB_in_gg(0, T168) → fB_out_gg(0, T168)
fB_in_gg(s(T188), T175) → U2_gg(T188, T175, fB_in_gg(T188, s(T175)))
U2_gg(T188, T175, fB_out_gg(T188, s(T175))) → fB_out_gg(s(T188), T175)
U4_g(T159, T140, fB_out_gg(T159, T140)) → hC_out_g(c(s(T159), T140))
U4_g(T159, T140, fB_out_gg(T159, T140)) → U5_g(T159, T140, gA_in_gg(T159, T140))
U5_g(T159, T140, gA_out_gg(T159, T140)) → hC_out_g(c(s(T159), T140))

The argument filtering Pi contains the following mapping:
hC_in_g(x1)  =  hC_in_g(x1)
c(x1, x2)  =  c(x1, x2)
0  =  0
hC_out_g(x1)  =  hC_out_g
s(x1)  =  s(x1)
U3_g(x1, x2)  =  U3_g(x2)
gA_in_gg(x1, x2)  =  gA_in_gg(x1, x2)
gA_out_gg(x1, x2)  =  gA_out_gg
U1_gg(x1, x2, x3)  =  U1_gg(x3)
U4_g(x1, x2, x3)  =  U4_g(x1, x2, x3)
fB_in_gg(x1, x2)  =  fB_in_gg(x1, x2)
fB_out_gg(x1, x2)  =  fB_out_gg
U2_gg(x1, x2, x3)  =  U2_gg(x3)
U5_g(x1, x2, x3)  =  U5_g(x3)
HC_IN_G(x1)  =  HC_IN_G(x1)
U3_G(x1, x2)  =  U3_G(x2)
GA_IN_GG(x1, x2)  =  GA_IN_GG(x1, x2)
U1_GG(x1, x2, x3)  =  U1_GG(x3)
U4_G(x1, x2, x3)  =  U4_G(x1, x2, x3)
FB_IN_GG(x1, x2)  =  FB_IN_GG(x1, x2)
U2_GG(x1, x2, x3)  =  U2_GG(x3)
U5_G(x1, x2, x3)  =  U5_G(x3)

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

(6) Obligation:

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

HC_IN_G(c(0, s(s(s(s(s(s(s(s(T104)))))))))) → U3_G(T104, gA_in_gg(s(s(s(s(s(s(s(0))))))), T104))
HC_IN_G(c(0, s(s(s(s(s(s(s(s(T104)))))))))) → GA_IN_GG(s(s(s(s(s(s(s(0))))))), T104)
GA_IN_GG(T118, s(T132)) → U1_GG(T118, T132, gA_in_gg(s(T118), T132))
GA_IN_GG(T118, s(T132)) → GA_IN_GG(s(T118), T132)
HC_IN_G(c(s(T159), T140)) → U4_G(T159, T140, fB_in_gg(T159, T140))
HC_IN_G(c(s(T159), T140)) → FB_IN_GG(T159, T140)
FB_IN_GG(s(T188), T175) → U2_GG(T188, T175, fB_in_gg(T188, s(T175)))
FB_IN_GG(s(T188), T175) → FB_IN_GG(T188, s(T175))
U4_G(T159, T140, fB_out_gg(T159, T140)) → U5_G(T159, T140, gA_in_gg(T159, T140))
U4_G(T159, T140, fB_out_gg(T159, T140)) → GA_IN_GG(T159, T140)

The TRS R consists of the following rules:

hC_in_g(c(0, 0)) → hC_out_g(c(0, 0))
hC_in_g(c(0, s(0))) → hC_out_g(c(0, s(0)))
hC_in_g(c(0, s(s(0)))) → hC_out_g(c(0, s(s(0))))
hC_in_g(c(0, s(s(s(0))))) → hC_out_g(c(0, s(s(s(0)))))
hC_in_g(c(0, s(s(s(s(0)))))) → hC_out_g(c(0, s(s(s(s(0))))))
hC_in_g(c(0, s(s(s(s(s(0))))))) → hC_out_g(c(0, s(s(s(s(s(0)))))))
hC_in_g(c(0, s(s(s(s(s(s(0)))))))) → hC_out_g(c(0, s(s(s(s(s(s(0))))))))
hC_in_g(c(0, s(s(s(s(s(s(s(0))))))))) → hC_out_g(c(0, s(s(s(s(s(s(s(0)))))))))
hC_in_g(c(0, s(s(s(s(s(s(s(s(T104)))))))))) → U3_g(T104, gA_in_gg(s(s(s(s(s(s(s(0))))))), T104))
gA_in_gg(T112, 0) → gA_out_gg(T112, 0)
gA_in_gg(T118, s(T132)) → U1_gg(T118, T132, gA_in_gg(s(T118), T132))
U1_gg(T118, T132, gA_out_gg(s(T118), T132)) → gA_out_gg(T118, s(T132))
U3_g(T104, gA_out_gg(s(s(s(s(s(s(s(0))))))), T104)) → hC_out_g(c(0, s(s(s(s(s(s(s(s(T104))))))))))
hC_in_g(c(s(T159), T140)) → U4_g(T159, T140, fB_in_gg(T159, T140))
fB_in_gg(0, T168) → fB_out_gg(0, T168)
fB_in_gg(s(T188), T175) → U2_gg(T188, T175, fB_in_gg(T188, s(T175)))
U2_gg(T188, T175, fB_out_gg(T188, s(T175))) → fB_out_gg(s(T188), T175)
U4_g(T159, T140, fB_out_gg(T159, T140)) → hC_out_g(c(s(T159), T140))
U4_g(T159, T140, fB_out_gg(T159, T140)) → U5_g(T159, T140, gA_in_gg(T159, T140))
U5_g(T159, T140, gA_out_gg(T159, T140)) → hC_out_g(c(s(T159), T140))

The argument filtering Pi contains the following mapping:
hC_in_g(x1)  =  hC_in_g(x1)
c(x1, x2)  =  c(x1, x2)
0  =  0
hC_out_g(x1)  =  hC_out_g
s(x1)  =  s(x1)
U3_g(x1, x2)  =  U3_g(x2)
gA_in_gg(x1, x2)  =  gA_in_gg(x1, x2)
gA_out_gg(x1, x2)  =  gA_out_gg
U1_gg(x1, x2, x3)  =  U1_gg(x3)
U4_g(x1, x2, x3)  =  U4_g(x1, x2, x3)
fB_in_gg(x1, x2)  =  fB_in_gg(x1, x2)
fB_out_gg(x1, x2)  =  fB_out_gg
U2_gg(x1, x2, x3)  =  U2_gg(x3)
U5_g(x1, x2, x3)  =  U5_g(x3)
HC_IN_G(x1)  =  HC_IN_G(x1)
U3_G(x1, x2)  =  U3_G(x2)
GA_IN_GG(x1, x2)  =  GA_IN_GG(x1, x2)
U1_GG(x1, x2, x3)  =  U1_GG(x3)
U4_G(x1, x2, x3)  =  U4_G(x1, x2, x3)
FB_IN_GG(x1, x2)  =  FB_IN_GG(x1, x2)
U2_GG(x1, x2, x3)  =  U2_GG(x3)
U5_G(x1, x2, x3)  =  U5_G(x3)

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

(7) DependencyGraphProof (EQUIVALENT transformation)

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

(8) Complex Obligation (AND)

(9) Obligation:

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

FB_IN_GG(s(T188), T175) → FB_IN_GG(T188, s(T175))

The TRS R consists of the following rules:

hC_in_g(c(0, 0)) → hC_out_g(c(0, 0))
hC_in_g(c(0, s(0))) → hC_out_g(c(0, s(0)))
hC_in_g(c(0, s(s(0)))) → hC_out_g(c(0, s(s(0))))
hC_in_g(c(0, s(s(s(0))))) → hC_out_g(c(0, s(s(s(0)))))
hC_in_g(c(0, s(s(s(s(0)))))) → hC_out_g(c(0, s(s(s(s(0))))))
hC_in_g(c(0, s(s(s(s(s(0))))))) → hC_out_g(c(0, s(s(s(s(s(0)))))))
hC_in_g(c(0, s(s(s(s(s(s(0)))))))) → hC_out_g(c(0, s(s(s(s(s(s(0))))))))
hC_in_g(c(0, s(s(s(s(s(s(s(0))))))))) → hC_out_g(c(0, s(s(s(s(s(s(s(0)))))))))
hC_in_g(c(0, s(s(s(s(s(s(s(s(T104)))))))))) → U3_g(T104, gA_in_gg(s(s(s(s(s(s(s(0))))))), T104))
gA_in_gg(T112, 0) → gA_out_gg(T112, 0)
gA_in_gg(T118, s(T132)) → U1_gg(T118, T132, gA_in_gg(s(T118), T132))
U1_gg(T118, T132, gA_out_gg(s(T118), T132)) → gA_out_gg(T118, s(T132))
U3_g(T104, gA_out_gg(s(s(s(s(s(s(s(0))))))), T104)) → hC_out_g(c(0, s(s(s(s(s(s(s(s(T104))))))))))
hC_in_g(c(s(T159), T140)) → U4_g(T159, T140, fB_in_gg(T159, T140))
fB_in_gg(0, T168) → fB_out_gg(0, T168)
fB_in_gg(s(T188), T175) → U2_gg(T188, T175, fB_in_gg(T188, s(T175)))
U2_gg(T188, T175, fB_out_gg(T188, s(T175))) → fB_out_gg(s(T188), T175)
U4_g(T159, T140, fB_out_gg(T159, T140)) → hC_out_g(c(s(T159), T140))
U4_g(T159, T140, fB_out_gg(T159, T140)) → U5_g(T159, T140, gA_in_gg(T159, T140))
U5_g(T159, T140, gA_out_gg(T159, T140)) → hC_out_g(c(s(T159), T140))

The argument filtering Pi contains the following mapping:
hC_in_g(x1)  =  hC_in_g(x1)
c(x1, x2)  =  c(x1, x2)
0  =  0
hC_out_g(x1)  =  hC_out_g
s(x1)  =  s(x1)
U3_g(x1, x2)  =  U3_g(x2)
gA_in_gg(x1, x2)  =  gA_in_gg(x1, x2)
gA_out_gg(x1, x2)  =  gA_out_gg
U1_gg(x1, x2, x3)  =  U1_gg(x3)
U4_g(x1, x2, x3)  =  U4_g(x1, x2, x3)
fB_in_gg(x1, x2)  =  fB_in_gg(x1, x2)
fB_out_gg(x1, x2)  =  fB_out_gg
U2_gg(x1, x2, x3)  =  U2_gg(x3)
U5_g(x1, x2, x3)  =  U5_g(x3)
FB_IN_GG(x1, x2)  =  FB_IN_GG(x1, x2)

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

(10) UsableRulesProof (EQUIVALENT transformation)

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

(11) Obligation:

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

FB_IN_GG(s(T188), T175) → FB_IN_GG(T188, s(T175))

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

(12) PiDPToQDPProof (EQUIVALENT transformation)

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

(13) Obligation:

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

FB_IN_GG(s(T188), T175) → FB_IN_GG(T188, s(T175))

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

(14) 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:

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

(15) YES

(16) Obligation:

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

GA_IN_GG(T118, s(T132)) → GA_IN_GG(s(T118), T132)

The TRS R consists of the following rules:

hC_in_g(c(0, 0)) → hC_out_g(c(0, 0))
hC_in_g(c(0, s(0))) → hC_out_g(c(0, s(0)))
hC_in_g(c(0, s(s(0)))) → hC_out_g(c(0, s(s(0))))
hC_in_g(c(0, s(s(s(0))))) → hC_out_g(c(0, s(s(s(0)))))
hC_in_g(c(0, s(s(s(s(0)))))) → hC_out_g(c(0, s(s(s(s(0))))))
hC_in_g(c(0, s(s(s(s(s(0))))))) → hC_out_g(c(0, s(s(s(s(s(0)))))))
hC_in_g(c(0, s(s(s(s(s(s(0)))))))) → hC_out_g(c(0, s(s(s(s(s(s(0))))))))
hC_in_g(c(0, s(s(s(s(s(s(s(0))))))))) → hC_out_g(c(0, s(s(s(s(s(s(s(0)))))))))
hC_in_g(c(0, s(s(s(s(s(s(s(s(T104)))))))))) → U3_g(T104, gA_in_gg(s(s(s(s(s(s(s(0))))))), T104))
gA_in_gg(T112, 0) → gA_out_gg(T112, 0)
gA_in_gg(T118, s(T132)) → U1_gg(T118, T132, gA_in_gg(s(T118), T132))
U1_gg(T118, T132, gA_out_gg(s(T118), T132)) → gA_out_gg(T118, s(T132))
U3_g(T104, gA_out_gg(s(s(s(s(s(s(s(0))))))), T104)) → hC_out_g(c(0, s(s(s(s(s(s(s(s(T104))))))))))
hC_in_g(c(s(T159), T140)) → U4_g(T159, T140, fB_in_gg(T159, T140))
fB_in_gg(0, T168) → fB_out_gg(0, T168)
fB_in_gg(s(T188), T175) → U2_gg(T188, T175, fB_in_gg(T188, s(T175)))
U2_gg(T188, T175, fB_out_gg(T188, s(T175))) → fB_out_gg(s(T188), T175)
U4_g(T159, T140, fB_out_gg(T159, T140)) → hC_out_g(c(s(T159), T140))
U4_g(T159, T140, fB_out_gg(T159, T140)) → U5_g(T159, T140, gA_in_gg(T159, T140))
U5_g(T159, T140, gA_out_gg(T159, T140)) → hC_out_g(c(s(T159), T140))

The argument filtering Pi contains the following mapping:
hC_in_g(x1)  =  hC_in_g(x1)
c(x1, x2)  =  c(x1, x2)
0  =  0
hC_out_g(x1)  =  hC_out_g
s(x1)  =  s(x1)
U3_g(x1, x2)  =  U3_g(x2)
gA_in_gg(x1, x2)  =  gA_in_gg(x1, x2)
gA_out_gg(x1, x2)  =  gA_out_gg
U1_gg(x1, x2, x3)  =  U1_gg(x3)
U4_g(x1, x2, x3)  =  U4_g(x1, x2, x3)
fB_in_gg(x1, x2)  =  fB_in_gg(x1, x2)
fB_out_gg(x1, x2)  =  fB_out_gg
U2_gg(x1, x2, x3)  =  U2_gg(x3)
U5_g(x1, x2, x3)  =  U5_g(x3)
GA_IN_GG(x1, x2)  =  GA_IN_GG(x1, x2)

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

(17) UsableRulesProof (EQUIVALENT transformation)

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

(18) Obligation:

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

GA_IN_GG(T118, s(T132)) → GA_IN_GG(s(T118), T132)

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

(19) PiDPToQDPProof (EQUIVALENT transformation)

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

(20) Obligation:

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

GA_IN_GG(T118, s(T132)) → GA_IN_GG(s(T118), T132)

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

(21) 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:

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

(22) YES