Input TRS: 1: app(x,y) -> helpa(0,plus(length(x),length(y)),x,y) 2: plus(x,0) -> x 3: plus(x,s(y)) -> s(plus(x,y)) 4: length(nil) -> 0 5: length(cons(x,y)) -> s(length(y)) 6: helpa(c,l,ys,zs) -> if(ge(c,l),c,l,ys,zs) 7: ge(x,0) -> true 8: ge(0,s(x)) -> false 9: ge(s(x),s(y)) -> ge(x,y) 10: if(true,c,l,ys,zs) -> nil 11: if(false,c,l,ys,zs) -> helpb(c,l,ys,zs) 12: take(0,cons(x,xs),ys) -> x 13: take(0,nil,cons(y,ys)) -> y 14: take(s(c),cons(x,xs),ys) -> take(c,xs,ys) 15: take(s(c),nil,cons(y,ys)) -> take(c,nil,ys) 16: helpb(c,l,ys,zs) -> cons(take(c,ys,zs),helpa(s(c),l,ys,zs)) Dependency Pairs: #1: #app(x,y) -> #helpa(0,plus(length(x),length(y)),x,y) #2: #app(x,y) -> #plus(length(x),length(y)) #3: #app(x,y) -> #length(x) #4: #app(x,y) -> #length(y) #5: #plus(x,s(y)) -> #plus(x,y) #6: #length(cons(x,y)) -> #length(y) #7: #helpa(c,l,ys,zs) -> #if(ge(c,l),c,l,ys,zs) #8: #helpa(c,l,ys,zs) -> #ge(c,l) #9: #ge(s(x),s(y)) -> #ge(x,y) #10: #if(false,c,l,ys,zs) -> #helpb(c,l,ys,zs) #11: #take(s(c),cons(x,xs),ys) -> #take(c,xs,ys) #12: #take(s(c),nil,cons(y,ys)) -> #take(c,nil,ys) #13: #helpb(c,l,ys,zs) -> #take(c,ys,zs) #14: #helpb(c,l,ys,zs) -> #helpa(s(c),l,ys,zs) Number of SCCs: 5 SCC { #12 } QKBOPS(sum)... removes: #12 I(cons) = x1 + x2 \pi(cons) = [1] I(#take) = 2 + x3 \pi(#take) = [3] I(s) = x1 \pi(s) = [1] I(nil) = 5 PREC: s = nil > #take > cons USABLE RULES: { } Number of SCCs: 4 SCC { #9 } QKBOPS(sum)... removes: #9 I(#ge) = x1 + x2 \pi(#ge) = [] I(s) = 1 + x1 \pi(s) = [1] PREC: #ge > s USABLE RULES: { } Number of SCCs: 3 SCC { #5 } QKBOPS(sum)... removes: #5 I(#plus) = x1 + x2 \pi(#plus) = [] I(s) = 1 + x1 \pi(s) = [1] PREC: #plus > s USABLE RULES: { } Number of SCCs: 2 SCC { #6 } QKBOPS(sum)... removes: #6 I(#length) = x1 \pi(#length) = [] I(cons) = 1 + x2 \pi(cons) = [] PREC: #length = cons USABLE RULES: { } Number of SCCs: 1 SCC { #7 #10 #14 } QKBOPS(sum)... failed.