The rewrite relation of the following TRS is considered.
f(g(x)) | → | g(g(f(x))) | (1) |
g(s(x)) | → | s(s(g(x))) | (2) |
s(x) | → | h(0,x) | (3) |
s(x) | → | h(x,0) | (4) |
f(0) | → | 0 | (5) |
s(s(s(0))) | → | f(s(0)) | (6) |
f(s(0)) | → | s(0) | (7) |
h(f(x),g(x)) | → | f(s(x)) | (8) |
g(x) | → | h(h(h(h(x,x),x),x),x) | (9) |
f(s(s(x))) | → | h(f(x),g(h(x,x))) | (10) |
s(0) | → | r(0) | (11) |
s(s(s(0))) | → | r(s(0)) | (12) |
r(s(0)) | → | s(0) | (13) |
g(x) | → | r(x) | (14) |
s(0) | → | p(0) | (15) |
s(s(0)) | → | p(s(0)) | (16) |
p(s(0)) | → | 0 | (17) |
s(s(s(s(s(0))))) | → | p(s(s(0))) | (18) |
p(s(s(0))) | → | s(s(s(0))) | (19) |
h(p(x),g(x)) | → | p(s(x)) | (20) |
s(0) | → | k(0) | (21) |
s(s(p(p(a)))) | → | s(k(p(a))) | (22) |
s(k(p(a))) | → | p(p(a)) | (23) |
g(x) | → | k(x) | (24) |
a | → | 0 | (25) |
s(h(r(k(p(x))),r(x))) | → | h(r(r(p(x))),k(x)) | (26) |
f#(g(x)) | → | g#(g(f(x))) | (27) |
f#(g(x)) | → | g#(f(x)) | (28) |
f#(g(x)) | → | f#(x) | (29) |
g#(s(x)) | → | s#(s(g(x))) | (30) |
g#(s(x)) | → | s#(g(x)) | (31) |
g#(s(x)) | → | g#(x) | (32) |
s#(x) | → | h#(0,x) | (33) |
s#(x) | → | h#(x,0) | (34) |
s#(s(s(0))) | → | f#(s(0)) | (35) |
h#(f(x),g(x)) | → | f#(s(x)) | (36) |
h#(f(x),g(x)) | → | s#(x) | (37) |
g#(x) | → | h#(h(h(h(x,x),x),x),x) | (38) |
g#(x) | → | h#(h(h(x,x),x),x) | (39) |
g#(x) | → | h#(h(x,x),x) | (40) |
g#(x) | → | h#(x,x) | (41) |
f#(s(s(x))) | → | h#(f(x),g(h(x,x))) | (42) |
f#(s(s(x))) | → | f#(x) | (43) |
f#(s(s(x))) | → | g#(h(x,x)) | (44) |
f#(s(s(x))) | → | h#(x,x) | (45) |
s#(0) | → | r#(0) | (46) |
s#(s(s(0))) | → | r#(s(0)) | (47) |
g#(x) | → | r#(x) | (48) |
s#(0) | → | p#(0) | (49) |
s#(s(0)) | → | p#(s(0)) | (50) |
s#(s(s(s(s(0))))) | → | p#(s(s(0))) | (51) |
p#(s(s(0))) | → | s#(s(s(0))) | (52) |
h#(p(x),g(x)) | → | p#(s(x)) | (53) |
h#(p(x),g(x)) | → | s#(x) | (54) |
s#(s(p(p(a)))) | → | s#(k(p(a))) | (55) |
s#(k(p(a))) | → | p#(p(a)) | (56) |
s#(h(r(k(p(x))),r(x))) | → | h#(r(r(p(x))),k(x)) | (57) |
s#(h(r(k(p(x))),r(x))) | → | r#(r(p(x))) | (58) |
s#(h(r(k(p(x))),r(x))) | → | r#(p(x)) | (59) |
The dependency pairs are split into 1 component.
g#(s(x)) | → | s#(s(g(x))) | (30) |
s#(s(s(0))) | → | f#(s(0)) | (35) |
f#(g(x)) | → | g#(g(f(x))) | (27) |
g#(s(x)) | → | s#(g(x)) | (31) |
s#(s(0)) | → | p#(s(0)) | (50) |
p#(s(s(0))) | → | s#(s(s(0))) | (52) |
s#(s(s(s(s(0))))) | → | p#(s(s(0))) | (51) |
s#(s(p(p(a)))) | → | s#(k(p(a))) | (55) |
s#(k(p(a))) | → | p#(p(a)) | (56) |
g#(s(x)) | → | g#(x) | (32) |
g#(x) | → | h#(h(h(h(x,x),x),x),x) | (38) |
h#(f(x),g(x)) | → | f#(s(x)) | (36) |
f#(g(x)) | → | g#(f(x)) | (28) |
g#(x) | → | h#(h(h(x,x),x),x) | (39) |
h#(f(x),g(x)) | → | s#(x) | (37) |
h#(p(x),g(x)) | → | p#(s(x)) | (53) |
h#(p(x),g(x)) | → | s#(x) | (54) |
g#(x) | → | h#(h(x,x),x) | (40) |
g#(x) | → | h#(x,x) | (41) |
f#(g(x)) | → | f#(x) | (29) |
f#(s(s(x))) | → | h#(f(x),g(h(x,x))) | (42) |
f#(s(s(x))) | → | f#(x) | (43) |
f#(s(s(x))) | → | g#(h(x,x)) | (44) |
f#(s(s(x))) | → | h#(x,x) | (45) |
s#(k(p(a))) | → | p#(p(0)) | (60) |
The dependency pairs are split into 1 component.
s#(s(s(0))) | → | f#(s(0)) | (35) |
f#(g(x)) | → | g#(g(f(x))) | (27) |
g#(s(x)) | → | s#(s(g(x))) | (30) |
s#(s(0)) | → | p#(s(0)) | (50) |
p#(s(s(0))) | → | s#(s(s(0))) | (52) |
s#(s(s(s(s(0))))) | → | p#(s(s(0))) | (51) |
g#(s(x)) | → | s#(g(x)) | (31) |
g#(s(x)) | → | g#(x) | (32) |
g#(x) | → | h#(h(h(h(x,x),x),x),x) | (38) |
h#(f(x),g(x)) | → | f#(s(x)) | (36) |
f#(g(x)) | → | g#(f(x)) | (28) |
g#(x) | → | h#(h(h(x,x),x),x) | (39) |
h#(f(x),g(x)) | → | s#(x) | (37) |
h#(p(x),g(x)) | → | p#(s(x)) | (53) |
h#(p(x),g(x)) | → | s#(x) | (54) |
g#(x) | → | h#(h(x,x),x) | (40) |
g#(x) | → | h#(x,x) | (41) |
f#(g(x)) | → | f#(x) | (29) |
f#(s(s(x))) | → | h#(f(x),g(h(x,x))) | (42) |
f#(s(s(x))) | → | f#(x) | (43) |
f#(s(s(x))) | → | g#(h(x,x)) | (44) |
f#(s(s(x))) | → | h#(x,x) | (45) |
[f#(x1)] | = | 2 · x1 |
[g#(x1)] | = | x1 |
[h#(x1, x2)] | = | x1 |
[p#(x1)] | = | -2 |
[s#(x1)] | = | -2 |
[s(x1)] | = | x1 |
[h(x1, x2)] | = | x1 |
[0] | = | 0 |
[r(x1)] | = | -2 |
[p(x1)] | = | x1 |
[k(x1)] | = | x1 |
[g(x1)] | = | 2 + x1 |
[f(x1)] | = | 2 · x1 |
[a] | = | 2 |
f#(g(x)) | → | g#(g(f(x))) | (27) |
f#(g(x)) | → | g#(f(x)) | (28) |
f#(g(x)) | → | f#(x) | (29) |
[f#(x1)] | = | 1 + x1 |
[g#(x1)] | = | 1 + x1 |
[h#(x1, x2)] | = | -1 + x2 |
[p#(x1)] | = | 1 |
[s#(x1)] | = | 1 |
[s(x1)] | = | x1 |
[h(x1, x2)] | = | x1 |
[0] | = | 0 |
[r(x1)] | = | 0 |
[p(x1)] | = | -2 |
[k(x1)] | = | x1 |
[g(x1)] | = | 2 + x1 |
[f(x1)] | = | 2 · x1 |
[a] | = | 0 |
s(x) | → | h(0,x) | (3) |
s(x) | → | h(x,0) | (4) |
s(0) | → | r(0) | (11) |
s(0) | → | p(0) | (15) |
s(0) | → | k(0) | (21) |
g(s(x)) | → | s(s(g(x))) | (2) |
s(s(s(0))) | → | f(s(0)) | (6) |
f(g(x)) | → | g(g(f(x))) | (1) |
g(x) | → | h(h(h(h(x,x),x),x),x) | (9) |
h(f(x),g(x)) | → | f(s(x)) | (8) |
f(s(s(x))) | → | h(f(x),g(h(x,x))) | (10) |
h(p(x),g(x)) | → | p(s(x)) | (20) |
p(s(s(0))) | → | s(s(s(0))) | (19) |
s(s(0)) | → | p(s(0)) | (16) |
s(s(s(s(s(0))))) | → | p(s(s(0))) | (18) |
s(s(p(p(a)))) | → | s(k(p(a))) | (22) |
s(k(p(a))) | → | p(p(a)) | (23) |
g(x) | → | r(x) | (14) |
g(x) | → | k(x) | (24) |
s(s(s(0))) | → | r(s(0)) | (12) |
s(h(r(k(p(x))),r(x))) | → | h(r(r(p(x))),k(x)) | (26) |
f(0) | → | 0 | (5) |
f(s(0)) | → | s(0) | (7) |
p(s(0)) | → | 0 | (17) |
r(s(0)) | → | s(0) | (13) |
g#(x) | → | h#(h(h(h(x,x),x),x),x) | (38) |
g#(x) | → | h#(h(h(x,x),x),x) | (39) |
g#(x) | → | h#(h(x,x),x) | (40) |
g#(x) | → | h#(x,x) | (41) |
f#(s(s(x))) | → | h#(x,x) | (45) |
s#(s(s(0))) | → | f#(h(0,0)) | (61) |
s#(s(s(0))) | → | f#(r(0)) | (62) |
s#(s(s(0))) | → | f#(p(0)) | (63) |
s#(s(s(0))) | → | f#(k(0)) | (64) |
The dependency pairs are split into 3 components.
f#(s(s(x))) | → | h#(f(x),g(h(x,x))) | (42) |
h#(f(x),g(x)) | → | f#(s(x)) | (36) |
f#(s(s(x))) | → | f#(x) | (43) |
[f#(x1)] | = |
|
||||||||||||||||||||||||||||||
[s(x1)] | = |
|
||||||||||||||||||||||||||||||
[h#(x1, x2)] | = |
|
||||||||||||||||||||||||||||||
[f(x1)] | = |
|
||||||||||||||||||||||||||||||
[g(x1)] | = |
|
||||||||||||||||||||||||||||||
[h(x1, x2)] | = |
|
||||||||||||||||||||||||||||||
[0] | = |
|
||||||||||||||||||||||||||||||
[p(x1)] | = |
|
||||||||||||||||||||||||||||||
[a] | = |
|
||||||||||||||||||||||||||||||
[k(x1)] | = |
|
||||||||||||||||||||||||||||||
[r(x1)] | = |
|
h#(f(x),g(x)) | → | f#(s(x)) | (36) |
The dependency pairs are split into 1 component.
f#(s(s(x))) | → | f#(x) | (43) |
[s(x1)] | = | 1 · x1 |
[f#(x1)] | = | 1 · x1 |
Using size-change termination in combination with the subterm criterion one obtains the following initial size-change graphs.
f#(s(s(x))) | → | f#(x) | (43) |
1 | > | 1 |
As there is no critical graph in the transitive closure, there are no infinite chains.
g#(s(x)) | → | g#(x) | (32) |
[s(x1)] | = | 1 · x1 |
[g#(x1)] | = | 1 · x1 |
g#(s(s(y_0))) | → | g#(s(y_0)) | (65) |
Using size-change termination in combination with the subterm criterion one obtains the following initial size-change graphs.
g#(s(s(y_0))) | → | g#(s(y_0)) | (65) |
1 | > | 1 |
As there is no critical graph in the transitive closure, there are no infinite chains.
p#(s(s(0))) | → | s#(s(s(0))) | (52) |
s#(s(0)) | → | p#(s(0)) | (50) |
s#(s(s(s(s(0))))) | → | p#(s(s(0))) | (51) |
p#(s(s(0))) | → | s#(h(0,s(0))) | (66) |
p#(s(s(0))) | → | s#(h(s(0),0)) | (67) |
p#(s(s(0))) | → | s#(p(s(0))) | (68) |
p#(s(s(0))) | → | s#(s(h(0,0))) | (69) |
p#(s(s(0))) | → | s#(s(r(0))) | (70) |
p#(s(s(0))) | → | s#(s(p(0))) | (71) |
p#(s(s(0))) | → | s#(s(k(0))) | (72) |
The dependency pairs are split into 1 component.
p#(s(s(0))) | → | s#(p(s(0))) | (68) |
s#(s(0)) | → | p#(s(0)) | (50) |
p#(s(s(0))) | → | s#(s(h(0,0))) | (69) |
s#(s(s(s(s(0))))) | → | p#(s(s(0))) | (51) |
p#(s(s(0))) | → | s#(s(r(0))) | (70) |
p#(s(s(0))) | → | s#(s(p(0))) | (71) |
p#(s(s(0))) | → | s#(s(k(0))) | (72) |
s#(s(0)) | → | p#(h(0,0)) | (73) |
s#(s(0)) | → | p#(r(0)) | (74) |
s#(s(0)) | → | p#(p(0)) | (75) |
s#(s(0)) | → | p#(k(0)) | (76) |
The dependency pairs are split into 1 component.
s#(s(s(s(s(0))))) | → | p#(s(s(0))) | (51) |
p#(s(s(0))) | → | s#(p(s(0))) | (68) |
p#(s(s(0))) | → | s#(s(h(0,0))) | (69) |
p#(s(s(0))) | → | s#(s(r(0))) | (70) |
p#(s(s(0))) | → | s#(s(p(0))) | (71) |
p#(s(s(0))) | → | s#(s(k(0))) | (72) |
[s#(x1)] | = |
|
|||||||||||||||||||
[s(x1)] | = |
|
|||||||||||||||||||
[0] | = |
|
|||||||||||||||||||
[p#(x1)] | = |
|
|||||||||||||||||||
[p(x1)] | = |
|
|||||||||||||||||||
[h(x1, x2)] | = |
|
|||||||||||||||||||
[r(x1)] | = |
|
|||||||||||||||||||
[k(x1)] | = |
|
|||||||||||||||||||
[g(x1)] | = |
|
|||||||||||||||||||
[f(x1)] | = |
|
|||||||||||||||||||
[a] | = |
|
p#(s(s(0))) | → | s#(p(s(0))) | (68) |
p#(s(s(0))) | → | s#(s(p(0))) | (71) |
p#(s(s(0))) | → | s#(s(k(0))) | (72) |
prec(0) | = | 1 | weight(0) | = | 4 | ||||
prec(p#) | = | 3 | weight(p#) | = | 3 | ||||
prec(h) | = | 2 | weight(h) | = | 1 | ||||
prec(r) | = | 0 | weight(r) | = | 2 |
π(s#) | = | 1 |
π(s) | = | 1 |
π(0) | = | [] |
π(p#) | = | [] |
π(h) | = | [] |
π(r) | = | [] |
s(x) | → | h(0,x) | (3) |
s(x) | → | h(x,0) | (4) |
s#(s(s(s(s(0))))) | → | p#(s(s(0))) | (51) |
p#(s(s(0))) | → | s#(s(h(0,0))) | (69) |
p#(s(s(0))) | → | s#(s(r(0))) | (70) |
There are no pairs anymore.