The rewrite relation of the following TRS is considered.
cond1(true,x,y,z) | → | cond2(gr(x,0),x,y,z) | (1) |
cond2(true,x,y,z) | → | cond1(or(gr(x,z),gr(y,z)),p(x),y,z) | (2) |
cond2(false,x,y,z) | → | cond3(gr(y,0),x,y,z) | (3) |
cond3(true,x,y,z) | → | cond1(or(gr(x,z),gr(y,z)),x,p(y),z) | (4) |
cond3(false,x,y,z) | → | cond1(or(gr(x,z),gr(y,z)),x,y,z) | (5) |
gr(0,x) | → | false | (6) |
gr(s(x),0) | → | true | (7) |
gr(s(x),s(y)) | → | gr(x,y) | (8) |
or(false,false) | → | false | (9) |
or(true,x) | → | true | (10) |
or(x,true) | → | true | (11) |
p(0) | → | 0 | (12) |
p(s(x)) | → | x | (13) |
The TRS is overlay and locally confluent:
10Hence, it suffices to show innermost termination in the following.
cond1#(true,x,y,z) | → | cond2#(gr(x,0),x,y,z) | (14) |
cond1#(true,x,y,z) | → | gr#(x,0) | (15) |
cond2#(true,x,y,z) | → | cond1#(or(gr(x,z),gr(y,z)),p(x),y,z) | (16) |
cond2#(true,x,y,z) | → | or#(gr(x,z),gr(y,z)) | (17) |
cond2#(true,x,y,z) | → | gr#(x,z) | (18) |
cond2#(true,x,y,z) | → | gr#(y,z) | (19) |
cond2#(true,x,y,z) | → | p#(x) | (20) |
cond2#(false,x,y,z) | → | cond3#(gr(y,0),x,y,z) | (21) |
cond2#(false,x,y,z) | → | gr#(y,0) | (22) |
cond3#(true,x,y,z) | → | cond1#(or(gr(x,z),gr(y,z)),x,p(y),z) | (23) |
cond3#(true,x,y,z) | → | or#(gr(x,z),gr(y,z)) | (24) |
cond3#(true,x,y,z) | → | gr#(x,z) | (25) |
cond3#(true,x,y,z) | → | gr#(y,z) | (26) |
cond3#(true,x,y,z) | → | p#(y) | (27) |
cond3#(false,x,y,z) | → | cond1#(or(gr(x,z),gr(y,z)),x,y,z) | (28) |
cond3#(false,x,y,z) | → | or#(gr(x,z),gr(y,z)) | (29) |
cond3#(false,x,y,z) | → | gr#(x,z) | (30) |
cond3#(false,x,y,z) | → | gr#(y,z) | (31) |
gr#(s(x),s(y)) | → | gr#(x,y) | (32) |
The dependency pairs are split into 2 components.
cond2#(true,x,y,z) | → | cond1#(or(gr(x,z),gr(y,z)),p(x),y,z) | (16) |
cond1#(true,x,y,z) | → | cond2#(gr(x,0),x,y,z) | (14) |
cond2#(false,x,y,z) | → | cond3#(gr(y,0),x,y,z) | (21) |
cond3#(true,x,y,z) | → | cond1#(or(gr(x,z),gr(y,z)),x,p(y),z) | (23) |
cond3#(false,x,y,z) | → | cond1#(or(gr(x,z),gr(y,z)),x,y,z) | (28) |
We restrict the rewrite rules to the following usable rules of the DP problem.
gr(0,x) | → | false | (6) |
gr(s(x),0) | → | true | (7) |
gr(s(x),s(y)) | → | gr(x,y) | (8) |
or(false,false) | → | false | (9) |
or(true,x) | → | true | (10) |
or(x,true) | → | true | (11) |
p(0) | → | 0 | (12) |
p(s(x)) | → | x | (13) |
We restrict the innermost strategy to the following left hand sides.
gr(0,x0) |
gr(s(x0),0) |
gr(s(x0),s(x1)) |
or(false,false) |
or(true,x0) |
or(x0,true) |
p(0) |
p(s(x0)) |
cond2#(true,0,y1,x0) | → | cond1#(or(false,gr(y1,x0)),p(0),y1,x0) | (33) |
cond2#(true,s(x0),y1,0) | → | cond1#(or(true,gr(y1,0)),p(s(x0)),y1,0) | (34) |
cond2#(true,s(x0),y1,s(x1)) | → | cond1#(or(gr(x0,x1),gr(y1,s(x1))),p(s(x0)),y1,s(x1)) | (35) |
cond2#(true,y0,0,x0) | → | cond1#(or(gr(y0,x0),false),p(y0),0,x0) | (36) |
cond2#(true,y0,s(x0),0) | → | cond1#(or(gr(y0,0),true),p(y0),s(x0),0) | (37) |
cond2#(true,y0,s(x0),s(x1)) | → | cond1#(or(gr(y0,s(x1)),gr(x0,x1)),p(y0),s(x0),s(x1)) | (38) |
→ |
→ |
→ |
→ |
→ |
cond1#(true,0,y1,y2) | → | cond2#(false,0,y1,y2) | (44) |
cond1#(true,s(x0),y1,y2) | → | cond2#(true,s(x0),y1,y2) | (45) |
The dependency pairs are split into 1 component.
cond3#(true,x,y,z) | → | cond1#(or(gr(x,z),gr(y,z)),x,p(y),z) | (23) |
cond1#(true,0,y1,y2) | → | cond2#(false,0,y1,y2) | (44) |
cond2#(false,x,y,z) | → | cond3#(gr(y,0),x,y,z) | (21) |
cond3#(false,x,y,z) | → | cond1#(or(gr(x,z),gr(y,z)),x,y,z) | (28) |
cond1#(true,s(x0),y1,y2) | → | cond2#(true,s(x0),y1,y2) | (45) |
cond2#(true,y0,0,x0) | → | cond1#(or(gr(y0,x0),false),p(y0),0,x0) | (36) |
cond2#(true,y0,s(x0),s(x1)) | → | cond1#(or(gr(y0,s(x1)),gr(x0,x1)),p(y0),s(x0),s(x1)) | (38) |
cond2#(true,s(x0),y1,s(x1)) | → | cond1#(or(gr(x0,x1),gr(y1,s(x1))),x0,y1,s(x1)) | (41) |
cond2#(true,y0,s(x0),0) | → | cond1#(true,p(y0),s(x0),0) | (42) |
cond2#(true,s(x0),y1,0) | → | cond1#(true,x0,y1,0) | (43) |
cond3#(true,0,y1,x0) | → | cond1#(or(false,gr(y1,x0)),0,p(y1),x0) | (46) |
cond3#(true,s(x0),y1,0) | → | cond1#(or(true,gr(y1,0)),s(x0),p(y1),0) | (47) |
cond3#(true,s(x0),y1,s(x1)) | → | cond1#(or(gr(x0,x1),gr(y1,s(x1))),s(x0),p(y1),s(x1)) | (48) |
cond3#(true,y0,0,x0) | → | cond1#(or(gr(y0,x0),false),y0,p(0),x0) | (49) |
cond3#(true,y0,s(x0),0) | → | cond1#(or(gr(y0,0),true),y0,p(s(x0)),0) | (50) |
cond3#(true,y0,s(x0),s(x1)) | → | cond1#(or(gr(y0,s(x1)),gr(x0,x1)),y0,p(s(x0)),s(x1)) | (51) |
→ |
→ |
→ |
→ |
→ |
cond2#(false,y0,0,y2) | → | cond3#(false,y0,0,y2) | (57) |
cond2#(false,y0,s(x0),y2) | → | cond3#(true,y0,s(x0),y2) | (58) |
The dependency pairs are split into 1 component.
cond2#(false,y0,0,y2) | → | cond3#(false,y0,0,y2) | (57) |
cond3#(false,x,y,z) | → | cond1#(or(gr(x,z),gr(y,z)),x,y,z) | (28) |
cond1#(true,0,y1,y2) | → | cond2#(false,0,y1,y2) | (44) |
cond2#(false,y0,s(x0),y2) | → | cond3#(true,y0,s(x0),y2) | (58) |
cond3#(true,0,y1,x0) | → | cond1#(or(false,gr(y1,x0)),0,p(y1),x0) | (46) |
cond3#(true,s(x0),y1,s(x1)) | → | cond1#(or(gr(x0,x1),gr(y1,s(x1))),s(x0),p(y1),s(x1)) | (48) |
cond1#(true,s(x0),y1,y2) | → | cond2#(true,s(x0),y1,y2) | (45) |
cond2#(true,y0,0,x0) | → | cond1#(or(gr(y0,x0),false),p(y0),0,x0) | (36) |
cond2#(true,y0,s(x0),s(x1)) | → | cond1#(or(gr(y0,s(x1)),gr(x0,x1)),p(y0),s(x0),s(x1)) | (38) |
cond2#(true,s(x0),y1,s(x1)) | → | cond1#(or(gr(x0,x1),gr(y1,s(x1))),x0,y1,s(x1)) | (41) |
cond2#(true,y0,s(x0),0) | → | cond1#(true,p(y0),s(x0),0) | (42) |
cond2#(true,s(x0),y1,0) | → | cond1#(true,x0,y1,0) | (43) |
cond3#(true,s(x0),y1,0) | → | cond1#(true,s(x0),p(y1),0) | (52) |
cond3#(true,y0,s(x0),s(x1)) | → | cond1#(or(gr(y0,s(x1)),gr(x0,x1)),y0,x0,s(x1)) | (55) |
cond3#(true,y0,s(x0),0) | → | cond1#(true,y0,x0,0) | (56) |
cond3#(false,0,y1,x0) | → | cond1#(or(false,gr(y1,x0)),0,y1,x0) | (59) |
cond3#(false,s(x0),y1,0) | → | cond1#(or(true,gr(y1,0)),s(x0),y1,0) | (60) |
cond3#(false,s(x0),y1,s(x1)) | → | cond1#(or(gr(x0,x1),gr(y1,s(x1))),s(x0),y1,s(x1)) | (61) |
cond3#(false,y0,0,x0) | → | cond1#(or(gr(y0,x0),false),y0,0,x0) | (62) |
cond3#(false,y0,s(x0),0) | → | cond1#(or(gr(y0,0),true),y0,s(x0),0) | (63) |
cond3#(false,y0,s(x0),s(x1)) | → | cond1#(or(gr(y0,s(x1)),gr(x0,x1)),y0,s(x0),s(x1)) | (64) |
The dependency pairs are split into 1 component.
cond3#(false,0,y1,x0) | → | cond1#(or(false,gr(y1,x0)),0,y1,x0) | (59) |
cond1#(true,0,y1,y2) | → | cond2#(false,0,y1,y2) | (44) |
cond2#(false,y0,0,y2) | → | cond3#(false,y0,0,y2) | (57) |
cond3#(false,s(x0),y1,0) | → | cond1#(or(true,gr(y1,0)),s(x0),y1,0) | (60) |
cond1#(true,s(x0),y1,y2) | → | cond2#(true,s(x0),y1,y2) | (45) |
cond2#(true,y0,0,x0) | → | cond1#(or(gr(y0,x0),false),p(y0),0,x0) | (36) |
cond2#(true,y0,s(x0),s(x1)) | → | cond1#(or(gr(y0,s(x1)),gr(x0,x1)),p(y0),s(x0),s(x1)) | (38) |
cond2#(true,s(x0),y1,s(x1)) | → | cond1#(or(gr(x0,x1),gr(y1,s(x1))),x0,y1,s(x1)) | (41) |
cond2#(true,y0,s(x0),0) | → | cond1#(true,p(y0),s(x0),0) | (42) |
cond2#(true,s(x0),y1,0) | → | cond1#(true,x0,y1,0) | (43) |
cond3#(false,s(x0),y1,s(x1)) | → | cond1#(or(gr(x0,x1),gr(y1,s(x1))),s(x0),y1,s(x1)) | (61) |
cond3#(false,y0,0,x0) | → | cond1#(or(gr(y0,x0),false),y0,0,x0) | (62) |
cond2#(false,y0,s(x0),y2) | → | cond3#(true,y0,s(x0),y2) | (58) |
cond3#(true,0,y1,x0) | → | cond1#(or(false,gr(y1,x0)),0,p(y1),x0) | (46) |
cond3#(true,s(x0),y1,s(x1)) | → | cond1#(or(gr(x0,x1),gr(y1,s(x1))),s(x0),p(y1),s(x1)) | (48) |
cond3#(true,s(x0),y1,0) | → | cond1#(true,s(x0),p(y1),0) | (52) |
cond3#(true,y0,s(x0),s(x1)) | → | cond1#(or(gr(y0,s(x1)),gr(x0,x1)),y0,x0,s(x1)) | (55) |
cond3#(true,y0,s(x0),0) | → | cond1#(true,y0,x0,0) | (56) |
→ |
cond2#(true,0,0,y1) | → | cond1#(or(gr(0,y1),false),0,0,y1) | (66) |
cond2#(true,s(x0),0,y1) | → | cond1#(or(gr(s(x0),y1),false),x0,0,y1) | (67) |
The dependency pairs are split into 1 component.
cond1#(true,0,y1,y2) | → | cond2#(false,0,y1,y2) | (44) |
cond2#(false,y0,0,y2) | → | cond3#(false,y0,0,y2) | (57) |
cond3#(false,0,y1,x0) | → | cond1#(or(false,gr(y1,x0)),0,y1,x0) | (59) |
cond3#(false,s(x0),y1,s(x1)) | → | cond1#(or(gr(x0,x1),gr(y1,s(x1))),s(x0),y1,s(x1)) | (61) |
cond1#(true,s(x0),y1,y2) | → | cond2#(true,s(x0),y1,y2) | (45) |
cond2#(true,y0,s(x0),s(x1)) | → | cond1#(or(gr(y0,s(x1)),gr(x0,x1)),p(y0),s(x0),s(x1)) | (38) |
cond2#(true,s(x0),y1,s(x1)) | → | cond1#(or(gr(x0,x1),gr(y1,s(x1))),x0,y1,s(x1)) | (41) |
cond2#(true,y0,s(x0),0) | → | cond1#(true,p(y0),s(x0),0) | (42) |
cond2#(true,s(x0),y1,0) | → | cond1#(true,x0,y1,0) | (43) |
cond2#(true,s(x0),0,y1) | → | cond1#(or(gr(s(x0),y1),false),x0,0,y1) | (67) |
cond3#(false,y0,0,x0) | → | cond1#(or(gr(y0,x0),false),y0,0,x0) | (62) |
cond3#(false,s(x0),y1,0) | → | cond1#(true,s(x0),y1,0) | (65) |
cond2#(false,y0,s(x0),y2) | → | cond3#(true,y0,s(x0),y2) | (58) |
cond3#(true,0,y1,x0) | → | cond1#(or(false,gr(y1,x0)),0,p(y1),x0) | (46) |
cond3#(true,s(x0),y1,s(x1)) | → | cond1#(or(gr(x0,x1),gr(y1,s(x1))),s(x0),p(y1),s(x1)) | (48) |
cond3#(true,s(x0),y1,0) | → | cond1#(true,s(x0),p(y1),0) | (52) |
cond3#(true,y0,s(x0),s(x1)) | → | cond1#(or(gr(y0,s(x1)),gr(x0,x1)),y0,x0,s(x1)) | (55) |
cond3#(true,y0,s(x0),0) | → | cond1#(true,y0,x0,0) | (56) |
cond2#(true,0,s(y1),s(y2)) | → | cond1#(or(gr(0,s(y2)),gr(y1,y2)),0,s(y1),s(y2)) | (68) |
cond2#(true,s(x0),s(y1),s(y2)) | → | cond1#(or(gr(s(x0),s(y2)),gr(y1,y2)),x0,s(y1),s(y2)) | (69) |
The dependency pairs are split into 1 component.
cond2#(false,y0,0,y2) | → | cond3#(false,y0,0,y2) | (57) |
cond3#(false,0,y1,x0) | → | cond1#(or(false,gr(y1,x0)),0,y1,x0) | (59) |
cond1#(true,0,y1,y2) | → | cond2#(false,0,y1,y2) | (44) |
cond2#(false,y0,s(x0),y2) | → | cond3#(true,y0,s(x0),y2) | (58) |
cond3#(true,0,y1,x0) | → | cond1#(or(false,gr(y1,x0)),0,p(y1),x0) | (46) |
cond3#(true,s(x0),y1,s(x1)) | → | cond1#(or(gr(x0,x1),gr(y1,s(x1))),s(x0),p(y1),s(x1)) | (48) |
cond1#(true,s(x0),y1,y2) | → | cond2#(true,s(x0),y1,y2) | (45) |
cond2#(true,s(x0),y1,s(x1)) | → | cond1#(or(gr(x0,x1),gr(y1,s(x1))),x0,y1,s(x1)) | (41) |
cond2#(true,y0,s(x0),0) | → | cond1#(true,p(y0),s(x0),0) | (42) |
cond2#(true,s(x0),y1,0) | → | cond1#(true,x0,y1,0) | (43) |
cond2#(true,s(x0),0,y1) | → | cond1#(or(gr(s(x0),y1),false),x0,0,y1) | (67) |
cond2#(true,s(x0),s(y1),s(y2)) | → | cond1#(or(gr(s(x0),s(y2)),gr(y1,y2)),x0,s(y1),s(y2)) | (69) |
cond3#(true,s(x0),y1,0) | → | cond1#(true,s(x0),p(y1),0) | (52) |
cond3#(true,y0,s(x0),s(x1)) | → | cond1#(or(gr(y0,s(x1)),gr(x0,x1)),y0,x0,s(x1)) | (55) |
cond3#(true,y0,s(x0),0) | → | cond1#(true,y0,x0,0) | (56) |
cond3#(false,s(x0),y1,s(x1)) | → | cond1#(or(gr(x0,x1),gr(y1,s(x1))),s(x0),y1,s(x1)) | (61) |
cond3#(false,y0,0,x0) | → | cond1#(or(gr(y0,x0),false),y0,0,x0) | (62) |
cond3#(false,s(x0),y1,0) | → | cond1#(true,s(x0),y1,0) | (65) |
→ |
cond2#(true,0,s(y1),0) | → | cond1#(true,0,s(y1),0) | (71) |
cond2#(true,s(x0),s(y1),0) | → | cond1#(true,x0,s(y1),0) | (72) |
The dependency pairs are split into 1 component.
cond3#(false,0,y1,x0) | → | cond1#(or(false,gr(y1,x0)),0,y1,x0) | (59) |
cond1#(true,0,y1,y2) | → | cond2#(false,0,y1,y2) | (44) |
cond2#(false,y0,0,y2) | → | cond3#(false,y0,0,y2) | (57) |
cond3#(false,s(x0),y1,s(x1)) | → | cond1#(or(gr(x0,x1),gr(y1,s(x1))),s(x0),y1,s(x1)) | (61) |
cond1#(true,s(x0),y1,y2) | → | cond2#(true,s(x0),y1,y2) | (45) |
cond2#(true,s(x0),y1,s(x1)) | → | cond1#(or(gr(x0,x1),gr(y1,s(x1))),x0,y1,s(x1)) | (41) |
cond2#(true,s(x0),y1,0) | → | cond1#(true,x0,y1,0) | (43) |
cond2#(true,s(x0),0,y1) | → | cond1#(or(gr(s(x0),y1),false),x0,0,y1) | (67) |
cond2#(true,s(x0),s(y1),s(y2)) | → | cond1#(or(gr(x0,y2),gr(y1,y2)),x0,s(y1),s(y2)) | (70) |
cond2#(true,s(x0),s(y1),0) | → | cond1#(true,x0,s(y1),0) | (72) |
cond3#(false,y0,0,x0) | → | cond1#(or(gr(y0,x0),false),y0,0,x0) | (62) |
cond3#(false,s(x0),y1,0) | → | cond1#(true,s(x0),y1,0) | (65) |
cond2#(false,y0,s(x0),y2) | → | cond3#(true,y0,s(x0),y2) | (58) |
cond3#(true,0,y1,x0) | → | cond1#(or(false,gr(y1,x0)),0,p(y1),x0) | (46) |
cond3#(true,s(x0),y1,s(x1)) | → | cond1#(or(gr(x0,x1),gr(y1,s(x1))),s(x0),p(y1),s(x1)) | (48) |
cond3#(true,s(x0),y1,0) | → | cond1#(true,s(x0),p(y1),0) | (52) |
cond3#(true,y0,s(x0),s(x1)) | → | cond1#(or(gr(y0,s(x1)),gr(x0,x1)),y0,x0,s(x1)) | (55) |
cond3#(true,y0,s(x0),0) | → | cond1#(true,y0,x0,0) | (56) |
cond3#(false,0,0,z1) | → | cond1#(or(false,gr(0,z1)),0,0,z1) | (73) |
→ |
The dependency pairs are split into 1 component.
cond2#(false,y0,0,y2) | → | cond3#(false,y0,0,y2) | (57) |
cond3#(false,s(x0),y1,s(x1)) | → | cond1#(or(gr(x0,x1),gr(y1,s(x1))),s(x0),y1,s(x1)) | (61) |
cond1#(true,s(x0),y1,y2) | → | cond2#(true,s(x0),y1,y2) | (45) |
cond2#(true,s(x0),y1,s(x1)) | → | cond1#(or(gr(x0,x1),gr(y1,s(x1))),x0,y1,s(x1)) | (41) |
cond1#(true,0,y1,y2) | → | cond2#(false,0,y1,y2) | (44) |
cond2#(false,y0,s(x0),y2) | → | cond3#(true,y0,s(x0),y2) | (58) |
cond3#(true,0,y1,x0) | → | cond1#(or(false,gr(y1,x0)),0,p(y1),x0) | (46) |
cond3#(true,s(x0),y1,s(x1)) | → | cond1#(or(gr(x0,x1),gr(y1,s(x1))),s(x0),p(y1),s(x1)) | (48) |
cond3#(true,s(x0),y1,0) | → | cond1#(true,s(x0),p(y1),0) | (52) |
cond3#(true,y0,s(x0),s(x1)) | → | cond1#(or(gr(y0,s(x1)),gr(x0,x1)),y0,x0,s(x1)) | (55) |
cond3#(true,y0,s(x0),0) | → | cond1#(true,y0,x0,0) | (56) |
cond2#(true,s(x0),y1,0) | → | cond1#(true,x0,y1,0) | (43) |
cond2#(true,s(x0),0,y1) | → | cond1#(or(gr(s(x0),y1),false),x0,0,y1) | (67) |
cond2#(true,s(x0),s(y1),s(y2)) | → | cond1#(or(gr(x0,y2),gr(y1,y2)),x0,s(y1),s(y2)) | (70) |
cond2#(true,s(x0),s(y1),0) | → | cond1#(true,x0,s(y1),0) | (72) |
cond3#(false,y0,0,x0) | → | cond1#(or(gr(y0,x0),false),y0,0,x0) | (62) |
cond3#(false,s(x0),y1,0) | → | cond1#(true,s(x0),y1,0) | (65) |
cond2#(false,0,0,z1) | → | cond3#(false,0,0,z1) | (75) |
The dependency pairs are split into 1 component.
cond2#(true,s(x0),y1,s(x1)) | → | cond1#(or(gr(x0,x1),gr(y1,s(x1))),x0,y1,s(x1)) | (41) |
cond1#(true,0,y1,y2) | → | cond2#(false,0,y1,y2) | (44) |
cond2#(false,y0,s(x0),y2) | → | cond3#(true,y0,s(x0),y2) | (58) |
cond3#(true,0,y1,x0) | → | cond1#(or(false,gr(y1,x0)),0,p(y1),x0) | (46) |
cond3#(true,s(x0),y1,s(x1)) | → | cond1#(or(gr(x0,x1),gr(y1,s(x1))),s(x0),p(y1),s(x1)) | (48) |
cond1#(true,s(x0),y1,y2) | → | cond2#(true,s(x0),y1,y2) | (45) |
cond2#(true,s(x0),y1,0) | → | cond1#(true,x0,y1,0) | (43) |
cond2#(true,s(x0),0,y1) | → | cond1#(or(gr(s(x0),y1),false),x0,0,y1) | (67) |
cond2#(true,s(x0),s(y1),s(y2)) | → | cond1#(or(gr(x0,y2),gr(y1,y2)),x0,s(y1),s(y2)) | (70) |
cond2#(true,s(x0),s(y1),0) | → | cond1#(true,x0,s(y1),0) | (72) |
cond3#(true,s(x0),y1,0) | → | cond1#(true,s(x0),p(y1),0) | (52) |
cond3#(true,y0,s(x0),s(x1)) | → | cond1#(or(gr(y0,s(x1)),gr(x0,x1)),y0,x0,s(x1)) | (55) |
cond3#(true,y0,s(x0),0) | → | cond1#(true,y0,x0,0) | (56) |
cond2#(false,0,0,z1) | → | cond3#(false,0,0,z1) | (75) |
cond3#(false,y0,0,x0) | → | cond1#(or(gr(y0,x0),false),y0,0,x0) | (62) |
cond2#(false,0,s(x1),z1) | → | cond3#(true,0,s(x1),z1) | (76) |
The dependency pairs are split into 1 component.
cond1#(true,0,y1,y2) | → | cond2#(false,0,y1,y2) | (44) |
cond2#(false,0,0,z1) | → | cond3#(false,0,0,z1) | (75) |
cond3#(false,y0,0,x0) | → | cond1#(or(gr(y0,x0),false),y0,0,x0) | (62) |
cond1#(true,s(x0),y1,y2) | → | cond2#(true,s(x0),y1,y2) | (45) |
cond2#(true,s(x0),y1,s(x1)) | → | cond1#(or(gr(x0,x1),gr(y1,s(x1))),x0,y1,s(x1)) | (41) |
cond2#(true,s(x0),y1,0) | → | cond1#(true,x0,y1,0) | (43) |
cond2#(true,s(x0),0,y1) | → | cond1#(or(gr(s(x0),y1),false),x0,0,y1) | (67) |
cond2#(true,s(x0),s(y1),s(y2)) | → | cond1#(or(gr(x0,y2),gr(y1,y2)),x0,s(y1),s(y2)) | (70) |
cond2#(true,s(x0),s(y1),0) | → | cond1#(true,x0,s(y1),0) | (72) |
cond2#(false,0,s(x1),z1) | → | cond3#(true,0,s(x1),z1) | (76) |
cond3#(true,0,y1,x0) | → | cond1#(or(false,gr(y1,x0)),0,p(y1),x0) | (46) |
cond3#(true,y0,s(x0),s(x1)) | → | cond1#(or(gr(y0,s(x1)),gr(x0,x1)),y0,x0,s(x1)) | (55) |
cond3#(true,y0,s(x0),0) | → | cond1#(true,y0,x0,0) | (56) |
cond3#(false,0,0,z0) | → | cond1#(or(gr(0,z0),false),0,0,z0) | (77) |
→ |
The dependency pairs are split into 1 component.
cond2#(false,0,s(x1),z1) | → | cond3#(true,0,s(x1),z1) | (76) |
cond3#(true,0,y1,x0) | → | cond1#(or(false,gr(y1,x0)),0,p(y1),x0) | (46) |
cond1#(true,0,y1,y2) | → | cond2#(false,0,y1,y2) | (44) |
cond3#(true,y0,s(x0),s(x1)) | → | cond1#(or(gr(y0,s(x1)),gr(x0,x1)),y0,x0,s(x1)) | (55) |
cond1#(true,s(x0),y1,y2) | → | cond2#(true,s(x0),y1,y2) | (45) |
cond2#(true,s(x0),y1,s(x1)) | → | cond1#(or(gr(x0,x1),gr(y1,s(x1))),x0,y1,s(x1)) | (41) |
cond2#(true,s(x0),y1,0) | → | cond1#(true,x0,y1,0) | (43) |
cond2#(true,s(x0),0,y1) | → | cond1#(or(gr(s(x0),y1),false),x0,0,y1) | (67) |
cond2#(true,s(x0),s(y1),s(y2)) | → | cond1#(or(gr(x0,y2),gr(y1,y2)),x0,s(y1),s(y2)) | (70) |
cond2#(true,s(x0),s(y1),0) | → | cond1#(true,x0,s(y1),0) | (72) |
cond3#(true,y0,s(x0),0) | → | cond1#(true,y0,x0,0) | (56) |
cond3#(true,0,s(z0),z1) | → | cond1#(or(false,gr(s(z0),z1)),0,p(s(z0)),z1) | (79) |
We restrict the rewrite rules to the following usable rules of the DP problem.
gr(s(x),0) | → | true | (7) |
gr(s(x),s(y)) | → | gr(x,y) | (8) |
or(false,false) | → | false | (9) |
or(x,true) | → | true | (11) |
p(s(x)) | → | x | (13) |
gr(0,x) | → | false | (6) |
or(true,x) | → | true | (10) |
→ |
We restrict the rewrite rules to the following usable rules of the DP problem.
gr(s(x),0) | → | true | (7) |
gr(s(x),s(y)) | → | gr(x,y) | (8) |
or(false,false) | → | false | (9) |
or(x,true) | → | true | (11) |
gr(0,x) | → | false | (6) |
or(true,x) | → | true | (10) |
We restrict the innermost strategy to the following left hand sides.
gr(0,x0) |
gr(s(x0),0) |
gr(s(x0),s(x1)) |
or(false,false) |
or(true,x0) |
or(x0,true) |
cond3#(true,0,s(z0),s(x2)) | → | cond1#(or(gr(0,s(x2)),gr(z0,x2)),0,z0,s(x2)) | (81) |
→ |
cond1#(true,s(x0),z1,s(z2)) | → | cond2#(true,s(x0),z1,s(z2)) | (83) |
cond1#(true,s(x0),z1,0) | → | cond2#(true,s(x0),z1,0) | (84) |
cond1#(true,s(x0),0,z1) | → | cond2#(true,s(x0),0,z1) | (85) |
cond1#(true,s(x0),s(z1),s(z2)) | → | cond2#(true,s(x0),s(z1),s(z2)) | (86) |
cond1#(true,s(x0),s(z1),0) | → | cond2#(true,s(x0),s(z1),0) | (87) |
cond3#(true,0,s(z0),0) | → | cond1#(true,0,z0,0) | (88) |
The dependency pairs are split into 2 components.
cond1#(true,s(x0),z1,s(z2)) | → | cond2#(true,s(x0),z1,s(z2)) | (83) |
cond2#(true,s(x0),y1,s(x1)) | → | cond1#(or(gr(x0,x1),gr(y1,s(x1))),x0,y1,s(x1)) | (41) |
cond1#(true,s(x0),0,z1) | → | cond2#(true,s(x0),0,z1) | (85) |
cond2#(true,s(x0),y1,0) | → | cond1#(true,x0,y1,0) | (43) |
cond1#(true,s(x0),z1,0) | → | cond2#(true,s(x0),z1,0) | (84) |
cond2#(true,s(x0),0,y1) | → | cond1#(or(gr(s(x0),y1),false),x0,0,y1) | (67) |
cond2#(true,s(x0),s(y1),0) | → | cond1#(true,x0,s(y1),0) | (72) |
cond1#(true,s(x0),s(z1),0) | → | cond2#(true,s(x0),s(z1),0) | (87) |
cond1#(true,s(x0),s(z1),s(z2)) | → | cond2#(true,s(x0),s(z1),s(z2)) | (86) |
cond2#(true,s(x0),s(y1),s(y2)) | → | cond1#(or(gr(x0,y2),gr(y1,y2)),x0,s(y1),s(y2)) | (70) |
cond2#(true,s(s(y_1)),x1,s(x2)) | → | cond1#(or(gr(s(y_1),x2),gr(x1,s(x2))),s(y_1),x1,s(x2)) | (89) |
cond2#(true,s(s(y_1)),0,s(x2)) | → | cond1#(or(gr(s(y_1),x2),gr(0,s(x2))),s(y_1),0,s(x2)) | (90) |
cond2#(true,s(s(y_1)),s(y_2),s(x2)) | → | cond1#(or(gr(s(y_1),x2),gr(s(y_2),s(x2))),s(y_1),s(y_2),s(x2)) | (91) |
→ |
→ |
cond1#(true,s(x0),0,s(x2)) | → | cond2#(true,s(x0),0,s(x2)) | (94) |
cond1#(true,s(x0),s(z1),s(z2)) | → | cond2#(true,s(x0),s(z1),s(z2)) | (86) |
cond1#(true,s(s(y_0)),x1,s(x2)) | → | cond2#(true,s(s(y_0)),x1,s(x2)) | (95) |
cond1#(true,s(s(y_0)),0,s(x2)) | → | cond2#(true,s(s(y_0)),0,s(x2)) | (96) |
cond1#(true,s(s(y_0)),s(y_1),s(x2)) | → | cond2#(true,s(s(y_0)),s(y_1),s(x2)) | (97) |
cond2#(true,s(s(y_0)),x1,0) | → | cond1#(true,s(y_0),x1,0) | (98) |
cond2#(true,s(s(y_0)),0,0) | → | cond1#(true,s(y_0),0,0) | (99) |
cond2#(true,s(s(y_0)),s(y_1),0) | → | cond1#(true,s(y_0),s(y_1),0) | (100) |
cond1#(true,s(x0),0,0) | → | cond2#(true,s(x0),0,0) | (101) |
cond1#(true,s(x0),s(z1),0) | → | cond2#(true,s(x0),s(z1),0) | (87) |
cond1#(true,s(s(y_0)),x1,0) | → | cond2#(true,s(s(y_0)),x1,0) | (102) |
cond1#(true,s(s(y_0)),0,0) | → | cond2#(true,s(s(y_0)),0,0) | (103) |
cond1#(true,s(s(y_0)),s(y_1),0) | → | cond2#(true,s(s(y_0)),s(y_1),0) | (104) |
cond2#(true,s(s(y_1)),0,x1) | → | cond1#(or(gr(s(s(y_1)),x1),false),s(y_1),0,x1) | (105) |
cond2#(true,s(s(y_1)),0,s(y_2)) | → | cond1#(or(gr(s(s(y_1)),s(y_2)),false),s(y_1),0,s(y_2)) | (106) |
cond2#(true,s(s(s(y_1))),0,s(y_3)) | → | cond1#(or(gr(s(s(s(y_1))),s(y_3)),false),s(s(y_1)),0,s(y_3)) | (107) |
cond2#(true,s(s(y_1)),0,0) | → | cond1#(or(gr(s(s(y_1)),0),false),s(y_1),0,0) | (108) |
cond2#(true,s(s(s(y_1))),0,0) | → | cond1#(or(gr(s(s(s(y_1))),0),false),s(s(y_1)),0,0) | (109) |
→ |
→ |
→ |
→ |
→ |
→ |
cond1#(true,s(s(y_0)),0,s(x2)) | → | cond2#(true,s(s(y_0)),0,s(x2)) | (96) |
cond1#(true,s(s(y_0)),0,0) | → | cond2#(true,s(s(y_0)),0,0) | (103) |
cond1#(true,s(s(y_0)),0,x1) | → | cond2#(true,s(s(y_0)),0,x1) | (114) |
cond1#(true,s(s(s(y_0))),0,s(y_1)) | → | cond2#(true,s(s(s(y_0))),0,s(y_1)) | (115) |
cond1#(true,s(s(s(y_0))),0,0) | → | cond2#(true,s(s(s(y_0))),0,0) | (116) |
cond2#(true,s(s(y_0)),s(y_1),0) | → | cond1#(true,s(y_0),s(y_1),0) | (100) |
cond2#(true,s(s(s(y_0))),s(x1),0) | → | cond1#(true,s(s(y_0)),s(x1),0) | (117) |
cond1#(true,s(s(y_0)),s(y_1),0) | → | cond2#(true,s(s(y_0)),s(y_1),0) | (104) |
cond1#(true,s(s(s(y_0))),s(x1),0) | → | cond2#(true,s(s(s(y_0))),s(x1),0) | (118) |
cond2#(true,s(s(y_1)),s(y_2),s(x2)) | → | cond1#(or(gr(s(y_1),x2),gr(y_2,x2)),s(y_1),s(y_2),s(x2)) | (93) |
cond2#(true,s(s(s(y_1))),s(x1),s(x2)) | → | cond1#(or(gr(s(s(y_1)),x2),gr(x1,x2)),s(s(y_1)),s(x1),s(x2)) | (119) |
cond1#(true,s(s(y_0)),s(y_1),s(x2)) | → | cond2#(true,s(s(y_0)),s(y_1),s(x2)) | (97) |
cond1#(true,s(s(s(y_0))),s(x1),s(x2)) | → | cond2#(true,s(s(s(y_0))),s(x1),s(x2)) | (120) |
cond1#(true,s(s(y_0)),0,s(x2)) | → | cond2#(true,s(s(y_0)),0,s(x2)) | (96) |
cond1#(true,s(s(s(y_0))),0,s(y_1)) | → | cond2#(true,s(s(s(y_0))),0,s(y_1)) | (115) |
cond1#(true,s(s(y_0)),0,0) | → | cond2#(true,s(s(y_0)),0,0) | (103) |
cond1#(true,s(s(s(y_0))),0,0) | → | cond2#(true,s(s(s(y_0))),0,0) | (116) |
Using size-change termination in combination with the subterm criterion one obtains the following initial size-change graphs.
cond1#(true,s(s(y_0)),x1,s(x2)) | → | cond2#(true,s(s(y_0)),x1,s(x2)) | (95) |
1 | ≥ | 1 | |
2 | ≥ | 2 | |
3 | ≥ | 3 | |
4 | ≥ | 4 | |
cond2#(true,s(s(y_1)),x1,s(x2)) | → | cond1#(or(gr(s(y_1),x2),gr(x1,s(x2))),s(y_1),x1,s(x2)) | (89) |
2 | > | 2 | |
3 | ≥ | 3 | |
4 | ≥ | 4 | |
cond1#(true,s(s(y_0)),0,x1) | → | cond2#(true,s(s(y_0)),0,x1) | (114) |
1 | ≥ | 1 | |
2 | ≥ | 2 | |
3 | ≥ | 3 | |
4 | ≥ | 4 | |
cond1#(true,s(s(y_0)),x1,0) | → | cond2#(true,s(s(y_0)),x1,0) | (102) |
1 | ≥ | 1 | |
2 | ≥ | 2 | |
3 | ≥ | 3 | |
4 | ≥ | 4 | |
cond2#(true,s(s(y_1)),0,x1) | → | cond1#(or(gr(s(s(y_1)),x1),false),s(y_1),0,x1) | (105) |
2 | > | 2 | |
3 | ≥ | 3 | |
4 | ≥ | 4 | |
cond2#(true,s(s(y_0)),x1,0) | → | cond1#(true,s(y_0),x1,0) | (98) |
1 | ≥ | 1 | |
2 | > | 2 | |
3 | ≥ | 3 | |
4 | ≥ | 4 | |
cond1#(true,s(s(y_0)),0,s(x2)) | → | cond2#(true,s(s(y_0)),0,s(x2)) | (96) |
1 | ≥ | 1 | |
2 | ≥ | 2 | |
3 | ≥ | 3 | |
4 | ≥ | 4 | |
cond1#(true,s(s(s(y_0))),0,s(y_1)) | → | cond2#(true,s(s(s(y_0))),0,s(y_1)) | (115) |
1 | ≥ | 1 | |
2 | ≥ | 2 | |
3 | ≥ | 3 | |
4 | ≥ | 4 | |
cond1#(true,s(s(y_0)),s(y_1),s(x2)) | → | cond2#(true,s(s(y_0)),s(y_1),s(x2)) | (97) |
1 | ≥ | 1 | |
2 | ≥ | 2 | |
3 | ≥ | 3 | |
4 | ≥ | 4 | |
cond1#(true,s(s(s(y_0))),s(x1),s(x2)) | → | cond2#(true,s(s(s(y_0))),s(x1),s(x2)) | (120) |
1 | ≥ | 1 | |
2 | ≥ | 2 | |
3 | ≥ | 3 | |
4 | ≥ | 4 | |
cond2#(true,s(s(y_1)),0,s(x2)) | → | cond1#(or(gr(s(y_1),x2),false),s(y_1),0,s(x2)) | (92) |
2 | > | 2 | |
3 | ≥ | 3 | |
4 | ≥ | 4 | |
cond2#(true,s(s(s(y_1))),0,s(y_3)) | → | cond1#(or(gr(s(s(y_1)),y_3),false),s(s(y_1)),0,s(y_3)) | (110) |
2 | > | 2 | |
3 | ≥ | 3 | |
4 | ≥ | 4 | |
cond2#(true,s(s(y_1)),s(y_2),s(x2)) | → | cond1#(or(gr(s(y_1),x2),gr(y_2,x2)),s(y_1),s(y_2),s(x2)) | (93) |
2 | > | 2 | |
3 | ≥ | 3 | |
4 | ≥ | 4 | |
cond2#(true,s(s(s(y_1))),s(x1),s(x2)) | → | cond1#(or(gr(s(s(y_1)),x2),gr(x1,x2)),s(s(y_1)),s(x1),s(x2)) | (119) |
2 | > | 2 | |
3 | ≥ | 3 | |
4 | ≥ | 4 | |
cond1#(true,s(s(y_0)),0,0) | → | cond2#(true,s(s(y_0)),0,0) | (103) |
1 | ≥ | 1 | |
2 | ≥ | 2 | |
3 | ≥ | 3 | |
4 | ≥ | 3 | |
3 | ≥ | 4 | |
4 | ≥ | 4 | |
cond1#(true,s(s(s(y_0))),0,0) | → | cond2#(true,s(s(s(y_0))),0,0) | (116) |
1 | ≥ | 1 | |
2 | ≥ | 2 | |
3 | ≥ | 3 | |
4 | ≥ | 3 | |
3 | ≥ | 4 | |
4 | ≥ | 4 | |
cond1#(true,s(s(y_0)),s(y_1),0) | → | cond2#(true,s(s(y_0)),s(y_1),0) | (104) |
1 | ≥ | 1 | |
2 | ≥ | 2 | |
3 | ≥ | 3 | |
4 | ≥ | 4 | |
cond1#(true,s(s(s(y_0))),s(x1),0) | → | cond2#(true,s(s(s(y_0))),s(x1),0) | (118) |
1 | ≥ | 1 | |
2 | ≥ | 2 | |
3 | ≥ | 3 | |
4 | ≥ | 4 | |
cond2#(true,s(s(y_0)),0,0) | → | cond1#(true,s(y_0),0,0) | (99) |
1 | ≥ | 1 | |
2 | > | 2 | |
3 | ≥ | 3 | |
4 | ≥ | 3 | |
3 | ≥ | 4 | |
4 | ≥ | 4 | |
cond2#(true,s(s(s(y_1))),0,0) | → | cond1#(true,s(s(y_1)),0,0) | (113) |
1 | ≥ | 1 | |
2 | > | 2 | |
3 | ≥ | 3 | |
4 | ≥ | 3 | |
3 | ≥ | 4 | |
4 | ≥ | 4 | |
cond2#(true,s(s(y_0)),s(y_1),0) | → | cond1#(true,s(y_0),s(y_1),0) | (100) |
1 | ≥ | 1 | |
2 | > | 2 | |
3 | ≥ | 3 | |
4 | ≥ | 4 | |
cond2#(true,s(s(s(y_0))),s(x1),0) | → | cond1#(true,s(s(y_0)),s(x1),0) | (117) |
1 | ≥ | 1 | |
2 | > | 2 | |
3 | ≥ | 3 | |
4 | ≥ | 4 |
As there is no critical graph in the transitive closure, there are no infinite chains.
cond3#(true,0,s(z0),z1) | → | cond1#(or(false,gr(s(z0),z1)),0,z0,z1) | (80) |
cond1#(true,0,y1,y2) | → | cond2#(false,0,y1,y2) | (44) |
cond2#(false,0,s(x1),z1) | → | cond3#(true,0,s(x1),z1) | (76) |
cond3#(true,0,s(z0),s(x2)) | → | cond1#(or(false,gr(z0,x2)),0,z0,s(x2)) | (82) |
cond3#(true,0,s(z0),0) | → | cond1#(true,0,z0,0) | (88) |
We restrict the rewrite rules to the following usable rules of the DP problem.
gr(s(x),0) | → | true | (7) |
gr(s(x),s(y)) | → | gr(x,y) | (8) |
gr(0,x) | → | false | (6) |
or(false,false) | → | false | (9) |
or(x,true) | → | true | (11) |
cond1#(true,0,s(y_0),x1) | → | cond2#(false,0,s(y_0),x1) | (121) |
cond3#(true,0,s(s(y_1)),x1) | → | cond1#(or(false,gr(s(s(y_1)),x1)),0,s(y_1),x1) | (122) |
cond2#(false,0,s(x0),s(y_1)) | → | cond3#(true,0,s(x0),s(y_1)) | (123) |
cond2#(false,0,s(x0),0) | → | cond3#(true,0,s(x0),0) | (124) |
cond2#(false,0,s(s(y_0)),x1) | → | cond3#(true,0,s(s(y_0)),x1) | (125) |
cond3#(true,0,s(s(y_1)),s(x1)) | → | cond1#(or(false,gr(s(y_1),x1)),0,s(y_1),s(x1)) | (126) |
cond3#(true,0,s(s(y_0)),0) | → | cond1#(true,0,s(y_0),0) | (127) |
Using size-change termination in combination with the subterm criterion one obtains the following initial size-change graphs.
cond1#(true,0,s(y_0),x1) | → | cond2#(false,0,s(y_0),x1) | (121) |
2 | ≥ | 2 | |
3 | ≥ | 3 | |
4 | ≥ | 4 | |
cond3#(true,0,s(s(y_0)),0) | → | cond1#(true,0,s(y_0),0) | (127) |
1 | ≥ | 1 | |
2 | ≥ | 2 | |
4 | ≥ | 2 | |
3 | > | 3 | |
2 | ≥ | 4 | |
4 | ≥ | 4 | |
cond3#(true,0,s(s(y_1)),x1) | → | cond1#(or(false,gr(s(s(y_1)),x1)),0,s(y_1),x1) | (122) |
2 | ≥ | 2 | |
3 | > | 3 | |
4 | ≥ | 4 | |
cond3#(true,0,s(s(y_1)),s(x1)) | → | cond1#(or(false,gr(s(y_1),x1)),0,s(y_1),s(x1)) | (126) |
2 | ≥ | 2 | |
3 | > | 3 | |
4 | ≥ | 4 | |
cond2#(false,0,s(x0),0) | → | cond3#(true,0,s(x0),0) | (124) |
2 | ≥ | 2 | |
4 | ≥ | 2 | |
3 | ≥ | 3 | |
2 | ≥ | 4 | |
4 | ≥ | 4 | |
cond2#(false,0,s(s(y_0)),x1) | → | cond3#(true,0,s(s(y_0)),x1) | (125) |
2 | ≥ | 2 | |
3 | ≥ | 3 | |
4 | ≥ | 4 | |
cond2#(false,0,s(x0),s(y_1)) | → | cond3#(true,0,s(x0),s(y_1)) | (123) |
2 | ≥ | 2 | |
3 | ≥ | 3 | |
4 | ≥ | 4 |
As there is no critical graph in the transitive closure, there are no infinite chains.
gr#(s(x),s(y)) | → | gr#(x,y) | (32) |
We restrict the rewrite rules to the following usable rules of the DP problem.
There are no rules.
We restrict the innermost strategy to the following left hand sides.
There are no lhss.
Using size-change termination in combination with the subterm criterion one obtains the following initial size-change graphs.
gr#(s(x),s(y)) | → | gr#(x,y) | (32) |
1 | > | 1 | |
2 | > | 2 |
As there is no critical graph in the transitive closure, there are no infinite chains.