The rewrite relation of the following TRS is considered.
app(app(app(comp,f),g),x) | → | app(f,app(g,x)) | (1) |
app(twice,f) | → | app(app(comp,f),f) | (2) |
We uncurry the binary symbol app in combination with the following symbol map which also determines the applicative arities of these symbols.
comp | is mapped to | comp, | comp1(x1), | comp2(x1, x2), | comp3(x1, x2, x3) |
twice | is mapped to | twice, | twice1(x1) |
comp3(f,g,x) | → | app(f,app(g,x)) | (7) |
twice1(f) | → | comp2(f,f) | (8) |
app(comp,y1) | → | comp1(y1) | (3) |
app(comp1(x0),y1) | → | comp2(x0,y1) | (4) |
app(comp2(x0,x1),y1) | → | comp3(x0,x1,y1) | (5) |
app(twice,y1) | → | twice1(y1) | (6) |
The TRS is overlay and locally confluent:
10Hence, it suffices to show innermost termination in the following.
comp3#(f,g,x) | → | app#(f,app(g,x)) | (9) |
comp3#(f,g,x) | → | app#(g,x) | (10) |
app#(comp2(x0,x1),y1) | → | comp3#(x0,x1,y1) | (11) |
app#(twice,y1) | → | twice1#(y1) | (12) |
The dependency pairs are split into 1 component.
app#(comp2(x0,x1),y1) | → | comp3#(x0,x1,y1) | (11) |
comp3#(f,g,x) | → | app#(f,app(g,x)) | (9) |
comp3#(f,g,x) | → | app#(g,x) | (10) |
Using size-change termination in combination with the subterm criterion one obtains the following initial size-change graphs.
app#(comp2(x0,x1),y1) | → | comp3#(x0,x1,y1) | (11) |
1 | > | 1 | |
1 | > | 2 | |
2 | ≥ | 3 | |
comp3#(f,g,x) | → | app#(f,app(g,x)) | (9) |
1 | ≥ | 1 | |
comp3#(f,g,x) | → | app#(g,x) | (10) |
2 | ≥ | 1 | |
3 | ≥ | 2 |
As there is no critical graph in the transitive closure, there are no infinite chains.