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