(0) Obligation:

Clauses:

goal(X) :- ','(s2t(X, T), tree(T)).
tree(nil).
tree(X) :- ','(no(empty(X)), ','(left(T, L), ','(right(T, R), ','(tree(L), tree(R))))).
s2t(0, nil).
s2t(X, node(T, X1, T)) :- ','(no(zero(X)), ','(p(X, P), s2t(P, T))).
s2t(X, node(nil, X2, T)) :- ','(no(zero(X)), ','(p(X, P), s2t(P, T))).
s2t(X, node(T, X3, nil)) :- ','(no(zero(X)), ','(p(X, P), s2t(P, T))).
s2t(X, node(nil, X4, nil)) :- no(zero(X)).
left(nil, nil).
left(node(L, X5, X6), L).
right(nil, nil).
right(node(X7, X8, R), R).
p(0, 0).
p(s(X), X).
empty(nil).
zero(0).
no(X) :- ','(X, ','(!, failure(a))).
no(X9).
failure(b).

Queries:

goal(g).

(1) PrologToPrologProblemTransformerProof (SOUND transformation)

Built Prolog problem from termination graph.

(2) Obligation:

Clauses:

s2t4(0, nil).
s2t4(s(T7), node(X23, X24, X23)) :- s2t4(T7, X23).
s2t4(s(T11), node(nil, X41, X42)) :- s2t4(T11, X42).
s2t4(s(T15), node(X59, X60, nil)) :- s2t4(T15, X59).
s2t4(T18, node(nil, X71, nil)).
tree94.
tree114(nil).
goal1(T2) :- s2t4(T2, X12).
goal1(T2) :- s2t4(T2, nil).
goal1(T2) :- ','(s2t4(T2, T23), tree94).
goal1(T2) :- ','(s2t4(T2, T23), tree94).
goal1(T2) :- ','(s2t4(T2, T23), tree114(X110)).
goal1(T2) :- ','(s2t4(T2, T23), tree114(T24)).

Queries:

goal1(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:
goal1_in: (b)
s2t4_in: (b,f) (b,b)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

goal1_in_g(T2) → U4_g(T2, s2t4_in_ga(T2, X12))
s2t4_in_ga(0, nil) → s2t4_out_ga(0, nil)
s2t4_in_ga(s(T7), node(X23, X24, X23)) → U1_ga(T7, X23, X24, s2t4_in_ga(T7, X23))
s2t4_in_ga(s(T11), node(nil, X41, X42)) → U2_ga(T11, X41, X42, s2t4_in_ga(T11, X42))
s2t4_in_ga(s(T15), node(X59, X60, nil)) → U3_ga(T15, X59, X60, s2t4_in_ga(T15, X59))
s2t4_in_ga(T18, node(nil, X71, nil)) → s2t4_out_ga(T18, node(nil, X71, nil))
U3_ga(T15, X59, X60, s2t4_out_ga(T15, X59)) → s2t4_out_ga(s(T15), node(X59, X60, nil))
U2_ga(T11, X41, X42, s2t4_out_ga(T11, X42)) → s2t4_out_ga(s(T11), node(nil, X41, X42))
U1_ga(T7, X23, X24, s2t4_out_ga(T7, X23)) → s2t4_out_ga(s(T7), node(X23, X24, X23))
U4_g(T2, s2t4_out_ga(T2, X12)) → goal1_out_g(T2)
goal1_in_g(T2) → U5_g(T2, s2t4_in_gg(T2, nil))
s2t4_in_gg(0, nil) → s2t4_out_gg(0, nil)
s2t4_in_gg(s(T7), node(X23, X24, X23)) → U1_gg(T7, X23, X24, s2t4_in_gg(T7, X23))
s2t4_in_gg(s(T11), node(nil, X41, X42)) → U2_gg(T11, X41, X42, s2t4_in_gg(T11, X42))
s2t4_in_gg(s(T15), node(X59, X60, nil)) → U3_gg(T15, X59, X60, s2t4_in_gg(T15, X59))
s2t4_in_gg(T18, node(nil, X71, nil)) → s2t4_out_gg(T18, node(nil, X71, nil))
U3_gg(T15, X59, X60, s2t4_out_gg(T15, X59)) → s2t4_out_gg(s(T15), node(X59, X60, nil))
U2_gg(T11, X41, X42, s2t4_out_gg(T11, X42)) → s2t4_out_gg(s(T11), node(nil, X41, X42))
U1_gg(T7, X23, X24, s2t4_out_gg(T7, X23)) → s2t4_out_gg(s(T7), node(X23, X24, X23))
U5_g(T2, s2t4_out_gg(T2, nil)) → goal1_out_g(T2)
goal1_in_g(T2) → U6_g(T2, s2t4_in_ga(T2, T23))
U6_g(T2, s2t4_out_ga(T2, T23)) → U7_g(T2, tree94_in_)
tree94_in_tree94_out_
U7_g(T2, tree94_out_) → goal1_out_g(T2)
U6_g(T2, s2t4_out_ga(T2, T23)) → U8_g(T2, tree114_in_a(X110))
tree114_in_a(nil) → tree114_out_a(nil)
U8_g(T2, tree114_out_a(X110)) → goal1_out_g(T2)
U6_g(T2, s2t4_out_ga(T2, T23)) → U9_g(T2, tree114_in_a(T24))
U9_g(T2, tree114_out_a(T24)) → goal1_out_g(T2)

The argument filtering Pi contains the following mapping:
goal1_in_g(x1)  =  goal1_in_g(x1)
U4_g(x1, x2)  =  U4_g(x2)
s2t4_in_ga(x1, x2)  =  s2t4_in_ga(x1)
0  =  0
s2t4_out_ga(x1, x2)  =  s2t4_out_ga(x2)
s(x1)  =  s(x1)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x4)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x4)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x4)
node(x1, x2, x3)  =  node(x1, x3)
goal1_out_g(x1)  =  goal1_out_g
U5_g(x1, x2)  =  U5_g(x2)
s2t4_in_gg(x1, x2)  =  s2t4_in_gg(x1, x2)
nil  =  nil
s2t4_out_gg(x1, x2)  =  s2t4_out_gg
U1_gg(x1, x2, x3, x4)  =  U1_gg(x4)
U2_gg(x1, x2, x3, x4)  =  U2_gg(x4)
U3_gg(x1, x2, x3, x4)  =  U3_gg(x4)
U6_g(x1, x2)  =  U6_g(x2)
U7_g(x1, x2)  =  U7_g(x2)
tree94_in_  =  tree94_in_
tree94_out_  =  tree94_out_
U8_g(x1, x2)  =  U8_g(x2)
tree114_in_a(x1)  =  tree114_in_a
tree114_out_a(x1)  =  tree114_out_a(x1)
U9_g(x1, x2)  =  U9_g(x2)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog

