Input TRS: 1: app(nil(),k) -> k 2: app(l,nil()) -> l 3: app(cons(x,l),k) -> cons(x,app(l,k)) 4: sum(cons(x,nil())) -> cons(x,nil()) 5: sum(cons(x,cons(y,l))) -> sum(cons(plus(x,y),l)) 6: sum(app(l,cons(x,cons(y,k)))) -> sum(app(l,sum(cons(x,cons(y,k))))) 7: sum(plus(cons(0(),x),cons(y,l))) -> pred(sum(cons(s(x),cons(y,l)))) 8: pred(cons(s(x),nil())) -> cons(x,nil()) 9: plus(s(x),s(y)) -> s(s(plus(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))))) 10: plus(s(x),x) -> plus(if(gt(x,x),id(x),id(x)),s(x)) 11: plus(zero(),y) -> y 12: plus(id(x),s(y)) -> s(plus(x,if(gt(s(y),y),y,s(y)))) 13: id(x) -> x 14: if(true(),x,y) -> x 15: if(false(),x,y) -> y 16: not(x) -> if(x,false(),true()) 17: gt(s(x),zero()) -> true() 18: gt(zero(),y) -> false() 19: gt(s(x),s(y)) -> gt(x,y) Number of strict rules: 19 Direct Order(PosReal,>,Poly) ... failed. Freezing gt 1: app(nil(),k) -> k 2: app(l,nil()) -> l 3: app(cons(x,l),k) -> cons(x,app(l,k)) 4: sum(cons(x,nil())) -> cons(x,nil()) 5: sum(cons(x,cons(y,l))) -> sum(cons(plus(x,y),l)) 6: sum(app(l,cons(x,cons(y,k)))) -> sum(app(l,sum(cons(x,cons(y,k))))) 7: sum(plus(cons(0(),x),cons(y,l))) -> pred(sum(cons(s(x),cons(y,l)))) 8: pred(cons(s(x),nil())) -> cons(x,nil()) 9: plus(s(x),s(y)) -> s(s(plus(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))))) 10: plus(s(x),x) -> plus(if(gt(x,x),id(x),id(x)),s(x)) 11: plus(zero(),y) -> y 12: plus(id(x),s(y)) -> s(plus(x,if(gt❆1_s(y,y),y,s(y)))) 13: id(x) -> x 14: if(true(),x,y) -> x 15: if(false(),x,y) -> y 16: not(x) -> if(x,false(),true()) 17: gt❆1_s(x,zero()) -> true() 18: gt❆1_zero(y) -> false() 19: gt❆1_s(x,s(y)) -> gt(x,y) 20: gt(zero(),_1) ->= gt❆1_zero(_1) 21: gt(s(_1),_2) ->= gt❆1_s(_1,_2) Number of strict rules: 19 Direct Order(PosReal,>,Poly) ... failed. Dependency Pairs: #1: #sum(app(l,cons(x,cons(y,k)))) -> #sum(app(l,sum(cons(x,cons(y,k))))) #2: #sum(app(l,cons(x,cons(y,k)))) -> #app(l,sum(cons(x,cons(y,k)))) #3: #sum(app(l,cons(x,cons(y,k)))) -> #sum(cons(x,cons(y,k))) #4: #plus(s(x),s(y)) -> #plus(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))) #5: #plus(s(x),s(y)) -> #if(gt(x,y),x,y) #6: #plus(s(x),s(y)) -> #gt(x,y) #7: #plus(s(x),s(y)) -> #if(not(gt(x,y)),id(x),id(y)) #8: #plus(s(x),s(y)) -> #not(gt(x,y)) #9: #plus(s(x),s(y)) -> #gt(x,y) #10: #plus(s(x),s(y)) -> #id(x) #11: #plus(s(x),s(y)) -> #id(y) #12: #plus(id(x),s(y)) -> #plus(x,if(gt❆1_s(y,y),y,s(y))) #13: #plus(id(x),s(y)) -> #if(gt❆1_s(y,y),y,s(y)) #14: #plus(id(x),s(y)) -> #gt❆1_s(y,y) #15: #gt(zero(),_1) ->? #gt❆1_zero(_1) #16: #sum(plus(cons(0(),x),cons(y,l))) -> #pred(sum(cons(s(x),cons(y,l)))) #17: #sum(plus(cons(0(),x),cons(y,l))) -> #sum(cons(s(x),cons(y,l))) #18: #plus(s(x),x) -> #plus(if(gt(x,x),id(x),id(x)),s(x)) #19: #plus(s(x),x) -> #if(gt(x,x),id(x),id(x)) #20: #plus(s(x),x) -> #gt(x,x) #21: #plus(s(x),x) -> #id(x) #22: #plus(s(x),x) -> #id(x) #23: #sum(cons(x,cons(y,l))) -> #sum(cons(plus(x,y),l)) #24: #sum(cons(x,cons(y,l))) -> #plus(x,y) #25: #gt❆1_s(x,s(y)) -> #gt(x,y) #26: #gt(s(_1),_2) ->? #gt❆1_s(_1,_2) #27: #not(x) -> #if(x,false(),true()) #28: #app(cons(x,l),k) -> #app(l,k) Number of SCCs: 5, DPs: 8, edges: 14 SCC { #28 } Removing DPs: Order(PosReal,>,Sum)... succeeded. zero() weight: 0 s(x1) weight: 0 gt(x1,x2) weight: 0 #plus(x1,x2) weight: 0 false() weight: 0 #id(x1) weight: 0 true() weight: 0 pred(x1) weight: 0 gt❆1_zero(x1) weight: 0 sum(x1) weight: 0 #not(x1) weight: 0 #gt❆1_zero(x1) weight: 0 0() weight: 0 if(x1,x2,x3) weight: 0 nil() weight: 0 #gt(x1,x2) weight: 0 #app(x1,x2) weight: x1 #gt❆1_s(x1,x2) weight: 0 plus(x1,x2) weight: 0 #pred(x1) weight: 0 cons(x1,x2) weight: (/ 1 2) + x2 #if(x1,x2,x3) weight: 0 id(x1) weight: 0 #sum(x1) weight: 0 gt❆1_s(x1,x2) weight: 0 not(x1) weight: 0 app(x1,x2) weight: 0 Usable rules: { } Removed DPs: #28 Number of SCCs: 4, DPs: 7, edges: 13 SCC { #23 } Removing DPs: Order(PosReal,>,Sum)... succeeded. zero() weight: 0 s(x1) weight: 0 gt(x1,x2) weight: (/ 1 8) + x2 #plus(x1,x2) weight: 0 false() weight: 0 #id(x1) weight: 0 true() weight: 0 pred(x1) weight: 0 gt❆1_zero(x1) weight: (/ 1 4) sum(x1) weight: 0 #not(x1) weight: 0 #gt❆1_zero(x1) weight: 0 0() weight: 0 if(x1,x2,x3) weight: (/ 1 4) + x2 nil() weight: 0 #gt(x1,x2) weight: 0 #app(x1,x2) weight: 0 #gt❆1_s(x1,x2) weight: 0 plus(x1,x2) weight: (/ 1 8) + x2 #pred(x1) weight: 0 cons(x1,x2) weight: (/ 1 8) + x2 #if(x1,x2,x3) weight: 0 id(x1) weight: (/ 1 8) #sum(x1) weight: x1 gt❆1_s(x1,x2) weight: (/ 1 4) + x2 not(x1) weight: (/ 1 8) app(x1,x2) weight: 0 Usable rules: { 9..12 } Removed DPs: #23 Number of SCCs: 3, DPs: 6, edges: 12 SCC { #25 #26 } Removing DPs: Order(PosReal,>,Sum)... succeeded. zero() weight: 0 s(x1) weight: (/ 1 8) + x1 gt(x1,x2) weight: (/ 1 8) + x2 #plus(x1,x2) weight: 0 false() weight: 0 #id(x1) weight: 0 true() weight: 0 pred(x1) weight: 0 gt❆1_zero(x1) weight: (/ 1 4) sum(x1) weight: 0 #not(x1) weight: 0 #gt❆1_zero(x1) weight: 0 0() weight: 0 if(x1,x2,x3) weight: (/ 1 4) + x3 nil() weight: 0 #gt(x1,x2) weight: x1 + x2 #app(x1,x2) weight: 0 #gt❆1_s(x1,x2) weight: x1 + x2 plus(x1,x2) weight: (/ 1 8) + x1 #pred(x1) weight: 0 cons(x1,x2) weight: (/ 1 8) #if(x1,x2,x3) weight: 0 id(x1) weight: 0 #sum(x1) weight: x1 gt❆1_s(x1,x2) weight: (/ 1 4) + x2 not(x1) weight: (/ 1 8) app(x1,x2) weight: 0 Usable rules: { } Removed DPs: #25 #26 Number of SCCs: 2, DPs: 4, edges: 10 SCC { #1 } Removing DPs: Order(PosReal,>,Sum)... succeeded. zero() weight: 0 s(x1) weight: (/ 1 8) + x1 gt(x1,x2) weight: (/ 1 8) + x2 #plus(x1,x2) weight: 0 false() weight: 0 #id(x1) weight: 0 true() weight: 0 pred(x1) weight: 0 gt❆1_zero(x1) weight: (/ 1 4) sum(x1) weight: (/ 1 8) #not(x1) weight: 0 #gt❆1_zero(x1) weight: 0 0() weight: 0 if(x1,x2,x3) weight: (/ 1 4) + x3 nil() weight: 0 #gt(x1,x2) weight: 0 #app(x1,x2) weight: 0 #gt❆1_s(x1,x2) weight: 0 plus(x1,x2) weight: (/ 1 8) + x1 #pred(x1) weight: 0 cons(x1,x2) weight: (/ 1 8) + x2 #if(x1,x2,x3) weight: 0 id(x1) weight: 0 #sum(x1) weight: x1 gt❆1_s(x1,x2) weight: (/ 1 4) + x2 not(x1) weight: (/ 1 8) app(x1,x2) weight: (/ 1 8) + x1 + x2 Usable rules: { 1..5 } Removed DPs: #1 Number of SCCs: 1, DPs: 3, edges: 9 SCC { #4 #12 #18 } Removing DPs: Order(PosReal,>,Sum)... Order(PosReal,>,Max)... succeeded. zero() weight: 0 s(x1) weight: (/ 5 16) + x1 gt(x1,x2) weight: max{0, (/ 1 16) + x2} #plus(x1,x2) weight: max{(/ 1 16) + x2, (/ 1 4) + x1} false() weight: (/ 1 16) #id(x1) weight: 0 true() weight: (/ 3 16) pred(x1) weight: 0 gt❆1_zero(x1) weight: 0 sum(x1) weight: 0 #not(x1) weight: 0 #gt❆1_zero(x1) weight: 0 0() weight: 0 if(x1,x2,x3) weight: max{0, x3, (/ 1 16) + x2} nil() weight: 0 #gt(x1,x2) weight: 0 #app(x1,x2) weight: 0 #gt❆1_s(x1,x2) weight: 0 plus(x1,x2) weight: 0 #pred(x1) weight: 0 cons(x1,x2) weight: 0 #if(x1,x2,x3) weight: 0 id(x1) weight: (/ 3 16) + x1 #sum(x1) weight: 0 gt❆1_s(x1,x2) weight: max{(/ 1 8) + x2, (/ 1 8) + x1} not(x1) weight: x1 app(x1,x2) weight: 0 Usable rules: { 13..15 } Removed DPs: #4 #18 Number of SCCs: 1, DPs: 1, edges: 1 SCC { #12 } Removing DPs: Order(PosReal,>,Sum)... succeeded. zero() weight: 0 s(x1) weight: (/ 3 8) gt(x1,x2) weight: (/ 1 4) + x2 #plus(x1,x2) weight: x1 false() weight: 0 #id(x1) weight: 0 true() weight: 0 pred(x1) weight: 0 gt❆1_zero(x1) weight: (/ 3 8) sum(x1) weight: (/ 1 8) #not(x1) weight: 0 #gt❆1_zero(x1) weight: 0 0() weight: 0 if(x1,x2,x3) weight: (/ 1 4) + x2 + x3 nil() weight: 0 #gt(x1,x2) weight: 0 #app(x1,x2) weight: 0 #gt❆1_s(x1,x2) weight: 0 plus(x1,x2) weight: (/ 1 8) + x1 #pred(x1) weight: 0 cons(x1,x2) weight: (/ 1 8) + x2 #if(x1,x2,x3) weight: 0 id(x1) weight: (/ 1 8) + x1 #sum(x1) weight: x1 gt❆1_s(x1,x2) weight: (/ 1 8) not(x1) weight: (/ 1 8) app(x1,x2) weight: (/ 1 8) + x1 + x2 Usable rules: { 14 15 } Removed DPs: #12 Number of SCCs: 0, DPs: 0, edges: 0 YES