Term Rewriting System R:
[X, Y, X1, X2, X3, Z]
aand(true, X) -> mark(X)
aand(false, Y) -> false
aand(X1, X2) -> and(X1, X2)
aif(true, X, Y) -> mark(X)
aif(false, X, Y) -> mark(Y)
aif(X1, X2, X3) -> if(X1, X2, X3)
afirst(0, X) -> nil
afirst(s(X), cons(Y, Z)) -> cons(Y, first(X, Z))
afirst(X1, X2) -> first(X1, X2)
afrom(X) -> cons(X, from(s(X)))
afrom(X) -> from(X)
mark(and(X1, X2)) -> aand(mark(X1), X2)
mark(if(X1, X2, X3)) -> aif(mark(X1), X2, X3)
mark(first(X1, X2)) -> afirst(mark(X1), mark(X2))
mark(from(X)) -> afrom(X)
mark(true) -> true
mark(false) -> false
mark(0) -> 0
mark(s(X)) -> s(X)
mark(nil) -> nil
mark(cons(X1, X2)) -> cons(X1, X2)

Innermost Termination of R to be shown.

`   R`
`     ↳Dependency Pair Analysis`

R contains the following Dependency Pairs:

AAND(true, X) -> MARK(X)
AIF(true, X, Y) -> MARK(X)
AIF(false, X, Y) -> MARK(Y)
MARK(and(X1, X2)) -> AAND(mark(X1), X2)
MARK(and(X1, X2)) -> MARK(X1)
MARK(if(X1, X2, X3)) -> AIF(mark(X1), X2, X3)
MARK(if(X1, X2, X3)) -> MARK(X1)
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(X)

Furthermore, R contains one SCC.

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

Dependency Pairs:

AIF(false, X, Y) -> MARK(Y)
MARK(first(X1, X2)) -> MARK(X2)
MARK(first(X1, X2)) -> MARK(X1)
MARK(if(X1, X2, X3)) -> MARK(X1)
AIF(true, X, Y) -> MARK(X)
MARK(if(X1, X2, X3)) -> AIF(mark(X1), X2, X3)
MARK(and(X1, X2)) -> MARK(X1)
MARK(and(X1, X2)) -> AAND(mark(X1), X2)
AAND(true, X) -> MARK(X)

Rules:

aand(true, X) -> mark(X)
aand(false, Y) -> false
aand(X1, X2) -> and(X1, X2)
aif(true, X, Y) -> mark(X)
aif(false, X, Y) -> mark(Y)
aif(X1, X2, X3) -> if(X1, X2, X3)
afirst(0, X) -> nil
afirst(s(X), cons(Y, Z)) -> cons(Y, first(X, Z))
afirst(X1, X2) -> first(X1, X2)
afrom(X) -> cons(X, from(s(X)))
afrom(X) -> from(X)
mark(and(X1, X2)) -> aand(mark(X1), X2)
mark(if(X1, X2, X3)) -> aif(mark(X1), X2, X3)
mark(first(X1, X2)) -> afirst(mark(X1), mark(X2))
mark(from(X)) -> afrom(X)
mark(true) -> true
mark(false) -> false
mark(0) -> 0
mark(s(X)) -> s(X)
mark(nil) -> nil
mark(cons(X1, X2)) -> cons(X1, X2)

Strategy:

innermost

The following dependency pairs can be strictly oriented:

MARK(and(X1, X2)) -> MARK(X1)
AAND(true, X) -> MARK(X)

The following usable rules for innermost w.r.t. to the AFS can be oriented:

aand(true, X) -> mark(X)
aand(false, Y) -> false
aand(X1, X2) -> and(X1, X2)
aif(true, X, Y) -> mark(X)
aif(false, X, Y) -> mark(Y)
aif(X1, X2, X3) -> if(X1, X2, X3)
mark(and(X1, X2)) -> aand(mark(X1), X2)
mark(if(X1, X2, X3)) -> aif(mark(X1), X2, X3)
mark(first(X1, X2)) -> afirst(mark(X1), mark(X2))
mark(from(X)) -> afrom(X)
mark(true) -> true
mark(false) -> false
mark(0) -> 0
mark(s(X)) -> s(X)
mark(nil) -> nil
mark(cons(X1, X2)) -> cons(X1, X2)
afirst(0, X) -> nil
afirst(s(X), cons(Y, Z)) -> cons(Y, first(X, Z))
afirst(X1, X2) -> first(X1, X2)
afrom(X) -> cons(X, from(s(X)))
afrom(X) -> from(X)