(4) Obligation:

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

goal1_in_g(T2) → U4_g(T2, s2t4_in_ga(T2, X12))
s2t4_in_ga(0, nil) → s2t4_out_ga(0, nil)
s2t4_in_ga(s(T7), node(X23, X24, X23)) → U1_ga(T7, X23, X24, s2t4_in_ga(T7, X23))
s2t4_in_ga(s(T11), node(nil, X41, X42)) → U2_ga(T11, X41, X42, s2t4_in_ga(T11, X42))
s2t4_in_ga(s(T15), node(X59, X60, nil)) → U3_ga(T15, X59, X60, s2t4_in_ga(T15, X59))
s2t4_in_ga(T18, node(nil, X71, nil)) → s2t4_out_ga(T18, node(nil, X71, nil))
U3_ga(T15, X59, X60, s2t4_out_ga(T15, X59)) → s2t4_out_ga(s(T15), node(X59, X60, nil))
U2_ga(T11, X41, X42, s2t4_out_ga(T11, X42)) → s2t4_out_ga(s(T11), node(nil, X41, X42))
U1_ga(T7, X23, X24, s2t4_out_ga(T7, X23)) → s2t4_out_ga(s(T7), node(X23, X24, X23))
U4_g(T2, s2t4_out_ga(T2, X12)) → goal1_out_g(T2)
goal1_in_g(T2) → U5_g(T2, s2t4_in_gg(T2, nil))
s2t4_in_gg(0, nil) → s2t4_out_gg(0, nil)
s2t4_in_gg(s(T7), node(X23, X24, X23)) → U1_gg(T7, X23, X24, s2t4_in_gg(T7, X23))
s2t4_in_gg(s(T11), node(nil, X41, X42)) → U2_gg(T11, X41, X42, s2t4_in_gg(T11, X42))
s2t4_in_gg(s(T15), node(X59, X60, nil)) → U3_gg(T15, X59, X60, s2t4_in_gg(T15, X59))
s2t4_in_gg(T18, node(nil, X71, nil)) → s2t4_out_gg(T18, node(nil, X71, nil))
U3_gg(T15, X59, X60, s2t4_out_gg(T15, X59)) → s2t4_out_gg(s(T15), node(X59, X60, nil))
U2_gg(T11, X41, X42, s2t4_out_gg(T11, X42)) → s2t4_out_gg(s(T11), node(nil, X41, X42))
U1_gg(T7, X23, X24, s2t4_out_gg(T7, X23)) → s2t4_out_gg(s(T7), node(X23, X24, X23))
U5_g(T2, s2t4_out_gg(T2, nil)) → goal1_out_g(T2)
goal1_in_g(T2) → U6_g(T2, s2t4_in_ga(T2, T23))
U6_g(T2, s2t4_out_ga(T2, T23)) → U7_g(T2, tree94_in_)
tree94_in_tree94_out_
U7_g(T2, tree94_out_) → goal1_out_g(T2)
U6_g(T2, s2t4_out_ga(T2, T23)) → U8_g(T2, tree114_in_a(X110))
tree114_in_a(nil) → tree114_out_a(nil)
U8_g(T2, tree114_out_a(X110)) → goal1_out_g(T2)
U6_g(T2, s2t4_out_ga(T2, T23)) → U9_g(T2, tree114_in_a(T24))
U9_g(T2, tree114_out_a(T24)) → goal1_out_g(T2)

