The rewrite relation of the following TRS is considered.
| f(s(x)) | → | f(id_inc(c(x,x))) | (1) |
| f(c(s(x),y)) | → | g(c(x,y)) | (2) |
| g(c(s(x),y)) | → | g(c(y,x)) | (3) |
| g(c(x,s(y))) | → | g(c(y,x)) | (4) |
| g(c(x,x)) | → | f(x) | (5) |
| id_inc(c(x,y)) | → | c(id_inc(x),id_inc(y)) | (6) |
| id_inc(s(x)) | → | s(id_inc(x)) | (7) |
| id_inc(0) | → | 0 | (8) |
| id_inc(0) | → | s(0) | (9) |
| [g(x1)] | = |
|
||||||||||||||||||||||||||||||||||||
| [f(x1)] | = |
|
||||||||||||||||||||||||||||||||||||
| [id_inc(x1)] | = |
|
||||||||||||||||||||||||||||||||||||
| [0] | = |
|
||||||||||||||||||||||||||||||||||||
| [s(x1)] | = |
|
||||||||||||||||||||||||||||||||||||
| [c(x1, x2)] | = |
|
| g(c(s(x),y)) | → | g(c(y,x)) | (3) |
| g(c(x,s(y))) | → | g(c(y,x)) | (4) |
| g(c(x,x)) | → | f(x) | (5) |
| [g(x1)] | = |
|
||||||||||||||||||||||||||||||||||||
| [f(x1)] | = |
|
||||||||||||||||||||||||||||||||||||
| [id_inc(x1)] | = |
|
||||||||||||||||||||||||||||||||||||
| [0] | = |
|
||||||||||||||||||||||||||||||||||||
| [s(x1)] | = |
|
||||||||||||||||||||||||||||||||||||
| [c(x1, x2)] | = |
|
| f(c(s(x),y)) | → | g(c(x,y)) | (2) |
| [f(x1)] | = |
|
||||||||||||||||||||||||||||||||||||
| [id_inc(x1)] | = |
|
||||||||||||||||||||||||||||||||||||
| [0] | = |
|
||||||||||||||||||||||||||||||||||||
| [s(x1)] | = |
|
||||||||||||||||||||||||||||||||||||
| [c(x1, x2)] | = |
|
| f(s(x)) | → | f(id_inc(c(x,x))) | (1) |
| [id_inc(x1)] | = | 2 · x1 + 6 |
| [0] | = | 2 |
| [s(x1)] | = | 1 · x1 + 1 |
| [c(x1, x2)] | = | 4 · x1 + 1 · x2 + 28 |
| id_inc(c(x,y)) | → | c(id_inc(x),id_inc(y)) | (6) |
| id_inc(s(x)) | → | s(id_inc(x)) | (7) |
| id_inc(0) | → | 0 | (8) |
| id_inc(0) | → | s(0) | (9) |
There are no rules in the TRS. Hence, it is terminating.