Term Rewriting System R:
[X, Y, Z, X1, X2]
afirst(0, X) -> nil
afirst(s(X), cons(Y, Z)) -> cons(mark(Y), first(X, Z))
afirst(X1, X2) -> first(X1, X2)
afrom(X) -> cons(mark(X), from(s(X)))
afrom(X) -> from(X)
mark(first(X1, X2)) -> afirst(mark(X1), mark(X2))
mark(from(X)) -> afrom(mark(X))
mark(0) -> 0
mark(nil) -> nil
mark(s(X)) -> s(mark(X))
mark(cons(X1, X2)) -> cons(mark(X1), X2)

Innermost Termination of R to be shown.

R
Dependency Pair Analysis

R contains the following Dependency Pairs:

AFIRST(s(X), cons(Y, Z)) -> MARK(Y)
AFROM(X) -> MARK(X)
MARK(first(X1, X2)) -> AFIRST(mark(X1), mark(X2))
MARK(first(X1, X2)) -> MARK(X1)
MARK(first(X1, X2)) -> MARK(X2)
MARK(from(X)) -> AFROM(mark(X))
MARK(from(X)) -> MARK(X)
MARK(s(X)) -> MARK(X)
MARK(cons(X1, X2)) -> MARK(X1)

Furthermore, R contains one SCC.

R
DPs
→DP Problem 1
Argument Filtering and Ordering

Dependency Pairs:

MARK(cons(X1, X2)) -> MARK(X1)
MARK(s(X)) -> MARK(X)
MARK(from(X)) -> MARK(X)
AFROM(X) -> MARK(X)
MARK(from(X)) -> AFROM(mark(X))
MARK(first(X1, X2)) -> MARK(X2)
MARK(first(X1, X2)) -> MARK(X1)
MARK(first(X1, X2)) -> AFIRST(mark(X1), mark(X2))
AFIRST(s(X), cons(Y, Z)) -> MARK(Y)

Rules:

afirst(0, X) -> nil
afirst(s(X), cons(Y, Z)) -> cons(mark(Y), first(X, Z))
afirst(X1, X2) -> first(X1, X2)
afrom(X) -> cons(mark(X), from(s(X)))
afrom(X) -> from(X)
mark(first(X1, X2)) -> afirst(mark(X1), mark(X2))
mark(from(X)) -> afrom(mark(X))
mark(0) -> 0
mark(nil) -> nil
mark(s(X)) -> s(mark(X))
mark(cons(X1, X2)) -> cons(mark(X1), X2)

Strategy:

innermost

The following dependency pairs can be strictly oriented:

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

The following usable rules for innermost can be oriented:

mark(first(X1, X2)) -> afirst(mark(X1), mark(X2))
mark(from(X)) -> afrom(mark(X))
mark(0) -> 0
mark(nil) -> nil
mark(s(X)) -> s(mark(X))
mark(cons(X1, X2)) -> cons(mark(X1), X2)
afrom(X) -> cons(mark(X), from(s(X)))
afrom(X) -> from(X)
afirst(0, X) -> nil
afirst(s(X), cons(Y, Z)) -> cons(mark(Y), first(X, Z))
afirst(X1, X2) -> first(X1, X2)

Used ordering: Polynomial ordering with Polynomial interpretation:
 POL(from(x1)) =  1 + x1 POL(MARK(x1)) =  x1 POL(first(x1, x2)) =  x1 + x2 POL(A__FIRST(x1, x2)) =  x1 + x2 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__first(x1, x2)) =  x1 + x2

resulting in one new DP problem.
Used Argument Filtering System:
MARK(x1) -> MARK(x1)
from(x1) -> from(x1)
first(x1, x2) -> first(x1, x2)
AFROM(x1) -> AFROM(x1)
s(x1) -> s(x1)
cons(x1, x2) -> x1
AFIRST(x1, x2) -> AFIRST(x1, x2)
mark(x1) -> mark(x1)
afirst(x1, x2) -> afirst(x1, x2)
afrom(x1) -> afrom(x1)

R
DPs
→DP Problem 1
AFS
→DP Problem 2
Dependency Graph

Dependency Pairs:

MARK(cons(X1, X2)) -> MARK(X1)
MARK(s(X)) -> MARK(X)
AFROM(X) -> MARK(X)
MARK(first(X1, X2)) -> MARK(X2)
MARK(first(X1, X2)) -> MARK(X1)
MARK(first(X1, X2)) -> AFIRST(mark(X1), mark(X2))
AFIRST(s(X), cons(Y, Z)) -> MARK(Y)

Rules:

afirst(0, X) -> nil
afirst(s(X), cons(Y, Z)) -> cons(mark(Y), first(X, Z))
afirst(X1, X2) -> first(X1, X2)
afrom(X) -> cons(mark(X), from(s(X)))
afrom(X) -> from(X)
mark(first(X1, X2)) -> afirst(mark(X1), mark(X2))
mark(from(X)) -> afrom(mark(X))
mark(0) -> 0
mark(nil) -> nil
mark(s(X)) -> s(mark(X))
mark(cons(X1, X2)) -> cons(mark(X1), X2)

Strategy:

innermost

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

R
DPs
→DP Problem 1
AFS
→DP Problem 2
DGraph
...
→DP Problem 3
Argument Filtering and Ordering

Dependency Pairs:

MARK(s(X)) -> MARK(X)
MARK(first(X1, X2)) -> MARK(X2)
MARK(first(X1, X2)) -> MARK(X1)
AFIRST(s(X), cons(Y, Z)) -> MARK(Y)
MARK(first(X1, X2)) -> AFIRST(mark(X1), mark(X2))
MARK(cons(X1, X2)) -> MARK(X1)

Rules:

afirst(0, X) -> nil
afirst(s(X), cons(Y, Z)) -> cons(mark(Y), first(X, Z))
afirst(X1, X2) -> first(X1, X2)
afrom(X) -> cons(mark(X), from(s(X)))
afrom(X) -> from(X)
mark(first(X1, X2)) -> afirst(mark(X1), mark(X2))
mark(from(X)) -> afrom(mark(X))
mark(0) -> 0
mark(nil) -> nil
mark(s(X)) -> s(mark(X))
mark(cons(X1, X2)) -> cons(mark(X1), X2)

Strategy:

innermost

The following dependency pairs can be strictly oriented:

MARK(first(X1, X2)) -> MARK(X2)
MARK(first(X1, X2)) -> MARK(X1)
MARK(first(X1, X2)) -> AFIRST(mark(X1), mark(X2))

The following usable rules for innermost can be oriented:

mark(first(X1, X2)) -> afirst(mark(X1), mark(X2))
mark(from(X)) -> afrom(mark(X))
mark(0) -> 0
mark(nil) -> nil
mark(s(X)) -> s(mark(X))
mark(cons(X1, X2)) -> cons(mark(X1), X2)
afrom(X) -> cons(mark(X), from(s(X)))
afrom(X) -> from(X)
afirst(0, X) -> nil
afirst(s(X), cons(Y, Z)) -> cons(mark(Y), first(X, Z))
afirst(X1, X2) -> first(X1, X2)

Used ordering: Polynomial ordering with Polynomial interpretation:
 POL(from(x1)) =  x1 POL(MARK(x1)) =  x1 POL(first(x1, x2)) =  1 + x1 + x2 POL(A__FIRST(x1, x2)) =  x1 + x2 POL(0) =  0 POL(nil) =  0 POL(s(x1)) =  x1 POL(mark(x1)) =  x1 POL(a__from(x1)) =  x1 POL(a__first(x1, x2)) =  1 + x1 + x2

resulting in one new DP problem.
Used Argument Filtering System:
MARK(x1) -> MARK(x1)
first(x1, x2) -> first(x1, x2)
s(x1) -> s(x1)
cons(x1, x2) -> x1
AFIRST(x1, x2) -> AFIRST(x1, x2)
mark(x1) -> mark(x1)
afirst(x1, x2) -> afirst(x1, x2)
from(x1) -> from(x1)
afrom(x1) -> afrom(x1)

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

Dependency Pairs:

MARK(s(X)) -> MARK(X)
AFIRST(s(X), cons(Y, Z)) -> MARK(Y)
MARK(cons(X1, X2)) -> MARK(X1)

Rules:

afirst(0, X) -> nil
afirst(s(X), cons(Y, Z)) -> cons(mark(Y), first(X, Z))
afirst(X1, X2) -> first(X1, X2)
afrom(X) -> cons(mark(X), from(s(X)))
afrom(X) -> from(X)
mark(first(X1, X2)) -> afirst(mark(X1), mark(X2))
mark(from(X)) -> afrom(mark(X))
mark(0) -> 0
mark(nil) -> nil
mark(s(X)) -> s(mark(X))
mark(cons(X1, X2)) -> cons(mark(X1), X2)

Strategy:

innermost

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

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

Dependency Pairs:

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

Rules:

afirst(0, X) -> nil
afirst(s(X), cons(Y, Z)) -> cons(mark(Y), first(X, Z))
afirst(X1, X2) -> first(X1, X2)
afrom(X) -> cons(mark(X), from(s(X)))
afrom(X) -> from(X)
mark(first(X1, X2)) -> afirst(mark(X1), mark(X2))
mark(from(X)) -> afrom(mark(X))
mark(0) -> 0
mark(nil) -> nil
mark(s(X)) -> s(mark(X))
mark(cons(X1, X2)) -> cons(mark(X1), X2)

Strategy:

innermost

The following dependency pair can be strictly oriented:

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

There are no usable rules for innermost 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
DGraph
...
→DP Problem 6
Argument Filtering and Ordering

Dependency Pair:

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

Rules:

afirst(0, X) -> nil
afirst(s(X), cons(Y, Z)) -> cons(mark(Y), first(X, Z))
afirst(X1, X2) -> first(X1, X2)
afrom(X) -> cons(mark(X), from(s(X)))
afrom(X) -> from(X)
mark(first(X1, X2)) -> afirst(mark(X1), mark(X2))
mark(from(X)) -> afrom(mark(X))
mark(0) -> 0
mark(nil) -> nil
mark(s(X)) -> s(mark(X))
mark(cons(X1, X2)) -> cons(mark(X1), X2)

Strategy:

innermost

The following dependency pair can be strictly oriented:

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

There are no usable rules for innermost 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
DGraph
...
→DP Problem 7
Dependency Graph

Dependency Pair:

Rules:

afirst(0, X) -> nil
afirst(s(X), cons(Y, Z)) -> cons(mark(Y), first(X, Z))
afirst(X1, X2) -> first(X1, X2)
afrom(X) -> cons(mark(X), from(s(X)))
afrom(X) -> from(X)
mark(first(X1, X2)) -> afirst(mark(X1), mark(X2))
mark(from(X)) -> afrom(mark(X))
mark(0) -> 0
mark(nil) -> nil
mark(s(X)) -> s(mark(X))
mark(cons(X1, X2)) -> cons(mark(X1), X2)

Strategy:

innermost

Using the Dependency Graph resulted in no new DP problems.

Innermost Termination of R successfully shown.
Duration:
0:03 minutes