The argument filtering Pi contains the following mapping:
goal1_in_g(x1)  =  goal1_in_g(x1)
U4_g(x1, x2)  =  U4_g(x2)
s2t4_in_ga(x1, x2)  =  s2t4_in_ga(x1)
0  =  0
s2t4_out_ga(x1, x2)  =  s2t4_out_ga(x2)
s(x1)  =  s(x1)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x4)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x4)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x4)
node(x1, x2, x3)  =  node(x1, x3)
goal1_out_g(x1)  =  goal1_out_g
U5_g(x1, x2)  =  U5_g(x2)
s2t4_in_gg(x1, x2)  =  s2t4_in_gg(x1, x2)
nil  =  nil
s2t4_out_gg(x1, x2)  =  s2t4_out_gg
U1_gg(x1, x2, x3, x4)  =  U1_gg(x4)
U2_gg(x1, x2, x3, x4)  =  U2_gg(x4)
U3_gg(x1, x2, x3, x4)  =  U3_gg(x4)
U6_g(x1, x2)  =  U6_g(x2)
U7_g(x1, x2)  =  U7_g(x2)
tree94_in_  =  tree94_in_
tree94_out_  =  tree94_out_
U8_g(x1, x2)  =  U8_g(x2)
tree114_in_a(x1)  =  tree114_in_a
tree114_out_a(x1)  =  tree114_out_a(x1)
U9_g(x1, x2)  =  U9_g(x2)

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

GOAL1_IN_G(T2) → U4_G(T2, s2t4_in_ga(T2, X12))
GOAL1_IN_G(T2) → S2T4_IN_GA(T2, X12)
S2T4_IN_GA(s(T7), node(X23, X24, X23)) → U1_GA(T7, X23, X24, s2t4_in_ga(T7, X23))
S2T4_IN_GA(s(T7), node(X23, X24, X23)) → S2T4_IN_GA(T7, X23)
S2T4_IN_GA(s(T11), node(nil, X41, X42)) → U2_GA(T11, X41, X42, s2t4_in_ga(T11, X42))
S2T4_IN_GA(s(T11), node(nil, X41, X42)) → S2T4_IN_GA(T11, X42)
S2T4_IN_GA(s(T15), node(X59, X60, nil)) → U3_GA(T15, X59, X60, s2t4_in_ga(T15, X59))
S2T4_IN_GA(s(T15), node(X59, X60, nil)) → S2T4_IN_GA(T15, X59)
GOAL1_IN_G(T2) → U5_G(T2, s2t4_in_gg(T2, nil))
GOAL1_IN_G(T2) → S2T4_IN_GG(T2, nil)
S2T4_IN_GG(s(T7), node(X23, X24, X23)) → U1_GG(T7, X23, X24, s2t4_in_gg(T7, X23))
S2T4_IN_GG(s(T7), node(X23, X24, X23)) → S2T4_IN_GG(T7, X23)
S2T4_IN_GG(s(T11), node(nil, X41, X42)) → U2_GG(T11, X41, X42, s2t4_in_gg(T11, X42))
S2T4_IN_GG(s(T11), node(nil, X41, X42)) → S2T4_IN_GG(T11, X42)
S2T4_IN_GG(s(T15), node(X59, X60, nil)) → U3_GG(T15, X59, X60, s2t4_in_gg(T15, X59))
S2T4_IN_GG(s(T15), node(X59, X60, nil)) → S2T4_IN_GG(T15, X59)
GOAL1_IN_G(T2) → U6_G(T2, s2t4_in_ga(T2, T23))
U6_G(T2, s2t4_out_ga(T2, T23)) → U7_G(T2, tree94_in_)
U6_G(T2, s2t4_out_ga(T2, T23)) → TREE94_IN_
U6_G(T2, s2t4_out_ga(T2, T23)) → U8_G(T2, tree114_in_a(X110))
U6_G(T2, s2t4_out_ga(T2, T23)) → TREE114_IN_A(X110)
U6_G(T2, s2t4_out_ga(T2, T23)) → U9_G(T2, tree114_in_a(T24))

The TRS R consists of the following rules:

goal1_in_g(T2) → U4_g(T2, s2t4_in_ga(T2, X12))
s2t4_in_ga(0, nil) → s2t4_out_ga(0, nil)
s2t4_in_ga(s(T7), node(X23, X24, X23)) → U1_ga(T7, X23, X24, s2t4_in_ga(T7, X23))
s2t4_in_ga(s(T11), node(nil, X41, X42)) → U2_ga(T11, X41, X42, s2t4_in_ga(T11, X42))
s2t4_in_ga(s(T15), node(X59, X60, nil)) → U3_ga(T15, X59, X60, s2t4_in_ga(T15, X59))
s2t4_in_ga(T18, node(nil, X71, nil)) → s2t4_out_ga(T18, node(nil, X71, nil))
U3_ga(T15, X59, X60, s2t4_out_ga(T15, X59)) → s2t4_out_ga(s(T15), node(X59, X60, nil))
U2_ga(T11, X41, X42, s2t4_out_ga(T11, X42)) → s2t4_out_ga(s(T11), node(nil, X41, X42))
U1_ga(T7, X23, X24, s2t4_out_ga(T7, X23)) → s2t4_out_ga(s(T7), node(X23, X24, X23))
U4_g(T2, s2t4_out_ga(T2, X12)) → goal1_out_g(T2)
goal1_in_g(T2) → U5_g(T2, s2t4_in_gg(T2, nil))
s2t4_in_gg(0, nil) → s2t4_out_gg(0, nil)
s2t4_in_gg(s(T7), node(X23, X24, X23)) → U1_gg(T7, X23, X24, s2t4_in_gg(T7, X23))
s2t4_in_gg(s(T11), node(nil, X41, X42)) → U2_gg(T11, X41, X42, s2t4_in_gg(T11, X42))
s2t4_in_gg(s(T15), node(X59, X60, nil)) → U3_gg(T15, X59, X60, s2t4_in_gg(T15, X59))
s2t4_in_gg(T18, node(nil, X71, nil)) → s2t4_out_gg(T18, node(nil, X71, nil))
U3_gg(T15, X59, X60, s2t4_out_gg(T15, X59)) → s2t4_out_gg(s(T15), node(X59, X60, nil))
U2_gg(T11, X41, X42, s2t4_out_gg(T11, X42)) → s2t4_out_gg(s(T11), node(nil, X41, X42))
U1_gg(T7, X23, X24, s2t4_out_gg(T7, X23)) → s2t4_out_gg(s(T7), node(X23, X24, X23))
U5_g(T2, s2t4_out_gg(T2, nil)) → goal1_out_g(T2)
goal1_in_g(T2) → U6_g(T2, s2t4_in_ga(T2, T23))
U6_g(T2, s2t4_out_ga(T2, T23)) → U7_g(T2, tree94_in_)
tree94_in_tree94_out_
U7_g(T2, tree94_out_) → goal1_out_g(T2)
U6_g(T2, s2t4_out_ga(T2, T23)) → U8_g(T2, tree114_in_a(X110))
tree114_in_a(nil) → tree114_out_a(nil)
U8_g(T2, tree114_out_a(X110)) → goal1_out_g(T2)
U6_g(T2, s2t4_out_ga(T2, T23)) → U9_g(T2, tree114_in_a(T24))
U9_g(T2, tree114_out_a(T24)) → goal1_out_g(T2)

The argument filtering Pi contains the following mapping:
goal1_in_g(x1)  =  goal1_in_g(x1)
U4_g(x1, x2)  =  U4_g(x2)
s2t4_in_ga(x1, x2)  =  s2t4_in_ga(x1)
0  =  0
s2t4_out_ga(x1, x2)  =  s2t4_out_ga(x2)
s(x1)  =  s(x1)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x4)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x4)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x4)
node(x1, x2, x3)  =  node(x1, x3)
goal1_out_g(x1)  =  goal1_out_g
U5_g(x1, x2)  =  U5_g(x2)
s2t4_in_gg(x1, x2)  =  s2t4_in_gg(x1, x2)
nil  =  nil
s2t4_out_gg(x1, x2)  =  s2t4_out_gg
U1_gg(x1, x2, x3, x4)  =  U1_gg(x4)
U2_gg(x1, x2, x3, x4)  =  U2_gg(x4)
U3_gg(x1, x2, x3, x4)  =  U3_gg(x4)
U6_g(x1, x2)  =  U6_g(x2)
U7_g(x1, x2)  =  U7_g(x2)
tree94_in_  =  tree94_in_
tree94_out_  =  tree94_out_
U8_g(x1, x2)  =  U8_g(x2)
tree114_in_a(x1)  =  tree114_in_a
tree114_out_a(x1)  =  tree114_out_a(x1)
U9_g(x1, x2)  =  U9_g(x2)
GOAL1_IN_G(x1)  =  GOAL1_IN_G(x1)
U4_G(x1, x2)  =  U4_G(x2)
S2T4_IN_GA(x1, x2)  =  S2T4_IN_GA(x1)
U1_GA(x1, x2, x3, x4)  =  U1_GA(x4)
U2_GA(x1, x2, x3, x4)  =  U2_GA(x4)
U3_GA(x1, x2, x3, x4)  =  U3_GA(x4)
U5_G(x1, x2)  =  U5_G(x2)
S2T4_IN_GG(x1, x2)  =  S2T4_IN_GG(x1, x2)
U1_GG(x1, x2, x3, x4)  =  U1_GG(x4)
U2_GG(x1, x2, x3, x4)  =  U2_GG(x4)
U3_GG(x1, x2, x3, x4)  =  U3_GG(x4)
U6_G(x1, x2)  =  U6_G(x2)
U7_G(x1, x2)  =  U7_G(x2)
TREE94_IN_  =  TREE94_IN_
U8_G(x1, x2)  =  U8_G(x2)
TREE114_IN_A(x1)  =  TREE114_IN_A
U9_G(x1, x2)  =  U9_G(x2)

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

(6) Obligation:

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

