The rewrite relation of the following TRS is considered.
fac(0) | → | 1 | (1) |
fac(s(x)) | → | *(s(x),fac(x)) | (2) |
floop(0,y) | → | y | (3) |
floop(s(x),y) | → | floop(x,*(s(x),y)) | (4) |
*(x,0) | → | 0 | (5) |
*(x,s(y)) | → | +(*(x,y),x) | (6) |
+(x,0) | → | x | (7) |
+(x,s(y)) | → | s(+(x,y)) | (8) |
1 | → | s(0) | (9) |
fac(0) | → | s(0) | (10) |
prec(+) | = | 1 | status(+) | = | [1, 2] | list-extension(+) | = | Lex | ||
prec(floop) | = | 3 | status(floop) | = | [1, 2] | list-extension(floop) | = | Lex | ||
prec(*) | = | 2 | status(*) | = | [2, 1] | list-extension(*) | = | Lex | ||
prec(s) | = | 0 | status(s) | = | [1] | list-extension(s) | = | Lex | ||
prec(1) | = | 0 | status(1) | = | [] | list-extension(1) | = | Lex | ||
prec(fac) | = | 3 | status(fac) | = | [1] | list-extension(fac) | = | Lex | ||
prec(0) | = | 0 | status(0) | = | [] | list-extension(0) | = | Lex |
[+(x1, x2)] | = | max(0, 0 + 1 · x1, 2 + 1 · x2) |
[floop(x1, x2)] | = | max(2, 2 + 1 · x1, 0 + 1 · x2) |
[*(x1, x2)] | = | max(0, 2 + 1 · x1, 0 + 1 · x2) |
[s(x1)] | = | max(2, 0 + 1 · x1) |
[1] | = | max(7) |
[fac(x1)] | = | max(3, 2 + 1 · x1) |
[0] | = | 6 |
fac(0) | → | 1 | (1) |
fac(s(x)) | → | *(s(x),fac(x)) | (2) |
floop(0,y) | → | y | (3) |
floop(s(x),y) | → | floop(x,*(s(x),y)) | (4) |
*(x,0) | → | 0 | (5) |
*(x,s(y)) | → | +(*(x,y),x) | (6) |
+(x,0) | → | x | (7) |
+(x,s(y)) | → | s(+(x,y)) | (8) |
1 | → | s(0) | (9) |
fac(0) | → | s(0) | (10) |
There are no rules in the TRS. Hence, it is terminating.