0 QTRS
↳1 DependencyPairsProof (⇔)
↳2 QDP
↳3 DependencyGraphProof (⇔)
↳4 QDP
↳5 QDPSizeChangeProof (⇔)
↳6 TRUE
a__terms(N) → cons(recip(a__sqr(mark(N))), terms(s(N)))
a__sqr(0) → 0
a__sqr(s(X)) → s(add(sqr(X), dbl(X)))
a__dbl(0) → 0
a__dbl(s(X)) → s(s(dbl(X)))
a__add(0, X) → mark(X)
a__add(s(X), Y) → s(add(X, Y))
a__first(0, X) → nil
a__first(s(X), cons(Y, Z)) → cons(mark(Y), first(X, Z))
mark(terms(X)) → a__terms(mark(X))
mark(sqr(X)) → a__sqr(mark(X))
mark(add(X1, X2)) → a__add(mark(X1), mark(X2))
mark(dbl(X)) → a__dbl(mark(X))
mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(recip(X)) → recip(mark(X))
mark(s(X)) → s(X)
mark(0) → 0
mark(nil) → nil
a__terms(X) → terms(X)
a__sqr(X) → sqr(X)
a__add(X1, X2) → add(X1, X2)
a__dbl(X) → dbl(X)
a__first(X1, X2) → first(X1, X2)
A__TERMS(N) → A__SQR(mark(N))
A__TERMS(N) → MARK(N)
A__ADD(0, X) → MARK(X)
A__FIRST(s(X), cons(Y, Z)) → MARK(Y)
MARK(terms(X)) → A__TERMS(mark(X))
MARK(terms(X)) → MARK(X)
MARK(sqr(X)) → A__SQR(mark(X))
MARK(sqr(X)) → MARK(X)
MARK(add(X1, X2)) → A__ADD(mark(X1), mark(X2))
MARK(add(X1, X2)) → MARK(X1)
MARK(add(X1, X2)) → MARK(X2)
MARK(dbl(X)) → A__DBL(mark(X))
MARK(dbl(X)) → MARK(X)
MARK(first(X1, X2)) → A__FIRST(mark(X1), mark(X2))
MARK(first(X1, X2)) → MARK(X1)
MARK(first(X1, X2)) → MARK(X2)
MARK(cons(X1, X2)) → MARK(X1)
MARK(recip(X)) → MARK(X)
a__terms(N) → cons(recip(a__sqr(mark(N))), terms(s(N)))
a__sqr(0) → 0
a__sqr(s(X)) → s(add(sqr(X), dbl(X)))
a__dbl(0) → 0
a__dbl(s(X)) → s(s(dbl(X)))
a__add(0, X) → mark(X)
a__add(s(X), Y) → s(add(X, Y))
a__first(0, X) → nil
a__first(s(X), cons(Y, Z)) → cons(mark(Y), first(X, Z))
mark(terms(X)) → a__terms(mark(X))
mark(sqr(X)) → a__sqr(mark(X))
mark(add(X1, X2)) → a__add(mark(X1), mark(X2))
mark(dbl(X)) → a__dbl(mark(X))
mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(recip(X)) → recip(mark(X))
mark(s(X)) → s(X)
mark(0) → 0
mark(nil) → nil
a__terms(X) → terms(X)
a__sqr(X) → sqr(X)
a__add(X1, X2) → add(X1, X2)
a__dbl(X) → dbl(X)
a__first(X1, X2) → first(X1, X2)
A__TERMS(N) → MARK(N)
MARK(terms(X)) → A__TERMS(mark(X))
MARK(terms(X)) → MARK(X)
MARK(sqr(X)) → MARK(X)
MARK(add(X1, X2)) → A__ADD(mark(X1), mark(X2))
A__ADD(0, X) → MARK(X)
MARK(add(X1, X2)) → MARK(X1)
MARK(add(X1, X2)) → MARK(X2)
MARK(dbl(X)) → MARK(X)
MARK(first(X1, X2)) → A__FIRST(mark(X1), mark(X2))
A__FIRST(s(X), cons(Y, Z)) → MARK(Y)
MARK(first(X1, X2)) → MARK(X1)
MARK(first(X1, X2)) → MARK(X2)
MARK(cons(X1, X2)) → MARK(X1)
MARK(recip(X)) → MARK(X)
a__terms(N) → cons(recip(a__sqr(mark(N))), terms(s(N)))
a__sqr(0) → 0
a__sqr(s(X)) → s(add(sqr(X), dbl(X)))
a__dbl(0) → 0
a__dbl(s(X)) → s(s(dbl(X)))
a__add(0, X) → mark(X)
a__add(s(X), Y) → s(add(X, Y))
a__first(0, X) → nil
a__first(s(X), cons(Y, Z)) → cons(mark(Y), first(X, Z))
mark(terms(X)) → a__terms(mark(X))
mark(sqr(X)) → a__sqr(mark(X))
mark(add(X1, X2)) → a__add(mark(X1), mark(X2))
mark(dbl(X)) → a__dbl(mark(X))
mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(recip(X)) → recip(mark(X))
mark(s(X)) → s(X)
mark(0) → 0
mark(nil) → nil
a__terms(X) → terms(X)
a__sqr(X) → sqr(X)
a__add(X1, X2) → add(X1, X2)
a__dbl(X) → dbl(X)
a__first(X1, X2) → first(X1, X2)
Order:Combined order from the following AFS and order.
mark(x1) = x1
terms(x1) = terms(x1)
a__terms(x1) = a__terms(x1)
sqr(x1) = sqr(x1)
a__sqr(x1) = a__sqr(x1)
add(x1, x2) = add(x1, x2)
a__add(x1, x2) = a__add(x1, x2)
0 = 0
dbl(x1) = dbl(x1)
a__dbl(x1) = a__dbl(x1)
first(x1, x2) = first(x1, x2)
a__first(x1, x2) = a__first(x1, x2)
cons(x1, x2) = cons(x1)
recip(x1) = recip(x1)
s(x1) = s
nil = nil
Recursive path order with status [RPO].
Quasi-Precedence:
[terms1, aterms1] > recip1
[terms1, aterms1] > s > [sqr1, asqr1, 0]
[terms1, aterms1] > s > cons1
[add2, aadd2] > s > [sqr1, asqr1, 0]
[add2, aadd2] > s > cons1
[dbl1, adbl1] > s > [sqr1, asqr1, 0]
[dbl1, adbl1] > s > cons1
[first2, afirst2, nil] > cons1
terms1: [1]
aterms1: [1]
sqr1: multiset
asqr1: multiset
add2: [1,2]
aadd2: [1,2]
0: multiset
dbl1: multiset
adbl1: multiset
first2: multiset
afirst2: multiset
cons1: multiset
recip1: multiset
s: []
nil: multiset
AFS:
mark(x1) = x1
terms(x1) = terms(x1)
a__terms(x1) = a__terms(x1)
sqr(x1) = sqr(x1)
a__sqr(x1) = a__sqr(x1)
add(x1, x2) = add(x1, x2)
a__add(x1, x2) = a__add(x1, x2)
0 = 0
dbl(x1) = dbl(x1)
a__dbl(x1) = a__dbl(x1)
first(x1, x2) = first(x1, x2)
a__first(x1, x2) = a__first(x1, x2)
cons(x1, x2) = cons(x1)
recip(x1) = recip(x1)
s(x1) = s
nil = nil
From the DPs we obtained the following set of size-change graphs:
We oriented the following set of usable rules [AAECC05,FROCOS05].
mark(terms(X)) → a__terms(mark(X))
mark(sqr(X)) → a__sqr(mark(X))
mark(add(X1, X2)) → a__add(mark(X1), mark(X2))
a__add(0, X) → mark(X)
mark(dbl(X)) → a__dbl(mark(X))
mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(recip(X)) → recip(mark(X))
mark(s(X)) → s(X)
mark(0) → 0
mark(nil) → nil
a__terms(N) → cons(recip(a__sqr(mark(N))), terms(s(N)))
a__first(s(X), cons(Y, Z)) → cons(mark(Y), first(X, Z))
a__terms(X) → terms(X)
a__sqr(0) → 0
a__sqr(s(X)) → s(add(sqr(X), dbl(X)))
a__sqr(X) → sqr(X)
a__add(s(X), Y) → s(add(X, Y))
a__add(X1, X2) → add(X1, X2)
a__dbl(0) → 0
a__dbl(s(X)) → s(s(dbl(X)))
a__dbl(X) → dbl(X)
a__first(0, X) → nil
a__first(X1, X2) → first(X1, X2)