GOAL1_IN_G(T2) → U4_G(T2, s2t4_in_ga(T2, X12))
GOAL1_IN_G(T2) → S2T4_IN_GA(T2, X12)
S2T4_IN_GA(s(T7), node(X23, X24, X23)) → U1_GA(T7, X23, X24, s2t4_in_ga(T7, X23))
S2T4_IN_GA(s(T7), node(X23, X24, X23)) → S2T4_IN_GA(T7, X23)
S2T4_IN_GA(s(T11), node(nil, X41, X42)) → U2_GA(T11, X41, X42, s2t4_in_ga(T11, X42))
S2T4_IN_GA(s(T11), node(nil, X41, X42)) → S2T4_IN_GA(T11, X42)
S2T4_IN_GA(s(T15), node(X59, X60, nil)) → U3_GA(T15, X59, X60, s2t4_in_ga(T15, X59))
S2T4_IN_GA(s(T15), node(X59, X60, nil)) → S2T4_IN_GA(T15, X59)
GOAL1_IN_G(T2) → U5_G(T2, s2t4_in_gg(T2, nil))
GOAL1_IN_G(T2) → S2T4_IN_GG(T2, nil)
S2T4_IN_GG(s(T7), node(X23, X24, X23)) → U1_GG(T7, X23, X24, s2t4_in_gg(T7, X23))
S2T4_IN_GG(s(T7), node(X23, X24, X23)) → S2T4_IN_GG(T7, X23)
S2T4_IN_GG(s(T11), node(nil, X41, X42)) → U2_GG(T11, X41, X42, s2t4_in_gg(T11, X42))
S2T4_IN_GG(s(T11), node(nil, X41, X42)) → S2T4_IN_GG(T11, X42)
S2T4_IN_GG(s(T15), node(X59, X60, nil)) → U3_GG(T15, X59, X60, s2t4_in_gg(T15, X59))
S2T4_IN_GG(s(T15), node(X59, X60, nil)) → S2T4_IN_GG(T15, X59)
GOAL1_IN_G(T2) → U6_G(T2, s2t4_in_ga(T2, T23))
U6_G(T2, s2t4_out_ga(T2, T23)) → U7_G(T2, tree94_in_)
U6_G(T2, s2t4_out_ga(T2, T23)) → TREE94_IN_
U6_G(T2, s2t4_out_ga(T2, T23)) → U8_G(T2, tree114_in_a(X110))
U6_G(T2, s2t4_out_ga(T2, T23)) → TREE114_IN_A(X110)
U6_G(T2, s2t4_out_ga(T2, T23)) → U9_G(T2, tree114_in_a(T24))

The TRS R consists of the following rules:

goal1_in_g(T2) → U4_g(T2, s2t4_in_ga(T2, X12))
s2t4_in_ga(0, nil) → s2t4_out_ga(0, nil)
s2t4_in_ga(s(T7), node(X23, X24, X23)) → U1_ga(T7, X23, X24, s2t4_in_ga(T7, X23))
s2t4_in_ga(s(T11), node(nil, X41, X42)) → U2_ga(T11, X41, X42, s2t4_in_ga(T11, X42))
s2t4_in_ga(s(T15), node(X59, X60, nil)) → U3_ga(T15, X59, X60, s2t4_in_ga(T15, X59))
s2t4_in_ga(T18, node(nil, X71, nil)) → s2t4_out_ga(T18, node(nil, X71, nil))
U3_ga(T15, X59, X60, s2t4_out_ga(T15, X59)) → s2t4_out_ga(s(T15), node(X59, X60, nil))
U2_ga(T11, X41, X42, s2t4_out_ga(T11, X42)) → s2t4_out_ga(s(T11), node(nil, X41, X42))
U1_ga(T7, X23, X24, s2t4_out_ga(T7, X23)) → s2t4_out_ga(s(T7), node(X23, X24, X23))
U4_g(T2, s2t4_out_ga(T2, X12)) → goal1_out_g(T2)
goal1_in_g(T2) → U5_g(T2, s2t4_in_gg(T2, nil))
s2t4_in_gg(0, nil) → s2t4_out_gg(0, nil)
s2t4_in_gg(s(T7), node(X23, X24, X23)) → U1_gg(T7, X23, X24, s2t4_in_gg(T7, X23))
s2t4_in_gg(s(T11), node(nil, X41, X42)) → U2_gg(T11, X41, X42, s2t4_in_gg(T11, X42))
s2t4_in_gg(s(T15), node(X59, X60, nil)) → U3_gg(T15, X59, X60, s2t4_in_gg(T15, X59))
s2t4_in_gg(T18, node(nil, X71, nil)) → s2t4_out_gg(T18, node(nil, X71, nil))
U3_gg(T15, X59, X60, s2t4_out_gg(T15, X59)) → s2t4_out_gg(s(T15), node(X59, X60, nil))
U2_gg(T11, X41, X42, s2t4_out_gg(T11, X42)) → s2t4_out_gg(s(T11), node(nil, X41, X42))
U1_gg(T7, X23, X24, s2t4_out_gg(T7, X23)) → s2t4_out_gg(s(T7), node(X23, X24, X23))
U5_g(T2, s2t4_out_gg(T2, nil)) → goal1_out_g(T2)
goal1_in_g(T2) → U6_g(T2, s2t4_in_ga(T2, T23))
U6_g(T2, s2t4_out_ga(T2, T23)) → U7_g(T2, tree94_in_)
tree94_in_tree94_out_
U7_g(T2, tree94_out_) → goal1_out_g(T2)
U6_g(T2, s2t4_out_ga(T2, T23)) → U8_g(T2, tree114_in_a(X110))
tree114_in_a(nil) → tree114_out_a(nil)
U8_g(T2, tree114_out_a(X110)) → goal1_out_g(T2)
U6_g(T2, s2t4_out_ga(T2, T23)) → U9_g(T2, tree114_in_a(T24))
U9_g(T2, tree114_out_a(T24)) → goal1_out_g(T2)

