Term Rewriting System R:
[Z, X, Y, X1, X2]
fst(0, Z) -> nil
fst(s(X), cons(Y, Z)) -> cons(Y, nfst(activate(X), activate(Z)))
fst(X1, X2) -> nfst(X1, X2)
from(X) -> cons(X, nfrom(ns(X)))
from(X) -> nfrom(X)
len(nil) -> 0
len(cons(X, Z)) -> s(nlen(activate(Z)))
len(X) -> nlen(X)
s(X) -> ns(X)
activate(nfst(X1, X2)) -> fst(activate(X1), activate(X2))
activate(nfrom(X)) -> from(activate(X))
activate(ns(X)) -> s(X)
activate(nlen(X)) -> len(activate(X))
activate(X) -> X

Termination of R to be shown.

R
Dependency Pair Analysis

R contains the following Dependency Pairs:

FST(s(X), cons(Y, Z)) -> ACTIVATE(X)
FST(s(X), cons(Y, Z)) -> ACTIVATE(Z)
LEN(cons(X, Z)) -> S(nlen(activate(Z)))
LEN(cons(X, Z)) -> ACTIVATE(Z)
ACTIVATE(nfst(X1, X2)) -> FST(activate(X1), activate(X2))
ACTIVATE(nfst(X1, X2)) -> ACTIVATE(X1)
ACTIVATE(nfst(X1, X2)) -> ACTIVATE(X2)
ACTIVATE(nfrom(X)) -> FROM(activate(X))
ACTIVATE(nfrom(X)) -> ACTIVATE(X)
ACTIVATE(ns(X)) -> S(X)
ACTIVATE(nlen(X)) -> LEN(activate(X))
ACTIVATE(nlen(X)) -> ACTIVATE(X)

Furthermore, R contains one SCC.

R
DPs
→DP Problem 1
Polynomial Ordering

Dependency Pairs:

ACTIVATE(nlen(X)) -> ACTIVATE(X)
LEN(cons(X, Z)) -> ACTIVATE(Z)
ACTIVATE(nlen(X)) -> LEN(activate(X))
ACTIVATE(nfrom(X)) -> ACTIVATE(X)
ACTIVATE(nfst(X1, X2)) -> ACTIVATE(X2)
ACTIVATE(nfst(X1, X2)) -> ACTIVATE(X1)
FST(s(X), cons(Y, Z)) -> ACTIVATE(Z)
ACTIVATE(nfst(X1, X2)) -> FST(activate(X1), activate(X2))
FST(s(X), cons(Y, Z)) -> ACTIVATE(X)

Rules:

fst(0, Z) -> nil
fst(s(X), cons(Y, Z)) -> cons(Y, nfst(activate(X), activate(Z)))
fst(X1, X2) -> nfst(X1, X2)
from(X) -> cons(X, nfrom(ns(X)))
from(X) -> nfrom(X)
len(nil) -> 0
len(cons(X, Z)) -> s(nlen(activate(Z)))
len(X) -> nlen(X)
s(X) -> ns(X)
activate(nfst(X1, X2)) -> fst(activate(X1), activate(X2))
activate(nfrom(X)) -> from(activate(X))
activate(ns(X)) -> s(X)
activate(nlen(X)) -> len(activate(X))
activate(X) -> X

The following dependency pair can be strictly oriented:

ACTIVATE(nfrom(X)) -> ACTIVATE(X)

Additionally, the following usable rules w.r.t. to the implicit AFS can be oriented:

activate(nfst(X1, X2)) -> fst(activate(X1), activate(X2))
activate(nfrom(X)) -> from(activate(X))
activate(ns(X)) -> s(X)
activate(nlen(X)) -> len(activate(X))
activate(X) -> X
len(nil) -> 0
len(cons(X, Z)) -> s(nlen(activate(Z)))
len(X) -> nlen(X)
fst(0, Z) -> nil
fst(s(X), cons(Y, Z)) -> cons(Y, nfst(activate(X), activate(Z)))
fst(X1, X2) -> nfst(X1, X2)
from(X) -> cons(X, nfrom(ns(X)))
from(X) -> nfrom(X)
s(X) -> ns(X)

