Term Rewriting System R:
[X, Y, Z]
and(true, X) -> X
and(false, Y) -> false
if(true, X, Y) -> X
if(false, X, Y) -> Y
add(0, X) -> X
first(0, X) -> nil
first(s(X), cons(Y, Z)) -> cons(Y, first(X, Z))
from(X) -> cons(X, from(s(X)))

Termination of R to be shown.

`   R`
`     ↳Dependency Pair Analysis`

R contains the following Dependency Pairs:

FIRST(s(X), cons(Y, Z)) -> FIRST(X, Z)
FROM(X) -> FROM(s(X))

Furthermore, R contains three SCCs.

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

Dependency Pair:

Rules:

and(true, X) -> X
and(false, Y) -> false
if(true, X, Y) -> X
if(false, X, Y) -> Y
add(0, X) -> X
first(0, X) -> nil
first(s(X), cons(Y, Z)) -> cons(Y, first(X, Z))
from(X) -> cons(X, from(s(X)))

The following dependency pair can be strictly oriented:

The following rules can be oriented:

and(true, X) -> X
and(false, Y) -> false
if(true, X, Y) -> X
if(false, X, Y) -> Y
add(0, X) -> X
first(0, X) -> nil
first(s(X), cons(Y, Z)) -> cons(Y, first(X, Z))
from(X) -> cons(X, from(s(X)))

Used ordering: Lexicographic Path Order with Non-Strict Precedence with Quasi Precedence:
{nil, first}

resulting in one new DP problem.
Used Argument Filtering System:
s(x1) -> s(x1)
and(x1, x2) -> and(x1, x2)
if(x1, x2, x3) -> if(x1, x2, x3)
first(x1, x2) -> first(x1, x2)
cons(x1, x2) -> x1
from(x1) -> from(x1)

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

Dependency Pair:

Rules:

and(true, X) -> X
and(false, Y) -> false
if(true, X, Y) -> X
if(false, X, Y) -> Y
add(0, X) -> X
first(0, X) -> nil
first(s(X), cons(Y, Z)) -> cons(Y, first(X, Z))
from(X) -> cons(X, from(s(X)))

Using the Dependency Graph resulted in no new DP problems.

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

Dependency Pair:

FIRST(s(X), cons(Y, Z)) -> FIRST(X, Z)

Rules:

and(true, X) -> X
and(false, Y) -> false
if(true, X, Y) -> X
if(false, X, Y) -> Y
add(0, X) -> X
first(0, X) -> nil
first(s(X), cons(Y, Z)) -> cons(Y, first(X, Z))
from(X) -> cons(X, from(s(X)))

The following dependency pair can be strictly oriented:

FIRST(s(X), cons(Y, Z)) -> FIRST(X, Z)

The following rules can be oriented:

and(true, X) -> X
and(false, Y) -> false
if(true, X, Y) -> X
if(false, X, Y) -> Y
add(0, X) -> X
first(0, X) -> nil
first(s(X), cons(Y, Z)) -> cons(Y, first(X, Z))
from(X) -> cons(X, from(s(X)))

Used ordering: Lexicographic Path Order with Non-Strict Precedence with Quasi Precedence:
{nil, first}

resulting in one new DP problem.
Used Argument Filtering System:
FIRST(x1, x2) -> FIRST(x1, x2)
s(x1) -> s(x1)
cons(x1, x2) -> x2
and(x1, x2) -> and(x1, x2)
if(x1, x2, x3) -> if(x1, x2, x3)
first(x1, x2) -> first(x1, x2)
from(x1) -> from

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

Dependency Pair:

Rules:

and(true, X) -> X
and(false, Y) -> false
if(true, X, Y) -> X
if(false, X, Y) -> Y
add(0, X) -> X
first(0, X) -> nil
first(s(X), cons(Y, Z)) -> cons(Y, first(X, Z))
from(X) -> cons(X, from(s(X)))

Using the Dependency Graph resulted in no new DP problems.

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳AFS`
`       →DP Problem 2`
`         ↳AFS`
`       →DP Problem 3`
`         ↳Remaining Obligation(s)`

The following remains to be proven:
Dependency Pair:

FROM(X) -> FROM(s(X))

Rules:

and(true, X) -> X
and(false, Y) -> false
if(true, X, Y) -> X
if(false, X, Y) -> Y
add(0, X) -> X