The argument filtering Pi contains the following mapping:
goal1_in_g(x1)  =  goal1_in_g(x1)
U4_g(x1, x2)  =  U4_g(x2)
s2t4_in_ga(x1, x2)  =  s2t4_in_ga(x1)
0  =  0
s2t4_out_ga(x1, x2)  =  s2t4_out_ga(x2)
s(x1)  =  s(x1)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x4)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x4)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x4)
node(x1, x2, x3)  =  node(x1, x3)
goal1_out_g(x1)  =  goal1_out_g
U5_g(x1, x2)  =  U5_g(x2)
s2t4_in_gg(x1, x2)  =  s2t4_in_gg(x1, x2)
nil  =  nil
s2t4_out_gg(x1, x2)  =  s2t4_out_gg
U1_gg(x1, x2, x3, x4)  =  U1_gg(x4)
U2_gg(x1, x2, x3, x4)  =  U2_gg(x4)
U3_gg(x1, x2, x3, x4)  =  U3_gg(x4)
U6_g(x1, x2)  =  U6_g(x2)
U7_g(x1, x2)  =  U7_g(x2)
tree94_in_  =  tree94_in_
tree94_out_  =  tree94_out_
U8_g(x1, x2)  =  U8_g(x2)
tree114_in_a(x1)  =  tree114_in_a
tree114_out_a(x1)  =  tree114_out_a(x1)
U9_g(x1, x2)  =  U9_g(x2)
GOAL1_IN_G(x1)  =  GOAL1_IN_G(x1)
U4_G(x1, x2)  =  U4_G(x2)
S2T4_IN_GA(x1, x2)  =  S2T4_IN_GA(x1)
U1_GA(x1, x2, x3, x4)  =  U1_GA(x4)
U2_GA(x1, x2, x3, x4)  =  U2_GA(x4)
U3_GA(x1, x2, x3, x4)  =  U3_GA(x4)
U5_G(x1, x2)  =  U5_G(x2)
S2T4_IN_GG(x1, x2)  =  S2T4_IN_GG(x1, x2)
U1_GG(x1, x2, x3, x4)  =  U1_GG(x4)
U2_GG(x1, x2, x3, x4)  =  U2_GG(x4)
U3_GG(x1, x2, x3, x4)  =  U3_GG(x4)
U6_G(x1, x2)  =  U6_G(x2)
U7_G(x1, x2)  =  U7_G(x2)
TREE94_IN_  =  TREE94_IN_
U8_G(x1, x2)  =  U8_G(x2)
TREE114_IN_A(x1)  =  TREE114_IN_A
U9_G(x1, x2)  =  U9_G(x2)

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

(7) DependencyGraphProof (EQUIVALENT transformation)

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

(8) Complex Obligation (AND)

(9) Obligation:

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

S2T4_IN_GG(s(T11), node(nil, X41, X42)) → S2T4_IN_GG(T11, X42)
S2T4_IN_GG(s(T7), node(X23, X24, X23)) → S2T4_IN_GG(T7, X23)
S2T4_IN_GG(s(T15), node(X59, X60, nil)) → S2T4_IN_GG(T15, X59)

The TRS R consists of the following rules:

goal1_in_g(T2) → U4_g(T2, s2t4_in_ga(T2, X12))
s2t4_in_ga(0, nil) → s2t4_out_ga(0, nil)
s2t4_in_ga(s(T7), node(X23, X24, X23)) → U1_ga(T7, X23, X24, s2t4_in_ga(T7, X23))
s2t4_in_ga(s(T11), node(nil, X41, X42)) → U2_ga(T11, X41, X42, s2t4_in_ga(T11, X42))
s2t4_in_ga(s(T15), node(X59, X60, nil)) → U3_ga(T15, X59, X60, s2t4_in_ga(T15, X59))
s2t4_in_ga(T18, node(nil, X71, nil)) → s2t4_out_ga(T18, node(nil, X71, nil))
U3_ga(T15, X59, X60, s2t4_out_ga(T15, X59)) → s2t4_out_ga(s(T15), node(X59, X60, nil))
U2_ga(T11, X41, X42, s2t4_out_ga(T11, X42)) → s2t4_out_ga(s(T11), node(nil, X41, X42))
U1_ga(T7, X23, X24, s2t4_out_ga(T7, X23)) → s2t4_out_ga(s(T7), node(X23, X24, X23))
U4_g(T2, s2t4_out_ga(T2, X12)) → goal1_out_g(T2)
goal1_in_g(T2) → U5_g(T2, s2t4_in_gg(T2, nil))
s2t4_in_gg(0, nil) → s2t4_out_gg(0, nil)
s2t4_in_gg(s(T7), node(X23, X24, X23)) → U1_gg(T7, X23, X24, s2t4_in_gg(T7, X23))
s2t4_in_gg(s(T11), node(nil, X41, X42)) → U2_gg(T11, X41, X42, s2t4_in_gg(T11, X42))
s2t4_in_gg(s(T15), node(X59, X60, nil)) → U3_gg(T15, X59, X60, s2t4_in_gg(T15, X59))
s2t4_in_gg(T18, node(nil, X71, nil)) → s2t4_out_gg(T18, node(nil, X71, nil))
U3_gg(T15, X59, X60, s2t4_out_gg(T15, X59)) → s2t4_out_gg(s(T15), node(X59, X60, nil))
U2_gg(T11, X41, X42, s2t4_out_gg(T11, X42)) → s2t4_out_gg(s(T11), node(nil, X41, X42))
U1_gg(T7, X23, X24, s2t4_out_gg(T7, X23)) → s2t4_out_gg(s(T7), node(X23, X24, X23))
U5_g(T2, s2t4_out_gg(T2, nil)) → goal1_out_g(T2)
goal1_in_g(T2) → U6_g(T2, s2t4_in_ga(T2, T23))
U6_g(T2, s2t4_out_ga(T2, T23)) → U7_g(T2, tree94_in_)
tree94_in_tree94_out_
U7_g(T2, tree94_out_) → goal1_out_g(T2)
U6_g(T2, s2t4_out_ga(T2, T23)) → U8_g(T2, tree114_in_a(X110))
tree114_in_a(nil) → tree114_out_a(nil)
U8_g(T2, tree114_out_a(X110)) → goal1_out_g(T2)
U6_g(T2, s2t4_out_ga(T2, T23)) → U9_g(T2, tree114_in_a(T24))
U9_g(T2, tree114_out_a(T24)) → goal1_out_g(T2)

