Term Rewriting System R:
[X, Y, X1, X2]
afrom(X) -> cons(mark(X), from(s(X)))
afrom(X) -> from(X)
alength(nil) -> 0
alength(cons(X, Y)) -> s(alength1(Y))
alength(X) -> length(X)
alength1(X) -> alength(X)
alength1(X) -> length1(X)
mark(from(X)) -> afrom(mark(X))
mark(length(X)) -> alength(X)
mark(length1(X)) -> alength1(X)
mark(cons(X1, X2)) -> cons(mark(X1), X2)
mark(s(X)) -> s(mark(X))
mark(nil) -> nil
mark(0) -> 0

Termination of R to be shown.

`   R`
`     ↳Dependency Pair Analysis`

R contains the following Dependency Pairs:

AFROM(X) -> MARK(X)
ALENGTH(cons(X, Y)) -> ALENGTH1(Y)
ALENGTH1(X) -> ALENGTH(X)
MARK(from(X)) -> AFROM(mark(X))
MARK(from(X)) -> MARK(X)
MARK(length(X)) -> ALENGTH(X)
MARK(length1(X)) -> ALENGTH1(X)
MARK(cons(X1, X2)) -> MARK(X1)
MARK(s(X)) -> MARK(X)

Furthermore, R contains two SCCs.

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳Argument Filtering and Ordering`
`       →DP Problem 2`
`         ↳AFS`

Dependency Pairs:

ALENGTH1(X) -> ALENGTH(X)
ALENGTH(cons(X, Y)) -> ALENGTH1(Y)

Rules:

afrom(X) -> cons(mark(X), from(s(X)))
afrom(X) -> from(X)
alength(nil) -> 0
alength(cons(X, Y)) -> s(alength1(Y))
alength(X) -> length(X)
alength1(X) -> alength(X)
alength1(X) -> length1(X)
mark(from(X)) -> afrom(mark(X))
mark(length(X)) -> alength(X)
mark(length1(X)) -> alength1(X)
mark(cons(X1, X2)) -> cons(mark(X1), X2)
mark(s(X)) -> s(mark(X))
mark(nil) -> nil
mark(0) -> 0

The following dependency pair can be strictly oriented:

ALENGTH1(X) -> ALENGTH(X)

There are no usable rules using the Ce-refinement that need to be oriented.
Used ordering: Polynomial ordering with Polynomial interpretation:
 POL(A__LENGTH1(x1)) =  1 + x1 POL(cons(x1, x2)) =  1 + x1 + x2 POL(A__LENGTH(x1)) =  x1

resulting in one new DP problem.
Used Argument Filtering System:
ALENGTH1(x1) -> ALENGTH1(x1)
ALENGTH(x1) -> ALENGTH(x1)
cons(x1, x2) -> cons(x1, x2)

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳AFS`
`           →DP Problem 3`
`             ↳Dependency Graph`
`       →DP Problem 2`
`         ↳AFS`

Dependency Pair:

ALENGTH(cons(X, Y)) -> ALENGTH1(Y)

Rules:

afrom(X) -> cons(mark(X), from(s(X)))
afrom(X) -> from(X)
alength(nil) -> 0
alength(cons(X, Y)) -> s(alength1(Y))
alength(X) -> length(X)
alength1(X) -> alength(X)
alength1(X) -> length1(X)
mark(from(X)) -> afrom(mark(X))
mark(length(X)) -> alength(X)
mark(length1(X)) -> alength1(X)
mark(cons(X1, X2)) -> cons(mark(X1), X2)
mark(s(X)) -> s(mark(X))
mark(nil) -> nil
mark(0) -> 0

Using the Dependency Graph resulted in no new DP problems.

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳AFS`
`       →DP Problem 2`
`         ↳Argument Filtering and Ordering`

Dependency Pairs:

MARK(s(X)) -> MARK(X)
MARK(cons(X1, X2)) -> MARK(X1)
MARK(from(X)) -> MARK(X)
MARK(from(X)) -> AFROM(mark(X))
AFROM(X) -> MARK(X)

Rules:

afrom(X) -> cons(mark(X), from(s(X)))
afrom(X) -> from(X)
alength(nil) -> 0
alength(cons(X, Y)) -> s(alength1(Y))
alength(X) -> length(X)
alength1(X) -> alength(X)
alength1(X) -> length1(X)
mark(from(X)) -> afrom(mark(X))
mark(length(X)) -> alength(X)
mark(length1(X)) -> alength1(X)
mark(cons(X1, X2)) -> cons(mark(X1), X2)
mark(s(X)) -> s(mark(X))
mark(nil) -> nil
mark(0) -> 0

The following dependency pairs can be strictly oriented:

MARK(from(X)) -> MARK(X)
MARK(from(X)) -> AFROM(mark(X))

The following usable rules using the Ce-refinement can be oriented:

mark(from(X)) -> afrom(mark(X))
mark(length(X)) -> alength(X)
mark(length1(X)) -> alength1(X)
mark(cons(X1, X2)) -> cons(mark(X1), X2)
mark(s(X)) -> s(mark(X))
mark(nil) -> nil
mark(0) -> 0
afrom(X) -> cons(mark(X), from(s(X)))
afrom(X) -> from(X)
alength(nil) -> 0
alength(cons(X, Y)) -> s(alength1(Y))
alength(X) -> length(X)
alength1(X) -> alength(X)
alength1(X) -> length1(X)

Used ordering: Polynomial ordering with Polynomial interpretation:
 POL(from(x1)) =  1 + x1 POL(MARK(x1)) =  x1 POL(a__length) =  0 POL(0) =  0 POL(A__FROM(x1)) =  x1 POL(nil) =  0 POL(s(x1)) =  x1 POL(mark(x1)) =  x1 POL(a__from(x1)) =  1 + x1 POL(a__length1) =  0 POL(length) =  0 POL(length1) =  0

resulting in one new DP problem.
Used Argument Filtering System:
MARK(x1) -> MARK(x1)
from(x1) -> from(x1)
AFROM(x1) -> AFROM(x1)
s(x1) -> s(x1)
cons(x1, x2) -> x1
mark(x1) -> mark(x1)
afrom(x1) -> afrom(x1)
length(x1) -> length
alength(x1) -> alength
length1(x1) -> length1
alength1(x1) -> alength1

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳AFS`
`       →DP Problem 2`
`         ↳AFS`
`           →DP Problem 4`
`             ↳Dependency Graph`