Used ordering: Polynomial ordering with Polynomial interpretation:
 POL(from(x1)) =  1 + x1 POL(activate(x1)) =  x1 POL(FST(x1, x2)) =  x1 + x2 POL(len(x1)) =  x1 POL(n__fst(x1, x2)) =  x1 + x2 POL(LEN(x1)) =  x1 POL(n__s(x1)) =  x1 POL(ACTIVATE(x1)) =  x1 POL(ADD(x1, x2)) =  x1 POL(add(x1, x2)) =  x1 + x2 POL(n__from(x1)) =  1 + x1 POL(0) =  0 POL(cons(x1, x2)) =  x2 POL(nil) =  0 POL(s(x1)) =  x1 POL(fst(x1, x2)) =  x1 + x2 POL(n__len(x1)) =  x1 POL(n__add(x1, x2)) =  x1 + x2

resulting in one new DP problem.

R
DPs
→DP Problem 1
Polo
→DP Problem 2
Polynomial Ordering

Dependency Pairs:

ACTIVATE(nlen(X)) -> ACTIVATE(X)
LEN(cons(X, Z)) -> ACTIVATE(Z)
ACTIVATE(nlen(X)) -> LEN(activate(X))
ACTIVATE(nfst(X1, X2)) -> ACTIVATE(X2)
ACTIVATE(nfst(X1, X2)) -> ACTIVATE(X1)
FST(s(X), cons(Y, Z)) -> ACTIVATE(Z)
ACTIVATE(nfst(X1, X2)) -> FST(activate(X1), activate(X2))
FST(s(X), cons(Y, Z)) -> ACTIVATE(X)

Rules:

fst(0, Z) -> nil
fst(s(X), cons(Y, Z)) -> cons(Y, nfst(activate(X), activate(Z)))
fst(X1, X2) -> nfst(X1, X2)
from(X) -> cons(X, nfrom(ns(X)))
from(X) -> nfrom(X)
len(nil) -> 0
len(cons(X, Z)) -> s(nlen(activate(Z)))
len(X) -> nlen(X)
s(X) -> ns(X)
activate(nfst(X1, X2)) -> fst(activate(X1), activate(X2))
activate(nfrom(X)) -> from(activate(X))
activate(ns(X)) -> s(X)
activate(nlen(X)) -> len(activate(X))
activate(X) -> X

The following dependency pairs can be strictly oriented:

ACTIVATE(nfst(X1, X2)) -> ACTIVATE(X2)
ACTIVATE(nfst(X1, X2)) -> ACTIVATE(X1)
ACTIVATE(nfst(X1, X2)) -> FST(activate(X1), activate(X2))

Additionally, the following usable rules w.r.t. to the implicit AFS can be oriented:

activate(nfst(X1, X2)) -> fst(activate(X1), activate(X2))
activate(nfrom(X)) -> from(activate(X))
activate(ns(X)) -> s(X)
activate(nlen(X)) -> len(activate(X))
activate(X) -> X
len(nil) -> 0
len(cons(X, Z)) -> s(nlen(activate(Z)))
len(X) -> nlen(X)
fst(0, Z) -> nil
fst(s(X), cons(Y, Z)) -> cons(Y, nfst(activate(X), activate(Z)))
fst(X1, X2) -> nfst(X1, X2)
from(X) -> cons(X, nfrom(ns(X)))
from(X) -> nfrom(X)
s(X) -> ns(X)

Used ordering: Polynomial ordering with Polynomial interpretation:
 POL(from(x1)) =  0 POL(activate(x1)) =  x1 POL(FST(x1, x2)) =  x1 + x2 POL(len(x1)) =  x1 POL(n__fst(x1, x2)) =  1 + x1 + x2 POL(LEN(x1)) =  x1 POL(n__s(x1)) =  x1 POL(ACTIVATE(x1)) =  x1 POL(ADD(x1, x2)) =  x1 POL(add(x1, x2)) =  x1 + x2 POL(n__from(x1)) =  0 POL(0) =  0 POL(cons(x1, x2)) =  x2 POL(nil) =  0 POL(s(x1)) =  x1 POL(fst(x1, x2)) =  1 + x1 + x2 POL(n__len(x1)) =  x1 POL(n__add(x1, x2)) =  x1 + x2

