(0) Obligation:

Clauses:

append2(parts([], Y), is(sum(Y))).
append2(parts(.(H, X), Y), is(sum(.(H, Z)))) :- append2(parts(X, Y), is(sum(Z))).
append1(parts([], Y), is(sum(Y))).
append1(parts(.(H, X), Y), is(sum(.(H, Z)))) :- append1(parts(X, Y), is(sum(Z))).
perm([], []).
perm(L, .(H, T)) :- ','(append2(parts(V, .(H, U)), is(sum(L))), ','(append1(parts(V, U), is(sum(W))), perm(W, T))).

Queries:

perm(g,a).

(1) PrologToPiTRSProof (SOUND transformation)

We use the technique of [LOPSTR]. With regard to the inferred argument filtering the predicates were used in the following modes:
perm_in: (b,f)
append2_in: (f,b)
append1_in: (b,f)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

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))

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x2)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x4)
append2_in_ag(x1, x2)  =  append2_in_ag(x2)
.(x1, x2)  =  .(x2)
is(x1)  =  is(x1)
sum(x1)  =  sum(x1)
append2_out_ag(x1, x2)  =  append2_out_ag(x1)
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x5)
parts(x1, x2)  =  parts(x1, x2)
U4_ga(x1, x2, x3, x4, x5, x6)  =  U4_ga(x6)
append1_in_ga(x1, x2)  =  append1_in_ga(x1)
append1_out_ga(x1, x2)  =  append1_out_ga(x2)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x5)
U5_ga(x1, x2, x3, x4)  =  U5_ga(x4)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog

(2) Obligation:

Pi-finite rewrite system:
The TRS R consists of the following rules:

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))

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x2)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x4)
append2_in_ag(x1, x2)  =  append2_in_ag(x2)
.(x1, x2)  =  .(x2)
is(x1)  =  is(x1)
sum(x1)  =  sum(x1)
append2_out_ag(x1, x2)  =  append2_out_ag(x1)
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x5)
parts(x1, x2)  =  parts(x1, x2)
U4_ga(x1, x2, x3, x4, x5, x6)  =  U4_ga(x6)
append1_in_ga(x1, x2)  =  append1_in_ga(x1)
append1_out_ga(x1, x2)  =  append1_out_ga(x2)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x5)
U5_ga(x1, x2, x3, x4)  =  U5_ga(x4)

(3) DependencyPairsProof (EQUIVALENT transformation)

Using Dependency Pairs [AG00,LOPSTR] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

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)

The TRS R consists of the following rules:

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))

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x2)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x4)
append2_in_ag(x1, x2)  =  append2_in_ag(x2)
.(x1, x2)  =  .(x2)
is(x1)  =  is(x1)
sum(x1)  =  sum(x1)
append2_out_ag(x1, x2)  =  append2_out_ag(x1)
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x5)
parts(x1, x2)  =  parts(x1, x2)
U4_ga(x1, x2, x3, x4, x5, x6)  =  U4_ga(x6)
append1_in_ga(x1, x2)  =  append1_in_ga(x1)
append1_out_ga(x1, x2)  =  append1_out_ga(x2)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x5)
U5_ga(x1, x2, x3, x4)  =  U5_ga(x4)
PERM_IN_GA(x1, x2)  =  PERM_IN_GA(x1)
U3_GA(x1, x2, x3, x4)  =  U3_GA(x4)
APPEND2_IN_AG(x1, x2)  =  APPEND2_IN_AG(x2)
U1_AG(x1, x2, x3, x4, x5)  =  U1_AG(x5)
U4_GA(x1, x2, x3, x4, x5, x6)  =  U4_GA(x6)
APPEND1_IN_GA(x1, x2)  =  APPEND1_IN_GA(x1)
U2_GA(x1, x2, x3, x4, x5)  =  U2_GA(x5)
U5_GA(x1, x2, x3, x4)  =  U5_GA(x4)

