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) |
plus(0,y) | → | y | (5) |
plus(s(x),y) | → | s(plus(x,y)) | (6) |
minus(minus(x,y),z) | → | minus(x,plus(y,z)) | (7) |
app(nil,k) | → | k | (8) |
app(l,nil) | → | l | (9) |
app(cons(x,l),k) | → | cons(x,app(l,k)) | (10) |
sum(cons(x,nil)) | → | cons(x,nil) | (11) |
sum(cons(x,cons(y,l))) | → | sum(cons(plus(x,y),l)) | (12) |
sum(app(l,cons(x,cons(y,k)))) | → | sum(app(l,sum(cons(x,cons(y,k))))) | (13) |
plus(s(x),s(y)) | → | s(s(plus(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))))) | (14) |
plus(s(x),x) | → | plus(if(gt(x,x),id(x),id(x)),s(x)) | (15) |
plus(zero,y) | → | y | (16) |
plus(id(x),s(y)) | → | s(plus(x,if(gt(s(y),y),y,s(y)))) | (17) |
id(x) | → | x | (18) |
if(true,x,y) | → | x | (19) |
if(false,x,y) | → | y | (20) |
not(x) | → | if(x,false,true) | (21) |
gt(s(x),zero) | → | true | (22) |
gt(zero,y) | → | false | (23) |
gt(s(x),s(y)) | → | gt(x,y) | (24) |
plus#(s(x),y) | → | plus#(x,y) | (25) |
quot#(s(x),s(y)) | → | quot#(minus(x,y),s(y)) | (26) |
gt#(s(x),s(y)) | → | gt#(x,y) | (27) |
plus#(s(x),s(y)) | → | not#(gt(x,y)) | (28) |
plus#(s(x),s(y)) | → | plus#(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))) | (29) |
plus#(s(x),s(y)) | → | gt#(x,y) | (30) |
plus#(s(x),x) | → | plus#(if(gt(x,x),id(x),id(x)),s(x)) | (31) |
not#(x) | → | if#(x,false,true) | (32) |
plus#(s(x),s(y)) | → | if#(not(gt(x,y)),id(x),id(y)) | (33) |
plus#(s(x),s(y)) | → | gt#(x,y) | (30) |
quot#(s(x),s(y)) | → | minus#(x,y) | (34) |
plus#(s(x),x) | → | if#(gt(x,x),id(x),id(x)) | (35) |
plus#(id(x),s(y)) | → | plus#(x,if(gt(s(y),y),y,s(y))) | (36) |
sum#(cons(x,cons(y,l))) | → | sum#(cons(plus(x,y),l)) | (37) |
plus#(s(x),s(y)) | → | if#(gt(x,y),x,y) | (38) |
sum#(app(l,cons(x,cons(y,k)))) | → | sum#(cons(x,cons(y,k))) | (39) |
plus#(s(x),x) | → | id#(x) | (40) |
plus#(id(x),s(y)) | → | gt#(s(y),y) | (41) |
plus#(s(x),x) | → | id#(x) | (40) |
minus#(minus(x,y),z) | → | minus#(x,plus(y,z)) | (42) |
app#(cons(x,l),k) | → | app#(l,k) | (43) |
plus#(s(x),x) | → | gt#(x,x) | (44) |
plus#(id(x),s(y)) | → | if#(gt(s(y),y),y,s(y)) | (45) |
plus#(s(x),s(y)) | → | id#(y) | (46) |
sum#(app(l,cons(x,cons(y,k)))) | → | sum#(app(l,sum(cons(x,cons(y,k))))) | (47) |
minus#(s(x),s(y)) | → | minus#(x,y) | (48) |
sum#(cons(x,cons(y,l))) | → | plus#(x,y) | (49) |
plus#(s(x),s(y)) | → | id#(x) | (50) |
sum#(app(l,cons(x,cons(y,k)))) | → | app#(l,sum(cons(x,cons(y,k)))) | (51) |
minus#(minus(x,y),z) | → | plus#(y,z) | (52) |
The dependency pairs are split into 7 components.
sum#(app(l,cons(x,cons(y,k)))) | → | sum#(app(l,sum(cons(x,cons(y,k))))) | (47) |
[zero] | = | 1 |
[s(x1)] | = | x1 + 1 |
[gt(x1, x2)] | = | x2 + 1 |
[minus(x1, x2)] | = | 0 |
[plus#(x1, x2)] | = | 0 |
[false] | = | 2 |
[id#(x1)] | = | 0 |
[true] | = | 3 |
[sum(x1)] | = | 65135 |
[not#(x1)] | = | 0 |
[0] | = | 36466 |
[if(x1, x2, x3)] | = | x2 + 5855 |
[quot(x1, x2)] | = | 0 |
[nil] | = | 32567 |
[gt#(x1, x2)] | = | 0 |
[app#(x1, x2)] | = | 0 |
[minus#(x1, x2)] | = | 0 |
[plus(x1, x2)] | = | x1 + x2 + 30988 |
[cons(x1, x2)] | = | x2 + 32568 |
[if#(x1, x2, x3)] | = | 0 |
[id(x1)] | = | 1 |
[quot#(x1, x2)] | = | 0 |
[sum#(x1)] | = | x1 + 0 |
[not(x1)] | = | x1 + 0 |
[app(x1, x2)] | = | x1 + x2 + 31755 |
app(nil,k) | → | k | (8) |
app(cons(x,l),k) | → | cons(x,app(l,k)) | (10) |
sum(cons(x,cons(y,l))) | → | sum(cons(plus(x,y),l)) | (12) |
sum(cons(x,nil)) | → | cons(x,nil) | (11) |
app(l,nil) | → | l | (9) |
sum(app(l,cons(x,cons(y,k)))) | → | sum(app(l,sum(cons(x,cons(y,k))))) | (13) |
sum#(app(l,cons(x,cons(y,k)))) | → | sum#(app(l,sum(cons(x,cons(y,k))))) | (47) |
The dependency pairs are split into 0 components.
app#(cons(x,l),k) | → | app#(l,k) | (43) |
[zero] | = | 1 |
[s(x1)] | = | x1 + 23974 |
[gt(x1, x2)] | = | x2 + 1 |
[minus(x1, x2)] | = | 0 |
[plus#(x1, x2)] | = | 0 |
[false] | = | 2 |
[id#(x1)] | = | 0 |
[true] | = | 3 |
[sum(x1)] | = | 2 |
[not#(x1)] | = | 0 |
[0] | = | 36466 |
[if(x1, x2, x3)] | = | x2 + 2 |
[quot(x1, x2)] | = | 0 |
[nil] | = | 1 |
[gt#(x1, x2)] | = | 0 |
[app#(x1, x2)] | = | x1 + 0 |
[minus#(x1, x2)] | = | 0 |
[plus(x1, x2)] | = | x1 + x2 + 14681 |
[cons(x1, x2)] | = | x2 + 1 |
[if#(x1, x2, x3)] | = | 0 |
[id(x1)] | = | 1 |
[quot#(x1, x2)] | = | 0 |
[sum#(x1)] | = | x1 + 0 |
[not(x1)] | = | x1 + 0 |
[app(x1, x2)] | = | x1 + x2 + 31755 |
app(nil,k) | → | k | (8) |
app(cons(x,l),k) | → | cons(x,app(l,k)) | (10) |
sum(cons(x,cons(y,l))) | → | sum(cons(plus(x,y),l)) | (12) |
sum(cons(x,nil)) | → | cons(x,nil) | (11) |
app(l,nil) | → | l | (9) |
sum(app(l,cons(x,cons(y,k)))) | → | sum(app(l,sum(cons(x,cons(y,k))))) | (13) |
app#(cons(x,l),k) | → | app#(l,k) | (43) |
The dependency pairs are split into 0 components.
sum#(cons(x,cons(y,l))) | → | sum#(cons(plus(x,y),l)) | (37) |
[zero] | = | 1 |
[s(x1)] | = | x1 + 1 |
[gt(x1, x2)] | = | x2 + 1 |
[minus(x1, x2)] | = | 0 |
[plus#(x1, x2)] | = | 0 |
[false] | = | 2 |
[id#(x1)] | = | 0 |
[true] | = | 3 |
[sum(x1)] | = | 2 |
[not#(x1)] | = | 0 |
[0] | = | 32869 |
[if(x1, x2, x3)] | = | x2 + 2 |
[quot(x1, x2)] | = | 0 |
[nil] | = | 1 |
[gt#(x1, x2)] | = | 0 |
[app#(x1, x2)] | = | 0 |
[minus#(x1, x2)] | = | 0 |
[plus(x1, x2)] | = | x1 + x2 + 1 |
[cons(x1, x2)] | = | x2 + 1 |
[if#(x1, x2, x3)] | = | 0 |
[id(x1)] | = | 1 |
[quot#(x1, x2)] | = | 0 |
[sum#(x1)] | = | x1 + 0 |
[not(x1)] | = | x1 + 0 |
[app(x1, x2)] | = | x1 + x2 + 3287 |
app(nil,k) | → | k | (8) |
app(cons(x,l),k) | → | cons(x,app(l,k)) | (10) |
sum(cons(x,cons(y,l))) | → | sum(cons(plus(x,y),l)) | (12) |
sum(cons(x,nil)) | → | cons(x,nil) | (11) |
app(l,nil) | → | l | (9) |
sum(app(l,cons(x,cons(y,k)))) | → | sum(app(l,sum(cons(x,cons(y,k))))) | (13) |
sum#(cons(x,cons(y,l))) | → | sum#(cons(plus(x,y),l)) | (37) |
The dependency pairs are split into 0 components.
quot#(s(x),s(y)) | → | quot#(minus(x,y),s(y)) | (26) |
[zero] | = | 1 |
[s(x1)] | = | x1 + 51836 |
[gt(x1, x2)] | = | x2 + 1 |
[minus(x1, x2)] | = | x1 + 51835 |
[plus#(x1, x2)] | = | 0 |
[false] | = | 2 |
[id#(x1)] | = | 0 |
[true] | = | 3 |
[sum(x1)] | = | 29535 |
[not#(x1)] | = | 0 |
[0] | = | 32869 |
[if(x1, x2, x3)] | = | x2 + 2 |
[quot(x1, x2)] | = | 0 |
[nil] | = | 1 |
[gt#(x1, x2)] | = | 0 |
[app#(x1, x2)] | = | 0 |
[minus#(x1, x2)] | = | 0 |
[plus(x1, x2)] | = | x1 + x2 + 19496 |
[cons(x1, x2)] | = | x2 + 1 |
[if#(x1, x2, x3)] | = | 0 |
[id(x1)] | = | 1 |
[quot#(x1, x2)] | = | x1 + 0 |
[sum#(x1)] | = | x1 + 0 |
[not(x1)] | = | x1 + 0 |
[app(x1, x2)] | = | x1 + x2 + 13324 |
app(nil,k) | → | k | (8) |
minus(x,0) | → | x | (1) |
app(cons(x,l),k) | → | cons(x,app(l,k)) | (10) |
minus(minus(x,y),z) | → | minus(x,plus(y,z)) | (7) |
sum(cons(x,cons(y,l))) | → | sum(cons(plus(x,y),l)) | (12) |
sum(cons(x,nil)) | → | cons(x,nil) | (11) |
app(l,nil) | → | l | (9) |
sum(app(l,cons(x,cons(y,k)))) | → | sum(app(l,sum(cons(x,cons(y,k))))) | (13) |
minus(s(x),s(y)) | → | minus(x,y) | (2) |
quot#(s(x),s(y)) | → | quot#(minus(x,y),s(y)) | (26) |
The dependency pairs are split into 0 components.
minus#(s(x),s(y)) | → | minus#(x,y) | (48) |
minus#(minus(x,y),z) | → | minus#(x,plus(y,z)) | (42) |
[zero] | = | 1 |
[s(x1)] | = | x1 + 51836 |
[gt(x1, x2)] | = | x2 + 1 |
[minus(x1, x2)] | = | x1 + 51835 |
[plus#(x1, x2)] | = | 0 |
[false] | = | 2 |
[id#(x1)] | = | 0 |
[true] | = | 3 |
[sum(x1)] | = | 82509 |
[not#(x1)] | = | 0 |
[0] | = | 1 |
[if(x1, x2, x3)] | = | x2 + 2 |
[quot(x1, x2)] | = | 0 |
[nil] | = | 28716 |
[gt#(x1, x2)] | = | 0 |
[app#(x1, x2)] | = | 0 |
[minus#(x1, x2)] | = | x1 + 0 |
[plus(x1, x2)] | = | x1 + x2 + 7630 |
[cons(x1, x2)] | = | x2 + 53793 |
[if#(x1, x2, x3)] | = | 0 |
[id(x1)] | = | 1 |
[quot#(x1, x2)] | = | x1 + 0 |
[sum#(x1)] | = | x1 + 0 |
[not(x1)] | = | x1 + 0 |
[app(x1, x2)] | = | x1 + x2 + 25785 |
app(nil,k) | → | k | (8) |
minus(x,0) | → | x | (1) |
app(cons(x,l),k) | → | cons(x,app(l,k)) | (10) |
minus(minus(x,y),z) | → | minus(x,plus(y,z)) | (7) |
sum(cons(x,cons(y,l))) | → | sum(cons(plus(x,y),l)) | (12) |
sum(cons(x,nil)) | → | cons(x,nil) | (11) |
app(l,nil) | → | l | (9) |
sum(app(l,cons(x,cons(y,k)))) | → | sum(app(l,sum(cons(x,cons(y,k))))) | (13) |
minus(s(x),s(y)) | → | minus(x,y) | (2) |
minus#(s(x),s(y)) | → | minus#(x,y) | (48) |
minus#(minus(x,y),z) | → | minus#(x,plus(y,z)) | (42) |
The dependency pairs are split into 0 components.
plus#(s(x),x) | → | plus#(if(gt(x,x),id(x),id(x)),s(x)) | (31) |
plus#(s(x),s(y)) | → | plus#(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))) | (29) |
plus#(s(x),y) | → | plus#(x,y) | (25) |
plus#(id(x),s(y)) | → | plus#(x,if(gt(s(y),y),y,s(y))) | (36) |
[zero] | = | 0 |
[s(x1)] | = | x1 + 8 |
[gt(x1, x2)] | = | max(x2 + 1, 0) |
[minus(x1, x2)] | = | max(0) |
[plus#(x1, x2)] | = | max(x1 + 41064, x2 + 41063, 0) |
[false] | = | 1 |
[id#(x1)] | = | 0 |
[true] | = | 1 |
[sum(x1)] | = | 0 |
[not#(x1)] | = | 0 |
[0] | = | 0 |
[if(x1, x2, x3)] | = | max(x1 + 3, x2 + 1, x3 + 0, 0) |
[quot(x1, x2)] | = | max(0) |
[nil] | = | 0 |
[gt#(x1, x2)] | = | max(0) |
[app#(x1, x2)] | = | max(0) |
[minus#(x1, x2)] | = | max(0) |
[plus(x1, x2)] | = | max(0) |
[cons(x1, x2)] | = | max(0) |
[if#(x1, x2, x3)] | = | max(0) |
[id(x1)] | = | x1 + 1 |
[quot#(x1, x2)] | = | max(0) |
[sum#(x1)] | = | 0 |
[not(x1)] | = | x1 + 3 |
[app(x1, x2)] | = | max(0) |
id(x) | → | x | (18) |
not(x) | → | if(x,false,true) | (21) |
if(true,x,y) | → | x | (19) |
gt(s(x),zero) | → | true | (22) |
if(false,x,y) | → | y | (20) |
gt(zero,y) | → | false | (23) |
gt(s(x),s(y)) | → | gt(x,y) | (24) |
plus#(s(x),x) | → | plus#(if(gt(x,x),id(x),id(x)),s(x)) | (31) |
plus#(s(x),s(y)) | → | plus#(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))) | (29) |
The dependency pairs are split into 1 component.
plus#(id(x),s(y)) | → | plus#(x,if(gt(s(y),y),y,s(y))) | (36) |
plus#(s(x),y) | → | plus#(x,y) | (25) |
[zero] | = | 1 |
[s(x1)] | = | x1 + 1 |
[gt(x1, x2)] | = | x1 + x2 + 1 |
[minus(x1, x2)] | = | x1 + 51835 |
[plus#(x1, x2)] | = | x1 + 0 |
[false] | = | 1 |
[id#(x1)] | = | 0 |
[true] | = | 1 |
[sum(x1)] | = | 53794 |
[not#(x1)] | = | 0 |
[0] | = | 1 |
[if(x1, x2, x3)] | = | x1 + x2 + x3 + 0 |
[quot(x1, x2)] | = | 0 |
[nil] | = | 1 |
[gt#(x1, x2)] | = | 0 |
[app#(x1, x2)] | = | 0 |
[minus#(x1, x2)] | = | 0 |
[plus(x1, x2)] | = | x1 + 35873 |
[cons(x1, x2)] | = | x2 + 1 |
[if#(x1, x2, x3)] | = | 0 |
[id(x1)] | = | x1 + 1 |
[quot#(x1, x2)] | = | x1 + 0 |
[sum#(x1)] | = | x1 + 0 |
[not(x1)] | = | x1 + 31251 |
[app(x1, x2)] | = | x1 + x2 + 1 |
id(x) | → | x | (18) |
app(nil,k) | → | k | (8) |
minus(x,0) | → | x | (1) |
not(x) | → | if(x,false,true) | (21) |
if(true,x,y) | → | x | (19) |
gt(s(x),zero) | → | true | (22) |
app(cons(x,l),k) | → | cons(x,app(l,k)) | (10) |
minus(minus(x,y),z) | → | minus(x,plus(y,z)) | (7) |
if(false,x,y) | → | y | (20) |
sum(cons(x,cons(y,l))) | → | sum(cons(plus(x,y),l)) | (12) |
gt(zero,y) | → | false | (23) |
gt(s(x),s(y)) | → | gt(x,y) | (24) |
sum(cons(x,nil)) | → | cons(x,nil) | (11) |
app(l,nil) | → | l | (9) |
sum(app(l,cons(x,cons(y,k)))) | → | sum(app(l,sum(cons(x,cons(y,k))))) | (13) |
minus(s(x),s(y)) | → | minus(x,y) | (2) |
plus#(id(x),s(y)) | → | plus#(x,if(gt(s(y),y),y,s(y))) | (36) |
plus#(s(x),y) | → | plus#(x,y) | (25) |
The dependency pairs are split into 0 components.
gt#(s(x),s(y)) | → | gt#(x,y) | (27) |
[zero] | = | 1 |
[s(x1)] | = | x1 + 1 |
[gt(x1, x2)] | = | x1 + x2 + 35873 |
[minus(x1, x2)] | = | x1 + 51835 |
[plus#(x1, x2)] | = | x1 + 0 |
[false] | = | 1 |
[id#(x1)] | = | 0 |
[true] | = | 1 |
[sum(x1)] | = | 2 |
[not#(x1)] | = | 0 |
[0] | = | 1 |
[if(x1, x2, x3)] | = | x1 + x2 + x3 + 0 |
[quot(x1, x2)] | = | 0 |
[nil] | = | 1 |
[gt#(x1, x2)] | = | x2 + 0 |
[app#(x1, x2)] | = | 0 |
[minus#(x1, x2)] | = | 0 |
[plus(x1, x2)] | = | x1 + 1 |
[cons(x1, x2)] | = | x2 + 1 |
[if#(x1, x2, x3)] | = | 0 |
[id(x1)] | = | x1 + 1 |
[quot#(x1, x2)] | = | x1 + 0 |
[sum#(x1)] | = | x1 + 0 |
[not(x1)] | = | x1 + 31251 |
[app(x1, x2)] | = | x1 + x2 + 37697 |
id(x) | → | x | (18) |
app(nil,k) | → | k | (8) |
minus(x,0) | → | x | (1) |
not(x) | → | if(x,false,true) | (21) |
if(true,x,y) | → | x | (19) |
gt(s(x),zero) | → | true | (22) |
app(cons(x,l),k) | → | cons(x,app(l,k)) | (10) |
minus(minus(x,y),z) | → | minus(x,plus(y,z)) | (7) |
if(false,x,y) | → | y | (20) |
sum(cons(x,cons(y,l))) | → | sum(cons(plus(x,y),l)) | (12) |
gt(zero,y) | → | false | (23) |
gt(s(x),s(y)) | → | gt(x,y) | (24) |
sum(cons(x,nil)) | → | cons(x,nil) | (11) |
app(l,nil) | → | l | (9) |
sum(app(l,cons(x,cons(y,k)))) | → | sum(app(l,sum(cons(x,cons(y,k))))) | (13) |
minus(s(x),s(y)) | → | minus(x,y) | (2) |
gt#(s(x),s(y)) | → | gt#(x,y) | (27) |
The dependency pairs are split into 0 components.