The argument filtering Pi contains the following mapping:
goal1_in_g(x1)  =  goal1_in_g(x1)
U4_g(x1, x2)  =  U4_g(x2)
s2t4_in_ga(x1, x2)  =  s2t4_in_ga(x1)
0  =  0
s2t4_out_ga(x1, x2)  =  s2t4_out_ga(x2)
s(x1)  =  s(x1)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x4)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x4)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x4)
node(x1, x2, x3)  =  node(x1, x3)
goal1_out_g(x1)  =  goal1_out_g
U5_g(x1, x2)  =  U5_g(x2)
s2t4_in_gg(x1, x2)  =  s2t4_in_gg(x1, x2)
nil  =  nil
s2t4_out_gg(x1, x2)  =  s2t4_out_gg
U1_gg(x1, x2, x3, x4)  =  U1_gg(x4)
U2_gg(x1, x2, x3, x4)  =  U2_gg(x4)
U3_gg(x1, x2, x3, x4)  =  U3_gg(x4)
U6_g(x1, x2)  =  U6_g(x2)
U7_g(x1, x2)  =  U7_g(x2)
tree94_in_  =  tree94_in_
tree94_out_  =  tree94_out_
U8_g(x1, x2)  =  U8_g(x2)
tree114_in_a(x1)  =  tree114_in_a
tree114_out_a(x1)  =  tree114_out_a(x1)
U9_g(x1, x2)  =  U9_g(x2)
S2T4_IN_GG(x1, x2)  =  S2T4_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:

S2T4_IN_GG(s(T11), node(nil, X41, X42)) → S2T4_IN_GG(T11, X42)
S2T4_IN_GG(s(T7), node(X23, X24, X23)) → S2T4_IN_GG(T7, X23)
S2T4_IN_GG(s(T15), node(X59, X60, nil)) → S2T4_IN_GG(T15, X59)

R is empty.
The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
node(x1, x2, x3)  =  node(x1, x3)
nil  =  nil
S2T4_IN_GG(x1, x2)  =  S2T4_IN_GG(x1, x2)

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