We have to consider all (P,R,Pi)-chains

(4) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

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)

The TRS R consists of the following rules:

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))

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x2)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x4)
append2_in_ag(x1, x2)  =  append2_in_ag(x2)
.(x1, x2)  =  .(x2)
is(x1)  =  is(x1)
sum(x1)  =  sum(x1)
append2_out_ag(x1, x2)  =  append2_out_ag(x1)
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x5)
parts(x1, x2)  =  parts(x1, x2)
U4_ga(x1, x2, x3, x4, x5, x6)  =  U4_ga(x6)
append1_in_ga(x1, x2)  =  append1_in_ga(x1)
append1_out_ga(x1, x2)  =  append1_out_ga(x2)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x5)
U5_ga(x1, x2, x3, x4)  =  U5_ga(x4)
PERM_IN_GA(x1, x2)  =  PERM_IN_GA(x1)
U3_GA(x1, x2, x3, x4)  =  U3_GA(x4)
APPEND2_IN_AG(x1, x2)  =  APPEND2_IN_AG(x2)
U1_AG(x1, x2, x3, x4, x5)  =  U1_AG(x5)
U4_GA(x1, x2, x3, x4, x5, x6)  =  U4_GA(x6)
APPEND1_IN_GA(x1, x2)  =  APPEND1_IN_GA(x1)
U2_GA(x1, x2, x3, x4, x5)  =  U2_GA(x5)
U5_GA(x1, x2, x3, x4)  =  U5_GA(x4)

We have to consider all (P,R,Pi)-chains

(5) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LOPSTR] contains 3 SCCs with 5 less nodes.

(6) Complex Obligation (AND)

(7) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

APPEND1_IN_GA(parts(.(H, X), Y), is(sum(.(H, Z)))) → APPEND1_IN_GA(parts(X, Y), is(sum(Z)))

The TRS R consists of the following rules:

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))

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x2)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x4)
append2_in_ag(x1, x2)  =  append2_in_ag(x2)
.(x1, x2)  =  .(x2)
is(x1)  =  is(x1)
sum(x1)  =  sum(x1)
append2_out_ag(x1, x2)  =  append2_out_ag(x1)
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x5)
parts(x1, x2)  =  parts(x1, x2)
U4_ga(x1, x2, x3, x4, x5, x6)  =  U4_ga(x6)
append1_in_ga(x1, x2)  =  append1_in_ga(x1)
append1_out_ga(x1, x2)  =  append1_out_ga(x2)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x5)
U5_ga(x1, x2, x3, x4)  =  U5_ga(x4)
APPEND1_IN_GA(x1, x2)  =  APPEND1_IN_GA(x1)

We have to consider all (P,R,Pi)-chains

(8) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(9) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

APPEND1_IN_GA(parts(.(H, X), Y), is(sum(.(H, Z)))) → APPEND1_IN_GA(parts(X, Y), is(sum(Z)))

R is empty.
The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x2)
is(x1)  =  is(x1)
sum(x1)  =  sum(x1)
parts(x1, x2)  =  parts(x1, x2)
APPEND1_IN_GA(x1, x2)  =  APPEND1_IN_GA(x1)

We have to consider all (P,R,Pi)-chains

(10) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(11) Obligation:

Q DP problem:
The TRS P consists of the following rules:

APPEND1_IN_GA(parts(.(X), Y)) → APPEND1_IN_GA(parts(X, Y))

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.

(12) UsableRulesReductionPairsProof (EQUIVALENT transformation)

By using the usable rules with reduction pair processor [LPAR04] with a polynomial ordering [POLO], all dependency pairs and the corresponding usable rules [FROCOS05] can be oriented non-strictly. All non-usable rules are removed, and those dependency pairs and usable rules that have been oriented strictly or contain non-usable symbols in their left-hand side are removed as well.

The following dependency pairs can be deleted:

