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) |
app#(app(takeWhile,p),app(app(cons,x),xs)) | → | app#(app(takeWhile,p),xs) | (7) |
app#(app(takeWhile,p),app(app(cons,x),xs)) | → | app#(app(cons,x),app(app(takeWhile,p),xs)) | (8) |
app#(app(takeWhile,p),app(app(cons,x),xs)) | → | app#(p,x) | (9) |
app#(app(takeWhile,p),app(app(cons,x),xs)) | → | app#(if,app(p,x)) | (10) |
app#(app(takeWhile,p),app(app(cons,x),xs)) | → | app#(app(if,app(p,x)),app(app(cons,x),app(app(takeWhile,p),xs))) | (11) |
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) | (12) |
app#(app(dropWhile,p),app(app(cons,x),xs)) | → | app#(app(dropWhile,p),xs) | (13) |
app#(app(dropWhile,p),app(app(cons,x),xs)) | → | app#(p,x) | (14) |
app#(app(dropWhile,p),app(app(cons,x),xs)) | → | app#(if,app(p,x)) | (15) |
app#(app(dropWhile,p),app(app(cons,x),xs)) | → | app#(app(if,app(p,x)),app(app(dropWhile,p),xs)) | (16) |
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)) | (17) |
The dependency pairs are split into 1 component.
app#(app(dropWhile,p),app(app(cons,x),xs)) | → | app#(app(dropWhile,p),xs) | (13) |
app#(app(dropWhile,p),app(app(cons,x),xs)) | → | app#(p,x) | (14) |
app#(app(takeWhile,p),app(app(cons,x),xs)) | → | app#(p,x) | (9) |
app#(app(takeWhile,p),app(app(cons,x),xs)) | → | app#(app(takeWhile,p),xs) | (7) |
Using size-change termination in combination with the subterm criterion one obtains the following initial size-change graphs.
app#(app(dropWhile,p),app(app(cons,x),xs)) | → | app#(app(dropWhile,p),xs) | (13) |
2 | > | 2 | |
1 | ≥ | 1 | |
app#(app(dropWhile,p),app(app(cons,x),xs)) | → | app#(p,x) | (14) |
2 | > | 2 | |
1 | > | 1 | |
app#(app(takeWhile,p),app(app(cons,x),xs)) | → | app#(p,x) | (9) |
2 | > | 2 | |
1 | > | 1 | |
app#(app(takeWhile,p),app(app(cons,x),xs)) | → | app#(app(takeWhile,p),xs) | (7) |
2 | > | 2 | |
1 | ≥ | 1 |
As there is no critical graph in the transitive closure, there are no infinite chains.