(12) PiDPToQDPProof (SOUND 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:

S2T4_IN_GG(s(T11), node(nil, X42)) → S2T4_IN_GG(T11, X42)
S2T4_IN_GG(s(T7), node(X23, X23)) → S2T4_IN_GG(T7, X23)
S2T4_IN_GG(s(T15), node(X59, nil)) → S2T4_IN_GG(T15, X59)

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:

  • S2T4_IN_GG(s(T11), node(nil, X42)) → S2T4_IN_GG(T11, X42)
    The graph contains the following edges 1 > 1, 2 > 2

  • S2T4_IN_GG(s(T7), node(X23, X23)) → S2T4_IN_GG(T7, X23)
    The graph contains the following edges 1 > 1, 2 > 2

  • S2T4_IN_GG(s(T15), node(X59, nil)) → S2T4_IN_GG(T15, X59)
    The graph contains the following edges 1 > 1, 2 > 2

(15) TRUE

(16) Obligation:

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

S2T4_IN_GA(s(T11), node(nil, X41, X42)) → S2T4_IN_GA(T11, X42)
S2T4_IN_GA(s(T7), node(X23, X24, X23)) → S2T4_IN_GA(T7, X23)
S2T4_IN_GA(s(T15), node(X59, X60, nil)) → S2T4_IN_GA(T15, X59)

The TRS R consists of the following rules:

goal1_in_g(T2) → U4_g(T2, s2t4_in_ga(T2, X12))
s2t4_in_ga(0, nil) → s2t4_out_ga(0, nil)
s2t4_in_ga(s(T7), node(X23, X24, X23)) → U1_ga(T7, X23, X24, s2t4_in_ga(T7, X23))
s2t4_in_ga(s(T11), node(nil, X41, X42)) → U2_ga(T11, X41, X42, s2t4_in_ga(T11, X42))
s2t4_in_ga(s(T15), node(X59, X60, nil)) → U3_ga(T15, X59, X60, s2t4_in_ga(T15, X59))
s2t4_in_ga(T18, node(nil, X71, nil)) → s2t4_out_ga(T18, node(nil, X71, nil))
U3_ga(T15, X59, X60, s2t4_out_ga(T15, X59)) → s2t4_out_ga(s(T15), node(X59, X60, nil))
U2_ga(T11, X41, X42, s2t4_out_ga(T11, X42)) → s2t4_out_ga(s(T11), node(nil, X41, X42))
U1_ga(T7, X23, X24, s2t4_out_ga(T7, X23)) → s2t4_out_ga(s(T7), node(X23, X24, X23))
U4_g(T2, s2t4_out_ga(T2, X12)) → goal1_out_g(T2)
goal1_in_g(T2) → U5_g(T2, s2t4_in_gg(T2, nil))
s2t4_in_gg(0, nil) → s2t4_out_gg(0, nil)
s2t4_in_gg(s(T7), node(X23, X24, X23)) → U1_gg(T7, X23, X24, s2t4_in_gg(T7, X23))
s2t4_in_gg(s(T11), node(nil, X41, X42)) → U2_gg(T11, X41, X42, s2t4_in_gg(T11, X42))
s2t4_in_gg(s(T15), node(X59, X60, nil)) → U3_gg(T15, X59, X60, s2t4_in_gg(T15, X59))
s2t4_in_gg(T18, node(nil, X71, nil)) → s2t4_out_gg(T18, node(nil, X71, nil))
U3_gg(T15, X59, X60, s2t4_out_gg(T15, X59)) → s2t4_out_gg(s(T15), node(X59, X60, nil))
U2_gg(T11, X41, X42, s2t4_out_gg(T11, X42)) → s2t4_out_gg(s(T11), node(nil, X41, X42))
U1_gg(T7, X23, X24, s2t4_out_gg(T7, X23)) → s2t4_out_gg(s(T7), node(X23, X24, X23))
U5_g(T2, s2t4_out_gg(T2, nil)) → goal1_out_g(T2)
goal1_in_g(T2) → U6_g(T2, s2t4_in_ga(T2, T23))
U6_g(T2, s2t4_out_ga(T2, T23)) → U7_g(T2, tree94_in_)
tree94_in_tree94_out_
U7_g(T2, tree94_out_) → goal1_out_g(T2)
U6_g(T2, s2t4_out_ga(T2, T23)) → U8_g(T2, tree114_in_a(X110))
tree114_in_a(nil) → tree114_out_a(nil)
U8_g(T2, tree114_out_a(X110)) → goal1_out_g(T2)
U6_g(T2, s2t4_out_ga(T2, T23)) → U9_g(T2, tree114_in_a(T24))
U9_g(T2, tree114_out_a(T24)) → goal1_out_g(T2)

The argument filtering Pi contains the following mapping:
goal1_in_g(x1)  =  goal1_in_g(x1)
U4_g(x1, x2)  =  U4_g(x2)
s2t4_in_ga(x1, x2)  =  s2t4_in_ga(x1)
0  =  0
s2t4_out_ga(x1, x2)  =  s2t4_out_ga(x2)
s(x1)  =  s(x1)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x4)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x4)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x4)
node(x1, x2, x3)  =  node(x1, x3)
goal1_out_g(x1)  =  goal1_out_g
U5_g(x1, x2)  =  U5_g(x2)
s2t4_in_gg(x1, x2)  =  s2t4_in_gg(x1, x2)
nil  =  nil
s2t4_out_gg(x1, x2)  =  s2t4_out_gg
U1_gg(x1, x2, x3, x4)  =  U1_gg(x4)
U2_gg(x1, x2, x3, x4)  =  U2_gg(x4)
U3_gg(x1, x2, x3, x4)  =  U3_gg(x4)
U6_g(x1, x2)  =  U6_g(x2)
U7_g(x1, x2)  =  U7_g(x2)
tree94_in_  =  tree94_in_
tree94_out_  =  tree94_out_
U8_g(x1, x2)  =  U8_g(x2)
tree114_in_a(x1)  =  tree114_in_a
tree114_out_a(x1)  =  tree114_out_a(x1)
U9_g(x1, x2)  =  U9_g(x2)
S2T4_IN_GA(x1, x2)  =  S2T4_IN_GA(x1)

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:

S2T4_IN_GA(s(T11), node(nil, X41, X42)) → S2T4_IN_GA(T11, X42)
S2T4_IN_GA(s(T7), node(X23, X24, X23)) → S2T4_IN_GA(T7, X23)
S2T4_IN_GA(s(T15), node(X59, X60, nil)) → S2T4_IN_GA(T15, X59)

R is empty.
The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
node(x1, x2, x3)  =  node(x1, x3)
nil  =  nil
S2T4_IN_GA(x1, x2)  =  S2T4_IN_GA(x1)

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

(19) PiDPToQDPProof (SOUND 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:

S2T4_IN_GA(s(T11)) → S2T4_IN_GA(T11)

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:

  • S2T4_IN_GA(s(T11)) → S2T4_IN_GA(T11)
    The graph contains the following edges 1 > 1

(22) TRUE