0 Prolog
↳1 PrologToPiTRSProof (⇐)
↳2 PiTRS
↳3 DependencyPairsProof (⇔)
↳4 PiDP
↳5 DependencyGraphProof (⇔)
↳6 AND
↳7 PiDP
↳8 UsableRulesProof (⇔)
↳9 PiDP
↳10 PiDPToQDPProof (⇐)
↳11 QDP
↳12 QDPSizeChangeProof (⇔)
↳13 TRUE
↳14 PiDP
↳15 UsableRulesProof (⇔)
↳16 PiDP
↳17 PiDPToQDPProof (⇐)
↳18 QDP
↳19 PrologToPiTRSProof (⇐)
↳20 PiTRS
↳21 DependencyPairsProof (⇔)
↳22 PiDP
↳23 DependencyGraphProof (⇔)
↳24 AND
↳25 PiDP
↳26 UsableRulesProof (⇔)
↳27 PiDP
↳28 PiDPToQDPProof (⇐)
↳29 QDP
↳30 QDPSizeChangeProof (⇔)
↳31 TRUE
↳32 PiDP
↳33 UsableRulesProof (⇔)
↳34 PiDP
↳35 PiDPToQDPProof (⇐)
↳36 QDP
↳37 QDPSizeChangeProof (⇔)
↳38 TRUE
goal_in_g(X) → U6_g(X, s2t_in_ga(X, T1))
s2t_in_ga(s(X), node(T, Y, T)) → U3_ga(X, T, Y, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(nil, Y, T)) → U4_ga(X, Y, T, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(T, Y, nil)) → U5_ga(X, T, Y, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(nil, Y, nil)) → s2t_out_ga(s(X), node(nil, Y, nil))
s2t_in_ga(0, nil) → s2t_out_ga(0, nil)
U5_ga(X, T, Y, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(T, Y, nil))
U4_ga(X, Y, T, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(nil, Y, T))
U3_ga(X, T, Y, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(T, Y, T))
U6_g(X, s2t_out_ga(X, T1)) → U7_g(X, tappend_in_gaa(T1, T2, T3))
tappend_in_gaa(nil, T, T) → tappend_out_gaa(nil, T, T)
tappend_in_gaa(node(nil, X, T2), T1, node(T1, X, T2)) → tappend_out_gaa(node(nil, X, T2), T1, node(T1, X, T2))
tappend_in_gaa(node(T1, X, nil), T2, node(T1, X, T2)) → tappend_out_gaa(node(T1, X, nil), T2, node(T1, X, T2))
tappend_in_gaa(node(T1, X, T2), T3, node(U, X, T2)) → U1_gaa(T1, X, T2, T3, U, tappend_in_gaa(T1, T3, U))
tappend_in_gaa(node(T1, X, T2), T3, node(T1, X, U)) → U2_gaa(T1, X, T2, T3, U, tappend_in_gaa(T2, T3, U))
U2_gaa(T1, X, T2, T3, U, tappend_out_gaa(T2, T3, U)) → tappend_out_gaa(node(T1, X, T2), T3, node(T1, X, U))
U1_gaa(T1, X, T2, T3, U, tappend_out_gaa(T1, T3, U)) → tappend_out_gaa(node(T1, X, T2), T3, node(U, X, T2))
U7_g(X, tappend_out_gaa(T1, T2, T3)) → goal_out_g(X)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
goal_in_g(X) → U6_g(X, s2t_in_ga(X, T1))
s2t_in_ga(s(X), node(T, Y, T)) → U3_ga(X, T, Y, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(nil, Y, T)) → U4_ga(X, Y, T, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(T, Y, nil)) → U5_ga(X, T, Y, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(nil, Y, nil)) → s2t_out_ga(s(X), node(nil, Y, nil))
s2t_in_ga(0, nil) → s2t_out_ga(0, nil)
U5_ga(X, T, Y, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(T, Y, nil))
U4_ga(X, Y, T, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(nil, Y, T))
U3_ga(X, T, Y, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(T, Y, T))
U6_g(X, s2t_out_ga(X, T1)) → U7_g(X, tappend_in_gaa(T1, T2, T3))
tappend_in_gaa(nil, T, T) → tappend_out_gaa(nil, T, T)
tappend_in_gaa(node(nil, X, T2), T1, node(T1, X, T2)) → tappend_out_gaa(node(nil, X, T2), T1, node(T1, X, T2))
tappend_in_gaa(node(T1, X, nil), T2, node(T1, X, T2)) → tappend_out_gaa(node(T1, X, nil), T2, node(T1, X, T2))
tappend_in_gaa(node(T1, X, T2), T3, node(U, X, T2)) → U1_gaa(T1, X, T2, T3, U, tappend_in_gaa(T1, T3, U))
tappend_in_gaa(node(T1, X, T2), T3, node(T1, X, U)) → U2_gaa(T1, X, T2, T3, U, tappend_in_gaa(T2, T3, U))
U2_gaa(T1, X, T2, T3, U, tappend_out_gaa(T2, T3, U)) → tappend_out_gaa(node(T1, X, T2), T3, node(T1, X, U))
U1_gaa(T1, X, T2, T3, U, tappend_out_gaa(T1, T3, U)) → tappend_out_gaa(node(T1, X, T2), T3, node(U, X, T2))
U7_g(X, tappend_out_gaa(T1, T2, T3)) → goal_out_g(X)
GOAL_IN_G(X) → U6_G(X, s2t_in_ga(X, T1))
GOAL_IN_G(X) → S2T_IN_GA(X, T1)
S2T_IN_GA(s(X), node(T, Y, T)) → U3_GA(X, T, Y, s2t_in_ga(X, T))
S2T_IN_GA(s(X), node(T, Y, T)) → S2T_IN_GA(X, T)
S2T_IN_GA(s(X), node(nil, Y, T)) → U4_GA(X, Y, T, s2t_in_ga(X, T))
S2T_IN_GA(s(X), node(nil, Y, T)) → S2T_IN_GA(X, T)
S2T_IN_GA(s(X), node(T, Y, nil)) → U5_GA(X, T, Y, s2t_in_ga(X, T))
S2T_IN_GA(s(X), node(T, Y, nil)) → S2T_IN_GA(X, T)
U6_G(X, s2t_out_ga(X, T1)) → U7_G(X, tappend_in_gaa(T1, T2, T3))
U6_G(X, s2t_out_ga(X, T1)) → TAPPEND_IN_GAA(T1, T2, T3)
TAPPEND_IN_GAA(node(T1, X, T2), T3, node(U, X, T2)) → U1_GAA(T1, X, T2, T3, U, tappend_in_gaa(T1, T3, U))
TAPPEND_IN_GAA(node(T1, X, T2), T3, node(U, X, T2)) → TAPPEND_IN_GAA(T1, T3, U)
TAPPEND_IN_GAA(node(T1, X, T2), T3, node(T1, X, U)) → U2_GAA(T1, X, T2, T3, U, tappend_in_gaa(T2, T3, U))
TAPPEND_IN_GAA(node(T1, X, T2), T3, node(T1, X, U)) → TAPPEND_IN_GAA(T2, T3, U)
goal_in_g(X) → U6_g(X, s2t_in_ga(X, T1))
s2t_in_ga(s(X), node(T, Y, T)) → U3_ga(X, T, Y, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(nil, Y, T)) → U4_ga(X, Y, T, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(T, Y, nil)) → U5_ga(X, T, Y, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(nil, Y, nil)) → s2t_out_ga(s(X), node(nil, Y, nil))
s2t_in_ga(0, nil) → s2t_out_ga(0, nil)
U5_ga(X, T, Y, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(T, Y, nil))
U4_ga(X, Y, T, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(nil, Y, T))
U3_ga(X, T, Y, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(T, Y, T))
U6_g(X, s2t_out_ga(X, T1)) → U7_g(X, tappend_in_gaa(T1, T2, T3))
tappend_in_gaa(nil, T, T) → tappend_out_gaa(nil, T, T)
tappend_in_gaa(node(nil, X, T2), T1, node(T1, X, T2)) → tappend_out_gaa(node(nil, X, T2), T1, node(T1, X, T2))
tappend_in_gaa(node(T1, X, nil), T2, node(T1, X, T2)) → tappend_out_gaa(node(T1, X, nil), T2, node(T1, X, T2))
tappend_in_gaa(node(T1, X, T2), T3, node(U, X, T2)) → U1_gaa(T1, X, T2, T3, U, tappend_in_gaa(T1, T3, U))
tappend_in_gaa(node(T1, X, T2), T3, node(T1, X, U)) → U2_gaa(T1, X, T2, T3, U, tappend_in_gaa(T2, T3, U))
U2_gaa(T1, X, T2, T3, U, tappend_out_gaa(T2, T3, U)) → tappend_out_gaa(node(T1, X, T2), T3, node(T1, X, U))
U1_gaa(T1, X, T2, T3, U, tappend_out_gaa(T1, T3, U)) → tappend_out_gaa(node(T1, X, T2), T3, node(U, X, T2))
U7_g(X, tappend_out_gaa(T1, T2, T3)) → goal_out_g(X)
GOAL_IN_G(X) → U6_G(X, s2t_in_ga(X, T1))
GOAL_IN_G(X) → S2T_IN_GA(X, T1)
S2T_IN_GA(s(X), node(T, Y, T)) → U3_GA(X, T, Y, s2t_in_ga(X, T))
S2T_IN_GA(s(X), node(T, Y, T)) → S2T_IN_GA(X, T)
S2T_IN_GA(s(X), node(nil, Y, T)) → U4_GA(X, Y, T, s2t_in_ga(X, T))
S2T_IN_GA(s(X), node(nil, Y, T)) → S2T_IN_GA(X, T)
S2T_IN_GA(s(X), node(T, Y, nil)) → U5_GA(X, T, Y, s2t_in_ga(X, T))
S2T_IN_GA(s(X), node(T, Y, nil)) → S2T_IN_GA(X, T)
U6_G(X, s2t_out_ga(X, T1)) → U7_G(X, tappend_in_gaa(T1, T2, T3))
U6_G(X, s2t_out_ga(X, T1)) → TAPPEND_IN_GAA(T1, T2, T3)
TAPPEND_IN_GAA(node(T1, X, T2), T3, node(U, X, T2)) → U1_GAA(T1, X, T2, T3, U, tappend_in_gaa(T1, T3, U))
TAPPEND_IN_GAA(node(T1, X, T2), T3, node(U, X, T2)) → TAPPEND_IN_GAA(T1, T3, U)
TAPPEND_IN_GAA(node(T1, X, T2), T3, node(T1, X, U)) → U2_GAA(T1, X, T2, T3, U, tappend_in_gaa(T2, T3, U))
TAPPEND_IN_GAA(node(T1, X, T2), T3, node(T1, X, U)) → TAPPEND_IN_GAA(T2, T3, U)
goal_in_g(X) → U6_g(X, s2t_in_ga(X, T1))
s2t_in_ga(s(X), node(T, Y, T)) → U3_ga(X, T, Y, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(nil, Y, T)) → U4_ga(X, Y, T, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(T, Y, nil)) → U5_ga(X, T, Y, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(nil, Y, nil)) → s2t_out_ga(s(X), node(nil, Y, nil))
s2t_in_ga(0, nil) → s2t_out_ga(0, nil)
U5_ga(X, T, Y, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(T, Y, nil))
U4_ga(X, Y, T, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(nil, Y, T))
U3_ga(X, T, Y, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(T, Y, T))
U6_g(X, s2t_out_ga(X, T1)) → U7_g(X, tappend_in_gaa(T1, T2, T3))
tappend_in_gaa(nil, T, T) → tappend_out_gaa(nil, T, T)
tappend_in_gaa(node(nil, X, T2), T1, node(T1, X, T2)) → tappend_out_gaa(node(nil, X, T2), T1, node(T1, X, T2))
tappend_in_gaa(node(T1, X, nil), T2, node(T1, X, T2)) → tappend_out_gaa(node(T1, X, nil), T2, node(T1, X, T2))
tappend_in_gaa(node(T1, X, T2), T3, node(U, X, T2)) → U1_gaa(T1, X, T2, T3, U, tappend_in_gaa(T1, T3, U))
tappend_in_gaa(node(T1, X, T2), T3, node(T1, X, U)) → U2_gaa(T1, X, T2, T3, U, tappend_in_gaa(T2, T3, U))
U2_gaa(T1, X, T2, T3, U, tappend_out_gaa(T2, T3, U)) → tappend_out_gaa(node(T1, X, T2), T3, node(T1, X, U))
U1_gaa(T1, X, T2, T3, U, tappend_out_gaa(T1, T3, U)) → tappend_out_gaa(node(T1, X, T2), T3, node(U, X, T2))
U7_g(X, tappend_out_gaa(T1, T2, T3)) → goal_out_g(X)
TAPPEND_IN_GAA(node(T1, X, T2), T3, node(T1, X, U)) → TAPPEND_IN_GAA(T2, T3, U)
TAPPEND_IN_GAA(node(T1, X, T2), T3, node(U, X, T2)) → TAPPEND_IN_GAA(T1, T3, U)
goal_in_g(X) → U6_g(X, s2t_in_ga(X, T1))
s2t_in_ga(s(X), node(T, Y, T)) → U3_ga(X, T, Y, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(nil, Y, T)) → U4_ga(X, Y, T, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(T, Y, nil)) → U5_ga(X, T, Y, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(nil, Y, nil)) → s2t_out_ga(s(X), node(nil, Y, nil))
s2t_in_ga(0, nil) → s2t_out_ga(0, nil)
U5_ga(X, T, Y, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(T, Y, nil))
U4_ga(X, Y, T, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(nil, Y, T))
U3_ga(X, T, Y, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(T, Y, T))
U6_g(X, s2t_out_ga(X, T1)) → U7_g(X, tappend_in_gaa(T1, T2, T3))
tappend_in_gaa(nil, T, T) → tappend_out_gaa(nil, T, T)
tappend_in_gaa(node(nil, X, T2), T1, node(T1, X, T2)) → tappend_out_gaa(node(nil, X, T2), T1, node(T1, X, T2))
tappend_in_gaa(node(T1, X, nil), T2, node(T1, X, T2)) → tappend_out_gaa(node(T1, X, nil), T2, node(T1, X, T2))
tappend_in_gaa(node(T1, X, T2), T3, node(U, X, T2)) → U1_gaa(T1, X, T2, T3, U, tappend_in_gaa(T1, T3, U))
tappend_in_gaa(node(T1, X, T2), T3, node(T1, X, U)) → U2_gaa(T1, X, T2, T3, U, tappend_in_gaa(T2, T3, U))
U2_gaa(T1, X, T2, T3, U, tappend_out_gaa(T2, T3, U)) → tappend_out_gaa(node(T1, X, T2), T3, node(T1, X, U))
U1_gaa(T1, X, T2, T3, U, tappend_out_gaa(T1, T3, U)) → tappend_out_gaa(node(T1, X, T2), T3, node(U, X, T2))
U7_g(X, tappend_out_gaa(T1, T2, T3)) → goal_out_g(X)
TAPPEND_IN_GAA(node(T1, X, T2), T3, node(T1, X, U)) → TAPPEND_IN_GAA(T2, T3, U)
TAPPEND_IN_GAA(node(T1, X, T2), T3, node(U, X, T2)) → TAPPEND_IN_GAA(T1, T3, U)
TAPPEND_IN_GAA(node(T1, T2)) → TAPPEND_IN_GAA(T2)
TAPPEND_IN_GAA(node(T1, T2)) → TAPPEND_IN_GAA(T1)
From the DPs we obtained the following set of size-change graphs:
S2T_IN_GA(s(X), node(nil, Y, T)) → S2T_IN_GA(X, T)
S2T_IN_GA(s(X), node(T, Y, T)) → S2T_IN_GA(X, T)
S2T_IN_GA(s(X), node(T, Y, nil)) → S2T_IN_GA(X, T)
goal_in_g(X) → U6_g(X, s2t_in_ga(X, T1))
s2t_in_ga(s(X), node(T, Y, T)) → U3_ga(X, T, Y, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(nil, Y, T)) → U4_ga(X, Y, T, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(T, Y, nil)) → U5_ga(X, T, Y, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(nil, Y, nil)) → s2t_out_ga(s(X), node(nil, Y, nil))
s2t_in_ga(0, nil) → s2t_out_ga(0, nil)
U5_ga(X, T, Y, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(T, Y, nil))
U4_ga(X, Y, T, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(nil, Y, T))
U3_ga(X, T, Y, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(T, Y, T))
U6_g(X, s2t_out_ga(X, T1)) → U7_g(X, tappend_in_gaa(T1, T2, T3))
tappend_in_gaa(nil, T, T) → tappend_out_gaa(nil, T, T)
tappend_in_gaa(node(nil, X, T2), T1, node(T1, X, T2)) → tappend_out_gaa(node(nil, X, T2), T1, node(T1, X, T2))
tappend_in_gaa(node(T1, X, nil), T2, node(T1, X, T2)) → tappend_out_gaa(node(T1, X, nil), T2, node(T1, X, T2))
tappend_in_gaa(node(T1, X, T2), T3, node(U, X, T2)) → U1_gaa(T1, X, T2, T3, U, tappend_in_gaa(T1, T3, U))
tappend_in_gaa(node(T1, X, T2), T3, node(T1, X, U)) → U2_gaa(T1, X, T2, T3, U, tappend_in_gaa(T2, T3, U))
U2_gaa(T1, X, T2, T3, U, tappend_out_gaa(T2, T3, U)) → tappend_out_gaa(node(T1, X, T2), T3, node(T1, X, U))
U1_gaa(T1, X, T2, T3, U, tappend_out_gaa(T1, T3, U)) → tappend_out_gaa(node(T1, X, T2), T3, node(U, X, T2))
U7_g(X, tappend_out_gaa(T1, T2, T3)) → goal_out_g(X)
S2T_IN_GA(s(X), node(nil, Y, T)) → S2T_IN_GA(X, T)
S2T_IN_GA(s(X), node(T, Y, T)) → S2T_IN_GA(X, T)
S2T_IN_GA(s(X), node(T, Y, nil)) → S2T_IN_GA(X, T)
S2T_IN_GA(s(X)) → S2T_IN_GA(X)
goal_in_g(X) → U6_g(X, s2t_in_ga(X, T1))
s2t_in_ga(s(X), node(T, Y, T)) → U3_ga(X, T, Y, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(nil, Y, T)) → U4_ga(X, Y, T, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(T, Y, nil)) → U5_ga(X, T, Y, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(nil, Y, nil)) → s2t_out_ga(s(X), node(nil, Y, nil))
s2t_in_ga(0, nil) → s2t_out_ga(0, nil)
U5_ga(X, T, Y, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(T, Y, nil))
U4_ga(X, Y, T, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(nil, Y, T))
U3_ga(X, T, Y, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(T, Y, T))
U6_g(X, s2t_out_ga(X, T1)) → U7_g(X, tappend_in_gaa(T1, T2, T3))
tappend_in_gaa(nil, T, T) → tappend_out_gaa(nil, T, T)
tappend_in_gaa(node(nil, X, T2), T1, node(T1, X, T2)) → tappend_out_gaa(node(nil, X, T2), T1, node(T1, X, T2))
tappend_in_gaa(node(T1, X, nil), T2, node(T1, X, T2)) → tappend_out_gaa(node(T1, X, nil), T2, node(T1, X, T2))
tappend_in_gaa(node(T1, X, T2), T3, node(U, X, T2)) → U1_gaa(T1, X, T2, T3, U, tappend_in_gaa(T1, T3, U))
tappend_in_gaa(node(T1, X, T2), T3, node(T1, X, U)) → U2_gaa(T1, X, T2, T3, U, tappend_in_gaa(T2, T3, U))
U2_gaa(T1, X, T2, T3, U, tappend_out_gaa(T2, T3, U)) → tappend_out_gaa(node(T1, X, T2), T3, node(T1, X, U))
U1_gaa(T1, X, T2, T3, U, tappend_out_gaa(T1, T3, U)) → tappend_out_gaa(node(T1, X, T2), T3, node(U, X, T2))
U7_g(X, tappend_out_gaa(T1, T2, T3)) → goal_out_g(X)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
goal_in_g(X) → U6_g(X, s2t_in_ga(X, T1))
s2t_in_ga(s(X), node(T, Y, T)) → U3_ga(X, T, Y, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(nil, Y, T)) → U4_ga(X, Y, T, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(T, Y, nil)) → U5_ga(X, T, Y, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(nil, Y, nil)) → s2t_out_ga(s(X), node(nil, Y, nil))
s2t_in_ga(0, nil) → s2t_out_ga(0, nil)
U5_ga(X, T, Y, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(T, Y, nil))
U4_ga(X, Y, T, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(nil, Y, T))
U3_ga(X, T, Y, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(T, Y, T))
U6_g(X, s2t_out_ga(X, T1)) → U7_g(X, tappend_in_gaa(T1, T2, T3))
tappend_in_gaa(nil, T, T) → tappend_out_gaa(nil, T, T)
tappend_in_gaa(node(nil, X, T2), T1, node(T1, X, T2)) → tappend_out_gaa(node(nil, X, T2), T1, node(T1, X, T2))
tappend_in_gaa(node(T1, X, nil), T2, node(T1, X, T2)) → tappend_out_gaa(node(T1, X, nil), T2, node(T1, X, T2))
tappend_in_gaa(node(T1, X, T2), T3, node(U, X, T2)) → U1_gaa(T1, X, T2, T3, U, tappend_in_gaa(T1, T3, U))
tappend_in_gaa(node(T1, X, T2), T3, node(T1, X, U)) → U2_gaa(T1, X, T2, T3, U, tappend_in_gaa(T2, T3, U))
U2_gaa(T1, X, T2, T3, U, tappend_out_gaa(T2, T3, U)) → tappend_out_gaa(node(T1, X, T2), T3, node(T1, X, U))
U1_gaa(T1, X, T2, T3, U, tappend_out_gaa(T1, T3, U)) → tappend_out_gaa(node(T1, X, T2), T3, node(U, X, T2))
U7_g(X, tappend_out_gaa(T1, T2, T3)) → goal_out_g(X)
GOAL_IN_G(X) → U6_G(X, s2t_in_ga(X, T1))
GOAL_IN_G(X) → S2T_IN_GA(X, T1)
S2T_IN_GA(s(X), node(T, Y, T)) → U3_GA(X, T, Y, s2t_in_ga(X, T))
S2T_IN_GA(s(X), node(T, Y, T)) → S2T_IN_GA(X, T)
S2T_IN_GA(s(X), node(nil, Y, T)) → U4_GA(X, Y, T, s2t_in_ga(X, T))
S2T_IN_GA(s(X), node(nil, Y, T)) → S2T_IN_GA(X, T)
S2T_IN_GA(s(X), node(T, Y, nil)) → U5_GA(X, T, Y, s2t_in_ga(X, T))
S2T_IN_GA(s(X), node(T, Y, nil)) → S2T_IN_GA(X, T)
U6_G(X, s2t_out_ga(X, T1)) → U7_G(X, tappend_in_gaa(T1, T2, T3))
U6_G(X, s2t_out_ga(X, T1)) → TAPPEND_IN_GAA(T1, T2, T3)
TAPPEND_IN_GAA(node(T1, X, T2), T3, node(U, X, T2)) → U1_GAA(T1, X, T2, T3, U, tappend_in_gaa(T1, T3, U))
TAPPEND_IN_GAA(node(T1, X, T2), T3, node(U, X, T2)) → TAPPEND_IN_GAA(T1, T3, U)
TAPPEND_IN_GAA(node(T1, X, T2), T3, node(T1, X, U)) → U2_GAA(T1, X, T2, T3, U, tappend_in_gaa(T2, T3, U))
TAPPEND_IN_GAA(node(T1, X, T2), T3, node(T1, X, U)) → TAPPEND_IN_GAA(T2, T3, U)
goal_in_g(X) → U6_g(X, s2t_in_ga(X, T1))
s2t_in_ga(s(X), node(T, Y, T)) → U3_ga(X, T, Y, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(nil, Y, T)) → U4_ga(X, Y, T, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(T, Y, nil)) → U5_ga(X, T, Y, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(nil, Y, nil)) → s2t_out_ga(s(X), node(nil, Y, nil))
s2t_in_ga(0, nil) → s2t_out_ga(0, nil)
U5_ga(X, T, Y, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(T, Y, nil))
U4_ga(X, Y, T, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(nil, Y, T))
U3_ga(X, T, Y, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(T, Y, T))
U6_g(X, s2t_out_ga(X, T1)) → U7_g(X, tappend_in_gaa(T1, T2, T3))
tappend_in_gaa(nil, T, T) → tappend_out_gaa(nil, T, T)
tappend_in_gaa(node(nil, X, T2), T1, node(T1, X, T2)) → tappend_out_gaa(node(nil, X, T2), T1, node(T1, X, T2))
tappend_in_gaa(node(T1, X, nil), T2, node(T1, X, T2)) → tappend_out_gaa(node(T1, X, nil), T2, node(T1, X, T2))
tappend_in_gaa(node(T1, X, T2), T3, node(U, X, T2)) → U1_gaa(T1, X, T2, T3, U, tappend_in_gaa(T1, T3, U))
tappend_in_gaa(node(T1, X, T2), T3, node(T1, X, U)) → U2_gaa(T1, X, T2, T3, U, tappend_in_gaa(T2, T3, U))
U2_gaa(T1, X, T2, T3, U, tappend_out_gaa(T2, T3, U)) → tappend_out_gaa(node(T1, X, T2), T3, node(T1, X, U))
U1_gaa(T1, X, T2, T3, U, tappend_out_gaa(T1, T3, U)) → tappend_out_gaa(node(T1, X, T2), T3, node(U, X, T2))
U7_g(X, tappend_out_gaa(T1, T2, T3)) → goal_out_g(X)
GOAL_IN_G(X) → U6_G(X, s2t_in_ga(X, T1))
GOAL_IN_G(X) → S2T_IN_GA(X, T1)
S2T_IN_GA(s(X), node(T, Y, T)) → U3_GA(X, T, Y, s2t_in_ga(X, T))
S2T_IN_GA(s(X), node(T, Y, T)) → S2T_IN_GA(X, T)
S2T_IN_GA(s(X), node(nil, Y, T)) → U4_GA(X, Y, T, s2t_in_ga(X, T))
S2T_IN_GA(s(X), node(nil, Y, T)) → S2T_IN_GA(X, T)
S2T_IN_GA(s(X), node(T, Y, nil)) → U5_GA(X, T, Y, s2t_in_ga(X, T))
S2T_IN_GA(s(X), node(T, Y, nil)) → S2T_IN_GA(X, T)
U6_G(X, s2t_out_ga(X, T1)) → U7_G(X, tappend_in_gaa(T1, T2, T3))
U6_G(X, s2t_out_ga(X, T1)) → TAPPEND_IN_GAA(T1, T2, T3)
TAPPEND_IN_GAA(node(T1, X, T2), T3, node(U, X, T2)) → U1_GAA(T1, X, T2, T3, U, tappend_in_gaa(T1, T3, U))
TAPPEND_IN_GAA(node(T1, X, T2), T3, node(U, X, T2)) → TAPPEND_IN_GAA(T1, T3, U)
TAPPEND_IN_GAA(node(T1, X, T2), T3, node(T1, X, U)) → U2_GAA(T1, X, T2, T3, U, tappend_in_gaa(T2, T3, U))
TAPPEND_IN_GAA(node(T1, X, T2), T3, node(T1, X, U)) → TAPPEND_IN_GAA(T2, T3, U)
goal_in_g(X) → U6_g(X, s2t_in_ga(X, T1))
s2t_in_ga(s(X), node(T, Y, T)) → U3_ga(X, T, Y, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(nil, Y, T)) → U4_ga(X, Y, T, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(T, Y, nil)) → U5_ga(X, T, Y, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(nil, Y, nil)) → s2t_out_ga(s(X), node(nil, Y, nil))
s2t_in_ga(0, nil) → s2t_out_ga(0, nil)
U5_ga(X, T, Y, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(T, Y, nil))
U4_ga(X, Y, T, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(nil, Y, T))
U3_ga(X, T, Y, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(T, Y, T))
U6_g(X, s2t_out_ga(X, T1)) → U7_g(X, tappend_in_gaa(T1, T2, T3))
tappend_in_gaa(nil, T, T) → tappend_out_gaa(nil, T, T)
tappend_in_gaa(node(nil, X, T2), T1, node(T1, X, T2)) → tappend_out_gaa(node(nil, X, T2), T1, node(T1, X, T2))
tappend_in_gaa(node(T1, X, nil), T2, node(T1, X, T2)) → tappend_out_gaa(node(T1, X, nil), T2, node(T1, X, T2))
tappend_in_gaa(node(T1, X, T2), T3, node(U, X, T2)) → U1_gaa(T1, X, T2, T3, U, tappend_in_gaa(T1, T3, U))
tappend_in_gaa(node(T1, X, T2), T3, node(T1, X, U)) → U2_gaa(T1, X, T2, T3, U, tappend_in_gaa(T2, T3, U))
U2_gaa(T1, X, T2, T3, U, tappend_out_gaa(T2, T3, U)) → tappend_out_gaa(node(T1, X, T2), T3, node(T1, X, U))
U1_gaa(T1, X, T2, T3, U, tappend_out_gaa(T1, T3, U)) → tappend_out_gaa(node(T1, X, T2), T3, node(U, X, T2))
U7_g(X, tappend_out_gaa(T1, T2, T3)) → goal_out_g(X)
TAPPEND_IN_GAA(node(T1, X, T2), T3, node(T1, X, U)) → TAPPEND_IN_GAA(T2, T3, U)
TAPPEND_IN_GAA(node(T1, X, T2), T3, node(U, X, T2)) → TAPPEND_IN_GAA(T1, T3, U)
goal_in_g(X) → U6_g(X, s2t_in_ga(X, T1))
s2t_in_ga(s(X), node(T, Y, T)) → U3_ga(X, T, Y, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(nil, Y, T)) → U4_ga(X, Y, T, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(T, Y, nil)) → U5_ga(X, T, Y, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(nil, Y, nil)) → s2t_out_ga(s(X), node(nil, Y, nil))
s2t_in_ga(0, nil) → s2t_out_ga(0, nil)
U5_ga(X, T, Y, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(T, Y, nil))
U4_ga(X, Y, T, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(nil, Y, T))
U3_ga(X, T, Y, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(T, Y, T))
U6_g(X, s2t_out_ga(X, T1)) → U7_g(X, tappend_in_gaa(T1, T2, T3))
tappend_in_gaa(nil, T, T) → tappend_out_gaa(nil, T, T)
tappend_in_gaa(node(nil, X, T2), T1, node(T1, X, T2)) → tappend_out_gaa(node(nil, X, T2), T1, node(T1, X, T2))
tappend_in_gaa(node(T1, X, nil), T2, node(T1, X, T2)) → tappend_out_gaa(node(T1, X, nil), T2, node(T1, X, T2))
tappend_in_gaa(node(T1, X, T2), T3, node(U, X, T2)) → U1_gaa(T1, X, T2, T3, U, tappend_in_gaa(T1, T3, U))
tappend_in_gaa(node(T1, X, T2), T3, node(T1, X, U)) → U2_gaa(T1, X, T2, T3, U, tappend_in_gaa(T2, T3, U))
U2_gaa(T1, X, T2, T3, U, tappend_out_gaa(T2, T3, U)) → tappend_out_gaa(node(T1, X, T2), T3, node(T1, X, U))
U1_gaa(T1, X, T2, T3, U, tappend_out_gaa(T1, T3, U)) → tappend_out_gaa(node(T1, X, T2), T3, node(U, X, T2))
U7_g(X, tappend_out_gaa(T1, T2, T3)) → goal_out_g(X)
TAPPEND_IN_GAA(node(T1, X, T2), T3, node(T1, X, U)) → TAPPEND_IN_GAA(T2, T3, U)
TAPPEND_IN_GAA(node(T1, X, T2), T3, node(U, X, T2)) → TAPPEND_IN_GAA(T1, T3, U)
TAPPEND_IN_GAA(node(T1, T2)) → TAPPEND_IN_GAA(T2)
TAPPEND_IN_GAA(node(T1, T2)) → TAPPEND_IN_GAA(T1)
From the DPs we obtained the following set of size-change graphs:
S2T_IN_GA(s(X), node(nil, Y, T)) → S2T_IN_GA(X, T)
S2T_IN_GA(s(X), node(T, Y, T)) → S2T_IN_GA(X, T)
S2T_IN_GA(s(X), node(T, Y, nil)) → S2T_IN_GA(X, T)
goal_in_g(X) → U6_g(X, s2t_in_ga(X, T1))
s2t_in_ga(s(X), node(T, Y, T)) → U3_ga(X, T, Y, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(nil, Y, T)) → U4_ga(X, Y, T, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(T, Y, nil)) → U5_ga(X, T, Y, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(nil, Y, nil)) → s2t_out_ga(s(X), node(nil, Y, nil))
s2t_in_ga(0, nil) → s2t_out_ga(0, nil)
U5_ga(X, T, Y, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(T, Y, nil))
U4_ga(X, Y, T, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(nil, Y, T))
U3_ga(X, T, Y, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(T, Y, T))
U6_g(X, s2t_out_ga(X, T1)) → U7_g(X, tappend_in_gaa(T1, T2, T3))
tappend_in_gaa(nil, T, T) → tappend_out_gaa(nil, T, T)
tappend_in_gaa(node(nil, X, T2), T1, node(T1, X, T2)) → tappend_out_gaa(node(nil, X, T2), T1, node(T1, X, T2))
tappend_in_gaa(node(T1, X, nil), T2, node(T1, X, T2)) → tappend_out_gaa(node(T1, X, nil), T2, node(T1, X, T2))
tappend_in_gaa(node(T1, X, T2), T3, node(U, X, T2)) → U1_gaa(T1, X, T2, T3, U, tappend_in_gaa(T1, T3, U))
tappend_in_gaa(node(T1, X, T2), T3, node(T1, X, U)) → U2_gaa(T1, X, T2, T3, U, tappend_in_gaa(T2, T3, U))
U2_gaa(T1, X, T2, T3, U, tappend_out_gaa(T2, T3, U)) → tappend_out_gaa(node(T1, X, T2), T3, node(T1, X, U))
U1_gaa(T1, X, T2, T3, U, tappend_out_gaa(T1, T3, U)) → tappend_out_gaa(node(T1, X, T2), T3, node(U, X, T2))
U7_g(X, tappend_out_gaa(T1, T2, T3)) → goal_out_g(X)
S2T_IN_GA(s(X), node(nil, Y, T)) → S2T_IN_GA(X, T)
S2T_IN_GA(s(X), node(T, Y, T)) → S2T_IN_GA(X, T)
S2T_IN_GA(s(X), node(T, Y, nil)) → S2T_IN_GA(X, T)
S2T_IN_GA(s(X)) → S2T_IN_GA(X)
From the DPs we obtained the following set of size-change graphs: