YES We show the termination of the TRS R: |0|(|#|()) -> |#|() +(x,|#|()) -> x +(|#|(),x) -> x +(|0|(x),|0|(y)) -> |0|(+(x,y)) +(|0|(x),|1|(y)) -> |1|(+(x,y)) +(|1|(x),|0|(y)) -> |1|(+(x,y)) +(|1|(x),|1|(y)) -> |0|(+(+(x,y),|1|(|#|()))) *(|#|(),x) -> |#|() *(|0|(x),y) -> |0|(*(x,y)) *(|1|(x),y) -> +(|0|(*(x,y)),y) sum(nil()) -> |0|(|#|()) sum(cons(x,l)) -> +(x,sum(l)) prod(nil()) -> |1|(|#|()) prod(cons(x,l)) -> *(x,prod(l)) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: +#(|0|(x),|0|(y)) -> |0|#(+(x,y)) p2: +#(|0|(x),|0|(y)) -> +#(x,y) p3: +#(|0|(x),|1|(y)) -> +#(x,y) p4: +#(|1|(x),|0|(y)) -> +#(x,y) p5: +#(|1|(x),|1|(y)) -> |0|#(+(+(x,y),|1|(|#|()))) p6: +#(|1|(x),|1|(y)) -> +#(+(x,y),|1|(|#|())) p7: +#(|1|(x),|1|(y)) -> +#(x,y) p8: *#(|0|(x),y) -> |0|#(*(x,y)) p9: *#(|0|(x),y) -> *#(x,y) p10: *#(|1|(x),y) -> +#(|0|(*(x,y)),y) p11: *#(|1|(x),y) -> |0|#(*(x,y)) p12: *#(|1|(x),y) -> *#(x,y) p13: sum#(nil()) -> |0|#(|#|()) p14: sum#(cons(x,l)) -> +#(x,sum(l)) p15: sum#(cons(x,l)) -> sum#(l) p16: prod#(cons(x,l)) -> *#(x,prod(l)) p17: prod#(cons(x,l)) -> prod#(l) and R consists of: r1: |0|(|#|()) -> |#|() r2: +(x,|#|()) -> x r3: +(|#|(),x) -> x r4: +(|0|(x),|0|(y)) -> |0|(+(x,y)) r5: +(|0|(x),|1|(y)) -> |1|(+(x,y)) r6: +(|1|(x),|0|(y)) -> |1|(+(x,y)) r7: +(|1|(x),|1|(y)) -> |0|(+(+(x,y),|1|(|#|()))) r8: *(|#|(),x) -> |#|() r9: *(|0|(x),y) -> |0|(*(x,y)) r10: *(|1|(x),y) -> +(|0|(*(x,y)),y) r11: sum(nil()) -> |0|(|#|()) r12: sum(cons(x,l)) -> +(x,sum(l)) r13: prod(nil()) -> |1|(|#|()) r14: prod(cons(x,l)) -> *(x,prod(l)) The estimated dependency graph contains the following SCCs: {p15} {p17} {p9, p12} {p2, p3, p4, p6, p7} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: sum#(cons(x,l)) -> sum#(l) and R consists of: r1: |0|(|#|()) -> |#|() r2: +(x,|#|()) -> x r3: +(|#|(),x) -> x r4: +(|0|(x),|0|(y)) -> |0|(+(x,y)) r5: +(|0|(x),|1|(y)) -> |1|(+(x,y)) r6: +(|1|(x),|0|(y)) -> |1|(+(x,y)) r7: +(|1|(x),|1|(y)) -> |0|(+(+(x,y),|1|(|#|()))) r8: *(|#|(),x) -> |#|() r9: *(|0|(x),y) -> |0|(*(x,y)) r10: *(|1|(x),y) -> +(|0|(*(x,y)),y) r11: sum(nil()) -> |0|(|#|()) r12: sum(cons(x,l)) -> +(x,sum(l)) r13: prod(nil()) -> |1|(|#|()) r14: prod(cons(x,l)) -> *(x,prod(l)) The set of usable rules consists of (no rules) Take the reduction pair: weighted path order base order: matrix interpretations: carrier: N^2 order: standard order interpretations: sum#_A(x1) = x1 + (1,1) cons_A(x1,x2) = ((1,1),(1,1)) x1 + x2 + (2,1) precedence: cons > sum# partial status: pi(sum#) = [1] pi(cons) = [2] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: prod#(cons(x,l)) -> prod#(l) and R consists of: r1: |0|(|#|()) -> |#|() r2: +(x,|#|()) -> x r3: +(|#|(),x) -> x r4: +(|0|(x),|0|(y)) -> |0|(+(x,y)) r5: +(|0|(x),|1|(y)) -> |1|(+(x,y)) r6: +(|1|(x),|0|(y)) -> |1|(+(x,y)) r7: +(|1|(x),|1|(y)) -> |0|(+(+(x,y),|1|(|#|()))) r8: *(|#|(),x) -> |#|() r9: *(|0|(x),y) -> |0|(*(x,y)) r10: *(|1|(x),y) -> +(|0|(*(x,y)),y) r11: sum(nil()) -> |0|(|#|()) r12: sum(cons(x,l)) -> +(x,sum(l)) r13: prod(nil()) -> |1|(|#|()) r14: prod(cons(x,l)) -> *(x,prod(l)) The set of usable rules consists of (no rules) Take the reduction pair: weighted path order base order: matrix interpretations: carrier: N^2 order: standard order interpretations: prod#_A(x1) = x1 + (1,1) cons_A(x1,x2) = ((1,1),(1,1)) x1 + x2 + (2,1) precedence: cons > prod# partial status: pi(prod#) = [1] pi(cons) = [2] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: *#(|1|(x),y) -> *#(x,y) p2: *#(|0|(x),y) -> *#(x,y) and R consists of: r1: |0|(|#|()) -> |#|() r2: +(x,|#|()) -> x r3: +(|#|(),x) -> x r4: +(|0|(x),|0|(y)) -> |0|(+(x,y)) r5: +(|0|(x),|1|(y)) -> |1|(+(x,y)) r6: +(|1|(x),|0|(y)) -> |1|(+(x,y)) r7: +(|1|(x),|1|(y)) -> |0|(+(+(x,y),|1|(|#|()))) r8: *(|#|(),x) -> |#|() r9: *(|0|(x),y) -> |0|(*(x,y)) r10: *(|1|(x),y) -> +(|0|(*(x,y)),y) r11: sum(nil()) -> |0|(|#|()) r12: sum(cons(x,l)) -> +(x,sum(l)) r13: prod(nil()) -> |1|(|#|()) r14: prod(cons(x,l)) -> *(x,prod(l)) The set of usable rules consists of (no rules) Take the reduction pair: weighted path order base order: matrix interpretations: carrier: N^2 order: standard order interpretations: *#_A(x1,x2) = ((1,1),(0,0)) x1 + x2 + (2,2) |1|_A(x1) = x1 + (1,1) |0|_A(x1) = ((0,0),(1,1)) x1 + (1,1) precedence: *# = |1| = |0| partial status: pi(*#) = [] pi(|1|) = [] pi(|0|) = [] The next rules are strictly ordered: p1 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: *#(|0|(x),y) -> *#(x,y) and R consists of: r1: |0|(|#|()) -> |#|() r2: +(x,|#|()) -> x r3: +(|#|(),x) -> x r4: +(|0|(x),|0|(y)) -> |0|(+(x,y)) r5: +(|0|(x),|1|(y)) -> |1|(+(x,y)) r6: +(|1|(x),|0|(y)) -> |1|(+(x,y)) r7: +(|1|(x),|1|(y)) -> |0|(+(+(x,y),|1|(|#|()))) r8: *(|#|(),x) -> |#|() r9: *(|0|(x),y) -> |0|(*(x,y)) r10: *(|1|(x),y) -> +(|0|(*(x,y)),y) r11: sum(nil()) -> |0|(|#|()) r12: sum(cons(x,l)) -> +(x,sum(l)) r13: prod(nil()) -> |1|(|#|()) r14: prod(cons(x,l)) -> *(x,prod(l)) The estimated dependency graph contains the following SCCs: {p1} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: *#(|0|(x),y) -> *#(x,y) and R consists of: r1: |0|(|#|()) -> |#|() r2: +(x,|#|()) -> x r3: +(|#|(),x) -> x r4: +(|0|(x),|0|(y)) -> |0|(+(x,y)) r5: +(|0|(x),|1|(y)) -> |1|(+(x,y)) r6: +(|1|(x),|0|(y)) -> |1|(+(x,y)) r7: +(|1|(x),|1|(y)) -> |0|(+(+(x,y),|1|(|#|()))) r8: *(|#|(),x) -> |#|() r9: *(|0|(x),y) -> |0|(*(x,y)) r10: *(|1|(x),y) -> +(|0|(*(x,y)),y) r11: sum(nil()) -> |0|(|#|()) r12: sum(cons(x,l)) -> +(x,sum(l)) r13: prod(nil()) -> |1|(|#|()) r14: prod(cons(x,l)) -> *(x,prod(l)) The set of usable rules consists of (no rules) Take the reduction pair: weighted path order base order: matrix interpretations: carrier: N^2 order: standard order interpretations: *#_A(x1,x2) = ((1,1),(1,1)) x1 + x2 + (2,2) |0|_A(x1) = x1 + (1,1) precedence: *# = |0| partial status: pi(*#) = [] pi(|0|) = [1] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: +#(|0|(x),|0|(y)) -> +#(x,y) p2: +#(|1|(x),|1|(y)) -> +#(x,y) p3: +#(|1|(x),|1|(y)) -> +#(+(x,y),|1|(|#|())) p4: +#(|0|(x),|1|(y)) -> +#(x,y) p5: +#(|1|(x),|0|(y)) -> +#(x,y) and R consists of: r1: |0|(|#|()) -> |#|() r2: +(x,|#|()) -> x r3: +(|#|(),x) -> x r4: +(|0|(x),|0|(y)) -> |0|(+(x,y)) r5: +(|0|(x),|1|(y)) -> |1|(+(x,y)) r6: +(|1|(x),|0|(y)) -> |1|(+(x,y)) r7: +(|1|(x),|1|(y)) -> |0|(+(+(x,y),|1|(|#|()))) r8: *(|#|(),x) -> |#|() r9: *(|0|(x),y) -> |0|(*(x,y)) r10: *(|1|(x),y) -> +(|0|(*(x,y)),y) r11: sum(nil()) -> |0|(|#|()) r12: sum(cons(x,l)) -> +(x,sum(l)) r13: prod(nil()) -> |1|(|#|()) r14: prod(cons(x,l)) -> *(x,prod(l)) The set of usable rules consists of r1, r2, r3, r4, r5, r6, r7 Take the reduction pair: weighted path order base order: matrix interpretations: carrier: N^2 order: standard order interpretations: +#_A(x1,x2) = ((0,1),(1,1)) x1 + ((1,0),(1,0)) x2 + (4,6) |0|_A(x1) = ((1,1),(0,1)) x1 + (3,1) |1|_A(x1) = ((1,1),(0,1)) x1 + (20,5) +_A(x1,x2) = x1 + x2 + (4,2) |#|_A() = (1,1) precedence: |0| = + > |#| > |1| > +# partial status: pi(+#) = [] pi(|0|) = [] pi(|1|) = [] pi(+) = [] pi(|#|) = [] The next rules are strictly ordered: p5 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: +#(|0|(x),|0|(y)) -> +#(x,y) p2: +#(|1|(x),|1|(y)) -> +#(x,y) p3: +#(|1|(x),|1|(y)) -> +#(+(x,y),|1|(|#|())) p4: +#(|0|(x),|1|(y)) -> +#(x,y) and R consists of: r1: |0|(|#|()) -> |#|() r2: +(x,|#|()) -> x r3: +(|#|(),x) -> x r4: +(|0|(x),|0|(y)) -> |0|(+(x,y)) r5: +(|0|(x),|1|(y)) -> |1|(+(x,y)) r6: +(|1|(x),|0|(y)) -> |1|(+(x,y)) r7: +(|1|(x),|1|(y)) -> |0|(+(+(x,y),|1|(|#|()))) r8: *(|#|(),x) -> |#|() r9: *(|0|(x),y) -> |0|(*(x,y)) r10: *(|1|(x),y) -> +(|0|(*(x,y)),y) r11: sum(nil()) -> |0|(|#|()) r12: sum(cons(x,l)) -> +(x,sum(l)) r13: prod(nil()) -> |1|(|#|()) r14: prod(cons(x,l)) -> *(x,prod(l)) The estimated dependency graph contains the following SCCs: {p1, p2, p3, p4} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: +#(|0|(x),|0|(y)) -> +#(x,y) p2: +#(|0|(x),|1|(y)) -> +#(x,y) p3: +#(|1|(x),|1|(y)) -> +#(+(x,y),|1|(|#|())) p4: +#(|1|(x),|1|(y)) -> +#(x,y) and R consists of: r1: |0|(|#|()) -> |#|() r2: +(x,|#|()) -> x r3: +(|#|(),x) -> x r4: +(|0|(x),|0|(y)) -> |0|(+(x,y)) r5: +(|0|(x),|1|(y)) -> |1|(+(x,y)) r6: +(|1|(x),|0|(y)) -> |1|(+(x,y)) r7: +(|1|(x),|1|(y)) -> |0|(+(+(x,y),|1|(|#|()))) r8: *(|#|(),x) -> |#|() r9: *(|0|(x),y) -> |0|(*(x,y)) r10: *(|1|(x),y) -> +(|0|(*(x,y)),y) r11: sum(nil()) -> |0|(|#|()) r12: sum(cons(x,l)) -> +(x,sum(l)) r13: prod(nil()) -> |1|(|#|()) r14: prod(cons(x,l)) -> *(x,prod(l)) The set of usable rules consists of r1, r2, r3, r4, r5, r6, r7 Take the reduction pair: weighted path order base order: matrix interpretations: carrier: N^2 order: standard order interpretations: +#_A(x1,x2) = ((0,0),(1,0)) x1 + ((1,0),(1,0)) x2 + (3,3) |0|_A(x1) = ((1,1),(0,0)) x1 + (4,1) |1|_A(x1) = ((1,1),(0,0)) x1 + (18,2) +_A(x1,x2) = x1 + x2 + (5,3) |#|_A() = (0,0) precedence: |0| = + > |#| > +# = |1| partial status: pi(+#) = [] pi(|0|) = [] pi(|1|) = [] pi(+) = [] pi(|#|) = [] The next rules are strictly ordered: p4 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: +#(|0|(x),|0|(y)) -> +#(x,y) p2: +#(|0|(x),|1|(y)) -> +#(x,y) p3: +#(|1|(x),|1|(y)) -> +#(+(x,y),|1|(|#|())) and R consists of: r1: |0|(|#|()) -> |#|() r2: +(x,|#|()) -> x r3: +(|#|(),x) -> x r4: +(|0|(x),|0|(y)) -> |0|(+(x,y)) r5: +(|0|(x),|1|(y)) -> |1|(+(x,y)) r6: +(|1|(x),|0|(y)) -> |1|(+(x,y)) r7: +(|1|(x),|1|(y)) -> |0|(+(+(x,y),|1|(|#|()))) r8: *(|#|(),x) -> |#|() r9: *(|0|(x),y) -> |0|(*(x,y)) r10: *(|1|(x),y) -> +(|0|(*(x,y)),y) r11: sum(nil()) -> |0|(|#|()) r12: sum(cons(x,l)) -> +(x,sum(l)) r13: prod(nil()) -> |1|(|#|()) r14: prod(cons(x,l)) -> *(x,prod(l)) The estimated dependency graph contains the following SCCs: {p1, p2, p3} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: +#(|0|(x),|0|(y)) -> +#(x,y) p2: +#(|1|(x),|1|(y)) -> +#(+(x,y),|1|(|#|())) p3: +#(|0|(x),|1|(y)) -> +#(x,y) and R consists of: r1: |0|(|#|()) -> |#|() r2: +(x,|#|()) -> x r3: +(|#|(),x) -> x r4: +(|0|(x),|0|(y)) -> |0|(+(x,y)) r5: +(|0|(x),|1|(y)) -> |1|(+(x,y)) r6: +(|1|(x),|0|(y)) -> |1|(+(x,y)) r7: +(|1|(x),|1|(y)) -> |0|(+(+(x,y),|1|(|#|()))) r8: *(|#|(),x) -> |#|() r9: *(|0|(x),y) -> |0|(*(x,y)) r10: *(|1|(x),y) -> +(|0|(*(x,y)),y) r11: sum(nil()) -> |0|(|#|()) r12: sum(cons(x,l)) -> +(x,sum(l)) r13: prod(nil()) -> |1|(|#|()) r14: prod(cons(x,l)) -> *(x,prod(l)) The set of usable rules consists of r1, r2, r3, r4, r5, r6, r7 Take the reduction pair: weighted path order base order: matrix interpretations: carrier: N^2 order: standard order interpretations: +#_A(x1,x2) = ((0,1),(1,1)) x1 + ((1,0),(1,0)) x2 + (5,3) |0|_A(x1) = ((1,1),(0,1)) x1 + (0,1) |1|_A(x1) = ((1,1),(0,1)) x1 + (4,2) +_A(x1,x2) = x1 + x2 + (1,0) |#|_A() = (0,0) precedence: +# = |1| = + > |0| = |#| partial status: pi(+#) = [] pi(|0|) = [] pi(|1|) = [] pi(+) = [] pi(|#|) = [] The next rules are strictly ordered: p3 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: +#(|0|(x),|0|(y)) -> +#(x,y) p2: +#(|1|(x),|1|(y)) -> +#(+(x,y),|1|(|#|())) and R consists of: r1: |0|(|#|()) -> |#|() r2: +(x,|#|()) -> x r3: +(|#|(),x) -> x r4: +(|0|(x),|0|(y)) -> |0|(+(x,y)) r5: +(|0|(x),|1|(y)) -> |1|(+(x,y)) r6: +(|1|(x),|0|(y)) -> |1|(+(x,y)) r7: +(|1|(x),|1|(y)) -> |0|(+(+(x,y),|1|(|#|()))) r8: *(|#|(),x) -> |#|() r9: *(|0|(x),y) -> |0|(*(x,y)) r10: *(|1|(x),y) -> +(|0|(*(x,y)),y) r11: sum(nil()) -> |0|(|#|()) r12: sum(cons(x,l)) -> +(x,sum(l)) r13: prod(nil()) -> |1|(|#|()) r14: prod(cons(x,l)) -> *(x,prod(l)) The estimated dependency graph contains the following SCCs: {p1} {p2} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: +#(|0|(x),|0|(y)) -> +#(x,y) and R consists of: r1: |0|(|#|()) -> |#|() r2: +(x,|#|()) -> x r3: +(|#|(),x) -> x r4: +(|0|(x),|0|(y)) -> |0|(+(x,y)) r5: +(|0|(x),|1|(y)) -> |1|(+(x,y)) r6: +(|1|(x),|0|(y)) -> |1|(+(x,y)) r7: +(|1|(x),|1|(y)) -> |0|(+(+(x,y),|1|(|#|()))) r8: *(|#|(),x) -> |#|() r9: *(|0|(x),y) -> |0|(*(x,y)) r10: *(|1|(x),y) -> +(|0|(*(x,y)),y) r11: sum(nil()) -> |0|(|#|()) r12: sum(cons(x,l)) -> +(x,sum(l)) r13: prod(nil()) -> |1|(|#|()) r14: prod(cons(x,l)) -> *(x,prod(l)) The set of usable rules consists of (no rules) Take the reduction pair: weighted path order base order: matrix interpretations: carrier: N^2 order: standard order interpretations: +#_A(x1,x2) = ((0,1),(0,0)) x1 + ((0,1),(0,0)) x2 + (2,2) |0|_A(x1) = ((0,0),(0,1)) x1 + (1,1) precedence: +# = |0| partial status: pi(+#) = [] pi(|0|) = [] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: +#(|1|(x),|1|(y)) -> +#(+(x,y),|1|(|#|())) and R consists of: r1: |0|(|#|()) -> |#|() r2: +(x,|#|()) -> x r3: +(|#|(),x) -> x r4: +(|0|(x),|0|(y)) -> |0|(+(x,y)) r5: +(|0|(x),|1|(y)) -> |1|(+(x,y)) r6: +(|1|(x),|0|(y)) -> |1|(+(x,y)) r7: +(|1|(x),|1|(y)) -> |0|(+(+(x,y),|1|(|#|()))) r8: *(|#|(),x) -> |#|() r9: *(|0|(x),y) -> |0|(*(x,y)) r10: *(|1|(x),y) -> +(|0|(*(x,y)),y) r11: sum(nil()) -> |0|(|#|()) r12: sum(cons(x,l)) -> +(x,sum(l)) r13: prod(nil()) -> |1|(|#|()) r14: prod(cons(x,l)) -> *(x,prod(l)) The set of usable rules consists of r1, r2, r3, r4, r5, r6, r7 Take the reduction pair: weighted path order base order: matrix interpretations: carrier: N^2 order: standard order interpretations: +#_A(x1,x2) = ((1,0),(0,0)) x1 + ((1,0),(0,0)) x2 + (0,17) |1|_A(x1) = ((1,0),(1,1)) x1 + (5,16) +_A(x1,x2) = x1 + ((1,0),(1,1)) x2 + (2,2) |#|_A() = (1,1) |0|_A(x1) = ((1,0),(1,1)) x1 + (1,1) precedence: |1| = + = |#| = |0| > +# partial status: pi(+#) = [] pi(|1|) = [] pi(+) = [] pi(|#|) = [] pi(|0|) = [] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains.