Input TRS: 1: if(true,x,y) -> x 2: if(false,x,y) -> y 3: eq(0,0) -> true 4: eq(0,s(x)) -> false 5: eq(s(x),0) -> false 6: eq(s(x),s(y)) -> eq(x,y) 7: app(nil,l) -> l 8: app(cons(x,l1),l2) -> cons(x,app(l1,l2)) 9: app(app(l1,l2),l3) -> app(l1,app(l2,l3)) 10: mem(x,nil) -> false 11: mem(x,cons(y,l)) -> ifmem(eq(x,y),x,l) 12: ifmem(true,x,l) -> true 13: ifmem(false,x,l) -> mem(x,l) 14: inter(x,nil) -> nil 15: inter(nil,x) -> nil 16: inter(app(l1,l2),l3) -> app(inter(l1,l3),inter(l2,l3)) 17: inter(l1,app(l2,l3)) -> app(inter(l1,l2),inter(l1,l3)) 18: inter(cons(x,l1),l2) -> ifinter(mem(x,l2),x,l1,l2) 19: inter(l1,cons(x,l2)) -> ifinter(mem(x,l1),x,l2,l1) 20: ifinter(true,x,l1,l2) -> cons(x,inter(l1,l2)) 21: ifinter(false,x,l1,l2) -> inter(l1,l2) Dependency Pairs: #1: #eq(s(x),s(y)) -> #eq(x,y) #2: #app(cons(x,l1),l2) -> #app(l1,l2) #3: #app(app(l1,l2),l3) -> #app(l1,app(l2,l3)) #4: #app(app(l1,l2),l3) -> #app(l2,l3) #5: #mem(x,cons(y,l)) -> #ifmem(eq(x,y),x,l) #6: #mem(x,cons(y,l)) -> #eq(x,y) #7: #ifmem(false,x,l) -> #mem(x,l) #8: #inter(app(l1,l2),l3) -> #app(inter(l1,l3),inter(l2,l3)) #9: #inter(app(l1,l2),l3) -> #inter(l1,l3) #10: #inter(app(l1,l2),l3) -> #inter(l2,l3) #11: #inter(l1,app(l2,l3)) -> #app(inter(l1,l2),inter(l1,l3)) #12: #inter(l1,app(l2,l3)) -> #inter(l1,l2) #13: #inter(l1,app(l2,l3)) -> #inter(l1,l3) #14: #inter(cons(x,l1),l2) -> #ifinter(mem(x,l2),x,l1,l2) #15: #inter(cons(x,l1),l2) -> #mem(x,l2) #16: #inter(l1,cons(x,l2)) -> #ifinter(mem(x,l1),x,l2,l1) #17: #inter(l1,cons(x,l2)) -> #mem(x,l1) #18: #ifinter(true,x,l1,l2) -> #inter(l1,l2) #19: #ifinter(false,x,l1,l2) -> #inter(l1,l2) Number of SCCs: 4 SCC { #1 } QKBOS(sum)... removes: #1 I(#eq) = 1 + x1 + x2 \pi(#eq) = [2,1] I(s) = x1 \pi(s) = [1] PREC: #eq = s USABLE RULES: { } Number of SCCs: 3 SCC { #5 #7 } QKBOS(sum)... removes: #5 I(#mem) = 3 + x2 \pi(#mem) = [2] I(cons) = x2 \pi(cons) = [2] I(#ifmem) = 3 + x3 \pi(#ifmem) = [3] I(false) = 3 I(0) = 3 I(eq) = 2 + x1 \pi(eq) = [1] I(true) = 3 I(s) = 3 \pi(s) = [] PREC: #mem = cons = #ifmem = eq > false = 0 = true = s USABLE RULES: { } Number of SCCs: 2 SCC { #2 #3 #4 } QKBOS(sum)... removes: #2 #3 #4 I(cons) = x1 + x2 \pi(cons) = [2,1] I(app) = 2 + x1 + x2 \pi(app) = [1,2] I(#app) = 3 + x1 + x2 \pi(#app) = [1,2] I(nil) = 1 PREC: app > cons = #app > nil USABLE RULES: { 9..7 } Number of SCCs: 1 SCC { #9 #10 #12 #13 #14 #16 #18 #19 } QKBOS(sum)... removes: #9 #10 #12 #13 #14 #16 #18 #19 I(#inter) = 2 + x1 + x2 \pi(#inter) = [2,1] I(mem) = x1 + x2 \pi(mem) = [1,2] I(cons) = 3 + x1 + x2 \pi(cons) = [1,2] I(app) = x1 + x2 \pi(app) = [2,1] I(false) = 3 I(0) = 3 I(eq) = 1 + x2 \pi(eq) = [2] I(true) = 3 I(s) = 3 \pi(s) = [] I(nil) = 3 I(#ifinter) = 4 + x3 + x4 \pi(#ifinter) = [4,3] I(ifmem) = 4 \pi(ifmem) = [] PREC: #inter = mem = #ifinter > app > cons > false = 0 = eq = true = s = nil = ifmem USABLE RULES: { } Number of SCCs: 0