Input TRS: 1: sort(l) -> st(0,l) 2: st(n,l) -> cond1(member(n,l),n,l) 3: cond1(true,n,l) -> cons(n,st(s(n),l)) 4: cond1(false,n,l) -> cond2(gt(n,max(l)),n,l) 5: cond2(true,n,l) -> nil 6: cond2(false,n,l) -> st(s(n),l) 7: member(n,nil) -> false 8: member(n,cons(m,l)) -> or(equal(n,m),member(n,l)) 9: or(x,true) -> true 10: or(x,false) -> x 11: equal(0,0) -> true 12: equal(s(x),0) -> false 13: equal(0,s(y)) -> false 14: equal(s(x),s(y)) -> equal(x,y) 15: gt(0,v) -> false 16: gt(s(u),0) -> true 17: gt(s(u),s(v)) -> gt(u,v) 18: max(nil) -> 0 19: max(cons(u,l)) -> if(gt(u,max(l)),u,max(l)) 20: if(true,u,v) -> u 21: if(false,u,v) -> v Dependency Pairs: #1: #sort(l) -> #st(0,l) #2: #st(n,l) -> #cond1(member(n,l),n,l) #3: #st(n,l) -> #member(n,l) #4: #cond1(true,n,l) -> #st(s(n),l) #5: #cond1(false,n,l) -> #cond2(gt(n,max(l)),n,l) #6: #cond1(false,n,l) -> #gt(n,max(l)) #7: #cond1(false,n,l) -> #max(l) #8: #cond2(false,n,l) -> #st(s(n),l) #9: #member(n,cons(m,l)) -> #or(equal(n,m),member(n,l)) #10: #member(n,cons(m,l)) -> #equal(n,m) #11: #member(n,cons(m,l)) -> #member(n,l) #12: #equal(s(x),s(y)) -> #equal(x,y) #13: #gt(s(u),s(v)) -> #gt(u,v) #14: #max(cons(u,l)) -> #if(gt(u,max(l)),u,max(l)) #15: #max(cons(u,l)) -> #gt(u,max(l)) #16: #max(cons(u,l)) -> #max(l) #17: #max(cons(u,l)) -> #max(l) Number of SCCs: 5 SCC { #12 } QKBOS(sum)... removes: #12 I(s) = 1 + x1 \pi(s) = [1] I(#equal) = x1 + x2 \pi(#equal) = [2,1] PREC: #equal > s USABLE RULES: { } Number of SCCs: 4 SCC { #11 } QKBOS(sum)... removes: #11 I(cons) = 1 + x2 \pi(cons) = [2] I(#member) = 2 + x2 \pi(#member) = [2] PREC: #member > cons USABLE RULES: { } Number of SCCs: 3 SCC { #13 } QKBOS(sum)... removes: #13 I(s) = 1 + x1 \pi(s) = [1] I(#gt) = x1 + x2 \pi(#gt) = [2,1] PREC: #gt > s USABLE RULES: { } Number of SCCs: 2 SCC { #16 #17 } QKBOS(sum)... removes: #16 #17 I(#max) = x1 \pi(#max) = 1 I(cons) = x2 \pi(cons) = [2] PREC: cons USABLE RULES: { } Number of SCCs: 1 SCC { #2 #4 #5 #8 } QKBOS(sum)... failed.