(0) Obligation:

Q restricted rewrite system:
The TRS R consists of the following rules:

t(N) → cs(r(q(N)), nt(ns(N)))
q(0) → 0
q(s(X)) → s(p(q(X), d(X)))
d(0) → 0
d(s(X)) → s(s(d(X)))
p(0, X) → X
p(X, 0) → X
p(s(X), s(Y)) → s(s(p(X, Y)))
f(0, X) → nil
f(s(X), cs(Y, Z)) → cs(Y, nf(X, a(Z)))
t(X) → nt(X)
s(X) → ns(X)
f(X1, X2) → nf(X1, X2)
a(nt(X)) → t(a(X))
a(ns(X)) → s(a(X))
a(nf(X1, X2)) → f(a(X1), a(X2))
a(X) → X

Q is empty.

(1) DependencyPairsProof (EQUIVALENT transformation)

Using Dependency Pairs [AG00,LPAR04] we result in the following initial DP problem.

(2) Obligation:

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

T(N) → Q(N)
Q(s(X)) → S(p(q(X), d(X)))
Q(s(X)) → P(q(X), d(X))
Q(s(X)) → Q(X)
Q(s(X)) → D(X)
D(s(X)) → S(s(d(X)))
D(s(X)) → S(d(X))
D(s(X)) → D(X)
P(s(X), s(Y)) → S(s(p(X, Y)))
P(s(X), s(Y)) → S(p(X, Y))
P(s(X), s(Y)) → P(X, Y)
F(s(X), cs(Y, Z)) → A(Z)
A(nt(X)) → T(a(X))
A(nt(X)) → A(X)
A(ns(X)) → S(a(X))
A(ns(X)) → A(X)
A(nf(X1, X2)) → F(a(X1), a(X2))
A(nf(X1, X2)) → A(X1)
A(nf(X1, X2)) → A(X2)

The TRS R consists of the following rules:

t(N) → cs(r(q(N)), nt(ns(N)))
q(0) → 0
q(s(X)) → s(p(q(X), d(X)))
d(0) → 0
d(s(X)) → s(s(d(X)))
p(0, X) → X
p(X, 0) → X
p(s(X), s(Y)) → s(s(p(X, Y)))
f(0, X) → nil
f(s(X), cs(Y, Z)) → cs(Y, nf(X, a(Z)))
t(X) → nt(X)
s(X) → ns(X)
f(X1, X2) → nf(X1, X2)
a(nt(X)) → t(a(X))
a(ns(X)) → s(a(X))
a(nf(X1, X2)) → f(a(X1), a(X2))
a(X) → X

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

(3) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 4 SCCs with 10 less nodes.

(4) Complex Obligation (AND)

(5) Obligation:

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

P(s(X), s(Y)) → P(X, Y)

The TRS R consists of the following rules:

t(N) → cs(r(q(N)), nt(ns(N)))
q(0) → 0
q(s(X)) → s(p(q(X), d(X)))
d(0) → 0
d(s(X)) → s(s(d(X)))
p(0, X) → X
p(X, 0) → X
p(s(X), s(Y)) → s(s(p(X, Y)))
f(0, X) → nil
f(s(X), cs(Y, Z)) → cs(Y, nf(X, a(Z)))
t(X) → nt(X)
s(X) → ns(X)
f(X1, X2) → nf(X1, X2)
a(nt(X)) → t(a(X))
a(ns(X)) → s(a(X))
a(nf(X1, X2)) → f(a(X1), a(X2))
a(X) → X

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

(6) UsableRulesProof (EQUIVALENT transformation)

We can use the usable rules and reduction pair processor [LPAR04] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its arguments. Then, we can delete all non-usable rules [FROCOS05] from R.

(7) Obligation:

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

P(s(X), s(Y)) → P(X, Y)

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

(8) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • P(s(X), s(Y)) → P(X, Y)
    The graph contains the following edges 1 > 1, 2 > 2

(9) TRUE

(10) Obligation:

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

D(s(X)) → D(X)

The TRS R consists of the following rules:

t(N) → cs(r(q(N)), nt(ns(N)))
q(0) → 0
q(s(X)) → s(p(q(X), d(X)))
d(0) → 0
d(s(X)) → s(s(d(X)))
p(0, X) → X
p(X, 0) → X
p(s(X), s(Y)) → s(s(p(X, Y)))
f(0, X) → nil
f(s(X), cs(Y, Z)) → cs(Y, nf(X, a(Z)))
t(X) → nt(X)
s(X) → ns(X)
f(X1, X2) → nf(X1, X2)
a(nt(X)) → t(a(X))
a(ns(X)) → s(a(X))
a(nf(X1, X2)) → f(a(X1), a(X2))
a(X) → X

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

(11) UsableRulesProof (EQUIVALENT transformation)

We can use the usable rules and reduction pair processor [LPAR04] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its arguments. Then, we can delete all non-usable rules [FROCOS05] from R.

(12) Obligation:

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

D(s(X)) → D(X)

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

(13) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • D(s(X)) → D(X)
    The graph contains the following edges 1 > 1

(14) TRUE

(15) Obligation:

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