APPEND1_IN_GA(parts(.(X), Y)) → APPEND1_IN_GA(parts(X, Y))
No rules are removed from R.

Used ordering: POLO with Polynomial interpretation [POLO]:

POL(.(x1)) = 2·x1   
POL(APPEND1_IN_GA(x1)) = 2·x1   
POL(parts(x1, x2)) = 2·x1 + x2   

(13) Obligation:

Q DP problem:
P is empty.
R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.

(14) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(15) TRUE

(16) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

APPEND2_IN_AG(parts(.(H, X), Y), is(sum(.(H, Z)))) → APPEND2_IN_AG(parts(X, Y), is(sum(Z)))

The TRS R consists of the following rules:

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))

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x2)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x4)
append2_in_ag(x1, x2)  =  append2_in_ag(x2)
.(x1, x2)  =  .(x2)
is(x1)  =  is(x1)
sum(x1)  =  sum(x1)
append2_out_ag(x1, x2)  =  append2_out_ag(x1)
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x5)
parts(x1, x2)  =  parts(x1, x2)
U4_ga(x1, x2, x3, x4, x5, x6)  =  U4_ga(x6)
append1_in_ga(x1, x2)  =  append1_in_ga(x1)
append1_out_ga(x1, x2)  =  append1_out_ga(x2)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x5)
U5_ga(x1, x2, x3, x4)  =  U5_ga(x4)
APPEND2_IN_AG(x1, x2)  =  APPEND2_IN_AG(x2)

We have to consider all (P,R,Pi)-chains

(17) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(18) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

APPEND2_IN_AG(parts(.(H, X), Y), is(sum(.(H, Z)))) → APPEND2_IN_AG(parts(X, Y), is(sum(Z)))

R is empty.
The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x2)
is(x1)  =  is(x1)
sum(x1)  =  sum(x1)
parts(x1, x2)  =  parts(x1, x2)
APPEND2_IN_AG(x1, x2)  =  APPEND2_IN_AG(x2)

We have to consider all (P,R,Pi)-chains

(19) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(20) Obligation:

Q DP problem:
The TRS P consists of the following rules:

APPEND2_IN_AG(is(sum(.(Z)))) → APPEND2_IN_AG(is(sum(Z)))

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.

(21) UsableRulesReductionPairsProof (EQUIVALENT transformation)

By using the usable rules with reduction pair processor [LPAR04] with a polynomial ordering [POLO], all dependency pairs and the corresponding usable rules [FROCOS05] can be oriented non-strictly. All non-usable rules are removed, and those dependency pairs and usable rules that have been oriented strictly or contain non-usable symbols in their left-hand side are removed as well.

The following dependency pairs can be deleted:

APPEND2_IN_AG(is(sum(.(Z)))) → APPEND2_IN_AG(is(sum(Z)))
No rules are removed from R.

Used ordering: POLO with Polynomial interpretation [POLO]:

POL(.(x1)) = 2·x1   
POL(APPEND2_IN_AG(x1)) = 2·x1   
POL(is(x1)) = 2·x1   
POL(sum(x1)) = 2·x1   

(22) Obligation:

Q DP problem:
P is empty.
R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.

(23) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(24) TRUE

(25) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

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))))

The TRS R consists of the following rules:

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))

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x2)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x4)
append2_in_ag(x1, x2)  =  append2_in_ag(x2)
.(x1, x2)  =  .(x2)
is(x1)  =  is(x1)
sum(x1)  =  sum(x1)
append2_out_ag(x1, x2)  =  append2_out_ag(x1)
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x5)
parts(x1, x2)  =  parts(x1, x2)
U4_ga(x1, x2, x3, x4, x5, x6)  =  U4_ga(x6)
append1_in_ga(x1, x2)  =  append1_in_ga(x1)
append1_out_ga(x1, x2)  =  append1_out_ga(x2)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x5)
U5_ga(x1, x2, x3, x4)  =  U5_ga(x4)
PERM_IN_GA(x1, x2)  =  PERM_IN_GA(x1)
U3_GA(x1, x2, x3, x4)  =  U3_GA(x4)
U4_GA(x1, x2, x3, x4, x5, x6)  =  U4_GA(x6)

