The rewrite relation of the following TRS is considered.
| app(app(plus,0),y) | → | y | (1) |
| app(app(plus,app(s,x)),y) | → | app(s,app(app(plus,x),y)) | (2) |
| app(app(app(curry,f),x),y) | → | app(app(f,x),y) | (3) |
| add | → | app(curry,plus) | (4) |
We uncurry the binary symbol app in combination with the following symbol map which also determines the applicative arities of these symbols.
| plus | is mapped to | plus, | plus1(x1), | plus2(x1, x2) | |
| 0 | is mapped to | 0 | |||
| s | is mapped to | s, | s1(x1) | ||
| curry | is mapped to | curry, | curry1(x1), | curry2(x1, x2), | curry3(x1, x2, x3) |
| add | is mapped to | add |
| plus2(0,y) | → | y | (11) |
| plus2(s1(x),y) | → | s1(plus2(x,y)) | (12) |
| curry3(f,x,y) | → | app(app(f,x),y) | (13) |
| add | → | curry1(plus) | (14) |
| app(plus,y1) | → | plus1(y1) | (5) |
| app(plus1(x0),y1) | → | plus2(x0,y1) | (6) |
| app(s,y1) | → | s1(y1) | (7) |
| app(curry,y1) | → | curry1(y1) | (8) |
| app(curry1(x0),y1) | → | curry2(x0,y1) | (9) |
| app(curry2(x0,x1),y1) | → | curry3(x0,x1,y1) | (10) |
| prec(0) | = | 1 | weight(0) | = | 1 | ||||
| prec(add) | = | 3 | weight(add) | = | 3 | ||||
| prec(plus) | = | 9 | weight(plus) | = | 1 | ||||
| prec(s) | = | 8 | weight(s) | = | 1 | ||||
| prec(curry) | = | 10 | weight(curry) | = | 2 | ||||
| prec(s1) | = | 2 | weight(s1) | = | 1 | ||||
| prec(curry1) | = | 0 | weight(curry1) | = | 2 | ||||
| prec(plus1) | = | 4 | weight(plus1) | = | 1 | ||||
| prec(plus2) | = | 5 | weight(plus2) | = | 1 | ||||
| prec(curry3) | = | 7 | weight(curry3) | = | 0 | ||||
| prec(app) | = | 6 | weight(app) | = | 0 | ||||
| prec(curry2) | = | 11 | weight(curry2) | = | 1 |
| plus2(0,y) | → | y | (11) |
| plus2(s1(x),y) | → | s1(plus2(x,y)) | (12) |
| curry3(f,x,y) | → | app(app(f,x),y) | (13) |
| add | → | curry1(plus) | (14) |
| app(plus,y1) | → | plus1(y1) | (5) |
| app(plus1(x0),y1) | → | plus2(x0,y1) | (6) |
| app(s,y1) | → | s1(y1) | (7) |
| app(curry,y1) | → | curry1(y1) | (8) |
| app(curry1(x0),y1) | → | curry2(x0,y1) | (9) |
| app(curry2(x0,x1),y1) | → | curry3(x0,x1,y1) | (10) |
There are no rules in the TRS. Hence, it is terminating.