(0) Obligation:

Clauses:

p(.(X, [])).
p(.(s(s(X)), .(Y, Xs))) :- ','(p(.(X, .(Y, Xs))), p(.(s(s(s(s(Y)))), Xs))).
p(.(0, Xs)) :- p(Xs).

Queries:

p(g).

(1) PrologToPrologProblemTransformerProof (SOUND transformation)

Built Prolog problem from termination graph.

(2) Obligation:

Clauses:

p1(.(T3, [])).
p1(.(s(s(s(s(T24)))), .(T25, T26))) :- p1(.(T24, .(T25, T26))).
p1(.(s(s(s(s(T24)))), .(T25, T26))) :- ','(p1(.(T24, .(T25, T26))), p1(.(s(s(s(s(T25)))), T26))).
p1(.(s(s(s(s(T24)))), .(T25, T26))) :- ','(p1(.(T24, .(T25, T26))), ','(p1(.(s(s(s(s(T25)))), T26)), p1(.(s(s(s(s(T25)))), T26)))).
p1(.(s(s(0)), .(T51, T52))) :- p1(.(T51, T52)).
p1(.(s(s(0)), .(T51, T52))) :- ','(p1(.(T51, T52)), p1(.(s(s(s(s(T51)))), T52))).
p1(.(0, .(T65, []))).
p1(.(0, .(s(s(T78)), .(T79, T80)))) :- p1(.(T78, .(T79, T80))).
p1(.(0, .(s(s(T78)), .(T79, T80)))) :- ','(p1(.(T78, .(T79, T80))), p1(.(s(s(s(s(T79)))), T80))).
p1(.(0, .(0, T95))) :- p1(T95).

Queries:

p1(g).

(3) PrologToPiTRSProof (SOUND transformation)

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

p1_in_g(.(T3, [])) → p1_out_g(.(T3, []))
p1_in_g(.(s(s(s(s(T24)))), .(T25, T26))) → U1_g(T24, T25, T26, p1_in_g(.(T24, .(T25, T26))))
p1_in_g(.(s(s(0)), .(T51, T52))) → U4_g(T51, T52, p1_in_g(.(T51, T52)))
p1_in_g(.(0, .(T65, []))) → p1_out_g(.(0, .(T65, [])))
p1_in_g(.(0, .(s(s(T78)), .(T79, T80)))) → U6_g(T78, T79, T80, p1_in_g(.(T78, .(T79, T80))))
p1_in_g(.(0, .(0, T95))) → U8_g(T95, p1_in_g(T95))
U8_g(T95, p1_out_g(T95)) → p1_out_g(.(0, .(0, T95)))
U6_g(T78, T79, T80, p1_out_g(.(T78, .(T79, T80)))) → p1_out_g(.(0, .(s(s(T78)), .(T79, T80))))
U6_g(T78, T79, T80, p1_out_g(.(T78, .(T79, T80)))) → U7_g(T78, T79, T80, p1_in_g(.(s(s(s(s(T79)))), T80)))
U7_g(T78, T79, T80, p1_out_g(.(s(s(s(s(T79)))), T80))) → p1_out_g(.(0, .(s(s(T78)), .(T79, T80))))
U4_g(T51, T52, p1_out_g(.(T51, T52))) → p1_out_g(.(s(s(0)), .(T51, T52)))
U4_g(T51, T52, p1_out_g(.(T51, T52))) → U5_g(T51, T52, p1_in_g(.(s(s(s(s(T51)))), T52)))
U5_g(T51, T52, p1_out_g(.(s(s(s(s(T51)))), T52))) → p1_out_g(.(s(s(0)), .(T51, T52)))
U1_g(T24, T25, T26, p1_out_g(.(T24, .(T25, T26)))) → p1_out_g(.(s(s(s(s(T24)))), .(T25, T26)))
U1_g(T24, T25, T26, p1_out_g(.(T24, .(T25, T26)))) → U2_g(T24, T25, T26, p1_in_g(.(s(s(s(s(T25)))), T26)))
U2_g(T24, T25, T26, p1_out_g(.(s(s(s(s(T25)))), T26))) → p1_out_g(.(s(s(s(s(T24)))), .(T25, T26)))
U2_g(T24, T25, T26, p1_out_g(.(s(s(s(s(T25)))), T26))) → U3_g(T24, T25, T26, p1_in_g(.(s(s(s(s(T25)))), T26)))
U3_g(T24, T25, T26, p1_out_g(.(s(s(s(s(T25)))), T26))) → p1_out_g(.(s(s(s(s(T24)))), .(T25, T26)))

The argument filtering Pi contains the following mapping:
p1_in_g(x1)  =  p1_in_g(x1)
.(x1, x2)  =  .(x1, x2)
[]  =  []
p1_out_g(x1)  =  p1_out_g
s(x1)  =  s(x1)
U1_g(x1, x2, x3, x4)  =  U1_g(x2, x3, x4)
0  =  0
U4_g(x1, x2, x3)  =  U4_g(x1, x2, x3)
U6_g(x1, x2, x3, x4)  =  U6_g(x2, x3, x4)
U8_g(x1, x2)  =  U8_g(x2)
U7_g(x1, x2, x3, x4)  =  U7_g(x4)
U5_g(x1, x2, x3)  =  U5_g(x3)
U2_g(x1, x2, x3, x4)  =  U2_g(x2, x3, x4)
U3_g(x1, x2, x3, x4)  =  U3_g(x4)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog

(4) Obligation:

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