We have to consider all (P,R,Pi)-chains

(26) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(27) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

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))))

The TRS R consists of the following rules:

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))))

The argument filtering Pi contains the following mapping:
[]  =  []
append2_in_ag(x1, x2)  =  append2_in_ag(x2)
.(x1, x2)  =  .(x2)
is(x1)  =  is(x1)
sum(x1)  =  sum(x1)
append2_out_ag(x1, x2)  =  append2_out_ag(x1)
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x5)
parts(x1, x2)  =  parts(x1, x2)
append1_in_ga(x1, x2)  =  append1_in_ga(x1)
append1_out_ga(x1, x2)  =  append1_out_ga(x2)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x5)
PERM_IN_GA(x1, x2)  =  PERM_IN_GA(x1)
U3_GA(x1, x2, x3, x4)  =  U3_GA(x4)
U4_GA(x1, x2, x3, x4, x5, x6)  =  U4_GA(x6)

We have to consider all (P,R,Pi)-chains

(28) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(29) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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))))

The TRS R consists of the following rules:

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))

The set Q consists of the following terms:

append1_in_ga(x0)
append2_in_ag(x0)
U2_ga(x0)
U1_ag(x0)

We have to consider all (P,Q,R)-chains.

(30) MRRProof (EQUIVALENT transformation)

By using the rule removal processor [LPAR04] with the following ordering, at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented.
Strictly oriented dependency pairs:

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))))

Strictly oriented rules of the TRS R:

append1_in_ga(parts([], Y)) → append1_out_ga(is(sum(Y)))
append2_in_ag(is(sum(Y))) → append2_out_ag(parts([], Y))

Used ordering: Polynomial interpretation [POLO]:

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   

(31) Obligation:

Q DP problem:
P is empty.
The TRS R consists of the following rules:

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))

The set Q consists of the following terms:

append1_in_ga(x0)
append2_in_ag(x0)
U2_ga(x0)
U1_ag(x0)

We have to consider all (P,Q,R)-chains.

(32) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(33) TRUE

(34) PrologToPiTRSProof (SOUND transformation)

We use the technique of [LOPSTR]. With regard to the inferred argument filtering the predicates were used in the following modes:
perm_in: (b,f)
append2_in: (f,b)
append1_in: (b,f)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

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))

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x1, x2)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x1, x4)
append2_in_ag(x1, x2)  =  append2_in_ag(x2)
.(x1, x2)  =  .(x2)
is(x1)  =  is(x1)
sum(x1)  =  sum(x1)
append2_out_ag(x1, x2)  =  append2_out_ag(x1, x2)
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x4, x5)
parts(x1, x2)  =  parts(x1, x2)
U4_ga(x1, x2, x3, x4, x5, x6)  =  U4_ga(x1, x6)
append1_in_ga(x1, x2)  =  append1_in_ga(x1)
append1_out_ga(x1, x2)  =  append1_out_ga(x1, x2)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x2, x3, x5)
U5_ga(x1, x2, x3, x4)  =  U5_ga(x1, x4)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog

(35) Obligation:

Pi-finite rewrite system:
The TRS R consists of the following rules:

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))

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x1, x2)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x1, x4)
append2_in_ag(x1, x2)  =  append2_in_ag(x2)
.(x1, x2)  =  .(x2)
is(x1)  =  is(x1)
sum(x1)  =  sum(x1)
append2_out_ag(x1, x2)  =  append2_out_ag(x1, x2)
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x4, x5)
parts(x1, x2)  =  parts(x1, x2)
U4_ga(x1, x2, x3, x4, x5, x6)  =  U4_ga(x1, x6)
append1_in_ga(x1, x2)  =  append1_in_ga(x1)
append1_out_ga(x1, x2)  =  append1_out_ga(x1, x2)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x2, x3, x5)
U5_ga(x1, x2, x3, x4)  =  U5_ga(x1, x4)