Used ordering: Polynomial ordering with Polynomial interpretation:
 POL(from(x1)) =  x1 POL(and(x1, x2)) =  1 + x1 + x2 POL(MARK(x1)) =  x1 POL(a__and(x1, x2)) =  1 + x1 + x2 POL(false) =  0 POL(true) =  0 POL(mark(x1)) =  x1 POL(a__from(x1)) =  x1 POL(a__add(x1, x2)) =  x1 + x2 POL(a__first(x1, x2)) =  x1 + x2 POL(add(x1, x2)) =  x1 + x2 POL(if(x1, x2, x3)) =  x1 + x2 + x3 POL(0) =  0 POL(A__ADD(x1, x2)) =  x1 + x2 POL(first(x1, x2)) =  x1 + x2 POL(A__AND(x1, x2)) =  1 + x1 + x2 POL(a__if(x1, x2, x3)) =  x1 + x2 + x3 POL(nil) =  0 POL(s(x1)) =  x1 POL(A__IF(x1, x2, x3)) =  x1 + x2 + x3

resulting in one new DP problem.
Used Argument Filtering System:
AAND(x1, x2) -> AAND(x1, x2)
MARK(x1) -> MARK(x1)
first(x1, x2) -> first(x1, x2)
mark(x1) -> mark(x1)
and(x1, x2) -> and(x1, x2)
if(x1, x2, x3) -> if(x1, x2, x3)
AIF(x1, x2, x3) -> AIF(x1, x2, x3)
aand(x1, x2) -> aand(x1, x2)
aif(x1, x2, x3) -> aif(x1, x2, x3)
afirst(x1, x2) -> afirst(x1, x2)
from(x1) -> from(x1)
afrom(x1) -> afrom(x1)
s(x1) -> s(x1)
cons(x1, x2) -> x1

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

Dependency Pairs:

AIF(false, X, Y) -> MARK(Y)
MARK(first(X1, X2)) -> MARK(X2)
MARK(first(X1, X2)) -> MARK(X1)
MARK(if(X1, X2, X3)) -> MARK(X1)
AIF(true, X, Y) -> MARK(X)
MARK(if(X1, X2, X3)) -> AIF(mark(X1), X2, X3)
MARK(and(X1, X2)) -> AAND(mark(X1), X2)

Rules:

