The rewrite relation of the following TRS is considered.
| app(app(iterate,f),x) | → | app(app(cons,x),app(app(iterate,f),app(f,x))) | (1) |
We uncurry the binary symbol app in combination with the following symbol map which also determines the applicative arities of these symbols.
| iterate | is mapped to | iterate, | iterate1(x1), | iterate2(x1, x2) |
| cons | is mapped to | cons, | cons1(x1), | cons2(x1, x2) |
| iterate2(f,x) | → | cons2(x,iterate2(f,app(f,x))) | (6) |
| app(iterate,y1) | → | iterate1(y1) | (2) |
| app(iterate1(x0),y1) | → | iterate2(x0,y1) | (3) |
| app(cons,y1) | → | cons1(y1) | (4) |
| app(cons1(x0),y1) | → | cons2(x0,y1) | (5) |
| iterate2(x0,x1) |
| app(iterate,x0) |
| app(iterate1(x0),x1) |
| app(cons,x0) |
| app(cons1(x0),x1) |
| iterate2#(f,x) | → | iterate2#(f,app(f,x)) | (7) |
| iterate2#(f,x) | → | app#(f,x) | (8) |
| app#(iterate1(x0),y1) | → | iterate2#(x0,y1) | (9) |
| iterate2#(f,x) | → | app#(f,x) | (8) |
| app#(iterate1(x0),y1) | → | iterate2#(x0,y1) | (9) |
| t0 | = | iterate2#(f,x) |
| →P | iterate2#(f,app(f,x)) | |
| = | t1 |