YES Termination w.r.t. Q proof of Transformed_CSR_04_Ex26_Luc03b_FR.ari

(0) Obligation:

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

terms(N) → cons(recip(sqr(N)), n__terms(n__s(N)))
sqr(0) → 0
sqr(s(X)) → s(n__add(n__sqr(activate(X)), n__dbl(activate(X))))
dbl(0) → 0
dbl(s(X)) → s(n__s(n__dbl(activate(X))))
add(0, X) → X
add(s(X), Y) → s(n__add(activate(X), Y))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(activate(X), activate(Z)))
terms(X) → n__terms(X)
s(X) → n__s(X)
add(X1, X2) → n__add(X1, X2)
sqr(X) → n__sqr(X)
dbl(X) → n__dbl(X)
first(X1, X2) → n__first(X1, X2)
activate(n__terms(X)) → terms(activate(X))
activate(n__s(X)) → s(X)
activate(n__add(X1, X2)) → add(activate(X1), activate(X2))
activate(n__sqr(X)) → sqr(activate(X))
activate(n__dbl(X)) → dbl(activate(X))
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(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:

TERMS(N) → SQR(N)
SQR(s(X)) → S(n__add(n__sqr(activate(X)), n__dbl(activate(X))))
SQR(s(X)) → ACTIVATE(X)
DBL(s(X)) → S(n__s(n__dbl(activate(X))))
DBL(s(X)) → ACTIVATE(X)
ADD(s(X), Y) → S(n__add(activate(X), Y))
ADD(s(X), Y) → ACTIVATE(X)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(X)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__terms(X)) → TERMS(activate(X))
ACTIVATE(n__terms(X)) → ACTIVATE(X)
ACTIVATE(n__s(X)) → S(X)
ACTIVATE(n__add(X1, X2)) → ADD(activate(X1), activate(X2))
ACTIVATE(n__add(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__add(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sqr(X)) → SQR(activate(X))
ACTIVATE(n__sqr(X)) → ACTIVATE(X)
ACTIVATE(n__dbl(X)) → DBL(activate(X))
ACTIVATE(n__dbl(X)) → ACTIVATE(X)
ACTIVATE(n__first(X1, X2)) → FIRST(activate(X1), activate(X2))
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)

The TRS R consists of the following rules:

terms(N) → cons(recip(sqr(N)), n__terms(n__s(N)))
sqr(0) → 0
sqr(s(X)) → s(n__add(n__sqr(activate(X)), n__dbl(activate(X))))
dbl(0) → 0
dbl(s(X)) → s(n__s(n__dbl(activate(X))))
add(0, X) → X
add(s(X), Y) → s(n__add(activate(X), Y))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(activate(X), activate(Z)))
terms(X) → n__terms(X)
s(X) → n__s(X)
add(X1, X2) → n__add(X1, X2)
sqr(X) → n__sqr(X)
dbl(X) → n__dbl(X)
first(X1, X2) → n__first(X1, X2)
activate(n__terms(X)) → terms(activate(X))
activate(n__s(X)) → s(X)
activate(n__add(X1, X2)) → add(activate(X1), activate(X2))
activate(n__sqr(X)) → sqr(activate(X))
activate(n__dbl(X)) → dbl(activate(X))
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(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 1 SCC with 4 less nodes.

(4) Obligation:

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

SQR(s(X)) → ACTIVATE(X)
ACTIVATE(n__terms(X)) → TERMS(activate(X))
TERMS(N) → SQR(N)
ACTIVATE(n__terms(X)) → ACTIVATE(X)
ACTIVATE(n__add(X1, X2)) → ADD(activate(X1), activate(X2))
ADD(s(X), Y) → ACTIVATE(X)
ACTIVATE(n__add(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__add(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sqr(X)) → SQR(activate(X))
ACTIVATE(n__sqr(X)) → ACTIVATE(X)
ACTIVATE(n__dbl(X)) → DBL(activate(X))
DBL(s(X)) → ACTIVATE(X)
ACTIVATE(n__dbl(X)) → ACTIVATE(X)
ACTIVATE(n__first(X1, X2)) → FIRST(activate(X1), activate(X2))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(X)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)

The TRS R consists of the following rules:

terms(N) → cons(recip(sqr(N)), n__terms(n__s(N)))
sqr(0) → 0
sqr(s(X)) → s(n__add(n__sqr(activate(X)), n__dbl(activate(X))))
dbl(0) → 0
dbl(s(X)) → s(n__s(n__dbl(activate(X))))
add(0, X) → X
add(s(X), Y) → s(n__add(activate(X), Y))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(activate(X), activate(Z)))
terms(X) → n__terms(X)
s(X) → n__s(X)
add(X1, X2) → n__add(X1, X2)
sqr(X) → n__sqr(X)
dbl(X) → n__dbl(X)
first(X1, X2) → n__first(X1, X2)
activate(n__terms(X)) → terms(activate(X))
activate(n__s(X)) → s(X)
activate(n__add(X1, X2)) → add(activate(X1), activate(X2))
activate(n__sqr(X)) → sqr(activate(X))
activate(n__dbl(X)) → dbl(activate(X))
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(X) → X

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

(5) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04,JAR06].