(36) DependencyPairsProof (EQUIVALENT transformation)

Using Dependency Pairs [AG00,LOPSTR] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

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)

The TRS R consists of the following rules:

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))

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x1, x2)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x1, x4)
append2_in_ag(x1, x2)  =  append2_in_ag(x2)
.(x1, x2)  =  .(x2)
is(x1)  =  is(x1)
sum(x1)  =  sum(x1)
append2_out_ag(x1, x2)  =  append2_out_ag(x1, x2)
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x4, x5)
parts(x1, x2)  =  parts(x1, x2)
U4_ga(x1, x2, x3, x4, x5, x6)  =  U4_ga(x1, x6)
append1_in_ga(x1, x2)  =  append1_in_ga(x1)
append1_out_ga(x1, x2)  =  append1_out_ga(x1, x2)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x2, x3, x5)
U5_ga(x1, x2, x3, x4)  =  U5_ga(x1, x4)
PERM_IN_GA(x1, x2)  =  PERM_IN_GA(x1)
U3_GA(x1, x2, x3, x4)  =  U3_GA(x1, x4)
APPEND2_IN_AG(x1, x2)  =  APPEND2_IN_AG(x2)
U1_AG(x1, x2, x3, x4, x5)  =  U1_AG(x4, x5)
U4_GA(x1, x2, x3, x4, x5, x6)  =  U4_GA(x1, x6)
APPEND1_IN_GA(x1, x2)  =  APPEND1_IN_GA(x1)
U2_GA(x1, x2, x3, x4, x5)  =  U2_GA(x2, x3, x5)
U5_GA(x1, x2, x3, x4)  =  U5_GA(x1, x4)

We have to consider all (P,R,Pi)-chains

(37) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

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)

The TRS R consists of the following rules:

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))

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x1, x2)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x1, x4)
append2_in_ag(x1, x2)  =  append2_in_ag(x2)
.(x1, x2)  =  .(x2)
is(x1)  =  is(x1)
sum(x1)  =  sum(x1)
append2_out_ag(x1, x2)  =  append2_out_ag(x1, x2)
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x4, x5)
parts(x1, x2)  =  parts(x1, x2)
U4_ga(x1, x2, x3, x4, x5, x6)  =  U4_ga(x1, x6)
append1_in_ga(x1, x2)  =  append1_in_ga(x1)
append1_out_ga(x1, x2)  =  append1_out_ga(x1, x2)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x2, x3, x5)
U5_ga(x1, x2, x3, x4)  =  U5_ga(x1, x4)
PERM_IN_GA(x1, x2)  =  PERM_IN_GA(x1)
U3_GA(x1, x2, x3, x4)  =  U3_GA(x1, x4)
APPEND2_IN_AG(x1, x2)  =  APPEND2_IN_AG(x2)
U1_AG(x1, x2, x3, x4, x5)  =  U1_AG(x4, x5)
U4_GA(x1, x2, x3, x4, x5, x6)  =  U4_GA(x1, x6)
APPEND1_IN_GA(x1, x2)  =  APPEND1_IN_GA(x1)
U2_GA(x1, x2, x3, x4, x5)  =  U2_GA(x2, x3, x5)
U5_GA(x1, x2, x3, x4)  =  U5_GA(x1, x4)

We have to consider all (P,R,Pi)-chains

(38) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LOPSTR] contains 3 SCCs with 5 less nodes.

(39) Complex Obligation (AND)

(40) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

APPEND1_IN_GA(parts(.(H, X), Y), is(sum(.(H, Z)))) → APPEND1_IN_GA(parts(X, Y), is(sum(Z)))

