(0) Obligation:

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

active(terms(N)) → mark(cons(recip(sqr(N)), terms(s(N))))
active(sqr(0)) → mark(0)
active(sqr(s(X))) → mark(s(add(sqr(X), dbl(X))))
active(dbl(0)) → mark(0)
active(dbl(s(X))) → mark(s(s(dbl(X))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(half(0)) → mark(0)
active(half(s(0))) → mark(0)
active(half(s(s(X)))) → mark(s(half(X)))
active(half(dbl(X))) → mark(X)
mark(terms(X)) → active(terms(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(recip(X)) → active(recip(mark(X)))
mark(sqr(X)) → active(sqr(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(add(X1, X2)) → active(add(mark(X1), mark(X2)))
mark(dbl(X)) → active(dbl(mark(X)))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(nil) → active(nil)
mark(half(X)) → active(half(mark(X)))
terms(mark(X)) → terms(X)
terms(active(X)) → terms(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
recip(mark(X)) → recip(X)
recip(active(X)) → recip(X)
sqr(mark(X)) → sqr(X)
sqr(active(X)) → sqr(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
add(mark(X1), X2) → add(X1, X2)
add(X1, mark(X2)) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
dbl(mark(X)) → dbl(X)
dbl(active(X)) → dbl(X)
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
half(mark(X)) → half(X)
half(active(X)) → half(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:

ACTIVE(terms(N)) → MARK(cons(recip(sqr(N)), terms(s(N))))
ACTIVE(terms(N)) → CONS(recip(sqr(N)), terms(s(N)))
ACTIVE(terms(N)) → RECIP(sqr(N))
ACTIVE(terms(N)) → SQR(N)
ACTIVE(terms(N)) → TERMS(s(N))
ACTIVE(terms(N)) → S(N)
ACTIVE(sqr(0)) → MARK(0)
ACTIVE(sqr(s(X))) → MARK(s(add(sqr(X), dbl(X))))
ACTIVE(sqr(s(X))) → S(add(sqr(X), dbl(X)))
ACTIVE(sqr(s(X))) → ADD(sqr(X), dbl(X))
ACTIVE(sqr(s(X))) → SQR(X)
ACTIVE(sqr(s(X))) → DBL(X)
ACTIVE(dbl(0)) → MARK(0)
ACTIVE(dbl(s(X))) → MARK(s(s(dbl(X))))
ACTIVE(dbl(s(X))) → S(s(dbl(X)))
ACTIVE(dbl(s(X))) → S(dbl(X))
ACTIVE(dbl(s(X))) → DBL(X)
ACTIVE(add(0, X)) → MARK(X)
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))
ACTIVE(add(s(X), Y)) → S(add(X, Y))
ACTIVE(add(s(X), Y)) → ADD(X, Y)
ACTIVE(first(0, X)) → MARK(nil)
ACTIVE(first(s(X), cons(Y, Z))) → MARK(cons(Y, first(X, Z)))
ACTIVE(first(s(X), cons(Y, Z))) → CONS(Y, first(X, Z))
ACTIVE(first(s(X), cons(Y, Z))) → FIRST(X, Z)
ACTIVE(half(0)) → MARK(0)
ACTIVE(half(s(0))) → MARK(0)
ACTIVE(half(s(s(X)))) → MARK(s(half(X)))
ACTIVE(half(s(s(X)))) → S(half(X))
ACTIVE(half(s(s(X)))) → HALF(X)
ACTIVE(half(dbl(X))) → MARK(X)
MARK(terms(X)) → ACTIVE(terms(mark(X)))
MARK(terms(X)) → TERMS(mark(X))
MARK(terms(X)) → MARK(X)
MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
MARK(cons(X1, X2)) → CONS(mark(X1), X2)
MARK(cons(X1, X2)) → MARK(X1)
MARK(recip(X)) → ACTIVE(recip(mark(X)))
MARK(recip(X)) → RECIP(mark(X))
MARK(recip(X)) → MARK(X)
MARK(sqr(X)) → ACTIVE(sqr(mark(X)))
MARK(sqr(X)) → SQR(mark(X))
MARK(sqr(X)) → MARK(X)
MARK(s(X)) → ACTIVE(s(mark(X)))
MARK(s(X)) → S(mark(X))
MARK(s(X)) → MARK(X)
MARK(0) → ACTIVE(0)
MARK(add(X1, X2)) → ACTIVE(add(mark(X1), mark(X2)))
MARK(add(X1, X2)) → ADD(mark(X1), mark(X2))
MARK(add(X1, X2)) → MARK(X1)
MARK(add(X1, X2)) → MARK(X2)
MARK(dbl(X)) → ACTIVE(dbl(mark(X)))
MARK(dbl(X)) → DBL(mark(X))
MARK(dbl(X)) → MARK(X)
MARK(first(X1, X2)) → ACTIVE(first(mark(X1), mark(X2)))
MARK(first(X1, X2)) → FIRST(mark(X1), mark(X2))
MARK(first(X1, X2)) → MARK(X1)
MARK(first(X1, X2)) → MARK(X2)
MARK(nil) → ACTIVE(nil)
MARK(half(X)) → ACTIVE(half(mark(X)))
MARK(half(X)) → HALF(mark(X))
MARK(half(X)) → MARK(X)
TERMS(mark(X)) → TERMS(X)
TERMS(active(X)) → TERMS(X)
CONS(mark(X1), X2) → CONS(X1, X2)
CONS(X1, mark(X2)) → CONS(X1, X2)
CONS(active(X1), X2) → CONS(X1, X2)
CONS(X1, active(X2)) → CONS(X1, X2)
RECIP(mark(X)) → RECIP(X)
RECIP(active(X)) → RECIP(X)
SQR(mark(X)) → SQR(X)
SQR(active(X)) → SQR(X)
S(mark(X)) → S(X)
S(active(X)) → S(X)
ADD(mark(X1), X2) → ADD(X1, X2)
ADD(X1, mark(X2)) → ADD(X1, X2)
ADD(active(X1), X2) → ADD(X1, X2)
ADD(X1, active(X2)) → ADD(X1, X2)
DBL(mark(X)) → DBL(X)
DBL(active(X)) → DBL(X)
FIRST(mark(X1), X2) → FIRST(X1, X2)
FIRST(X1, mark(X2)) → FIRST(X1, X2)
FIRST(active(X1), X2) → FIRST(X1, X2)
FIRST(X1, active(X2)) → FIRST(X1, X2)
HALF(mark(X)) → HALF(X)
HALF(active(X)) → HALF(X)

The TRS R consists of the following rules:

active(terms(N)) → mark(cons(recip(sqr(N)), terms(s(N))))
active(sqr(0)) → mark(0)
active(sqr(s(X))) → mark(s(add(sqr(X), dbl(X))))
active(dbl(0)) → mark(0)
active(dbl(s(X))) → mark(s(s(dbl(X))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(half(0)) → mark(0)
active(half(s(0))) → mark(0)
active(half(s(s(X)))) → mark(s(half(X)))
active(half(dbl(X))) → mark(X)
mark(terms(X)) → active(terms(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(recip(X)) → active(recip(mark(X)))
mark(sqr(X)) → active(sqr(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(add(X1, X2)) → active(add(mark(X1), mark(X2)))
mark(dbl(X)) → active(dbl(mark(X)))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(nil) → active(nil)
mark(half(X)) → active(half(mark(X)))
terms(mark(X)) → terms(X)
terms(active(X)) → terms(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
recip(mark(X)) → recip(X)
recip(active(X)) → recip(X)
sqr(mark(X)) → sqr(X)
sqr(active(X)) → sqr(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
add(mark(X1), X2) → add(X1, X2)
add(X1, mark(X2)) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
dbl(mark(X)) → dbl(X)
dbl(active(X)) → dbl(X)
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
half(mark(X)) → half(X)
half(active(X)) → half(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 10 SCCs with 34 less nodes.

(4) Complex Obligation (AND)

(5) Obligation:

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

HALF(active(X)) → HALF(X)
HALF(mark(X)) → HALF(X)

The TRS R consists of the following rules:

active(terms(N)) → mark(cons(recip(sqr(N)), terms(s(N))))
active(sqr(0)) → mark(0)
active(sqr(s(X))) → mark(s(add(sqr(X), dbl(X))))
active(dbl(0)) → mark(0)
active(dbl(s(X))) → mark(s(s(dbl(X))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(half(0)) → mark(0)
active(half(s(0))) → mark(0)
active(half(s(s(X)))) → mark(s(half(X)))
active(half(dbl(X))) → mark(X)
mark(terms(X)) → active(terms(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(recip(X)) → active(recip(mark(X)))
mark(sqr(X)) → active(sqr(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(add(X1, X2)) → active(add(mark(X1), mark(X2)))
mark(dbl(X)) → active(dbl(mark(X)))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(nil) → active(nil)
mark(half(X)) → active(half(mark(X)))
terms(mark(X)) → terms(X)
terms(active(X)) → terms(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
recip(mark(X)) → recip(X)
recip(active(X)) → recip(X)
sqr(mark(X)) → sqr(X)
sqr(active(X)) → sqr(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
add(mark(X1), X2) → add(X1, X2)
add(X1, mark(X2)) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
dbl(mark(X)) → dbl(X)
dbl(active(X)) → dbl(X)
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
half(mark(X)) → half(X)
half(active(X)) → half(X)

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

(6) Obligation:

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

FIRST(X1, mark(X2)) → FIRST(X1, X2)
FIRST(mark(X1), X2) → FIRST(X1, X2)
FIRST(active(X1), X2) → FIRST(X1, X2)
FIRST(X1, active(X2)) → FIRST(X1, X2)

The TRS R consists of the following rules:

active(terms(N)) → mark(cons(recip(sqr(N)), terms(s(N))))
active(sqr(0)) → mark(0)
active(sqr(s(X))) → mark(s(add(sqr(X), dbl(X))))
active(dbl(0)) → mark(0)
active(dbl(s(X))) → mark(s(s(dbl(X))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(half(0)) → mark(0)
active(half(s(0))) → mark(0)
active(half(s(s(X)))) → mark(s(half(X)))
active(half(dbl(X))) → mark(X)
mark(terms(X)) → active(terms(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(recip(X)) → active(recip(mark(X)))
mark(sqr(X)) → active(sqr(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(add(X1, X2)) → active(add(mark(X1), mark(X2)))
mark(dbl(X)) → active(dbl(mark(X)))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(nil) → active(nil)
mark(half(X)) → active(half(mark(X)))
terms(mark(X)) → terms(X)
terms(active(X)) → terms(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
recip(mark(X)) → recip(X)
recip(active(X)) → recip(X)
sqr(mark(X)) → sqr(X)
sqr(active(X)) → sqr(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
add(mark(X1), X2) → add(X1, X2)
add(X1, mark(X2)) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
dbl(mark(X)) → dbl(X)
dbl(active(X)) → dbl(X)
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
half(mark(X)) → half(X)
half(active(X)) → half(X)

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

(7) Obligation:

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

DBL(active(X)) → DBL(X)
DBL(mark(X)) → DBL(X)

The TRS R consists of the following rules:

active(terms(N)) → mark(cons(recip(sqr(N)), terms(s(N))))
active(sqr(0)) → mark(0)
active(sqr(s(X))) → mark(s(add(sqr(X), dbl(X))))
active(dbl(0)) → mark(0)
active(dbl(s(X))) → mark(s(s(dbl(X))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(half(0)) → mark(0)
active(half(s(0))) → mark(0)
active(half(s(s(X)))) → mark(s(half(X)))
active(half(dbl(X))) → mark(X)
mark(terms(X)) → active(terms(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(recip(X)) → active(recip(mark(X)))
mark(sqr(X)) → active(sqr(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(add(X1, X2)) → active(add(mark(X1), mark(X2)))
mark(dbl(X)) → active(dbl(mark(X)))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(nil) → active(nil)
mark(half(X)) → active(half(mark(X)))
terms(mark(X)) → terms(X)
terms(active(X)) → terms(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
recip(mark(X)) → recip(X)
recip(active(X)) → recip(X)
sqr(mark(X)) → sqr(X)
sqr(active(X)) → sqr(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
add(mark(X1), X2) → add(X1, X2)
add(X1, mark(X2)) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
dbl(mark(X)) → dbl(X)
dbl(active(X)) → dbl(X)
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
half(mark(X)) → half(X)
half(active(X)) → half(X)

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

(8) Obligation:

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

ADD(X1, mark(X2)) → ADD(X1, X2)
ADD(mark(X1), X2) → ADD(X1, X2)
ADD(active(X1), X2) → ADD(X1, X2)
ADD(X1, active(X2)) → ADD(X1, X2)

The TRS R consists of the following rules:

active(terms(N)) → mark(cons(recip(sqr(N)), terms(s(N))))
active(sqr(0)) → mark(0)
active(sqr(s(X))) → mark(s(add(sqr(X), dbl(X))))
active(dbl(0)) → mark(0)
active(dbl(s(X))) → mark(s(s(dbl(X))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(half(0)) → mark(0)
active(half(s(0))) → mark(0)
active(half(s(s(X)))) → mark(s(half(X)))
active(half(dbl(X))) → mark(X)
mark(terms(X)) → active(terms(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(recip(X)) → active(recip(mark(X)))
mark(sqr(X)) → active(sqr(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(add(X1, X2)) → active(add(mark(X1), mark(X2)))
mark(dbl(X)) → active(dbl(mark(X)))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(nil) → active(nil)
mark(half(X)) → active(half(mark(X)))
terms(mark(X)) → terms(X)
terms(active(X)) → terms(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
recip(mark(X)) → recip(X)
recip(active(X)) → recip(X)
sqr(mark(X)) → sqr(X)
sqr(active(X)) → sqr(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
add(mark(X1), X2) → add(X1, X2)
add(X1, mark(X2)) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
dbl(mark(X)) → dbl(X)
dbl(active(X)) → dbl(X)
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
half(mark(X)) → half(X)
half(active(X)) → half(X)

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

(9) Obligation:

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

S(active(X)) → S(X)
S(mark(X)) → S(X)

The TRS R consists of the following rules:

active(terms(N)) → mark(cons(recip(sqr(N)), terms(s(N))))
active(sqr(0)) → mark(0)
active(sqr(s(X))) → mark(s(add(sqr(X), dbl(X))))
active(dbl(0)) → mark(0)
active(dbl(s(X))) → mark(s(s(dbl(X))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(half(0)) → mark(0)
active(half(s(0))) → mark(0)
active(half(s(s(X)))) → mark(s(half(X)))
active(half(dbl(X))) → mark(X)
mark(terms(X)) → active(terms(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(recip(X)) → active(recip(mark(X)))
mark(sqr(X)) → active(sqr(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(add(X1, X2)) → active(add(mark(X1), mark(X2)))
mark(dbl(X)) → active(dbl(mark(X)))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(nil) → active(nil)
mark(half(X)) → active(half(mark(X)))
terms(mark(X)) → terms(X)
terms(active(X)) → terms(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
recip(mark(X)) → recip(X)
recip(active(X)) → recip(X)
sqr(mark(X)) → sqr(X)
sqr(active(X)) → sqr(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
add(mark(X1), X2) → add(X1, X2)
add(X1, mark(X2)) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
dbl(mark(X)) → dbl(X)
dbl(active(X)) → dbl(X)
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
half(mark(X)) → half(X)
half(active(X)) → half(X)

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

(10) Obligation:

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

SQR(active(X)) → SQR(X)
SQR(mark(X)) → SQR(X)

The TRS R consists of the following rules:

active(terms(N)) → mark(cons(recip(sqr(N)), terms(s(N))))
active(sqr(0)) → mark(0)
active(sqr(s(X))) → mark(s(add(sqr(X), dbl(X))))
active(dbl(0)) → mark(0)
active(dbl(s(X))) → mark(s(s(dbl(X))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(half(0)) → mark(0)
active(half(s(0))) → mark(0)
active(half(s(s(X)))) → mark(s(half(X)))
active(half(dbl(X))) → mark(X)
mark(terms(X)) → active(terms(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(recip(X)) → active(recip(mark(X)))
mark(sqr(X)) → active(sqr(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(add(X1, X2)) → active(add(mark(X1), mark(X2)))
mark(dbl(X)) → active(dbl(mark(X)))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(nil) → active(nil)
mark(half(X)) → active(half(mark(X)))
terms(mark(X)) → terms(X)
terms(active(X)) → terms(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
recip(mark(X)) → recip(X)
recip(active(X)) → recip(X)
sqr(mark(X)) → sqr(X)
sqr(active(X)) → sqr(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
add(mark(X1), X2) → add(X1, X2)
add(X1, mark(X2)) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
dbl(mark(X)) → dbl(X)
dbl(active(X)) → dbl(X)
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
half(mark(X)) → half(X)
half(active(X)) → half(X)

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

(11) Obligation:

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

RECIP(active(X)) → RECIP(X)
RECIP(mark(X)) → RECIP(X)

The TRS R consists of the following rules:

active(terms(N)) → mark(cons(recip(sqr(N)), terms(s(N))))
active(sqr(0)) → mark(0)
active(sqr(s(X))) → mark(s(add(sqr(X), dbl(X))))
active(dbl(0)) → mark(0)
active(dbl(s(X))) → mark(s(s(dbl(X))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(half(0)) → mark(0)
active(half(s(0))) → mark(0)
active(half(s(s(X)))) → mark(s(half(X)))
active(half(dbl(X))) → mark(X)
mark(terms(X)) → active(terms(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(recip(X)) → active(recip(mark(X)))
mark(sqr(X)) → active(sqr(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(add(X1, X2)) → active(add(mark(X1), mark(X2)))
mark(dbl(X)) → active(dbl(mark(X)))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(nil) → active(nil)
mark(half(X)) → active(half(mark(X)))
terms(mark(X)) → terms(X)
terms(active(X)) → terms(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
recip(mark(X)) → recip(X)
recip(active(X)) → recip(X)
sqr(mark(X)) → sqr(X)
sqr(active(X)) → sqr(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
add(mark(X1), X2) → add(X1, X2)
add(X1, mark(X2)) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
dbl(mark(X)) → dbl(X)
dbl(active(X)) → dbl(X)
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
half(mark(X)) → half(X)
half(active(X)) → half(X)

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

(12) Obligation:

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

CONS(X1, mark(X2)) → CONS(X1, X2)
CONS(mark(X1), X2) → CONS(X1, X2)
CONS(active(X1), X2) → CONS(X1, X2)
CONS(X1, active(X2)) → CONS(X1, X2)

The TRS R consists of the following rules:

active(terms(N)) → mark(cons(recip(sqr(N)), terms(s(N))))
active(sqr(0)) → mark(0)
active(sqr(s(X))) → mark(s(add(sqr(X), dbl(X))))
active(dbl(0)) → mark(0)
active(dbl(s(X))) → mark(s(s(dbl(X))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(half(0)) → mark(0)
active(half(s(0))) → mark(0)
active(half(s(s(X)))) → mark(s(half(X)))
active(half(dbl(X))) → mark(X)
mark(terms(X)) → active(terms(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(recip(X)) → active(recip(mark(X)))
mark(sqr(X)) → active(sqr(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(add(X1, X2)) → active(add(mark(X1), mark(X2)))
mark(dbl(X)) → active(dbl(mark(X)))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(nil) → active(nil)
mark(half(X)) → active(half(mark(X)))
terms(mark(X)) → terms(X)
terms(active(X)) → terms(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
recip(mark(X)) → recip(X)
recip(active(X)) → recip(X)
sqr(mark(X)) → sqr(X)
sqr(active(X)) → sqr(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
add(mark(X1), X2) → add(X1, X2)
add(X1, mark(X2)) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
dbl(mark(X)) → dbl(X)
dbl(active(X)) → dbl(X)
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
half(mark(X)) → half(X)
half(active(X)) → half(X)

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

(13) Obligation:

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

TERMS(active(X)) → TERMS(X)
TERMS(mark(X)) → TERMS(X)

The TRS R consists of the following rules:

active(terms(N)) → mark(cons(recip(sqr(N)), terms(s(N))))
active(sqr(0)) → mark(0)
active(sqr(s(X))) → mark(s(add(sqr(X), dbl(X))))
active(dbl(0)) → mark(0)
active(dbl(s(X))) → mark(s(s(dbl(X))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(half(0)) → mark(0)
active(half(s(0))) → mark(0)
active(half(s(s(X)))) → mark(s(half(X)))
active(half(dbl(X))) → mark(X)
mark(terms(X)) → active(terms(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(recip(X)) → active(recip(mark(X)))
mark(sqr(X)) → active(sqr(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(add(X1, X2)) → active(add(mark(X1), mark(X2)))
mark(dbl(X)) → active(dbl(mark(X)))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(nil) → active(nil)
mark(half(X)) → active(half(mark(X)))
terms(mark(X)) → terms(X)
terms(active(X)) → terms(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
recip(mark(X)) → recip(X)
recip(active(X)) → recip(X)
sqr(mark(X)) → sqr(X)
sqr(active(X)) → sqr(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
add(mark(X1), X2) → add(X1, X2)
add(X1, mark(X2)) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
dbl(mark(X)) → dbl(X)
dbl(active(X)) → dbl(X)
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
half(mark(X)) → half(X)
half(active(X)) → half(X)

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

(14) Obligation:

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

MARK(terms(X)) → ACTIVE(terms(mark(X)))
ACTIVE(terms(N)) → MARK(cons(recip(sqr(N)), terms(s(N))))
MARK(terms(X)) → MARK(X)
MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
ACTIVE(sqr(s(X))) → MARK(s(add(sqr(X), dbl(X))))
MARK(cons(X1, X2)) → MARK(X1)
MARK(recip(X)) → ACTIVE(recip(mark(X)))
ACTIVE(dbl(s(X))) → MARK(s(s(dbl(X))))
MARK(recip(X)) → MARK(X)
MARK(sqr(X)) → ACTIVE(sqr(mark(X)))
ACTIVE(add(0, X)) → MARK(X)
MARK(sqr(X)) → MARK(X)
MARK(s(X)) → ACTIVE(s(mark(X)))
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))
MARK(s(X)) → MARK(X)
MARK(add(X1, X2)) → ACTIVE(add(mark(X1), mark(X2)))
ACTIVE(first(s(X), cons(Y, Z))) → MARK(cons(Y, first(X, Z)))
MARK(add(X1, X2)) → MARK(X1)
MARK(add(X1, X2)) → MARK(X2)
MARK(dbl(X)) → ACTIVE(dbl(mark(X)))
ACTIVE(half(s(s(X)))) → MARK(s(half(X)))
MARK(dbl(X)) → MARK(X)
MARK(first(X1, X2)) → ACTIVE(first(mark(X1), mark(X2)))
ACTIVE(half(dbl(X))) → MARK(X)
MARK(first(X1, X2)) → MARK(X1)
MARK(first(X1, X2)) → MARK(X2)
MARK(half(X)) → ACTIVE(half(mark(X)))
MARK(half(X)) → MARK(X)

The TRS R consists of the following rules:

active(terms(N)) → mark(cons(recip(sqr(N)), terms(s(N))))
active(sqr(0)) → mark(0)
active(sqr(s(X))) → mark(s(add(sqr(X), dbl(X))))
active(dbl(0)) → mark(0)
active(dbl(s(X))) → mark(s(s(dbl(X))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(half(0)) → mark(0)
active(half(s(0))) → mark(0)
active(half(s(s(X)))) → mark(s(half(X)))
active(half(dbl(X))) → mark(X)
mark(terms(X)) → active(terms(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(recip(X)) → active(recip(mark(X)))
mark(sqr(X)) → active(sqr(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(add(X1, X2)) → active(add(mark(X1), mark(X2)))
mark(dbl(X)) → active(dbl(mark(X)))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(nil) → active(nil)
mark(half(X)) → active(half(mark(X)))
terms(mark(X)) → terms(X)
terms(active(X)) → terms(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
recip(mark(X)) → recip(X)
recip(active(X)) → recip(X)
sqr(mark(X)) → sqr(X)
sqr(active(X)) → sqr(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
add(mark(X1), X2) → add(X1, X2)
add(X1, mark(X2)) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
dbl(mark(X)) → dbl(X)
dbl(active(X)) → dbl(X)
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
half(mark(X)) → half(X)
half(active(X)) → half(X)

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

(15) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


ACTIVE(terms(N)) → MARK(cons(recip(sqr(N)), terms(s(N))))
MARK(terms(X)) → MARK(X)
ACTIVE(sqr(s(X))) → MARK(s(add(sqr(X), dbl(X))))
MARK(cons(X1, X2)) → MARK(X1)
ACTIVE(dbl(s(X))) → MARK(s(s(dbl(X))))
MARK(recip(X)) → MARK(X)
ACTIVE(add(0, X)) → MARK(X)
MARK(sqr(X)) → MARK(X)
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))
MARK(s(X)) → MARK(X)
ACTIVE(first(s(X), cons(Y, Z))) → MARK(cons(Y, first(X, Z)))
MARK(add(X1, X2)) → MARK(X1)
MARK(add(X1, X2)) → MARK(X2)
ACTIVE(half(s(s(X)))) → MARK(s(half(X)))
MARK(dbl(X)) → MARK(X)
ACTIVE(half(dbl(X))) → MARK(X)
MARK(first(X1, X2)) → MARK(X1)
MARK(first(X1, X2)) → MARK(X2)
MARK(half(X)) → MARK(X)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
MARK(x1)  =  x1
terms(x1)  =  terms(x1)
ACTIVE(x1)  =  x1
mark(x1)  =  x1
cons(x1, x2)  =  cons(x1)
recip(x1)  =  recip(x1)
sqr(x1)  =  sqr(x1)
s(x1)  =  s(x1)
add(x1, x2)  =  add(x1, x2)
dbl(x1)  =  dbl(x1)
0  =  0
first(x1, x2)  =  first(x1, x2)
half(x1)  =  half(x1)
active(x1)  =  x1
nil  =  nil

Recursive Path Order [RPO].
Precedence:
terms1 > cons1 > s1
terms1 > recip1 > s1
terms1 > sqr1 > add2 > s1
terms1 > sqr1 > dbl1 > 0 > s1
first2 > cons1 > s1
first2 > nil > s1
half1 > 0 > s1

The following usable rules [FROCOS05] were oriented:

active(terms(N)) → mark(cons(recip(sqr(N)), terms(s(N))))
active(sqr(0)) → mark(0)
active(sqr(s(X))) → mark(s(add(sqr(X), dbl(X))))
active(dbl(0)) → mark(0)
active(dbl(s(X))) → mark(s(s(dbl(X))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(half(0)) → mark(0)
active(half(s(0))) → mark(0)
active(half(s(s(X)))) → mark(s(half(X)))
active(half(dbl(X))) → mark(X)
mark(terms(X)) → active(terms(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(recip(X)) → active(recip(mark(X)))
mark(sqr(X)) → active(sqr(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(add(X1, X2)) → active(add(mark(X1), mark(X2)))
mark(dbl(X)) → active(dbl(mark(X)))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(nil) → active(nil)
mark(half(X)) → active(half(mark(X)))
terms(mark(X)) → terms(X)
terms(active(X)) → terms(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
recip(mark(X)) → recip(X)
recip(active(X)) → recip(X)
sqr(mark(X)) → sqr(X)
sqr(active(X)) → sqr(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
add(mark(X1), X2) → add(X1, X2)
add(X1, mark(X2)) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
dbl(mark(X)) → dbl(X)
dbl(active(X)) → dbl(X)
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
half(mark(X)) → half(X)
half(active(X)) → half(X)

(16) Obligation:

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

MARK(terms(X)) → ACTIVE(terms(mark(X)))
MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
MARK(recip(X)) → ACTIVE(recip(mark(X)))
MARK(sqr(X)) → ACTIVE(sqr(mark(X)))
MARK(s(X)) → ACTIVE(s(mark(X)))
MARK(add(X1, X2)) → ACTIVE(add(mark(X1), mark(X2)))
MARK(dbl(X)) → ACTIVE(dbl(mark(X)))
MARK(first(X1, X2)) → ACTIVE(first(mark(X1), mark(X2)))
MARK(half(X)) → ACTIVE(half(mark(X)))

The TRS R consists of the following rules:

active(terms(N)) → mark(cons(recip(sqr(N)), terms(s(N))))
active(sqr(0)) → mark(0)
active(sqr(s(X))) → mark(s(add(sqr(X), dbl(X))))
active(dbl(0)) → mark(0)
active(dbl(s(X))) → mark(s(s(dbl(X))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(half(0)) → mark(0)
active(half(s(0))) → mark(0)
active(half(s(s(X)))) → mark(s(half(X)))
active(half(dbl(X))) → mark(X)
mark(terms(X)) → active(terms(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(recip(X)) → active(recip(mark(X)))
mark(sqr(X)) → active(sqr(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(add(X1, X2)) → active(add(mark(X1), mark(X2)))
mark(dbl(X)) → active(dbl(mark(X)))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(nil) → active(nil)
mark(half(X)) → active(half(mark(X)))
terms(mark(X)) → terms(X)
terms(active(X)) → terms(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
recip(mark(X)) → recip(X)
recip(active(X)) → recip(X)
sqr(mark(X)) → sqr(X)
sqr(active(X)) → sqr(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
add(mark(X1), X2) → add(X1, X2)
add(X1, mark(X2)) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
dbl(mark(X)) → dbl(X)
dbl(active(X)) → dbl(X)
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
half(mark(X)) → half(X)
half(active(X)) → half(X)

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

(17) DependencyGraphProof (EQUIVALENT transformation)

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

(18) TRUE