Q(s(X)) → Q(X)

The TRS R consists of the following rules:

t(N) → cs(r(q(N)), nt(ns(N)))
q(0) → 0
q(s(X)) → s(p(q(X), d(X)))
d(0) → 0
d(s(X)) → s(s(d(X)))
p(0, X) → X
p(X, 0) → X
p(s(X), s(Y)) → s(s(p(X, Y)))
f(0, X) → nil
f(s(X), cs(Y, Z)) → cs(Y, nf(X, a(Z)))
t(X) → nt(X)
s(X) → ns(X)
f(X1, X2) → nf(X1, X2)
a(nt(X)) → t(a(X))
a(ns(X)) → s(a(X))
a(nf(X1, X2)) → f(a(X1), a(X2))
a(X) → X

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

(16) UsableRulesProof (EQUIVALENT transformation)

We can use the usable rules and reduction pair processor [LPAR04] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its arguments. Then, we can delete all non-usable rules [FROCOS05] from R.

(17) Obligation:

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

Q(s(X)) → Q(X)

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

(18) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • Q(s(X)) → Q(X)
    The graph contains the following edges 1 > 1

(19) TRUE

(20) Obligation:

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

A(nt(X)) → A(X)
A(ns(X)) → A(X)
A(nf(X1, X2)) → F(a(X1), a(X2))
F(s(X), cs(Y, Z)) → A(Z)
A(nf(X1, X2)) → A(X1)
A(nf(X1, X2)) → A(X2)

The TRS R consists of the following rules:

t(N) → cs(r(q(N)), nt(ns(N)))
q(0) → 0
q(s(X)) → s(p(q(X), d(X)))
d(0) → 0
d(s(X)) → s(s(d(X)))
p(0, X) → X
p(X, 0) → X
p(s(X), s(Y)) → s(s(p(X, Y)))
f(0, X) → nil
f(s(X), cs(Y, Z)) → cs(Y, nf(X, a(Z)))
t(X) → nt(X)
s(X) → ns(X)
f(X1, X2) → nf(X1, X2)
a(nt(X)) → t(a(X))
a(ns(X)) → s(a(X))
a(nf(X1, X2)) → f(a(X1), a(X2))
a(X) → X

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

(21) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


A(nt(X)) → A(X)
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial interpretation [POLO]:

POL(0) = 0   
POL(A(x1)) = x1   
POL(F(x1, x2)) = x2   
POL(a(x1)) = x1   
POL(cs(x1, x2)) = x2   
POL(d(x1)) = 0   
POL(f(x1, x2)) = x1 + x2   
POL(nf(x1, x2)) = x1 + x2   
POL(nil) = 0   
POL(ns(x1)) = x1   
POL(nt(x1)) = 1 + x1   
POL(p(x1, x2)) = x1 + x2   
POL(q(x1)) = 0   
POL(r(x1)) = 0   
POL(s(x1)) = x1   
POL(t(x1)) = 1 + x1   

The following usable rules [FROCOS05] were oriented:

t(N) → cs(r(q(N)), nt(ns(N)))
t(X) → nt(X)
s(X) → ns(X)
f(0, X) → nil
f(s(X), cs(Y, Z)) → cs(Y, nf(X, a(Z)))
a(ns(X)) → s(a(X))
a(nf(X1, X2)) → f(a(X1), a(X2))
f(X1, X2) → nf(X1, X2)
a(nt(X)) → t(a(X))
a(X) → X

(22) Obligation:

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

A(ns(X)) → A(X)
A(nf(X1, X2)) → F(a(X1), a(X2))
F(s(X), cs(Y, Z)) → A(Z)
A(nf(X1, X2)) → A(X1)
A(nf(X1, X2)) → A(X2)

The TRS R consists of the following rules:

t(N) → cs(r(q(N)), nt(ns(N)))
q(0) → 0
q(s(X)) → s(p(q(X), d(X)))
d(0) → 0
d(s(X)) → s(s(d(X)))
p(0, X) → X
p(X, 0) → X
p(s(X), s(Y)) → s(s(p(X, Y)))
f(0, X) → nil
f(s(X), cs(Y, Z)) → cs(Y, nf(X, a(Z)))
t(X) → nt(X)
s(X) → ns(X)
f(X1, X2) → nf(X1, X2)
a(nt(X)) → t(a(X))
a(ns(X)) → s(a(X))
a(nf(X1, X2)) → f(a(X1), a(X2))
a(X) → X

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

(23) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


A(ns(X)) → A(X)
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial interpretation [POLO]:

POL(0) = 0   
POL(A(x1)) = x1   
POL(F(x1, x2)) = x2   
POL(a(x1)) = x1   
POL(cs(x1, x2)) = x2   
POL(d(x1)) = 0   
POL(f(x1, x2)) = x1 + x2   
POL(nf(x1, x2)) = x1 + x2   
POL(nil) = 0   
POL(ns(x1)) = 1 + x1   
POL(nt(x1)) = 0   
POL(p(x1, x2)) = 0   
POL(q(x1)) = 1 + x1   
POL(r(x1)) = 0   
POL(s(x1)) = 1 + x1   
POL(t(x1)) = 0   