The TRS R consists of the following rules:

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))

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x1, x2)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x1, x4)
append2_in_ag(x1, x2)  =  append2_in_ag(x2)
.(x1, x2)  =  .(x2)
is(x1)  =  is(x1)
sum(x1)  =  sum(x1)
append2_out_ag(x1, x2)  =  append2_out_ag(x1, x2)
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x4, x5)
parts(x1, x2)  =  parts(x1, x2)
U4_ga(x1, x2, x3, x4, x5, x6)  =  U4_ga(x1, x6)
append1_in_ga(x1, x2)  =  append1_in_ga(x1)
append1_out_ga(x1, x2)  =  append1_out_ga(x1, x2)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x2, x3, x5)
U5_ga(x1, x2, x3, x4)  =  U5_ga(x1, x4)
APPEND1_IN_GA(x1, x2)  =  APPEND1_IN_GA(x1)

We have to consider all (P,R,Pi)-chains

(41) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(42) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

APPEND1_IN_GA(parts(.(H, X), Y), is(sum(.(H, Z)))) → APPEND1_IN_GA(parts(X, Y), is(sum(Z)))

R is empty.
The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x2)
is(x1)  =  is(x1)
sum(x1)  =  sum(x1)
parts(x1, x2)  =  parts(x1, x2)
APPEND1_IN_GA(x1, x2)  =  APPEND1_IN_GA(x1)

We have to consider all (P,R,Pi)-chains

(43) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(44) Obligation:

Q DP problem:
The TRS P consists of the following rules:

APPEND1_IN_GA(parts(.(X), Y)) → APPEND1_IN_GA(parts(X, Y))

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.

(45) UsableRulesReductionPairsProof (EQUIVALENT transformation)

By using the usable rules with reduction pair processor [LPAR04] with a polynomial ordering [POLO], all dependency pairs and the corresponding usable rules [FROCOS05] can be oriented non-strictly. All non-usable rules are removed, and those dependency pairs and usable rules that have been oriented strictly or contain non-usable symbols in their left-hand side are removed as well.

The following dependency pairs can be deleted:

APPEND1_IN_GA(parts(.(X), Y)) → APPEND1_IN_GA(parts(X, Y))
No rules are removed from R.

Used ordering: POLO with Polynomial interpretation [POLO]:

POL(.(x1)) = 2·x1   
POL(APPEND1_IN_GA(x1)) = 2·x1   
POL(parts(x1, x2)) = 2·x1 + x2   

(46) Obligation:

Q DP problem:
P is empty.
R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.

(47) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(48) TRUE

(49) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

APPEND2_IN_AG(parts(.(H, X), Y), is(sum(.(H, Z)))) → APPEND2_IN_AG(parts(X, Y), is(sum(Z)))

The TRS R consists of the following rules:

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))

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x1, x2)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x1, x4)
append2_in_ag(x1, x2)  =  append2_in_ag(x2)
.(x1, x2)  =  .(x2)
is(x1)  =  is(x1)
sum(x1)  =  sum(x1)
append2_out_ag(x1, x2)  =  append2_out_ag(x1, x2)
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x4, x5)
parts(x1, x2)  =  parts(x1, x2)
U4_ga(x1, x2, x3, x4, x5, x6)  =  U4_ga(x1, x6)
append1_in_ga(x1, x2)  =  append1_in_ga(x1)
append1_out_ga(x1, x2)  =  append1_out_ga(x1, x2)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x2, x3, x5)
U5_ga(x1, x2, x3, x4)  =  U5_ga(x1, x4)
APPEND2_IN_AG(x1, x2)  =  APPEND2_IN_AG(x2)

We have to consider all (P,R,Pi)-chains

(50) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(51) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

APPEND2_IN_AG(parts(.(H, X), Y), is(sum(.(H, Z)))) → APPEND2_IN_AG(parts(X, Y), is(sum(Z)))

