and(true, X) → X
and(false, Y) → false
if(true, X, Y) → X
if(false, X, Y) → Y
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(Y, first(X, Z))
from(X) → cons(X, from(s(X)))
and: {1}
true: empty set
false: empty set
if: {1}
add: {1}
0: empty set
s: empty set
first: {1, 2}
nil: empty set
cons: empty set
from: empty set
↳ CSR
↳ CSRInnermostProof
and(true, X) → X
and(false, Y) → false
if(true, X, Y) → X
if(false, X, Y) → Y
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(Y, first(X, Z))
from(X) → cons(X, from(s(X)))
and: {1}
true: empty set
false: empty set
if: {1}
add: {1}
0: empty set
s: empty set
first: {1, 2}
nil: empty set
cons: empty set
from: empty set
The CSR is orthogonal. By [10] we can switch to innermost.
↳ CSR
↳ CSRInnermostProof
↳ CSR
↳ CSDependencyPairsProof
and(true, X) → X
and(false, Y) → false
if(true, X, Y) → X
if(false, X, Y) → Y
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(Y, first(X, Z))
from(X) → cons(X, from(s(X)))
and: {1}
true: empty set
false: empty set
if: {1}
add: {1}
0: empty set
s: empty set
first: {1, 2}
nil: empty set
cons: empty set
from: empty set
Innermost Strategy.
Using Improved CS-DPs we result in the following initial Q-CSDP problem.
↳ CSR
↳ CSRInnermostProof
↳ CSR
↳ CSDependencyPairsProof
↳ QCSDP
↳ QCSDependencyGraphProof
AND(true, X) → X
IF(true, X, Y) → X
IF(false, X, Y) → Y
ADD(0, X) → X
add(X, Y)
first(X, Z)
from(s(X))
add on positions {1}
first on positions {1, 2}
AND(true, X) → U(X)
IF(true, X, Y) → U(X)
IF(false, X, Y) → U(Y)
ADD(0, X) → U(X)
U(add(x_0, x_1)) → U(x_0)
U(first(x_0, x_1)) → U(x_0)
U(first(x_0, x_1)) → U(x_1)
U(add(X, Y)) → ADD(X, Y)
U(first(X, Z)) → FIRST(X, Z)
U(from(s(X))) → FROM(s(X))
and(true, X) → X
and(false, Y) → false
if(true, X, Y) → X
if(false, X, Y) → Y
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(Y, first(X, Z))
from(X) → cons(X, from(s(X)))
and(true, x0)
and(false, x0)
if(true, x0, x1)
if(false, x0, x1)
add(0, x0)
add(s(x0), x1)
first(0, x0)
first(s(x0), cons(x1, x2))
from(x0)
↳ CSR
↳ CSRInnermostProof
↳ CSR
↳ CSDependencyPairsProof
↳ QCSDP
↳ QCSDependencyGraphProof
↳ QCSDP
↳ QCSDPReductionPairProof
U(add(x_0, x_1)) → U(x_0)
U(first(x_0, x_1)) → U(x_0)
U(first(x_0, x_1)) → U(x_1)
U(add(X, Y)) → ADD(X, Y)
ADD(0, X) → U(X)
and(true, X) → X
and(false, Y) → false
if(true, X, Y) → X
if(false, X, Y) → Y
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(Y, first(X, Z))
from(X) → cons(X, from(s(X)))
and(true, x0)
and(false, x0)
if(true, x0, x1)
if(false, x0, x1)
add(0, x0)
add(s(x0), x1)
first(0, x0)
first(s(x0), cons(x1, x2))
from(x0)
POL(0) = 2
POL(ADD(x1, x2)) = 2 + 2·x1 + 2·x2
POL(U(x1)) = 1 + 2·x1
POL(add(x1, x2)) = 2 + x1 + x2
POL(cons(x1, x2)) = x2
POL(first(x1, x2)) = 1 + x1 + x2
POL(from(x1)) = 1 + 2·x1
POL(nil) = 2
POL(s(x1)) = x1
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(Y, first(X, Z))
from(X) → cons(X, from(s(X)))
U(add(x_0, x_1)) → U(x_0)
U(first(x_0, x_1)) → U(x_0)
U(first(x_0, x_1)) → U(x_1)
U(add(X, Y)) → ADD(X, Y)
ADD(0, X) → U(X)
↳ CSR
↳ CSRInnermostProof
↳ CSR
↳ CSDependencyPairsProof
↳ QCSDP
↳ QCSDependencyGraphProof
↳ QCSDP
↳ QCSDPReductionPairProof
↳ QCSDP
↳ PIsEmptyProof
and(true, X) → X
and(false, Y) → false
if(true, X, Y) → X
if(false, X, Y) → Y
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(Y, first(X, Z))
from(X) → cons(X, from(s(X)))
and(true, x0)
and(false, x0)
if(true, x0, x1)
if(false, x0, x1)
add(0, x0)
add(s(x0), x1)
first(0, x0)
first(s(x0), cons(x1, x2))
from(x0)