The rewrite relation of the following TRS is considered.
minus(x,0) | → | x | (1) |
minus(s(x),s(y)) | → | minus(x,y) | (2) |
quot(0,s(y)) | → | 0 | (3) |
quot(s(x),s(y)) | → | s(quot(minus(x,y),s(y))) | (4) |
minus(minus(x,y),z) | → | minus(x,plus(y,z)) | (5) |
plus(s(x),s(y)) | → | s(s(plus(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))))) | (6) |
plus(s(x),x) | → | plus(if(gt(x,x),id(x),id(x)),s(x)) | (7) |
plus(zero,y) | → | y | (8) |
plus(id(x),s(y)) | → | s(plus(x,if(gt(s(y),y),y,s(y)))) | (9) |
id(x) | → | x | (10) |
if(true,x,y) | → | x | (11) |
if(false,x,y) | → | y | (12) |
not(x) | → | if(x,false,true) | (13) |
gt(s(x),zero) | → | true | (14) |
gt(zero,y) | → | false | (15) |
gt(s(x),s(y)) | → | gt(x,y) | (16) |
minus#(s(x),s(y)) | → | minus#(x,y) | (17) |
quot#(s(x),s(y)) | → | quot#(minus(x,y),s(y)) | (18) |
quot#(s(x),s(y)) | → | minus#(x,y) | (19) |
minus#(minus(x,y),z) | → | minus#(x,plus(y,z)) | (20) |
minus#(minus(x,y),z) | → | plus#(y,z) | (21) |
plus#(s(x),s(y)) | → | plus#(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))) | (22) |
plus#(s(x),s(y)) | → | if#(gt(x,y),x,y) | (23) |
plus#(s(x),s(y)) | → | gt#(x,y) | (24) |
plus#(s(x),s(y)) | → | if#(not(gt(x,y)),id(x),id(y)) | (25) |
plus#(s(x),s(y)) | → | not#(gt(x,y)) | (26) |
plus#(s(x),s(y)) | → | id#(x) | (27) |
plus#(s(x),s(y)) | → | id#(y) | (28) |
plus#(s(x),x) | → | plus#(if(gt(x,x),id(x),id(x)),s(x)) | (29) |
plus#(s(x),x) | → | if#(gt(x,x),id(x),id(x)) | (30) |
plus#(s(x),x) | → | gt#(x,x) | (31) |
plus#(s(x),x) | → | id#(x) | (32) |
plus#(id(x),s(y)) | → | plus#(x,if(gt(s(y),y),y,s(y))) | (33) |
plus#(id(x),s(y)) | → | if#(gt(s(y),y),y,s(y)) | (34) |
plus#(id(x),s(y)) | → | gt#(s(y),y) | (35) |
not#(x) | → | if#(x,false,true) | (36) |
gt#(s(x),s(y)) | → | gt#(x,y) | (37) |
The dependency pairs are split into 4 components.
quot#(s(x),s(y)) | → | quot#(minus(x,y),s(y)) | (18) |
prec(s) | = | 0 | weight(s) | = | 1 |
π(quot#) | = | 1 |
π(s) | = | [1] |
π(minus) | = | 1 |
minus(x,0) | → | x | (1) |
minus(minus(x,y),z) | → | minus(x,plus(y,z)) | (5) |
minus(s(x),s(y)) | → | minus(x,y) | (2) |
quot#(s(x),s(y)) | → | quot#(minus(x,y),s(y)) | (18) |
There are no pairs anymore.
minus#(minus(x,y),z) | → | minus#(x,plus(y,z)) | (20) |
minus#(s(x),s(y)) | → | minus#(x,y) | (17) |
Using size-change termination in combination with the subterm criterion one obtains the following initial size-change graphs.
minus#(minus(x,y),z) | → | minus#(x,plus(y,z)) | (20) |
1 | > | 1 | |
minus#(s(x),s(y)) | → | minus#(x,y) | (17) |
1 | > | 1 | |
2 | > | 2 |
As there is no critical graph in the transitive closure, there are no infinite chains.
plus#(s(x),x) | → | plus#(if(gt(x,x),id(x),id(x)),s(x)) | (29) |
plus#(s(x),s(y)) | → | plus#(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))) | (22) |
plus#(id(x),s(y)) | → | plus#(x,if(gt(s(y),y),y,s(y))) | (33) |
[plus#(x1, x2)] | = |
|
||||||||||||||||
[s(x1)] | = |
|
||||||||||||||||
[if(x1, x2, x3)] | = |
|
||||||||||||||||
[gt(x1, x2)] | = |
|
||||||||||||||||
[id(x1)] | = |
|
||||||||||||||||
[not(x1)] | = |
|
||||||||||||||||
[zero] | = |
|
||||||||||||||||
[true] | = |
|
||||||||||||||||
[false] | = |
|
gt(s(x),zero) | → | true | (14) |
gt(zero,y) | → | false | (15) |
gt(s(x),s(y)) | → | gt(x,y) | (16) |
id(x) | → | x | (10) |
if(true,x,y) | → | x | (11) |
if(false,x,y) | → | y | (12) |
not(x) | → | if(x,false,true) | (13) |
plus#(s(x),x) | → | plus#(if(gt(x,x),id(x),id(x)),s(x)) | (29) |
[plus#(x1, x2)] | = |
|
||||||||||||||||
[s(x1)] | = |
|
||||||||||||||||
[if(x1, x2, x3)] | = |
|
||||||||||||||||
[gt(x1, x2)] | = |
|
||||||||||||||||
[not(x1)] | = |
|
||||||||||||||||
[id(x1)] | = |
|
||||||||||||||||
[zero] | = |
|
||||||||||||||||
[true] | = |
|
||||||||||||||||
[false] | = |
|
if(true,x,y) | → | x | (11) |
if(false,x,y) | → | y | (12) |
id(x) | → | x | (10) |
plus#(s(x),s(y)) | → | plus#(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))) | (22) |
Using size-change termination in combination with the subterm criterion one obtains the following initial size-change graphs.
plus#(id(x),s(y)) | → | plus#(x,if(gt(s(y),y),y,s(y))) | (33) |
1 | > | 1 |
As there is no critical graph in the transitive closure, there are no infinite chains.
gt#(s(x),s(y)) | → | gt#(x,y) | (37) |
[s(x1)] | = | 1 · x1 |
[gt#(x1, x2)] | = | 1 · x1 + 1 · x2 |
Using size-change termination in combination with the subterm criterion one obtains the following initial size-change graphs.
gt#(s(x),s(y)) | → | gt#(x,y) | (37) |
1 | > | 1 | |
2 | > | 2 |
As there is no critical graph in the transitive closure, there are no infinite chains.