p1_in_g(.(T3, [])) → p1_out_g(.(T3, []))
p1_in_g(.(s(s(s(s(T24)))), .(T25, T26))) → U1_g(T24, T25, T26, p1_in_g(.(T24, .(T25, T26))))
p1_in_g(.(s(s(0)), .(T51, T52))) → U4_g(T51, T52, p1_in_g(.(T51, T52)))
p1_in_g(.(0, .(T65, []))) → p1_out_g(.(0, .(T65, [])))
p1_in_g(.(0, .(s(s(T78)), .(T79, T80)))) → U6_g(T78, T79, T80, p1_in_g(.(T78, .(T79, T80))))
p1_in_g(.(0, .(0, T95))) → U8_g(T95, p1_in_g(T95))
U8_g(T95, p1_out_g(T95)) → p1_out_g(.(0, .(0, T95)))
U6_g(T78, T79, T80, p1_out_g(.(T78, .(T79, T80)))) → p1_out_g(.(0, .(s(s(T78)), .(T79, T80))))
U6_g(T78, T79, T80, p1_out_g(.(T78, .(T79, T80)))) → U7_g(T78, T79, T80, p1_in_g(.(s(s(s(s(T79)))), T80)))
U7_g(T78, T79, T80, p1_out_g(.(s(s(s(s(T79)))), T80))) → p1_out_g(.(0, .(s(s(T78)), .(T79, T80))))
U4_g(T51, T52, p1_out_g(.(T51, T52))) → p1_out_g(.(s(s(0)), .(T51, T52)))
U4_g(T51, T52, p1_out_g(.(T51, T52))) → U5_g(T51, T52, p1_in_g(.(s(s(s(s(T51)))), T52)))
U5_g(T51, T52, p1_out_g(.(s(s(s(s(T51)))), T52))) → p1_out_g(.(s(s(0)), .(T51, T52)))
U1_g(T24, T25, T26, p1_out_g(.(T24, .(T25, T26)))) → p1_out_g(.(s(s(s(s(T24)))), .(T25, T26)))
U1_g(T24, T25, T26, p1_out_g(.(T24, .(T25, T26)))) → U2_g(T24, T25, T26, p1_in_g(.(s(s(s(s(T25)))), T26)))
U2_g(T24, T25, T26, p1_out_g(.(s(s(s(s(T25)))), T26))) → p1_out_g(.(s(s(s(s(T24)))), .(T25, T26)))
U2_g(T24, T25, T26, p1_out_g(.(s(s(s(s(T25)))), T26))) → U3_g(T24, T25, T26, p1_in_g(.(s(s(s(s(T25)))), T26)))
U3_g(T24, T25, T26, p1_out_g(.(s(s(s(s(T25)))), T26))) → p1_out_g(.(s(s(s(s(T24)))), .(T25, T26)))

The argument filtering Pi contains the following mapping:
p1_in_g(x1)  =  p1_in_g(x1)
.(x1, x2)  =  .(x1, x2)
[]  =  []
p1_out_g(x1)  =  p1_out_g
s(x1)  =  s(x1)
U1_g(x1, x2, x3, x4)  =  U1_g(x2, x3, x4)
0  =  0
U4_g(x1, x2, x3)  =  U4_g(x1, x2, x3)
U6_g(x1, x2, x3, x4)  =  U6_g(x2, x3, x4)
U8_g(x1, x2)  =  U8_g(x2)
U7_g(x1, x2, x3, x4)  =  U7_g(x4)
U5_g(x1, x2, x3)  =  U5_g(x3)
U2_g(x1, x2, x3, x4)  =  U2_g(x2, x3, x4)
U3_g(x1, x2, x3, x4)  =  U3_g(x4)

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

P1_IN_G(.(s(s(s(s(T24)))), .(T25, T26))) → U1_G(T24, T25, T26, p1_in_g(.(T24, .(T25, T26))))
P1_IN_G(.(s(s(s(s(T24)))), .(T25, T26))) → P1_IN_G(.(T24, .(T25, T26)))
P1_IN_G(.(s(s(0)), .(T51, T52))) → U4_G(T51, T52, p1_in_g(.(T51, T52)))
P1_IN_G(.(s(s(0)), .(T51, T52))) → P1_IN_G(.(T51, T52))
P1_IN_G(.(0, .(s(s(T78)), .(T79, T80)))) → U6_G(T78, T79, T80, p1_in_g(.(T78, .(T79, T80))))
P1_IN_G(.(0, .(s(s(T78)), .(T79, T80)))) → P1_IN_G(.(T78, .(T79, T80)))
P1_IN_G(.(0, .(0, T95))) → U8_G(T95, p1_in_g(T95))
P1_IN_G(.(0, .(0, T95))) → P1_IN_G(T95)
U6_G(T78, T79, T80, p1_out_g(.(T78, .(T79, T80)))) → U7_G(T78, T79, T80, p1_in_g(.(s(s(s(s(T79)))), T80)))
U6_G(T78, T79, T80, p1_out_g(.(T78, .(T79, T80)))) → P1_IN_G(.(s(s(s(s(T79)))), T80))
U4_G(T51, T52, p1_out_g(.(T51, T52))) → U5_G(T51, T52, p1_in_g(.(s(s(s(s(T51)))), T52)))
U4_G(T51, T52, p1_out_g(.(T51, T52))) → P1_IN_G(.(s(s(s(s(T51)))), T52))
U1_G(T24, T25, T26, p1_out_g(.(T24, .(T25, T26)))) → U2_G(T24, T25, T26, p1_in_g(.(s(s(s(s(T25)))), T26)))
U1_G(T24, T25, T26, p1_out_g(.(T24, .(T25, T26)))) → P1_IN_G(.(s(s(s(s(T25)))), T26))
U2_G(T24, T25, T26, p1_out_g(.(s(s(s(s(T25)))), T26))) → U3_G(T24, T25, T26, p1_in_g(.(s(s(s(s(T25)))), T26)))
U2_G(T24, T25, T26, p1_out_g(.(s(s(s(s(T25)))), T26))) → P1_IN_G(.(s(s(s(s(T25)))), T26))

The TRS R consists of the following rules:

p1_in_g(.(T3, [])) → p1_out_g(.(T3, []))
p1_in_g(.(s(s(s(s(T24)))), .(T25, T26))) → U1_g(T24, T25, T26, p1_in_g(.(T24, .(T25, T26))))
p1_in_g(.(s(s(0)), .(T51, T52))) → U4_g(T51, T52, p1_in_g(.(T51, T52)))
p1_in_g(.(0, .(T65, []))) → p1_out_g(.(0, .(T65, [])))
p1_in_g(.(0, .(s(s(T78)), .(T79, T80)))) → U6_g(T78, T79, T80, p1_in_g(.(T78, .(T79, T80))))
p1_in_g(.(0, .(0, T95))) → U8_g(T95, p1_in_g(T95))
U8_g(T95, p1_out_g(T95)) → p1_out_g(.(0, .(0, T95)))
U6_g(T78, T79, T80, p1_out_g(.(T78, .(T79, T80)))) → p1_out_g(.(0, .(s(s(T78)), .(T79, T80))))
U6_g(T78, T79, T80, p1_out_g(.(T78, .(T79, T80)))) → U7_g(T78, T79, T80, p1_in_g(.(s(s(s(s(T79)))), T80)))
U7_g(T78, T79, T80, p1_out_g(.(s(s(s(s(T79)))), T80))) → p1_out_g(.(0, .(s(s(T78)), .(T79, T80))))
U4_g(T51, T52, p1_out_g(.(T51, T52))) → p1_out_g(.(s(s(0)), .(T51, T52)))
U4_g(T51, T52, p1_out_g(.(T51, T52))) → U5_g(T51, T52, p1_in_g(.(s(s(s(s(T51)))), T52)))
U5_g(T51, T52, p1_out_g(.(s(s(s(s(T51)))), T52))) → p1_out_g(.(s(s(0)), .(T51, T52)))
U1_g(T24, T25, T26, p1_out_g(.(T24, .(T25, T26)))) → p1_out_g(.(s(s(s(s(T24)))), .(T25, T26)))
U1_g(T24, T25, T26, p1_out_g(.(T24, .(T25, T26)))) → U2_g(T24, T25, T26, p1_in_g(.(s(s(s(s(T25)))), T26)))
U2_g(T24, T25, T26, p1_out_g(.(s(s(s(s(T25)))), T26))) → p1_out_g(.(s(s(s(s(T24)))), .(T25, T26)))
U2_g(T24, T25, T26, p1_out_g(.(s(s(s(s(T25)))), T26))) → U3_g(T24, T25, T26, p1_in_g(.(s(s(s(s(T25)))), T26)))
U3_g(T24, T25, T26, p1_out_g(.(s(s(s(s(T25)))), T26))) → p1_out_g(.(s(s(s(s(T24)))), .(T25, T26)))

The argument filtering Pi contains the following mapping:
p1_in_g(x1)  =  p1_in_g(x1)
.(x1, x2)  =  .(x1, x2)
[]  =  []
p1_out_g(x1)  =  p1_out_g
s(x1)  =  s(x1)
U1_g(x1, x2, x3, x4)  =  U1_g(x2, x3, x4)
0  =  0
U4_g(x1, x2, x3)  =  U4_g(x1, x2, x3)
U6_g(x1, x2, x3, x4)  =  U6_g(x2, x3, x4)
U8_g(x1, x2)  =  U8_g(x2)
U7_g(x1, x2, x3, x4)  =  U7_g(x4)
U5_g(x1, x2, x3)  =  U5_g(x3)
U2_g(x1, x2, x3, x4)  =  U2_g(x2, x3, x4)
U3_g(x1, x2, x3, x4)  =  U3_g(x4)
P1_IN_G(x1)  =  P1_IN_G(x1)
U1_G(x1, x2, x3, x4)  =  U1_G(x2, x3, x4)
U4_G(x1, x2, x3)  =  U4_G(x1, x2, x3)
U6_G(x1, x2, x3, x4)  =  U6_G(x2, x3, x4)
U8_G(x1, x2)  =  U8_G(x2)
U7_G(x1, x2, x3, x4)  =  U7_G(x4)
U5_G(x1, x2, x3)  =  U5_G(x3)
U2_G(x1, x2, x3, x4)  =  U2_G(x2, x3, x4)
U3_G(x1, x2, x3, x4)  =  U3_G(x4)

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

(6) Obligation:

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

P1_IN_G(.(s(s(s(s(T24)))), .(T25, T26))) → U1_G(T24, T25, T26, p1_in_g(.(T24, .(T25, T26))))
P1_IN_G(.(s(s(s(s(T24)))), .(T25, T26))) → P1_IN_G(.(T24, .(T25, T26)))
P1_IN_G(.(s(s(0)), .(T51, T52))) → U4_G(T51, T52, p1_in_g(.(T51, T52)))
P1_IN_G(.(s(s(0)), .(T51, T52))) → P1_IN_G(.(T51, T52))
P1_IN_G(.(0, .(s(s(T78)), .(T79, T80)))) → U6_G(T78, T79, T80, p1_in_g(.(T78, .(T79, T80))))
P1_IN_G(.(0, .(s(s(T78)), .(T79, T80)))) → P1_IN_G(.(T78, .(T79, T80)))
P1_IN_G(.(0, .(0, T95))) → U8_G(T95, p1_in_g(T95))
P1_IN_G(.(0, .(0, T95))) → P1_IN_G(T95)
U6_G(T78, T79, T80, p1_out_g(.(T78, .(T79, T80)))) → U7_G(T78, T79, T80, p1_in_g(.(s(s(s(s(T79)))), T80)))
U6_G(T78, T79, T80, p1_out_g(.(T78, .(T79, T80)))) → P1_IN_G(.(s(s(s(s(T79)))), T80))
U4_G(T51, T52, p1_out_g(.(T51, T52))) → U5_G(T51, T52, p1_in_g(.(s(s(s(s(T51)))), T52)))
U4_G(T51, T52, p1_out_g(.(T51, T52))) → P1_IN_G(.(s(s(s(s(T51)))), T52))
U1_G(T24, T25, T26, p1_out_g(.(T24, .(T25, T26)))) → U2_G(T24, T25, T26, p1_in_g(.(s(s(s(s(T25)))), T26)))
U1_G(T24, T25, T26, p1_out_g(.(T24, .(T25, T26)))) → P1_IN_G(.(s(s(s(s(T25)))), T26))
U2_G(T24, T25, T26, p1_out_g(.(s(s(s(s(T25)))), T26))) → U3_G(T24, T25, T26, p1_in_g(.(s(s(s(s(T25)))), T26)))
U2_G(T24, T25, T26, p1_out_g(.(s(s(s(s(T25)))), T26))) → P1_IN_G(.(s(s(s(s(T25)))), T26))