The following pairs can be oriented strictly and are deleted.


ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
The remaining pairs can at least be oriented weakly.
Used ordering: Matrix interpretation [MATRO] with arctic natural numbers [ARCTIC]:

POL(SQR(x1)) = 0A + 1A·x1

POL(s(x1)) = -I + 0A·x1

POL(ACTIVATE(x1)) = 0A + 0A·x1

POL(n__terms(x1)) = -I + 5A·x1

POL(TERMS(x1)) = 0A + 5A·x1

POL(activate(x1)) = -I + 0A·x1

POL(n__add(x1, x2)) = -I + 0A·x1 + 1A·x2

POL(ADD(x1, x2)) = 0A + 0A·x1 + -I·x2

POL(n__sqr(x1)) = -I + 3A·x1

POL(n__dbl(x1)) = -I + 1A·x1

POL(DBL(x1)) = 0A + 0A·x1

POL(n__first(x1, x2)) = 1A + 2A·x1 + 0A·x2

POL(FIRST(x1, x2)) = 0A + 2A·x1 + 0A·x2

POL(cons(x1, x2)) = -I + -I·x1 + 0A·x2

POL(terms(x1)) = -I + 5A·x1

POL(n__s(x1)) = -I + 0A·x1

POL(add(x1, x2)) = -I + 0A·x1 + 1A·x2

POL(sqr(x1)) = -I + 3A·x1

POL(dbl(x1)) = -I + 1A·x1

POL(first(x1, x2)) = 1A + 2A·x1 + 0A·x2

POL(0) = 0A

POL(nil) = 1A

POL(recip(x1)) = -I + 4A·x1

The following usable rules [FROCOS05] with respect to the argument filtering of the ordering [JAR06] were oriented:

activate(n__terms(X)) → terms(activate(X))
activate(n__s(X)) → s(X)
activate(n__add(X1, X2)) → add(activate(X1), activate(X2))
activate(n__sqr(X)) → sqr(activate(X))
activate(n__dbl(X)) → dbl(activate(X))
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(X) → X
sqr(s(X)) → s(n__add(n__sqr(activate(X)), n__dbl(activate(X))))
s(X) → n__s(X)
terms(X) → n__terms(X)
add(0, X) → X
add(X1, X2) → n__add(X1, X2)
sqr(0) → 0
sqr(X) → n__sqr(X)
dbl(0) → 0
dbl(X) → n__dbl(X)
first(0, X) → nil
first(X1, X2) → n__first(X1, X2)
first(s(X), cons(Y, Z)) → cons(Y, n__first(activate(X), activate(Z)))
dbl(s(X)) → s(n__s(n__dbl(activate(X))))
add(s(X), Y) → s(n__add(activate(X), Y))
terms(N) → cons(recip(sqr(N)), n__terms(n__s(N)))

