The rewrite relation of the following TRS is considered.
| app(app(fmap,fnil),x) | → | nil | (1) |
| app(app(fmap,app(app(fcons,f),t)),x) | → | app(app(cons,app(f,x)),app(app(fmap,t),x)) | (2) |
We uncurry the binary symbol app in combination with the following symbol map which also determines the applicative arities of these symbols.
| fmap | is mapped to | fmap, | fmap1(x1), | fmap2(x1, x2) |
| fnil | is mapped to | fnil | ||
| nil | is mapped to | nil | ||
| fcons | is mapped to | fcons, | fcons1(x1), | fcons2(x1, x2) |
| cons | is mapped to | cons, | cons1(x1), | cons2(x1, x2) |
| fmap2(fnil,x) | → | nil | (9) |
| fmap2(fcons2(f,t),x) | → | cons2(app(f,x),fmap2(t,x)) | (10) |
| app(fmap,y1) | → | fmap1(y1) | (3) |
| app(fmap1(x0),y1) | → | fmap2(x0,y1) | (4) |
| app(fcons,y1) | → | fcons1(y1) | (5) |
| app(fcons1(x0),y1) | → | fcons2(x0,y1) | (6) |
| app(cons,y1) | → | cons1(y1) | (7) |
| app(cons1(x0),y1) | → | cons2(x0,y1) | (8) |
| prec(fmap2) | = | 3 | stat(fmap2) | = | mul | |
| prec(fnil) | = | 0 | stat(fnil) | = | mul | |
| prec(nil) | = | 0 | stat(nil) | = | mul | |
| prec(fcons2) | = | 3 | stat(fcons2) | = | mul | |
| prec(cons2) | = | 1 | stat(cons2) | = | mul | |
| prec(app) | = | 3 | stat(app) | = | mul | |
| prec(fmap) | = | 2 | stat(fmap) | = | mul | |
| prec(fmap1) | = | 2 | stat(fmap1) | = | mul | |
| prec(fcons) | = | 4 | stat(fcons) | = | mul | |
| prec(cons) | = | 5 | stat(cons) | = | mul | |
| prec(cons1) | = | 3 | stat(cons1) | = | mul |
| π(fmap2) | = | [1,2] |
| π(fnil) | = | [] |
| π(nil) | = | [] |
| π(fcons2) | = | [1,2] |
| π(cons2) | = | [1,2] |
| π(app) | = | [1,2] |
| π(fmap) | = | [] |
| π(fmap1) | = | [1] |
| π(fcons) | = | [] |
| π(fcons1) | = | 1 |
| π(cons) | = | [] |
| π(cons1) | = | [1] |
| fmap2(fnil,x) | → | nil | (9) |
| fmap2(fcons2(f,t),x) | → | cons2(app(f,x),fmap2(t,x)) | (10) |
| app(fmap,y1) | → | fmap1(y1) | (3) |
| app(fmap1(x0),y1) | → | fmap2(x0,y1) | (4) |
| app(fcons,y1) | → | fcons1(y1) | (5) |
| app(cons,y1) | → | cons1(y1) | (7) |
| app(cons1(x0),y1) | → | cons2(x0,y1) | (8) |
| prec(fcons1) | = | 0 | weight(fcons1) | = | 1 | ||||
| prec(app) | = | 2 | weight(app) | = | 0 | ||||
| prec(fcons2) | = | 1 | weight(fcons2) | = | 1 |
| app(fcons1(x0),y1) | → | fcons2(x0,y1) | (6) |
There are no rules in the TRS. Hence, it is terminating.