The TRS R consists of the following rules:

p1_in_g(.(T3, [])) → p1_out_g(.(T3, []))
p1_in_g(.(s(s(s(s(T24)))), .(T25, T26))) → U1_g(T24, T25, T26, p1_in_g(.(T24, .(T25, T26))))
p1_in_g(.(s(s(0)), .(T51, T52))) → U4_g(T51, T52, p1_in_g(.(T51, T52)))
p1_in_g(.(0, .(T65, []))) → p1_out_g(.(0, .(T65, [])))
p1_in_g(.(0, .(s(s(T78)), .(T79, T80)))) → U6_g(T78, T79, T80, p1_in_g(.(T78, .(T79, T80))))
p1_in_g(.(0, .(0, T95))) → U8_g(T95, p1_in_g(T95))
U8_g(T95, p1_out_g(T95)) → p1_out_g(.(0, .(0, T95)))
U6_g(T78, T79, T80, p1_out_g(.(T78, .(T79, T80)))) → p1_out_g(.(0, .(s(s(T78)), .(T79, T80))))
U6_g(T78, T79, T80, p1_out_g(.(T78, .(T79, T80)))) → U7_g(T78, T79, T80, p1_in_g(.(s(s(s(s(T79)))), T80)))
U7_g(T78, T79, T80, p1_out_g(.(s(s(s(s(T79)))), T80))) → p1_out_g(.(0, .(s(s(T78)), .(T79, T80))))
U4_g(T51, T52, p1_out_g(.(T51, T52))) → p1_out_g(.(s(s(0)), .(T51, T52)))
U4_g(T51, T52, p1_out_g(.(T51, T52))) → U5_g(T51, T52, p1_in_g(.(s(s(s(s(T51)))), T52)))
U5_g(T51, T52, p1_out_g(.(s(s(s(s(T51)))), T52))) → p1_out_g(.(s(s(0)), .(T51, T52)))
U1_g(T24, T25, T26, p1_out_g(.(T24, .(T25, T26)))) → p1_out_g(.(s(s(s(s(T24)))), .(T25, T26)))
U1_g(T24, T25, T26, p1_out_g(.(T24, .(T25, T26)))) → U2_g(T24, T25, T26, p1_in_g(.(s(s(s(s(T25)))), T26)))
U2_g(T24, T25, T26, p1_out_g(.(s(s(s(s(T25)))), T26))) → p1_out_g(.(s(s(s(s(T24)))), .(T25, T26)))
U2_g(T24, T25, T26, p1_out_g(.(s(s(s(s(T25)))), T26))) → U3_g(T24, T25, T26, p1_in_g(.(s(s(s(s(T25)))), T26)))
U3_g(T24, T25, T26, p1_out_g(.(s(s(s(s(T25)))), T26))) → p1_out_g(.(s(s(s(s(T24)))), .(T25, T26)))

The argument filtering Pi contains the following mapping:
p1_in_g(x1)  =  p1_in_g(x1)
.(x1, x2)  =  .(x1, x2)
[]  =  []
p1_out_g(x1)  =  p1_out_g
s(x1)  =  s(x1)
U1_g(x1, x2, x3, x4)  =  U1_g(x2, x3, x4)
0  =  0
U4_g(x1, x2, x3)  =  U4_g(x1, x2, x3)
U6_g(x1, x2, x3, x4)  =  U6_g(x2, x3, x4)
U8_g(x1, x2)  =  U8_g(x2)
U7_g(x1, x2, x3, x4)  =  U7_g(x4)
U5_g(x1, x2, x3)  =  U5_g(x3)
U2_g(x1, x2, x3, x4)  =  U2_g(x2, x3, x4)
U3_g(x1, x2, x3, x4)  =  U3_g(x4)
P1_IN_G(x1)  =  P1_IN_G(x1)
U1_G(x1, x2, x3, x4)  =  U1_G(x2, x3, x4)
U4_G(x1, x2, x3)  =  U4_G(x1, x2, x3)
U6_G(x1, x2, x3, x4)  =  U6_G(x2, x3, x4)
U8_G(x1, x2)  =  U8_G(x2)
U7_G(x1, x2, x3, x4)  =  U7_G(x4)
U5_G(x1, x2, x3)  =  U5_G(x3)
U2_G(x1, x2, x3, x4)  =  U2_G(x2, x3, x4)
U3_G(x1, x2, x3, x4)  =  U3_G(x4)

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

(7) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LOPSTR] contains 1 SCC with 4 less nodes.

(8) Obligation:

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

