0 Prolog
↳1 CutEliminatorProof (⇐)
↳2 Prolog
↳3 UndefinedPredicateHandlerProof (⇐)
↳4 Prolog
↳5 PrologToPiTRSProof (⇐)
↳6 PiTRS
↳7 DependencyPairsProof (⇔)
↳8 PiDP
↳9 DependencyGraphProof (⇔)
↳10 AND
↳11 PiDP
↳12 UsableRulesProof (⇔)
↳13 PiDP
↳14 PiDPToQDPProof (⇐)
↳15 QDP
↳16 Rewriting (⇔)
↳17 QDP
↳18 Rewriting (⇔)
↳19 QDP
↳20 Narrowing (⇐)
↳21 QDP
↳22 Rewriting (⇔)
↳23 QDP
↳24 Rewriting (⇔)
↳25 QDP
↳26 Rewriting (⇔)
↳27 QDP
↳28 NonTerminationProof (⇔)
↳29 FALSE
↳30 PiDP
↳31 UsableRulesProof (⇔)
↳32 PiDP
↳33 PiDPToQDPProof (⇐)
↳34 QDP
↳35 Narrowing (⇐)
↳36 QDP
↳37 Narrowing (⇐)
↳38 QDP
↳39 Narrowing (⇐)
↳40 QDP
↳41 UsableRulesProof (⇔)
↳42 QDP
↳43 QReductionProof (⇔)
↳44 QDP
↳45 Instantiation (⇔)
↳46 QDP
↳47 Instantiation (⇔)
↳48 QDP
↳49 Instantiation (⇔)
↳50 QDP
↳51 DependencyGraphProof (⇔)
↳52 AND
↳53 QDP
↳54 NonTerminationProof (⇔)
↳55 FALSE
↳56 QDP
↳57 QDPSizeChangeProof (⇔)
↳58 TRUE
↳59 PrologToPiTRSProof (⇐)
↳60 PiTRS
↳61 DependencyPairsProof (⇔)
↳62 PiDP
↳63 DependencyGraphProof (⇔)
↳64 AND
↳65 PiDP
↳66 UsableRulesProof (⇔)
↳67 PiDP
↳68 PiDPToQDPProof (⇐)
↳69 QDP
↳70 Rewriting (⇔)
↳71 QDP
↳72 Rewriting (⇔)
↳73 QDP
↳74 Narrowing (⇐)
↳75 QDP
↳76 Rewriting (⇔)
↳77 QDP
↳78 Rewriting (⇔)
↳79 QDP
↳80 Rewriting (⇔)
↳81 QDP
↳82 NonTerminationProof (⇔)
↳83 FALSE
↳84 PiDP
↳85 UsableRulesProof (⇔)
↳86 PiDP
↳87 PiDPToQDPProof (⇐)
↳88 QDP
↳89 UsableRulesReductionPairsProof (⇔)
↳90 QDP
↳91 Narrowing (⇐)
↳92 QDP
↳93 Narrowing (⇐)
↳94 QDP
↳95 Narrowing (⇐)
↳96 QDP
↳97 UsableRulesProof (⇔)
↳98 QDP
↳99 QReductionProof (⇔)
↳100 QDP
↳101 Instantiation (⇔)
↳102 QDP
↳103 Instantiation (⇔)
↳104 QDP
↳105 Instantiation (⇔)
↳106 QDP
↳107 NonTerminationProof (⇔)
↳108 FALSE
goal_in_g(X) → U1_g(X, s2t_in_ga(X, T))
s2t_in_ga(0, L) → U8_ga(L, eq_in_ag(L, nil))
eq_in_ag(X, X) → eq_out_ag(X, X)
U8_ga(L, eq_out_ag(L, nil)) → s2t_out_ga(0, L)
s2t_in_ga(X, node(T, X1, T)) → U9_ga(X, T, X1, p_in_ga(X, P))
p_in_ga(0, 0) → p_out_ga(0, 0)
p_in_ga(s(X), X) → p_out_ga(s(X), X)
U9_ga(X, T, X1, p_out_ga(X, P)) → U10_ga(X, T, X1, s2t_in_ga(P, T))
s2t_in_ga(X, node(nil, X2, T)) → U11_ga(X, X2, T, p_in_ga(X, P))
U11_ga(X, X2, T, p_out_ga(X, P)) → U12_ga(X, X2, T, s2t_in_ga(P, T))
s2t_in_ga(X, node(T, X3, nil)) → U13_ga(X, T, X3, p_in_ga(X, P))
U13_ga(X, T, X3, p_out_ga(X, P)) → U14_ga(X, T, X3, s2t_in_ga(P, T))
s2t_in_ga(X, node(nil, X4, nil)) → s2t_out_ga(X, node(nil, X4, nil))
U14_ga(X, T, X3, s2t_out_ga(P, T)) → s2t_out_ga(X, node(T, X3, nil))
U12_ga(X, X2, T, s2t_out_ga(P, T)) → s2t_out_ga(X, node(nil, X2, T))
U10_ga(X, T, X1, s2t_out_ga(P, T)) → s2t_out_ga(X, node(T, X1, T))
U1_g(X, s2t_out_ga(X, T)) → U2_g(X, tree_in_g(T))
tree_in_g(nil) → U3_g(true_in_)
true_in_ → true_out_
U3_g(true_out_) → tree_out_g(nil)
tree_in_g(X) → U4_g(X, left_in_aa(T, L))
left_in_aa(nil, nil) → left_out_aa(nil, nil)
left_in_aa(node(L, X5, X6), L) → left_out_aa(node(L, X5, X6), L)
U4_g(X, left_out_aa(T, L)) → U5_g(X, T, L, right_in_aa(T, R))
right_in_aa(nil, nil) → right_out_aa(nil, nil)
right_in_aa(node(X7, X8, R), R) → right_out_aa(node(X7, X8, R), R)
U5_g(X, T, L, right_out_aa(T, R)) → U6_g(X, R, tree_in_a(L))
tree_in_a(nil) → U3_a(true_in_)
U3_a(true_out_) → tree_out_a(nil)
tree_in_a(X) → U4_a(X, left_in_aa(T, L))
U4_a(X, left_out_aa(T, L)) → U5_a(X, T, L, right_in_aa(T, R))
U5_a(X, T, L, right_out_aa(T, R)) → U6_a(X, R, tree_in_a(L))
U6_a(X, R, tree_out_a(L)) → U7_a(X, tree_in_a(R))
U7_a(X, tree_out_a(R)) → tree_out_a(X)
U6_g(X, R, tree_out_a(L)) → U7_g(X, tree_in_a(R))
U7_g(X, tree_out_a(R)) → tree_out_g(X)
U2_g(X, tree_out_g(T)) → goal_out_g(X)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
goal_in_g(X) → U1_g(X, s2t_in_ga(X, T))
s2t_in_ga(0, L) → U8_ga(L, eq_in_ag(L, nil))
eq_in_ag(X, X) → eq_out_ag(X, X)
U8_ga(L, eq_out_ag(L, nil)) → s2t_out_ga(0, L)
s2t_in_ga(X, node(T, X1, T)) → U9_ga(X, T, X1, p_in_ga(X, P))
p_in_ga(0, 0) → p_out_ga(0, 0)
p_in_ga(s(X), X) → p_out_ga(s(X), X)
U9_ga(X, T, X1, p_out_ga(X, P)) → U10_ga(X, T, X1, s2t_in_ga(P, T))
s2t_in_ga(X, node(nil, X2, T)) → U11_ga(X, X2, T, p_in_ga(X, P))
U11_ga(X, X2, T, p_out_ga(X, P)) → U12_ga(X, X2, T, s2t_in_ga(P, T))
s2t_in_ga(X, node(T, X3, nil)) → U13_ga(X, T, X3, p_in_ga(X, P))
U13_ga(X, T, X3, p_out_ga(X, P)) → U14_ga(X, T, X3, s2t_in_ga(P, T))
s2t_in_ga(X, node(nil, X4, nil)) → s2t_out_ga(X, node(nil, X4, nil))
U14_ga(X, T, X3, s2t_out_ga(P, T)) → s2t_out_ga(X, node(T, X3, nil))
U12_ga(X, X2, T, s2t_out_ga(P, T)) → s2t_out_ga(X, node(nil, X2, T))
U10_ga(X, T, X1, s2t_out_ga(P, T)) → s2t_out_ga(X, node(T, X1, T))
U1_g(X, s2t_out_ga(X, T)) → U2_g(X, tree_in_g(T))
tree_in_g(nil) → U3_g(true_in_)
true_in_ → true_out_
U3_g(true_out_) → tree_out_g(nil)
tree_in_g(X) → U4_g(X, left_in_aa(T, L))
left_in_aa(nil, nil) → left_out_aa(nil, nil)
left_in_aa(node(L, X5, X6), L) → left_out_aa(node(L, X5, X6), L)
U4_g(X, left_out_aa(T, L)) → U5_g(X, T, L, right_in_aa(T, R))
right_in_aa(nil, nil) → right_out_aa(nil, nil)
right_in_aa(node(X7, X8, R), R) → right_out_aa(node(X7, X8, R), R)
U5_g(X, T, L, right_out_aa(T, R)) → U6_g(X, R, tree_in_a(L))
tree_in_a(nil) → U3_a(true_in_)
U3_a(true_out_) → tree_out_a(nil)
tree_in_a(X) → U4_a(X, left_in_aa(T, L))
U4_a(X, left_out_aa(T, L)) → U5_a(X, T, L, right_in_aa(T, R))
U5_a(X, T, L, right_out_aa(T, R)) → U6_a(X, R, tree_in_a(L))
U6_a(X, R, tree_out_a(L)) → U7_a(X, tree_in_a(R))
U7_a(X, tree_out_a(R)) → tree_out_a(X)
U6_g(X, R, tree_out_a(L)) → U7_g(X, tree_in_a(R))
U7_g(X, tree_out_a(R)) → tree_out_g(X)
U2_g(X, tree_out_g(T)) → goal_out_g(X)
GOAL_IN_G(X) → U1_G(X, s2t_in_ga(X, T))
GOAL_IN_G(X) → S2T_IN_GA(X, T)
S2T_IN_GA(0, L) → U8_GA(L, eq_in_ag(L, nil))
S2T_IN_GA(0, L) → EQ_IN_AG(L, nil)
S2T_IN_GA(X, node(T, X1, T)) → U9_GA(X, T, X1, p_in_ga(X, P))
S2T_IN_GA(X, node(T, X1, T)) → P_IN_GA(X, P)
U9_GA(X, T, X1, p_out_ga(X, P)) → U10_GA(X, T, X1, s2t_in_ga(P, T))
U9_GA(X, T, X1, p_out_ga(X, P)) → S2T_IN_GA(P, T)
S2T_IN_GA(X, node(nil, X2, T)) → U11_GA(X, X2, T, p_in_ga(X, P))
S2T_IN_GA(X, node(nil, X2, T)) → P_IN_GA(X, P)
U11_GA(X, X2, T, p_out_ga(X, P)) → U12_GA(X, X2, T, s2t_in_ga(P, T))
U11_GA(X, X2, T, p_out_ga(X, P)) → S2T_IN_GA(P, T)
S2T_IN_GA(X, node(T, X3, nil)) → U13_GA(X, T, X3, p_in_ga(X, P))
S2T_IN_GA(X, node(T, X3, nil)) → P_IN_GA(X, P)
U13_GA(X, T, X3, p_out_ga(X, P)) → U14_GA(X, T, X3, s2t_in_ga(P, T))
U13_GA(X, T, X3, p_out_ga(X, P)) → S2T_IN_GA(P, T)
U1_G(X, s2t_out_ga(X, T)) → U2_G(X, tree_in_g(T))
U1_G(X, s2t_out_ga(X, T)) → TREE_IN_G(T)
TREE_IN_G(nil) → U3_G(true_in_)
TREE_IN_G(nil) → TRUE_IN_
TREE_IN_G(X) → U4_G(X, left_in_aa(T, L))
TREE_IN_G(X) → LEFT_IN_AA(T, L)
U4_G(X, left_out_aa(T, L)) → U5_G(X, T, L, right_in_aa(T, R))
U4_G(X, left_out_aa(T, L)) → RIGHT_IN_AA(T, R)
U5_G(X, T, L, right_out_aa(T, R)) → U6_G(X, R, tree_in_a(L))
U5_G(X, T, L, right_out_aa(T, R)) → TREE_IN_A(L)
TREE_IN_A(nil) → U3_A(true_in_)
TREE_IN_A(nil) → TRUE_IN_
TREE_IN_A(X) → U4_A(X, left_in_aa(T, L))
TREE_IN_A(X) → LEFT_IN_AA(T, L)
U4_A(X, left_out_aa(T, L)) → U5_A(X, T, L, right_in_aa(T, R))
U4_A(X, left_out_aa(T, L)) → RIGHT_IN_AA(T, R)
U5_A(X, T, L, right_out_aa(T, R)) → U6_A(X, R, tree_in_a(L))
U5_A(X, T, L, right_out_aa(T, R)) → TREE_IN_A(L)
U6_A(X, R, tree_out_a(L)) → U7_A(X, tree_in_a(R))
U6_A(X, R, tree_out_a(L)) → TREE_IN_A(R)
U6_G(X, R, tree_out_a(L)) → U7_G(X, tree_in_a(R))
U6_G(X, R, tree_out_a(L)) → TREE_IN_A(R)
goal_in_g(X) → U1_g(X, s2t_in_ga(X, T))
s2t_in_ga(0, L) → U8_ga(L, eq_in_ag(L, nil))
eq_in_ag(X, X) → eq_out_ag(X, X)
U8_ga(L, eq_out_ag(L, nil)) → s2t_out_ga(0, L)
s2t_in_ga(X, node(T, X1, T)) → U9_ga(X, T, X1, p_in_ga(X, P))
p_in_ga(0, 0) → p_out_ga(0, 0)
p_in_ga(s(X), X) → p_out_ga(s(X), X)
U9_ga(X, T, X1, p_out_ga(X, P)) → U10_ga(X, T, X1, s2t_in_ga(P, T))
s2t_in_ga(X, node(nil, X2, T)) → U11_ga(X, X2, T, p_in_ga(X, P))
U11_ga(X, X2, T, p_out_ga(X, P)) → U12_ga(X, X2, T, s2t_in_ga(P, T))
s2t_in_ga(X, node(T, X3, nil)) → U13_ga(X, T, X3, p_in_ga(X, P))
U13_ga(X, T, X3, p_out_ga(X, P)) → U14_ga(X, T, X3, s2t_in_ga(P, T))
s2t_in_ga(X, node(nil, X4, nil)) → s2t_out_ga(X, node(nil, X4, nil))
U14_ga(X, T, X3, s2t_out_ga(P, T)) → s2t_out_ga(X, node(T, X3, nil))
U12_ga(X, X2, T, s2t_out_ga(P, T)) → s2t_out_ga(X, node(nil, X2, T))
U10_ga(X, T, X1, s2t_out_ga(P, T)) → s2t_out_ga(X, node(T, X1, T))
U1_g(X, s2t_out_ga(X, T)) → U2_g(X, tree_in_g(T))
tree_in_g(nil) → U3_g(true_in_)
true_in_ → true_out_
U3_g(true_out_) → tree_out_g(nil)
tree_in_g(X) → U4_g(X, left_in_aa(T, L))
left_in_aa(nil, nil) → left_out_aa(nil, nil)
left_in_aa(node(L, X5, X6), L) → left_out_aa(node(L, X5, X6), L)
U4_g(X, left_out_aa(T, L)) → U5_g(X, T, L, right_in_aa(T, R))
right_in_aa(nil, nil) → right_out_aa(nil, nil)
right_in_aa(node(X7, X8, R), R) → right_out_aa(node(X7, X8, R), R)
U5_g(X, T, L, right_out_aa(T, R)) → U6_g(X, R, tree_in_a(L))
tree_in_a(nil) → U3_a(true_in_)
U3_a(true_out_) → tree_out_a(nil)
tree_in_a(X) → U4_a(X, left_in_aa(T, L))
U4_a(X, left_out_aa(T, L)) → U5_a(X, T, L, right_in_aa(T, R))
U5_a(X, T, L, right_out_aa(T, R)) → U6_a(X, R, tree_in_a(L))
U6_a(X, R, tree_out_a(L)) → U7_a(X, tree_in_a(R))
U7_a(X, tree_out_a(R)) → tree_out_a(X)
U6_g(X, R, tree_out_a(L)) → U7_g(X, tree_in_a(R))
U7_g(X, tree_out_a(R)) → tree_out_g(X)
U2_g(X, tree_out_g(T)) → goal_out_g(X)
GOAL_IN_G(X) → U1_G(X, s2t_in_ga(X, T))
GOAL_IN_G(X) → S2T_IN_GA(X, T)
S2T_IN_GA(0, L) → U8_GA(L, eq_in_ag(L, nil))
S2T_IN_GA(0, L) → EQ_IN_AG(L, nil)
S2T_IN_GA(X, node(T, X1, T)) → U9_GA(X, T, X1, p_in_ga(X, P))
S2T_IN_GA(X, node(T, X1, T)) → P_IN_GA(X, P)
U9_GA(X, T, X1, p_out_ga(X, P)) → U10_GA(X, T, X1, s2t_in_ga(P, T))
U9_GA(X, T, X1, p_out_ga(X, P)) → S2T_IN_GA(P, T)
S2T_IN_GA(X, node(nil, X2, T)) → U11_GA(X, X2, T, p_in_ga(X, P))
S2T_IN_GA(X, node(nil, X2, T)) → P_IN_GA(X, P)
U11_GA(X, X2, T, p_out_ga(X, P)) → U12_GA(X, X2, T, s2t_in_ga(P, T))
U11_GA(X, X2, T, p_out_ga(X, P)) → S2T_IN_GA(P, T)
S2T_IN_GA(X, node(T, X3, nil)) → U13_GA(X, T, X3, p_in_ga(X, P))
S2T_IN_GA(X, node(T, X3, nil)) → P_IN_GA(X, P)
U13_GA(X, T, X3, p_out_ga(X, P)) → U14_GA(X, T, X3, s2t_in_ga(P, T))
U13_GA(X, T, X3, p_out_ga(X, P)) → S2T_IN_GA(P, T)
U1_G(X, s2t_out_ga(X, T)) → U2_G(X, tree_in_g(T))
U1_G(X, s2t_out_ga(X, T)) → TREE_IN_G(T)
TREE_IN_G(nil) → U3_G(true_in_)
TREE_IN_G(nil) → TRUE_IN_
TREE_IN_G(X) → U4_G(X, left_in_aa(T, L))
TREE_IN_G(X) → LEFT_IN_AA(T, L)
U4_G(X, left_out_aa(T, L)) → U5_G(X, T, L, right_in_aa(T, R))
U4_G(X, left_out_aa(T, L)) → RIGHT_IN_AA(T, R)
U5_G(X, T, L, right_out_aa(T, R)) → U6_G(X, R, tree_in_a(L))
U5_G(X, T, L, right_out_aa(T, R)) → TREE_IN_A(L)
TREE_IN_A(nil) → U3_A(true_in_)
TREE_IN_A(nil) → TRUE_IN_
TREE_IN_A(X) → U4_A(X, left_in_aa(T, L))
TREE_IN_A(X) → LEFT_IN_AA(T, L)
U4_A(X, left_out_aa(T, L)) → U5_A(X, T, L, right_in_aa(T, R))
U4_A(X, left_out_aa(T, L)) → RIGHT_IN_AA(T, R)
U5_A(X, T, L, right_out_aa(T, R)) → U6_A(X, R, tree_in_a(L))
U5_A(X, T, L, right_out_aa(T, R)) → TREE_IN_A(L)
U6_A(X, R, tree_out_a(L)) → U7_A(X, tree_in_a(R))
U6_A(X, R, tree_out_a(L)) → TREE_IN_A(R)
U6_G(X, R, tree_out_a(L)) → U7_G(X, tree_in_a(R))
U6_G(X, R, tree_out_a(L)) → TREE_IN_A(R)
goal_in_g(X) → U1_g(X, s2t_in_ga(X, T))
s2t_in_ga(0, L) → U8_ga(L, eq_in_ag(L, nil))
eq_in_ag(X, X) → eq_out_ag(X, X)
U8_ga(L, eq_out_ag(L, nil)) → s2t_out_ga(0, L)
s2t_in_ga(X, node(T, X1, T)) → U9_ga(X, T, X1, p_in_ga(X, P))
p_in_ga(0, 0) → p_out_ga(0, 0)
p_in_ga(s(X), X) → p_out_ga(s(X), X)
U9_ga(X, T, X1, p_out_ga(X, P)) → U10_ga(X, T, X1, s2t_in_ga(P, T))
s2t_in_ga(X, node(nil, X2, T)) → U11_ga(X, X2, T, p_in_ga(X, P))
U11_ga(X, X2, T, p_out_ga(X, P)) → U12_ga(X, X2, T, s2t_in_ga(P, T))
s2t_in_ga(X, node(T, X3, nil)) → U13_ga(X, T, X3, p_in_ga(X, P))
U13_ga(X, T, X3, p_out_ga(X, P)) → U14_ga(X, T, X3, s2t_in_ga(P, T))
s2t_in_ga(X, node(nil, X4, nil)) → s2t_out_ga(X, node(nil, X4, nil))
U14_ga(X, T, X3, s2t_out_ga(P, T)) → s2t_out_ga(X, node(T, X3, nil))
U12_ga(X, X2, T, s2t_out_ga(P, T)) → s2t_out_ga(X, node(nil, X2, T))
U10_ga(X, T, X1, s2t_out_ga(P, T)) → s2t_out_ga(X, node(T, X1, T))
U1_g(X, s2t_out_ga(X, T)) → U2_g(X, tree_in_g(T))
tree_in_g(nil) → U3_g(true_in_)
true_in_ → true_out_
U3_g(true_out_) → tree_out_g(nil)
tree_in_g(X) → U4_g(X, left_in_aa(T, L))
left_in_aa(nil, nil) → left_out_aa(nil, nil)
left_in_aa(node(L, X5, X6), L) → left_out_aa(node(L, X5, X6), L)
U4_g(X, left_out_aa(T, L)) → U5_g(X, T, L, right_in_aa(T, R))
right_in_aa(nil, nil) → right_out_aa(nil, nil)
right_in_aa(node(X7, X8, R), R) → right_out_aa(node(X7, X8, R), R)
U5_g(X, T, L, right_out_aa(T, R)) → U6_g(X, R, tree_in_a(L))
tree_in_a(nil) → U3_a(true_in_)
U3_a(true_out_) → tree_out_a(nil)
tree_in_a(X) → U4_a(X, left_in_aa(T, L))
U4_a(X, left_out_aa(T, L)) → U5_a(X, T, L, right_in_aa(T, R))
U5_a(X, T, L, right_out_aa(T, R)) → U6_a(X, R, tree_in_a(L))
U6_a(X, R, tree_out_a(L)) → U7_a(X, tree_in_a(R))
U7_a(X, tree_out_a(R)) → tree_out_a(X)
U6_g(X, R, tree_out_a(L)) → U7_g(X, tree_in_a(R))
U7_g(X, tree_out_a(R)) → tree_out_g(X)
U2_g(X, tree_out_g(T)) → goal_out_g(X)
TREE_IN_A(X) → U4_A(X, left_in_aa(T, L))
U4_A(X, left_out_aa(T, L)) → U5_A(X, T, L, right_in_aa(T, R))
U5_A(X, T, L, right_out_aa(T, R)) → U6_A(X, R, tree_in_a(L))
U6_A(X, R, tree_out_a(L)) → TREE_IN_A(R)
U5_A(X, T, L, right_out_aa(T, R)) → TREE_IN_A(L)
goal_in_g(X) → U1_g(X, s2t_in_ga(X, T))
s2t_in_ga(0, L) → U8_ga(L, eq_in_ag(L, nil))
eq_in_ag(X, X) → eq_out_ag(X, X)
U8_ga(L, eq_out_ag(L, nil)) → s2t_out_ga(0, L)
s2t_in_ga(X, node(T, X1, T)) → U9_ga(X, T, X1, p_in_ga(X, P))
p_in_ga(0, 0) → p_out_ga(0, 0)
p_in_ga(s(X), X) → p_out_ga(s(X), X)
U9_ga(X, T, X1, p_out_ga(X, P)) → U10_ga(X, T, X1, s2t_in_ga(P, T))
s2t_in_ga(X, node(nil, X2, T)) → U11_ga(X, X2, T, p_in_ga(X, P))
U11_ga(X, X2, T, p_out_ga(X, P)) → U12_ga(X, X2, T, s2t_in_ga(P, T))
s2t_in_ga(X, node(T, X3, nil)) → U13_ga(X, T, X3, p_in_ga(X, P))
U13_ga(X, T, X3, p_out_ga(X, P)) → U14_ga(X, T, X3, s2t_in_ga(P, T))
s2t_in_ga(X, node(nil, X4, nil)) → s2t_out_ga(X, node(nil, X4, nil))
U14_ga(X, T, X3, s2t_out_ga(P, T)) → s2t_out_ga(X, node(T, X3, nil))
U12_ga(X, X2, T, s2t_out_ga(P, T)) → s2t_out_ga(X, node(nil, X2, T))
U10_ga(X, T, X1, s2t_out_ga(P, T)) → s2t_out_ga(X, node(T, X1, T))
U1_g(X, s2t_out_ga(X, T)) → U2_g(X, tree_in_g(T))
tree_in_g(nil) → U3_g(true_in_)
true_in_ → true_out_
U3_g(true_out_) → tree_out_g(nil)
tree_in_g(X) → U4_g(X, left_in_aa(T, L))
left_in_aa(nil, nil) → left_out_aa(nil, nil)
left_in_aa(node(L, X5, X6), L) → left_out_aa(node(L, X5, X6), L)
U4_g(X, left_out_aa(T, L)) → U5_g(X, T, L, right_in_aa(T, R))
right_in_aa(nil, nil) → right_out_aa(nil, nil)
right_in_aa(node(X7, X8, R), R) → right_out_aa(node(X7, X8, R), R)
U5_g(X, T, L, right_out_aa(T, R)) → U6_g(X, R, tree_in_a(L))
tree_in_a(nil) → U3_a(true_in_)
U3_a(true_out_) → tree_out_a(nil)
tree_in_a(X) → U4_a(X, left_in_aa(T, L))
U4_a(X, left_out_aa(T, L)) → U5_a(X, T, L, right_in_aa(T, R))
U5_a(X, T, L, right_out_aa(T, R)) → U6_a(X, R, tree_in_a(L))
U6_a(X, R, tree_out_a(L)) → U7_a(X, tree_in_a(R))
U7_a(X, tree_out_a(R)) → tree_out_a(X)
U6_g(X, R, tree_out_a(L)) → U7_g(X, tree_in_a(R))
U7_g(X, tree_out_a(R)) → tree_out_g(X)
U2_g(X, tree_out_g(T)) → goal_out_g(X)
TREE_IN_A(X) → U4_A(X, left_in_aa(T, L))
U4_A(X, left_out_aa(T, L)) → U5_A(X, T, L, right_in_aa(T, R))
U5_A(X, T, L, right_out_aa(T, R)) → U6_A(X, R, tree_in_a(L))
U6_A(X, R, tree_out_a(L)) → TREE_IN_A(R)
U5_A(X, T, L, right_out_aa(T, R)) → TREE_IN_A(L)
left_in_aa(nil, nil) → left_out_aa(nil, nil)
left_in_aa(node(L, X5, X6), L) → left_out_aa(node(L, X5, X6), L)
right_in_aa(nil, nil) → right_out_aa(nil, nil)
right_in_aa(node(X7, X8, R), R) → right_out_aa(node(X7, X8, R), R)
tree_in_a(nil) → U3_a(true_in_)
tree_in_a(X) → U4_a(X, left_in_aa(T, L))
U3_a(true_out_) → tree_out_a(nil)
U4_a(X, left_out_aa(T, L)) → U5_a(X, T, L, right_in_aa(T, R))
true_in_ → true_out_
U5_a(X, T, L, right_out_aa(T, R)) → U6_a(X, R, tree_in_a(L))
U6_a(X, R, tree_out_a(L)) → U7_a(X, tree_in_a(R))
U7_a(X, tree_out_a(R)) → tree_out_a(X)
TREE_IN_A → U4_A(left_in_aa)
U4_A(left_out_aa) → U5_A(right_in_aa)
U5_A(right_out_aa) → U6_A(tree_in_a)
U6_A(tree_out_a) → TREE_IN_A
U5_A(right_out_aa) → TREE_IN_A
left_in_aa → left_out_aa
right_in_aa → right_out_aa
tree_in_a → U3_a(true_in_)
tree_in_a → U4_a(left_in_aa)
U3_a(true_out_) → tree_out_a
U4_a(left_out_aa) → U5_a(right_in_aa)
true_in_ → true_out_
U5_a(right_out_aa) → U6_a(tree_in_a)
U6_a(tree_out_a) → U7_a(tree_in_a)
U7_a(tree_out_a) → tree_out_a
left_in_aa
right_in_aa
tree_in_a
U3_a(x0)
U4_a(x0)
true_in_
U5_a(x0)
U6_a(x0)
U7_a(x0)
TREE_IN_A → U4_A(left_out_aa)
U4_A(left_out_aa) → U5_A(right_in_aa)
U5_A(right_out_aa) → U6_A(tree_in_a)
U6_A(tree_out_a) → TREE_IN_A
U5_A(right_out_aa) → TREE_IN_A
TREE_IN_A → U4_A(left_out_aa)
left_in_aa → left_out_aa
right_in_aa → right_out_aa
tree_in_a → U3_a(true_in_)
tree_in_a → U4_a(left_in_aa)
U3_a(true_out_) → tree_out_a
U4_a(left_out_aa) → U5_a(right_in_aa)
true_in_ → true_out_
U5_a(right_out_aa) → U6_a(tree_in_a)
U6_a(tree_out_a) → U7_a(tree_in_a)
U7_a(tree_out_a) → tree_out_a
left_in_aa
right_in_aa
tree_in_a
U3_a(x0)
U4_a(x0)
true_in_
U5_a(x0)
U6_a(x0)
U7_a(x0)
U4_A(left_out_aa) → U5_A(right_out_aa)
U5_A(right_out_aa) → U6_A(tree_in_a)
U6_A(tree_out_a) → TREE_IN_A
U5_A(right_out_aa) → TREE_IN_A
TREE_IN_A → U4_A(left_out_aa)
U4_A(left_out_aa) → U5_A(right_out_aa)
left_in_aa → left_out_aa
right_in_aa → right_out_aa
tree_in_a → U3_a(true_in_)
tree_in_a → U4_a(left_in_aa)
U3_a(true_out_) → tree_out_a
U4_a(left_out_aa) → U5_a(right_in_aa)
true_in_ → true_out_
U5_a(right_out_aa) → U6_a(tree_in_a)
U6_a(tree_out_a) → U7_a(tree_in_a)
U7_a(tree_out_a) → tree_out_a
left_in_aa
right_in_aa
tree_in_a
U3_a(x0)
U4_a(x0)
true_in_
U5_a(x0)
U6_a(x0)
U7_a(x0)
U5_A(right_out_aa) → U6_A(U3_a(true_in_))
U5_A(right_out_aa) → U6_A(U4_a(left_in_aa))
U6_A(tree_out_a) → TREE_IN_A
U5_A(right_out_aa) → TREE_IN_A
TREE_IN_A → U4_A(left_out_aa)
U4_A(left_out_aa) → U5_A(right_out_aa)
U5_A(right_out_aa) → U6_A(U3_a(true_in_))
U5_A(right_out_aa) → U6_A(U4_a(left_in_aa))
left_in_aa → left_out_aa
right_in_aa → right_out_aa
tree_in_a → U3_a(true_in_)
tree_in_a → U4_a(left_in_aa)
U3_a(true_out_) → tree_out_a
U4_a(left_out_aa) → U5_a(right_in_aa)
true_in_ → true_out_
U5_a(right_out_aa) → U6_a(tree_in_a)
U6_a(tree_out_a) → U7_a(tree_in_a)
U7_a(tree_out_a) → tree_out_a
left_in_aa
right_in_aa
tree_in_a
U3_a(x0)
U4_a(x0)
true_in_
U5_a(x0)
U6_a(x0)
U7_a(x0)
U5_A(right_out_aa) → U6_A(U3_a(true_out_))
U6_A(tree_out_a) → TREE_IN_A
U5_A(right_out_aa) → TREE_IN_A
TREE_IN_A → U4_A(left_out_aa)
U4_A(left_out_aa) → U5_A(right_out_aa)
U5_A(right_out_aa) → U6_A(U4_a(left_in_aa))
U5_A(right_out_aa) → U6_A(U3_a(true_out_))
left_in_aa → left_out_aa
right_in_aa → right_out_aa
tree_in_a → U3_a(true_in_)
tree_in_a → U4_a(left_in_aa)
U3_a(true_out_) → tree_out_a
U4_a(left_out_aa) → U5_a(right_in_aa)
true_in_ → true_out_
U5_a(right_out_aa) → U6_a(tree_in_a)
U6_a(tree_out_a) → U7_a(tree_in_a)
U7_a(tree_out_a) → tree_out_a
left_in_aa
right_in_aa
tree_in_a
U3_a(x0)
U4_a(x0)
true_in_
U5_a(x0)
U6_a(x0)
U7_a(x0)
U5_A(right_out_aa) → U6_A(U4_a(left_out_aa))
U6_A(tree_out_a) → TREE_IN_A
U5_A(right_out_aa) → TREE_IN_A
TREE_IN_A → U4_A(left_out_aa)
U4_A(left_out_aa) → U5_A(right_out_aa)
U5_A(right_out_aa) → U6_A(U3_a(true_out_))
U5_A(right_out_aa) → U6_A(U4_a(left_out_aa))
left_in_aa → left_out_aa
right_in_aa → right_out_aa
tree_in_a → U3_a(true_in_)
tree_in_a → U4_a(left_in_aa)
U3_a(true_out_) → tree_out_a
U4_a(left_out_aa) → U5_a(right_in_aa)
true_in_ → true_out_
U5_a(right_out_aa) → U6_a(tree_in_a)
U6_a(tree_out_a) → U7_a(tree_in_a)
U7_a(tree_out_a) → tree_out_a
left_in_aa
right_in_aa
tree_in_a
U3_a(x0)
U4_a(x0)
true_in_
U5_a(x0)
U6_a(x0)
U7_a(x0)
U5_A(right_out_aa) → U6_A(tree_out_a)
U6_A(tree_out_a) → TREE_IN_A
U5_A(right_out_aa) → TREE_IN_A
TREE_IN_A → U4_A(left_out_aa)
U4_A(left_out_aa) → U5_A(right_out_aa)
U5_A(right_out_aa) → U6_A(U4_a(left_out_aa))
U5_A(right_out_aa) → U6_A(tree_out_a)
left_in_aa → left_out_aa
right_in_aa → right_out_aa
tree_in_a → U3_a(true_in_)
tree_in_a → U4_a(left_in_aa)
U3_a(true_out_) → tree_out_a
U4_a(left_out_aa) → U5_a(right_in_aa)
true_in_ → true_out_
U5_a(right_out_aa) → U6_a(tree_in_a)
U6_a(tree_out_a) → U7_a(tree_in_a)
U7_a(tree_out_a) → tree_out_a
left_in_aa
right_in_aa
tree_in_a
U3_a(x0)
U4_a(x0)
true_in_
U5_a(x0)
U6_a(x0)
U7_a(x0)
S2T_IN_GA(X, node(T, X1, T)) → U9_GA(X, T, X1, p_in_ga(X, P))
U9_GA(X, T, X1, p_out_ga(X, P)) → S2T_IN_GA(P, T)
S2T_IN_GA(X, node(nil, X2, T)) → U11_GA(X, X2, T, p_in_ga(X, P))
U11_GA(X, X2, T, p_out_ga(X, P)) → S2T_IN_GA(P, T)
S2T_IN_GA(X, node(T, X3, nil)) → U13_GA(X, T, X3, p_in_ga(X, P))
U13_GA(X, T, X3, p_out_ga(X, P)) → S2T_IN_GA(P, T)
goal_in_g(X) → U1_g(X, s2t_in_ga(X, T))
s2t_in_ga(0, L) → U8_ga(L, eq_in_ag(L, nil))
eq_in_ag(X, X) → eq_out_ag(X, X)
U8_ga(L, eq_out_ag(L, nil)) → s2t_out_ga(0, L)
s2t_in_ga(X, node(T, X1, T)) → U9_ga(X, T, X1, p_in_ga(X, P))
p_in_ga(0, 0) → p_out_ga(0, 0)
p_in_ga(s(X), X) → p_out_ga(s(X), X)
U9_ga(X, T, X1, p_out_ga(X, P)) → U10_ga(X, T, X1, s2t_in_ga(P, T))
s2t_in_ga(X, node(nil, X2, T)) → U11_ga(X, X2, T, p_in_ga(X, P))
U11_ga(X, X2, T, p_out_ga(X, P)) → U12_ga(X, X2, T, s2t_in_ga(P, T))
s2t_in_ga(X, node(T, X3, nil)) → U13_ga(X, T, X3, p_in_ga(X, P))
U13_ga(X, T, X3, p_out_ga(X, P)) → U14_ga(X, T, X3, s2t_in_ga(P, T))
s2t_in_ga(X, node(nil, X4, nil)) → s2t_out_ga(X, node(nil, X4, nil))
U14_ga(X, T, X3, s2t_out_ga(P, T)) → s2t_out_ga(X, node(T, X3, nil))
U12_ga(X, X2, T, s2t_out_ga(P, T)) → s2t_out_ga(X, node(nil, X2, T))
U10_ga(X, T, X1, s2t_out_ga(P, T)) → s2t_out_ga(X, node(T, X1, T))
U1_g(X, s2t_out_ga(X, T)) → U2_g(X, tree_in_g(T))
tree_in_g(nil) → U3_g(true_in_)
true_in_ → true_out_
U3_g(true_out_) → tree_out_g(nil)
tree_in_g(X) → U4_g(X, left_in_aa(T, L))
left_in_aa(nil, nil) → left_out_aa(nil, nil)
left_in_aa(node(L, X5, X6), L) → left_out_aa(node(L, X5, X6), L)
U4_g(X, left_out_aa(T, L)) → U5_g(X, T, L, right_in_aa(T, R))
right_in_aa(nil, nil) → right_out_aa(nil, nil)
right_in_aa(node(X7, X8, R), R) → right_out_aa(node(X7, X8, R), R)
U5_g(X, T, L, right_out_aa(T, R)) → U6_g(X, R, tree_in_a(L))
tree_in_a(nil) → U3_a(true_in_)
U3_a(true_out_) → tree_out_a(nil)
tree_in_a(X) → U4_a(X, left_in_aa(T, L))
U4_a(X, left_out_aa(T, L)) → U5_a(X, T, L, right_in_aa(T, R))
U5_a(X, T, L, right_out_aa(T, R)) → U6_a(X, R, tree_in_a(L))
U6_a(X, R, tree_out_a(L)) → U7_a(X, tree_in_a(R))
U7_a(X, tree_out_a(R)) → tree_out_a(X)
U6_g(X, R, tree_out_a(L)) → U7_g(X, tree_in_a(R))
U7_g(X, tree_out_a(R)) → tree_out_g(X)
U2_g(X, tree_out_g(T)) → goal_out_g(X)
S2T_IN_GA(X, node(T, X1, T)) → U9_GA(X, T, X1, p_in_ga(X, P))
U9_GA(X, T, X1, p_out_ga(X, P)) → S2T_IN_GA(P, T)
S2T_IN_GA(X, node(nil, X2, T)) → U11_GA(X, X2, T, p_in_ga(X, P))
U11_GA(X, X2, T, p_out_ga(X, P)) → S2T_IN_GA(P, T)
S2T_IN_GA(X, node(T, X3, nil)) → U13_GA(X, T, X3, p_in_ga(X, P))
U13_GA(X, T, X3, p_out_ga(X, P)) → S2T_IN_GA(P, T)
p_in_ga(0, 0) → p_out_ga(0, 0)
p_in_ga(s(X), X) → p_out_ga(s(X), X)
S2T_IN_GA(X) → U9_GA(X, p_in_ga(X))
U9_GA(X, p_out_ga(X, P)) → S2T_IN_GA(P)
S2T_IN_GA(X) → U11_GA(X, p_in_ga(X))
U11_GA(X, p_out_ga(X, P)) → S2T_IN_GA(P)
S2T_IN_GA(X) → U13_GA(X, p_in_ga(X))
U13_GA(X, p_out_ga(X, P)) → S2T_IN_GA(P)
p_in_ga(0) → p_out_ga(0, 0)
p_in_ga(s(X)) → p_out_ga(s(X), X)
p_in_ga(x0)
S2T_IN_GA(0) → U9_GA(0, p_out_ga(0, 0))
S2T_IN_GA(s(x0)) → U9_GA(s(x0), p_out_ga(s(x0), x0))
U9_GA(X, p_out_ga(X, P)) → S2T_IN_GA(P)
S2T_IN_GA(X) → U11_GA(X, p_in_ga(X))
U11_GA(X, p_out_ga(X, P)) → S2T_IN_GA(P)
S2T_IN_GA(X) → U13_GA(X, p_in_ga(X))
U13_GA(X, p_out_ga(X, P)) → S2T_IN_GA(P)
S2T_IN_GA(0) → U9_GA(0, p_out_ga(0, 0))
S2T_IN_GA(s(x0)) → U9_GA(s(x0), p_out_ga(s(x0), x0))
p_in_ga(0) → p_out_ga(0, 0)
p_in_ga(s(X)) → p_out_ga(s(X), X)
p_in_ga(x0)
S2T_IN_GA(0) → U11_GA(0, p_out_ga(0, 0))
S2T_IN_GA(s(x0)) → U11_GA(s(x0), p_out_ga(s(x0), x0))
U9_GA(X, p_out_ga(X, P)) → S2T_IN_GA(P)
U11_GA(X, p_out_ga(X, P)) → S2T_IN_GA(P)
S2T_IN_GA(X) → U13_GA(X, p_in_ga(X))
U13_GA(X, p_out_ga(X, P)) → S2T_IN_GA(P)
S2T_IN_GA(0) → U9_GA(0, p_out_ga(0, 0))
S2T_IN_GA(s(x0)) → U9_GA(s(x0), p_out_ga(s(x0), x0))
S2T_IN_GA(0) → U11_GA(0, p_out_ga(0, 0))
S2T_IN_GA(s(x0)) → U11_GA(s(x0), p_out_ga(s(x0), x0))
p_in_ga(0) → p_out_ga(0, 0)
p_in_ga(s(X)) → p_out_ga(s(X), X)
p_in_ga(x0)
S2T_IN_GA(0) → U13_GA(0, p_out_ga(0, 0))
S2T_IN_GA(s(x0)) → U13_GA(s(x0), p_out_ga(s(x0), x0))
U9_GA(X, p_out_ga(X, P)) → S2T_IN_GA(P)
U11_GA(X, p_out_ga(X, P)) → S2T_IN_GA(P)
U13_GA(X, p_out_ga(X, P)) → S2T_IN_GA(P)
S2T_IN_GA(0) → U9_GA(0, p_out_ga(0, 0))
S2T_IN_GA(s(x0)) → U9_GA(s(x0), p_out_ga(s(x0), x0))
S2T_IN_GA(0) → U11_GA(0, p_out_ga(0, 0))
S2T_IN_GA(s(x0)) → U11_GA(s(x0), p_out_ga(s(x0), x0))
S2T_IN_GA(0) → U13_GA(0, p_out_ga(0, 0))
S2T_IN_GA(s(x0)) → U13_GA(s(x0), p_out_ga(s(x0), x0))
p_in_ga(0) → p_out_ga(0, 0)
p_in_ga(s(X)) → p_out_ga(s(X), X)
p_in_ga(x0)
U9_GA(X, p_out_ga(X, P)) → S2T_IN_GA(P)
U11_GA(X, p_out_ga(X, P)) → S2T_IN_GA(P)
U13_GA(X, p_out_ga(X, P)) → S2T_IN_GA(P)
S2T_IN_GA(0) → U9_GA(0, p_out_ga(0, 0))
S2T_IN_GA(s(x0)) → U9_GA(s(x0), p_out_ga(s(x0), x0))
S2T_IN_GA(0) → U11_GA(0, p_out_ga(0, 0))
S2T_IN_GA(s(x0)) → U11_GA(s(x0), p_out_ga(s(x0), x0))
S2T_IN_GA(0) → U13_GA(0, p_out_ga(0, 0))
S2T_IN_GA(s(x0)) → U13_GA(s(x0), p_out_ga(s(x0), x0))
p_in_ga(x0)
p_in_ga(x0)
U9_GA(X, p_out_ga(X, P)) → S2T_IN_GA(P)
U11_GA(X, p_out_ga(X, P)) → S2T_IN_GA(P)
U13_GA(X, p_out_ga(X, P)) → S2T_IN_GA(P)
S2T_IN_GA(0) → U9_GA(0, p_out_ga(0, 0))
S2T_IN_GA(s(x0)) → U9_GA(s(x0), p_out_ga(s(x0), x0))
S2T_IN_GA(0) → U11_GA(0, p_out_ga(0, 0))
S2T_IN_GA(s(x0)) → U11_GA(s(x0), p_out_ga(s(x0), x0))
S2T_IN_GA(0) → U13_GA(0, p_out_ga(0, 0))
S2T_IN_GA(s(x0)) → U13_GA(s(x0), p_out_ga(s(x0), x0))
U9_GA(0, p_out_ga(0, 0)) → S2T_IN_GA(0)
U9_GA(s(z0), p_out_ga(s(z0), z0)) → S2T_IN_GA(z0)
U11_GA(X, p_out_ga(X, P)) → S2T_IN_GA(P)
U13_GA(X, p_out_ga(X, P)) → S2T_IN_GA(P)
S2T_IN_GA(0) → U9_GA(0, p_out_ga(0, 0))
S2T_IN_GA(s(x0)) → U9_GA(s(x0), p_out_ga(s(x0), x0))
S2T_IN_GA(0) → U11_GA(0, p_out_ga(0, 0))
S2T_IN_GA(s(x0)) → U11_GA(s(x0), p_out_ga(s(x0), x0))
S2T_IN_GA(0) → U13_GA(0, p_out_ga(0, 0))
S2T_IN_GA(s(x0)) → U13_GA(s(x0), p_out_ga(s(x0), x0))
U9_GA(0, p_out_ga(0, 0)) → S2T_IN_GA(0)
U9_GA(s(z0), p_out_ga(s(z0), z0)) → S2T_IN_GA(z0)
U11_GA(0, p_out_ga(0, 0)) → S2T_IN_GA(0)
U11_GA(s(z0), p_out_ga(s(z0), z0)) → S2T_IN_GA(z0)
U13_GA(X, p_out_ga(X, P)) → S2T_IN_GA(P)
S2T_IN_GA(0) → U9_GA(0, p_out_ga(0, 0))
S2T_IN_GA(s(x0)) → U9_GA(s(x0), p_out_ga(s(x0), x0))
S2T_IN_GA(0) → U11_GA(0, p_out_ga(0, 0))
S2T_IN_GA(s(x0)) → U11_GA(s(x0), p_out_ga(s(x0), x0))
S2T_IN_GA(0) → U13_GA(0, p_out_ga(0, 0))
S2T_IN_GA(s(x0)) → U13_GA(s(x0), p_out_ga(s(x0), x0))
U9_GA(0, p_out_ga(0, 0)) → S2T_IN_GA(0)
U9_GA(s(z0), p_out_ga(s(z0), z0)) → S2T_IN_GA(z0)
U11_GA(0, p_out_ga(0, 0)) → S2T_IN_GA(0)
U11_GA(s(z0), p_out_ga(s(z0), z0)) → S2T_IN_GA(z0)
U13_GA(0, p_out_ga(0, 0)) → S2T_IN_GA(0)
U13_GA(s(z0), p_out_ga(s(z0), z0)) → S2T_IN_GA(z0)
S2T_IN_GA(0) → U9_GA(0, p_out_ga(0, 0))
S2T_IN_GA(s(x0)) → U9_GA(s(x0), p_out_ga(s(x0), x0))
S2T_IN_GA(0) → U11_GA(0, p_out_ga(0, 0))
S2T_IN_GA(s(x0)) → U11_GA(s(x0), p_out_ga(s(x0), x0))
S2T_IN_GA(0) → U13_GA(0, p_out_ga(0, 0))
S2T_IN_GA(s(x0)) → U13_GA(s(x0), p_out_ga(s(x0), x0))
U9_GA(0, p_out_ga(0, 0)) → S2T_IN_GA(0)
U9_GA(s(z0), p_out_ga(s(z0), z0)) → S2T_IN_GA(z0)
U11_GA(0, p_out_ga(0, 0)) → S2T_IN_GA(0)
U11_GA(s(z0), p_out_ga(s(z0), z0)) → S2T_IN_GA(z0)
U13_GA(0, p_out_ga(0, 0)) → S2T_IN_GA(0)
U13_GA(s(z0), p_out_ga(s(z0), z0)) → S2T_IN_GA(z0)
U9_GA(0, p_out_ga(0, 0)) → S2T_IN_GA(0)
S2T_IN_GA(0) → U9_GA(0, p_out_ga(0, 0))
S2T_IN_GA(0) → U11_GA(0, p_out_ga(0, 0))
U11_GA(0, p_out_ga(0, 0)) → S2T_IN_GA(0)
S2T_IN_GA(0) → U13_GA(0, p_out_ga(0, 0))
U13_GA(0, p_out_ga(0, 0)) → S2T_IN_GA(0)
S2T_IN_GA(s(x0)) → U9_GA(s(x0), p_out_ga(s(x0), x0))
U9_GA(s(z0), p_out_ga(s(z0), z0)) → S2T_IN_GA(z0)
S2T_IN_GA(s(x0)) → U11_GA(s(x0), p_out_ga(s(x0), x0))
U11_GA(s(z0), p_out_ga(s(z0), z0)) → S2T_IN_GA(z0)
S2T_IN_GA(s(x0)) → U13_GA(s(x0), p_out_ga(s(x0), x0))
U13_GA(s(z0), p_out_ga(s(z0), z0)) → S2T_IN_GA(z0)
From the DPs we obtained the following set of size-change graphs:
goal_in_g(X) → U1_g(X, s2t_in_ga(X, T))
s2t_in_ga(0, L) → U8_ga(L, eq_in_ag(L, nil))
eq_in_ag(X, X) → eq_out_ag(X, X)
U8_ga(L, eq_out_ag(L, nil)) → s2t_out_ga(0, L)
s2t_in_ga(X, node(T, X1, T)) → U9_ga(X, T, X1, p_in_ga(X, P))
p_in_ga(0, 0) → p_out_ga(0, 0)
p_in_ga(s(X), X) → p_out_ga(s(X), X)
U9_ga(X, T, X1, p_out_ga(X, P)) → U10_ga(X, T, X1, s2t_in_ga(P, T))
s2t_in_ga(X, node(nil, X2, T)) → U11_ga(X, X2, T, p_in_ga(X, P))
U11_ga(X, X2, T, p_out_ga(X, P)) → U12_ga(X, X2, T, s2t_in_ga(P, T))
s2t_in_ga(X, node(T, X3, nil)) → U13_ga(X, T, X3, p_in_ga(X, P))
U13_ga(X, T, X3, p_out_ga(X, P)) → U14_ga(X, T, X3, s2t_in_ga(P, T))
s2t_in_ga(X, node(nil, X4, nil)) → s2t_out_ga(X, node(nil, X4, nil))
U14_ga(X, T, X3, s2t_out_ga(P, T)) → s2t_out_ga(X, node(T, X3, nil))
U12_ga(X, X2, T, s2t_out_ga(P, T)) → s2t_out_ga(X, node(nil, X2, T))
U10_ga(X, T, X1, s2t_out_ga(P, T)) → s2t_out_ga(X, node(T, X1, T))
U1_g(X, s2t_out_ga(X, T)) → U2_g(X, tree_in_g(T))
tree_in_g(nil) → U3_g(true_in_)
true_in_ → true_out_
U3_g(true_out_) → tree_out_g(nil)
tree_in_g(X) → U4_g(X, left_in_aa(T, L))
left_in_aa(nil, nil) → left_out_aa(nil, nil)
left_in_aa(node(L, X5, X6), L) → left_out_aa(node(L, X5, X6), L)
U4_g(X, left_out_aa(T, L)) → U5_g(X, T, L, right_in_aa(T, R))
right_in_aa(nil, nil) → right_out_aa(nil, nil)
right_in_aa(node(X7, X8, R), R) → right_out_aa(node(X7, X8, R), R)
U5_g(X, T, L, right_out_aa(T, R)) → U6_g(X, R, tree_in_a(L))
tree_in_a(nil) → U3_a(true_in_)
U3_a(true_out_) → tree_out_a(nil)
tree_in_a(X) → U4_a(X, left_in_aa(T, L))
U4_a(X, left_out_aa(T, L)) → U5_a(X, T, L, right_in_aa(T, R))
U5_a(X, T, L, right_out_aa(T, R)) → U6_a(X, R, tree_in_a(L))
U6_a(X, R, tree_out_a(L)) → U7_a(X, tree_in_a(R))
U7_a(X, tree_out_a(R)) → tree_out_a(X)
U6_g(X, R, tree_out_a(L)) → U7_g(X, tree_in_a(R))
U7_g(X, tree_out_a(R)) → tree_out_g(X)
U2_g(X, tree_out_g(T)) → goal_out_g(X)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
goal_in_g(X) → U1_g(X, s2t_in_ga(X, T))
s2t_in_ga(0, L) → U8_ga(L, eq_in_ag(L, nil))
eq_in_ag(X, X) → eq_out_ag(X, X)
U8_ga(L, eq_out_ag(L, nil)) → s2t_out_ga(0, L)
s2t_in_ga(X, node(T, X1, T)) → U9_ga(X, T, X1, p_in_ga(X, P))
p_in_ga(0, 0) → p_out_ga(0, 0)
p_in_ga(s(X), X) → p_out_ga(s(X), X)
U9_ga(X, T, X1, p_out_ga(X, P)) → U10_ga(X, T, X1, s2t_in_ga(P, T))
s2t_in_ga(X, node(nil, X2, T)) → U11_ga(X, X2, T, p_in_ga(X, P))
U11_ga(X, X2, T, p_out_ga(X, P)) → U12_ga(X, X2, T, s2t_in_ga(P, T))
s2t_in_ga(X, node(T, X3, nil)) → U13_ga(X, T, X3, p_in_ga(X, P))
U13_ga(X, T, X3, p_out_ga(X, P)) → U14_ga(X, T, X3, s2t_in_ga(P, T))
s2t_in_ga(X, node(nil, X4, nil)) → s2t_out_ga(X, node(nil, X4, nil))
U14_ga(X, T, X3, s2t_out_ga(P, T)) → s2t_out_ga(X, node(T, X3, nil))
U12_ga(X, X2, T, s2t_out_ga(P, T)) → s2t_out_ga(X, node(nil, X2, T))
U10_ga(X, T, X1, s2t_out_ga(P, T)) → s2t_out_ga(X, node(T, X1, T))
U1_g(X, s2t_out_ga(X, T)) → U2_g(X, tree_in_g(T))
tree_in_g(nil) → U3_g(true_in_)
true_in_ → true_out_
U3_g(true_out_) → tree_out_g(nil)
tree_in_g(X) → U4_g(X, left_in_aa(T, L))
left_in_aa(nil, nil) → left_out_aa(nil, nil)
left_in_aa(node(L, X5, X6), L) → left_out_aa(node(L, X5, X6), L)
U4_g(X, left_out_aa(T, L)) → U5_g(X, T, L, right_in_aa(T, R))
right_in_aa(nil, nil) → right_out_aa(nil, nil)
right_in_aa(node(X7, X8, R), R) → right_out_aa(node(X7, X8, R), R)
U5_g(X, T, L, right_out_aa(T, R)) → U6_g(X, R, tree_in_a(L))
tree_in_a(nil) → U3_a(true_in_)
U3_a(true_out_) → tree_out_a(nil)
tree_in_a(X) → U4_a(X, left_in_aa(T, L))
U4_a(X, left_out_aa(T, L)) → U5_a(X, T, L, right_in_aa(T, R))
U5_a(X, T, L, right_out_aa(T, R)) → U6_a(X, R, tree_in_a(L))
U6_a(X, R, tree_out_a(L)) → U7_a(X, tree_in_a(R))
U7_a(X, tree_out_a(R)) → tree_out_a(X)
U6_g(X, R, tree_out_a(L)) → U7_g(X, tree_in_a(R))
U7_g(X, tree_out_a(R)) → tree_out_g(X)
U2_g(X, tree_out_g(T)) → goal_out_g(X)
GOAL_IN_G(X) → U1_G(X, s2t_in_ga(X, T))
GOAL_IN_G(X) → S2T_IN_GA(X, T)
S2T_IN_GA(0, L) → U8_GA(L, eq_in_ag(L, nil))
S2T_IN_GA(0, L) → EQ_IN_AG(L, nil)
S2T_IN_GA(X, node(T, X1, T)) → U9_GA(X, T, X1, p_in_ga(X, P))
S2T_IN_GA(X, node(T, X1, T)) → P_IN_GA(X, P)
U9_GA(X, T, X1, p_out_ga(X, P)) → U10_GA(X, T, X1, s2t_in_ga(P, T))
U9_GA(X, T, X1, p_out_ga(X, P)) → S2T_IN_GA(P, T)
S2T_IN_GA(X, node(nil, X2, T)) → U11_GA(X, X2, T, p_in_ga(X, P))
S2T_IN_GA(X, node(nil, X2, T)) → P_IN_GA(X, P)
U11_GA(X, X2, T, p_out_ga(X, P)) → U12_GA(X, X2, T, s2t_in_ga(P, T))
U11_GA(X, X2, T, p_out_ga(X, P)) → S2T_IN_GA(P, T)
S2T_IN_GA(X, node(T, X3, nil)) → U13_GA(X, T, X3, p_in_ga(X, P))
S2T_IN_GA(X, node(T, X3, nil)) → P_IN_GA(X, P)
U13_GA(X, T, X3, p_out_ga(X, P)) → U14_GA(X, T, X3, s2t_in_ga(P, T))
U13_GA(X, T, X3, p_out_ga(X, P)) → S2T_IN_GA(P, T)
U1_G(X, s2t_out_ga(X, T)) → U2_G(X, tree_in_g(T))
U1_G(X, s2t_out_ga(X, T)) → TREE_IN_G(T)
TREE_IN_G(nil) → U3_G(true_in_)
TREE_IN_G(nil) → TRUE_IN_
TREE_IN_G(X) → U4_G(X, left_in_aa(T, L))
TREE_IN_G(X) → LEFT_IN_AA(T, L)
U4_G(X, left_out_aa(T, L)) → U5_G(X, T, L, right_in_aa(T, R))
U4_G(X, left_out_aa(T, L)) → RIGHT_IN_AA(T, R)
U5_G(X, T, L, right_out_aa(T, R)) → U6_G(X, R, tree_in_a(L))
U5_G(X, T, L, right_out_aa(T, R)) → TREE_IN_A(L)
TREE_IN_A(nil) → U3_A(true_in_)
TREE_IN_A(nil) → TRUE_IN_
TREE_IN_A(X) → U4_A(X, left_in_aa(T, L))
TREE_IN_A(X) → LEFT_IN_AA(T, L)
U4_A(X, left_out_aa(T, L)) → U5_A(X, T, L, right_in_aa(T, R))
U4_A(X, left_out_aa(T, L)) → RIGHT_IN_AA(T, R)
U5_A(X, T, L, right_out_aa(T, R)) → U6_A(X, R, tree_in_a(L))
U5_A(X, T, L, right_out_aa(T, R)) → TREE_IN_A(L)
U6_A(X, R, tree_out_a(L)) → U7_A(X, tree_in_a(R))
U6_A(X, R, tree_out_a(L)) → TREE_IN_A(R)
U6_G(X, R, tree_out_a(L)) → U7_G(X, tree_in_a(R))
U6_G(X, R, tree_out_a(L)) → TREE_IN_A(R)
goal_in_g(X) → U1_g(X, s2t_in_ga(X, T))
s2t_in_ga(0, L) → U8_ga(L, eq_in_ag(L, nil))
eq_in_ag(X, X) → eq_out_ag(X, X)
U8_ga(L, eq_out_ag(L, nil)) → s2t_out_ga(0, L)
s2t_in_ga(X, node(T, X1, T)) → U9_ga(X, T, X1, p_in_ga(X, P))
p_in_ga(0, 0) → p_out_ga(0, 0)
p_in_ga(s(X), X) → p_out_ga(s(X), X)
U9_ga(X, T, X1, p_out_ga(X, P)) → U10_ga(X, T, X1, s2t_in_ga(P, T))
s2t_in_ga(X, node(nil, X2, T)) → U11_ga(X, X2, T, p_in_ga(X, P))
U11_ga(X, X2, T, p_out_ga(X, P)) → U12_ga(X, X2, T, s2t_in_ga(P, T))
s2t_in_ga(X, node(T, X3, nil)) → U13_ga(X, T, X3, p_in_ga(X, P))
U13_ga(X, T, X3, p_out_ga(X, P)) → U14_ga(X, T, X3, s2t_in_ga(P, T))
s2t_in_ga(X, node(nil, X4, nil)) → s2t_out_ga(X, node(nil, X4, nil))
U14_ga(X, T, X3, s2t_out_ga(P, T)) → s2t_out_ga(X, node(T, X3, nil))
U12_ga(X, X2, T, s2t_out_ga(P, T)) → s2t_out_ga(X, node(nil, X2, T))
U10_ga(X, T, X1, s2t_out_ga(P, T)) → s2t_out_ga(X, node(T, X1, T))
U1_g(X, s2t_out_ga(X, T)) → U2_g(X, tree_in_g(T))
tree_in_g(nil) → U3_g(true_in_)
true_in_ → true_out_
U3_g(true_out_) → tree_out_g(nil)
tree_in_g(X) → U4_g(X, left_in_aa(T, L))
left_in_aa(nil, nil) → left_out_aa(nil, nil)
left_in_aa(node(L, X5, X6), L) → left_out_aa(node(L, X5, X6), L)
U4_g(X, left_out_aa(T, L)) → U5_g(X, T, L, right_in_aa(T, R))
right_in_aa(nil, nil) → right_out_aa(nil, nil)
right_in_aa(node(X7, X8, R), R) → right_out_aa(node(X7, X8, R), R)
U5_g(X, T, L, right_out_aa(T, R)) → U6_g(X, R, tree_in_a(L))
tree_in_a(nil) → U3_a(true_in_)
U3_a(true_out_) → tree_out_a(nil)
tree_in_a(X) → U4_a(X, left_in_aa(T, L))
U4_a(X, left_out_aa(T, L)) → U5_a(X, T, L, right_in_aa(T, R))
U5_a(X, T, L, right_out_aa(T, R)) → U6_a(X, R, tree_in_a(L))
U6_a(X, R, tree_out_a(L)) → U7_a(X, tree_in_a(R))
U7_a(X, tree_out_a(R)) → tree_out_a(X)
U6_g(X, R, tree_out_a(L)) → U7_g(X, tree_in_a(R))
U7_g(X, tree_out_a(R)) → tree_out_g(X)
U2_g(X, tree_out_g(T)) → goal_out_g(X)
GOAL_IN_G(X) → U1_G(X, s2t_in_ga(X, T))
GOAL_IN_G(X) → S2T_IN_GA(X, T)
S2T_IN_GA(0, L) → U8_GA(L, eq_in_ag(L, nil))
S2T_IN_GA(0, L) → EQ_IN_AG(L, nil)
S2T_IN_GA(X, node(T, X1, T)) → U9_GA(X, T, X1, p_in_ga(X, P))
S2T_IN_GA(X, node(T, X1, T)) → P_IN_GA(X, P)
U9_GA(X, T, X1, p_out_ga(X, P)) → U10_GA(X, T, X1, s2t_in_ga(P, T))
U9_GA(X, T, X1, p_out_ga(X, P)) → S2T_IN_GA(P, T)
S2T_IN_GA(X, node(nil, X2, T)) → U11_GA(X, X2, T, p_in_ga(X, P))
S2T_IN_GA(X, node(nil, X2, T)) → P_IN_GA(X, P)
U11_GA(X, X2, T, p_out_ga(X, P)) → U12_GA(X, X2, T, s2t_in_ga(P, T))
U11_GA(X, X2, T, p_out_ga(X, P)) → S2T_IN_GA(P, T)
S2T_IN_GA(X, node(T, X3, nil)) → U13_GA(X, T, X3, p_in_ga(X, P))
S2T_IN_GA(X, node(T, X3, nil)) → P_IN_GA(X, P)
U13_GA(X, T, X3, p_out_ga(X, P)) → U14_GA(X, T, X3, s2t_in_ga(P, T))
U13_GA(X, T, X3, p_out_ga(X, P)) → S2T_IN_GA(P, T)
U1_G(X, s2t_out_ga(X, T)) → U2_G(X, tree_in_g(T))
U1_G(X, s2t_out_ga(X, T)) → TREE_IN_G(T)
TREE_IN_G(nil) → U3_G(true_in_)
TREE_IN_G(nil) → TRUE_IN_
TREE_IN_G(X) → U4_G(X, left_in_aa(T, L))
TREE_IN_G(X) → LEFT_IN_AA(T, L)
U4_G(X, left_out_aa(T, L)) → U5_G(X, T, L, right_in_aa(T, R))
U4_G(X, left_out_aa(T, L)) → RIGHT_IN_AA(T, R)
U5_G(X, T, L, right_out_aa(T, R)) → U6_G(X, R, tree_in_a(L))
U5_G(X, T, L, right_out_aa(T, R)) → TREE_IN_A(L)
TREE_IN_A(nil) → U3_A(true_in_)
TREE_IN_A(nil) → TRUE_IN_
TREE_IN_A(X) → U4_A(X, left_in_aa(T, L))
TREE_IN_A(X) → LEFT_IN_AA(T, L)
U4_A(X, left_out_aa(T, L)) → U5_A(X, T, L, right_in_aa(T, R))
U4_A(X, left_out_aa(T, L)) → RIGHT_IN_AA(T, R)
U5_A(X, T, L, right_out_aa(T, R)) → U6_A(X, R, tree_in_a(L))
U5_A(X, T, L, right_out_aa(T, R)) → TREE_IN_A(L)
U6_A(X, R, tree_out_a(L)) → U7_A(X, tree_in_a(R))
U6_A(X, R, tree_out_a(L)) → TREE_IN_A(R)
U6_G(X, R, tree_out_a(L)) → U7_G(X, tree_in_a(R))
U6_G(X, R, tree_out_a(L)) → TREE_IN_A(R)
goal_in_g(X) → U1_g(X, s2t_in_ga(X, T))
s2t_in_ga(0, L) → U8_ga(L, eq_in_ag(L, nil))
eq_in_ag(X, X) → eq_out_ag(X, X)
U8_ga(L, eq_out_ag(L, nil)) → s2t_out_ga(0, L)
s2t_in_ga(X, node(T, X1, T)) → U9_ga(X, T, X1, p_in_ga(X, P))
p_in_ga(0, 0) → p_out_ga(0, 0)
p_in_ga(s(X), X) → p_out_ga(s(X), X)
U9_ga(X, T, X1, p_out_ga(X, P)) → U10_ga(X, T, X1, s2t_in_ga(P, T))
s2t_in_ga(X, node(nil, X2, T)) → U11_ga(X, X2, T, p_in_ga(X, P))
U11_ga(X, X2, T, p_out_ga(X, P)) → U12_ga(X, X2, T, s2t_in_ga(P, T))
s2t_in_ga(X, node(T, X3, nil)) → U13_ga(X, T, X3, p_in_ga(X, P))
U13_ga(X, T, X3, p_out_ga(X, P)) → U14_ga(X, T, X3, s2t_in_ga(P, T))
s2t_in_ga(X, node(nil, X4, nil)) → s2t_out_ga(X, node(nil, X4, nil))
U14_ga(X, T, X3, s2t_out_ga(P, T)) → s2t_out_ga(X, node(T, X3, nil))
U12_ga(X, X2, T, s2t_out_ga(P, T)) → s2t_out_ga(X, node(nil, X2, T))
U10_ga(X, T, X1, s2t_out_ga(P, T)) → s2t_out_ga(X, node(T, X1, T))
U1_g(X, s2t_out_ga(X, T)) → U2_g(X, tree_in_g(T))
tree_in_g(nil) → U3_g(true_in_)
true_in_ → true_out_
U3_g(true_out_) → tree_out_g(nil)
tree_in_g(X) → U4_g(X, left_in_aa(T, L))
left_in_aa(nil, nil) → left_out_aa(nil, nil)
left_in_aa(node(L, X5, X6), L) → left_out_aa(node(L, X5, X6), L)
U4_g(X, left_out_aa(T, L)) → U5_g(X, T, L, right_in_aa(T, R))
right_in_aa(nil, nil) → right_out_aa(nil, nil)
right_in_aa(node(X7, X8, R), R) → right_out_aa(node(X7, X8, R), R)
U5_g(X, T, L, right_out_aa(T, R)) → U6_g(X, R, tree_in_a(L))
tree_in_a(nil) → U3_a(true_in_)
U3_a(true_out_) → tree_out_a(nil)
tree_in_a(X) → U4_a(X, left_in_aa(T, L))
U4_a(X, left_out_aa(T, L)) → U5_a(X, T, L, right_in_aa(T, R))
U5_a(X, T, L, right_out_aa(T, R)) → U6_a(X, R, tree_in_a(L))
U6_a(X, R, tree_out_a(L)) → U7_a(X, tree_in_a(R))
U7_a(X, tree_out_a(R)) → tree_out_a(X)
U6_g(X, R, tree_out_a(L)) → U7_g(X, tree_in_a(R))
U7_g(X, tree_out_a(R)) → tree_out_g(X)
U2_g(X, tree_out_g(T)) → goal_out_g(X)
TREE_IN_A(X) → U4_A(X, left_in_aa(T, L))
U4_A(X, left_out_aa(T, L)) → U5_A(X, T, L, right_in_aa(T, R))
U5_A(X, T, L, right_out_aa(T, R)) → U6_A(X, R, tree_in_a(L))
U6_A(X, R, tree_out_a(L)) → TREE_IN_A(R)
U5_A(X, T, L, right_out_aa(T, R)) → TREE_IN_A(L)
goal_in_g(X) → U1_g(X, s2t_in_ga(X, T))
s2t_in_ga(0, L) → U8_ga(L, eq_in_ag(L, nil))
eq_in_ag(X, X) → eq_out_ag(X, X)
U8_ga(L, eq_out_ag(L, nil)) → s2t_out_ga(0, L)
s2t_in_ga(X, node(T, X1, T)) → U9_ga(X, T, X1, p_in_ga(X, P))
p_in_ga(0, 0) → p_out_ga(0, 0)
p_in_ga(s(X), X) → p_out_ga(s(X), X)
U9_ga(X, T, X1, p_out_ga(X, P)) → U10_ga(X, T, X1, s2t_in_ga(P, T))
s2t_in_ga(X, node(nil, X2, T)) → U11_ga(X, X2, T, p_in_ga(X, P))
U11_ga(X, X2, T, p_out_ga(X, P)) → U12_ga(X, X2, T, s2t_in_ga(P, T))
s2t_in_ga(X, node(T, X3, nil)) → U13_ga(X, T, X3, p_in_ga(X, P))
U13_ga(X, T, X3, p_out_ga(X, P)) → U14_ga(X, T, X3, s2t_in_ga(P, T))
s2t_in_ga(X, node(nil, X4, nil)) → s2t_out_ga(X, node(nil, X4, nil))
U14_ga(X, T, X3, s2t_out_ga(P, T)) → s2t_out_ga(X, node(T, X3, nil))
U12_ga(X, X2, T, s2t_out_ga(P, T)) → s2t_out_ga(X, node(nil, X2, T))
U10_ga(X, T, X1, s2t_out_ga(P, T)) → s2t_out_ga(X, node(T, X1, T))
U1_g(X, s2t_out_ga(X, T)) → U2_g(X, tree_in_g(T))
tree_in_g(nil) → U3_g(true_in_)
true_in_ → true_out_
U3_g(true_out_) → tree_out_g(nil)
tree_in_g(X) → U4_g(X, left_in_aa(T, L))
left_in_aa(nil, nil) → left_out_aa(nil, nil)
left_in_aa(node(L, X5, X6), L) → left_out_aa(node(L, X5, X6), L)
U4_g(X, left_out_aa(T, L)) → U5_g(X, T, L, right_in_aa(T, R))
right_in_aa(nil, nil) → right_out_aa(nil, nil)
right_in_aa(node(X7, X8, R), R) → right_out_aa(node(X7, X8, R), R)
U5_g(X, T, L, right_out_aa(T, R)) → U6_g(X, R, tree_in_a(L))
tree_in_a(nil) → U3_a(true_in_)
U3_a(true_out_) → tree_out_a(nil)
tree_in_a(X) → U4_a(X, left_in_aa(T, L))
U4_a(X, left_out_aa(T, L)) → U5_a(X, T, L, right_in_aa(T, R))
U5_a(X, T, L, right_out_aa(T, R)) → U6_a(X, R, tree_in_a(L))
U6_a(X, R, tree_out_a(L)) → U7_a(X, tree_in_a(R))
U7_a(X, tree_out_a(R)) → tree_out_a(X)
U6_g(X, R, tree_out_a(L)) → U7_g(X, tree_in_a(R))
U7_g(X, tree_out_a(R)) → tree_out_g(X)
U2_g(X, tree_out_g(T)) → goal_out_g(X)
TREE_IN_A(X) → U4_A(X, left_in_aa(T, L))
U4_A(X, left_out_aa(T, L)) → U5_A(X, T, L, right_in_aa(T, R))
U5_A(X, T, L, right_out_aa(T, R)) → U6_A(X, R, tree_in_a(L))
U6_A(X, R, tree_out_a(L)) → TREE_IN_A(R)
U5_A(X, T, L, right_out_aa(T, R)) → TREE_IN_A(L)
left_in_aa(nil, nil) → left_out_aa(nil, nil)
left_in_aa(node(L, X5, X6), L) → left_out_aa(node(L, X5, X6), L)
right_in_aa(nil, nil) → right_out_aa(nil, nil)
right_in_aa(node(X7, X8, R), R) → right_out_aa(node(X7, X8, R), R)
tree_in_a(nil) → U3_a(true_in_)
tree_in_a(X) → U4_a(X, left_in_aa(T, L))
U3_a(true_out_) → tree_out_a(nil)
U4_a(X, left_out_aa(T, L)) → U5_a(X, T, L, right_in_aa(T, R))
true_in_ → true_out_
U5_a(X, T, L, right_out_aa(T, R)) → U6_a(X, R, tree_in_a(L))
U6_a(X, R, tree_out_a(L)) → U7_a(X, tree_in_a(R))
U7_a(X, tree_out_a(R)) → tree_out_a(X)
TREE_IN_A → U4_A(left_in_aa)
U4_A(left_out_aa) → U5_A(right_in_aa)
U5_A(right_out_aa) → U6_A(tree_in_a)
U6_A(tree_out_a) → TREE_IN_A
U5_A(right_out_aa) → TREE_IN_A
left_in_aa → left_out_aa
right_in_aa → right_out_aa
tree_in_a → U3_a(true_in_)
tree_in_a → U4_a(left_in_aa)
U3_a(true_out_) → tree_out_a
U4_a(left_out_aa) → U5_a(right_in_aa)
true_in_ → true_out_
U5_a(right_out_aa) → U6_a(tree_in_a)
U6_a(tree_out_a) → U7_a(tree_in_a)
U7_a(tree_out_a) → tree_out_a
left_in_aa
right_in_aa
tree_in_a
U3_a(x0)
U4_a(x0)
true_in_
U5_a(x0)
U6_a(x0)
U7_a(x0)
TREE_IN_A → U4_A(left_out_aa)
U4_A(left_out_aa) → U5_A(right_in_aa)
U5_A(right_out_aa) → U6_A(tree_in_a)
U6_A(tree_out_a) → TREE_IN_A
U5_A(right_out_aa) → TREE_IN_A
TREE_IN_A → U4_A(left_out_aa)
left_in_aa → left_out_aa
right_in_aa → right_out_aa
tree_in_a → U3_a(true_in_)
tree_in_a → U4_a(left_in_aa)
U3_a(true_out_) → tree_out_a
U4_a(left_out_aa) → U5_a(right_in_aa)
true_in_ → true_out_
U5_a(right_out_aa) → U6_a(tree_in_a)
U6_a(tree_out_a) → U7_a(tree_in_a)
U7_a(tree_out_a) → tree_out_a
left_in_aa
right_in_aa
tree_in_a
U3_a(x0)
U4_a(x0)
true_in_
U5_a(x0)
U6_a(x0)
U7_a(x0)
U4_A(left_out_aa) → U5_A(right_out_aa)
U5_A(right_out_aa) → U6_A(tree_in_a)
U6_A(tree_out_a) → TREE_IN_A
U5_A(right_out_aa) → TREE_IN_A
TREE_IN_A → U4_A(left_out_aa)
U4_A(left_out_aa) → U5_A(right_out_aa)
left_in_aa → left_out_aa
right_in_aa → right_out_aa
tree_in_a → U3_a(true_in_)
tree_in_a → U4_a(left_in_aa)
U3_a(true_out_) → tree_out_a
U4_a(left_out_aa) → U5_a(right_in_aa)
true_in_ → true_out_
U5_a(right_out_aa) → U6_a(tree_in_a)
U6_a(tree_out_a) → U7_a(tree_in_a)
U7_a(tree_out_a) → tree_out_a
left_in_aa
right_in_aa
tree_in_a
U3_a(x0)
U4_a(x0)
true_in_
U5_a(x0)
U6_a(x0)
U7_a(x0)
U5_A(right_out_aa) → U6_A(U3_a(true_in_))
U5_A(right_out_aa) → U6_A(U4_a(left_in_aa))
U6_A(tree_out_a) → TREE_IN_A
U5_A(right_out_aa) → TREE_IN_A
TREE_IN_A → U4_A(left_out_aa)
U4_A(left_out_aa) → U5_A(right_out_aa)
U5_A(right_out_aa) → U6_A(U3_a(true_in_))
U5_A(right_out_aa) → U6_A(U4_a(left_in_aa))
left_in_aa → left_out_aa
right_in_aa → right_out_aa
tree_in_a → U3_a(true_in_)
tree_in_a → U4_a(left_in_aa)
U3_a(true_out_) → tree_out_a
U4_a(left_out_aa) → U5_a(right_in_aa)
true_in_ → true_out_
U5_a(right_out_aa) → U6_a(tree_in_a)
U6_a(tree_out_a) → U7_a(tree_in_a)
U7_a(tree_out_a) → tree_out_a
left_in_aa
right_in_aa
tree_in_a
U3_a(x0)
U4_a(x0)
true_in_
U5_a(x0)
U6_a(x0)
U7_a(x0)
U5_A(right_out_aa) → U6_A(U3_a(true_out_))
U6_A(tree_out_a) → TREE_IN_A
U5_A(right_out_aa) → TREE_IN_A
TREE_IN_A → U4_A(left_out_aa)
U4_A(left_out_aa) → U5_A(right_out_aa)
U5_A(right_out_aa) → U6_A(U4_a(left_in_aa))
U5_A(right_out_aa) → U6_A(U3_a(true_out_))
left_in_aa → left_out_aa
right_in_aa → right_out_aa
tree_in_a → U3_a(true_in_)
tree_in_a → U4_a(left_in_aa)
U3_a(true_out_) → tree_out_a
U4_a(left_out_aa) → U5_a(right_in_aa)
true_in_ → true_out_
U5_a(right_out_aa) → U6_a(tree_in_a)
U6_a(tree_out_a) → U7_a(tree_in_a)
U7_a(tree_out_a) → tree_out_a
left_in_aa
right_in_aa
tree_in_a
U3_a(x0)
U4_a(x0)
true_in_
U5_a(x0)
U6_a(x0)
U7_a(x0)
U5_A(right_out_aa) → U6_A(U4_a(left_out_aa))
U6_A(tree_out_a) → TREE_IN_A
U5_A(right_out_aa) → TREE_IN_A
TREE_IN_A → U4_A(left_out_aa)
U4_A(left_out_aa) → U5_A(right_out_aa)
U5_A(right_out_aa) → U6_A(U3_a(true_out_))
U5_A(right_out_aa) → U6_A(U4_a(left_out_aa))
left_in_aa → left_out_aa
right_in_aa → right_out_aa
tree_in_a → U3_a(true_in_)
tree_in_a → U4_a(left_in_aa)
U3_a(true_out_) → tree_out_a
U4_a(left_out_aa) → U5_a(right_in_aa)
true_in_ → true_out_
U5_a(right_out_aa) → U6_a(tree_in_a)
U6_a(tree_out_a) → U7_a(tree_in_a)
U7_a(tree_out_a) → tree_out_a
left_in_aa
right_in_aa
tree_in_a
U3_a(x0)
U4_a(x0)
true_in_
U5_a(x0)
U6_a(x0)
U7_a(x0)
U5_A(right_out_aa) → U6_A(tree_out_a)
U6_A(tree_out_a) → TREE_IN_A
U5_A(right_out_aa) → TREE_IN_A
TREE_IN_A → U4_A(left_out_aa)
U4_A(left_out_aa) → U5_A(right_out_aa)
U5_A(right_out_aa) → U6_A(U4_a(left_out_aa))
U5_A(right_out_aa) → U6_A(tree_out_a)
left_in_aa → left_out_aa
right_in_aa → right_out_aa
tree_in_a → U3_a(true_in_)
tree_in_a → U4_a(left_in_aa)
U3_a(true_out_) → tree_out_a
U4_a(left_out_aa) → U5_a(right_in_aa)
true_in_ → true_out_
U5_a(right_out_aa) → U6_a(tree_in_a)
U6_a(tree_out_a) → U7_a(tree_in_a)
U7_a(tree_out_a) → tree_out_a
left_in_aa
right_in_aa
tree_in_a
U3_a(x0)
U4_a(x0)
true_in_
U5_a(x0)
U6_a(x0)
U7_a(x0)
S2T_IN_GA(X, node(T, X1, T)) → U9_GA(X, T, X1, p_in_ga(X, P))
U9_GA(X, T, X1, p_out_ga(X, P)) → S2T_IN_GA(P, T)
S2T_IN_GA(X, node(nil, X2, T)) → U11_GA(X, X2, T, p_in_ga(X, P))
U11_GA(X, X2, T, p_out_ga(X, P)) → S2T_IN_GA(P, T)
S2T_IN_GA(X, node(T, X3, nil)) → U13_GA(X, T, X3, p_in_ga(X, P))
U13_GA(X, T, X3, p_out_ga(X, P)) → S2T_IN_GA(P, T)
goal_in_g(X) → U1_g(X, s2t_in_ga(X, T))
s2t_in_ga(0, L) → U8_ga(L, eq_in_ag(L, nil))
eq_in_ag(X, X) → eq_out_ag(X, X)
U8_ga(L, eq_out_ag(L, nil)) → s2t_out_ga(0, L)
s2t_in_ga(X, node(T, X1, T)) → U9_ga(X, T, X1, p_in_ga(X, P))
p_in_ga(0, 0) → p_out_ga(0, 0)
p_in_ga(s(X), X) → p_out_ga(s(X), X)
U9_ga(X, T, X1, p_out_ga(X, P)) → U10_ga(X, T, X1, s2t_in_ga(P, T))
s2t_in_ga(X, node(nil, X2, T)) → U11_ga(X, X2, T, p_in_ga(X, P))
U11_ga(X, X2, T, p_out_ga(X, P)) → U12_ga(X, X2, T, s2t_in_ga(P, T))
s2t_in_ga(X, node(T, X3, nil)) → U13_ga(X, T, X3, p_in_ga(X, P))
U13_ga(X, T, X3, p_out_ga(X, P)) → U14_ga(X, T, X3, s2t_in_ga(P, T))
s2t_in_ga(X, node(nil, X4, nil)) → s2t_out_ga(X, node(nil, X4, nil))
U14_ga(X, T, X3, s2t_out_ga(P, T)) → s2t_out_ga(X, node(T, X3, nil))
U12_ga(X, X2, T, s2t_out_ga(P, T)) → s2t_out_ga(X, node(nil, X2, T))
U10_ga(X, T, X1, s2t_out_ga(P, T)) → s2t_out_ga(X, node(T, X1, T))
U1_g(X, s2t_out_ga(X, T)) → U2_g(X, tree_in_g(T))
tree_in_g(nil) → U3_g(true_in_)
true_in_ → true_out_
U3_g(true_out_) → tree_out_g(nil)
tree_in_g(X) → U4_g(X, left_in_aa(T, L))
left_in_aa(nil, nil) → left_out_aa(nil, nil)
left_in_aa(node(L, X5, X6), L) → left_out_aa(node(L, X5, X6), L)
U4_g(X, left_out_aa(T, L)) → U5_g(X, T, L, right_in_aa(T, R))
right_in_aa(nil, nil) → right_out_aa(nil, nil)
right_in_aa(node(X7, X8, R), R) → right_out_aa(node(X7, X8, R), R)
U5_g(X, T, L, right_out_aa(T, R)) → U6_g(X, R, tree_in_a(L))
tree_in_a(nil) → U3_a(true_in_)
U3_a(true_out_) → tree_out_a(nil)
tree_in_a(X) → U4_a(X, left_in_aa(T, L))
U4_a(X, left_out_aa(T, L)) → U5_a(X, T, L, right_in_aa(T, R))
U5_a(X, T, L, right_out_aa(T, R)) → U6_a(X, R, tree_in_a(L))
U6_a(X, R, tree_out_a(L)) → U7_a(X, tree_in_a(R))
U7_a(X, tree_out_a(R)) → tree_out_a(X)
U6_g(X, R, tree_out_a(L)) → U7_g(X, tree_in_a(R))
U7_g(X, tree_out_a(R)) → tree_out_g(X)
U2_g(X, tree_out_g(T)) → goal_out_g(X)
S2T_IN_GA(X, node(T, X1, T)) → U9_GA(X, T, X1, p_in_ga(X, P))
U9_GA(X, T, X1, p_out_ga(X, P)) → S2T_IN_GA(P, T)
S2T_IN_GA(X, node(nil, X2, T)) → U11_GA(X, X2, T, p_in_ga(X, P))
U11_GA(X, X2, T, p_out_ga(X, P)) → S2T_IN_GA(P, T)
S2T_IN_GA(X, node(T, X3, nil)) → U13_GA(X, T, X3, p_in_ga(X, P))
U13_GA(X, T, X3, p_out_ga(X, P)) → S2T_IN_GA(P, T)
p_in_ga(0, 0) → p_out_ga(0, 0)
p_in_ga(s(X), X) → p_out_ga(s(X), X)
S2T_IN_GA(X) → U9_GA(p_in_ga(X))
U9_GA(p_out_ga(P)) → S2T_IN_GA(P)
S2T_IN_GA(X) → U11_GA(p_in_ga(X))
U11_GA(p_out_ga(P)) → S2T_IN_GA(P)
S2T_IN_GA(X) → U13_GA(p_in_ga(X))
U13_GA(p_out_ga(P)) → S2T_IN_GA(P)
p_in_ga(0) → p_out_ga(0)
p_in_ga(s(X)) → p_out_ga(X)
p_in_ga(x0)
Used ordering: POLO with Polynomial interpretation [POLO]:
p_in_ga(s(X)) → p_out_ga(X)
POL(0) = 0
POL(S2T_IN_GA(x1)) = x1
POL(U11_GA(x1)) = x1
POL(U13_GA(x1)) = x1
POL(U9_GA(x1)) = x1
POL(p_in_ga(x1)) = x1
POL(p_out_ga(x1)) = 2·x1
POL(s(x1)) = 2 + 2·x1
S2T_IN_GA(X) → U9_GA(p_in_ga(X))
U9_GA(p_out_ga(P)) → S2T_IN_GA(P)
S2T_IN_GA(X) → U11_GA(p_in_ga(X))
U11_GA(p_out_ga(P)) → S2T_IN_GA(P)
S2T_IN_GA(X) → U13_GA(p_in_ga(X))
U13_GA(p_out_ga(P)) → S2T_IN_GA(P)
p_in_ga(0) → p_out_ga(0)
p_in_ga(x0)
S2T_IN_GA(0) → U9_GA(p_out_ga(0))
U9_GA(p_out_ga(P)) → S2T_IN_GA(P)
S2T_IN_GA(X) → U11_GA(p_in_ga(X))
U11_GA(p_out_ga(P)) → S2T_IN_GA(P)
S2T_IN_GA(X) → U13_GA(p_in_ga(X))
U13_GA(p_out_ga(P)) → S2T_IN_GA(P)
S2T_IN_GA(0) → U9_GA(p_out_ga(0))
p_in_ga(0) → p_out_ga(0)
p_in_ga(x0)
S2T_IN_GA(0) → U11_GA(p_out_ga(0))
U9_GA(p_out_ga(P)) → S2T_IN_GA(P)
U11_GA(p_out_ga(P)) → S2T_IN_GA(P)
S2T_IN_GA(X) → U13_GA(p_in_ga(X))
U13_GA(p_out_ga(P)) → S2T_IN_GA(P)
S2T_IN_GA(0) → U9_GA(p_out_ga(0))
S2T_IN_GA(0) → U11_GA(p_out_ga(0))
p_in_ga(0) → p_out_ga(0)
p_in_ga(x0)
S2T_IN_GA(0) → U13_GA(p_out_ga(0))
U9_GA(p_out_ga(P)) → S2T_IN_GA(P)
U11_GA(p_out_ga(P)) → S2T_IN_GA(P)
U13_GA(p_out_ga(P)) → S2T_IN_GA(P)
S2T_IN_GA(0) → U9_GA(p_out_ga(0))
S2T_IN_GA(0) → U11_GA(p_out_ga(0))
S2T_IN_GA(0) → U13_GA(p_out_ga(0))
p_in_ga(0) → p_out_ga(0)
p_in_ga(x0)
U9_GA(p_out_ga(P)) → S2T_IN_GA(P)
U11_GA(p_out_ga(P)) → S2T_IN_GA(P)
U13_GA(p_out_ga(P)) → S2T_IN_GA(P)
S2T_IN_GA(0) → U9_GA(p_out_ga(0))
S2T_IN_GA(0) → U11_GA(p_out_ga(0))
S2T_IN_GA(0) → U13_GA(p_out_ga(0))
p_in_ga(x0)
p_in_ga(x0)
U9_GA(p_out_ga(P)) → S2T_IN_GA(P)
U11_GA(p_out_ga(P)) → S2T_IN_GA(P)
U13_GA(p_out_ga(P)) → S2T_IN_GA(P)
S2T_IN_GA(0) → U9_GA(p_out_ga(0))
S2T_IN_GA(0) → U11_GA(p_out_ga(0))
S2T_IN_GA(0) → U13_GA(p_out_ga(0))
U9_GA(p_out_ga(0)) → S2T_IN_GA(0)
U11_GA(p_out_ga(P)) → S2T_IN_GA(P)
U13_GA(p_out_ga(P)) → S2T_IN_GA(P)
S2T_IN_GA(0) → U9_GA(p_out_ga(0))
S2T_IN_GA(0) → U11_GA(p_out_ga(0))
S2T_IN_GA(0) → U13_GA(p_out_ga(0))
U9_GA(p_out_ga(0)) → S2T_IN_GA(0)
U11_GA(p_out_ga(0)) → S2T_IN_GA(0)
U13_GA(p_out_ga(P)) → S2T_IN_GA(P)
S2T_IN_GA(0) → U9_GA(p_out_ga(0))
S2T_IN_GA(0) → U11_GA(p_out_ga(0))
S2T_IN_GA(0) → U13_GA(p_out_ga(0))
U9_GA(p_out_ga(0)) → S2T_IN_GA(0)
U11_GA(p_out_ga(0)) → S2T_IN_GA(0)
U13_GA(p_out_ga(0)) → S2T_IN_GA(0)
S2T_IN_GA(0) → U9_GA(p_out_ga(0))
S2T_IN_GA(0) → U11_GA(p_out_ga(0))
S2T_IN_GA(0) → U13_GA(p_out_ga(0))
U9_GA(p_out_ga(0)) → S2T_IN_GA(0)
U11_GA(p_out_ga(0)) → S2T_IN_GA(0)
U13_GA(p_out_ga(0)) → S2T_IN_GA(0)