(6) Obligation:

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

SQR(s(X)) → ACTIVATE(X)
ACTIVATE(n__terms(X)) → TERMS(activate(X))
TERMS(N) → SQR(N)
ACTIVATE(n__terms(X)) → ACTIVATE(X)
ACTIVATE(n__add(X1, X2)) → ADD(activate(X1), activate(X2))
ADD(s(X), Y) → ACTIVATE(X)
ACTIVATE(n__add(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__add(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sqr(X)) → SQR(activate(X))
ACTIVATE(n__sqr(X)) → ACTIVATE(X)
ACTIVATE(n__dbl(X)) → DBL(activate(X))
DBL(s(X)) → ACTIVATE(X)
ACTIVATE(n__dbl(X)) → ACTIVATE(X)
ACTIVATE(n__first(X1, X2)) → FIRST(activate(X1), activate(X2))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(X)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)

The TRS R consists of the following rules:

terms(N) → cons(recip(sqr(N)), n__terms(n__s(N)))
sqr(0) → 0
sqr(s(X)) → s(n__add(n__sqr(activate(X)), n__dbl(activate(X))))
dbl(0) → 0
dbl(s(X)) → s(n__s(n__dbl(activate(X))))
add(0, X) → X
add(s(X), Y) → s(n__add(activate(X), Y))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(activate(X), activate(Z)))
terms(X) → n__terms(X)
s(X) → n__s(X)
add(X1, X2) → n__add(X1, X2)
sqr(X) → n__sqr(X)
dbl(X) → n__dbl(X)
first(X1, X2) → n__first(X1, X2)
activate(n__terms(X)) → terms(activate(X))
activate(n__s(X)) → s(X)
activate(n__add(X1, X2)) → add(activate(X1), activate(X2))
activate(n__sqr(X)) → sqr(activate(X))
activate(n__dbl(X)) → dbl(activate(X))
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(X) → X

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

(7) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04,JAR06].


The following pairs can be oriented strictly and are deleted.


ACTIVATE(n__terms(X)) → TERMS(activate(X))
TERMS(N) → SQR(N)
ACTIVATE(n__terms(X)) → ACTIVATE(X)
The remaining pairs can at least be oriented weakly.
Used ordering: Matrix interpretation [MATRO] with arctic natural numbers [ARCTIC]:

POL(SQR(x1)) = 2A + 1A·x1

POL(s(x1)) = -I + 0A·x1

POL(ACTIVATE(x1)) = 2A + 0A·x1

POL(n__terms(x1)) = 5A + 5A·x1

POL(TERMS(x1)) = 3A + 4A·x1

POL(activate(x1)) = -I + 0A·x1

POL(n__add(x1, x2)) = -I + 0A·x1 + 0A·x2

POL(ADD(x1, x2)) = 2A + 0A·x1 + -I·x2

POL(n__sqr(x1)) = -I + 1A·x1

POL(n__dbl(x1)) = -I + 1A·x1

POL(DBL(x1)) = 2A + 0A·x1

POL(n__first(x1, x2)) = -I + 5A·x1 + 0A·x2

POL(FIRST(x1, x2)) = 2A + 5A·x1 + 0A·x2

POL(cons(x1, x2)) = -I + 0A·x1 + 0A·x2

POL(terms(x1)) = 5A + 5A·x1

POL(n__s(x1)) = -I + 0A·x1

POL(add(x1, x2)) = -I + 0A·x1 + 0A·x2

POL(sqr(x1)) = -I + 1A·x1

POL(dbl(x1)) = -I + 1A·x1

POL(first(x1, x2)) = -I + 5A·x1 + 0A·x2

POL(0) = 3A

POL(nil) = 1A

POL(recip(x1)) = -I + 3A·x1

The following usable rules [FROCOS05] with respect to the argument filtering of the ordering [JAR06] were oriented:

activate(n__terms(X)) → terms(activate(X))
activate(n__s(X)) → s(X)
activate(n__add(X1, X2)) → add(activate(X1), activate(X2))
activate(n__sqr(X)) → sqr(activate(X))
activate(n__dbl(X)) → dbl(activate(X))
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(X) → X
sqr(s(X)) → s(n__add(n__sqr(activate(X)), n__dbl(activate(X))))
s(X) → n__s(X)
terms(X) → n__terms(X)
add(0, X) → X
add(X1, X2) → n__add(X1, X2)
sqr(0) → 0
sqr(X) → n__sqr(X)
dbl(0) → 0
dbl(X) → n__dbl(X)
first(0, X) → nil
first(X1, X2) → n__first(X1, X2)
first(s(X), cons(Y, Z)) → cons(Y, n__first(activate(X), activate(Z)))
dbl(s(X)) → s(n__s(n__dbl(activate(X))))
add(s(X), Y) → s(n__add(activate(X), Y))
terms(N) → cons(recip(sqr(N)), n__terms(n__s(N)))

(8) Obligation:

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

SQR(s(X)) → ACTIVATE(X)
ACTIVATE(n__add(X1, X2)) → ADD(activate(X1), activate(X2))
ADD(s(X), Y) → ACTIVATE(X)
ACTIVATE(n__add(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__add(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sqr(X)) → SQR(activate(X))
ACTIVATE(n__sqr(X)) → ACTIVATE(X)
ACTIVATE(n__dbl(X)) → DBL(activate(X))
DBL(s(X)) → ACTIVATE(X)
ACTIVATE(n__dbl(X)) → ACTIVATE(X)
ACTIVATE(n__first(X1, X2)) → FIRST(activate(X1), activate(X2))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(X)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)

The TRS R consists of the following rules:

terms(N) → cons(recip(sqr(N)), n__terms(n__s(N)))
sqr(0) → 0
sqr(s(X)) → s(n__add(n__sqr(activate(X)), n__dbl(activate(X))))
dbl(0) → 0
dbl(s(X)) → s(n__s(n__dbl(activate(X))))
add(0, X) → X
add(s(X), Y) → s(n__add(activate(X), Y))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(activate(X), activate(Z)))
terms(X) → n__terms(X)
s(X) → n__s(X)
add(X1, X2) → n__add(X1, X2)
sqr(X) → n__sqr(X)
dbl(X) → n__dbl(X)
first(X1, X2) → n__first(X1, X2)
activate(n__terms(X)) → terms(activate(X))
activate(n__s(X)) → s(X)
activate(n__add(X1, X2)) → add(activate(X1), activate(X2))
activate(n__sqr(X)) → sqr(activate(X))
activate(n__dbl(X)) → dbl(activate(X))
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(X) → X

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

(9) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04,JAR06].


The following pairs can be oriented strictly and are deleted.