R is empty.
The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x2)
is(x1)  =  is(x1)
sum(x1)  =  sum(x1)
parts(x1, x2)  =  parts(x1, x2)
APPEND2_IN_AG(x1, x2)  =  APPEND2_IN_AG(x2)

We have to consider all (P,R,Pi)-chains

(52) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(53) Obligation:

Q DP problem:
The TRS P consists of the following rules:

APPEND2_IN_AG(is(sum(.(Z)))) → APPEND2_IN_AG(is(sum(Z)))

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.

(54) UsableRulesReductionPairsProof (EQUIVALENT transformation)

By using the usable rules with reduction pair processor [LPAR04] with a polynomial ordering [POLO], all dependency pairs and the corresponding usable rules [FROCOS05] can be oriented non-strictly. All non-usable rules are removed, and those dependency pairs and usable rules that have been oriented strictly or contain non-usable symbols in their left-hand side are removed as well.

The following dependency pairs can be deleted:

APPEND2_IN_AG(is(sum(.(Z)))) → APPEND2_IN_AG(is(sum(Z)))
No rules are removed from R.

Used ordering: POLO with Polynomial interpretation [POLO]:

POL(.(x1)) = 2·x1   
POL(APPEND2_IN_AG(x1)) = 2·x1   
POL(is(x1)) = 2·x1   
POL(sum(x1)) = 2·x1   

(55) Obligation:

Q DP problem:
P is empty.
R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.

(56) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(57) TRUE

(58) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

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))))

The TRS R consists of the following rules:

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))

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x1, x2)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x1, x4)
append2_in_ag(x1, x2)  =  append2_in_ag(x2)
.(x1, x2)  =  .(x2)
is(x1)  =  is(x1)
sum(x1)  =  sum(x1)
append2_out_ag(x1, x2)  =  append2_out_ag(x1, x2)
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x4, x5)
parts(x1, x2)  =  parts(x1, x2)
U4_ga(x1, x2, x3, x4, x5, x6)  =  U4_ga(x1, x6)
append1_in_ga(x1, x2)  =  append1_in_ga(x1)
append1_out_ga(x1, x2)  =  append1_out_ga(x1, x2)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x2, x3, x5)
U5_ga(x1, x2, x3, x4)  =  U5_ga(x1, x4)
PERM_IN_GA(x1, x2)  =  PERM_IN_GA(x1)
U3_GA(x1, x2, x3, x4)  =  U3_GA(x1, x4)
U4_GA(x1, x2, x3, x4, x5, x6)  =  U4_GA(x1, x6)

We have to consider all (P,R,Pi)-chains

(59) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(60) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

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))))

The TRS R consists of the following rules:

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))))

The argument filtering Pi contains the following mapping:
[]  =  []
append2_in_ag(x1, x2)  =  append2_in_ag(x2)
.(x1, x2)  =  .(x2)
is(x1)  =  is(x1)
sum(x1)  =  sum(x1)
append2_out_ag(x1, x2)  =  append2_out_ag(x1, x2)
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x4, x5)
parts(x1, x2)  =  parts(x1, x2)
append1_in_ga(x1, x2)  =  append1_in_ga(x1)
append1_out_ga(x1, x2)  =  append1_out_ga(x1, x2)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x2, x3, x5)
PERM_IN_GA(x1, x2)  =  PERM_IN_GA(x1)
U3_GA(x1, x2, x3, x4)  =  U3_GA(x1, x4)
U4_GA(x1, x2, x3, x4, x5, x6)  =  U4_GA(x1, x6)

We have to consider all (P,R,Pi)-chains

(61) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(62) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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))))

The TRS R consists of the following rules:

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))))

The set Q consists of the following terms:

append1_in_ga(x0)
append2_in_ag(x0)
U2_ga(x0, x1, x2)
U1_ag(x0, x1)

We have to consider all (P,Q,R)-chains.