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 UsableRulesReductionPairsProof (⇔)
↳13 QDP
↳14 PisEmptyProof (⇔)
↳15 TRUE
↳16 PiDP
↳17 UsableRulesProof (⇔)
↳18 PiDP
↳19 PiDPToQDPProof (⇐)
↳20 QDP
↳21 UsableRulesReductionPairsProof (⇔)
↳22 QDP
↳23 PisEmptyProof (⇔)
↳24 TRUE
↳25 PiDP
↳26 UsableRulesProof (⇔)
↳27 PiDP
↳28 PiDPToQDPProof (⇐)
↳29 QDP
↳30 MRRProof (⇔)
↳31 QDP
↳32 PisEmptyProof (⇔)
↳33 TRUE
↳34 PrologToPiTRSProof (⇐)
↳35 PiTRS
↳36 DependencyPairsProof (⇔)
↳37 PiDP
↳38 DependencyGraphProof (⇔)
↳39 AND
↳40 PiDP
↳41 UsableRulesProof (⇔)
↳42 PiDP
↳43 PiDPToQDPProof (⇐)
↳44 QDP
↳45 UsableRulesReductionPairsProof (⇔)
↳46 QDP
↳47 PisEmptyProof (⇔)
↳48 TRUE
↳49 PiDP
↳50 UsableRulesProof (⇔)
↳51 PiDP
↳52 PiDPToQDPProof (⇐)
↳53 QDP
↳54 UsableRulesReductionPairsProof (⇔)
↳55 QDP
↳56 PisEmptyProof (⇔)
↳57 TRUE
↳58 PiDP
↳59 UsableRulesProof (⇔)
↳60 PiDP
↳61 PiDPToQDPProof (⇐)
↳62 QDP
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(L, .(H, T)) → U3_ga(L, H, T, append2_in_ag(parts(V, .(H, U)), is(sum(L))))
append2_in_ag(parts([], Y), is(sum(Y))) → append2_out_ag(parts([], Y), is(sum(Y)))
append2_in_ag(parts(.(H, X), Y), is(sum(.(H, Z)))) → U1_ag(H, X, Y, Z, append2_in_ag(parts(X, Y), is(sum(Z))))
U1_ag(H, X, Y, Z, append2_out_ag(parts(X, Y), is(sum(Z)))) → append2_out_ag(parts(.(H, X), Y), is(sum(.(H, Z))))
U3_ga(L, H, T, append2_out_ag(parts(V, .(H, U)), is(sum(L)))) → U4_ga(L, H, T, V, U, append1_in_ga(parts(V, U), is(sum(W))))
append1_in_ga(parts([], Y), is(sum(Y))) → append1_out_ga(parts([], Y), is(sum(Y)))
append1_in_ga(parts(.(H, X), Y), is(sum(.(H, Z)))) → U2_ga(H, X, Y, Z, append1_in_ga(parts(X, Y), is(sum(Z))))
U2_ga(H, X, Y, Z, append1_out_ga(parts(X, Y), is(sum(Z)))) → append1_out_ga(parts(.(H, X), Y), is(sum(.(H, Z))))
U4_ga(L, H, T, V, U, append1_out_ga(parts(V, U), is(sum(W)))) → U5_ga(L, H, T, perm_in_ga(W, T))
U5_ga(L, H, T, perm_out_ga(W, T)) → perm_out_ga(L, .(H, T))
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(L, .(H, T)) → U3_ga(L, H, T, append2_in_ag(parts(V, .(H, U)), is(sum(L))))
append2_in_ag(parts([], Y), is(sum(Y))) → append2_out_ag(parts([], Y), is(sum(Y)))
append2_in_ag(parts(.(H, X), Y), is(sum(.(H, Z)))) → U1_ag(H, X, Y, Z, append2_in_ag(parts(X, Y), is(sum(Z))))
U1_ag(H, X, Y, Z, append2_out_ag(parts(X, Y), is(sum(Z)))) → append2_out_ag(parts(.(H, X), Y), is(sum(.(H, Z))))
U3_ga(L, H, T, append2_out_ag(parts(V, .(H, U)), is(sum(L)))) → U4_ga(L, H, T, V, U, append1_in_ga(parts(V, U), is(sum(W))))
append1_in_ga(parts([], Y), is(sum(Y))) → append1_out_ga(parts([], Y), is(sum(Y)))
append1_in_ga(parts(.(H, X), Y), is(sum(.(H, Z)))) → U2_ga(H, X, Y, Z, append1_in_ga(parts(X, Y), is(sum(Z))))
U2_ga(H, X, Y, Z, append1_out_ga(parts(X, Y), is(sum(Z)))) → append1_out_ga(parts(.(H, X), Y), is(sum(.(H, Z))))
U4_ga(L, H, T, V, U, append1_out_ga(parts(V, U), is(sum(W)))) → U5_ga(L, H, T, perm_in_ga(W, T))
U5_ga(L, H, T, perm_out_ga(W, T)) → perm_out_ga(L, .(H, T))
PERM_IN_GA(L, .(H, T)) → U3_GA(L, H, T, append2_in_ag(parts(V, .(H, U)), is(sum(L))))
PERM_IN_GA(L, .(H, T)) → APPEND2_IN_AG(parts(V, .(H, U)), is(sum(L)))
APPEND2_IN_AG(parts(.(H, X), Y), is(sum(.(H, Z)))) → U1_AG(H, X, Y, Z, append2_in_ag(parts(X, Y), is(sum(Z))))
APPEND2_IN_AG(parts(.(H, X), Y), is(sum(.(H, Z)))) → APPEND2_IN_AG(parts(X, Y), is(sum(Z)))
U3_GA(L, H, T, append2_out_ag(parts(V, .(H, U)), is(sum(L)))) → U4_GA(L, H, T, V, U, append1_in_ga(parts(V, U), is(sum(W))))
U3_GA(L, H, T, append2_out_ag(parts(V, .(H, U)), is(sum(L)))) → APPEND1_IN_GA(parts(V, U), is(sum(W)))
APPEND1_IN_GA(parts(.(H, X), Y), is(sum(.(H, Z)))) → U2_GA(H, X, Y, Z, append1_in_ga(parts(X, Y), is(sum(Z))))
APPEND1_IN_GA(parts(.(H, X), Y), is(sum(.(H, Z)))) → APPEND1_IN_GA(parts(X, Y), is(sum(Z)))
U4_GA(L, H, T, V, U, append1_out_ga(parts(V, U), is(sum(W)))) → U5_GA(L, H, T, perm_in_ga(W, T))
U4_GA(L, H, T, V, U, append1_out_ga(parts(V, U), is(sum(W)))) → PERM_IN_GA(W, T)
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(L, .(H, T)) → U3_ga(L, H, T, append2_in_ag(parts(V, .(H, U)), is(sum(L))))
append2_in_ag(parts([], Y), is(sum(Y))) → append2_out_ag(parts([], Y), is(sum(Y)))
append2_in_ag(parts(.(H, X), Y), is(sum(.(H, Z)))) → U1_ag(H, X, Y, Z, append2_in_ag(parts(X, Y), is(sum(Z))))
U1_ag(H, X, Y, Z, append2_out_ag(parts(X, Y), is(sum(Z)))) → append2_out_ag(parts(.(H, X), Y), is(sum(.(H, Z))))
U3_ga(L, H, T, append2_out_ag(parts(V, .(H, U)), is(sum(L)))) → U4_ga(L, H, T, V, U, append1_in_ga(parts(V, U), is(sum(W))))
append1_in_ga(parts([], Y), is(sum(Y))) → append1_out_ga(parts([], Y), is(sum(Y)))
append1_in_ga(parts(.(H, X), Y), is(sum(.(H, Z)))) → U2_ga(H, X, Y, Z, append1_in_ga(parts(X, Y), is(sum(Z))))
U2_ga(H, X, Y, Z, append1_out_ga(parts(X, Y), is(sum(Z)))) → append1_out_ga(parts(.(H, X), Y), is(sum(.(H, Z))))
U4_ga(L, H, T, V, U, append1_out_ga(parts(V, U), is(sum(W)))) → U5_ga(L, H, T, perm_in_ga(W, T))
U5_ga(L, H, T, perm_out_ga(W, T)) → perm_out_ga(L, .(H, T))
PERM_IN_GA(L, .(H, T)) → U3_GA(L, H, T, append2_in_ag(parts(V, .(H, U)), is(sum(L))))
PERM_IN_GA(L, .(H, T)) → APPEND2_IN_AG(parts(V, .(H, U)), is(sum(L)))
APPEND2_IN_AG(parts(.(H, X), Y), is(sum(.(H, Z)))) → U1_AG(H, X, Y, Z, append2_in_ag(parts(X, Y), is(sum(Z))))
APPEND2_IN_AG(parts(.(H, X), Y), is(sum(.(H, Z)))) → APPEND2_IN_AG(parts(X, Y), is(sum(Z)))
U3_GA(L, H, T, append2_out_ag(parts(V, .(H, U)), is(sum(L)))) → U4_GA(L, H, T, V, U, append1_in_ga(parts(V, U), is(sum(W))))
U3_GA(L, H, T, append2_out_ag(parts(V, .(H, U)), is(sum(L)))) → APPEND1_IN_GA(parts(V, U), is(sum(W)))
APPEND1_IN_GA(parts(.(H, X), Y), is(sum(.(H, Z)))) → U2_GA(H, X, Y, Z, append1_in_ga(parts(X, Y), is(sum(Z))))
APPEND1_IN_GA(parts(.(H, X), Y), is(sum(.(H, Z)))) → APPEND1_IN_GA(parts(X, Y), is(sum(Z)))
U4_GA(L, H, T, V, U, append1_out_ga(parts(V, U), is(sum(W)))) → U5_GA(L, H, T, perm_in_ga(W, T))
U4_GA(L, H, T, V, U, append1_out_ga(parts(V, U), is(sum(W)))) → PERM_IN_GA(W, T)
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(L, .(H, T)) → U3_ga(L, H, T, append2_in_ag(parts(V, .(H, U)), is(sum(L))))
append2_in_ag(parts([], Y), is(sum(Y))) → append2_out_ag(parts([], Y), is(sum(Y)))
append2_in_ag(parts(.(H, X), Y), is(sum(.(H, Z)))) → U1_ag(H, X, Y, Z, append2_in_ag(parts(X, Y), is(sum(Z))))
U1_ag(H, X, Y, Z, append2_out_ag(parts(X, Y), is(sum(Z)))) → append2_out_ag(parts(.(H, X), Y), is(sum(.(H, Z))))
U3_ga(L, H, T, append2_out_ag(parts(V, .(H, U)), is(sum(L)))) → U4_ga(L, H, T, V, U, append1_in_ga(parts(V, U), is(sum(W))))
append1_in_ga(parts([], Y), is(sum(Y))) → append1_out_ga(parts([], Y), is(sum(Y)))
append1_in_ga(parts(.(H, X), Y), is(sum(.(H, Z)))) → U2_ga(H, X, Y, Z, append1_in_ga(parts(X, Y), is(sum(Z))))
U2_ga(H, X, Y, Z, append1_out_ga(parts(X, Y), is(sum(Z)))) → append1_out_ga(parts(.(H, X), Y), is(sum(.(H, Z))))
U4_ga(L, H, T, V, U, append1_out_ga(parts(V, U), is(sum(W)))) → U5_ga(L, H, T, perm_in_ga(W, T))
U5_ga(L, H, T, perm_out_ga(W, T)) → perm_out_ga(L, .(H, T))
APPEND1_IN_GA(parts(.(H, X), Y), is(sum(.(H, Z)))) → APPEND1_IN_GA(parts(X, Y), is(sum(Z)))
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(L, .(H, T)) → U3_ga(L, H, T, append2_in_ag(parts(V, .(H, U)), is(sum(L))))
append2_in_ag(parts([], Y), is(sum(Y))) → append2_out_ag(parts([], Y), is(sum(Y)))
append2_in_ag(parts(.(H, X), Y), is(sum(.(H, Z)))) → U1_ag(H, X, Y, Z, append2_in_ag(parts(X, Y), is(sum(Z))))
U1_ag(H, X, Y, Z, append2_out_ag(parts(X, Y), is(sum(Z)))) → append2_out_ag(parts(.(H, X), Y), is(sum(.(H, Z))))
U3_ga(L, H, T, append2_out_ag(parts(V, .(H, U)), is(sum(L)))) → U4_ga(L, H, T, V, U, append1_in_ga(parts(V, U), is(sum(W))))
append1_in_ga(parts([], Y), is(sum(Y))) → append1_out_ga(parts([], Y), is(sum(Y)))
append1_in_ga(parts(.(H, X), Y), is(sum(.(H, Z)))) → U2_ga(H, X, Y, Z, append1_in_ga(parts(X, Y), is(sum(Z))))
U2_ga(H, X, Y, Z, append1_out_ga(parts(X, Y), is(sum(Z)))) → append1_out_ga(parts(.(H, X), Y), is(sum(.(H, Z))))
U4_ga(L, H, T, V, U, append1_out_ga(parts(V, U), is(sum(W)))) → U5_ga(L, H, T, perm_in_ga(W, T))
U5_ga(L, H, T, perm_out_ga(W, T)) → perm_out_ga(L, .(H, T))
APPEND1_IN_GA(parts(.(H, X), Y), is(sum(.(H, Z)))) → APPEND1_IN_GA(parts(X, Y), is(sum(Z)))
APPEND1_IN_GA(parts(.(X), Y)) → APPEND1_IN_GA(parts(X, Y))
No rules are removed from R.
APPEND1_IN_GA(parts(.(X), Y)) → APPEND1_IN_GA(parts(X, Y))
POL(.(x1)) = 2·x1
POL(APPEND1_IN_GA(x1)) = 2·x1
POL(parts(x1, x2)) = 2·x1 + x2
APPEND2_IN_AG(parts(.(H, X), Y), is(sum(.(H, Z)))) → APPEND2_IN_AG(parts(X, Y), is(sum(Z)))
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(L, .(H, T)) → U3_ga(L, H, T, append2_in_ag(parts(V, .(H, U)), is(sum(L))))
append2_in_ag(parts([], Y), is(sum(Y))) → append2_out_ag(parts([], Y), is(sum(Y)))
append2_in_ag(parts(.(H, X), Y), is(sum(.(H, Z)))) → U1_ag(H, X, Y, Z, append2_in_ag(parts(X, Y), is(sum(Z))))
U1_ag(H, X, Y, Z, append2_out_ag(parts(X, Y), is(sum(Z)))) → append2_out_ag(parts(.(H, X), Y), is(sum(.(H, Z))))
U3_ga(L, H, T, append2_out_ag(parts(V, .(H, U)), is(sum(L)))) → U4_ga(L, H, T, V, U, append1_in_ga(parts(V, U), is(sum(W))))
append1_in_ga(parts([], Y), is(sum(Y))) → append1_out_ga(parts([], Y), is(sum(Y)))
append1_in_ga(parts(.(H, X), Y), is(sum(.(H, Z)))) → U2_ga(H, X, Y, Z, append1_in_ga(parts(X, Y), is(sum(Z))))
U2_ga(H, X, Y, Z, append1_out_ga(parts(X, Y), is(sum(Z)))) → append1_out_ga(parts(.(H, X), Y), is(sum(.(H, Z))))
U4_ga(L, H, T, V, U, append1_out_ga(parts(V, U), is(sum(W)))) → U5_ga(L, H, T, perm_in_ga(W, T))
U5_ga(L, H, T, perm_out_ga(W, T)) → perm_out_ga(L, .(H, T))
APPEND2_IN_AG(parts(.(H, X), Y), is(sum(.(H, Z)))) → APPEND2_IN_AG(parts(X, Y), is(sum(Z)))
APPEND2_IN_AG(is(sum(.(Z)))) → APPEND2_IN_AG(is(sum(Z)))
No rules are removed from R.
APPEND2_IN_AG(is(sum(.(Z)))) → APPEND2_IN_AG(is(sum(Z)))
POL(.(x1)) = 2·x1
POL(APPEND2_IN_AG(x1)) = 2·x1
POL(is(x1)) = 2·x1
POL(sum(x1)) = 2·x1
U3_GA(L, H, T, append2_out_ag(parts(V, .(H, U)), is(sum(L)))) → U4_GA(L, H, T, V, U, append1_in_ga(parts(V, U), is(sum(W))))
U4_GA(L, H, T, V, U, append1_out_ga(parts(V, U), is(sum(W)))) → PERM_IN_GA(W, T)
PERM_IN_GA(L, .(H, T)) → U3_GA(L, H, T, append2_in_ag(parts(V, .(H, U)), is(sum(L))))
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(L, .(H, T)) → U3_ga(L, H, T, append2_in_ag(parts(V, .(H, U)), is(sum(L))))
append2_in_ag(parts([], Y), is(sum(Y))) → append2_out_ag(parts([], Y), is(sum(Y)))
append2_in_ag(parts(.(H, X), Y), is(sum(.(H, Z)))) → U1_ag(H, X, Y, Z, append2_in_ag(parts(X, Y), is(sum(Z))))
U1_ag(H, X, Y, Z, append2_out_ag(parts(X, Y), is(sum(Z)))) → append2_out_ag(parts(.(H, X), Y), is(sum(.(H, Z))))
U3_ga(L, H, T, append2_out_ag(parts(V, .(H, U)), is(sum(L)))) → U4_ga(L, H, T, V, U, append1_in_ga(parts(V, U), is(sum(W))))
append1_in_ga(parts([], Y), is(sum(Y))) → append1_out_ga(parts([], Y), is(sum(Y)))
append1_in_ga(parts(.(H, X), Y), is(sum(.(H, Z)))) → U2_ga(H, X, Y, Z, append1_in_ga(parts(X, Y), is(sum(Z))))
U2_ga(H, X, Y, Z, append1_out_ga(parts(X, Y), is(sum(Z)))) → append1_out_ga(parts(.(H, X), Y), is(sum(.(H, Z))))
U4_ga(L, H, T, V, U, append1_out_ga(parts(V, U), is(sum(W)))) → U5_ga(L, H, T, perm_in_ga(W, T))
U5_ga(L, H, T, perm_out_ga(W, T)) → perm_out_ga(L, .(H, T))
U3_GA(L, H, T, append2_out_ag(parts(V, .(H, U)), is(sum(L)))) → U4_GA(L, H, T, V, U, append1_in_ga(parts(V, U), is(sum(W))))
U4_GA(L, H, T, V, U, append1_out_ga(parts(V, U), is(sum(W)))) → PERM_IN_GA(W, T)
PERM_IN_GA(L, .(H, T)) → U3_GA(L, H, T, append2_in_ag(parts(V, .(H, U)), is(sum(L))))
append1_in_ga(parts([], Y), is(sum(Y))) → append1_out_ga(parts([], Y), is(sum(Y)))
append1_in_ga(parts(.(H, X), Y), is(sum(.(H, Z)))) → U2_ga(H, X, Y, Z, append1_in_ga(parts(X, Y), is(sum(Z))))
append2_in_ag(parts([], Y), is(sum(Y))) → append2_out_ag(parts([], Y), is(sum(Y)))
append2_in_ag(parts(.(H, X), Y), is(sum(.(H, Z)))) → U1_ag(H, X, Y, Z, append2_in_ag(parts(X, Y), is(sum(Z))))
U2_ga(H, X, Y, Z, append1_out_ga(parts(X, Y), is(sum(Z)))) → append1_out_ga(parts(.(H, X), Y), is(sum(.(H, Z))))
U1_ag(H, X, Y, Z, append2_out_ag(parts(X, Y), is(sum(Z)))) → append2_out_ag(parts(.(H, X), Y), is(sum(.(H, Z))))
U3_GA(append2_out_ag(parts(V, .(U)))) → U4_GA(append1_in_ga(parts(V, U)))
U4_GA(append1_out_ga(is(sum(W)))) → PERM_IN_GA(W)
PERM_IN_GA(L) → U3_GA(append2_in_ag(is(sum(L))))
append1_in_ga(parts([], Y)) → append1_out_ga(is(sum(Y)))
append1_in_ga(parts(.(X), Y)) → U2_ga(append1_in_ga(parts(X, Y)))
append2_in_ag(is(sum(Y))) → append2_out_ag(parts([], Y))
append2_in_ag(is(sum(.(Z)))) → U1_ag(append2_in_ag(is(sum(Z))))
U2_ga(append1_out_ga(is(sum(Z)))) → append1_out_ga(is(sum(.(Z))))
U1_ag(append2_out_ag(parts(X, Y))) → append2_out_ag(parts(.(X), Y))
append1_in_ga(x0)
append2_in_ag(x0)
U2_ga(x0)
U1_ag(x0)
U3_GA(append2_out_ag(parts(V, .(U)))) → U4_GA(append1_in_ga(parts(V, U)))
U4_GA(append1_out_ga(is(sum(W)))) → PERM_IN_GA(W)
PERM_IN_GA(L) → U3_GA(append2_in_ag(is(sum(L))))
append1_in_ga(parts([], Y)) → append1_out_ga(is(sum(Y)))
append2_in_ag(is(sum(Y))) → append2_out_ag(parts([], Y))
POL(.(x1)) = 5 + x1
POL(PERM_IN_GA(x1)) = 2 + x1
POL(U1_ag(x1)) = 5 + x1
POL(U2_ga(x1)) = 5 + x1
POL(U3_GA(x1)) = x1
POL(U4_GA(x1)) = x1
POL([]) = 0
POL(append1_in_ga(x1)) = 4 + x1
POL(append1_out_ga(x1)) = 2 + x1
POL(append2_in_ag(x1)) = x1
POL(append2_out_ag(x1)) = x1
POL(is(x1)) = 1 + x1
POL(parts(x1, x2)) = x1 + x2
POL(sum(x1)) = x1
append1_in_ga(parts(.(X), Y)) → U2_ga(append1_in_ga(parts(X, Y)))
append2_in_ag(is(sum(.(Z)))) → U1_ag(append2_in_ag(is(sum(Z))))
U2_ga(append1_out_ga(is(sum(Z)))) → append1_out_ga(is(sum(.(Z))))
U1_ag(append2_out_ag(parts(X, Y))) → append2_out_ag(parts(.(X), Y))
append1_in_ga(x0)
append2_in_ag(x0)
U2_ga(x0)
U1_ag(x0)
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(L, .(H, T)) → U3_ga(L, H, T, append2_in_ag(parts(V, .(H, U)), is(sum(L))))
append2_in_ag(parts([], Y), is(sum(Y))) → append2_out_ag(parts([], Y), is(sum(Y)))
append2_in_ag(parts(.(H, X), Y), is(sum(.(H, Z)))) → U1_ag(H, X, Y, Z, append2_in_ag(parts(X, Y), is(sum(Z))))
U1_ag(H, X, Y, Z, append2_out_ag(parts(X, Y), is(sum(Z)))) → append2_out_ag(parts(.(H, X), Y), is(sum(.(H, Z))))
U3_ga(L, H, T, append2_out_ag(parts(V, .(H, U)), is(sum(L)))) → U4_ga(L, H, T, V, U, append1_in_ga(parts(V, U), is(sum(W))))
append1_in_ga(parts([], Y), is(sum(Y))) → append1_out_ga(parts([], Y), is(sum(Y)))
append1_in_ga(parts(.(H, X), Y), is(sum(.(H, Z)))) → U2_ga(H, X, Y, Z, append1_in_ga(parts(X, Y), is(sum(Z))))
U2_ga(H, X, Y, Z, append1_out_ga(parts(X, Y), is(sum(Z)))) → append1_out_ga(parts(.(H, X), Y), is(sum(.(H, Z))))
U4_ga(L, H, T, V, U, append1_out_ga(parts(V, U), is(sum(W)))) → U5_ga(L, H, T, perm_in_ga(W, T))
U5_ga(L, H, T, perm_out_ga(W, T)) → perm_out_ga(L, .(H, T))
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(L, .(H, T)) → U3_ga(L, H, T, append2_in_ag(parts(V, .(H, U)), is(sum(L))))
append2_in_ag(parts([], Y), is(sum(Y))) → append2_out_ag(parts([], Y), is(sum(Y)))
append2_in_ag(parts(.(H, X), Y), is(sum(.(H, Z)))) → U1_ag(H, X, Y, Z, append2_in_ag(parts(X, Y), is(sum(Z))))
U1_ag(H, X, Y, Z, append2_out_ag(parts(X, Y), is(sum(Z)))) → append2_out_ag(parts(.(H, X), Y), is(sum(.(H, Z))))
U3_ga(L, H, T, append2_out_ag(parts(V, .(H, U)), is(sum(L)))) → U4_ga(L, H, T, V, U, append1_in_ga(parts(V, U), is(sum(W))))
append1_in_ga(parts([], Y), is(sum(Y))) → append1_out_ga(parts([], Y), is(sum(Y)))
append1_in_ga(parts(.(H, X), Y), is(sum(.(H, Z)))) → U2_ga(H, X, Y, Z, append1_in_ga(parts(X, Y), is(sum(Z))))
U2_ga(H, X, Y, Z, append1_out_ga(parts(X, Y), is(sum(Z)))) → append1_out_ga(parts(.(H, X), Y), is(sum(.(H, Z))))
U4_ga(L, H, T, V, U, append1_out_ga(parts(V, U), is(sum(W)))) → U5_ga(L, H, T, perm_in_ga(W, T))
U5_ga(L, H, T, perm_out_ga(W, T)) → perm_out_ga(L, .(H, T))
PERM_IN_GA(L, .(H, T)) → U3_GA(L, H, T, append2_in_ag(parts(V, .(H, U)), is(sum(L))))
PERM_IN_GA(L, .(H, T)) → APPEND2_IN_AG(parts(V, .(H, U)), is(sum(L)))
APPEND2_IN_AG(parts(.(H, X), Y), is(sum(.(H, Z)))) → U1_AG(H, X, Y, Z, append2_in_ag(parts(X, Y), is(sum(Z))))
APPEND2_IN_AG(parts(.(H, X), Y), is(sum(.(H, Z)))) → APPEND2_IN_AG(parts(X, Y), is(sum(Z)))
U3_GA(L, H, T, append2_out_ag(parts(V, .(H, U)), is(sum(L)))) → U4_GA(L, H, T, V, U, append1_in_ga(parts(V, U), is(sum(W))))
U3_GA(L, H, T, append2_out_ag(parts(V, .(H, U)), is(sum(L)))) → APPEND1_IN_GA(parts(V, U), is(sum(W)))
APPEND1_IN_GA(parts(.(H, X), Y), is(sum(.(H, Z)))) → U2_GA(H, X, Y, Z, append1_in_ga(parts(X, Y), is(sum(Z))))
APPEND1_IN_GA(parts(.(H, X), Y), is(sum(.(H, Z)))) → APPEND1_IN_GA(parts(X, Y), is(sum(Z)))
U4_GA(L, H, T, V, U, append1_out_ga(parts(V, U), is(sum(W)))) → U5_GA(L, H, T, perm_in_ga(W, T))
U4_GA(L, H, T, V, U, append1_out_ga(parts(V, U), is(sum(W)))) → PERM_IN_GA(W, T)
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(L, .(H, T)) → U3_ga(L, H, T, append2_in_ag(parts(V, .(H, U)), is(sum(L))))
append2_in_ag(parts([], Y), is(sum(Y))) → append2_out_ag(parts([], Y), is(sum(Y)))
append2_in_ag(parts(.(H, X), Y), is(sum(.(H, Z)))) → U1_ag(H, X, Y, Z, append2_in_ag(parts(X, Y), is(sum(Z))))
U1_ag(H, X, Y, Z, append2_out_ag(parts(X, Y), is(sum(Z)))) → append2_out_ag(parts(.(H, X), Y), is(sum(.(H, Z))))
U3_ga(L, H, T, append2_out_ag(parts(V, .(H, U)), is(sum(L)))) → U4_ga(L, H, T, V, U, append1_in_ga(parts(V, U), is(sum(W))))
append1_in_ga(parts([], Y), is(sum(Y))) → append1_out_ga(parts([], Y), is(sum(Y)))
append1_in_ga(parts(.(H, X), Y), is(sum(.(H, Z)))) → U2_ga(H, X, Y, Z, append1_in_ga(parts(X, Y), is(sum(Z))))
U2_ga(H, X, Y, Z, append1_out_ga(parts(X, Y), is(sum(Z)))) → append1_out_ga(parts(.(H, X), Y), is(sum(.(H, Z))))
U4_ga(L, H, T, V, U, append1_out_ga(parts(V, U), is(sum(W)))) → U5_ga(L, H, T, perm_in_ga(W, T))
U5_ga(L, H, T, perm_out_ga(W, T)) → perm_out_ga(L, .(H, T))
PERM_IN_GA(L, .(H, T)) → U3_GA(L, H, T, append2_in_ag(parts(V, .(H, U)), is(sum(L))))
PERM_IN_GA(L, .(H, T)) → APPEND2_IN_AG(parts(V, .(H, U)), is(sum(L)))
APPEND2_IN_AG(parts(.(H, X), Y), is(sum(.(H, Z)))) → U1_AG(H, X, Y, Z, append2_in_ag(parts(X, Y), is(sum(Z))))
APPEND2_IN_AG(parts(.(H, X), Y), is(sum(.(H, Z)))) → APPEND2_IN_AG(parts(X, Y), is(sum(Z)))
U3_GA(L, H, T, append2_out_ag(parts(V, .(H, U)), is(sum(L)))) → U4_GA(L, H, T, V, U, append1_in_ga(parts(V, U), is(sum(W))))
U3_GA(L, H, T, append2_out_ag(parts(V, .(H, U)), is(sum(L)))) → APPEND1_IN_GA(parts(V, U), is(sum(W)))
APPEND1_IN_GA(parts(.(H, X), Y), is(sum(.(H, Z)))) → U2_GA(H, X, Y, Z, append1_in_ga(parts(X, Y), is(sum(Z))))
APPEND1_IN_GA(parts(.(H, X), Y), is(sum(.(H, Z)))) → APPEND1_IN_GA(parts(X, Y), is(sum(Z)))
U4_GA(L, H, T, V, U, append1_out_ga(parts(V, U), is(sum(W)))) → U5_GA(L, H, T, perm_in_ga(W, T))
U4_GA(L, H, T, V, U, append1_out_ga(parts(V, U), is(sum(W)))) → PERM_IN_GA(W, T)
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(L, .(H, T)) → U3_ga(L, H, T, append2_in_ag(parts(V, .(H, U)), is(sum(L))))
append2_in_ag(parts([], Y), is(sum(Y))) → append2_out_ag(parts([], Y), is(sum(Y)))
append2_in_ag(parts(.(H, X), Y), is(sum(.(H, Z)))) → U1_ag(H, X, Y, Z, append2_in_ag(parts(X, Y), is(sum(Z))))
U1_ag(H, X, Y, Z, append2_out_ag(parts(X, Y), is(sum(Z)))) → append2_out_ag(parts(.(H, X), Y), is(sum(.(H, Z))))
U3_ga(L, H, T, append2_out_ag(parts(V, .(H, U)), is(sum(L)))) → U4_ga(L, H, T, V, U, append1_in_ga(parts(V, U), is(sum(W))))
append1_in_ga(parts([], Y), is(sum(Y))) → append1_out_ga(parts([], Y), is(sum(Y)))
append1_in_ga(parts(.(H, X), Y), is(sum(.(H, Z)))) → U2_ga(H, X, Y, Z, append1_in_ga(parts(X, Y), is(sum(Z))))
U2_ga(H, X, Y, Z, append1_out_ga(parts(X, Y), is(sum(Z)))) → append1_out_ga(parts(.(H, X), Y), is(sum(.(H, Z))))
U4_ga(L, H, T, V, U, append1_out_ga(parts(V, U), is(sum(W)))) → U5_ga(L, H, T, perm_in_ga(W, T))
U5_ga(L, H, T, perm_out_ga(W, T)) → perm_out_ga(L, .(H, T))
APPEND1_IN_GA(parts(.(H, X), Y), is(sum(.(H, Z)))) → APPEND1_IN_GA(parts(X, Y), is(sum(Z)))
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(L, .(H, T)) → U3_ga(L, H, T, append2_in_ag(parts(V, .(H, U)), is(sum(L))))
append2_in_ag(parts([], Y), is(sum(Y))) → append2_out_ag(parts([], Y), is(sum(Y)))
append2_in_ag(parts(.(H, X), Y), is(sum(.(H, Z)))) → U1_ag(H, X, Y, Z, append2_in_ag(parts(X, Y), is(sum(Z))))
U1_ag(H, X, Y, Z, append2_out_ag(parts(X, Y), is(sum(Z)))) → append2_out_ag(parts(.(H, X), Y), is(sum(.(H, Z))))
U3_ga(L, H, T, append2_out_ag(parts(V, .(H, U)), is(sum(L)))) → U4_ga(L, H, T, V, U, append1_in_ga(parts(V, U), is(sum(W))))
append1_in_ga(parts([], Y), is(sum(Y))) → append1_out_ga(parts([], Y), is(sum(Y)))
append1_in_ga(parts(.(H, X), Y), is(sum(.(H, Z)))) → U2_ga(H, X, Y, Z, append1_in_ga(parts(X, Y), is(sum(Z))))
U2_ga(H, X, Y, Z, append1_out_ga(parts(X, Y), is(sum(Z)))) → append1_out_ga(parts(.(H, X), Y), is(sum(.(H, Z))))
U4_ga(L, H, T, V, U, append1_out_ga(parts(V, U), is(sum(W)))) → U5_ga(L, H, T, perm_in_ga(W, T))
U5_ga(L, H, T, perm_out_ga(W, T)) → perm_out_ga(L, .(H, T))
APPEND1_IN_GA(parts(.(H, X), Y), is(sum(.(H, Z)))) → APPEND1_IN_GA(parts(X, Y), is(sum(Z)))
APPEND1_IN_GA(parts(.(X), Y)) → APPEND1_IN_GA(parts(X, Y))
No rules are removed from R.
APPEND1_IN_GA(parts(.(X), Y)) → APPEND1_IN_GA(parts(X, Y))
POL(.(x1)) = 2·x1
POL(APPEND1_IN_GA(x1)) = 2·x1
POL(parts(x1, x2)) = 2·x1 + x2
APPEND2_IN_AG(parts(.(H, X), Y), is(sum(.(H, Z)))) → APPEND2_IN_AG(parts(X, Y), is(sum(Z)))
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(L, .(H, T)) → U3_ga(L, H, T, append2_in_ag(parts(V, .(H, U)), is(sum(L))))
append2_in_ag(parts([], Y), is(sum(Y))) → append2_out_ag(parts([], Y), is(sum(Y)))
append2_in_ag(parts(.(H, X), Y), is(sum(.(H, Z)))) → U1_ag(H, X, Y, Z, append2_in_ag(parts(X, Y), is(sum(Z))))
U1_ag(H, X, Y, Z, append2_out_ag(parts(X, Y), is(sum(Z)))) → append2_out_ag(parts(.(H, X), Y), is(sum(.(H, Z))))
U3_ga(L, H, T, append2_out_ag(parts(V, .(H, U)), is(sum(L)))) → U4_ga(L, H, T, V, U, append1_in_ga(parts(V, U), is(sum(W))))
append1_in_ga(parts([], Y), is(sum(Y))) → append1_out_ga(parts([], Y), is(sum(Y)))
append1_in_ga(parts(.(H, X), Y), is(sum(.(H, Z)))) → U2_ga(H, X, Y, Z, append1_in_ga(parts(X, Y), is(sum(Z))))
U2_ga(H, X, Y, Z, append1_out_ga(parts(X, Y), is(sum(Z)))) → append1_out_ga(parts(.(H, X), Y), is(sum(.(H, Z))))
U4_ga(L, H, T, V, U, append1_out_ga(parts(V, U), is(sum(W)))) → U5_ga(L, H, T, perm_in_ga(W, T))
U5_ga(L, H, T, perm_out_ga(W, T)) → perm_out_ga(L, .(H, T))
APPEND2_IN_AG(parts(.(H, X), Y), is(sum(.(H, Z)))) → APPEND2_IN_AG(parts(X, Y), is(sum(Z)))
APPEND2_IN_AG(is(sum(.(Z)))) → APPEND2_IN_AG(is(sum(Z)))
No rules are removed from R.
APPEND2_IN_AG(is(sum(.(Z)))) → APPEND2_IN_AG(is(sum(Z)))
POL(.(x1)) = 2·x1
POL(APPEND2_IN_AG(x1)) = 2·x1
POL(is(x1)) = 2·x1
POL(sum(x1)) = 2·x1
U3_GA(L, H, T, append2_out_ag(parts(V, .(H, U)), is(sum(L)))) → U4_GA(L, H, T, V, U, append1_in_ga(parts(V, U), is(sum(W))))
U4_GA(L, H, T, V, U, append1_out_ga(parts(V, U), is(sum(W)))) → PERM_IN_GA(W, T)
PERM_IN_GA(L, .(H, T)) → U3_GA(L, H, T, append2_in_ag(parts(V, .(H, U)), is(sum(L))))
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(L, .(H, T)) → U3_ga(L, H, T, append2_in_ag(parts(V, .(H, U)), is(sum(L))))
append2_in_ag(parts([], Y), is(sum(Y))) → append2_out_ag(parts([], Y), is(sum(Y)))
append2_in_ag(parts(.(H, X), Y), is(sum(.(H, Z)))) → U1_ag(H, X, Y, Z, append2_in_ag(parts(X, Y), is(sum(Z))))
U1_ag(H, X, Y, Z, append2_out_ag(parts(X, Y), is(sum(Z)))) → append2_out_ag(parts(.(H, X), Y), is(sum(.(H, Z))))
U3_ga(L, H, T, append2_out_ag(parts(V, .(H, U)), is(sum(L)))) → U4_ga(L, H, T, V, U, append1_in_ga(parts(V, U), is(sum(W))))
append1_in_ga(parts([], Y), is(sum(Y))) → append1_out_ga(parts([], Y), is(sum(Y)))
append1_in_ga(parts(.(H, X), Y), is(sum(.(H, Z)))) → U2_ga(H, X, Y, Z, append1_in_ga(parts(X, Y), is(sum(Z))))
U2_ga(H, X, Y, Z, append1_out_ga(parts(X, Y), is(sum(Z)))) → append1_out_ga(parts(.(H, X), Y), is(sum(.(H, Z))))
U4_ga(L, H, T, V, U, append1_out_ga(parts(V, U), is(sum(W)))) → U5_ga(L, H, T, perm_in_ga(W, T))
U5_ga(L, H, T, perm_out_ga(W, T)) → perm_out_ga(L, .(H, T))
U3_GA(L, H, T, append2_out_ag(parts(V, .(H, U)), is(sum(L)))) → U4_GA(L, H, T, V, U, append1_in_ga(parts(V, U), is(sum(W))))
U4_GA(L, H, T, V, U, append1_out_ga(parts(V, U), is(sum(W)))) → PERM_IN_GA(W, T)
PERM_IN_GA(L, .(H, T)) → U3_GA(L, H, T, append2_in_ag(parts(V, .(H, U)), is(sum(L))))
append1_in_ga(parts([], Y), is(sum(Y))) → append1_out_ga(parts([], Y), is(sum(Y)))
append1_in_ga(parts(.(H, X), Y), is(sum(.(H, Z)))) → U2_ga(H, X, Y, Z, append1_in_ga(parts(X, Y), is(sum(Z))))
append2_in_ag(parts([], Y), is(sum(Y))) → append2_out_ag(parts([], Y), is(sum(Y)))
append2_in_ag(parts(.(H, X), Y), is(sum(.(H, Z)))) → U1_ag(H, X, Y, Z, append2_in_ag(parts(X, Y), is(sum(Z))))
U2_ga(H, X, Y, Z, append1_out_ga(parts(X, Y), is(sum(Z)))) → append1_out_ga(parts(.(H, X), Y), is(sum(.(H, Z))))
U1_ag(H, X, Y, Z, append2_out_ag(parts(X, Y), is(sum(Z)))) → append2_out_ag(parts(.(H, X), Y), is(sum(.(H, Z))))
U3_GA(L, append2_out_ag(parts(V, .(U)), is(sum(L)))) → U4_GA(L, append1_in_ga(parts(V, U)))
U4_GA(L, append1_out_ga(parts(V, U), is(sum(W)))) → PERM_IN_GA(W)
PERM_IN_GA(L) → U3_GA(L, append2_in_ag(is(sum(L))))
append1_in_ga(parts([], Y)) → append1_out_ga(parts([], Y), is(sum(Y)))
append1_in_ga(parts(.(X), Y)) → U2_ga(X, Y, append1_in_ga(parts(X, Y)))
append2_in_ag(is(sum(Y))) → append2_out_ag(parts([], Y), is(sum(Y)))
append2_in_ag(is(sum(.(Z)))) → U1_ag(Z, append2_in_ag(is(sum(Z))))
U2_ga(X, Y, append1_out_ga(parts(X, Y), is(sum(Z)))) → append1_out_ga(parts(.(X), Y), is(sum(.(Z))))
U1_ag(Z, append2_out_ag(parts(X, Y), is(sum(Z)))) → append2_out_ag(parts(.(X), Y), is(sum(.(Z))))
append1_in_ga(x0)
append2_in_ag(x0)
U2_ga(x0, x1, x2)
U1_ag(x0, x1)