Term Rewriting System R:
[x]
half(0) -> 0
half(s(0)) -> 0
half(s(s(x))) -> s(half(x))
lastbit(0) -> 0
lastbit(s(0)) -> s(0)
lastbit(s(s(x))) -> lastbit(x)
conv(0) -> cons(nil, 0)
conv(s(x)) -> cons(conv(half(s(x))), lastbit(s(x)))

Termination of R to be shown.

`   R`
`     ↳Dependency Pair Analysis`

R contains the following Dependency Pairs:

HALF(s(s(x))) -> HALF(x)
LASTBIT(s(s(x))) -> LASTBIT(x)
CONV(s(x)) -> CONV(half(s(x)))
CONV(s(x)) -> HALF(s(x))
CONV(s(x)) -> LASTBIT(s(x))

Furthermore, R contains three SCCs.

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

Dependency Pair:

HALF(s(s(x))) -> HALF(x)

Rules:

half(0) -> 0
half(s(0)) -> 0
half(s(s(x))) -> s(half(x))
lastbit(0) -> 0
lastbit(s(0)) -> s(0)
lastbit(s(s(x))) -> lastbit(x)
conv(0) -> cons(nil, 0)
conv(s(x)) -> cons(conv(half(s(x))), lastbit(s(x)))

The following dependency pair can be strictly oriented:

HALF(s(s(x))) -> HALF(x)

The following rules can be oriented:

half(0) -> 0
half(s(0)) -> 0
half(s(s(x))) -> s(half(x))
lastbit(0) -> 0
lastbit(s(0)) -> s(0)
lastbit(s(s(x))) -> lastbit(x)
conv(0) -> cons(nil, 0)
conv(s(x)) -> cons(conv(half(s(x))), lastbit(s(x)))

Used ordering: Polynomial ordering with Polynomial interpretation:
 POL(conv(x1)) =  x1 POL(0) =  0 POL(HALF(x1)) =  1 + x1 POL(lastbit(x1)) =  x1 POL(nil) =  0 POL(s(x1)) =  1 + x1 POL(half(x1)) =  x1

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

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

Dependency Pair:

Rules:

half(0) -> 0
half(s(0)) -> 0
half(s(s(x))) -> s(half(x))
lastbit(0) -> 0
lastbit(s(0)) -> s(0)
lastbit(s(s(x))) -> lastbit(x)
conv(0) -> cons(nil, 0)
conv(s(x)) -> cons(conv(half(s(x))), lastbit(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`
`         ↳Nar`

Dependency Pair:

LASTBIT(s(s(x))) -> LASTBIT(x)

Rules:

half(0) -> 0
half(s(0)) -> 0
half(s(s(x))) -> s(half(x))
lastbit(0) -> 0
lastbit(s(0)) -> s(0)
lastbit(s(s(x))) -> lastbit(x)
conv(0) -> cons(nil, 0)
conv(s(x)) -> cons(conv(half(s(x))), lastbit(s(x)))

The following dependency pair can be strictly oriented:

LASTBIT(s(s(x))) -> LASTBIT(x)

The following rules can be oriented:

half(0) -> 0
half(s(0)) -> 0
half(s(s(x))) -> s(half(x))
lastbit(0) -> 0
lastbit(s(0)) -> s(0)
lastbit(s(s(x))) -> lastbit(x)
conv(0) -> cons(nil, 0)
conv(s(x)) -> cons(conv(half(s(x))), lastbit(s(x)))

Used ordering: Polynomial ordering with Polynomial interpretation:
 POL(conv(x1)) =  x1 POL(0) =  0 POL(lastbit(x1)) =  x1 POL(nil) =  0 POL(s(x1)) =  1 + x1 POL(half(x1)) =  x1 POL(LASTBIT(x1)) =  1 + x1

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

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

Dependency Pair:

Rules:

half(0) -> 0
half(s(0)) -> 0
half(s(s(x))) -> s(half(x))
lastbit(0) -> 0
lastbit(s(0)) -> s(0)
lastbit(s(s(x))) -> lastbit(x)
conv(0) -> cons(nil, 0)
conv(s(x)) -> cons(conv(half(s(x))), lastbit(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`
`         ↳Narrowing Transformation`

Dependency Pair:

CONV(s(x)) -> CONV(half(s(x)))

Rules:

half(0) -> 0
half(s(0)) -> 0
half(s(s(x))) -> s(half(x))
lastbit(0) -> 0
lastbit(s(0)) -> s(0)
lastbit(s(s(x))) -> lastbit(x)
conv(0) -> cons(nil, 0)
conv(s(x)) -> cons(conv(half(s(x))), lastbit(s(x)))

On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

CONV(s(x)) -> CONV(half(s(x)))
two new Dependency Pairs are created:

CONV(s(0)) -> CONV(0)
CONV(s(s(x''))) -> CONV(s(half(x'')))

The transformation is resulting in one new DP problem:

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

Dependency Pair:

CONV(s(s(x''))) -> CONV(s(half(x'')))

Rules:

half(0) -> 0
half(s(0)) -> 0
half(s(s(x))) -> s(half(x))
lastbit(0) -> 0
lastbit(s(0)) -> s(0)
lastbit(s(s(x))) -> lastbit(x)
conv(0) -> cons(nil, 0)
conv(s(x)) -> cons(conv(half(s(x))), lastbit(s(x)))

The following dependency pair can be strictly oriented:

CONV(s(s(x''))) -> CONV(s(half(x'')))

The following rules can be oriented:

half(0) -> 0
half(s(0)) -> 0
half(s(s(x))) -> s(half(x))
lastbit(0) -> 0
lastbit(s(0)) -> s(0)
lastbit(s(s(x))) -> lastbit(x)
conv(0) -> cons(nil, 0)
conv(s(x)) -> cons(conv(half(s(x))), lastbit(s(x)))

Used ordering: Polynomial ordering with Polynomial interpretation:
 POL(conv(x1)) =  x1 POL(0) =  0 POL(lastbit(x1)) =  x1 POL(nil) =  0 POL(CONV(x1)) =  1 + x1 POL(s(x1)) =  1 + x1 POL(half(x1)) =  x1

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

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳AFS`
`       →DP Problem 2`
`         ↳AFS`
`       →DP Problem 3`
`         ↳Nar`
`           →DP Problem 6`
`             ↳AFS`
`             ...`
`               →DP Problem 7`
`                 ↳Dependency Graph`

Dependency Pair:

Rules:

half(0) -> 0
half(s(0)) -> 0
half(s(s(x))) -> s(half(x))
lastbit(0) -> 0
lastbit(s(0)) -> s(0)
lastbit(s(s(x))) -> lastbit(x)
conv(0) -> cons(nil, 0)
conv(s(x)) -> cons(conv(half(s(x))), lastbit(s(x)))

Using the Dependency Graph resulted in no new DP problems.

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