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) |
app(app(append,xs),nil) |
→ |
xs |
(3) |
app(app(append,nil),ys) |
→ |
ys |
(4) |
app(app(append,app(app(cons,x),xs)),ys) |
→ |
app(app(cons,x),app(app(append,xs),ys)) |
(5) |
app(app(zip,nil),yss) |
→ |
yss |
(6) |
app(app(zip,xss),nil) |
→ |
xss |
(7) |
app(app(zip,app(app(cons,xs),xss)),app(app(cons,ys),yss)) |
→ |
app(app(cons,app(app(append,xs),ys)),app(app(zip,xss),yss)) |
(8) |
app(app(combine,xs),nil) |
→ |
xs |
(9) |
app(app(combine,xs),app(app(cons,ys),yss)) |
→ |
app(app(combine,app(app(zip,xs),ys)),yss) |
(10) |
app(levels,app(app(node,x),xs)) |
→ |
app(app(cons,app(app(cons,x),nil)),app(app(combine,nil),app(app(map,levels),xs))) |
(11) |
map2(f,nil) |
→ |
nil |
(25) |
map2(f,cons2(x,xs)) |
→ |
cons2(app(f,x),map2(f,xs)) |
(26) |
append2(xs,nil) |
→ |
xs |
(27) |
append2(nil,ys) |
→ |
ys |
(28) |
append2(cons2(x,xs),ys) |
→ |
cons2(x,append2(xs,ys)) |
(29) |
zip2(nil,yss) |
→ |
yss |
(30) |
zip2(xss,nil) |
→ |
xss |
(31) |
zip2(cons2(xs,xss),cons2(ys,yss)) |
→ |
cons2(append2(xs,ys),zip2(xss,yss)) |
(32) |
combine2(xs,nil) |
→ |
xs |
(33) |
combine2(xs,cons2(ys,yss)) |
→ |
combine2(zip2(xs,ys),yss) |
(34) |
levels1(node2(x,xs)) |
→ |
cons2(cons2(x,nil),combine2(nil,map2(levels,xs))) |
(35) |
app(map,y1) |
→ |
map1(y1) |
(12) |
app(map1(x0),y1) |
→ |
map2(x0,y1) |
(13) |
app(cons,y1) |
→ |
cons1(y1) |
(14) |
app(cons1(x0),y1) |
→ |
cons2(x0,y1) |
(15) |
app(append,y1) |
→ |
append1(y1) |
(16) |
app(append1(x0),y1) |
→ |
append2(x0,y1) |
(17) |
app(zip,y1) |
→ |
zip1(y1) |
(18) |
app(zip1(x0),y1) |
→ |
zip2(x0,y1) |
(19) |
app(combine,y1) |
→ |
combine1(y1) |
(20) |
app(combine1(x0),y1) |
→ |
combine2(x0,y1) |
(21) |
app(levels,y1) |
→ |
levels1(y1) |
(22) |
app(node,y1) |
→ |
node1(y1) |
(23) |
app(node1(x0),y1) |
→ |
node2(x0,y1) |
(24) |
map2(f,nil) |
→ |
nil |
(25) |
map2(f,cons2(x,xs)) |
→ |
cons2(app(f,x),map2(f,xs)) |
(26) |
append2(xs,nil) |
→ |
xs |
(27) |
append2(nil,ys) |
→ |
ys |
(28) |
append2(cons2(x,xs),ys) |
→ |
cons2(x,append2(xs,ys)) |
(29) |
zip2(nil,yss) |
→ |
yss |
(30) |
zip2(xss,nil) |
→ |
xss |
(31) |
zip2(cons2(xs,xss),cons2(ys,yss)) |
→ |
cons2(append2(xs,ys),zip2(xss,yss)) |
(32) |
combine2(xs,nil) |
→ |
xs |
(33) |
combine2(xs,cons2(ys,yss)) |
→ |
combine2(zip2(xs,ys),yss) |
(34) |
levels1(node2(x,xs)) |
→ |
cons2(cons2(x,nil),combine2(nil,map2(levels,xs))) |
(35) |
app(map,y1) |
→ |
map1(y1) |
(12) |
app(map1(x0),y1) |
→ |
map2(x0,y1) |
(13) |
app(cons,y1) |
→ |
cons1(y1) |
(14) |
app(cons1(x0),y1) |
→ |
cons2(x0,y1) |
(15) |
app(append,y1) |
→ |
append1(y1) |
(16) |
app(append1(x0),y1) |
→ |
append2(x0,y1) |
(17) |
app(zip,y1) |
→ |
zip1(y1) |
(18) |
app(zip1(x0),y1) |
→ |
zip2(x0,y1) |
(19) |
app(combine,y1) |
→ |
combine1(y1) |
(20) |
app(combine1(x0),y1) |
→ |
combine2(x0,y1) |
(21) |
app(levels,y1) |
→ |
levels1(y1) |
(22) |
app(node,y1) |
→ |
node1(y1) |
(23) |
app(node1(x0),y1) |
→ |
node2(x0,y1) |
(24) |
There are no rules in the TRS. Hence, it is terminating.