The following usable rules [FROCOS05] were oriented:

t(N) → cs(r(q(N)), nt(ns(N)))
t(X) → nt(X)
s(X) → ns(X)
f(0, X) → nil
f(s(X), cs(Y, Z)) → cs(Y, nf(X, a(Z)))
a(ns(X)) → s(a(X))
a(nf(X1, X2)) → f(a(X1), a(X2))
f(X1, X2) → nf(X1, X2)
a(nt(X)) → t(a(X))
a(X) → X

(24) Obligation:

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

A(nf(X1, X2)) → F(a(X1), a(X2))
F(s(X), cs(Y, Z)) → A(Z)
A(nf(X1, X2)) → A(X1)
A(nf(X1, X2)) → A(X2)

The TRS R consists of the following rules:

t(N) → cs(r(q(N)), nt(ns(N)))
q(0) → 0
q(s(X)) → s(p(q(X), d(X)))
d(0) → 0
d(s(X)) → s(s(d(X)))
p(0, X) → X
p(X, 0) → X
p(s(X), s(Y)) → s(s(p(X, Y)))
f(0, X) → nil
f(s(X), cs(Y, Z)) → cs(Y, nf(X, a(Z)))
t(X) → nt(X)
s(X) → ns(X)
f(X1, X2) → nf(X1, X2)
a(nt(X)) → t(a(X))
a(ns(X)) → s(a(X))
a(nf(X1, X2)) → f(a(X1), a(X2))
a(X) → X

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

(25) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


F(s(X), cs(Y, Z)) → A(Z)
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial interpretation [POLO]:

POL(0) = 0   
POL(A(x1)) = x1   
POL(F(x1, x2)) = x1 + x2   
POL(a(x1)) = x1   
POL(cs(x1, x2)) = x2   
POL(d(x1)) = 0   
POL(f(x1, x2)) = x1 + x2   
POL(nf(x1, x2)) = x1 + x2   
POL(nil) = 0   
POL(ns(x1)) = 1 + x1   
POL(nt(x1)) = 0   
POL(p(x1, x2)) = x1 + x2   
POL(q(x1)) = 0   
POL(r(x1)) = 0   
POL(s(x1)) = 1 + x1   
POL(t(x1)) = 0   

The following usable rules [FROCOS05] were oriented:

t(N) → cs(r(q(N)), nt(ns(N)))
t(X) → nt(X)
s(X) → ns(X)
f(0, X) → nil
f(s(X), cs(Y, Z)) → cs(Y, nf(X, a(Z)))
a(ns(X)) → s(a(X))
a(nf(X1, X2)) → f(a(X1), a(X2))
f(X1, X2) → nf(X1, X2)
a(nt(X)) → t(a(X))
a(X) → X

(26) Obligation:

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

A(nf(X1, X2)) → F(a(X1), a(X2))
A(nf(X1, X2)) → A(X1)
A(nf(X1, X2)) → A(X2)

The TRS R consists of the following rules:

t(N) → cs(r(q(N)), nt(ns(N)))
q(0) → 0
q(s(X)) → s(p(q(X), d(X)))
d(0) → 0
d(s(X)) → s(s(d(X)))
p(0, X) → X
p(X, 0) → X
p(s(X), s(Y)) → s(s(p(X, Y)))
f(0, X) → nil
f(s(X), cs(Y, Z)) → cs(Y, nf(X, a(Z)))
t(X) → nt(X)
s(X) → ns(X)
f(X1, X2) → nf(X1, X2)
a(nt(X)) → t(a(X))
a(ns(X)) → s(a(X))
a(nf(X1, X2)) → f(a(X1), a(X2))
a(X) → X

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

(27) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 1 less node.

(28) Obligation:

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

A(nf(X1, X2)) → A(X2)
A(nf(X1, X2)) → A(X1)

The TRS R consists of the following rules:

t(N) → cs(r(q(N)), nt(ns(N)))
q(0) → 0
q(s(X)) → s(p(q(X), d(X)))
d(0) → 0
d(s(X)) → s(s(d(X)))
p(0, X) → X
p(X, 0) → X
p(s(X), s(Y)) → s(s(p(X, Y)))
f(0, X) → nil
f(s(X), cs(Y, Z)) → cs(Y, nf(X, a(Z)))
t(X) → nt(X)
s(X) → ns(X)
f(X1, X2) → nf(X1, X2)
a(nt(X)) → t(a(X))
a(ns(X)) → s(a(X))
a(nf(X1, X2)) → f(a(X1), a(X2))
a(X) → X

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

(29) UsableRulesProof (EQUIVALENT transformation)

We can use the usable rules and reduction pair processor [LPAR04] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its arguments. Then, we can delete all non-usable rules [FROCOS05] from R.

(30) Obligation:

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

A(nf(X1, X2)) → A(X2)
A(nf(X1, X2)) → A(X1)

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

(31) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • A(nf(X1, X2)) → A(X2)
    The graph contains the following edges 1 > 1

  • A(nf(X1, X2)) → A(X1)
    The graph contains the following edges 1 > 1

(32) TRUE