resulting in one new DP problem.

R
DPs
→DP Problem 1
Polo
→DP Problem 2
Polo
...
→DP Problem 3
Dependency Graph

Dependency Pairs:

ACTIVATE(nlen(X)) -> ACTIVATE(X)
LEN(cons(X, Z)) -> ACTIVATE(Z)
ACTIVATE(nlen(X)) -> LEN(activate(X))
FST(s(X), cons(Y, Z)) -> ACTIVATE(Z)
FST(s(X), cons(Y, Z)) -> ACTIVATE(X)

Rules:

fst(0, Z) -> nil
fst(s(X), cons(Y, Z)) -> cons(Y, nfst(activate(X), activate(Z)))
fst(X1, X2) -> nfst(X1, X2)
from(X) -> cons(X, nfrom(ns(X)))
from(X) -> nfrom(X)
len(nil) -> 0
len(cons(X, Z)) -> s(nlen(activate(Z)))
len(X) -> nlen(X)
s(X) -> ns(X)
activate(nfst(X1, X2)) -> fst(activate(X1), activate(X2))
activate(nfrom(X)) -> from(activate(X))
activate(ns(X)) -> s(X)
activate(nlen(X)) -> len(activate(X))
activate(X) -> X

Using the Dependency Graph the DP problem was split into 1 DP problems.

R
DPs
→DP Problem 1
Polo
→DP Problem 2
Polo
...
→DP Problem 4
Polynomial Ordering

Dependency Pairs:

LEN(cons(X, Z)) -> ACTIVATE(Z)
ACTIVATE(nlen(X)) -> LEN(activate(X))
ACTIVATE(nlen(X)) -> ACTIVATE(X)

Rules:

fst(0, Z) -> nil
fst(s(X), cons(Y, Z)) -> cons(Y, nfst(activate(X), activate(Z)))
fst(X1, X2) -> nfst(X1, X2)
from(X) -> cons(X, nfrom(ns(X)))
from(X) -> nfrom(X)
len(nil) -> 0
len(cons(X, Z)) -> s(nlen(activate(Z)))
len(X) -> nlen(X)
s(X) -> ns(X)
activate(nfst(X1, X2)) -> fst(activate(X1), activate(X2))
activate(nfrom(X)) -> from(activate(X))
activate(ns(X)) -> s(X)
activate(nlen(X)) -> len(activate(X))
activate(X) -> X

The following dependency pairs can be strictly oriented:

ACTIVATE(nlen(X)) -> LEN(activate(X))
ACTIVATE(nlen(X)) -> ACTIVATE(X)

Additionally, the following usable rules w.r.t. to the implicit AFS can be oriented:

activate(nfst(X1, X2)) -> fst(activate(X1), activate(X2))
activate(nfrom(X)) -> from(activate(X))
activate(ns(X)) -> s(X)
activate(nlen(X)) -> len(activate(X))
activate(X) -> X
len(nil) -> 0
len(cons(X, Z)) -> s(nlen(activate(Z)))
len(X) -> nlen(X)
fst(0, Z) -> nil
fst(s(X), cons(Y, Z)) -> cons(Y, nfst(activate(X), activate(Z)))
fst(X1, X2) -> nfst(X1, X2)
from(X) -> cons(X, nfrom(ns(X)))
from(X) -> nfrom(X)
s(X) -> ns(X)

Used ordering: Polynomial ordering with Polynomial interpretation:
 POL(from(x1)) =  0 POL(activate(x1)) =  x1 POL(len(x1)) =  1 + x1 POL(n__fst(x1, x2)) =  0 POL(LEN(x1)) =  x1 POL(n__s(x1)) =  x1 POL(ACTIVATE(x1)) =  x1 POL(ADD(x1, x2)) =  x1 POL(add(x1, x2)) =  x1 + x2 POL(n__from(x1)) =  0 POL(0) =  0 POL(cons(x1, x2)) =  x2 POL(nil) =  0 POL(s(x1)) =  x1 POL(fst(x1, x2)) =  0 POL(n__len(x1)) =  1 + x1 POL(n__add(x1, x2)) =  x1 + x2

resulting in one new DP problem.

