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 QDPSizeChangeProof (⇔)
↳20 TRUE
↳21 PiDP
↳22 UsableRulesProof (⇔)
↳23 PiDP
↳24 PiDPToQDPProof (⇐)
↳25 QDP
↳26 UsableRulesReductionPairsProof (⇔)
↳27 QDP
↳28 PisEmptyProof (⇔)
↳29 TRUE
↳30 PrologToPiTRSProof (⇐)
↳31 PiTRS
↳32 DependencyPairsProof (⇔)
↳33 PiDP
↳34 DependencyGraphProof (⇔)
↳35 AND
↳36 PiDP
↳37 UsableRulesProof (⇔)
↳38 PiDP
↳39 PiDPToQDPProof (⇐)
↳40 QDP
↳41 QDPSizeChangeProof (⇔)
↳42 TRUE
↳43 PiDP
↳44 UsableRulesProof (⇔)
↳45 PiDP
↳46 PiDPToQDPProof (⇐)
↳47 QDP
↳48 QDPSizeChangeProof (⇔)
↳49 TRUE
↳50 PiDP
↳51 UsableRulesProof (⇔)
↳52 PiDP
↳53 PiDPToQDPProof (⇐)
↳54 QDP
sameleaves_in_gg(leaf(L), leaf(L)) → sameleaves_out_gg(leaf(L), leaf(L))
sameleaves_in_gg(tree(T1, T2), tree(S1, S2)) → U1_gg(T1, T2, S1, S2, getleave_in_ggaa(T1, T2, L, T))
getleave_in_ggaa(leaf(A), C, A, C) → getleave_out_ggaa(leaf(A), C, A, C)
getleave_in_ggaa(tree(A, B), C, L, O) → U4_ggaa(A, B, C, L, O, getleave_in_ggaa(A, tree(B, C), L, O))
U4_ggaa(A, B, C, L, O, getleave_out_ggaa(A, tree(B, C), L, O)) → getleave_out_ggaa(tree(A, B), C, L, O)
U1_gg(T1, T2, S1, S2, getleave_out_ggaa(T1, T2, L, T)) → U2_gg(T1, T2, S1, S2, T, getleave_in_ggga(S1, S2, L, S))
getleave_in_ggga(leaf(A), C, A, C) → getleave_out_ggga(leaf(A), C, A, C)
getleave_in_ggga(tree(A, B), C, L, O) → U4_ggga(A, B, C, L, O, getleave_in_ggga(A, tree(B, C), L, O))
U4_ggga(A, B, C, L, O, getleave_out_ggga(A, tree(B, C), L, O)) → getleave_out_ggga(tree(A, B), C, L, O)
U2_gg(T1, T2, S1, S2, T, getleave_out_ggga(S1, S2, L, S)) → U3_gg(T1, T2, S1, S2, sameleaves_in_gg(T, S))
U3_gg(T1, T2, S1, S2, sameleaves_out_gg(T, S)) → sameleaves_out_gg(tree(T1, T2), tree(S1, S2))
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
sameleaves_in_gg(leaf(L), leaf(L)) → sameleaves_out_gg(leaf(L), leaf(L))
sameleaves_in_gg(tree(T1, T2), tree(S1, S2)) → U1_gg(T1, T2, S1, S2, getleave_in_ggaa(T1, T2, L, T))
getleave_in_ggaa(leaf(A), C, A, C) → getleave_out_ggaa(leaf(A), C, A, C)
getleave_in_ggaa(tree(A, B), C, L, O) → U4_ggaa(A, B, C, L, O, getleave_in_ggaa(A, tree(B, C), L, O))
U4_ggaa(A, B, C, L, O, getleave_out_ggaa(A, tree(B, C), L, O)) → getleave_out_ggaa(tree(A, B), C, L, O)
U1_gg(T1, T2, S1, S2, getleave_out_ggaa(T1, T2, L, T)) → U2_gg(T1, T2, S1, S2, T, getleave_in_ggga(S1, S2, L, S))
getleave_in_ggga(leaf(A), C, A, C) → getleave_out_ggga(leaf(A), C, A, C)
getleave_in_ggga(tree(A, B), C, L, O) → U4_ggga(A, B, C, L, O, getleave_in_ggga(A, tree(B, C), L, O))
U4_ggga(A, B, C, L, O, getleave_out_ggga(A, tree(B, C), L, O)) → getleave_out_ggga(tree(A, B), C, L, O)
U2_gg(T1, T2, S1, S2, T, getleave_out_ggga(S1, S2, L, S)) → U3_gg(T1, T2, S1, S2, sameleaves_in_gg(T, S))
U3_gg(T1, T2, S1, S2, sameleaves_out_gg(T, S)) → sameleaves_out_gg(tree(T1, T2), tree(S1, S2))
SAMELEAVES_IN_GG(tree(T1, T2), tree(S1, S2)) → U1_GG(T1, T2, S1, S2, getleave_in_ggaa(T1, T2, L, T))
SAMELEAVES_IN_GG(tree(T1, T2), tree(S1, S2)) → GETLEAVE_IN_GGAA(T1, T2, L, T)
GETLEAVE_IN_GGAA(tree(A, B), C, L, O) → U4_GGAA(A, B, C, L, O, getleave_in_ggaa(A, tree(B, C), L, O))
GETLEAVE_IN_GGAA(tree(A, B), C, L, O) → GETLEAVE_IN_GGAA(A, tree(B, C), L, O)
U1_GG(T1, T2, S1, S2, getleave_out_ggaa(T1, T2, L, T)) → U2_GG(T1, T2, S1, S2, T, getleave_in_ggga(S1, S2, L, S))
U1_GG(T1, T2, S1, S2, getleave_out_ggaa(T1, T2, L, T)) → GETLEAVE_IN_GGGA(S1, S2, L, S)
GETLEAVE_IN_GGGA(tree(A, B), C, L, O) → U4_GGGA(A, B, C, L, O, getleave_in_ggga(A, tree(B, C), L, O))
GETLEAVE_IN_GGGA(tree(A, B), C, L, O) → GETLEAVE_IN_GGGA(A, tree(B, C), L, O)
U2_GG(T1, T2, S1, S2, T, getleave_out_ggga(S1, S2, L, S)) → U3_GG(T1, T2, S1, S2, sameleaves_in_gg(T, S))
U2_GG(T1, T2, S1, S2, T, getleave_out_ggga(S1, S2, L, S)) → SAMELEAVES_IN_GG(T, S)
sameleaves_in_gg(leaf(L), leaf(L)) → sameleaves_out_gg(leaf(L), leaf(L))
sameleaves_in_gg(tree(T1, T2), tree(S1, S2)) → U1_gg(T1, T2, S1, S2, getleave_in_ggaa(T1, T2, L, T))
getleave_in_ggaa(leaf(A), C, A, C) → getleave_out_ggaa(leaf(A), C, A, C)
getleave_in_ggaa(tree(A, B), C, L, O) → U4_ggaa(A, B, C, L, O, getleave_in_ggaa(A, tree(B, C), L, O))
U4_ggaa(A, B, C, L, O, getleave_out_ggaa(A, tree(B, C), L, O)) → getleave_out_ggaa(tree(A, B), C, L, O)
U1_gg(T1, T2, S1, S2, getleave_out_ggaa(T1, T2, L, T)) → U2_gg(T1, T2, S1, S2, T, getleave_in_ggga(S1, S2, L, S))
getleave_in_ggga(leaf(A), C, A, C) → getleave_out_ggga(leaf(A), C, A, C)
getleave_in_ggga(tree(A, B), C, L, O) → U4_ggga(A, B, C, L, O, getleave_in_ggga(A, tree(B, C), L, O))
U4_ggga(A, B, C, L, O, getleave_out_ggga(A, tree(B, C), L, O)) → getleave_out_ggga(tree(A, B), C, L, O)
U2_gg(T1, T2, S1, S2, T, getleave_out_ggga(S1, S2, L, S)) → U3_gg(T1, T2, S1, S2, sameleaves_in_gg(T, S))
U3_gg(T1, T2, S1, S2, sameleaves_out_gg(T, S)) → sameleaves_out_gg(tree(T1, T2), tree(S1, S2))
SAMELEAVES_IN_GG(tree(T1, T2), tree(S1, S2)) → U1_GG(T1, T2, S1, S2, getleave_in_ggaa(T1, T2, L, T))
SAMELEAVES_IN_GG(tree(T1, T2), tree(S1, S2)) → GETLEAVE_IN_GGAA(T1, T2, L, T)
GETLEAVE_IN_GGAA(tree(A, B), C, L, O) → U4_GGAA(A, B, C, L, O, getleave_in_ggaa(A, tree(B, C), L, O))
GETLEAVE_IN_GGAA(tree(A, B), C, L, O) → GETLEAVE_IN_GGAA(A, tree(B, C), L, O)
U1_GG(T1, T2, S1, S2, getleave_out_ggaa(T1, T2, L, T)) → U2_GG(T1, T2, S1, S2, T, getleave_in_ggga(S1, S2, L, S))
U1_GG(T1, T2, S1, S2, getleave_out_ggaa(T1, T2, L, T)) → GETLEAVE_IN_GGGA(S1, S2, L, S)
GETLEAVE_IN_GGGA(tree(A, B), C, L, O) → U4_GGGA(A, B, C, L, O, getleave_in_ggga(A, tree(B, C), L, O))
GETLEAVE_IN_GGGA(tree(A, B), C, L, O) → GETLEAVE_IN_GGGA(A, tree(B, C), L, O)
U2_GG(T1, T2, S1, S2, T, getleave_out_ggga(S1, S2, L, S)) → U3_GG(T1, T2, S1, S2, sameleaves_in_gg(T, S))
U2_GG(T1, T2, S1, S2, T, getleave_out_ggga(S1, S2, L, S)) → SAMELEAVES_IN_GG(T, S)
sameleaves_in_gg(leaf(L), leaf(L)) → sameleaves_out_gg(leaf(L), leaf(L))
sameleaves_in_gg(tree(T1, T2), tree(S1, S2)) → U1_gg(T1, T2, S1, S2, getleave_in_ggaa(T1, T2, L, T))
getleave_in_ggaa(leaf(A), C, A, C) → getleave_out_ggaa(leaf(A), C, A, C)
getleave_in_ggaa(tree(A, B), C, L, O) → U4_ggaa(A, B, C, L, O, getleave_in_ggaa(A, tree(B, C), L, O))
U4_ggaa(A, B, C, L, O, getleave_out_ggaa(A, tree(B, C), L, O)) → getleave_out_ggaa(tree(A, B), C, L, O)
U1_gg(T1, T2, S1, S2, getleave_out_ggaa(T1, T2, L, T)) → U2_gg(T1, T2, S1, S2, T, getleave_in_ggga(S1, S2, L, S))
getleave_in_ggga(leaf(A), C, A, C) → getleave_out_ggga(leaf(A), C, A, C)
getleave_in_ggga(tree(A, B), C, L, O) → U4_ggga(A, B, C, L, O, getleave_in_ggga(A, tree(B, C), L, O))
U4_ggga(A, B, C, L, O, getleave_out_ggga(A, tree(B, C), L, O)) → getleave_out_ggga(tree(A, B), C, L, O)
U2_gg(T1, T2, S1, S2, T, getleave_out_ggga(S1, S2, L, S)) → U3_gg(T1, T2, S1, S2, sameleaves_in_gg(T, S))
U3_gg(T1, T2, S1, S2, sameleaves_out_gg(T, S)) → sameleaves_out_gg(tree(T1, T2), tree(S1, S2))
GETLEAVE_IN_GGGA(tree(A, B), C, L, O) → GETLEAVE_IN_GGGA(A, tree(B, C), L, O)
sameleaves_in_gg(leaf(L), leaf(L)) → sameleaves_out_gg(leaf(L), leaf(L))
sameleaves_in_gg(tree(T1, T2), tree(S1, S2)) → U1_gg(T1, T2, S1, S2, getleave_in_ggaa(T1, T2, L, T))
getleave_in_ggaa(leaf(A), C, A, C) → getleave_out_ggaa(leaf(A), C, A, C)
getleave_in_ggaa(tree(A, B), C, L, O) → U4_ggaa(A, B, C, L, O, getleave_in_ggaa(A, tree(B, C), L, O))
U4_ggaa(A, B, C, L, O, getleave_out_ggaa(A, tree(B, C), L, O)) → getleave_out_ggaa(tree(A, B), C, L, O)
U1_gg(T1, T2, S1, S2, getleave_out_ggaa(T1, T2, L, T)) → U2_gg(T1, T2, S1, S2, T, getleave_in_ggga(S1, S2, L, S))
getleave_in_ggga(leaf(A), C, A, C) → getleave_out_ggga(leaf(A), C, A, C)
getleave_in_ggga(tree(A, B), C, L, O) → U4_ggga(A, B, C, L, O, getleave_in_ggga(A, tree(B, C), L, O))
U4_ggga(A, B, C, L, O, getleave_out_ggga(A, tree(B, C), L, O)) → getleave_out_ggga(tree(A, B), C, L, O)
U2_gg(T1, T2, S1, S2, T, getleave_out_ggga(S1, S2, L, S)) → U3_gg(T1, T2, S1, S2, sameleaves_in_gg(T, S))
U3_gg(T1, T2, S1, S2, sameleaves_out_gg(T, S)) → sameleaves_out_gg(tree(T1, T2), tree(S1, S2))
GETLEAVE_IN_GGGA(tree(A, B), C, L, O) → GETLEAVE_IN_GGGA(A, tree(B, C), L, O)
GETLEAVE_IN_GGGA(tree(A, B), C, L) → GETLEAVE_IN_GGGA(A, tree(B, C), L)
From the DPs we obtained the following set of size-change graphs:
GETLEAVE_IN_GGAA(tree(A, B), C, L, O) → GETLEAVE_IN_GGAA(A, tree(B, C), L, O)
sameleaves_in_gg(leaf(L), leaf(L)) → sameleaves_out_gg(leaf(L), leaf(L))
sameleaves_in_gg(tree(T1, T2), tree(S1, S2)) → U1_gg(T1, T2, S1, S2, getleave_in_ggaa(T1, T2, L, T))
getleave_in_ggaa(leaf(A), C, A, C) → getleave_out_ggaa(leaf(A), C, A, C)
getleave_in_ggaa(tree(A, B), C, L, O) → U4_ggaa(A, B, C, L, O, getleave_in_ggaa(A, tree(B, C), L, O))
U4_ggaa(A, B, C, L, O, getleave_out_ggaa(A, tree(B, C), L, O)) → getleave_out_ggaa(tree(A, B), C, L, O)
U1_gg(T1, T2, S1, S2, getleave_out_ggaa(T1, T2, L, T)) → U2_gg(T1, T2, S1, S2, T, getleave_in_ggga(S1, S2, L, S))
getleave_in_ggga(leaf(A), C, A, C) → getleave_out_ggga(leaf(A), C, A, C)
getleave_in_ggga(tree(A, B), C, L, O) → U4_ggga(A, B, C, L, O, getleave_in_ggga(A, tree(B, C), L, O))
U4_ggga(A, B, C, L, O, getleave_out_ggga(A, tree(B, C), L, O)) → getleave_out_ggga(tree(A, B), C, L, O)
U2_gg(T1, T2, S1, S2, T, getleave_out_ggga(S1, S2, L, S)) → U3_gg(T1, T2, S1, S2, sameleaves_in_gg(T, S))
U3_gg(T1, T2, S1, S2, sameleaves_out_gg(T, S)) → sameleaves_out_gg(tree(T1, T2), tree(S1, S2))
GETLEAVE_IN_GGAA(tree(A, B), C, L, O) → GETLEAVE_IN_GGAA(A, tree(B, C), L, O)
GETLEAVE_IN_GGAA(tree(A, B), C) → GETLEAVE_IN_GGAA(A, tree(B, C))
From the DPs we obtained the following set of size-change graphs:
U1_GG(T1, T2, S1, S2, getleave_out_ggaa(T1, T2, L, T)) → U2_GG(T1, T2, S1, S2, T, getleave_in_ggga(S1, S2, L, S))
U2_GG(T1, T2, S1, S2, T, getleave_out_ggga(S1, S2, L, S)) → SAMELEAVES_IN_GG(T, S)
SAMELEAVES_IN_GG(tree(T1, T2), tree(S1, S2)) → U1_GG(T1, T2, S1, S2, getleave_in_ggaa(T1, T2, L, T))
sameleaves_in_gg(leaf(L), leaf(L)) → sameleaves_out_gg(leaf(L), leaf(L))
sameleaves_in_gg(tree(T1, T2), tree(S1, S2)) → U1_gg(T1, T2, S1, S2, getleave_in_ggaa(T1, T2, L, T))
getleave_in_ggaa(leaf(A), C, A, C) → getleave_out_ggaa(leaf(A), C, A, C)
getleave_in_ggaa(tree(A, B), C, L, O) → U4_ggaa(A, B, C, L, O, getleave_in_ggaa(A, tree(B, C), L, O))
U4_ggaa(A, B, C, L, O, getleave_out_ggaa(A, tree(B, C), L, O)) → getleave_out_ggaa(tree(A, B), C, L, O)
U1_gg(T1, T2, S1, S2, getleave_out_ggaa(T1, T2, L, T)) → U2_gg(T1, T2, S1, S2, T, getleave_in_ggga(S1, S2, L, S))
getleave_in_ggga(leaf(A), C, A, C) → getleave_out_ggga(leaf(A), C, A, C)
getleave_in_ggga(tree(A, B), C, L, O) → U4_ggga(A, B, C, L, O, getleave_in_ggga(A, tree(B, C), L, O))
U4_ggga(A, B, C, L, O, getleave_out_ggga(A, tree(B, C), L, O)) → getleave_out_ggga(tree(A, B), C, L, O)
U2_gg(T1, T2, S1, S2, T, getleave_out_ggga(S1, S2, L, S)) → U3_gg(T1, T2, S1, S2, sameleaves_in_gg(T, S))
U3_gg(T1, T2, S1, S2, sameleaves_out_gg(T, S)) → sameleaves_out_gg(tree(T1, T2), tree(S1, S2))
U1_GG(T1, T2, S1, S2, getleave_out_ggaa(T1, T2, L, T)) → U2_GG(T1, T2, S1, S2, T, getleave_in_ggga(S1, S2, L, S))
U2_GG(T1, T2, S1, S2, T, getleave_out_ggga(S1, S2, L, S)) → SAMELEAVES_IN_GG(T, S)
SAMELEAVES_IN_GG(tree(T1, T2), tree(S1, S2)) → U1_GG(T1, T2, S1, S2, getleave_in_ggaa(T1, T2, L, T))
getleave_in_ggga(leaf(A), C, A, C) → getleave_out_ggga(leaf(A), C, A, C)
getleave_in_ggga(tree(A, B), C, L, O) → U4_ggga(A, B, C, L, O, getleave_in_ggga(A, tree(B, C), L, O))
getleave_in_ggaa(leaf(A), C, A, C) → getleave_out_ggaa(leaf(A), C, A, C)
getleave_in_ggaa(tree(A, B), C, L, O) → U4_ggaa(A, B, C, L, O, getleave_in_ggaa(A, tree(B, C), L, O))
U4_ggga(A, B, C, L, O, getleave_out_ggga(A, tree(B, C), L, O)) → getleave_out_ggga(tree(A, B), C, L, O)
U4_ggaa(A, B, C, L, O, getleave_out_ggaa(A, tree(B, C), L, O)) → getleave_out_ggaa(tree(A, B), C, L, O)
U1_GG(S1, S2, getleave_out_ggaa(L, T)) → U2_GG(T, getleave_in_ggga(S1, S2, L))
U2_GG(T, getleave_out_ggga(S)) → SAMELEAVES_IN_GG(T, S)
SAMELEAVES_IN_GG(tree(T1, T2), tree(S1, S2)) → U1_GG(S1, S2, getleave_in_ggaa(T1, T2))
getleave_in_ggga(leaf(A), C, A) → getleave_out_ggga(C)
getleave_in_ggga(tree(A, B), C, L) → U4_ggga(getleave_in_ggga(A, tree(B, C), L))
getleave_in_ggaa(leaf(A), C) → getleave_out_ggaa(A, C)
getleave_in_ggaa(tree(A, B), C) → U4_ggaa(getleave_in_ggaa(A, tree(B, C)))
U4_ggga(getleave_out_ggga(O)) → getleave_out_ggga(O)
U4_ggaa(getleave_out_ggaa(L, O)) → getleave_out_ggaa(L, O)
getleave_in_ggga(x0, x1, x2)
getleave_in_ggaa(x0, x1)
U4_ggga(x0)
U4_ggaa(x0)
The following rules are removed from R:
U1_GG(S1, S2, getleave_out_ggaa(L, T)) → U2_GG(T, getleave_in_ggga(S1, S2, L))
U2_GG(T, getleave_out_ggga(S)) → SAMELEAVES_IN_GG(T, S)
SAMELEAVES_IN_GG(tree(T1, T2), tree(S1, S2)) → U1_GG(S1, S2, getleave_in_ggaa(T1, T2))
Used ordering: POLO with Polynomial interpretation [POLO]:
getleave_in_ggaa(leaf(A), C) → getleave_out_ggaa(A, C)
U4_ggaa(getleave_out_ggaa(L, O)) → getleave_out_ggaa(L, O)
getleave_in_ggga(leaf(A), C, A) → getleave_out_ggga(C)
getleave_in_ggga(tree(A, B), C, L) → U4_ggga(getleave_in_ggga(A, tree(B, C), L))
U4_ggga(getleave_out_ggga(O)) → getleave_out_ggga(O)
POL(SAMELEAVES_IN_GG(x1, x2)) = x1 + x2
POL(U1_GG(x1, x2, x3)) = 2 + 2·x1 + x2 + x3
POL(U2_GG(x1, x2)) = 1 + x1 + x2
POL(U4_ggaa(x1)) = 2 + x1
POL(U4_ggga(x1)) = 1 + x1
POL(getleave_in_ggaa(x1, x2)) = 2·x1 + x2
POL(getleave_in_ggga(x1, x2, x3)) = 2·x1 + x2 + x3
POL(getleave_out_ggaa(x1, x2)) = 2 + x1 + x2
POL(getleave_out_ggga(x1)) = x1
POL(leaf(x1)) = 2 + 2·x1
POL(tree(x1, x2)) = 2 + 2·x1 + x2
getleave_in_ggaa(tree(A, B), C) → U4_ggaa(getleave_in_ggaa(A, tree(B, C)))
getleave_in_ggga(x0, x1, x2)
getleave_in_ggaa(x0, x1)
U4_ggga(x0)
U4_ggaa(x0)
sameleaves_in_gg(leaf(L), leaf(L)) → sameleaves_out_gg(leaf(L), leaf(L))
sameleaves_in_gg(tree(T1, T2), tree(S1, S2)) → U1_gg(T1, T2, S1, S2, getleave_in_ggaa(T1, T2, L, T))
getleave_in_ggaa(leaf(A), C, A, C) → getleave_out_ggaa(leaf(A), C, A, C)
getleave_in_ggaa(tree(A, B), C, L, O) → U4_ggaa(A, B, C, L, O, getleave_in_ggaa(A, tree(B, C), L, O))
U4_ggaa(A, B, C, L, O, getleave_out_ggaa(A, tree(B, C), L, O)) → getleave_out_ggaa(tree(A, B), C, L, O)
U1_gg(T1, T2, S1, S2, getleave_out_ggaa(T1, T2, L, T)) → U2_gg(T1, T2, S1, S2, T, getleave_in_ggga(S1, S2, L, S))
getleave_in_ggga(leaf(A), C, A, C) → getleave_out_ggga(leaf(A), C, A, C)
getleave_in_ggga(tree(A, B), C, L, O) → U4_ggga(A, B, C, L, O, getleave_in_ggga(A, tree(B, C), L, O))
U4_ggga(A, B, C, L, O, getleave_out_ggga(A, tree(B, C), L, O)) → getleave_out_ggga(tree(A, B), C, L, O)
U2_gg(T1, T2, S1, S2, T, getleave_out_ggga(S1, S2, L, S)) → U3_gg(T1, T2, S1, S2, sameleaves_in_gg(T, S))
U3_gg(T1, T2, S1, S2, sameleaves_out_gg(T, S)) → sameleaves_out_gg(tree(T1, T2), tree(S1, S2))
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
sameleaves_in_gg(leaf(L), leaf(L)) → sameleaves_out_gg(leaf(L), leaf(L))
sameleaves_in_gg(tree(T1, T2), tree(S1, S2)) → U1_gg(T1, T2, S1, S2, getleave_in_ggaa(T1, T2, L, T))
getleave_in_ggaa(leaf(A), C, A, C) → getleave_out_ggaa(leaf(A), C, A, C)
getleave_in_ggaa(tree(A, B), C, L, O) → U4_ggaa(A, B, C, L, O, getleave_in_ggaa(A, tree(B, C), L, O))
U4_ggaa(A, B, C, L, O, getleave_out_ggaa(A, tree(B, C), L, O)) → getleave_out_ggaa(tree(A, B), C, L, O)
U1_gg(T1, T2, S1, S2, getleave_out_ggaa(T1, T2, L, T)) → U2_gg(T1, T2, S1, S2, T, getleave_in_ggga(S1, S2, L, S))
getleave_in_ggga(leaf(A), C, A, C) → getleave_out_ggga(leaf(A), C, A, C)
getleave_in_ggga(tree(A, B), C, L, O) → U4_ggga(A, B, C, L, O, getleave_in_ggga(A, tree(B, C), L, O))
U4_ggga(A, B, C, L, O, getleave_out_ggga(A, tree(B, C), L, O)) → getleave_out_ggga(tree(A, B), C, L, O)
U2_gg(T1, T2, S1, S2, T, getleave_out_ggga(S1, S2, L, S)) → U3_gg(T1, T2, S1, S2, sameleaves_in_gg(T, S))
U3_gg(T1, T2, S1, S2, sameleaves_out_gg(T, S)) → sameleaves_out_gg(tree(T1, T2), tree(S1, S2))
SAMELEAVES_IN_GG(tree(T1, T2), tree(S1, S2)) → U1_GG(T1, T2, S1, S2, getleave_in_ggaa(T1, T2, L, T))
SAMELEAVES_IN_GG(tree(T1, T2), tree(S1, S2)) → GETLEAVE_IN_GGAA(T1, T2, L, T)
GETLEAVE_IN_GGAA(tree(A, B), C, L, O) → U4_GGAA(A, B, C, L, O, getleave_in_ggaa(A, tree(B, C), L, O))
GETLEAVE_IN_GGAA(tree(A, B), C, L, O) → GETLEAVE_IN_GGAA(A, tree(B, C), L, O)
U1_GG(T1, T2, S1, S2, getleave_out_ggaa(T1, T2, L, T)) → U2_GG(T1, T2, S1, S2, T, getleave_in_ggga(S1, S2, L, S))
U1_GG(T1, T2, S1, S2, getleave_out_ggaa(T1, T2, L, T)) → GETLEAVE_IN_GGGA(S1, S2, L, S)
GETLEAVE_IN_GGGA(tree(A, B), C, L, O) → U4_GGGA(A, B, C, L, O, getleave_in_ggga(A, tree(B, C), L, O))
GETLEAVE_IN_GGGA(tree(A, B), C, L, O) → GETLEAVE_IN_GGGA(A, tree(B, C), L, O)
U2_GG(T1, T2, S1, S2, T, getleave_out_ggga(S1, S2, L, S)) → U3_GG(T1, T2, S1, S2, sameleaves_in_gg(T, S))
U2_GG(T1, T2, S1, S2, T, getleave_out_ggga(S1, S2, L, S)) → SAMELEAVES_IN_GG(T, S)
sameleaves_in_gg(leaf(L), leaf(L)) → sameleaves_out_gg(leaf(L), leaf(L))
sameleaves_in_gg(tree(T1, T2), tree(S1, S2)) → U1_gg(T1, T2, S1, S2, getleave_in_ggaa(T1, T2, L, T))
getleave_in_ggaa(leaf(A), C, A, C) → getleave_out_ggaa(leaf(A), C, A, C)
getleave_in_ggaa(tree(A, B), C, L, O) → U4_ggaa(A, B, C, L, O, getleave_in_ggaa(A, tree(B, C), L, O))
U4_ggaa(A, B, C, L, O, getleave_out_ggaa(A, tree(B, C), L, O)) → getleave_out_ggaa(tree(A, B), C, L, O)
U1_gg(T1, T2, S1, S2, getleave_out_ggaa(T1, T2, L, T)) → U2_gg(T1, T2, S1, S2, T, getleave_in_ggga(S1, S2, L, S))
getleave_in_ggga(leaf(A), C, A, C) → getleave_out_ggga(leaf(A), C, A, C)
getleave_in_ggga(tree(A, B), C, L, O) → U4_ggga(A, B, C, L, O, getleave_in_ggga(A, tree(B, C), L, O))
U4_ggga(A, B, C, L, O, getleave_out_ggga(A, tree(B, C), L, O)) → getleave_out_ggga(tree(A, B), C, L, O)
U2_gg(T1, T2, S1, S2, T, getleave_out_ggga(S1, S2, L, S)) → U3_gg(T1, T2, S1, S2, sameleaves_in_gg(T, S))
U3_gg(T1, T2, S1, S2, sameleaves_out_gg(T, S)) → sameleaves_out_gg(tree(T1, T2), tree(S1, S2))
SAMELEAVES_IN_GG(tree(T1, T2), tree(S1, S2)) → U1_GG(T1, T2, S1, S2, getleave_in_ggaa(T1, T2, L, T))
SAMELEAVES_IN_GG(tree(T1, T2), tree(S1, S2)) → GETLEAVE_IN_GGAA(T1, T2, L, T)
GETLEAVE_IN_GGAA(tree(A, B), C, L, O) → U4_GGAA(A, B, C, L, O, getleave_in_ggaa(A, tree(B, C), L, O))
GETLEAVE_IN_GGAA(tree(A, B), C, L, O) → GETLEAVE_IN_GGAA(A, tree(B, C), L, O)
U1_GG(T1, T2, S1, S2, getleave_out_ggaa(T1, T2, L, T)) → U2_GG(T1, T2, S1, S2, T, getleave_in_ggga(S1, S2, L, S))
U1_GG(T1, T2, S1, S2, getleave_out_ggaa(T1, T2, L, T)) → GETLEAVE_IN_GGGA(S1, S2, L, S)
GETLEAVE_IN_GGGA(tree(A, B), C, L, O) → U4_GGGA(A, B, C, L, O, getleave_in_ggga(A, tree(B, C), L, O))
GETLEAVE_IN_GGGA(tree(A, B), C, L, O) → GETLEAVE_IN_GGGA(A, tree(B, C), L, O)
U2_GG(T1, T2, S1, S2, T, getleave_out_ggga(S1, S2, L, S)) → U3_GG(T1, T2, S1, S2, sameleaves_in_gg(T, S))
U2_GG(T1, T2, S1, S2, T, getleave_out_ggga(S1, S2, L, S)) → SAMELEAVES_IN_GG(T, S)
sameleaves_in_gg(leaf(L), leaf(L)) → sameleaves_out_gg(leaf(L), leaf(L))
sameleaves_in_gg(tree(T1, T2), tree(S1, S2)) → U1_gg(T1, T2, S1, S2, getleave_in_ggaa(T1, T2, L, T))
getleave_in_ggaa(leaf(A), C, A, C) → getleave_out_ggaa(leaf(A), C, A, C)
getleave_in_ggaa(tree(A, B), C, L, O) → U4_ggaa(A, B, C, L, O, getleave_in_ggaa(A, tree(B, C), L, O))
U4_ggaa(A, B, C, L, O, getleave_out_ggaa(A, tree(B, C), L, O)) → getleave_out_ggaa(tree(A, B), C, L, O)
U1_gg(T1, T2, S1, S2, getleave_out_ggaa(T1, T2, L, T)) → U2_gg(T1, T2, S1, S2, T, getleave_in_ggga(S1, S2, L, S))
getleave_in_ggga(leaf(A), C, A, C) → getleave_out_ggga(leaf(A), C, A, C)
getleave_in_ggga(tree(A, B), C, L, O) → U4_ggga(A, B, C, L, O, getleave_in_ggga(A, tree(B, C), L, O))
U4_ggga(A, B, C, L, O, getleave_out_ggga(A, tree(B, C), L, O)) → getleave_out_ggga(tree(A, B), C, L, O)
U2_gg(T1, T2, S1, S2, T, getleave_out_ggga(S1, S2, L, S)) → U3_gg(T1, T2, S1, S2, sameleaves_in_gg(T, S))
U3_gg(T1, T2, S1, S2, sameleaves_out_gg(T, S)) → sameleaves_out_gg(tree(T1, T2), tree(S1, S2))
GETLEAVE_IN_GGGA(tree(A, B), C, L, O) → GETLEAVE_IN_GGGA(A, tree(B, C), L, O)
sameleaves_in_gg(leaf(L), leaf(L)) → sameleaves_out_gg(leaf(L), leaf(L))
sameleaves_in_gg(tree(T1, T2), tree(S1, S2)) → U1_gg(T1, T2, S1, S2, getleave_in_ggaa(T1, T2, L, T))
getleave_in_ggaa(leaf(A), C, A, C) → getleave_out_ggaa(leaf(A), C, A, C)
getleave_in_ggaa(tree(A, B), C, L, O) → U4_ggaa(A, B, C, L, O, getleave_in_ggaa(A, tree(B, C), L, O))
U4_ggaa(A, B, C, L, O, getleave_out_ggaa(A, tree(B, C), L, O)) → getleave_out_ggaa(tree(A, B), C, L, O)
U1_gg(T1, T2, S1, S2, getleave_out_ggaa(T1, T2, L, T)) → U2_gg(T1, T2, S1, S2, T, getleave_in_ggga(S1, S2, L, S))
getleave_in_ggga(leaf(A), C, A, C) → getleave_out_ggga(leaf(A), C, A, C)
getleave_in_ggga(tree(A, B), C, L, O) → U4_ggga(A, B, C, L, O, getleave_in_ggga(A, tree(B, C), L, O))
U4_ggga(A, B, C, L, O, getleave_out_ggga(A, tree(B, C), L, O)) → getleave_out_ggga(tree(A, B), C, L, O)
U2_gg(T1, T2, S1, S2, T, getleave_out_ggga(S1, S2, L, S)) → U3_gg(T1, T2, S1, S2, sameleaves_in_gg(T, S))
U3_gg(T1, T2, S1, S2, sameleaves_out_gg(T, S)) → sameleaves_out_gg(tree(T1, T2), tree(S1, S2))
GETLEAVE_IN_GGGA(tree(A, B), C, L, O) → GETLEAVE_IN_GGGA(A, tree(B, C), L, O)
GETLEAVE_IN_GGGA(tree(A, B), C, L) → GETLEAVE_IN_GGGA(A, tree(B, C), L)
From the DPs we obtained the following set of size-change graphs:
GETLEAVE_IN_GGAA(tree(A, B), C, L, O) → GETLEAVE_IN_GGAA(A, tree(B, C), L, O)
sameleaves_in_gg(leaf(L), leaf(L)) → sameleaves_out_gg(leaf(L), leaf(L))
sameleaves_in_gg(tree(T1, T2), tree(S1, S2)) → U1_gg(T1, T2, S1, S2, getleave_in_ggaa(T1, T2, L, T))
getleave_in_ggaa(leaf(A), C, A, C) → getleave_out_ggaa(leaf(A), C, A, C)
getleave_in_ggaa(tree(A, B), C, L, O) → U4_ggaa(A, B, C, L, O, getleave_in_ggaa(A, tree(B, C), L, O))
U4_ggaa(A, B, C, L, O, getleave_out_ggaa(A, tree(B, C), L, O)) → getleave_out_ggaa(tree(A, B), C, L, O)
U1_gg(T1, T2, S1, S2, getleave_out_ggaa(T1, T2, L, T)) → U2_gg(T1, T2, S1, S2, T, getleave_in_ggga(S1, S2, L, S))
getleave_in_ggga(leaf(A), C, A, C) → getleave_out_ggga(leaf(A), C, A, C)
getleave_in_ggga(tree(A, B), C, L, O) → U4_ggga(A, B, C, L, O, getleave_in_ggga(A, tree(B, C), L, O))
U4_ggga(A, B, C, L, O, getleave_out_ggga(A, tree(B, C), L, O)) → getleave_out_ggga(tree(A, B), C, L, O)
U2_gg(T1, T2, S1, S2, T, getleave_out_ggga(S1, S2, L, S)) → U3_gg(T1, T2, S1, S2, sameleaves_in_gg(T, S))
U3_gg(T1, T2, S1, S2, sameleaves_out_gg(T, S)) → sameleaves_out_gg(tree(T1, T2), tree(S1, S2))
GETLEAVE_IN_GGAA(tree(A, B), C, L, O) → GETLEAVE_IN_GGAA(A, tree(B, C), L, O)
GETLEAVE_IN_GGAA(tree(A, B), C) → GETLEAVE_IN_GGAA(A, tree(B, C))
From the DPs we obtained the following set of size-change graphs:
U1_GG(T1, T2, S1, S2, getleave_out_ggaa(T1, T2, L, T)) → U2_GG(T1, T2, S1, S2, T, getleave_in_ggga(S1, S2, L, S))
U2_GG(T1, T2, S1, S2, T, getleave_out_ggga(S1, S2, L, S)) → SAMELEAVES_IN_GG(T, S)
SAMELEAVES_IN_GG(tree(T1, T2), tree(S1, S2)) → U1_GG(T1, T2, S1, S2, getleave_in_ggaa(T1, T2, L, T))
sameleaves_in_gg(leaf(L), leaf(L)) → sameleaves_out_gg(leaf(L), leaf(L))
sameleaves_in_gg(tree(T1, T2), tree(S1, S2)) → U1_gg(T1, T2, S1, S2, getleave_in_ggaa(T1, T2, L, T))
getleave_in_ggaa(leaf(A), C, A, C) → getleave_out_ggaa(leaf(A), C, A, C)
getleave_in_ggaa(tree(A, B), C, L, O) → U4_ggaa(A, B, C, L, O, getleave_in_ggaa(A, tree(B, C), L, O))
U4_ggaa(A, B, C, L, O, getleave_out_ggaa(A, tree(B, C), L, O)) → getleave_out_ggaa(tree(A, B), C, L, O)
U1_gg(T1, T2, S1, S2, getleave_out_ggaa(T1, T2, L, T)) → U2_gg(T1, T2, S1, S2, T, getleave_in_ggga(S1, S2, L, S))
getleave_in_ggga(leaf(A), C, A, C) → getleave_out_ggga(leaf(A), C, A, C)
getleave_in_ggga(tree(A, B), C, L, O) → U4_ggga(A, B, C, L, O, getleave_in_ggga(A, tree(B, C), L, O))
U4_ggga(A, B, C, L, O, getleave_out_ggga(A, tree(B, C), L, O)) → getleave_out_ggga(tree(A, B), C, L, O)
U2_gg(T1, T2, S1, S2, T, getleave_out_ggga(S1, S2, L, S)) → U3_gg(T1, T2, S1, S2, sameleaves_in_gg(T, S))
U3_gg(T1, T2, S1, S2, sameleaves_out_gg(T, S)) → sameleaves_out_gg(tree(T1, T2), tree(S1, S2))
U1_GG(T1, T2, S1, S2, getleave_out_ggaa(T1, T2, L, T)) → U2_GG(T1, T2, S1, S2, T, getleave_in_ggga(S1, S2, L, S))
U2_GG(T1, T2, S1, S2, T, getleave_out_ggga(S1, S2, L, S)) → SAMELEAVES_IN_GG(T, S)
SAMELEAVES_IN_GG(tree(T1, T2), tree(S1, S2)) → U1_GG(T1, T2, S1, S2, getleave_in_ggaa(T1, T2, L, T))
getleave_in_ggga(leaf(A), C, A, C) → getleave_out_ggga(leaf(A), C, A, C)
getleave_in_ggga(tree(A, B), C, L, O) → U4_ggga(A, B, C, L, O, getleave_in_ggga(A, tree(B, C), L, O))
getleave_in_ggaa(leaf(A), C, A, C) → getleave_out_ggaa(leaf(A), C, A, C)
getleave_in_ggaa(tree(A, B), C, L, O) → U4_ggaa(A, B, C, L, O, getleave_in_ggaa(A, tree(B, C), L, O))
U4_ggga(A, B, C, L, O, getleave_out_ggga(A, tree(B, C), L, O)) → getleave_out_ggga(tree(A, B), C, L, O)
U4_ggaa(A, B, C, L, O, getleave_out_ggaa(A, tree(B, C), L, O)) → getleave_out_ggaa(tree(A, B), C, L, O)
U1_GG(T1, T2, S1, S2, getleave_out_ggaa(T1, T2, L, T)) → U2_GG(T1, T2, S1, S2, T, getleave_in_ggga(S1, S2, L))
U2_GG(T1, T2, S1, S2, T, getleave_out_ggga(S1, S2, L, S)) → SAMELEAVES_IN_GG(T, S)
SAMELEAVES_IN_GG(tree(T1, T2), tree(S1, S2)) → U1_GG(T1, T2, S1, S2, getleave_in_ggaa(T1, T2))
getleave_in_ggga(leaf(A), C, A) → getleave_out_ggga(leaf(A), C, A, C)
getleave_in_ggga(tree(A, B), C, L) → U4_ggga(A, B, C, L, getleave_in_ggga(A, tree(B, C), L))
getleave_in_ggaa(leaf(A), C) → getleave_out_ggaa(leaf(A), C, A, C)
getleave_in_ggaa(tree(A, B), C) → U4_ggaa(A, B, C, getleave_in_ggaa(A, tree(B, C)))
U4_ggga(A, B, C, L, getleave_out_ggga(A, tree(B, C), L, O)) → getleave_out_ggga(tree(A, B), C, L, O)
U4_ggaa(A, B, C, getleave_out_ggaa(A, tree(B, C), L, O)) → getleave_out_ggaa(tree(A, B), C, L, O)
getleave_in_ggga(x0, x1, x2)
getleave_in_ggaa(x0, x1)
U4_ggga(x0, x1, x2, x3, x4)
U4_ggaa(x0, x1, x2, x3)