Input TRS: 1: 0(#) -> # 2: +(x,#) -> x 3: +(#,x) -> x 4: +(0(x),0(y)) -> 0(+(x,y)) 5: +(0(x),1(y)) -> 1(+(x,y)) 6: +(1(x),0(y)) -> 1(+(x,y)) 7: +(1(x),1(y)) -> 0(+(+(x,y),1(#))) 8: +(+(x,y),z) -> +(x,+(y,z)) 9: -(#,x) -> # 10: -(x,#) -> x 11: -(0(x),0(y)) -> 0(-(x,y)) 12: -(0(x),1(y)) -> 1(-(-(x,y),1(#))) 13: -(1(x),0(y)) -> 1(-(x,y)) 14: -(1(x),1(y)) -> 0(-(x,y)) 15: not(true) -> false 16: not(false) -> true 17: if(true,x,y) -> x 18: if(false,x,y) -> y 19: eq(#,#) -> true 20: eq(#,1(y)) -> false 21: eq(1(x),#) -> false 22: eq(#,0(y)) -> eq(#,y) 23: eq(0(x),#) -> eq(x,#) 24: eq(1(x),1(y)) -> eq(x,y) 25: eq(0(x),1(y)) -> false 26: eq(1(x),0(y)) -> false 27: eq(0(x),0(y)) -> eq(x,y) 28: ge(0(x),0(y)) -> ge(x,y) 29: ge(0(x),1(y)) -> not(ge(y,x)) 30: ge(1(x),0(y)) -> ge(x,y) 31: ge(1(x),1(y)) -> ge(x,y) 32: ge(x,#) -> true 33: ge(#,0(x)) -> ge(#,x) 34: ge(#,1(x)) -> false 35: log(x) -> -(log'(x),1(#)) 36: log'(#) -> # 37: log'(1(x)) -> +(log'(x),1(#)) 38: log'(0(x)) -> if(ge(x,1(#)),+(log'(x),1(#)),#) 39: *(#,x) -> # 40: *(0(x),y) -> 0(*(x,y)) 41: *(1(x),y) -> +(0(*(x,y)),y) 42: *(*(x,y),z) -> *(x,*(y,z)) 43: *(x,+(y,z)) -> +(*(x,y),*(x,z)) 44: app(nil,l) -> l 45: app(cons(x,l1),l2) -> cons(x,app(l1,l2)) 46: sum(nil) -> 0(#) 47: sum(cons(x,l)) -> +(x,sum(l)) 48: sum(app(l1,l2)) -> +(sum(l1),sum(l2)) 49: prod(nil) -> 1(#) 50: prod(cons(x,l)) -> *(x,prod(l)) 51: prod(app(l1,l2)) -> *(prod(l1),prod(l2)) 52: mem(x,nil) -> false 53: mem(x,cons(y,l)) -> if(eq(x,y),true,mem(x,l)) 54: inter(x,nil) -> nil 55: inter(nil,x) -> nil 56: inter(app(l1,l2),l3) -> app(inter(l1,l3),inter(l2,l3)) 57: inter(l1,app(l2,l3)) -> app(inter(l1,l2),inter(l1,l3)) 58: inter(cons(x,l1),l2) -> ifinter(mem(x,l2),x,l1,l2) 59: inter(l1,cons(x,l2)) -> ifinter(mem(x,l1),x,l2,l1) 60: ifinter(true,x,l1,l2) -> cons(x,inter(l1,l2)) 61: ifinter(false,x,l1,l2) -> inter(l1,l2) Dependency Pairs: #1: #+(0(x),0(y)) -> #0(+(x,y)) #2: #+(0(x),0(y)) -> #+(x,y) #3: #+(0(x),1(y)) -> #+(x,y) #4: #+(1(x),0(y)) -> #+(x,y) #5: #+(1(x),1(y)) -> #0(+(+(x,y),1(#))) #6: #+(1(x),1(y)) -> #+(+(x,y),1(#)) #7: #+(1(x),1(y)) -> #+(x,y) #8: #+(+(x,y),z) -> #+(x,+(y,z)) #9: #+(+(x,y),z) -> #+(y,z) #10: #-(0(x),0(y)) -> #0(-(x,y)) #11: #-(0(x),0(y)) -> #-(x,y) #12: #-(0(x),1(y)) -> #-(-(x,y),1(#)) #13: #-(0(x),1(y)) -> #-(x,y) #14: #-(1(x),0(y)) -> #-(x,y) #15: #-(1(x),1(y)) -> #0(-(x,y)) #16: #-(1(x),1(y)) -> #-(x,y) #17: #eq(#,0(y)) -> #eq(#,y) #18: #eq(0(x),#) -> #eq(x,#) #19: #eq(1(x),1(y)) -> #eq(x,y) #20: #eq(0(x),0(y)) -> #eq(x,y) #21: #ge(0(x),0(y)) -> #ge(x,y) #22: #ge(0(x),1(y)) -> #not(ge(y,x)) #23: #ge(0(x),1(y)) -> #ge(y,x) #24: #ge(1(x),0(y)) -> #ge(x,y) #25: #ge(1(x),1(y)) -> #ge(x,y) #26: #ge(#,0(x)) -> #ge(#,x) #27: #log(x) -> #-(log'(x),1(#)) #28: #log(x) -> #log'(x) #29: #log'(1(x)) -> #+(log'(x),1(#)) #30: #log'(1(x)) -> #log'(x) #31: #log'(0(x)) -> #if(ge(x,1(#)),+(log'(x),1(#)),#) #32: #log'(0(x)) -> #ge(x,1(#)) #33: #log'(0(x)) -> #+(log'(x),1(#)) #34: #log'(0(x)) -> #log'(x) #35: #*(0(x),y) -> #0(*(x,y)) #36: #*(0(x),y) -> #*(x,y) #37: #*(1(x),y) -> #+(0(*(x,y)),y) #38: #*(1(x),y) -> #0(*(x,y)) #39: #*(1(x),y) -> #*(x,y) #40: #*(*(x,y),z) -> #*(x,*(y,z)) #41: #*(*(x,y),z) -> #*(y,z) #42: #*(x,+(y,z)) -> #+(*(x,y),*(x,z)) #43: #*(x,+(y,z)) -> #*(x,y) #44: #*(x,+(y,z)) -> #*(x,z) #45: #app(cons(x,l1),l2) -> #app(l1,l2) #46: #sum(nil) -> #0(#) #47: #sum(cons(x,l)) -> #+(x,sum(l)) #48: #sum(cons(x,l)) -> #sum(l) #49: #sum(app(l1,l2)) -> #+(sum(l1),sum(l2)) #50: #sum(app(l1,l2)) -> #sum(l1) #51: #sum(app(l1,l2)) -> #sum(l2) #52: #prod(cons(x,l)) -> #*(x,prod(l)) #53: #prod(cons(x,l)) -> #prod(l) #54: #prod(app(l1,l2)) -> #*(prod(l1),prod(l2)) #55: #prod(app(l1,l2)) -> #prod(l1) #56: #prod(app(l1,l2)) -> #prod(l2) #57: #mem(x,cons(y,l)) -> #if(eq(x,y),true,mem(x,l)) #58: #mem(x,cons(y,l)) -> #eq(x,y) #59: #mem(x,cons(y,l)) -> #mem(x,l) #60: #inter(app(l1,l2),l3) -> #app(inter(l1,l3),inter(l2,l3)) #61: #inter(app(l1,l2),l3) -> #inter(l1,l3) #62: #inter(app(l1,l2),l3) -> #inter(l2,l3) #63: #inter(l1,app(l2,l3)) -> #app(inter(l1,l2),inter(l1,l3)) #64: #inter(l1,app(l2,l3)) -> #inter(l1,l2) #65: #inter(l1,app(l2,l3)) -> #inter(l1,l3) #66: #inter(cons(x,l1),l2) -> #ifinter(mem(x,l2),x,l1,l2) #67: #inter(cons(x,l1),l2) -> #mem(x,l2) #68: #inter(l1,cons(x,l2)) -> #ifinter(mem(x,l1),x,l2,l1) #69: #inter(l1,cons(x,l2)) -> #mem(x,l1) #70: #ifinter(true,x,l1,l2) -> #inter(l1,l2) #71: #ifinter(false,x,l1,l2) -> #inter(l1,l2) Number of SCCs: 14 SCC { #17 } QKBOPS(sum)... removes: #17 I(#) = 2 I(#eq) = 1 + x1 + x2 \pi(#eq) = [1] I(0) = 4 + x1 \pi(0) = [] PREC: 0 > #eq > # USABLE RULES: { } Number of SCCs: 13 SCC { #18 } QKBOPS(sum)... removes: #18 I(#) = 3 I(#eq) = 1 + x1 + x2 \pi(#eq) = [2] I(0) = 1 + x1 \pi(0) = [1] PREC: #eq > # > 0 USABLE RULES: { } Number of SCCs: 12 SCC { #26 } QKBOPS(sum)... removes: #26 I(#) = 2 I(#ge) = 1 + x1 + x2 \pi(#ge) = [1] I(0) = 4 + x1 \pi(0) = [] PREC: 0 > #ge > # USABLE RULES: { } Number of SCCs: 11 SCC { #45 } QKBOPS(sum)... removes: #45 I(cons) = 1 + x2 \pi(cons) = [2] I(#app) = 2 + x1 \pi(#app) = [] PREC: #app > cons USABLE RULES: { } Number of SCCs: 10 SCC { #59 } QKBOPS(sum)... removes: #59 I(#mem) = 1 + x2 \pi(#mem) = [] I(cons) = 1 + x2 \pi(cons) = [] PREC: #mem = cons USABLE RULES: { } Number of SCCs: 9 SCC { #19 #20 } QKBOPS(sum)... removes: #19 #20 I(#eq) = x1 + x2 \pi(#eq) = [] I(0) = 1 + x1 \pi(0) = [1] I(1) = 1 + x1 \pi(1) = [1] PREC: #eq > 1 > 0 USABLE RULES: { } Number of SCCs: 8 SCC { #30 #34 } QKBOPS(sum)... removes: #30 #34 I(#log') = x1 \pi(#log') = 1 I(0) = x1 \pi(0) = [1] I(1) = 1 + x1 \pi(1) = [] PREC: 0 = 1 USABLE RULES: { } Number of SCCs: 7 SCC { #48 #50 #51 } QKBOPS(sum)... removes: #50 #51 I(cons) = x2 \pi(cons) = 2 I(#sum) = x1 \pi(#sum) = 1 I(app) = x1 + x2 \pi(app) = [1] PREC: app USABLE RULES: { } Number of SCCs: 7 SCC { #48 } QKBOPS(sum)... removes: #48 I(cons) = x1 + x2 \pi(cons) = [2] I(#sum) = x1 \pi(#sum) = [] PREC: #sum > cons USABLE RULES: { } Number of SCCs: 6 SCC { #53 #55 #56 } QKBOPS(sum)... removes: #55 #56 I(cons) = x2 \pi(cons) = 2 I(#prod) = x1 \pi(#prod) = 1 I(app) = x1 + x2 \pi(app) = [1] PREC: app USABLE RULES: { } Number of SCCs: 6 SCC { #53 } QKBOPS(sum)... removes: #53 I(cons) = x1 + x2 \pi(cons) = [2] I(#prod) = x1 \pi(#prod) = [] PREC: #prod > cons USABLE RULES: { } Number of SCCs: 5 SCC { #21 #23 #24 #25 } QKBOPS(sum)... removes: #23 #24 #25 I(#ge) = 1 + x1 + x2 \pi(#ge) = [] I(0) = x1 \pi(0) = 1 I(1) = 1 + x1 \pi(1) = [] PREC: 1 > #ge USABLE RULES: { } Number of SCCs: 5 SCC { #21 } QKBOPS(sum)... removes: #21 I(#ge) = x1 + x2 \pi(#ge) = [] I(0) = 1 + x1 \pi(0) = [1] PREC: #ge > 0 USABLE RULES: { } Number of SCCs: 4 SCC { #11 #12 #13 #14 #16 } QKBOPS(sum)... removes: #11 #12 #13 #14 #16 I(#) = 1 I(#-) = -1 + x1 + x2 \pi(#-) = [2,1] I(-) = x1 \pi(-) = [] I(0) = 1 + x1 \pi(0) = [1] I(1) = 1 + x1 \pi(1) = [] PREC: 1 > # > 0 > #- > - USABLE RULES: { 14..9 1 } Number of SCCs: 3 SCC { #36 #39 #40 #41 #43 #44 } QKBOPS(sum)... removes: #40 #41 I(#*) = 2 + x1 \pi(#*) = [] I(#) = 2 I(*) = x1 + x2 \pi(*) = [] I(+) = x1 \pi(+) = [] I(0) = x1 \pi(0) = [] I(1) = x1 \pi(1) = [] PREC: # = * > #* = + > 1 > 0 USABLE RULES: { } Number of SCCs: 3 SCC { #36 #39 #43 #44 } QKBOPS(sum)... removes: #43 #44 I(#*) = x2 \pi(#*) = [2] I(+) = 1 + x1 + x2 \pi(+) = [2,1] I(0) = 2 \pi(0) = [] I(1) = x1 \pi(1) = 1 PREC: #* = + > 0 USABLE RULES: { } Number of SCCs: 3 SCC { #36 #39 } QKBOPS(sum)... removes: #36 I(#*) = 2 + x1 \pi(#*) = [1] I(0) = 1 + x1 \pi(0) = [] I(1) = x1 \pi(1) = 1 PREC: #* > 0 USABLE RULES: { } Number of SCCs: 3 SCC { #39 } QKBOPS(sum)... removes: #39 I(#*) = x1 + x2 \pi(#*) = [] I(1) = 1 + x1 \pi(1) = [1] PREC: #* > 1 USABLE RULES: { } Number of SCCs: 2 SCC { #2 #3 #4 #6 #7 #8 #9 } QKBOPS(sum)... removes: #3 #4 #6 #7 #9 I(#) = 1 I(#+) = 3 + x1 + x2 \pi(#+) = [1] I(+) = 1 + x1 + x2 \pi(+) = [] I(0) = x1 \pi(0) = 1 I(1) = 3 + x1 \pi(1) = [1] PREC: + > # = #+ = 1 USABLE RULES: { 8..1 } Number of SCCs: 2 SCC { #2 #8 } QKBOPS(sum)... removes: #2 I(#) = 2 I(#+) = 2 + x1 + x2 \pi(#+) = [1] I(+) = x1 + x2 \pi(+) = [] I(0) = 2 + x1 \pi(0) = [] I(1) = 4 + x1 \pi(1) = [1] PREC: # = + = 0 > #+ = 1 USABLE RULES: { 8..1 } Number of SCCs: 2 SCC { #8 } QKBOPS(sum)... removes: #8 I(#) = 1 I(#+) = x1 + x2 \pi(#+) = [1] I(+) = 1 + x1 + x2 \pi(+) = [] I(0) = 3 + x1 \pi(0) = [1] I(1) = 5 + x1 \pi(1) = [] PREC: + = 1 > # = #+ = 0 USABLE RULES: { 8..1 } Number of SCCs: 1 SCC { #61 #62 #64 #65 #66 #68 #70 #71 } QKBOPS(sum)... removes: #61 #62 #64 #65 #66 #68 #70 #71 I(#inter) = x1 + x2 \pi(#inter) = [1,2] I(mem) = x1 + x2 \pi(mem) = [2,1] I(#) = 1 I(cons) = 3 + x1 + x2 \pi(cons) = [] I(app) = 1 + x1 + x2 \pi(app) = [] I(false) = 1 I(0) = x1 \pi(0) = [] I(eq) = x1 \pi(eq) = [] I(1) = x1 \pi(1) = [] I(if) = 1 + x2 + x3 \pi(if) = [3,2] I(true) = 1 I(nil) = 1 I(#ifinter) = x2 + x3 + x4 \pi(#ifinter) = [3,4] PREC: cons = app = eq > false = if > #inter = mem = #ifinter > true > # > 0 = 1 = nil USABLE RULES: { 18 17 } Number of SCCs: 0