(0) Obligation:

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

terms(N) → cons(recip(sqr(N)), n__terms(s(N)))
sqr(0) → 0
sqr(s(X)) → s(n__add(sqr(activate(X)), 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)
add(X1, X2) → n__add(X1, X2)
s(X) → n__s(X)
dbl(X) → n__dbl(X)
first(X1, X2) → n__first(X1, X2)
activate(n__terms(X)) → terms(X)
activate(n__add(X1, X2)) → add(X1, X2)
activate(n__s(X)) → s(X)
activate(n__dbl(X)) → dbl(X)
activate(n__first(X1, X2)) → first(X1, 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)
TERMS(N) → S(N)
SQR(s(X)) → S(n__add(sqr(activate(X)), dbl(activate(X))))
SQR(s(X)) → SQR(activate(X))
SQR(s(X)) → ACTIVATE(X)
SQR(s(X)) → DBL(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(X)
ACTIVATE(n__add(X1, X2)) → ADD(X1, X2)
ACTIVATE(n__s(X)) → S(X)
ACTIVATE(n__dbl(X)) → DBL(X)
ACTIVATE(n__first(X1, X2)) → FIRST(X1, X2)

The TRS R consists of the following rules:

terms(N) → cons(recip(sqr(N)), n__terms(s(N)))
sqr(0) → 0
sqr(s(X)) → s(n__add(sqr(activate(X)), 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)
add(X1, X2) → n__add(X1, X2)
s(X) → n__s(X)
dbl(X) → n__dbl(X)
first(X1, X2) → n__first(X1, X2)
activate(n__terms(X)) → terms(X)
activate(n__add(X1, X2)) → add(X1, X2)
activate(n__s(X)) → s(X)
activate(n__dbl(X)) → dbl(X)
activate(n__first(X1, X2)) → first(X1, 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 5 less nodes.

(4) Obligation:

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

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

The TRS R consists of the following rules:

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


The following pairs can be oriented strictly and are deleted.


ACTIVATE(n__add(X1, X2)) → ADD(X1, X2)
ADD(s(X), Y) → ACTIVATE(X)
ACTIVATE(n__dbl(X)) → DBL(X)
ACTIVATE(n__first(X1, X2)) → FIRST(X1, X2)
The remaining pairs can at least be oriented weakly.
Used ordering: SCNP Order with the following components:
Level mapping:
Top level AFS:
SQR(x1)  =  SQR(x1)
ACTIVATE(x1)  =  ACTIVATE(x1)
TERMS(x1)  =  TERMS(x1)
DBL(x1)  =  DBL(x1)
ADD(x1, x2)  =  ADD(x1)
FIRST(x1, x2)  =  FIRST(x1, x2)

Tags:
SQR has tags [0]
ACTIVATE has tags [0]
TERMS has tags [0]
DBL has tags [0]
ADD has tags [2,7]
FIRST has tags [0,0]

Comparison: MAX
Underlying order for the size change arcs and the rules of R:
Combined order from the following AFS and order.
s(x1)  =  x1
activate(x1)  =  x1
n__terms(x1)  =  x1
n__add(x1, x2)  =  n__add(x1, x2)
n__dbl(x1)  =  n__dbl(x1)
n__first(x1, x2)  =  n__first(x1, x2)
cons(x1, x2)  =  x2
terms(x1)  =  x1
add(x1, x2)  =  add(x1, x2)
n__s(x1)  =  x1
dbl(x1)  =  dbl(x1)
first(x1, x2)  =  first(x1, x2)
recip(x1)  =  x1
sqr(x1)  =  sqr
0  =  0
nil  =  nil

Recursive path order with status [RPO].
Quasi-Precedence:
[nadd2, add2]
[ndbl1, dbl1] > [sqr, 0, nil]
[nfirst2, first2] > [sqr, 0, nil]

Status:
nadd2: multiset
ndbl1: [1]
nfirst2: multiset
add2: multiset
dbl1: [1]
first2: multiset
sqr: []
0: multiset
nil: multiset


The following usable rules [FROCOS05] were oriented:

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

(6) Obligation:

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

SQR(s(X)) → SQR(activate(X))
SQR(s(X)) → ACTIVATE(X)
ACTIVATE(n__terms(X)) → TERMS(X)
TERMS(N) → SQR(N)
SQR(s(X)) → DBL(activate(X))
DBL(s(X)) → ACTIVATE(X)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(X)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)

The TRS R consists of the following rules:

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

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

(7) DependencyGraphProof (EQUIVALENT transformation)

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

(8) Obligation:

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

SQR(s(X)) → ACTIVATE(X)
ACTIVATE(n__terms(X)) → TERMS(X)
TERMS(N) → SQR(N)
SQR(s(X)) → SQR(activate(X))
SQR(s(X)) → DBL(activate(X))
DBL(s(X)) → ACTIVATE(X)

The TRS R consists of the following rules:

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


The following pairs can be oriented strictly and are deleted.


ACTIVATE(n__terms(X)) → TERMS(X)
TERMS(N) → SQR(N)
The remaining pairs can at least be oriented weakly.
Used ordering: SCNP Order with the following components:
Level mapping:
Top level AFS:
SQR(x1)  =  SQR(x1)
ACTIVATE(x1)  =  ACTIVATE(x1)
TERMS(x1)  =  TERMS(x1)
DBL(x1)  =  DBL(x1)

Tags:
SQR has tags [0]
ACTIVATE has tags [0]
TERMS has tags [1]
DBL has tags [0]

Comparison: MAX
Underlying order for the size change arcs and the rules of R:
Combined order from the following AFS and order.
s(x1)  =  x1
n__terms(x1)  =  n__terms(x1)
activate(x1)  =  x1
terms(x1)  =  terms(x1)
n__add(x1, x2)  =  n__add(x1, x2)
add(x1, x2)  =  add(x1, x2)
n__s(x1)  =  x1
n__dbl(x1)  =  x1
dbl(x1)  =  x1
n__first(x1, x2)  =  n__first
first(x1, x2)  =  first
cons(x1, x2)  =  x2
recip(x1)  =  x1
sqr(x1)  =  sqr
0  =  0
nil  =  nil

Recursive path order with status [RPO].
Quasi-Precedence:
[nterms1, terms1, sqr] > [nadd2, add2]
[nterms1, terms1, sqr] > 0 > [nfirst, first, nil]

Status:
nterms1: [1]
terms1: [1]
nadd2: multiset
add2: multiset
nfirst: multiset
first: multiset
sqr: multiset
0: multiset
nil: multiset


The following usable rules [FROCOS05] were oriented:

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

(10) Obligation:

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

SQR(s(X)) → ACTIVATE(X)
SQR(s(X)) → SQR(activate(X))
SQR(s(X)) → DBL(activate(X))
DBL(s(X)) → ACTIVATE(X)

The TRS R consists of the following rules:

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

(12) Obligation:

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

SQR(s(X)) → SQR(activate(X))

The TRS R consists of the following rules:

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

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

(13) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


SQR(s(X)) → SQR(activate(X))
The remaining pairs can at least be oriented weakly.
Used ordering: SCNP Order with the following components:
Level mapping:
Top level AFS:
SQR(x1)  =  SQR(x1)

Tags:
SQR has tags [0]

Comparison: MAX
Underlying order for the size change arcs and the rules of R:
Combined order from the following AFS and order.
s(x1)  =  s(x1)
activate(x1)  =  activate(x1)
n__terms(x1)  =  x1
terms(x1)  =  x1
n__add(x1, x2)  =  n__add(x1, x2)
add(x1, x2)  =  add(x1, x2)
n__s(x1)  =  n__s(x1)
n__dbl(x1)  =  n__dbl(x1)
dbl(x1)  =  dbl(x1)
n__first(x1, x2)  =  x1
first(x1, x2)  =  x1
cons(x1, x2)  =  cons
recip(x1)  =  x1
sqr(x1)  =  sqr
0  =  0
nil  =  nil

Recursive path order with status [RPO].
Quasi-Precedence:
[nadd2, add2] > [s1, ns1] > sqr > activate1 > cons
[nadd2, add2] > [s1, ns1] > sqr > 0 > nil > cons
[ndbl1, dbl1] > [s1, ns1] > sqr > activate1 > cons
[ndbl1, dbl1] > [s1, ns1] > sqr > 0 > nil > cons

Status:
s1: [1]
activate1: multiset
nadd2: multiset
add2: multiset
ns1: [1]
ndbl1: [1]
dbl1: [1]
cons: multiset
sqr: multiset
0: multiset
nil: multiset


The following usable rules [FROCOS05] were oriented:

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

(14) Obligation:

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

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

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

(15) PisEmptyProof (EQUIVALENT transformation)

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

(16) TRUE