The rewrite relation of the following TRS is considered.
|
app(app(app(if,true),x),y) |
→ |
x |
(1) |
|
app(app(app(if,true),x),y) |
→ |
y |
(2) |
|
app(app(takeWhile,p),nil) |
→ |
nil |
(3) |
|
app(app(takeWhile,p),app(app(cons,x),xs)) |
→ |
app(app(app(if,app(p,x)),app(app(cons,x),app(app(takeWhile,p),xs))),nil) |
(4) |
|
app(app(dropWhile,p),nil) |
→ |
nil |
(5) |
|
app(app(dropWhile,p),app(app(cons,x),xs)) |
→ |
app(app(app(if,app(p,x)),app(app(dropWhile,p),xs)),app(app(cons,x),xs)) |
(6) |
|
if3(true,x,y) |
→ |
x |
(16) |
|
if3(true,x,y) |
→ |
y |
(17) |
|
takeWhile2(p,nil) |
→ |
nil |
(18) |
|
takeWhile2(p,cons2(x,xs)) |
→ |
if3(app(p,x),cons2(x,takeWhile2(p,xs)),nil) |
(19) |
|
dropWhile2(p,nil) |
→ |
nil |
(20) |
|
dropWhile2(p,cons2(x,xs)) |
→ |
if3(app(p,x),dropWhile2(p,xs),cons2(x,xs)) |
(21) |
|
app(if,y1) |
→ |
if1(y1) |
(7) |
|
app(if1(x0),y1) |
→ |
if2(x0,y1) |
(8) |
|
app(if2(x0,x1),y1) |
→ |
if3(x0,x1,y1) |
(9) |
|
app(takeWhile,y1) |
→ |
takeWhile1(y1) |
(10) |
|
app(takeWhile1(x0),y1) |
→ |
takeWhile2(x0,y1) |
(11) |
|
app(cons,y1) |
→ |
cons1(y1) |
(12) |
|
app(cons1(x0),y1) |
→ |
cons2(x0,y1) |
(13) |
|
app(dropWhile,y1) |
→ |
dropWhile1(y1) |
(14) |
|
app(dropWhile1(x0),y1) |
→ |
dropWhile2(x0,y1) |
(15) |
|
if3(true,x,y) |
→ |
x |
(16) |
|
if3(true,x,y) |
→ |
y |
(17) |
|
takeWhile2(p,nil) |
→ |
nil |
(18) |
|
takeWhile2(p,cons2(x,xs)) |
→ |
if3(app(p,x),cons2(x,takeWhile2(p,xs)),nil) |
(19) |
|
dropWhile2(p,nil) |
→ |
nil |
(20) |
|
dropWhile2(p,cons2(x,xs)) |
→ |
if3(app(p,x),dropWhile2(p,xs),cons2(x,xs)) |
(21) |
|
app(if,y1) |
→ |
if1(y1) |
(7) |
|
app(if1(x0),y1) |
→ |
if2(x0,y1) |
(8) |
|
app(if2(x0,x1),y1) |
→ |
if3(x0,x1,y1) |
(9) |
|
app(takeWhile,y1) |
→ |
takeWhile1(y1) |
(10) |
|
app(cons,y1) |
→ |
cons1(y1) |
(12) |
|
app(cons1(x0),y1) |
→ |
cons2(x0,y1) |
(13) |
|
app(dropWhile,y1) |
→ |
dropWhile1(y1) |
(14) |
There are no rules in the TRS. Hence, it is terminating.