SQR(s(X)) → ACTIVATE(X)
ACTIVATE(n__add(X1, X2)) → ADD(activate(X1), activate(X2))
ACTIVATE(n__add(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__add(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sqr(X)) → SQR(activate(X))
ACTIVATE(n__sqr(X)) → ACTIVATE(X)
ACTIVATE(n__dbl(X)) → DBL(activate(X))
DBL(s(X)) → ACTIVATE(X)
ACTIVATE(n__dbl(X)) → ACTIVATE(X)
ACTIVATE(n__first(X1, X2)) → FIRST(activate(X1), activate(X2))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(X)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
SQR(x1)  =  SQR(x1)
s(x1)  =  s(x1)
ACTIVATE(x1)  =  ACTIVATE(x1)
n__add(x1, x2)  =  n__add(x1, x2)
ADD(x1, x2)  =  x1
activate(x1)  =  x1
n__sqr(x1)  =  n__sqr(x1)
n__dbl(x1)  =  n__dbl(x1)
DBL(x1)  =  DBL(x1)
n__first(x1, x2)  =  n__first(x1, x2)
FIRST(x1, x2)  =  FIRST(x1, x2)
cons(x1, x2)  =  x2
n__terms(x1)  =  n__terms
terms(x1)  =  terms
n__s(x1)  =  n__s(x1)
add(x1, x2)  =  add(x1, x2)
sqr(x1)  =  sqr(x1)
dbl(x1)  =  dbl(x1)
first(x1, x2)  =  first(x1, x2)
0  =  0
nil  =  nil
recip(x1)  =  recip

Recursive path order with status [RPO].
Quasi-Precedence:
[nsqr1, ndbl1, sqr1, dbl1] > SQR1 > [s1, ACTIVATE1, DBL1, FIRST2, ns1, recip]
[nsqr1, ndbl1, sqr1, dbl1] > [nadd2, add2] > [s1, ACTIVATE1, DBL1, FIRST2, ns1, recip]
[nsqr1, ndbl1, sqr1, dbl1] > 0 > nil > [s1, ACTIVATE1, DBL1, FIRST2, ns1, recip]
[nfirst2, first2] > nil > [s1, ACTIVATE1, DBL1, FIRST2, ns1, recip]
[nterms, terms] > [s1, ACTIVATE1, DBL1, FIRST2, ns1, recip]

Status:
SQR1: [1]
s1: [1]
ACTIVATE1: [1]
nadd2: multiset
nsqr1: [1]
ndbl1: [1]
DBL1: [1]
nfirst2: multiset
FIRST2: [2,1]
nterms: multiset
terms: multiset
ns1: [1]
add2: multiset
sqr1: [1]
dbl1: [1]
first2: multiset
0: multiset
nil: multiset
recip: multiset


The following usable rules [FROCOS05] with respect to the argument filtering of the ordering [JAR06] were oriented:

activate(n__terms(X)) → terms(activate(X))
activate(n__s(X)) → s(X)
activate(n__add(X1, X2)) → add(activate(X1), activate(X2))
activate(n__sqr(X)) → sqr(activate(X))
activate(n__dbl(X)) → dbl(activate(X))
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(X) → X
sqr(s(X)) → s(n__add(n__sqr(activate(X)), n__dbl(activate(X))))
s(X) → n__s(X)
terms(X) → n__terms(X)
add(0, X) → X
add(X1, X2) → n__add(X1, X2)
sqr(0) → 0
sqr(X) → n__sqr(X)
dbl(0) → 0
dbl(X) → n__dbl(X)
first(0, X) → nil
first(X1, X2) → n__first(X1, X2)
first(s(X), cons(Y, Z)) → cons(Y, n__first(activate(X), activate(Z)))
dbl(s(X)) → s(n__s(n__dbl(activate(X))))
add(s(X), Y) → s(n__add(activate(X), Y))
terms(N) → cons(recip(sqr(N)), n__terms(n__s(N)))

(10) Obligation:

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

ADD(s(X), Y) → ACTIVATE(X)

The TRS R consists of the following rules:

terms(N) → cons(recip(sqr(N)), n__terms(n__s(N)))
sqr(0) → 0
sqr(s(X)) → s(n__add(n__sqr(activate(X)), n__dbl(activate(X))))
dbl(0) → 0
dbl(s(X)) → s(n__s(n__dbl(activate(X))))
add(0, X) → X
add(s(X), Y) → s(n__add(activate(X), Y))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(activate(X), activate(Z)))
terms(X) → n__terms(X)
s(X) → n__s(X)
add(X1, X2) → n__add(X1, X2)
sqr(X) → n__sqr(X)
dbl(X) → n__dbl(X)
first(X1, X2) → n__first(X1, X2)
activate(n__terms(X)) → terms(activate(X))
activate(n__s(X)) → s(X)
activate(n__add(X1, X2)) → add(activate(X1), activate(X2))
activate(n__sqr(X)) → sqr(activate(X))
activate(n__dbl(X)) → dbl(activate(X))
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(X) → X

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

(11) DependencyGraphProof (EQUIVALENT transformation)

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

(12) TRUE