U1_G(T24, T25, T26, p1_out_g(.(T24, .(T25, T26)))) → U2_G(T24, T25, T26, p1_in_g(.(s(s(s(s(T25)))), T26)))
U2_G(T24, T25, T26, p1_out_g(.(s(s(s(s(T25)))), T26))) → P1_IN_G(.(s(s(s(s(T25)))), T26))
P1_IN_G(.(s(s(s(s(T24)))), .(T25, T26))) → U1_G(T24, T25, T26, p1_in_g(.(T24, .(T25, T26))))
U1_G(T24, T25, T26, p1_out_g(.(T24, .(T25, T26)))) → P1_IN_G(.(s(s(s(s(T25)))), T26))
P1_IN_G(.(s(s(s(s(T24)))), .(T25, T26))) → P1_IN_G(.(T24, .(T25, T26)))
P1_IN_G(.(s(s(0)), .(T51, T52))) → U4_G(T51, T52, p1_in_g(.(T51, T52)))
U4_G(T51, T52, p1_out_g(.(T51, T52))) → P1_IN_G(.(s(s(s(s(T51)))), T52))
P1_IN_G(.(s(s(0)), .(T51, T52))) → P1_IN_G(.(T51, T52))
P1_IN_G(.(0, .(s(s(T78)), .(T79, T80)))) → U6_G(T78, T79, T80, p1_in_g(.(T78, .(T79, T80))))
U6_G(T78, T79, T80, p1_out_g(.(T78, .(T79, T80)))) → P1_IN_G(.(s(s(s(s(T79)))), T80))
P1_IN_G(.(0, .(s(s(T78)), .(T79, T80)))) → P1_IN_G(.(T78, .(T79, T80)))
P1_IN_G(.(0, .(0, T95))) → P1_IN_G(T95)

The TRS R consists of the following rules:

p1_in_g(.(T3, [])) → p1_out_g(.(T3, []))
p1_in_g(.(s(s(s(s(T24)))), .(T25, T26))) → U1_g(T24, T25, T26, p1_in_g(.(T24, .(T25, T26))))
p1_in_g(.(s(s(0)), .(T51, T52))) → U4_g(T51, T52, p1_in_g(.(T51, T52)))
p1_in_g(.(0, .(T65, []))) → p1_out_g(.(0, .(T65, [])))
p1_in_g(.(0, .(s(s(T78)), .(T79, T80)))) → U6_g(T78, T79, T80, p1_in_g(.(T78, .(T79, T80))))
p1_in_g(.(0, .(0, T95))) → U8_g(T95, p1_in_g(T95))
U8_g(T95, p1_out_g(T95)) → p1_out_g(.(0, .(0, T95)))
U6_g(T78, T79, T80, p1_out_g(.(T78, .(T79, T80)))) → p1_out_g(.(0, .(s(s(T78)), .(T79, T80))))
U6_g(T78, T79, T80, p1_out_g(.(T78, .(T79, T80)))) → U7_g(T78, T79, T80, p1_in_g(.(s(s(s(s(T79)))), T80)))
U7_g(T78, T79, T80, p1_out_g(.(s(s(s(s(T79)))), T80))) → p1_out_g(.(0, .(s(s(T78)), .(T79, T80))))
U4_g(T51, T52, p1_out_g(.(T51, T52))) → p1_out_g(.(s(s(0)), .(T51, T52)))
U4_g(T51, T52, p1_out_g(.(T51, T52))) → U5_g(T51, T52, p1_in_g(.(s(s(s(s(T51)))), T52)))
U5_g(T51, T52, p1_out_g(.(s(s(s(s(T51)))), T52))) → p1_out_g(.(s(s(0)), .(T51, T52)))
U1_g(T24, T25, T26, p1_out_g(.(T24, .(T25, T26)))) → p1_out_g(.(s(s(s(s(T24)))), .(T25, T26)))
U1_g(T24, T25, T26, p1_out_g(.(T24, .(T25, T26)))) → U2_g(T24, T25, T26, p1_in_g(.(s(s(s(s(T25)))), T26)))
U2_g(T24, T25, T26, p1_out_g(.(s(s(s(s(T25)))), T26))) → p1_out_g(.(s(s(s(s(T24)))), .(T25, T26)))
U2_g(T24, T25, T26, p1_out_g(.(s(s(s(s(T25)))), T26))) → U3_g(T24, T25, T26, p1_in_g(.(s(s(s(s(T25)))), T26)))
U3_g(T24, T25, T26, p1_out_g(.(s(s(s(s(T25)))), T26))) → p1_out_g(.(s(s(s(s(T24)))), .(T25, T26)))

The argument filtering Pi contains the following mapping:
p1_in_g(x1)  =  p1_in_g(x1)
.(x1, x2)  =  .(x1, x2)
[]  =  []
p1_out_g(x1)  =  p1_out_g
s(x1)  =  s(x1)
U1_g(x1, x2, x3, x4)  =  U1_g(x2, x3, x4)
0  =  0
U4_g(x1, x2, x3)  =  U4_g(x1, x2, x3)
U6_g(x1, x2, x3, x4)  =  U6_g(x2, x3, x4)
U8_g(x1, x2)  =  U8_g(x2)
U7_g(x1, x2, x3, x4)  =  U7_g(x4)
U5_g(x1, x2, x3)  =  U5_g(x3)
U2_g(x1, x2, x3, x4)  =  U2_g(x2, x3, x4)
U3_g(x1, x2, x3, x4)  =  U3_g(x4)
P1_IN_G(x1)  =  P1_IN_G(x1)
U1_G(x1, x2, x3, x4)  =  U1_G(x2, x3, x4)
U4_G(x1, x2, x3)  =  U4_G(x1, x2, x3)
U6_G(x1, x2, x3, x4)  =  U6_G(x2, x3, x4)
U2_G(x1, x2, x3, x4)  =  U2_G(x2, x3, x4)

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

(9) PiDPToQDPProof (SOUND transformation)

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

(10) Obligation:

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