Dependency Pairs:

MARK(s(X)) -> MARK(X)
MARK(cons(X1, X2)) -> MARK(X1)
AFROM(X) -> MARK(X)

Rules:

afrom(X) -> cons(mark(X), from(s(X)))
afrom(X) -> from(X)
alength(nil) -> 0
alength(cons(X, Y)) -> s(alength1(Y))
alength(X) -> length(X)
alength1(X) -> alength(X)
alength1(X) -> length1(X)
mark(from(X)) -> afrom(mark(X))
mark(length(X)) -> alength(X)
mark(length1(X)) -> alength1(X)
mark(cons(X1, X2)) -> cons(mark(X1), X2)
mark(s(X)) -> s(mark(X))
mark(nil) -> nil
mark(0) -> 0

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

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳AFS`
`       →DP Problem 2`
`         ↳AFS`
`           →DP Problem 4`
`             ↳DGraph`
`             ...`
`               →DP Problem 5`
`                 ↳Argument Filtering and Ordering`

Dependency Pairs:

MARK(cons(X1, X2)) -> MARK(X1)
MARK(s(X)) -> MARK(X)

Rules:

afrom(X) -> cons(mark(X), from(s(X)))
afrom(X) -> from(X)
alength(nil) -> 0
alength(cons(X, Y)) -> s(alength1(Y))
alength(X) -> length(X)
alength1(X) -> alength(X)
alength1(X) -> length1(X)
mark(from(X)) -> afrom(mark(X))
mark(length(X)) -> alength(X)
mark(length1(X)) -> alength1(X)
mark(cons(X1, X2)) -> cons(mark(X1), X2)
mark(s(X)) -> s(mark(X))
mark(nil) -> nil
mark(0) -> 0

The following dependency pair can be strictly oriented:

MARK(s(X)) -> MARK(X)

There are no usable rules using the Ce-refinement that need to be oriented.
Used ordering: Polynomial ordering with Polynomial interpretation:
 POL(MARK(x1)) =  x1 POL(cons(x1, x2)) =  x1 + x2 POL(s(x1)) =  1 + x1

resulting in one new DP problem.
Used Argument Filtering System:
MARK(x1) -> MARK(x1)
s(x1) -> s(x1)
cons(x1, x2) -> cons(x1, x2)

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳AFS`
`       →DP Problem 2`
`         ↳AFS`
`           →DP Problem 4`
`             ↳DGraph`
`             ...`
`               →DP Problem 6`
`                 ↳Argument Filtering and Ordering`

Dependency Pair:

MARK(cons(X1, X2)) -> MARK(X1)

Rules:

afrom(X) -> cons(mark(X), from(s(X)))
afrom(X) -> from(X)
alength(nil) -> 0
alength(cons(X, Y)) -> s(alength1(Y))
alength(X) -> length(X)
alength1(X) -> alength(X)
alength1(X) -> length1(X)
mark(from(X)) -> afrom(mark(X))
mark(length(X)) -> alength(X)
mark(length1(X)) -> alength1(X)
mark(cons(X1, X2)) -> cons(mark(X1), X2)
mark(s(X)) -> s(mark(X))
mark(nil) -> nil
mark(0) -> 0

The following dependency pair can be strictly oriented:

MARK(cons(X1, X2)) -> MARK(X1)

There are no usable rules using the Ce-refinement that need to be oriented.
Used ordering: Polynomial ordering with Polynomial interpretation:
 POL(MARK(x1)) =  x1 POL(cons(x1, x2)) =  1 + x1 + x2

resulting in one new DP problem.
Used Argument Filtering System:
MARK(x1) -> MARK(x1)
cons(x1, x2) -> cons(x1, x2)

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳AFS`
`       →DP Problem 2`
`         ↳AFS`
`           →DP Problem 4`
`             ↳DGraph`
`             ...`
`               →DP Problem 7`
`                 ↳Dependency Graph`

Dependency Pair:

Rules:

afrom(X) -> cons(mark(X), from(s(X)))
afrom(X) -> from(X)
alength(nil) -> 0
alength(cons(X, Y)) -> s(alength1(Y))
alength(X) -> length(X)
alength1(X) -> alength(X)
alength1(X) -> length1(X)
mark(from(X)) -> afrom(mark(X))
mark(length(X)) -> alength(X)
mark(length1(X)) -> alength1(X)
mark(cons(X1, X2)) -> cons(mark(X1), X2)
mark(s(X)) -> s(mark(X))
mark(nil) -> nil
mark(0) -> 0

Using the Dependency Graph resulted in no new DP problems.

Termination of R successfully shown.
Duration:
0:01 minutes