(0) Obligation:

Clauses:

p(cons(X, nil)).
p(cons(s(s(X)), cons(Y, Xs))) :- ','(p(cons(X, cons(Y, Xs))), p(cons(s(s(s(s(Y)))), Xs))).
p(cons(0, Xs)) :- p(Xs).

Queries:

p(g).

(1) PrologToPrologProblemTransformerProof (SOUND transformation)

Built Prolog problem from termination graph.

(2) Obligation:

Clauses:

p1(cons(T3, nil)).
p1(cons(s(s(s(s(T24)))), cons(T25, T26))) :- p1(cons(T24, cons(T25, T26))).
p1(cons(s(s(s(s(T24)))), cons(T25, T26))) :- ','(p1(cons(T24, cons(T25, T26))), p1(cons(s(s(s(s(T25)))), T26))).
p1(cons(s(s(s(s(T24)))), cons(T25, T26))) :- ','(p1(cons(T24, cons(T25, T26))), ','(p1(cons(s(s(s(s(T25)))), T26)), p1(cons(s(s(s(s(T25)))), T26)))).
p1(cons(s(s(0)), cons(T51, T52))) :- p1(cons(T51, T52)).
p1(cons(s(s(0)), cons(T51, T52))) :- ','(p1(cons(T51, T52)), p1(cons(s(s(s(s(T51)))), T52))).
p1(cons(0, cons(T65, nil))).
p1(cons(0, cons(s(s(T78)), cons(T79, T80)))) :- p1(cons(T78, cons(T79, T80))).
p1(cons(0, cons(s(s(T78)), cons(T79, T80)))) :- ','(p1(cons(T78, cons(T79, T80))), p1(cons(s(s(s(s(T79)))), T80))).
p1(cons(0, cons(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(cons(T3, nil)) → p1_out_g(cons(T3, nil))
p1_in_g(cons(s(s(s(s(T24)))), cons(T25, T26))) → U1_g(T24, T25, T26, p1_in_g(cons(T24, cons(T25, T26))))
p1_in_g(cons(s(s(0)), cons(T51, T52))) → U4_g(T51, T52, p1_in_g(cons(T51, T52)))
p1_in_g(cons(0, cons(T65, nil))) → p1_out_g(cons(0, cons(T65, nil)))
p1_in_g(cons(0, cons(s(s(T78)), cons(T79, T80)))) → U6_g(T78, T79, T80, p1_in_g(cons(T78, cons(T79, T80))))
p1_in_g(cons(0, cons(0, T95))) → U8_g(T95, p1_in_g(T95))
U8_g(T95, p1_out_g(T95)) → p1_out_g(cons(0, cons(0, T95)))
U6_g(T78, T79, T80, p1_out_g(cons(T78, cons(T79, T80)))) → p1_out_g(cons(0, cons(s(s(T78)), cons(T79, T80))))
U6_g(T78, T79, T80, p1_out_g(cons(T78, cons(T79, T80)))) → U7_g(T78, T79, T80, p1_in_g(cons(s(s(s(s(T79)))), T80)))
U7_g(T78, T79, T80, p1_out_g(cons(s(s(s(s(T79)))), T80))) → p1_out_g(cons(0, cons(s(s(T78)), cons(T79, T80))))
U4_g(T51, T52, p1_out_g(cons(T51, T52))) → p1_out_g(cons(s(s(0)), cons(T51, T52)))
U4_g(T51, T52, p1_out_g(cons(T51, T52))) → U5_g(T51, T52, p1_in_g(cons(s(s(s(s(T51)))), T52)))
U5_g(T51, T52, p1_out_g(cons(s(s(s(s(T51)))), T52))) → p1_out_g(cons(s(s(0)), cons(T51, T52)))
U1_g(T24, T25, T26, p1_out_g(cons(T24, cons(T25, T26)))) → p1_out_g(cons(s(s(s(s(T24)))), cons(T25, T26)))
U1_g(T24, T25, T26, p1_out_g(cons(T24, cons(T25, T26)))) → U2_g(T24, T25, T26, p1_in_g(cons(s(s(s(s(T25)))), T26)))
U2_g(T24, T25, T26, p1_out_g(cons(s(s(s(s(T25)))), T26))) → p1_out_g(cons(s(s(s(s(T24)))), cons(T25, T26)))
U2_g(T24, T25, T26, p1_out_g(cons(s(s(s(s(T25)))), T26))) → U3_g(T24, T25, T26, p1_in_g(cons(s(s(s(s(T25)))), T26)))
U3_g(T24, T25, T26, p1_out_g(cons(s(s(s(s(T25)))), T26))) → p1_out_g(cons(s(s(s(s(T24)))), cons(T25, T26)))

Pi is empty.

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(cons(T3, nil)) → p1_out_g(cons(T3, nil))
p1_in_g(cons(s(s(s(s(T24)))), cons(T25, T26))) → U1_g(T24, T25, T26, p1_in_g(cons(T24, cons(T25, T26))))
p1_in_g(cons(s(s(0)), cons(T51, T52))) → U4_g(T51, T52, p1_in_g(cons(T51, T52)))
p1_in_g(cons(0, cons(T65, nil))) → p1_out_g(cons(0, cons(T65, nil)))
p1_in_g(cons(0, cons(s(s(T78)), cons(T79, T80)))) → U6_g(T78, T79, T80, p1_in_g(cons(T78, cons(T79, T80))))
p1_in_g(cons(0, cons(0, T95))) → U8_g(T95, p1_in_g(T95))
U8_g(T95, p1_out_g(T95)) → p1_out_g(cons(0, cons(0, T95)))
U6_g(T78, T79, T80, p1_out_g(cons(T78, cons(T79, T80)))) → p1_out_g(cons(0, cons(s(s(T78)), cons(T79, T80))))
U6_g(T78, T79, T80, p1_out_g(cons(T78, cons(T79, T80)))) → U7_g(T78, T79, T80, p1_in_g(cons(s(s(s(s(T79)))), T80)))
U7_g(T78, T79, T80, p1_out_g(cons(s(s(s(s(T79)))), T80))) → p1_out_g(cons(0, cons(s(s(T78)), cons(T79, T80))))
U4_g(T51, T52, p1_out_g(cons(T51, T52))) → p1_out_g(cons(s(s(0)), cons(T51, T52)))
U4_g(T51, T52, p1_out_g(cons(T51, T52))) → U5_g(T51, T52, p1_in_g(cons(s(s(s(s(T51)))), T52)))
U5_g(T51, T52, p1_out_g(cons(s(s(s(s(T51)))), T52))) → p1_out_g(cons(s(s(0)), cons(T51, T52)))
U1_g(T24, T25, T26, p1_out_g(cons(T24, cons(T25, T26)))) → p1_out_g(cons(s(s(s(s(T24)))), cons(T25, T26)))
U1_g(T24, T25, T26, p1_out_g(cons(T24, cons(T25, T26)))) → U2_g(T24, T25, T26, p1_in_g(cons(s(s(s(s(T25)))), T26)))
U2_g(T24, T25, T26, p1_out_g(cons(s(s(s(s(T25)))), T26))) → p1_out_g(cons(s(s(s(s(T24)))), cons(T25, T26)))
U2_g(T24, T25, T26, p1_out_g(cons(s(s(s(s(T25)))), T26))) → U3_g(T24, T25, T26, p1_in_g(cons(s(s(s(s(T25)))), T26)))
U3_g(T24, T25, T26, p1_out_g(cons(s(s(s(s(T25)))), T26))) → p1_out_g(cons(s(s(s(s(T24)))), cons(T25, T26)))

Pi is empty.

(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(cons(s(s(s(s(T24)))), cons(T25, T26))) → U1_G(T24, T25, T26, p1_in_g(cons(T24, cons(T25, T26))))
P1_IN_G(cons(s(s(s(s(T24)))), cons(T25, T26))) → P1_IN_G(cons(T24, cons(T25, T26)))
P1_IN_G(cons(s(s(0)), cons(T51, T52))) → U4_G(T51, T52, p1_in_g(cons(T51, T52)))
P1_IN_G(cons(s(s(0)), cons(T51, T52))) → P1_IN_G(cons(T51, T52))
P1_IN_G(cons(0, cons(s(s(T78)), cons(T79, T80)))) → U6_G(T78, T79, T80, p1_in_g(cons(T78, cons(T79, T80))))
P1_IN_G(cons(0, cons(s(s(T78)), cons(T79, T80)))) → P1_IN_G(cons(T78, cons(T79, T80)))
P1_IN_G(cons(0, cons(0, T95))) → U8_G(T95, p1_in_g(T95))
P1_IN_G(cons(0, cons(0, T95))) → P1_IN_G(T95)
U6_G(T78, T79, T80, p1_out_g(cons(T78, cons(T79, T80)))) → U7_G(T78, T79, T80, p1_in_g(cons(s(s(s(s(T79)))), T80)))
U6_G(T78, T79, T80, p1_out_g(cons(T78, cons(T79, T80)))) → P1_IN_G(cons(s(s(s(s(T79)))), T80))
U4_G(T51, T52, p1_out_g(cons(T51, T52))) → U5_G(T51, T52, p1_in_g(cons(s(s(s(s(T51)))), T52)))
U4_G(T51, T52, p1_out_g(cons(T51, T52))) → P1_IN_G(cons(s(s(s(s(T51)))), T52))
U1_G(T24, T25, T26, p1_out_g(cons(T24, cons(T25, T26)))) → U2_G(T24, T25, T26, p1_in_g(cons(s(s(s(s(T25)))), T26)))
U1_G(T24, T25, T26, p1_out_g(cons(T24, cons(T25, T26)))) → P1_IN_G(cons(s(s(s(s(T25)))), T26))
U2_G(T24, T25, T26, p1_out_g(cons(s(s(s(s(T25)))), T26))) → U3_G(T24, T25, T26, p1_in_g(cons(s(s(s(s(T25)))), T26)))
U2_G(T24, T25, T26, p1_out_g(cons(s(s(s(s(T25)))), T26))) → P1_IN_G(cons(s(s(s(s(T25)))), T26))

The TRS R consists of the following rules:

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

Pi is empty.
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(cons(s(s(s(s(T24)))), cons(T25, T26))) → U1_G(T24, T25, T26, p1_in_g(cons(T24, cons(T25, T26))))
P1_IN_G(cons(s(s(s(s(T24)))), cons(T25, T26))) → P1_IN_G(cons(T24, cons(T25, T26)))
P1_IN_G(cons(s(s(0)), cons(T51, T52))) → U4_G(T51, T52, p1_in_g(cons(T51, T52)))
P1_IN_G(cons(s(s(0)), cons(T51, T52))) → P1_IN_G(cons(T51, T52))
P1_IN_G(cons(0, cons(s(s(T78)), cons(T79, T80)))) → U6_G(T78, T79, T80, p1_in_g(cons(T78, cons(T79, T80))))
P1_IN_G(cons(0, cons(s(s(T78)), cons(T79, T80)))) → P1_IN_G(cons(T78, cons(T79, T80)))
P1_IN_G(cons(0, cons(0, T95))) → U8_G(T95, p1_in_g(T95))
P1_IN_G(cons(0, cons(0, T95))) → P1_IN_G(T95)
U6_G(T78, T79, T80, p1_out_g(cons(T78, cons(T79, T80)))) → U7_G(T78, T79, T80, p1_in_g(cons(s(s(s(s(T79)))), T80)))
U6_G(T78, T79, T80, p1_out_g(cons(T78, cons(T79, T80)))) → P1_IN_G(cons(s(s(s(s(T79)))), T80))
U4_G(T51, T52, p1_out_g(cons(T51, T52))) → U5_G(T51, T52, p1_in_g(cons(s(s(s(s(T51)))), T52)))
U4_G(T51, T52, p1_out_g(cons(T51, T52))) → P1_IN_G(cons(s(s(s(s(T51)))), T52))
U1_G(T24, T25, T26, p1_out_g(cons(T24, cons(T25, T26)))) → U2_G(T24, T25, T26, p1_in_g(cons(s(s(s(s(T25)))), T26)))
U1_G(T24, T25, T26, p1_out_g(cons(T24, cons(T25, T26)))) → P1_IN_G(cons(s(s(s(s(T25)))), T26))
U2_G(T24, T25, T26, p1_out_g(cons(s(s(s(s(T25)))), T26))) → U3_G(T24, T25, T26, p1_in_g(cons(s(s(s(s(T25)))), T26)))
U2_G(T24, T25, T26, p1_out_g(cons(s(s(s(s(T25)))), T26))) → P1_IN_G(cons(s(s(s(s(T25)))), T26))

The TRS R consists of the following rules:

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

Pi is empty.
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(cons(T24, cons(T25, T26)))) → U2_G(T24, T25, T26, p1_in_g(cons(s(s(s(s(T25)))), T26)))
U2_G(T24, T25, T26, p1_out_g(cons(s(s(s(s(T25)))), T26))) → P1_IN_G(cons(s(s(s(s(T25)))), T26))
P1_IN_G(cons(s(s(s(s(T24)))), cons(T25, T26))) → U1_G(T24, T25, T26, p1_in_g(cons(T24, cons(T25, T26))))
U1_G(T24, T25, T26, p1_out_g(cons(T24, cons(T25, T26)))) → P1_IN_G(cons(s(s(s(s(T25)))), T26))
P1_IN_G(cons(s(s(s(s(T24)))), cons(T25, T26))) → P1_IN_G(cons(T24, cons(T25, T26)))
P1_IN_G(cons(s(s(0)), cons(T51, T52))) → U4_G(T51, T52, p1_in_g(cons(T51, T52)))
U4_G(T51, T52, p1_out_g(cons(T51, T52))) → P1_IN_G(cons(s(s(s(s(T51)))), T52))
P1_IN_G(cons(s(s(0)), cons(T51, T52))) → P1_IN_G(cons(T51, T52))
P1_IN_G(cons(0, cons(s(s(T78)), cons(T79, T80)))) → U6_G(T78, T79, T80, p1_in_g(cons(T78, cons(T79, T80))))
U6_G(T78, T79, T80, p1_out_g(cons(T78, cons(T79, T80)))) → P1_IN_G(cons(s(s(s(s(T79)))), T80))
P1_IN_G(cons(0, cons(s(s(T78)), cons(T79, T80)))) → P1_IN_G(cons(T78, cons(T79, T80)))
P1_IN_G(cons(0, cons(0, T95))) → P1_IN_G(T95)

The TRS R consists of the following rules:

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

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

(9) PiDPToQDPProof (EQUIVALENT 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(T24, T25, T26, p1_out_g(cons(T24, cons(T25, T26)))) → U2_G(T24, T25, T26, p1_in_g(cons(s(s(s(s(T25)))), T26)))
U2_G(T24, T25, T26, p1_out_g(cons(s(s(s(s(T25)))), T26))) → P1_IN_G(cons(s(s(s(s(T25)))), T26))
P1_IN_G(cons(s(s(s(s(T24)))), cons(T25, T26))) → U1_G(T24, T25, T26, p1_in_g(cons(T24, cons(T25, T26))))
U1_G(T24, T25, T26, p1_out_g(cons(T24, cons(T25, T26)))) → P1_IN_G(cons(s(s(s(s(T25)))), T26))
P1_IN_G(cons(s(s(s(s(T24)))), cons(T25, T26))) → P1_IN_G(cons(T24, cons(T25, T26)))
P1_IN_G(cons(s(s(0)), cons(T51, T52))) → U4_G(T51, T52, p1_in_g(cons(T51, T52)))
U4_G(T51, T52, p1_out_g(cons(T51, T52))) → P1_IN_G(cons(s(s(s(s(T51)))), T52))
P1_IN_G(cons(s(s(0)), cons(T51, T52))) → P1_IN_G(cons(T51, T52))
P1_IN_G(cons(0, cons(s(s(T78)), cons(T79, T80)))) → U6_G(T78, T79, T80, p1_in_g(cons(T78, cons(T79, T80))))
U6_G(T78, T79, T80, p1_out_g(cons(T78, cons(T79, T80)))) → P1_IN_G(cons(s(s(s(s(T79)))), T80))
P1_IN_G(cons(0, cons(s(s(T78)), cons(T79, T80)))) → P1_IN_G(cons(T78, cons(T79, T80)))
P1_IN_G(cons(0, cons(0, T95))) → P1_IN_G(T95)

The TRS R consists of the following rules:

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

The set Q consists of the following terms:

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

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.


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

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

The following usable rules [FROCOS05] were oriented:

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

(12) Obligation:

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

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

The TRS R consists of the following rules:

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

The set Q consists of the following terms:

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

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 4 less nodes.

(14) Obligation:

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

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

The TRS R consists of the following rules:

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

The set Q consists of the following terms:

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

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

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

(16) Obligation:

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

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

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

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

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

(17) 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, x1)
U6_g(x0, x1, x2, x3)
U7_g(x0, x1, x2, x3)
U4_g(x0, x1, x2)
U5_g(x0, x1, x2)
U1_g(x0, x1, x2, x3)
U2_g(x0, x1, x2, x3)
U3_g(x0, x1, x2, x3)

(18) Obligation:

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

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

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

(19) 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(cons(s(s(s(s(T24)))), cons(T25, T26))) → P1_IN_G(cons(T24, cons(T25, T26)))
No rules are removed from R.

Used ordering: POLO with Polynomial interpretation [POLO]:

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

(20) Obligation:

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

(21) PisEmptyProof (EQUIVALENT transformation)

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

(22) YES