aand(true, X) -> mark(X)
aand(false, Y) -> false
aand(X1, X2) -> and(X1, X2)
aif(true, X, Y) -> mark(X)
aif(false, X, Y) -> mark(Y)
aif(X1, X2, X3) -> if(X1, X2, X3)
afirst(0, X) -> nil
afirst(s(X), cons(Y, Z)) -> cons(Y, first(X, Z))
afirst(X1, X2) -> first(X1, X2)
afrom(X) -> cons(X, from(s(X)))
afrom(X) -> from(X)
mark(and(X1, X2)) -> aand(mark(X1), X2)
mark(if(X1, X2, X3)) -> aif(mark(X1), X2, X3)
mark(first(X1, X2)) -> afirst(mark(X1), mark(X2))
mark(from(X)) -> afrom(X)
mark(true) -> true
mark(false) -> false
mark(0) -> 0
mark(s(X)) -> s(X)
mark(nil) -> nil
mark(cons(X1, X2)) -> cons(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(first(X1, X2)) -> MARK(X2)
MARK(first(X1, X2)) -> MARK(X1)
MARK(if(X1, X2, X3)) -> MARK(X1)
AIF(true, X, Y) -> MARK(X)
MARK(if(X1, X2, X3)) -> AIF(mark(X1), X2, X3)
AIF(false, X, Y) -> MARK(Y)

Rules:

aand(true, X) -> mark(X)
aand(false, Y) -> false
aand(X1, X2) -> and(X1, X2)
aif(true, X, Y) -> mark(X)
aif(false, X, Y) -> mark(Y)
aif(X1, X2, X3) -> if(X1, X2, X3)
afirst(0, X) -> nil
afirst(s(X), cons(Y, Z)) -> cons(Y, first(X, Z))
afirst(X1, X2) -> first(X1, X2)
afrom(X) -> cons(X, from(s(X)))
afrom(X) -> from(X)
mark(and(X1, X2)) -> aand(mark(X1), X2)
mark(if(X1, X2, X3)) -> aif(mark(X1), X2, X3)
mark(first(X1, X2)) -> afirst(mark(X1), mark(X2))
mark(from(X)) -> afrom(X)
mark(true) -> true
mark(false) -> false
mark(0) -> 0
mark(s(X)) -> s(X)
mark(nil) -> nil
mark(cons(X1, X2)) -> cons(X1, X2)

Strategy:

innermost

The following dependency pairs can be strictly oriented:

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

The following usable rules for innermost w.r.t. to the AFS can be oriented:

aand(true, X) -> mark(X)
aand(false, Y) -> false
aand(X1, X2) -> and(X1, X2)
aif(true, X, Y) -> mark(X)
aif(false, X, Y) -> mark(Y)
aif(X1, X2, X3) -> if(X1, X2, X3)
mark(and(X1, X2)) -> aand(mark(X1), X2)
mark(if(X1, X2, X3)) -> aif(mark(X1), X2, X3)
mark(first(X1, X2)) -> afirst(mark(X1), mark(X2))
mark(from(X)) -> afrom(X)
mark(true) -> true
mark(false) -> false
mark(0) -> 0
mark(s(X)) -> s(X)
mark(nil) -> nil
mark(cons(X1, X2)) -> cons(X1, X2)
afirst(0, X) -> nil
afirst(s(X), cons(Y, Z)) -> cons(Y, first(X, Z))
afirst(X1, X2) -> first(X1, X2)
afrom(X) -> cons(X, from(s(X)))
afrom(X) -> from(X)

Used ordering: Polynomial ordering with Polynomial interpretation:
 POL(from(x1)) =  x1 POL(and(x1, x2)) =  x1 + x2 POL(MARK(x1)) =  x1 POL(a__and(x1, x2)) =  x1 + x2 POL(false) =  0 POL(true) =  0 POL(mark(x1)) =  x1 POL(a__from(x1)) =  x1 POL(a__add(x1, x2)) =  x1 + x2 POL(a__first(x1, x2)) =  1 + x1 + x2 POL(add(x1, x2)) =  x1 + x2 POL(if(x1, x2, x3)) =  x1 + x2 + x3 POL(0) =  0 POL(A__ADD(x1, x2)) =  x1 + x2 POL(first(x1, x2)) =  1 + x1 + x2 POL(a__if(x1, x2, x3)) =  x1 + x2 + x3 POL(nil) =  0 POL(s(x1)) =  x1 POL(A__IF(x1, x2, x3)) =  x1 + x2 + x3

resulting in one new DP problem.
Used Argument Filtering System:
MARK(x1) -> MARK(x1)
first(x1, x2) -> first(x1, x2)
mark(x1) -> mark(x1)
if(x1, x2, x3) -> if(x1, x2, x3)
AIF(x1, x2, x3) -> AIF(x1, x2, x3)
aand(x1, x2) -> aand(x1, x2)
and(x1, x2) -> and(x1, x2)
aif(x1, x2, x3) -> aif(x1, x2, x3)
afirst(x1, x2) -> afirst(x1, x2)
from(x1) -> from(x1)
afrom(x1) -> afrom(x1)
s(x1) -> s(x1)
cons(x1, x2) -> x1

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

Dependency Pairs:

MARK(if(X1, X2, X3)) -> MARK(X1)
AIF(true, X, Y) -> MARK(X)
MARK(if(X1, X2, X3)) -> AIF(mark(X1), X2, X3)
AIF(false, X, Y) -> MARK(Y)

Rules:

aand(true, X) -> mark(X)
aand(false, Y) -> false
aand(X1, X2) -> and(X1, X2)
aif(true, X, Y) -> mark(X)
aif(false, X, Y) -> mark(Y)
aif(X1, X2, X3) -> if(X1, X2, X3)
afirst(0, X) -> nil
afirst(s(X), cons(Y, Z)) -> cons(Y, first(X, Z))
afirst(X1, X2) -> first(X1, X2)
afrom(X) -> cons(X, from(s(X)))
afrom(X) -> from(X)
mark(and(X1, X2)) -> aand(mark(X1), X2)
mark(if(X1, X2, X3)) -> aif(mark(X1), X2, X3)
mark(first(X1, X2)) -> afirst(mark(X1), mark(X2))
mark(from(X)) -> afrom(X)
mark(true) -> true
mark(false) -> false
mark(0) -> 0
mark(s(X)) -> s(X)
mark(nil) -> nil
mark(cons(X1, X2)) -> cons(X1, X2)

Strategy:

innermost

The following dependency pairs can be strictly oriented:

The following usable rules for innermost w.r.t. to the AFS can be oriented:

aand(true, X) -> mark(X)
aand(false, Y) -> false
aand(X1, X2) -> and(X1, X2)
aif(true, X, Y) -> mark(X)
aif(false, X, Y) -> mark(Y)
aif(X1, X2, X3) -> if(X1, X2, X3)
mark(and(X1, X2)) -> aand(mark(X1), X2)
mark(if(X1, X2, X3)) -> aif(mark(X1), X2, X3)
mark(first(X1, X2)) -> afirst(mark(X1), mark(X2))
mark(from(X)) -> afrom(X)
mark(true) -> true
mark(false) -> false
mark(0) -> 0
mark(s(X)) -> s(X)
mark(nil) -> nil
mark(cons(X1, X2)) -> cons(X1, X2)
afirst(0, X) -> nil
afirst(s(X), cons(Y, Z)) -> cons(Y, first(X, Z))
afirst(X1, X2) -> first(X1, X2)
afrom(X) -> cons(X, from(s(X)))
afrom(X) -> from(X)

Used ordering: Polynomial ordering with Polynomial interpretation:
 POL(from(x1)) =  x1 POL(and(x1, x2)) =  x1 + x2 POL(MARK(x1)) =  x1 POL(a__and(x1, x2)) =  x1 + x2 POL(false) =  0 POL(true) =  0 POL(mark(x1)) =  x1 POL(a__from(x1)) =  x1 POL(a__add(x1, x2)) =  1 + x1 + x2 POL(a__first(x1, x2)) =  x1 + x2 POL(add(x1, x2)) =  1 + x1 + x2 POL(if(x1, x2, x3)) =  x1 + x2 + x3 POL(0) =  0 POL(A__ADD(x1, x2)) =  x1 + x2 POL(first(x1, x2)) =  x1 + x2 POL(a__if(x1, x2, x3)) =  x1 + x2 + x3 POL(nil) =  0 POL(s(x1)) =  x1 POL(A__IF(x1, x2, x3)) =  x1 + x2 + x3

resulting in one new DP problem.
Used Argument Filtering System:
MARK(x1) -> MARK(x1)
mark(x1) -> mark(x1)
if(x1, x2, x3) -> if(x1, x2, x3)
AIF(x1, x2, x3) -> AIF(x1, x2, x3)
aand(x1, x2) -> aand(x1, x2)
and(x1, x2) -> and(x1, x2)
aif(x1, x2, x3) -> aif(x1, x2, x3)
first(x1, x2) -> first(x1, x2)
afirst(x1, x2) -> afirst(x1, x2)
from(x1) -> from(x1)
afrom(x1) -> afrom(x1)
s(x1) -> s(x1)
cons(x1, x2) -> x1

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

Dependency Pairs:

MARK(if(X1, X2, X3)) -> MARK(X1)
AIF(true, X, Y) -> MARK(X)
MARK(if(X1, X2, X3)) -> AIF(mark(X1), X2, X3)
AIF(false, X, Y) -> MARK(Y)

Rules:

aand(true, X) -> mark(X)
aand(false, Y) -> false
aand(X1, X2) -> and(X1, X2)
aif(true, X, Y) -> mark(X)
aif(false, X, Y) -> mark(Y)
aif(X1, X2, X3) -> if(X1, X2, X3)
afirst(0, X) -> nil
afirst(s(X), cons(Y, Z)) -> cons(Y, first(X, Z))
afirst(X1, X2) -> first(X1, X2)
afrom(X) -> cons(X, from(s(X)))
afrom(X) -> from(X)
mark(and(X1, X2)) -> aand(mark(X1), X2)
mark(if(X1, X2, X3)) -> aif(mark(X1), X2, X3)
mark(first(X1, X2)) -> afirst(mark(X1), mark(X2))
mark(from(X)) -> afrom(X)
mark(true) -> true
mark(false) -> false
mark(0) -> 0
mark(s(X)) -> s(X)
mark(nil) -> nil
mark(cons(X1, X2)) -> cons(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 6`
`                 ↳Argument Filtering and Ordering`

Dependency Pairs:

AIF(false, X, Y) -> MARK(Y)
MARK(if(X1, X2, X3)) -> MARK(X1)
AIF(true, X, Y) -> MARK(X)
MARK(if(X1, X2, X3)) -> AIF(mark(X1), X2, X3)

Rules:

aand(true, X) -> mark(X)
aand(false, Y) -> false
aand(X1, X2) -> and(X1, X2)
aif(true, X, Y) -> mark(X)
aif(false, X, Y) -> mark(Y)
aif(X1, X2, X3) -> if(X1, X2, X3)
afirst(0, X) -> nil
afirst(s(X), cons(Y, Z)) -> cons(Y, first(X, Z))
afirst(X1, X2) -> first(X1, X2)
afrom(X) -> cons(X, from(s(X)))
afrom(X) -> from(X)
mark(and(X1, X2)) -> aand(mark(X1), X2)
mark(if(X1, X2, X3)) -> aif(mark(X1), X2, X3)
mark(first(X1, X2)) -> afirst(mark(X1), mark(X2))
mark(from(X)) -> afrom(X)
mark(true) -> true
mark(false) -> false
mark(0) -> 0
mark(s(X)) -> s(X)
mark(nil) -> nil
mark(cons(X1, X2)) -> cons(X1, X2)

Strategy:

innermost

The following dependency pairs can be strictly oriented:

MARK(if(X1, X2, X3)) -> MARK(X1)
MARK(if(X1, X2, X3)) -> AIF(mark(X1), X2, X3)

The following usable rules for innermost w.r.t. to the AFS can be oriented:

aand(true, X) -> mark(X)
aand(false, Y) -> false
aand(X1, X2) -> and(X1, X2)
aif(true, X, Y) -> mark(X)
aif(false, X, Y) -> mark(Y)
aif(X1, X2, X3) -> if(X1, X2, X3)
mark(and(X1, X2)) -> aand(mark(X1), X2)
mark(if(X1, X2, X3)) -> aif(mark(X1), X2, X3)
mark(first(X1, X2)) -> afirst(mark(X1), mark(X2))
mark(from(X)) -> afrom(X)
mark(true) -> true
mark(false) -> false
mark(0) -> 0
mark(s(X)) -> s(X)
mark(nil) -> nil
mark(cons(X1, X2)) -> cons(X1, X2)
afirst(0, X) -> nil
afirst(s(X), cons(Y, Z)) -> cons(Y, first(X, Z))
afirst(X1, X2) -> first(X1, X2)
afrom(X) -> cons(X, from(s(X)))
afrom(X) -> from(X)

Used ordering: Polynomial ordering with Polynomial interpretation:
 POL(from(x1)) =  x1 POL(and(x1, x2)) =  x1 + x2 POL(MARK(x1)) =  x1 POL(a__and(x1, x2)) =  x1 + x2 POL(false) =  0 POL(true) =  0 POL(mark(x1)) =  x1 POL(a__from(x1)) =  x1 POL(a__add(x1, x2)) =  x1 + x2 POL(a__first(x1, x2)) =  x1 + x2 POL(add(x1, x2)) =  x1 + x2 POL(if(x1, x2, x3)) =  1 + x1 + x2 + x3 POL(first(x1, x2)) =  x1 + x2 POL(0) =  0 POL(a__if(x1, x2, x3)) =  1 + x1 + x2 + x3 POL(nil) =  0 POL(s(x1)) =  x1 POL(A__IF(x1, x2, x3)) =  x1 + x2 + x3

resulting in one new DP problem.
Used Argument Filtering System:
MARK(x1) -> MARK(x1)
AIF(x1, x2, x3) -> AIF(x1, x2, x3)
if(x1, x2, x3) -> if(x1, x2, x3)
mark(x1) -> mark(x1)
aand(x1, x2) -> aand(x1, x2)
and(x1, x2) -> and(x1, x2)
aif(x1, x2, x3) -> aif(x1, x2, x3)
first(x1, x2) -> first(x1, x2)
afirst(x1, x2) -> afirst(x1, x2)
from(x1) -> from(x1)
afrom(x1) -> afrom(x1)
s(x1) -> s(x1)
cons(x1, x2) -> x1

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

Dependency Pairs:

AIF(false, X, Y) -> MARK(Y)
AIF(true, X, Y) -> MARK(X)

Rules:

aand(true, X) -> mark(X)
aand(false, Y) -> false
aand(X1, X2) -> and(X1, X2)
aif(true, X, Y) -> mark(X)
aif(false, X, Y) -> mark(Y)
aif(X1, X2, X3) -> if(X1, X2, X3)
afirst(0, X) -> nil
afirst(s(X), cons(Y, Z)) -> cons(Y, first(X, Z))
afirst(X1, X2) -> first(X1, X2)
afrom(X) -> cons(X, from(s(X)))
afrom(X) -> from(X)
mark(and(X1, X2)) -> aand(mark(X1), X2)
mark(if(X1, X2, X3)) -> aif(mark(X1), X2, X3)
mark(first(X1, X2)) -> afirst(mark(X1), mark(X2))
mark(from(X)) -> afrom(X)
mark(true) -> true
mark(false) -> false
mark(0) -> 0
mark(s(X)) -> s(X)
mark(nil) -> nil
mark(cons(X1, X2)) -> cons(X1, X2)

Strategy:

innermost

Using the Dependency Graph resulted in no new DP problems.

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