YES 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 POLO(bPol) ... failed. Uncurrying 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 POLO(bPol) ... 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 SCC { #28 } POLO(Sum)... succeeded. zero w: 0 s w: 0 gt w: 0 #gt^1_zero w: 0 #plus w: 0 false w: 0 #id w: 0 gt^1_zero w: 0 true w: 0 pred w: 0 sum w: 0 #not w: 0 0 w: 0 if w: 0 nil w: 0 #gt w: 0 #app w: x1 plus w: 0 #pred w: 0 cons w: x2 + 1 gt^1_s w: 0 #if w: 0 id w: 0 #sum w: 0 #gt^1_s w: 0 not w: 0 app w: 0 USABLE RULES: { } Removed DPs: #28 Number of SCCs: 4, DPs: 7 SCC { #23 } POLO(Sum)... succeeded. zero w: 1 s w: 0 gt w: x1 + 41064 #gt^1_zero w: 0 #plus w: 0 false w: 41067 #id w: 0 gt^1_zero w: x1 + 41066 true w: 49429 pred w: 0 sum w: 0 #not w: 0 0 w: 0 if w: x1 + 1 nil w: 0 #gt w: 0 #app w: 0 plus w: x2 + 38139 #pred w: 0 cons w: x1 + x2 + 38140 gt^1_s w: x1 + 41063 #if w: 0 id w: 1 #sum w: x1 #gt^1_s w: 0 not w: x1 app w: 0 USABLE RULES: { 9..12 } Removed DPs: #23 Number of SCCs: 3, DPs: 6 SCC { #25 #26 } POLO(Sum)... succeeded. zero w: 0 s w: x1 + 2 gt w: x1 + 4 #gt^1_zero w: 0 #plus w: 0 false w: 6 #id w: 0 gt^1_zero w: x1 + 5 true w: 8366 pred w: 0 sum w: 0 #not w: 0 0 w: 0 if w: x2 + x3 nil w: 0 #gt w: x2 + 1 #app w: 0 plus w: x1 + 36229 #pred w: 0 cons w: 38140 gt^1_s w: x1 + x2 + 1 #if w: 0 id w: 1 #sum w: x1 #gt^1_s w: x2 not w: x1 app w: 0 USABLE RULES: { 14 15 } Removed DPs: #25 #26 Number of SCCs: 2, DPs: 4 SCC { #1 } POLO(Sum)... succeeded. zero w: 0 s w: x1 + 2 gt w: x1 + 4 #gt^1_zero w: 0 #plus w: 0 false w: 6 #id w: 0 gt^1_zero w: x1 + 5 true w: 8366 pred w: 0 sum w: 13508 #not w: 0 0 w: 0 if w: x2 + x3 nil w: 1 #gt w: 1 #app w: 0 plus w: x1 + 11650 #pred w: 0 cons w: x2 + 13507 gt^1_s w: x1 + x2 + 1 #if w: 0 id w: 1 #sum w: x1 #gt^1_s w: 0 not w: x1 app w: x1 + x2 + 36718 USABLE RULES: { 1..5 14 15 } Removed DPs: #1 Number of SCCs: 1, DPs: 3 SCC { #4 #12 #18 } POLO(Sum)... POLO(max)... succeeded. zero w: 37636 s w: x1 + 37634 gt w: max(x1 + 37636, x2 + 1) #gt^1_zero w: 0 #plus w: max(x1 + 62900, x2 + 44083) false w: 0 #id w: 0 gt^1_zero w: 0 true w: 37637 pred w: 0 sum w: 0 #not w: 0 0 w: 0 if w: max(x2 + 18816, x3) nil w: 0 #gt w: 0 #app w: 0 plus w: 0 #pred w: 0 cons w: 0 gt^1_s w: max(x1 + 37636, x2 + 1) #if w: 0 id w: x1 #sum w: 0 #gt^1_s w: 0 not w: 37637 app w: 0 USABLE RULES: { 13..21 } Removed DPs: #4 #18 Number of SCCs: 1, DPs: 1 SCC { #12 } POLO(Sum)... succeeded. zero w: 1 s w: 0 gt w: 1 #gt^1_zero w: 0 #plus w: x1 false w: 1 #id w: 0 gt^1_zero w: 1 true w: 1 pred w: 0 sum w: 2 #not w: 0 0 w: 0 if w: x2 + x3 + 1 nil w: 1 #gt w: 1 #app w: 0 plus w: x2 + 1 #pred w: 0 cons w: x2 + 1 gt^1_s w: 1 #if w: 0 id w: x1 + 1 #sum w: x1 #gt^1_s w: 0 not w: 1 app w: x1 + x2 + 23744 USABLE RULES: { 1..5 13..15 17..21 } Removed DPs: #12 Number of SCCs: 0, DPs: 0