The rewrite relation of the following TRS is considered.
terms(N) | → | cons(recip(sqr(N))) | (1) |
sqr(0) | → | 0 | (2) |
sqr(s) | → | s | (3) |
dbl(0) | → | 0 | (4) |
dbl(s) | → | s | (5) |
add(0,X) | → | X | (6) |
add(s,Y) | → | s | (7) |
first(0,X) | → | nil | (8) |
first(s,cons(Y)) | → | cons(Y) | (9) |
final states:
{0, 1, 2, 3, 4, 5}
transitions:
cons0(0) | → | 0 |
recip0(0) | → | 0 |
00 | → | 0 |
s0 | → | 0 |
nil0 | → | 0 |
terms0(0) | → | 1 |
sqr0(0) | → | 2 |
dbl0(0) | → | 3 |
add0(0,0) | → | 4 |
first0(0,0) | → | 5 |
sqr1(0) | → | 7 |
recip1(7) | → | 6 |
cons1(6) | → | 1 |
01 | → | 2 |
s1 | → | 2 |
01 | → | 3 |
s1 | → | 3 |
s1 | → | 4 |
nil1 | → | 5 |
cons1(0) | → | 5 |
01 | → | 7 |
s1 | → | 7 |
0 | → | 4 |