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) |
| sum(plus(cons(0,x),cons(y,l))) | → | pred(sum(cons(s(x),cons(y,l)))) | (7) |
| pred(cons(s(x),nil)) | → | cons(x,nil) | (8) |
| plus(s(x),s(y)) | → | s(s(plus(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))))) | (9) |
| plus(s(x),x) | → | plus(if(gt(x,x),id(x),id(x)),s(x)) | (10) |
| plus(zero,y) | → | y | (11) |
| plus(id(x),s(y)) | → | s(plus(x,if(gt(s(y),y),y,s(y)))) | (12) |
| id(x) | → | x | (13) |
| if(true,x,y) | → | x | (14) |
| if(false,x,y) | → | y | (15) |
| not(x) | → | if(x,false,true) | (16) |
| gt(s(x),zero) | → | true | (17) |
| gt(zero,y) | → | false | (18) |
| gt(s(x),s(y)) | → | gt(x,y) | (19) |
| sum#(app(l,cons(x,cons(y,k)))) | → | app#(l,sum(cons(x,cons(y,k)))) | (20) |
| plus#(s(x),s(y)) | → | gt#(x,y) | (21) |
| plus#(id(x),s(y)) | → | if#(gt(s(y),y),y,s(y)) | (22) |
| plus#(s(x),s(y)) | → | gt#(x,y) | (21) |
| plus#(s(x),s(y)) | → | id#(y) | (23) |
| gt#(s(x),s(y)) | → | gt#(x,y) | (24) |
| sum#(cons(x,cons(y,l))) | → | plus#(x,y) | (25) |
| plus#(id(x),s(y)) | → | plus#(x,if(gt(s(y),y),y,s(y))) | (26) |
| plus#(id(x),s(y)) | → | gt#(s(y),y) | (27) |
| not#(x) | → | if#(x,false,true) | (28) |
| plus#(s(x),x) | → | id#(x) | (29) |
| plus#(s(x),s(y)) | → | if#(not(gt(x,y)),id(x),id(y)) | (30) |
| plus#(s(x),s(y)) | → | id#(x) | (31) |
| plus#(s(x),s(y)) | → | if#(gt(x,y),x,y) | (32) |
| sum#(cons(x,cons(y,l))) | → | sum#(cons(plus(x,y),l)) | (33) |
| plus#(s(x),x) | → | plus#(if(gt(x,x),id(x),id(x)),s(x)) | (34) |
| plus#(s(x),x) | → | gt#(x,x) | (35) |
| app#(cons(x,l),k) | → | app#(l,k) | (36) |
| plus#(s(x),x) | → | id#(x) | (29) |
| sum#(plus(cons(0,x),cons(y,l))) | → | sum#(cons(s(x),cons(y,l))) | (37) |
| sum#(app(l,cons(x,cons(y,k)))) | → | sum#(cons(x,cons(y,k))) | (38) |
| sum#(app(l,cons(x,cons(y,k)))) | → | sum#(app(l,sum(cons(x,cons(y,k))))) | (39) |
| plus#(s(x),s(y)) | → | not#(gt(x,y)) | (40) |
| sum#(plus(cons(0,x),cons(y,l))) | → | pred#(sum(cons(s(x),cons(y,l)))) | (41) |
| plus#(s(x),s(y)) | → | plus#(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))) | (42) |
| plus#(s(x),x) | → | if#(gt(x,x),id(x),id(x)) | (43) |
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))))) | (39) |
| [zero] | = | 1 |
| [s(x1)] | = | x1 + 33428 |
| [gt(x1, x2)] | = | x2 + 162 |
| [plus#(x1, x2)] | = | 0 |
| [false] | = | 163 |
| [id#(x1)] | = | 0 |
| [true] | = | 164 |
| [pred(x1)] | = | x1 + 0 |
| [sum(x1)] | = | 61227 |
| [not#(x1)] | = | 0 |
| [0] | = | 1 |
| [if(x1, x2, x3)] | = | x1 + x2 + 121 |
| [nil] | = | 1 |
| [gt#(x1, x2)] | = | 0 |
| [app#(x1, x2)] | = | 0 |
| [plus(x1, x2)] | = | x1 + x2 + 1 |
| [pred#(x1)] | = | 0 |
| [cons(x1, x2)] | = | x2 + 30614 |
| [if#(x1, x2, x3)] | = | 0 |
| [id(x1)] | = | x1 + 1 |
| [sum#(x1)] | = | x1 + 0 |
| [not(x1)] | = | x1 + 0 |
| [app(x1, x2)] | = | x1 + x2 + 33954 |
| sum(cons(x,nil)) | → | cons(x,nil) | (4) |
| pred(cons(s(x),nil)) | → | cons(x,nil) | (8) |
| 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(plus(cons(0,x),cons(y,l))) | → | pred(sum(cons(s(x),cons(y,l)))) | (7) |
| 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))))) | (39) |
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 + 52868 |
| [gt(x1, x2)] | = | x2 + 1 |
| [plus#(x1, x2)] | = | 0 |
| [false] | = | 2 |
| [id#(x1)] | = | 0 |
| [true] | = | 3 |
| [pred(x1)] | = | x1 + 0 |
| [sum(x1)] | = | 30614 |
| [not#(x1)] | = | 0 |
| [0] | = | 1 |
| [if(x1, x2, x3)] | = | x1 + x2 + 21656 |
| [nil] | = | 1 |
| [gt#(x1, x2)] | = | 0 |
| [app#(x1, x2)] | = | 0 |
| [plus(x1, x2)] | = | x1 + x2 + 1 |
| [pred#(x1)] | = | 0 |
| [cons(x1, x2)] | = | x2 + 1 |
| [if#(x1, x2, x3)] | = | 0 |
| [id(x1)] | = | x1 + 1 |
| [sum#(x1)] | = | x1 + 0 |
| [not(x1)] | = | x1 + 18457 |
| [app(x1, x2)] | = | x1 + x2 + 33954 |
| sum(cons(x,nil)) | → | cons(x,nil) | (4) |
| pred(cons(s(x),nil)) | → | cons(x,nil) | (8) |
| 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(plus(cons(0,x),cons(y,l))) | → | pred(sum(cons(s(x),cons(y,l)))) | (7) |
| 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.
| plus#(s(x),s(y)) | → | plus#(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))) | (42) |
| plus#(id(x),s(y)) | → | plus#(x,if(gt(s(y),y),y,s(y))) | (26) |
| plus#(s(x),x) | → | plus#(if(gt(x,x),id(x),id(x)),s(x)) | (34) |
| [zero] | = | 0 |
| [s(x1)] | = | x1 + 5 |
| [gt(x1, x2)] | = | max(0) |
| [plus#(x1, x2)] | = | max(x1 + 8859, x2 + 8856, 0) |
| [false] | = | 0 |
| [id#(x1)] | = | 0 |
| [true] | = | 0 |
| [pred(x1)] | = | 0 |
| [sum(x1)] | = | 0 |
| [not#(x1)] | = | 0 |
| [0] | = | 0 |
| [if(x1, x2, x3)] | = | max(x1 + 1, x2 + 1, x3 + 0, 0) |
| [nil] | = | 0 |
| [gt#(x1, x2)] | = | max(0) |
| [app#(x1, x2)] | = | max(0) |
| [plus(x1, x2)] | = | max(0) |
| [pred#(x1)] | = | 0 |
| [cons(x1, x2)] | = | max(0) |
| [if#(x1, x2, x3)] | = | max(0) |
| [id(x1)] | = | x1 + 3 |
| [sum#(x1)] | = | 0 |
| [not(x1)] | = | x1 + 1 |
| [app(x1, x2)] | = | max(0) |
| gt(zero,y) | → | false | (18) |
| if(false,x,y) | → | y | (15) |
| not(x) | → | if(x,false,true) | (16) |
| gt(s(x),s(y)) | → | gt(x,y) | (19) |
| gt(s(x),zero) | → | true | (17) |
| if(true,x,y) | → | x | (14) |
| id(x) | → | x | (13) |
| plus#(s(x),s(y)) | → | plus#(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))) | (42) |
| plus#(s(x),x) | → | plus#(if(gt(x,x),id(x),id(x)),s(x)) | (34) |
The dependency pairs are split into 1 component.
| plus#(id(x),s(y)) | → | plus#(x,if(gt(s(y),y),y,s(y))) | (26) |
| [zero] | = | 1 |
| [s(x1)] | = | x1 + 1032 |
| [gt(x1, x2)] | = | 21653 |
| [plus#(x1, x2)] | = | x1 + 0 |
| [false] | = | 21654 |
| [id#(x1)] | = | 0 |
| [true] | = | 21654 |
| [pred(x1)] | = | x1 + 0 |
| [sum(x1)] | = | 2 |
| [not#(x1)] | = | 0 |
| [0] | = | 1 |
| [if(x1, x2, x3)] | = | x2 + x3 + 72 |
| [nil] | = | 1 |
| [gt#(x1, x2)] | = | 0 |
| [app#(x1, x2)] | = | 0 |
| [plus(x1, x2)] | = | x1 + x2 + 1 |
| [pred#(x1)] | = | 0 |
| [cons(x1, x2)] | = | x2 + 1 |
| [if#(x1, x2, x3)] | = | 0 |
| [id(x1)] | = | x1 + 1 |
| [sum#(x1)] | = | x1 + 0 |
| [not(x1)] | = | 43380 |
| [app(x1, x2)] | = | x1 + x2 + 33954 |
| sum(cons(x,nil)) | → | cons(x,nil) | (4) |
| if(false,x,y) | → | y | (15) |
| pred(cons(s(x),nil)) | → | cons(x,nil) | (8) |
| app(nil,k) | → | k | (1) |
| app(cons(x,l),k) | → | cons(x,app(l,k)) | (3) |
| not(x) | → | if(x,false,true) | (16) |
| sum(cons(x,cons(y,l))) | → | sum(cons(plus(x,y),l)) | (5) |
| sum(plus(cons(0,x),cons(y,l))) | → | pred(sum(cons(s(x),cons(y,l)))) | (7) |
| if(true,x,y) | → | x | (14) |
| id(x) | → | x | (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))) | (26) |
The dependency pairs are split into 0 components.
| gt#(s(x),s(y)) | → | gt#(x,y) | (24) |
| [zero] | = | 1 |
| [s(x1)] | = | x1 + 1 |
| [gt(x1, x2)] | = | 1 |
| [plus#(x1, x2)] | = | x1 + 0 |
| [false] | = | 2 |
| [id#(x1)] | = | 0 |
| [true] | = | 5050 |
| [pred(x1)] | = | x1 + 0 |
| [sum(x1)] | = | 4426 |
| [not#(x1)] | = | 0 |
| [0] | = | 5957 |
| [if(x1, x2, x3)] | = | x2 + x3 + 13359 |
| [nil] | = | 1 |
| [gt#(x1, x2)] | = | x1 + 0 |
| [app#(x1, x2)] | = | 0 |
| [plus(x1, x2)] | = | x1 + x2 + 35325 |
| [pred#(x1)] | = | 0 |
| [cons(x1, x2)] | = | x1 + 0 |
| [if#(x1, x2, x3)] | = | 0 |
| [id(x1)] | = | x1 + 3024 |
| [sum#(x1)] | = | 0 |
| [not(x1)] | = | 21726 |
| [app(x1, x2)] | = | 1 |
| if(false,x,y) | → | y | (15) |
| pred(cons(s(x),nil)) | → | cons(x,nil) | (8) |
| not(x) | → | if(x,false,true) | (16) |
| if(true,x,y) | → | x | (14) |
| id(x) | → | x | (13) |
| gt#(s(x),s(y)) | → | gt#(x,y) | (24) |
The dependency pairs are split into 0 components.
| app#(cons(x,l),k) | → | app#(l,k) | (36) |
| [zero] | = | 1 |
| [s(x1)] | = | x1 + 1 |
| [gt(x1, x2)] | = | 1 |
| [plus#(x1, x2)] | = | x1 + 0 |
| [false] | = | 2 |
| [id#(x1)] | = | 0 |
| [true] | = | 5050 |
| [pred(x1)] | = | x1 + 0 |
| [sum(x1)] | = | x1 + 0 |
| [not#(x1)] | = | 0 |
| [0] | = | 26716 |
| [if(x1, x2, x3)] | = | x2 + x3 + 1 |
| [nil] | = | 0 |
| [gt#(x1, x2)] | = | 0 |
| [app#(x1, x2)] | = | x1 + 0 |
| [plus(x1, x2)] | = | x1 + x2 + 1 |
| [pred#(x1)] | = | 0 |
| [cons(x1, x2)] | = | x1 + x2 + 1 |
| [if#(x1, x2, x3)] | = | 0 |
| [id(x1)] | = | x1 + 1 |
| [sum#(x1)] | = | 0 |
| [not(x1)] | = | 21726 |
| [app(x1, x2)] | = | x1 + x2 + 0 |
| if(false,x,y) | → | y | (15) |
| pred(cons(s(x),nil)) | → | cons(x,nil) | (8) |
| not(x) | → | if(x,false,true) | (16) |
| if(true,x,y) | → | x | (14) |
| id(x) | → | x | (13) |
| app#(cons(x,l),k) | → | app#(l,k) | (36) |
The dependency pairs are split into 0 components.