0 Prolog
↳1 PrologToPiTRSProof (⇐)
↳2 PiTRS
↳3 DependencyPairsProof (⇔)
↳4 PiDP
↳5 DependencyGraphProof (⇔)
↳6 AND
↳7 PiDP
↳8 UsableRulesProof (⇔)
↳9 PiDP
↳10 PiDP
↳11 UsableRulesProof (⇔)
↳12 PiDP
↳13 PiDP
↳14 UsableRulesProof (⇔)
↳15 PiDP
↳16 PrologToPiTRSProof (⇐)
↳17 PiTRS
↳18 DependencyPairsProof (⇔)
↳19 PiDP
↳20 DependencyGraphProof (⇔)
↳21 AND
↳22 PiDP
↳23 UsableRulesProof (⇔)
↳24 PiDP
↳25 PiDPToQDPProof (⇐)
↳26 QDP
↳27 QDPSizeChangeProof (⇔)
↳28 TRUE
↳29 PiDP
↳30 UsableRulesProof (⇔)
↳31 PiDP
↳32 PiDPToQDPProof (⇐)
↳33 QDP
↳34 QDPSizeChangeProof (⇔)
↳35 TRUE
↳36 PiDP
↳37 UsableRulesProof (⇔)
↳38 PiDP
↳39 PiDPToQDPProof (⇐)
↳40 QDP
↳41 QDPSizeChangeProof (⇔)
↳42 TRUE
goal_in_gaa(A, B, C) → U1_gaa(A, B, C, s2t_in_ga(A, T))
s2t_in_ga(s(X), node(T, Y, T)) → U9_ga(X, T, Y, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(nil, Y, T)) → U10_ga(X, Y, T, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(T, Y, nil)) → U11_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)
U11_ga(X, T, Y, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(T, Y, nil))
U10_ga(X, Y, T, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(nil, Y, T))
U9_ga(X, T, Y, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(T, Y, T))
U1_gaa(A, B, C, s2t_out_ga(A, T)) → U2_gaa(A, B, C, tapplast_in_gaa(T, B, C))
tapplast_in_gaa(L, X, Last) → U3_gaa(L, X, Last, tappend_in_gga(L, node(nil, X, nil), LX))
tappend_in_gga(nil, T, T) → tappend_out_gga(nil, T, T)
tappend_in_gga(node(nil, X, T2), T1, node(T1, X, T2)) → tappend_out_gga(node(nil, X, T2), T1, node(T1, X, T2))
tappend_in_gga(node(T1, X, nil), T2, node(T1, X, T2)) → tappend_out_gga(node(T1, X, nil), T2, node(T1, X, T2))
tappend_in_gga(node(T1, X, T2), T3, node(U, X, T2)) → U7_gga(T1, X, T2, T3, U, tappend_in_gga(T1, T3, U))
tappend_in_gga(node(T1, X, T2), T3, node(T1, X, U)) → U8_gga(T1, X, T2, T3, U, tappend_in_gga(T2, T3, U))
U8_gga(T1, X, T2, T3, U, tappend_out_gga(T2, T3, U)) → tappend_out_gga(node(T1, X, T2), T3, node(T1, X, U))
U7_gga(T1, X, T2, T3, U, tappend_out_gga(T1, T3, U)) → tappend_out_gga(node(T1, X, T2), T3, node(U, X, T2))
U3_gaa(L, X, Last, tappend_out_gga(L, node(nil, X, nil), LX)) → U4_gaa(L, X, Last, tlast_in_ag(Last, LX))
tlast_in_ag(X, node(nil, X, nil)) → tlast_out_ag(X, node(nil, X, nil))
tlast_in_ag(X, node(L, H, R)) → U5_ag(X, L, H, R, tlast_in_ag(X, L))
tlast_in_ag(X, node(L, H, R)) → U6_ag(X, L, H, R, tlast_in_ag(X, R))
U6_ag(X, L, H, R, tlast_out_ag(X, R)) → tlast_out_ag(X, node(L, H, R))
U5_ag(X, L, H, R, tlast_out_ag(X, L)) → tlast_out_ag(X, node(L, H, R))
U4_gaa(L, X, Last, tlast_out_ag(Last, LX)) → tapplast_out_gaa(L, X, Last)
U2_gaa(A, B, C, tapplast_out_gaa(T, B, C)) → goal_out_gaa(A, B, C)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
goal_in_gaa(A, B, C) → U1_gaa(A, B, C, s2t_in_ga(A, T))
s2t_in_ga(s(X), node(T, Y, T)) → U9_ga(X, T, Y, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(nil, Y, T)) → U10_ga(X, Y, T, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(T, Y, nil)) → U11_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)
U11_ga(X, T, Y, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(T, Y, nil))
U10_ga(X, Y, T, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(nil, Y, T))
U9_ga(X, T, Y, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(T, Y, T))
U1_gaa(A, B, C, s2t_out_ga(A, T)) → U2_gaa(A, B, C, tapplast_in_gaa(T, B, C))
tapplast_in_gaa(L, X, Last) → U3_gaa(L, X, Last, tappend_in_gga(L, node(nil, X, nil), LX))
tappend_in_gga(nil, T, T) → tappend_out_gga(nil, T, T)
tappend_in_gga(node(nil, X, T2), T1, node(T1, X, T2)) → tappend_out_gga(node(nil, X, T2), T1, node(T1, X, T2))
tappend_in_gga(node(T1, X, nil), T2, node(T1, X, T2)) → tappend_out_gga(node(T1, X, nil), T2, node(T1, X, T2))
tappend_in_gga(node(T1, X, T2), T3, node(U, X, T2)) → U7_gga(T1, X, T2, T3, U, tappend_in_gga(T1, T3, U))
tappend_in_gga(node(T1, X, T2), T3, node(T1, X, U)) → U8_gga(T1, X, T2, T3, U, tappend_in_gga(T2, T3, U))
U8_gga(T1, X, T2, T3, U, tappend_out_gga(T2, T3, U)) → tappend_out_gga(node(T1, X, T2), T3, node(T1, X, U))
U7_gga(T1, X, T2, T3, U, tappend_out_gga(T1, T3, U)) → tappend_out_gga(node(T1, X, T2), T3, node(U, X, T2))
U3_gaa(L, X, Last, tappend_out_gga(L, node(nil, X, nil), LX)) → U4_gaa(L, X, Last, tlast_in_ag(Last, LX))
tlast_in_ag(X, node(nil, X, nil)) → tlast_out_ag(X, node(nil, X, nil))
tlast_in_ag(X, node(L, H, R)) → U5_ag(X, L, H, R, tlast_in_ag(X, L))
tlast_in_ag(X, node(L, H, R)) → U6_ag(X, L, H, R, tlast_in_ag(X, R))
U6_ag(X, L, H, R, tlast_out_ag(X, R)) → tlast_out_ag(X, node(L, H, R))
U5_ag(X, L, H, R, tlast_out_ag(X, L)) → tlast_out_ag(X, node(L, H, R))
U4_gaa(L, X, Last, tlast_out_ag(Last, LX)) → tapplast_out_gaa(L, X, Last)
U2_gaa(A, B, C, tapplast_out_gaa(T, B, C)) → goal_out_gaa(A, B, C)
GOAL_IN_GAA(A, B, C) → U1_GAA(A, B, C, s2t_in_ga(A, T))
GOAL_IN_GAA(A, B, C) → S2T_IN_GA(A, T)
S2T_IN_GA(s(X), node(T, Y, T)) → U9_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)) → U10_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)) → U11_GA(X, T, Y, s2t_in_ga(X, T))
S2T_IN_GA(s(X), node(T, Y, nil)) → S2T_IN_GA(X, T)
U1_GAA(A, B, C, s2t_out_ga(A, T)) → U2_GAA(A, B, C, tapplast_in_gaa(T, B, C))
U1_GAA(A, B, C, s2t_out_ga(A, T)) → TAPPLAST_IN_GAA(T, B, C)
TAPPLAST_IN_GAA(L, X, Last) → U3_GAA(L, X, Last, tappend_in_gga(L, node(nil, X, nil), LX))
TAPPLAST_IN_GAA(L, X, Last) → TAPPEND_IN_GGA(L, node(nil, X, nil), LX)
TAPPEND_IN_GGA(node(T1, X, T2), T3, node(U, X, T2)) → U7_GGA(T1, X, T2, T3, U, tappend_in_gga(T1, T3, U))
TAPPEND_IN_GGA(node(T1, X, T2), T3, node(U, X, T2)) → TAPPEND_IN_GGA(T1, T3, U)
TAPPEND_IN_GGA(node(T1, X, T2), T3, node(T1, X, U)) → U8_GGA(T1, X, T2, T3, U, tappend_in_gga(T2, T3, U))
TAPPEND_IN_GGA(node(T1, X, T2), T3, node(T1, X, U)) → TAPPEND_IN_GGA(T2, T3, U)
U3_GAA(L, X, Last, tappend_out_gga(L, node(nil, X, nil), LX)) → U4_GAA(L, X, Last, tlast_in_ag(Last, LX))
U3_GAA(L, X, Last, tappend_out_gga(L, node(nil, X, nil), LX)) → TLAST_IN_AG(Last, LX)
TLAST_IN_AG(X, node(L, H, R)) → U5_AG(X, L, H, R, tlast_in_ag(X, L))
TLAST_IN_AG(X, node(L, H, R)) → TLAST_IN_AG(X, L)
TLAST_IN_AG(X, node(L, H, R)) → U6_AG(X, L, H, R, tlast_in_ag(X, R))
TLAST_IN_AG(X, node(L, H, R)) → TLAST_IN_AG(X, R)
goal_in_gaa(A, B, C) → U1_gaa(A, B, C, s2t_in_ga(A, T))
s2t_in_ga(s(X), node(T, Y, T)) → U9_ga(X, T, Y, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(nil, Y, T)) → U10_ga(X, Y, T, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(T, Y, nil)) → U11_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)
U11_ga(X, T, Y, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(T, Y, nil))
U10_ga(X, Y, T, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(nil, Y, T))
U9_ga(X, T, Y, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(T, Y, T))
U1_gaa(A, B, C, s2t_out_ga(A, T)) → U2_gaa(A, B, C, tapplast_in_gaa(T, B, C))
tapplast_in_gaa(L, X, Last) → U3_gaa(L, X, Last, tappend_in_gga(L, node(nil, X, nil), LX))
tappend_in_gga(nil, T, T) → tappend_out_gga(nil, T, T)
tappend_in_gga(node(nil, X, T2), T1, node(T1, X, T2)) → tappend_out_gga(node(nil, X, T2), T1, node(T1, X, T2))
tappend_in_gga(node(T1, X, nil), T2, node(T1, X, T2)) → tappend_out_gga(node(T1, X, nil), T2, node(T1, X, T2))
tappend_in_gga(node(T1, X, T2), T3, node(U, X, T2)) → U7_gga(T1, X, T2, T3, U, tappend_in_gga(T1, T3, U))
tappend_in_gga(node(T1, X, T2), T3, node(T1, X, U)) → U8_gga(T1, X, T2, T3, U, tappend_in_gga(T2, T3, U))
U8_gga(T1, X, T2, T3, U, tappend_out_gga(T2, T3, U)) → tappend_out_gga(node(T1, X, T2), T3, node(T1, X, U))
U7_gga(T1, X, T2, T3, U, tappend_out_gga(T1, T3, U)) → tappend_out_gga(node(T1, X, T2), T3, node(U, X, T2))
U3_gaa(L, X, Last, tappend_out_gga(L, node(nil, X, nil), LX)) → U4_gaa(L, X, Last, tlast_in_ag(Last, LX))
tlast_in_ag(X, node(nil, X, nil)) → tlast_out_ag(X, node(nil, X, nil))
tlast_in_ag(X, node(L, H, R)) → U5_ag(X, L, H, R, tlast_in_ag(X, L))
tlast_in_ag(X, node(L, H, R)) → U6_ag(X, L, H, R, tlast_in_ag(X, R))
U6_ag(X, L, H, R, tlast_out_ag(X, R)) → tlast_out_ag(X, node(L, H, R))
U5_ag(X, L, H, R, tlast_out_ag(X, L)) → tlast_out_ag(X, node(L, H, R))
U4_gaa(L, X, Last, tlast_out_ag(Last, LX)) → tapplast_out_gaa(L, X, Last)
U2_gaa(A, B, C, tapplast_out_gaa(T, B, C)) → goal_out_gaa(A, B, C)
GOAL_IN_GAA(A, B, C) → U1_GAA(A, B, C, s2t_in_ga(A, T))
GOAL_IN_GAA(A, B, C) → S2T_IN_GA(A, T)
S2T_IN_GA(s(X), node(T, Y, T)) → U9_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)) → U10_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)) → U11_GA(X, T, Y, s2t_in_ga(X, T))
S2T_IN_GA(s(X), node(T, Y, nil)) → S2T_IN_GA(X, T)
U1_GAA(A, B, C, s2t_out_ga(A, T)) → U2_GAA(A, B, C, tapplast_in_gaa(T, B, C))
U1_GAA(A, B, C, s2t_out_ga(A, T)) → TAPPLAST_IN_GAA(T, B, C)
TAPPLAST_IN_GAA(L, X, Last) → U3_GAA(L, X, Last, tappend_in_gga(L, node(nil, X, nil), LX))
TAPPLAST_IN_GAA(L, X, Last) → TAPPEND_IN_GGA(L, node(nil, X, nil), LX)
TAPPEND_IN_GGA(node(T1, X, T2), T3, node(U, X, T2)) → U7_GGA(T1, X, T2, T3, U, tappend_in_gga(T1, T3, U))
TAPPEND_IN_GGA(node(T1, X, T2), T3, node(U, X, T2)) → TAPPEND_IN_GGA(T1, T3, U)
TAPPEND_IN_GGA(node(T1, X, T2), T3, node(T1, X, U)) → U8_GGA(T1, X, T2, T3, U, tappend_in_gga(T2, T3, U))
TAPPEND_IN_GGA(node(T1, X, T2), T3, node(T1, X, U)) → TAPPEND_IN_GGA(T2, T3, U)
U3_GAA(L, X, Last, tappend_out_gga(L, node(nil, X, nil), LX)) → U4_GAA(L, X, Last, tlast_in_ag(Last, LX))
U3_GAA(L, X, Last, tappend_out_gga(L, node(nil, X, nil), LX)) → TLAST_IN_AG(Last, LX)
TLAST_IN_AG(X, node(L, H, R)) → U5_AG(X, L, H, R, tlast_in_ag(X, L))
TLAST_IN_AG(X, node(L, H, R)) → TLAST_IN_AG(X, L)
TLAST_IN_AG(X, node(L, H, R)) → U6_AG(X, L, H, R, tlast_in_ag(X, R))
TLAST_IN_AG(X, node(L, H, R)) → TLAST_IN_AG(X, R)
goal_in_gaa(A, B, C) → U1_gaa(A, B, C, s2t_in_ga(A, T))
s2t_in_ga(s(X), node(T, Y, T)) → U9_ga(X, T, Y, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(nil, Y, T)) → U10_ga(X, Y, T, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(T, Y, nil)) → U11_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)
U11_ga(X, T, Y, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(T, Y, nil))
U10_ga(X, Y, T, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(nil, Y, T))
U9_ga(X, T, Y, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(T, Y, T))
U1_gaa(A, B, C, s2t_out_ga(A, T)) → U2_gaa(A, B, C, tapplast_in_gaa(T, B, C))
tapplast_in_gaa(L, X, Last) → U3_gaa(L, X, Last, tappend_in_gga(L, node(nil, X, nil), LX))
tappend_in_gga(nil, T, T) → tappend_out_gga(nil, T, T)
tappend_in_gga(node(nil, X, T2), T1, node(T1, X, T2)) → tappend_out_gga(node(nil, X, T2), T1, node(T1, X, T2))
tappend_in_gga(node(T1, X, nil), T2, node(T1, X, T2)) → tappend_out_gga(node(T1, X, nil), T2, node(T1, X, T2))
tappend_in_gga(node(T1, X, T2), T3, node(U, X, T2)) → U7_gga(T1, X, T2, T3, U, tappend_in_gga(T1, T3, U))
tappend_in_gga(node(T1, X, T2), T3, node(T1, X, U)) → U8_gga(T1, X, T2, T3, U, tappend_in_gga(T2, T3, U))
U8_gga(T1, X, T2, T3, U, tappend_out_gga(T2, T3, U)) → tappend_out_gga(node(T1, X, T2), T3, node(T1, X, U))
U7_gga(T1, X, T2, T3, U, tappend_out_gga(T1, T3, U)) → tappend_out_gga(node(T1, X, T2), T3, node(U, X, T2))
U3_gaa(L, X, Last, tappend_out_gga(L, node(nil, X, nil), LX)) → U4_gaa(L, X, Last, tlast_in_ag(Last, LX))
tlast_in_ag(X, node(nil, X, nil)) → tlast_out_ag(X, node(nil, X, nil))
tlast_in_ag(X, node(L, H, R)) → U5_ag(X, L, H, R, tlast_in_ag(X, L))
tlast_in_ag(X, node(L, H, R)) → U6_ag(X, L, H, R, tlast_in_ag(X, R))
U6_ag(X, L, H, R, tlast_out_ag(X, R)) → tlast_out_ag(X, node(L, H, R))
U5_ag(X, L, H, R, tlast_out_ag(X, L)) → tlast_out_ag(X, node(L, H, R))
U4_gaa(L, X, Last, tlast_out_ag(Last, LX)) → tapplast_out_gaa(L, X, Last)
U2_gaa(A, B, C, tapplast_out_gaa(T, B, C)) → goal_out_gaa(A, B, C)
TLAST_IN_AG(X, node(L, H, R)) → TLAST_IN_AG(X, R)
TLAST_IN_AG(X, node(L, H, R)) → TLAST_IN_AG(X, L)
goal_in_gaa(A, B, C) → U1_gaa(A, B, C, s2t_in_ga(A, T))
s2t_in_ga(s(X), node(T, Y, T)) → U9_ga(X, T, Y, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(nil, Y, T)) → U10_ga(X, Y, T, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(T, Y, nil)) → U11_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)
U11_ga(X, T, Y, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(T, Y, nil))
U10_ga(X, Y, T, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(nil, Y, T))
U9_ga(X, T, Y, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(T, Y, T))
U1_gaa(A, B, C, s2t_out_ga(A, T)) → U2_gaa(A, B, C, tapplast_in_gaa(T, B, C))
tapplast_in_gaa(L, X, Last) → U3_gaa(L, X, Last, tappend_in_gga(L, node(nil, X, nil), LX))
tappend_in_gga(nil, T, T) → tappend_out_gga(nil, T, T)
tappend_in_gga(node(nil, X, T2), T1, node(T1, X, T2)) → tappend_out_gga(node(nil, X, T2), T1, node(T1, X, T2))
tappend_in_gga(node(T1, X, nil), T2, node(T1, X, T2)) → tappend_out_gga(node(T1, X, nil), T2, node(T1, X, T2))
tappend_in_gga(node(T1, X, T2), T3, node(U, X, T2)) → U7_gga(T1, X, T2, T3, U, tappend_in_gga(T1, T3, U))
tappend_in_gga(node(T1, X, T2), T3, node(T1, X, U)) → U8_gga(T1, X, T2, T3, U, tappend_in_gga(T2, T3, U))
U8_gga(T1, X, T2, T3, U, tappend_out_gga(T2, T3, U)) → tappend_out_gga(node(T1, X, T2), T3, node(T1, X, U))
U7_gga(T1, X, T2, T3, U, tappend_out_gga(T1, T3, U)) → tappend_out_gga(node(T1, X, T2), T3, node(U, X, T2))
U3_gaa(L, X, Last, tappend_out_gga(L, node(nil, X, nil), LX)) → U4_gaa(L, X, Last, tlast_in_ag(Last, LX))
tlast_in_ag(X, node(nil, X, nil)) → tlast_out_ag(X, node(nil, X, nil))
tlast_in_ag(X, node(L, H, R)) → U5_ag(X, L, H, R, tlast_in_ag(X, L))
tlast_in_ag(X, node(L, H, R)) → U6_ag(X, L, H, R, tlast_in_ag(X, R))
U6_ag(X, L, H, R, tlast_out_ag(X, R)) → tlast_out_ag(X, node(L, H, R))
U5_ag(X, L, H, R, tlast_out_ag(X, L)) → tlast_out_ag(X, node(L, H, R))
U4_gaa(L, X, Last, tlast_out_ag(Last, LX)) → tapplast_out_gaa(L, X, Last)
U2_gaa(A, B, C, tapplast_out_gaa(T, B, C)) → goal_out_gaa(A, B, C)
TLAST_IN_AG(X, node(L, H, R)) → TLAST_IN_AG(X, R)
TLAST_IN_AG(X, node(L, H, R)) → TLAST_IN_AG(X, L)
TAPPEND_IN_GGA(node(T1, X, T2), T3, node(T1, X, U)) → TAPPEND_IN_GGA(T2, T3, U)
TAPPEND_IN_GGA(node(T1, X, T2), T3, node(U, X, T2)) → TAPPEND_IN_GGA(T1, T3, U)
goal_in_gaa(A, B, C) → U1_gaa(A, B, C, s2t_in_ga(A, T))
s2t_in_ga(s(X), node(T, Y, T)) → U9_ga(X, T, Y, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(nil, Y, T)) → U10_ga(X, Y, T, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(T, Y, nil)) → U11_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)
U11_ga(X, T, Y, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(T, Y, nil))
U10_ga(X, Y, T, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(nil, Y, T))
U9_ga(X, T, Y, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(T, Y, T))
U1_gaa(A, B, C, s2t_out_ga(A, T)) → U2_gaa(A, B, C, tapplast_in_gaa(T, B, C))
tapplast_in_gaa(L, X, Last) → U3_gaa(L, X, Last, tappend_in_gga(L, node(nil, X, nil), LX))
tappend_in_gga(nil, T, T) → tappend_out_gga(nil, T, T)
tappend_in_gga(node(nil, X, T2), T1, node(T1, X, T2)) → tappend_out_gga(node(nil, X, T2), T1, node(T1, X, T2))
tappend_in_gga(node(T1, X, nil), T2, node(T1, X, T2)) → tappend_out_gga(node(T1, X, nil), T2, node(T1, X, T2))
tappend_in_gga(node(T1, X, T2), T3, node(U, X, T2)) → U7_gga(T1, X, T2, T3, U, tappend_in_gga(T1, T3, U))
tappend_in_gga(node(T1, X, T2), T3, node(T1, X, U)) → U8_gga(T1, X, T2, T3, U, tappend_in_gga(T2, T3, U))
U8_gga(T1, X, T2, T3, U, tappend_out_gga(T2, T3, U)) → tappend_out_gga(node(T1, X, T2), T3, node(T1, X, U))
U7_gga(T1, X, T2, T3, U, tappend_out_gga(T1, T3, U)) → tappend_out_gga(node(T1, X, T2), T3, node(U, X, T2))
U3_gaa(L, X, Last, tappend_out_gga(L, node(nil, X, nil), LX)) → U4_gaa(L, X, Last, tlast_in_ag(Last, LX))
tlast_in_ag(X, node(nil, X, nil)) → tlast_out_ag(X, node(nil, X, nil))
tlast_in_ag(X, node(L, H, R)) → U5_ag(X, L, H, R, tlast_in_ag(X, L))
tlast_in_ag(X, node(L, H, R)) → U6_ag(X, L, H, R, tlast_in_ag(X, R))
U6_ag(X, L, H, R, tlast_out_ag(X, R)) → tlast_out_ag(X, node(L, H, R))
U5_ag(X, L, H, R, tlast_out_ag(X, L)) → tlast_out_ag(X, node(L, H, R))
U4_gaa(L, X, Last, tlast_out_ag(Last, LX)) → tapplast_out_gaa(L, X, Last)
U2_gaa(A, B, C, tapplast_out_gaa(T, B, C)) → goal_out_gaa(A, B, C)
TAPPEND_IN_GGA(node(T1, X, T2), T3, node(T1, X, U)) → TAPPEND_IN_GGA(T2, T3, U)
TAPPEND_IN_GGA(node(T1, X, T2), T3, node(U, X, T2)) → TAPPEND_IN_GGA(T1, T3, U)
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_gaa(A, B, C) → U1_gaa(A, B, C, s2t_in_ga(A, T))
s2t_in_ga(s(X), node(T, Y, T)) → U9_ga(X, T, Y, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(nil, Y, T)) → U10_ga(X, Y, T, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(T, Y, nil)) → U11_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)
U11_ga(X, T, Y, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(T, Y, nil))
U10_ga(X, Y, T, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(nil, Y, T))
U9_ga(X, T, Y, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(T, Y, T))
U1_gaa(A, B, C, s2t_out_ga(A, T)) → U2_gaa(A, B, C, tapplast_in_gaa(T, B, C))
tapplast_in_gaa(L, X, Last) → U3_gaa(L, X, Last, tappend_in_gga(L, node(nil, X, nil), LX))
tappend_in_gga(nil, T, T) → tappend_out_gga(nil, T, T)
tappend_in_gga(node(nil, X, T2), T1, node(T1, X, T2)) → tappend_out_gga(node(nil, X, T2), T1, node(T1, X, T2))
tappend_in_gga(node(T1, X, nil), T2, node(T1, X, T2)) → tappend_out_gga(node(T1, X, nil), T2, node(T1, X, T2))
tappend_in_gga(node(T1, X, T2), T3, node(U, X, T2)) → U7_gga(T1, X, T2, T3, U, tappend_in_gga(T1, T3, U))
tappend_in_gga(node(T1, X, T2), T3, node(T1, X, U)) → U8_gga(T1, X, T2, T3, U, tappend_in_gga(T2, T3, U))
U8_gga(T1, X, T2, T3, U, tappend_out_gga(T2, T3, U)) → tappend_out_gga(node(T1, X, T2), T3, node(T1, X, U))
U7_gga(T1, X, T2, T3, U, tappend_out_gga(T1, T3, U)) → tappend_out_gga(node(T1, X, T2), T3, node(U, X, T2))
U3_gaa(L, X, Last, tappend_out_gga(L, node(nil, X, nil), LX)) → U4_gaa(L, X, Last, tlast_in_ag(Last, LX))
tlast_in_ag(X, node(nil, X, nil)) → tlast_out_ag(X, node(nil, X, nil))
tlast_in_ag(X, node(L, H, R)) → U5_ag(X, L, H, R, tlast_in_ag(X, L))
tlast_in_ag(X, node(L, H, R)) → U6_ag(X, L, H, R, tlast_in_ag(X, R))
U6_ag(X, L, H, R, tlast_out_ag(X, R)) → tlast_out_ag(X, node(L, H, R))
U5_ag(X, L, H, R, tlast_out_ag(X, L)) → tlast_out_ag(X, node(L, H, R))
U4_gaa(L, X, Last, tlast_out_ag(Last, LX)) → tapplast_out_gaa(L, X, Last)
U2_gaa(A, B, C, tapplast_out_gaa(T, B, C)) → goal_out_gaa(A, B, C)
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_gaa(A, B, C) → U1_gaa(A, B, C, s2t_in_ga(A, T))
s2t_in_ga(s(X), node(T, Y, T)) → U9_ga(X, T, Y, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(nil, Y, T)) → U10_ga(X, Y, T, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(T, Y, nil)) → U11_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)
U11_ga(X, T, Y, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(T, Y, nil))
U10_ga(X, Y, T, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(nil, Y, T))
U9_ga(X, T, Y, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(T, Y, T))
U1_gaa(A, B, C, s2t_out_ga(A, T)) → U2_gaa(A, B, C, tapplast_in_gaa(T, B, C))
tapplast_in_gaa(L, X, Last) → U3_gaa(L, X, Last, tappend_in_gga(L, node(nil, X, nil), LX))
tappend_in_gga(nil, T, T) → tappend_out_gga(nil, T, T)
tappend_in_gga(node(nil, X, T2), T1, node(T1, X, T2)) → tappend_out_gga(node(nil, X, T2), T1, node(T1, X, T2))
tappend_in_gga(node(T1, X, nil), T2, node(T1, X, T2)) → tappend_out_gga(node(T1, X, nil), T2, node(T1, X, T2))
tappend_in_gga(node(T1, X, T2), T3, node(U, X, T2)) → U7_gga(T1, X, T2, T3, U, tappend_in_gga(T1, T3, U))
tappend_in_gga(node(T1, X, T2), T3, node(T1, X, U)) → U8_gga(T1, X, T2, T3, U, tappend_in_gga(T2, T3, U))
U8_gga(T1, X, T2, T3, U, tappend_out_gga(T2, T3, U)) → tappend_out_gga(node(T1, X, T2), T3, node(T1, X, U))
U7_gga(T1, X, T2, T3, U, tappend_out_gga(T1, T3, U)) → tappend_out_gga(node(T1, X, T2), T3, node(U, X, T2))
U3_gaa(L, X, Last, tappend_out_gga(L, node(nil, X, nil), LX)) → U4_gaa(L, X, Last, tlast_in_ag(Last, LX))
tlast_in_ag(X, node(nil, X, nil)) → tlast_out_ag(X, node(nil, X, nil))
tlast_in_ag(X, node(L, H, R)) → U5_ag(X, L, H, R, tlast_in_ag(X, L))
tlast_in_ag(X, node(L, H, R)) → U6_ag(X, L, H, R, tlast_in_ag(X, R))
U6_ag(X, L, H, R, tlast_out_ag(X, R)) → tlast_out_ag(X, node(L, H, R))
U5_ag(X, L, H, R, tlast_out_ag(X, L)) → tlast_out_ag(X, node(L, H, R))
U4_gaa(L, X, Last, tlast_out_ag(Last, LX)) → tapplast_out_gaa(L, X, Last)
U2_gaa(A, B, C, tapplast_out_gaa(T, B, C)) → goal_out_gaa(A, B, C)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
goal_in_gaa(A, B, C) → U1_gaa(A, B, C, s2t_in_ga(A, T))
s2t_in_ga(s(X), node(T, Y, T)) → U9_ga(X, T, Y, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(nil, Y, T)) → U10_ga(X, Y, T, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(T, Y, nil)) → U11_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)
U11_ga(X, T, Y, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(T, Y, nil))
U10_ga(X, Y, T, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(nil, Y, T))
U9_ga(X, T, Y, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(T, Y, T))
U1_gaa(A, B, C, s2t_out_ga(A, T)) → U2_gaa(A, B, C, tapplast_in_gaa(T, B, C))
tapplast_in_gaa(L, X, Last) → U3_gaa(L, X, Last, tappend_in_gga(L, node(nil, X, nil), LX))
tappend_in_gga(nil, T, T) → tappend_out_gga(nil, T, T)
tappend_in_gga(node(nil, X, T2), T1, node(T1, X, T2)) → tappend_out_gga(node(nil, X, T2), T1, node(T1, X, T2))
tappend_in_gga(node(T1, X, nil), T2, node(T1, X, T2)) → tappend_out_gga(node(T1, X, nil), T2, node(T1, X, T2))
tappend_in_gga(node(T1, X, T2), T3, node(U, X, T2)) → U7_gga(T1, X, T2, T3, U, tappend_in_gga(T1, T3, U))
tappend_in_gga(node(T1, X, T2), T3, node(T1, X, U)) → U8_gga(T1, X, T2, T3, U, tappend_in_gga(T2, T3, U))
U8_gga(T1, X, T2, T3, U, tappend_out_gga(T2, T3, U)) → tappend_out_gga(node(T1, X, T2), T3, node(T1, X, U))
U7_gga(T1, X, T2, T3, U, tappend_out_gga(T1, T3, U)) → tappend_out_gga(node(T1, X, T2), T3, node(U, X, T2))
U3_gaa(L, X, Last, tappend_out_gga(L, node(nil, X, nil), LX)) → U4_gaa(L, X, Last, tlast_in_ag(Last, LX))
tlast_in_ag(X, node(nil, X, nil)) → tlast_out_ag(X, node(nil, X, nil))
tlast_in_ag(X, node(L, H, R)) → U5_ag(X, L, H, R, tlast_in_ag(X, L))
tlast_in_ag(X, node(L, H, R)) → U6_ag(X, L, H, R, tlast_in_ag(X, R))
U6_ag(X, L, H, R, tlast_out_ag(X, R)) → tlast_out_ag(X, node(L, H, R))
U5_ag(X, L, H, R, tlast_out_ag(X, L)) → tlast_out_ag(X, node(L, H, R))
U4_gaa(L, X, Last, tlast_out_ag(Last, LX)) → tapplast_out_gaa(L, X, Last)
U2_gaa(A, B, C, tapplast_out_gaa(T, B, C)) → goal_out_gaa(A, B, C)
GOAL_IN_GAA(A, B, C) → U1_GAA(A, B, C, s2t_in_ga(A, T))
GOAL_IN_GAA(A, B, C) → S2T_IN_GA(A, T)
S2T_IN_GA(s(X), node(T, Y, T)) → U9_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)) → U10_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)) → U11_GA(X, T, Y, s2t_in_ga(X, T))
S2T_IN_GA(s(X), node(T, Y, nil)) → S2T_IN_GA(X, T)
U1_GAA(A, B, C, s2t_out_ga(A, T)) → U2_GAA(A, B, C, tapplast_in_gaa(T, B, C))
U1_GAA(A, B, C, s2t_out_ga(A, T)) → TAPPLAST_IN_GAA(T, B, C)
TAPPLAST_IN_GAA(L, X, Last) → U3_GAA(L, X, Last, tappend_in_gga(L, node(nil, X, nil), LX))
TAPPLAST_IN_GAA(L, X, Last) → TAPPEND_IN_GGA(L, node(nil, X, nil), LX)
TAPPEND_IN_GGA(node(T1, X, T2), T3, node(U, X, T2)) → U7_GGA(T1, X, T2, T3, U, tappend_in_gga(T1, T3, U))
TAPPEND_IN_GGA(node(T1, X, T2), T3, node(U, X, T2)) → TAPPEND_IN_GGA(T1, T3, U)
TAPPEND_IN_GGA(node(T1, X, T2), T3, node(T1, X, U)) → U8_GGA(T1, X, T2, T3, U, tappend_in_gga(T2, T3, U))
TAPPEND_IN_GGA(node(T1, X, T2), T3, node(T1, X, U)) → TAPPEND_IN_GGA(T2, T3, U)
U3_GAA(L, X, Last, tappend_out_gga(L, node(nil, X, nil), LX)) → U4_GAA(L, X, Last, tlast_in_ag(Last, LX))
U3_GAA(L, X, Last, tappend_out_gga(L, node(nil, X, nil), LX)) → TLAST_IN_AG(Last, LX)
TLAST_IN_AG(X, node(L, H, R)) → U5_AG(X, L, H, R, tlast_in_ag(X, L))
TLAST_IN_AG(X, node(L, H, R)) → TLAST_IN_AG(X, L)
TLAST_IN_AG(X, node(L, H, R)) → U6_AG(X, L, H, R, tlast_in_ag(X, R))
TLAST_IN_AG(X, node(L, H, R)) → TLAST_IN_AG(X, R)
goal_in_gaa(A, B, C) → U1_gaa(A, B, C, s2t_in_ga(A, T))
s2t_in_ga(s(X), node(T, Y, T)) → U9_ga(X, T, Y, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(nil, Y, T)) → U10_ga(X, Y, T, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(T, Y, nil)) → U11_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)
U11_ga(X, T, Y, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(T, Y, nil))
U10_ga(X, Y, T, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(nil, Y, T))
U9_ga(X, T, Y, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(T, Y, T))
U1_gaa(A, B, C, s2t_out_ga(A, T)) → U2_gaa(A, B, C, tapplast_in_gaa(T, B, C))
tapplast_in_gaa(L, X, Last) → U3_gaa(L, X, Last, tappend_in_gga(L, node(nil, X, nil), LX))
tappend_in_gga(nil, T, T) → tappend_out_gga(nil, T, T)
tappend_in_gga(node(nil, X, T2), T1, node(T1, X, T2)) → tappend_out_gga(node(nil, X, T2), T1, node(T1, X, T2))
tappend_in_gga(node(T1, X, nil), T2, node(T1, X, T2)) → tappend_out_gga(node(T1, X, nil), T2, node(T1, X, T2))
tappend_in_gga(node(T1, X, T2), T3, node(U, X, T2)) → U7_gga(T1, X, T2, T3, U, tappend_in_gga(T1, T3, U))
tappend_in_gga(node(T1, X, T2), T3, node(T1, X, U)) → U8_gga(T1, X, T2, T3, U, tappend_in_gga(T2, T3, U))
U8_gga(T1, X, T2, T3, U, tappend_out_gga(T2, T3, U)) → tappend_out_gga(node(T1, X, T2), T3, node(T1, X, U))
U7_gga(T1, X, T2, T3, U, tappend_out_gga(T1, T3, U)) → tappend_out_gga(node(T1, X, T2), T3, node(U, X, T2))
U3_gaa(L, X, Last, tappend_out_gga(L, node(nil, X, nil), LX)) → U4_gaa(L, X, Last, tlast_in_ag(Last, LX))
tlast_in_ag(X, node(nil, X, nil)) → tlast_out_ag(X, node(nil, X, nil))
tlast_in_ag(X, node(L, H, R)) → U5_ag(X, L, H, R, tlast_in_ag(X, L))
tlast_in_ag(X, node(L, H, R)) → U6_ag(X, L, H, R, tlast_in_ag(X, R))
U6_ag(X, L, H, R, tlast_out_ag(X, R)) → tlast_out_ag(X, node(L, H, R))
U5_ag(X, L, H, R, tlast_out_ag(X, L)) → tlast_out_ag(X, node(L, H, R))
U4_gaa(L, X, Last, tlast_out_ag(Last, LX)) → tapplast_out_gaa(L, X, Last)
U2_gaa(A, B, C, tapplast_out_gaa(T, B, C)) → goal_out_gaa(A, B, C)
GOAL_IN_GAA(A, B, C) → U1_GAA(A, B, C, s2t_in_ga(A, T))
GOAL_IN_GAA(A, B, C) → S2T_IN_GA(A, T)
S2T_IN_GA(s(X), node(T, Y, T)) → U9_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)) → U10_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)) → U11_GA(X, T, Y, s2t_in_ga(X, T))
S2T_IN_GA(s(X), node(T, Y, nil)) → S2T_IN_GA(X, T)
U1_GAA(A, B, C, s2t_out_ga(A, T)) → U2_GAA(A, B, C, tapplast_in_gaa(T, B, C))
U1_GAA(A, B, C, s2t_out_ga(A, T)) → TAPPLAST_IN_GAA(T, B, C)
TAPPLAST_IN_GAA(L, X, Last) → U3_GAA(L, X, Last, tappend_in_gga(L, node(nil, X, nil), LX))
TAPPLAST_IN_GAA(L, X, Last) → TAPPEND_IN_GGA(L, node(nil, X, nil), LX)
TAPPEND_IN_GGA(node(T1, X, T2), T3, node(U, X, T2)) → U7_GGA(T1, X, T2, T3, U, tappend_in_gga(T1, T3, U))
TAPPEND_IN_GGA(node(T1, X, T2), T3, node(U, X, T2)) → TAPPEND_IN_GGA(T1, T3, U)
TAPPEND_IN_GGA(node(T1, X, T2), T3, node(T1, X, U)) → U8_GGA(T1, X, T2, T3, U, tappend_in_gga(T2, T3, U))
TAPPEND_IN_GGA(node(T1, X, T2), T3, node(T1, X, U)) → TAPPEND_IN_GGA(T2, T3, U)
U3_GAA(L, X, Last, tappend_out_gga(L, node(nil, X, nil), LX)) → U4_GAA(L, X, Last, tlast_in_ag(Last, LX))
U3_GAA(L, X, Last, tappend_out_gga(L, node(nil, X, nil), LX)) → TLAST_IN_AG(Last, LX)
TLAST_IN_AG(X, node(L, H, R)) → U5_AG(X, L, H, R, tlast_in_ag(X, L))
TLAST_IN_AG(X, node(L, H, R)) → TLAST_IN_AG(X, L)
TLAST_IN_AG(X, node(L, H, R)) → U6_AG(X, L, H, R, tlast_in_ag(X, R))
TLAST_IN_AG(X, node(L, H, R)) → TLAST_IN_AG(X, R)
goal_in_gaa(A, B, C) → U1_gaa(A, B, C, s2t_in_ga(A, T))
s2t_in_ga(s(X), node(T, Y, T)) → U9_ga(X, T, Y, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(nil, Y, T)) → U10_ga(X, Y, T, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(T, Y, nil)) → U11_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)
U11_ga(X, T, Y, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(T, Y, nil))
U10_ga(X, Y, T, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(nil, Y, T))
U9_ga(X, T, Y, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(T, Y, T))
U1_gaa(A, B, C, s2t_out_ga(A, T)) → U2_gaa(A, B, C, tapplast_in_gaa(T, B, C))
tapplast_in_gaa(L, X, Last) → U3_gaa(L, X, Last, tappend_in_gga(L, node(nil, X, nil), LX))
tappend_in_gga(nil, T, T) → tappend_out_gga(nil, T, T)
tappend_in_gga(node(nil, X, T2), T1, node(T1, X, T2)) → tappend_out_gga(node(nil, X, T2), T1, node(T1, X, T2))
tappend_in_gga(node(T1, X, nil), T2, node(T1, X, T2)) → tappend_out_gga(node(T1, X, nil), T2, node(T1, X, T2))
tappend_in_gga(node(T1, X, T2), T3, node(U, X, T2)) → U7_gga(T1, X, T2, T3, U, tappend_in_gga(T1, T3, U))
tappend_in_gga(node(T1, X, T2), T3, node(T1, X, U)) → U8_gga(T1, X, T2, T3, U, tappend_in_gga(T2, T3, U))
U8_gga(T1, X, T2, T3, U, tappend_out_gga(T2, T3, U)) → tappend_out_gga(node(T1, X, T2), T3, node(T1, X, U))
U7_gga(T1, X, T2, T3, U, tappend_out_gga(T1, T3, U)) → tappend_out_gga(node(T1, X, T2), T3, node(U, X, T2))
U3_gaa(L, X, Last, tappend_out_gga(L, node(nil, X, nil), LX)) → U4_gaa(L, X, Last, tlast_in_ag(Last, LX))
tlast_in_ag(X, node(nil, X, nil)) → tlast_out_ag(X, node(nil, X, nil))
tlast_in_ag(X, node(L, H, R)) → U5_ag(X, L, H, R, tlast_in_ag(X, L))
tlast_in_ag(X, node(L, H, R)) → U6_ag(X, L, H, R, tlast_in_ag(X, R))
U6_ag(X, L, H, R, tlast_out_ag(X, R)) → tlast_out_ag(X, node(L, H, R))
U5_ag(X, L, H, R, tlast_out_ag(X, L)) → tlast_out_ag(X, node(L, H, R))
U4_gaa(L, X, Last, tlast_out_ag(Last, LX)) → tapplast_out_gaa(L, X, Last)
U2_gaa(A, B, C, tapplast_out_gaa(T, B, C)) → goal_out_gaa(A, B, C)
TLAST_IN_AG(X, node(L, H, R)) → TLAST_IN_AG(X, R)
TLAST_IN_AG(X, node(L, H, R)) → TLAST_IN_AG(X, L)
goal_in_gaa(A, B, C) → U1_gaa(A, B, C, s2t_in_ga(A, T))
s2t_in_ga(s(X), node(T, Y, T)) → U9_ga(X, T, Y, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(nil, Y, T)) → U10_ga(X, Y, T, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(T, Y, nil)) → U11_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)
U11_ga(X, T, Y, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(T, Y, nil))
U10_ga(X, Y, T, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(nil, Y, T))
U9_ga(X, T, Y, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(T, Y, T))
U1_gaa(A, B, C, s2t_out_ga(A, T)) → U2_gaa(A, B, C, tapplast_in_gaa(T, B, C))
tapplast_in_gaa(L, X, Last) → U3_gaa(L, X, Last, tappend_in_gga(L, node(nil, X, nil), LX))
tappend_in_gga(nil, T, T) → tappend_out_gga(nil, T, T)
tappend_in_gga(node(nil, X, T2), T1, node(T1, X, T2)) → tappend_out_gga(node(nil, X, T2), T1, node(T1, X, T2))
tappend_in_gga(node(T1, X, nil), T2, node(T1, X, T2)) → tappend_out_gga(node(T1, X, nil), T2, node(T1, X, T2))
tappend_in_gga(node(T1, X, T2), T3, node(U, X, T2)) → U7_gga(T1, X, T2, T3, U, tappend_in_gga(T1, T3, U))
tappend_in_gga(node(T1, X, T2), T3, node(T1, X, U)) → U8_gga(T1, X, T2, T3, U, tappend_in_gga(T2, T3, U))
U8_gga(T1, X, T2, T3, U, tappend_out_gga(T2, T3, U)) → tappend_out_gga(node(T1, X, T2), T3, node(T1, X, U))
U7_gga(T1, X, T2, T3, U, tappend_out_gga(T1, T3, U)) → tappend_out_gga(node(T1, X, T2), T3, node(U, X, T2))
U3_gaa(L, X, Last, tappend_out_gga(L, node(nil, X, nil), LX)) → U4_gaa(L, X, Last, tlast_in_ag(Last, LX))
tlast_in_ag(X, node(nil, X, nil)) → tlast_out_ag(X, node(nil, X, nil))
tlast_in_ag(X, node(L, H, R)) → U5_ag(X, L, H, R, tlast_in_ag(X, L))
tlast_in_ag(X, node(L, H, R)) → U6_ag(X, L, H, R, tlast_in_ag(X, R))
U6_ag(X, L, H, R, tlast_out_ag(X, R)) → tlast_out_ag(X, node(L, H, R))
U5_ag(X, L, H, R, tlast_out_ag(X, L)) → tlast_out_ag(X, node(L, H, R))
U4_gaa(L, X, Last, tlast_out_ag(Last, LX)) → tapplast_out_gaa(L, X, Last)
U2_gaa(A, B, C, tapplast_out_gaa(T, B, C)) → goal_out_gaa(A, B, C)
TLAST_IN_AG(X, node(L, H, R)) → TLAST_IN_AG(X, R)
TLAST_IN_AG(X, node(L, H, R)) → TLAST_IN_AG(X, L)
TLAST_IN_AG(node(L, R)) → TLAST_IN_AG(R)
TLAST_IN_AG(node(L, R)) → TLAST_IN_AG(L)
From the DPs we obtained the following set of size-change graphs:
TAPPEND_IN_GGA(node(T1, X, T2), T3, node(T1, X, U)) → TAPPEND_IN_GGA(T2, T3, U)
TAPPEND_IN_GGA(node(T1, X, T2), T3, node(U, X, T2)) → TAPPEND_IN_GGA(T1, T3, U)
goal_in_gaa(A, B, C) → U1_gaa(A, B, C, s2t_in_ga(A, T))
s2t_in_ga(s(X), node(T, Y, T)) → U9_ga(X, T, Y, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(nil, Y, T)) → U10_ga(X, Y, T, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(T, Y, nil)) → U11_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)
U11_ga(X, T, Y, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(T, Y, nil))
U10_ga(X, Y, T, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(nil, Y, T))
U9_ga(X, T, Y, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(T, Y, T))
U1_gaa(A, B, C, s2t_out_ga(A, T)) → U2_gaa(A, B, C, tapplast_in_gaa(T, B, C))
tapplast_in_gaa(L, X, Last) → U3_gaa(L, X, Last, tappend_in_gga(L, node(nil, X, nil), LX))
tappend_in_gga(nil, T, T) → tappend_out_gga(nil, T, T)
tappend_in_gga(node(nil, X, T2), T1, node(T1, X, T2)) → tappend_out_gga(node(nil, X, T2), T1, node(T1, X, T2))
tappend_in_gga(node(T1, X, nil), T2, node(T1, X, T2)) → tappend_out_gga(node(T1, X, nil), T2, node(T1, X, T2))
tappend_in_gga(node(T1, X, T2), T3, node(U, X, T2)) → U7_gga(T1, X, T2, T3, U, tappend_in_gga(T1, T3, U))
tappend_in_gga(node(T1, X, T2), T3, node(T1, X, U)) → U8_gga(T1, X, T2, T3, U, tappend_in_gga(T2, T3, U))
U8_gga(T1, X, T2, T3, U, tappend_out_gga(T2, T3, U)) → tappend_out_gga(node(T1, X, T2), T3, node(T1, X, U))
U7_gga(T1, X, T2, T3, U, tappend_out_gga(T1, T3, U)) → tappend_out_gga(node(T1, X, T2), T3, node(U, X, T2))
U3_gaa(L, X, Last, tappend_out_gga(L, node(nil, X, nil), LX)) → U4_gaa(L, X, Last, tlast_in_ag(Last, LX))
tlast_in_ag(X, node(nil, X, nil)) → tlast_out_ag(X, node(nil, X, nil))
tlast_in_ag(X, node(L, H, R)) → U5_ag(X, L, H, R, tlast_in_ag(X, L))
tlast_in_ag(X, node(L, H, R)) → U6_ag(X, L, H, R, tlast_in_ag(X, R))
U6_ag(X, L, H, R, tlast_out_ag(X, R)) → tlast_out_ag(X, node(L, H, R))
U5_ag(X, L, H, R, tlast_out_ag(X, L)) → tlast_out_ag(X, node(L, H, R))
U4_gaa(L, X, Last, tlast_out_ag(Last, LX)) → tapplast_out_gaa(L, X, Last)
U2_gaa(A, B, C, tapplast_out_gaa(T, B, C)) → goal_out_gaa(A, B, C)
TAPPEND_IN_GGA(node(T1, X, T2), T3, node(T1, X, U)) → TAPPEND_IN_GGA(T2, T3, U)
TAPPEND_IN_GGA(node(T1, X, T2), T3, node(U, X, T2)) → TAPPEND_IN_GGA(T1, T3, U)
TAPPEND_IN_GGA(node(T1, T2), T3) → TAPPEND_IN_GGA(T2, T3)
TAPPEND_IN_GGA(node(T1, T2), T3) → TAPPEND_IN_GGA(T1, T3)
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_gaa(A, B, C) → U1_gaa(A, B, C, s2t_in_ga(A, T))
s2t_in_ga(s(X), node(T, Y, T)) → U9_ga(X, T, Y, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(nil, Y, T)) → U10_ga(X, Y, T, s2t_in_ga(X, T))
s2t_in_ga(s(X), node(T, Y, nil)) → U11_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)
U11_ga(X, T, Y, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(T, Y, nil))
U10_ga(X, Y, T, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(nil, Y, T))
U9_ga(X, T, Y, s2t_out_ga(X, T)) → s2t_out_ga(s(X), node(T, Y, T))
U1_gaa(A, B, C, s2t_out_ga(A, T)) → U2_gaa(A, B, C, tapplast_in_gaa(T, B, C))
tapplast_in_gaa(L, X, Last) → U3_gaa(L, X, Last, tappend_in_gga(L, node(nil, X, nil), LX))
tappend_in_gga(nil, T, T) → tappend_out_gga(nil, T, T)
tappend_in_gga(node(nil, X, T2), T1, node(T1, X, T2)) → tappend_out_gga(node(nil, X, T2), T1, node(T1, X, T2))
tappend_in_gga(node(T1, X, nil), T2, node(T1, X, T2)) → tappend_out_gga(node(T1, X, nil), T2, node(T1, X, T2))
tappend_in_gga(node(T1, X, T2), T3, node(U, X, T2)) → U7_gga(T1, X, T2, T3, U, tappend_in_gga(T1, T3, U))
tappend_in_gga(node(T1, X, T2), T3, node(T1, X, U)) → U8_gga(T1, X, T2, T3, U, tappend_in_gga(T2, T3, U))
U8_gga(T1, X, T2, T3, U, tappend_out_gga(T2, T3, U)) → tappend_out_gga(node(T1, X, T2), T3, node(T1, X, U))
U7_gga(T1, X, T2, T3, U, tappend_out_gga(T1, T3, U)) → tappend_out_gga(node(T1, X, T2), T3, node(U, X, T2))
U3_gaa(L, X, Last, tappend_out_gga(L, node(nil, X, nil), LX)) → U4_gaa(L, X, Last, tlast_in_ag(Last, LX))
tlast_in_ag(X, node(nil, X, nil)) → tlast_out_ag(X, node(nil, X, nil))
tlast_in_ag(X, node(L, H, R)) → U5_ag(X, L, H, R, tlast_in_ag(X, L))
tlast_in_ag(X, node(L, H, R)) → U6_ag(X, L, H, R, tlast_in_ag(X, R))
U6_ag(X, L, H, R, tlast_out_ag(X, R)) → tlast_out_ag(X, node(L, H, R))
U5_ag(X, L, H, R, tlast_out_ag(X, L)) → tlast_out_ag(X, node(L, H, R))
U4_gaa(L, X, Last, tlast_out_ag(Last, LX)) → tapplast_out_gaa(L, X, Last)
U2_gaa(A, B, C, tapplast_out_gaa(T, B, C)) → goal_out_gaa(A, B, C)
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: