The rewrite relation of the following TRS is considered.
| half(0) | → | 0 | (1) |
| half(s(0)) | → | 0 | (2) |
| half(s(s(x))) | → | s(half(x)) | (3) |
| lastbit(0) | → | 0 | (4) |
| lastbit(s(0)) | → | s(0) | (5) |
| lastbit(s(s(x))) | → | lastbit(x) | (6) |
| conv(0) | → | cons(nil,0) | (7) |
| conv(s(x)) | → | cons(conv(half(s(x))),lastbit(s(x))) | (8) |
| [conv(x1)] | = |
|
||||||||||||||||||||||||||||||||||||
| [half(x1)] | = |
|
||||||||||||||||||||||||||||||||||||
| [lastbit(x1)] | = |
|
||||||||||||||||||||||||||||||||||||
| [nil] | = |
|
||||||||||||||||||||||||||||||||||||
| [0] | = |
|
||||||||||||||||||||||||||||||||||||
| [cons(x1, x2)] | = |
|
||||||||||||||||||||||||||||||||||||
| [s(x1)] | = |
|
| conv(0) | → | cons(nil,0) | (7) |
| [conv(x1)] | = |
|
||||||||||||||||||||||||||||||||||||
| [half(x1)] | = |
|
||||||||||||||||||||||||||||||||||||
| [lastbit(x1)] | = |
|
||||||||||||||||||||||||||||||||||||
| [0] | = |
|
||||||||||||||||||||||||||||||||||||
| [cons(x1, x2)] | = |
|
||||||||||||||||||||||||||||||||||||
| [s(x1)] | = |
|
| lastbit(0) | → | 0 | (4) |
| lastbit(s(0)) | → | s(0) | (5) |
| [conv(x1)] | = |
|
||||||||||||||||||||||||||||||||||||
| [half(x1)] | = |
|
||||||||||||||||||||||||||||||||||||
| [lastbit(x1)] | = |
|
||||||||||||||||||||||||||||||||||||
| [0] | = |
|
||||||||||||||||||||||||||||||||||||
| [cons(x1, x2)] | = |
|
||||||||||||||||||||||||||||||||||||
| [s(x1)] | = |
|
| half(s(0)) | → | 0 | (2) |
| [conv(x1)] | = |
|
||||||||||||||||||||||||||||||||||||
| [half(x1)] | = |
|
||||||||||||||||||||||||||||||||||||
| [lastbit(x1)] | = |
|
||||||||||||||||||||||||||||||||||||
| [0] | = |
|
||||||||||||||||||||||||||||||||||||
| [cons(x1, x2)] | = |
|
||||||||||||||||||||||||||||||||||||
| [s(x1)] | = |
|
| conv(s(x)) | → | cons(conv(half(s(x))),lastbit(s(x))) | (8) |
| prec(lastbit) | = | 3 | weight(lastbit) | = | 2 | ||||
| prec(s) | = | 0 | weight(s) | = | 2 | ||||
| prec(half) | = | 1 | weight(half) | = | 1 | ||||
| prec(0) | = | 2 | weight(0) | = | 4 |
| half(0) | → | 0 | (1) |
| half(s(s(x))) | → | s(half(x)) | (3) |
| lastbit(s(s(x))) | → | lastbit(x) | (6) |
There are no rules in the TRS. Hence, it is terminating.