U1_G(T25, T26, p1_out_g) → U2_G(T25, T26, p1_in_g(.(s(s(s(s(T25)))), T26)))
U2_G(T25, T26, p1_out_g) → P1_IN_G(.(s(s(s(s(T25)))), T26))
P1_IN_G(.(s(s(s(s(T24)))), .(T25, T26))) → U1_G(T25, T26, p1_in_g(.(T24, .(T25, T26))))
U1_G(T25, T26, p1_out_g) → P1_IN_G(.(s(s(s(s(T25)))), T26))
P1_IN_G(.(s(s(s(s(T24)))), .(T25, T26))) → P1_IN_G(.(T24, .(T25, T26)))
P1_IN_G(.(s(s(0)), .(T51, T52))) → U4_G(T51, T52, p1_in_g(.(T51, T52)))
U4_G(T51, T52, p1_out_g) → P1_IN_G(.(s(s(s(s(T51)))), T52))
P1_IN_G(.(s(s(0)), .(T51, T52))) → P1_IN_G(.(T51, T52))
P1_IN_G(.(0, .(s(s(T78)), .(T79, T80)))) → U6_G(T79, T80, p1_in_g(.(T78, .(T79, T80))))
U6_G(T79, T80, p1_out_g) → P1_IN_G(.(s(s(s(s(T79)))), T80))
P1_IN_G(.(0, .(s(s(T78)), .(T79, T80)))) → P1_IN_G(.(T78, .(T79, T80)))
P1_IN_G(.(0, .(0, T95))) → P1_IN_G(T95)

The TRS R consists of the following rules:

p1_in_g(.(T3, [])) → p1_out_g
p1_in_g(.(s(s(s(s(T24)))), .(T25, T26))) → U1_g(T25, T26, p1_in_g(.(T24, .(T25, T26))))
p1_in_g(.(s(s(0)), .(T51, T52))) → U4_g(T51, T52, p1_in_g(.(T51, T52)))
p1_in_g(.(0, .(T65, []))) → p1_out_g
p1_in_g(.(0, .(s(s(T78)), .(T79, T80)))) → U6_g(T79, T80, p1_in_g(.(T78, .(T79, T80))))
p1_in_g(.(0, .(0, T95))) → U8_g(p1_in_g(T95))
U8_g(p1_out_g) → p1_out_g
U6_g(T79, T80, p1_out_g) → p1_out_g
U6_g(T79, T80, p1_out_g) → U7_g(p1_in_g(.(s(s(s(s(T79)))), T80)))
U7_g(p1_out_g) → p1_out_g
U4_g(T51, T52, p1_out_g) → p1_out_g
U4_g(T51, T52, p1_out_g) → U5_g(p1_in_g(.(s(s(s(s(T51)))), T52)))
U5_g(p1_out_g) → p1_out_g
U1_g(T25, T26, p1_out_g) → p1_out_g
U1_g(T25, T26, p1_out_g) → U2_g(T25, T26, p1_in_g(.(s(s(s(s(T25)))), T26)))
U2_g(T25, T26, p1_out_g) → p1_out_g
U2_g(T25, T26, p1_out_g) → U3_g(p1_in_g(.(s(s(s(s(T25)))), T26)))
U3_g(p1_out_g) → p1_out_g

The set Q consists of the following terms:

p1_in_g(x0)
U8_g(x0)
U6_g(x0, x1, x2)
U7_g(x0)
U4_g(x0, x1, x2)
U5_g(x0)
U1_g(x0, x1, x2)
U2_g(x0, x1, x2)
U3_g(x0)

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

(11) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


P1_IN_G(.(s(s(0)), .(T51, T52))) → U4_G(T51, T52, p1_in_g(.(T51, T52)))
P1_IN_G(.(s(s(0)), .(T51, T52))) → P1_IN_G(.(T51, T52))
P1_IN_G(.(0, .(s(s(T78)), .(T79, T80)))) → U6_G(T79, T80, p1_in_g(.(T78, .(T79, T80))))
P1_IN_G(.(0, .(s(s(T78)), .(T79, T80)))) → P1_IN_G(.(T78, .(T79, T80)))
P1_IN_G(.(0, .(0, T95))) → P1_IN_G(T95)
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial interpretation [POLO]:

POL(.(x1, x2)) = x1 + x2   
POL(0) = 1   
POL(P1_IN_G(x1)) = x1   
POL(U1_G(x1, x2, x3)) = x1 + x2   
POL(U1_g(x1, x2, x3)) = 0   
POL(U2_G(x1, x2, x3)) = x1 + x2   
POL(U2_g(x1, x2, x3)) = 0   
POL(U3_g(x1)) = 0   
POL(U4_G(x1, x2, x3)) = x1 + x2   
POL(U4_g(x1, x2, x3)) = 0   
POL(U5_g(x1)) = 0   
POL(U6_G(x1, x2, x3)) = x1 + x2   
POL(U6_g(x1, x2, x3)) = 0   
POL(U7_g(x1)) = 0   
POL(U8_g(x1)) = 0   
POL([]) = 0   
POL(p1_in_g(x1)) = 0   
POL(p1_out_g) = 0   
POL(s(x1)) = x1   

The following usable rules [FROCOS05] were oriented: none

(12) Obligation:

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

U1_G(T25, T26, p1_out_g) → U2_G(T25, T26, p1_in_g(.(s(s(s(s(T25)))), T26)))
U2_G(T25, T26, p1_out_g) → P1_IN_G(.(s(s(s(s(T25)))), T26))
P1_IN_G(.(s(s(s(s(T24)))), .(T25, T26))) → U1_G(T25, T26, p1_in_g(.(T24, .(T25, T26))))
U1_G(T25, T26, p1_out_g) → P1_IN_G(.(s(s(s(s(T25)))), T26))
P1_IN_G(.(s(s(s(s(T24)))), .(T25, T26))) → P1_IN_G(.(T24, .(T25, T26)))
U4_G(T51, T52, p1_out_g) → P1_IN_G(.(s(s(s(s(T51)))), T52))
U6_G(T79, T80, p1_out_g) → P1_IN_G(.(s(s(s(s(T79)))), T80))

The TRS R consists of the following rules:

p1_in_g(.(T3, [])) → p1_out_g
p1_in_g(.(s(s(s(s(T24)))), .(T25, T26))) → U1_g(T25, T26, p1_in_g(.(T24, .(T25, T26))))
p1_in_g(.(s(s(0)), .(T51, T52))) → U4_g(T51, T52, p1_in_g(.(T51, T52)))
p1_in_g(.(0, .(T65, []))) → p1_out_g
p1_in_g(.(0, .(s(s(T78)), .(T79, T80)))) → U6_g(T79, T80, p1_in_g(.(T78, .(T79, T80))))
p1_in_g(.(0, .(0, T95))) → U8_g(p1_in_g(T95))
U8_g(p1_out_g) → p1_out_g
U6_g(T79, T80, p1_out_g) → p1_out_g
U6_g(T79, T80, p1_out_g) → U7_g(p1_in_g(.(s(s(s(s(T79)))), T80)))
U7_g(p1_out_g) → p1_out_g
U4_g(T51, T52, p1_out_g) → p1_out_g
U4_g(T51, T52, p1_out_g) → U5_g(p1_in_g(.(s(s(s(s(T51)))), T52)))
U5_g(p1_out_g) → p1_out_g
U1_g(T25, T26, p1_out_g) → p1_out_g
U1_g(T25, T26, p1_out_g) → U2_g(T25, T26, p1_in_g(.(s(s(s(s(T25)))), T26)))
U2_g(T25, T26, p1_out_g) → p1_out_g
U2_g(T25, T26, p1_out_g) → U3_g(p1_in_g(.(s(s(s(s(T25)))), T26)))
U3_g(p1_out_g) → p1_out_g

The set Q consists of the following terms:

p1_in_g(x0)
U8_g(x0)
U6_g(x0, x1, x2)
U7_g(x0)
U4_g(x0, x1, x2)
U5_g(x0)
U1_g(x0, x1, x2)
U2_g(x0, x1, x2)
U3_g(x0)

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

(13) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 2 less nodes.

(14) Obligation:

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

U2_G(T25, T26, p1_out_g) → P1_IN_G(.(s(s(s(s(T25)))), T26))
P1_IN_G(.(s(s(s(s(T24)))), .(T25, T26))) → U1_G(T25, T26, p1_in_g(.(T24, .(T25, T26))))
U1_G(T25, T26, p1_out_g) → U2_G(T25, T26, p1_in_g(.(s(s(s(s(T25)))), T26)))
U1_G(T25, T26, p1_out_g) → P1_IN_G(.(s(s(s(s(T25)))), T26))
P1_IN_G(.(s(s(s(s(T24)))), .(T25, T26))) → P1_IN_G(.(T24, .(T25, T26)))

The TRS R consists of the following rules:

p1_in_g(.(T3, [])) → p1_out_g
p1_in_g(.(s(s(s(s(T24)))), .(T25, T26))) → U1_g(T25, T26, p1_in_g(.(T24, .(T25, T26))))
p1_in_g(.(s(s(0)), .(T51, T52))) → U4_g(T51, T52, p1_in_g(.(T51, T52)))
p1_in_g(.(0, .(T65, []))) → p1_out_g
p1_in_g(.(0, .(s(s(T78)), .(T79, T80)))) → U6_g(T79, T80, p1_in_g(.(T78, .(T79, T80))))
p1_in_g(.(0, .(0, T95))) → U8_g(p1_in_g(T95))
U8_g(p1_out_g) → p1_out_g
U6_g(T79, T80, p1_out_g) → p1_out_g
U6_g(T79, T80, p1_out_g) → U7_g(p1_in_g(.(s(s(s(s(T79)))), T80)))
U7_g(p1_out_g) → p1_out_g
U4_g(T51, T52, p1_out_g) → p1_out_g
U4_g(T51, T52, p1_out_g) → U5_g(p1_in_g(.(s(s(s(s(T51)))), T52)))
U5_g(p1_out_g) → p1_out_g
U1_g(T25, T26, p1_out_g) → p1_out_g
U1_g(T25, T26, p1_out_g) → U2_g(T25, T26, p1_in_g(.(s(s(s(s(T25)))), T26)))
U2_g(T25, T26, p1_out_g) → p1_out_g
U2_g(T25, T26, p1_out_g) → U3_g(p1_in_g(.(s(s(s(s(T25)))), T26)))
U3_g(p1_out_g) → p1_out_g

The set Q consists of the following terms:

p1_in_g(x0)
U8_g(x0)
U6_g(x0, x1, x2)
U7_g(x0)
U4_g(x0, x1, x2)
U5_g(x0)
U1_g(x0, x1, x2)
U2_g(x0, x1, x2)
U3_g(x0)

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

(15) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


P1_IN_G(.(s(s(s(s(T24)))), .(T25, T26))) → U1_G(T25, T26, p1_in_g(.(T24, .(T25, T26))))
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial interpretation [POLO]:

POL(.(x1, x2)) = 1 + x2   
POL(0) = 0   
POL(P1_IN_G(x1)) = x1   
POL(U1_G(x1, x2, x3)) = 1 + x2   
POL(U1_g(x1, x2, x3)) = 0   
POL(U2_G(x1, x2, x3)) = 1 + x2   
POL(U2_g(x1, x2, x3)) = 0   
POL(U3_g(x1)) = 0   
POL(U4_g(x1, x2, x3)) = 0   
POL(U5_g(x1)) = 0   
POL(U6_g(x1, x2, x3)) = 0   
POL(U7_g(x1)) = 0   
POL(U8_g(x1)) = 0   
POL([]) = 1   
POL(p1_in_g(x1)) = 1 + x1   
POL(p1_out_g) = 0   
POL(s(x1)) = 0   

The following usable rules [FROCOS05] were oriented: none

(16) Obligation:

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

U2_G(T25, T26, p1_out_g) → P1_IN_G(.(s(s(s(s(T25)))), T26))
U1_G(T25, T26, p1_out_g) → U2_G(T25, T26, p1_in_g(.(s(s(s(s(T25)))), T26)))
U1_G(T25, T26, p1_out_g) → P1_IN_G(.(s(s(s(s(T25)))), T26))
P1_IN_G(.(s(s(s(s(T24)))), .(T25, T26))) → P1_IN_G(.(T24, .(T25, T26)))

The TRS R consists of the following rules:

