The rewrite relation of the following TRS is considered.
| merge(nil,y) | → | y | (1) |
| merge(x,nil) | → | x | (2) |
| merge(.(x,y),.(u,v)) | → | if(<(x,u),.(x,merge(y,.(u,v))),.(u,merge(.(x,y),v))) | (3) |
| ++(nil,y) | → | y | (4) |
| ++(.(x,y),z) | → | .(x,++(y,z)) | (5) |
| if(true,x,y) | → | x | (6) |
| if(false,x,y) | → | x | (7) |
| merge#(.(x,y),.(u,v)) | → | merge#(.(x,y),v) | (8) |
| merge#(.(x,y),.(u,v)) | → | merge#(y,.(u,v)) | (9) |
| merge#(.(x,y),.(u,v)) | → | if#(<(x,u),.(x,merge(y,.(u,v))),.(u,merge(.(x,y),v))) | (10) |
| ++#(.(x,y),z) | → | ++#(y,z) | (11) |
The dependency pairs are split into 2 components.
| merge#(.(x,y),.(u,v)) | → | merge#(.(x,y),v) | (8) |
| merge#(.(x,y),.(u,v)) | → | merge#(y,.(u,v)) | (9) |
Using size-change termination in combination with the subterm criterion one obtains the following initial size-change graphs.
| merge#(.(x,y),.(u,v)) | → | merge#(.(x,y),v) | (8) |
| 2 | > | 2 | |
| 1 | ≥ | 1 | |
| merge#(.(x,y),.(u,v)) | → | merge#(y,.(u,v)) | (9) |
| 2 | ≥ | 2 | |
| 1 | > | 1 |
As there is no critical graph in the transitive closure, there are no infinite chains.
| ++#(.(x,y),z) | → | ++#(y,z) | (11) |
Using size-change termination in combination with the subterm criterion one obtains the following initial size-change graphs.
| ++#(.(x,y),z) | → | ++#(y,z) | (11) |
| 2 | ≥ | 2 | |
| 1 | > | 1 |
As there is no critical graph in the transitive closure, there are no infinite chains.