R
DPs
→DP Problem 1
Polo
→DP Problem 2
Polo
...
→DP Problem 5
Dependency Graph

Dependency Pairs:

LEN(cons(X, Z)) -> ACTIVATE(Z)

Rules:

fst(0, Z) -> nil
fst(s(X), cons(Y, Z)) -> cons(Y, nfst(activate(X), activate(Z)))
fst(X1, X2) -> nfst(X1, X2)
from(X) -> cons(X, nfrom(ns(X)))
from(X) -> nfrom(X)
len(nil) -> 0
len(cons(X, Z)) -> s(nlen(activate(Z)))
len(X) -> nlen(X)
s(X) -> ns(X)
activate(nfst(X1, X2)) -> fst(activate(X1), activate(X2))
activate(nfrom(X)) -> from(activate(X))
activate(ns(X)) -> s(X)
activate(nlen(X)) -> len(activate(X))
activate(X) -> X

Using the Dependency Graph the DP problem was split into 1 DP problems.

R
DPs
→DP Problem 1
Polo
→DP Problem 2
Polo
...
→DP Problem 6
Polynomial Ordering

Dependency Pairs:

Rules:

fst(0, Z) -> nil
fst(s(X), cons(Y, Z)) -> cons(Y, nfst(activate(X), activate(Z)))
fst(X1, X2) -> nfst(X1, X2)
from(X) -> cons(X, nfrom(ns(X)))
from(X) -> nfrom(X)
len(nil) -> 0
len(cons(X, Z)) -> s(nlen(activate(Z)))
len(X) -> nlen(X)
s(X) -> ns(X)
activate(nfst(X1, X2)) -> fst(activate(X1), activate(X2))
activate(nfrom(X)) -> from(activate(X))
activate(ns(X)) -> s(X)
activate(nlen(X)) -> len(activate(X))
activate(X) -> X

The following dependency pairs can be strictly oriented:

Additionally, the following usable rules w.r.t. to the implicit AFS can be oriented:

activate(nfst(X1, X2)) -> fst(activate(X1), activate(X2))
activate(nfrom(X)) -> from(activate(X))
activate(ns(X)) -> s(X)
activate(nlen(X)) -> len(activate(X))
activate(X) -> X
len(nil) -> 0
len(cons(X, Z)) -> s(nlen(activate(Z)))
len(X) -> nlen(X)
fst(0, Z) -> nil
fst(s(X), cons(Y, Z)) -> cons(Y, nfst(activate(X), activate(Z)))
fst(X1, X2) -> nfst(X1, X2)
from(X) -> cons(X, nfrom(ns(X)))
from(X) -> nfrom(X)
s(X) -> ns(X)

Used ordering: Polynomial ordering with Polynomial interpretation:
 POL(from(x1)) =  0 POL(activate(x1)) =  x1 POL(len(x1)) =  0 POL(n__fst(x1, x2)) =  0 POL(n__s(x1)) =  x1 POL(ACTIVATE(x1)) =  x1 POL(ADD(x1, x2)) =  x1 POL(add(x1, x2)) =  1 + x1 + x2 POL(n__from(x1)) =  0 POL(0) =  0 POL(cons(x1, x2)) =  0 POL(nil) =  0 POL(s(x1)) =  x1 POL(fst(x1, x2)) =  0 POL(n__len(x1)) =  0 POL(n__add(x1, x2)) =  1 + x1 + x2

resulting in one new DP problem.

R
DPs
→DP Problem 1
Polo
→DP Problem 2
Polo
...
→DP Problem 7
Dependency Graph

Dependency Pair:

Rules:

fst(0, Z) -> nil
fst(s(X), cons(Y, Z)) -> cons(Y, nfst(activate(X), activate(Z)))
fst(X1, X2) -> nfst(X1, X2)
from(X) -> cons(X, nfrom(ns(X)))
from(X) -> nfrom(X)
len(nil) -> 0
len(cons(X, Z)) -> s(nlen(activate(Z)))
len(X) -> nlen(X)
s(X) -> ns(X)
activate(nfst(X1, X2)) -> fst(activate(X1), activate(X2))
activate(nfrom(X)) -> from(activate(X))
activate(ns(X)) -> s(X)