The rewrite relation of the following TRS is considered.
app(nil,k) | → | k | (1) |
app(l,nil) | → | l | (2) |
app(cons(x,l),k) | → | cons(x,app(l,k)) | (3) |
sum(cons(x,nil)) | → | cons(x,nil) | (4) |
sum(cons(x,cons(y,l))) | → | sum(cons(plus(x,y),l)) | (5) |
sum(app(l,cons(x,cons(y,k)))) | → | sum(app(l,sum(cons(x,cons(y,k))))) | (6) |
plus(s(x),s(y)) | → | s(s(plus(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))))) | (7) |
plus(s(x),x) | → | plus(if(gt(x,x),id(x),id(x)),s(x)) | (8) |
plus(zero,y) | → | y | (9) |
plus(id(x),s(y)) | → | s(plus(x,if(gt(s(y),y),y,s(y)))) | (10) |
id(x) | → | x | (11) |
if(true,x,y) | → | x | (12) |
if(false,x,y) | → | y | (13) |
not(x) | → | if(x,false,true) | (14) |
gt(s(x),zero) | → | true | (15) |
gt(zero,y) | → | false | (16) |
gt(s(x),s(y)) | → | gt(x,y) | (17) |
sum#(app(l,cons(x,cons(y,k)))) | → | app#(l,sum(cons(x,cons(y,k)))) | (18) |
plus#(s(x),s(y)) | → | if#(gt(x,y),x,y) | (19) |
plus#(id(x),s(y)) | → | plus#(x,if(gt(s(y),y),y,s(y))) | (20) |
plus#(s(x),s(y)) | → | not#(gt(x,y)) | (21) |
plus#(s(x),s(y)) | → | id#(x) | (22) |
plus#(s(x),x) | → | id#(x) | (23) |
plus#(s(x),x) | → | id#(x) | (23) |
plus#(s(x),s(y)) | → | id#(y) | (24) |
plus#(id(x),s(y)) | → | if#(gt(s(y),y),y,s(y)) | (25) |
plus#(s(x),x) | → | plus#(if(gt(x,x),id(x),id(x)),s(x)) | (26) |
plus#(s(x),s(y)) | → | gt#(x,y) | (27) |
plus#(s(x),s(y)) | → | gt#(x,y) | (27) |
plus#(s(x),s(y)) | → | plus#(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))) | (28) |
plus#(s(x),x) | → | gt#(x,x) | (29) |
sum#(cons(x,cons(y,l))) | → | plus#(x,y) | (30) |
app#(cons(x,l),k) | → | app#(l,k) | (31) |
plus#(s(x),x) | → | if#(gt(x,x),id(x),id(x)) | (32) |
sum#(cons(x,cons(y,l))) | → | sum#(cons(plus(x,y),l)) | (33) |
sum#(app(l,cons(x,cons(y,k)))) | → | sum#(cons(x,cons(y,k))) | (34) |
sum#(app(l,cons(x,cons(y,k)))) | → | sum#(app(l,sum(cons(x,cons(y,k))))) | (35) |
plus#(s(x),s(y)) | → | if#(not(gt(x,y)),id(x),id(y)) | (36) |
plus#(id(x),s(y)) | → | gt#(s(y),y) | (37) |
not#(x) | → | if#(x,false,true) | (38) |
gt#(s(x),s(y)) | → | gt#(x,y) | (39) |
The dependency pairs are split into 5 components.
sum#(app(l,cons(x,cons(y,k)))) | → | sum#(app(l,sum(cons(x,cons(y,k))))) | (35) |
[zero] | = | 1 |
[s(x1)] | = | x1 + 2 |
[gt(x1, x2)] | = | x2 + 1 |
[plus#(x1, x2)] | = | 0 |
[false] | = | 2 |
[id#(x1)] | = | 0 |
[true] | = | 0 |
[sum(x1)] | = | 3 |
[not#(x1)] | = | 0 |
[if(x1, x2, x3)] | = | x3 + 2 |
[nil] | = | 1 |
[gt#(x1, x2)] | = | 0 |
[app#(x1, x2)] | = | 0 |
[plus(x1, x2)] | = | x1 + 35657 |
[cons(x1, x2)] | = | x2 + 2 |
[if#(x1, x2, x3)] | = | 0 |
[id(x1)] | = | x1 + 1 |
[sum#(x1)] | = | x1 + 0 |
[not(x1)] | = | 0 |
[app(x1, x2)] | = | x1 + x2 + 29283 |
sum(cons(x,nil)) | → | cons(x,nil) | (4) |
app(nil,k) | → | k | (1) |
app(cons(x,l),k) | → | cons(x,app(l,k)) | (3) |
sum(cons(x,cons(y,l))) | → | sum(cons(plus(x,y),l)) | (5) |
sum(app(l,cons(x,cons(y,k)))) | → | sum(app(l,sum(cons(x,cons(y,k))))) | (6) |
app(l,nil) | → | l | (2) |
sum#(app(l,cons(x,cons(y,k)))) | → | sum#(app(l,sum(cons(x,cons(y,k))))) | (35) |
The dependency pairs are split into 0 components.
sum#(cons(x,cons(y,l))) | → | sum#(cons(plus(x,y),l)) | (33) |
[zero] | = | 1 |
[s(x1)] | = | x1 + 2 |
[gt(x1, x2)] | = | x2 + 1 |
[plus#(x1, x2)] | = | 0 |
[false] | = | 2 |
[id#(x1)] | = | 0 |
[true] | = | 0 |
[sum(x1)] | = | 31123 |
[not#(x1)] | = | 0 |
[if(x1, x2, x3)] | = | x3 + 2 |
[nil] | = | 1 |
[gt#(x1, x2)] | = | 0 |
[app#(x1, x2)] | = | 0 |
[plus(x1, x2)] | = | x1 + 1 |
[cons(x1, x2)] | = | x2 + 31122 |
[if#(x1, x2, x3)] | = | 0 |
[id(x1)] | = | x1 + 1 |
[sum#(x1)] | = | x1 + 0 |
[not(x1)] | = | 0 |
[app(x1, x2)] | = | x1 + x2 + 29283 |
sum(cons(x,nil)) | → | cons(x,nil) | (4) |
app(nil,k) | → | k | (1) |
app(cons(x,l),k) | → | cons(x,app(l,k)) | (3) |
sum(cons(x,cons(y,l))) | → | sum(cons(plus(x,y),l)) | (5) |
sum(app(l,cons(x,cons(y,k)))) | → | sum(app(l,sum(cons(x,cons(y,k))))) | (6) |
app(l,nil) | → | l | (2) |
sum#(cons(x,cons(y,l))) | → | sum#(cons(plus(x,y),l)) | (33) |
The dependency pairs are split into 0 components.
app#(cons(x,l),k) | → | app#(l,k) | (31) |
[zero] | = | 1 |
[s(x1)] | = | x1 + 2 |
[gt(x1, x2)] | = | x2 + 1 |
[plus#(x1, x2)] | = | 0 |
[false] | = | 2 |
[id#(x1)] | = | 0 |
[true] | = | 0 |
[sum(x1)] | = | 592 |
[not#(x1)] | = | 0 |
[if(x1, x2, x3)] | = | x3 + 16909 |
[nil] | = | 1 |
[gt#(x1, x2)] | = | 0 |
[app#(x1, x2)] | = | x1 + 0 |
[plus(x1, x2)] | = | x1 + 1 |
[cons(x1, x2)] | = | x2 + 591 |
[if#(x1, x2, x3)] | = | 0 |
[id(x1)] | = | x1 + 1 |
[sum#(x1)] | = | x1 + 0 |
[not(x1)] | = | 0 |
[app(x1, x2)] | = | x1 + x2 + 19428 |
sum(cons(x,nil)) | → | cons(x,nil) | (4) |
app(nil,k) | → | k | (1) |
app(cons(x,l),k) | → | cons(x,app(l,k)) | (3) |
sum(cons(x,cons(y,l))) | → | sum(cons(plus(x,y),l)) | (5) |
sum(app(l,cons(x,cons(y,k)))) | → | sum(app(l,sum(cons(x,cons(y,k))))) | (6) |
app(l,nil) | → | l | (2) |
app#(cons(x,l),k) | → | app#(l,k) | (31) |
The dependency pairs are split into 0 components.
plus#(id(x),s(y)) | → | plus#(x,if(gt(s(y),y),y,s(y))) | (20) |
plus#(s(x),s(y)) | → | plus#(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))) | (28) |
plus#(s(x),x) | → | plus#(if(gt(x,x),id(x),id(x)),s(x)) | (26) |
[zero] | = | 0 |
[s(x1)] | = | x1 + 5 |
[gt(x1, x2)] | = | max(x2 + 1, 0) |
[plus#(x1, x2)] | = | max(x1 + 1427, x2 + 1424, 0) |
[false] | = | 2 |
[id#(x1)] | = | 0 |
[true] | = | 2 |
[sum(x1)] | = | 0 |
[not#(x1)] | = | 0 |
[if(x1, x2, x3)] | = | max(x2 + 1, x3 + 0, 0) |
[nil] | = | 0 |
[gt#(x1, x2)] | = | max(0) |
[app#(x1, x2)] | = | max(0) |
[plus(x1, x2)] | = | max(0) |
[cons(x1, x2)] | = | max(0) |
[if#(x1, x2, x3)] | = | max(0) |
[id(x1)] | = | x1 + 3 |
[sum#(x1)] | = | 0 |
[not(x1)] | = | x1 + 0 |
[app(x1, x2)] | = | max(0) |
if(true,x,y) | → | x | (12) |
id(x) | → | x | (11) |
if(false,x,y) | → | y | (13) |
plus#(s(x),s(y)) | → | plus#(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))) | (28) |
plus#(s(x),x) | → | plus#(if(gt(x,x),id(x),id(x)),s(x)) | (26) |
The dependency pairs are split into 1 component.
plus#(id(x),s(y)) | → | plus#(x,if(gt(s(y),y),y,s(y))) | (20) |
[zero] | = | 1 |
[s(x1)] | = | 2 |
[gt(x1, x2)] | = | x2 + 1 |
[plus#(x1, x2)] | = | x1 + 0 |
[false] | = | 21395 |
[id#(x1)] | = | 0 |
[true] | = | 0 |
[sum(x1)] | = | 42005 |
[not#(x1)] | = | 0 |
[if(x1, x2, x3)] | = | x2 + x3 + 1 |
[nil] | = | 42004 |
[gt#(x1, x2)] | = | 0 |
[app#(x1, x2)] | = | 0 |
[plus(x1, x2)] | = | 1 |
[cons(x1, x2)] | = | x2 + 1 |
[if#(x1, x2, x3)] | = | 0 |
[id(x1)] | = | x1 + 1 |
[sum#(x1)] | = | x1 + 0 |
[not(x1)] | = | 1 |
[app(x1, x2)] | = | x1 + x2 + 25536 |
sum(cons(x,nil)) | → | cons(x,nil) | (4) |
app(nil,k) | → | k | (1) |
app(cons(x,l),k) | → | cons(x,app(l,k)) | (3) |
sum(cons(x,cons(y,l))) | → | sum(cons(plus(x,y),l)) | (5) |
if(true,x,y) | → | x | (12) |
id(x) | → | x | (11) |
if(false,x,y) | → | y | (13) |
sum(app(l,cons(x,cons(y,k)))) | → | sum(app(l,sum(cons(x,cons(y,k))))) | (6) |
app(l,nil) | → | l | (2) |
plus#(id(x),s(y)) | → | plus#(x,if(gt(s(y),y),y,s(y))) | (20) |
The dependency pairs are split into 0 components.
gt#(s(x),s(y)) | → | gt#(x,y) | (39) |
[zero] | = | 1 |
[s(x1)] | = | x1 + 1 |
[gt(x1, x2)] | = | x2 + 1 |
[plus#(x1, x2)] | = | x1 + 0 |
[false] | = | 21395 |
[id#(x1)] | = | 0 |
[true] | = | 0 |
[sum(x1)] | = | 2 |
[not#(x1)] | = | 0 |
[if(x1, x2, x3)] | = | x2 + x3 + 1 |
[nil] | = | 1 |
[gt#(x1, x2)] | = | x1 + 0 |
[app#(x1, x2)] | = | 0 |
[plus(x1, x2)] | = | 54886 |
[cons(x1, x2)] | = | x2 + 1 |
[if#(x1, x2, x3)] | = | 0 |
[id(x1)] | = | x1 + 51737 |
[sum#(x1)] | = | x1 + 0 |
[not(x1)] | = | 1 |
[app(x1, x2)] | = | x1 + x2 + 25067 |
sum(cons(x,nil)) | → | cons(x,nil) | (4) |
app(nil,k) | → | k | (1) |
app(cons(x,l),k) | → | cons(x,app(l,k)) | (3) |
sum(cons(x,cons(y,l))) | → | sum(cons(plus(x,y),l)) | (5) |
if(true,x,y) | → | x | (12) |
id(x) | → | x | (11) |
if(false,x,y) | → | y | (13) |
sum(app(l,cons(x,cons(y,k)))) | → | sum(app(l,sum(cons(x,cons(y,k))))) | (6) |
app(l,nil) | → | l | (2) |
gt#(s(x),s(y)) | → | gt#(x,y) | (39) |
The dependency pairs are split into 0 components.