p1_in_g(.(T3, [])) → p1_out_g
p1_in_g(.(s(s(s(s(T24)))), .(T25, T26))) → U1_g(T25, T26, p1_in_g(.(T24, .(T25, T26))))
p1_in_g(.(s(s(0)), .(T51, T52))) → U4_g(T51, T52, p1_in_g(.(T51, T52)))
p1_in_g(.(0, .(T65, []))) → p1_out_g
p1_in_g(.(0, .(s(s(T78)), .(T79, T80)))) → U6_g(T79, T80, p1_in_g(.(T78, .(T79, T80))))
p1_in_g(.(0, .(0, T95))) → U8_g(p1_in_g(T95))
U8_g(p1_out_g) → p1_out_g
U6_g(T79, T80, p1_out_g) → p1_out_g
U6_g(T79, T80, p1_out_g) → U7_g(p1_in_g(.(s(s(s(s(T79)))), T80)))
U7_g(p1_out_g) → p1_out_g
U4_g(T51, T52, p1_out_g) → p1_out_g
U4_g(T51, T52, p1_out_g) → U5_g(p1_in_g(.(s(s(s(s(T51)))), T52)))
U5_g(p1_out_g) → p1_out_g
U1_g(T25, T26, p1_out_g) → p1_out_g
U1_g(T25, T26, p1_out_g) → U2_g(T25, T26, p1_in_g(.(s(s(s(s(T25)))), T26)))
U2_g(T25, T26, p1_out_g) → p1_out_g
U2_g(T25, T26, p1_out_g) → U3_g(p1_in_g(.(s(s(s(s(T25)))), T26)))
U3_g(p1_out_g) → p1_out_g

The set Q consists of the following terms:

p1_in_g(x0)
U8_g(x0)
U6_g(x0, x1, x2)
U7_g(x0)
U4_g(x0, x1, x2)
U5_g(x0)
U1_g(x0, x1, x2)
U2_g(x0, x1, x2)
U3_g(x0)

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

(17) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 3 less nodes.

(18) Obligation:

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

P1_IN_G(.(s(s(s(s(T24)))), .(T25, T26))) → P1_IN_G(.(T24, .(T25, T26)))

The TRS R consists of the following rules:

p1_in_g(.(T3, [])) → p1_out_g
p1_in_g(.(s(s(s(s(T24)))), .(T25, T26))) → U1_g(T25, T26, p1_in_g(.(T24, .(T25, T26))))
p1_in_g(.(s(s(0)), .(T51, T52))) → U4_g(T51, T52, p1_in_g(.(T51, T52)))
p1_in_g(.(0, .(T65, []))) → p1_out_g
p1_in_g(.(0, .(s(s(T78)), .(T79, T80)))) → U6_g(T79, T80, p1_in_g(.(T78, .(T79, T80))))
p1_in_g(.(0, .(0, T95))) → U8_g(p1_in_g(T95))
U8_g(p1_out_g) → p1_out_g
U6_g(T79, T80, p1_out_g) → p1_out_g
U6_g(T79, T80, p1_out_g) → U7_g(p1_in_g(.(s(s(s(s(T79)))), T80)))
U7_g(p1_out_g) → p1_out_g
U4_g(T51, T52, p1_out_g) → p1_out_g
U4_g(T51, T52, p1_out_g) → U5_g(p1_in_g(.(s(s(s(s(T51)))), T52)))
U5_g(p1_out_g) → p1_out_g
U1_g(T25, T26, p1_out_g) → p1_out_g
U1_g(T25, T26, p1_out_g) → U2_g(T25, T26, p1_in_g(.(s(s(s(s(T25)))), T26)))
U2_g(T25, T26, p1_out_g) → p1_out_g
U2_g(T25, T26, p1_out_g) → U3_g(p1_in_g(.(s(s(s(s(T25)))), T26)))
U3_g(p1_out_g) → p1_out_g

The set Q consists of the following terms:

p1_in_g(x0)
U8_g(x0)
U6_g(x0, x1, x2)
U7_g(x0)
U4_g(x0, x1, x2)
U5_g(x0)
U1_g(x0, x1, x2)
U2_g(x0, x1, x2)
U3_g(x0)

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

(19) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

(20) Obligation:

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

P1_IN_G(.(s(s(s(s(T24)))), .(T25, T26))) → P1_IN_G(.(T24, .(T25, T26)))

R is empty.
The set Q consists of the following terms:

p1_in_g(x0)
U8_g(x0)
U6_g(x0, x1, x2)
U7_g(x0)
U4_g(x0, x1, x2)
U5_g(x0)
U1_g(x0, x1, x2)
U2_g(x0, x1, x2)
U3_g(x0)

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

(21) QReductionProof (EQUIVALENT transformation)

We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

p1_in_g(x0)
U8_g(x0)
U6_g(x0, x1, x2)
U7_g(x0)
U4_g(x0, x1, x2)
U5_g(x0)
U1_g(x0, x1, x2)
U2_g(x0, x1, x2)
U3_g(x0)

(22) Obligation:

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

P1_IN_G(.(s(s(s(s(T24)))), .(T25, T26))) → P1_IN_G(.(T24, .(T25, T26)))

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

(23) UsableRulesReductionPairsProof (EQUIVALENT transformation)

By using the usable rules with reduction pair processor [LPAR04] with a polynomial ordering [POLO], all dependency pairs and the corresponding usable rules [FROCOS05] can be oriented non-strictly. All non-usable rules are removed, and those dependency pairs and usable rules that have been oriented strictly or contain non-usable symbols in their left-hand side are removed as well.

The following dependency pairs can be deleted:

P1_IN_G(.(s(s(s(s(T24)))), .(T25, T26))) → P1_IN_G(.(T24, .(T25, T26)))
No rules are removed from R.

Used ordering: POLO with Polynomial interpretation [POLO]:

POL(.(x1, x2)) = x1 + x2   
POL(P1_IN_G(x1)) = x1   
POL(s(x1)) = x1   

(24) Obligation:

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

(25) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(26) YES