YES We show the termination of the TRS R: +(x,|0|()) -> x +(|0|(),x) -> x +(s(x),s(y)) -> s(s(+(x,y))) +(+(x,y),z) -> +(x,+(y,z)) *(x,|0|()) -> |0|() *(|0|(),x) -> |0|() *(s(x),s(y)) -> s(+(*(x,y),+(x,y))) *(*(x,y),z) -> *(x,*(y,z)) sum(nil()) -> |0|() sum(cons(x,l)) -> +(x,sum(l)) prod(nil()) -> s(|0|()) prod(cons(x,l)) -> *(x,prod(l)) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: +#(s(x),s(y)) -> +#(x,y) p2: +#(+(x,y),z) -> +#(x,+(y,z)) p3: +#(+(x,y),z) -> +#(y,z) p4: *#(s(x),s(y)) -> +#(*(x,y),+(x,y)) p5: *#(s(x),s(y)) -> *#(x,y) p6: *#(s(x),s(y)) -> +#(x,y) p7: *#(*(x,y),z) -> *#(x,*(y,z)) p8: *#(*(x,y),z) -> *#(y,z) p9: sum#(cons(x,l)) -> +#(x,sum(l)) p10: sum#(cons(x,l)) -> sum#(l) p11: prod#(cons(x,l)) -> *#(x,prod(l)) p12: prod#(cons(x,l)) -> prod#(l) and R consists of: r1: +(x,|0|()) -> x r2: +(|0|(),x) -> x r3: +(s(x),s(y)) -> s(s(+(x,y))) r4: +(+(x,y),z) -> +(x,+(y,z)) r5: *(x,|0|()) -> |0|() r6: *(|0|(),x) -> |0|() r7: *(s(x),s(y)) -> s(+(*(x,y),+(x,y))) r8: *(*(x,y),z) -> *(x,*(y,z)) r9: sum(nil()) -> |0|() r10: sum(cons(x,l)) -> +(x,sum(l)) r11: prod(nil()) -> s(|0|()) r12: prod(cons(x,l)) -> *(x,prod(l)) The estimated dependency graph contains the following SCCs: {p10} {p12} {p5, p7, p8} {p1, p2, p3} -- 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: +(x,|0|()) -> x r2: +(|0|(),x) -> x r3: +(s(x),s(y)) -> s(s(+(x,y))) r4: +(+(x,y),z) -> +(x,+(y,z)) r5: *(x,|0|()) -> |0|() r6: *(|0|(),x) -> |0|() r7: *(s(x),s(y)) -> s(+(*(x,y),+(x,y))) r8: *(*(x,y),z) -> *(x,*(y,z)) r9: sum(nil()) -> |0|() r10: sum(cons(x,l)) -> +(x,sum(l)) r11: prod(nil()) -> s(|0|()) r12: prod(cons(x,l)) -> *(x,prod(l)) The set of usable rules consists of r1, r5, r6 Take the reduction pair: generalized weighted path order (>=MG, >MG) base order 1: matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: sum#_A(x1) = x1 cons_A(x1,x2) = x2 + 3 +_A(x1,x2) = x1 + 4 |0|_A() = 1 *_A(x1,x2) = x1 + 8 base order 2: precedence: |0| > sum# = * > + > cons partial status: pi(sum#) = [] pi(cons) = [2] pi(+) = [] pi(|0|) = [] pi(*) = [] The following rules are removed: p1 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: +(x,|0|()) -> x r2: +(|0|(),x) -> x r3: +(s(x),s(y)) -> s(s(+(x,y))) r4: +(+(x,y),z) -> +(x,+(y,z)) r5: *(x,|0|()) -> |0|() r6: *(|0|(),x) -> |0|() r7: *(s(x),s(y)) -> s(+(*(x,y),+(x,y))) r8: *(*(x,y),z) -> *(x,*(y,z)) r9: sum(nil()) -> |0|() r10: sum(cons(x,l)) -> +(x,sum(l)) r11: prod(nil()) -> s(|0|()) r12: prod(cons(x,l)) -> *(x,prod(l)) The set of usable rules consists of r1, r5, r6 Take the reduction pair: generalized weighted path order (>=MG, >MG) base order 1: matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: prod#_A(x1) = x1 cons_A(x1,x2) = x2 + 3 +_A(x1,x2) = x1 + 4 |0|_A() = 1 *_A(x1,x2) = x1 + 8 base order 2: precedence: |0| > prod# = * > + > cons partial status: pi(prod#) = [] pi(cons) = [2] pi(+) = [] pi(|0|) = [] pi(*) = [] The following rules are removed: p1 Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: *#(*(x,y),z) -> *#(y,z) p2: *#(*(x,y),z) -> *#(x,*(y,z)) p3: *#(s(x),s(y)) -> *#(x,y) and R consists of: r1: +(x,|0|()) -> x r2: +(|0|(),x) -> x r3: +(s(x),s(y)) -> s(s(+(x,y))) r4: +(+(x,y),z) -> +(x,+(y,z)) r5: *(x,|0|()) -> |0|() r6: *(|0|(),x) -> |0|() r7: *(s(x),s(y)) -> s(+(*(x,y),+(x,y))) r8: *(*(x,y),z) -> *(x,*(y,z)) r9: sum(nil()) -> |0|() r10: sum(cons(x,l)) -> +(x,sum(l)) r11: prod(nil()) -> s(|0|()) r12: prod(cons(x,l)) -> *(x,prod(l)) The set of usable rules consists of r1, r2, r5, r6 Take the reduction pair: generalized weighted path order (>=MG, >MG) base order 1: matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: *#_A(x1,x2) = x1 + 1 *_A(x1,x2) = x1 + x2 + 2 s_A(x1) = x1 + 3 +_A(x1,x2) = x1 + x2 + 4 |0|_A() = 1 base order 2: precedence: *# = s > * > + = |0| partial status: pi(*#) = [1] pi(*) = [1] pi(s) = [1] pi(+) = [] pi(|0|) = [] The following rules are removed: p2 -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: *#(*(x,y),z) -> *#(y,z) p2: *#(s(x),s(y)) -> *#(x,y) and R consists of: r1: +(x,|0|()) -> x r2: +(|0|(),x) -> x r3: +(s(x),s(y)) -> s(s(+(x,y))) r4: +(+(x,y),z) -> +(x,+(y,z)) r5: *(x,|0|()) -> |0|() r6: *(|0|(),x) -> |0|() r7: *(s(x),s(y)) -> s(+(*(x,y),+(x,y))) r8: *(*(x,y),z) -> *(x,*(y,z)) r9: sum(nil()) -> |0|() r10: sum(cons(x,l)) -> +(x,sum(l)) r11: prod(nil()) -> s(|0|()) r12: 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: *#(*(x,y),z) -> *#(y,z) p2: *#(s(x),s(y)) -> *#(x,y) and R consists of: r1: +(x,|0|()) -> x r2: +(|0|(),x) -> x r3: +(s(x),s(y)) -> s(s(+(x,y))) r4: +(+(x,y),z) -> +(x,+(y,z)) r5: *(x,|0|()) -> |0|() r6: *(|0|(),x) -> |0|() r7: *(s(x),s(y)) -> s(+(*(x,y),+(x,y))) r8: *(*(x,y),z) -> *(x,*(y,z)) r9: sum(nil()) -> |0|() r10: sum(cons(x,l)) -> +(x,sum(l)) r11: prod(nil()) -> s(|0|()) r12: prod(cons(x,l)) -> *(x,prod(l)) The set of usable rules consists of r5 Take the reduction pair: generalized weighted path order (>=MG, >MG) base order 1: matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: *#_A(x1,x2) = x1 + x2 + 3 *_A(x1,x2) = x2 s_A(x1) = x1 + 2 |0|_A() = 1 base order 2: precedence: *# > s > * = |0| partial status: pi(*#) = [] pi(*) = [] pi(s) = [1] pi(|0|) = [] The following rules are removed: p2 -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: *#(*(x,y),z) -> *#(y,z) and R consists of: r1: +(x,|0|()) -> x r2: +(|0|(),x) -> x r3: +(s(x),s(y)) -> s(s(+(x,y))) r4: +(+(x,y),z) -> +(x,+(y,z)) r5: *(x,|0|()) -> |0|() r6: *(|0|(),x) -> |0|() r7: *(s(x),s(y)) -> s(+(*(x,y),+(x,y))) r8: *(*(x,y),z) -> *(x,*(y,z)) r9: sum(nil()) -> |0|() r10: sum(cons(x,l)) -> +(x,sum(l)) r11: prod(nil()) -> s(|0|()) r12: 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: *#(*(x,y),z) -> *#(y,z) and R consists of: r1: +(x,|0|()) -> x r2: +(|0|(),x) -> x r3: +(s(x),s(y)) -> s(s(+(x,y))) r4: +(+(x,y),z) -> +(x,+(y,z)) r5: *(x,|0|()) -> |0|() r6: *(|0|(),x) -> |0|() r7: *(s(x),s(y)) -> s(+(*(x,y),+(x,y))) r8: *(*(x,y),z) -> *(x,*(y,z)) r9: sum(nil()) -> |0|() r10: sum(cons(x,l)) -> +(x,sum(l)) r11: prod(nil()) -> s(|0|()) r12: prod(cons(x,l)) -> *(x,prod(l)) The set of usable rules consists of r1, r3, r5, r6, r7, r8 Take the reduction pair: generalized weighted path order (>=MG, >MG) base order 1: matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: *#_A(x1,x2) = x1 *_A(x1,x2) = x1 + x2 + 4 +_A(x1,x2) = x1 + 11 |0|_A() = 1 s_A(x1) = 3 base order 2: precedence: + = s > * > *# > |0| partial status: pi(*#) = [1] pi(*) = [1] pi(+) = [] pi(|0|) = [] pi(s) = [] The following rules are removed: p1 Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: +#(s(x),s(y)) -> +#(x,y) p2: +#(+(x,y),z) -> +#(y,z) p3: +#(+(x,y),z) -> +#(x,+(y,z)) and R consists of: r1: +(x,|0|()) -> x r2: +(|0|(),x) -> x r3: +(s(x),s(y)) -> s(s(+(x,y))) r4: +(+(x,y),z) -> +(x,+(y,z)) r5: *(x,|0|()) -> |0|() r6: *(|0|(),x) -> |0|() r7: *(s(x),s(y)) -> s(+(*(x,y),+(x,y))) r8: *(*(x,y),z) -> *(x,*(y,z)) r9: sum(nil()) -> |0|() r10: sum(cons(x,l)) -> +(x,sum(l)) r11: prod(nil()) -> s(|0|()) r12: prod(cons(x,l)) -> *(x,prod(l)) The set of usable rules consists of r1, r2, r3, r4, r5, r6 Take the reduction pair: generalized weighted path order (>=MG, >MG) base order 1: matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: +#_A(x1,x2) = x1 + x2 + 10 s_A(x1) = x1 + 9 +_A(x1,x2) = x1 + x2 + 3 |0|_A() = 1 *_A(x1,x2) = 2 base order 2: precedence: +# > + > s > * > |0| partial status: pi(+#) = [] pi(s) = [1] pi(+) = [] pi(|0|) = [] pi(*) = [] The following rules are removed: p1 -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: +#(+(x,y),z) -> +#(y,z) p2: +#(+(x,y),z) -> +#(x,+(y,z)) and R consists of: r1: +(x,|0|()) -> x r2: +(|0|(),x) -> x r3: +(s(x),s(y)) -> s(s(+(x,y))) r4: +(+(x,y),z) -> +(x,+(y,z)) r5: *(x,|0|()) -> |0|() r6: *(|0|(),x) -> |0|() r7: *(s(x),s(y)) -> s(+(*(x,y),+(x,y))) r8: *(*(x,y),z) -> *(x,*(y,z)) r9: sum(nil()) -> |0|() r10: sum(cons(x,l)) -> +(x,sum(l)) r11: prod(nil()) -> s(|0|()) r12: 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: +#(+(x,y),z) -> +#(y,z) p2: +#(+(x,y),z) -> +#(x,+(y,z)) and R consists of: r1: +(x,|0|()) -> x r2: +(|0|(),x) -> x r3: +(s(x),s(y)) -> s(s(+(x,y))) r4: +(+(x,y),z) -> +(x,+(y,z)) r5: *(x,|0|()) -> |0|() r6: *(|0|(),x) -> |0|() r7: *(s(x),s(y)) -> s(+(*(x,y),+(x,y))) r8: *(*(x,y),z) -> *(x,*(y,z)) r9: sum(nil()) -> |0|() r10: sum(cons(x,l)) -> +(x,sum(l)) r11: prod(nil()) -> s(|0|()) r12: prod(cons(x,l)) -> *(x,prod(l)) The set of usable rules consists of r1, r2, r3, r4, r5, r6, r7, r8 Take the reduction pair: generalized weighted path order (>=MG, >MG) base order 1: matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: +#_A(x1,x2) = x1 + x2 + 6 +_A(x1,x2) = x1 + x2 + 5 |0|_A() = 1 s_A(x1) = 1 *_A(x1,x2) = x1 + x2 + 2 base order 2: precedence: +# > + > * > |0| = s partial status: pi(+#) = [] pi(+) = [] pi(|0|) = [] pi(s) = [] pi(*) = [1, 2] The following rules are removed: p1 -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: +#(+(x,y),z) -> +#(x,+(y,z)) and R consists of: r1: +(x,|0|()) -> x r2: +(|0|(),x) -> x r3: +(s(x),s(y)) -> s(s(+(x,y))) r4: +(+(x,y),z) -> +(x,+(y,z)) r5: *(x,|0|()) -> |0|() r6: *(|0|(),x) -> |0|() r7: *(s(x),s(y)) -> s(+(*(x,y),+(x,y))) r8: *(*(x,y),z) -> *(x,*(y,z)) r9: sum(nil()) -> |0|() r10: sum(cons(x,l)) -> +(x,sum(l)) r11: prod(nil()) -> s(|0|()) r12: 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: +#(+(x,y),z) -> +#(x,+(y,z)) and R consists of: r1: +(x,|0|()) -> x r2: +(|0|(),x) -> x r3: +(s(x),s(y)) -> s(s(+(x,y))) r4: +(+(x,y),z) -> +(x,+(y,z)) r5: *(x,|0|()) -> |0|() r6: *(|0|(),x) -> |0|() r7: *(s(x),s(y)) -> s(+(*(x,y),+(x,y))) r8: *(*(x,y),z) -> *(x,*(y,z)) r9: sum(nil()) -> |0|() r10: sum(cons(x,l)) -> +(x,sum(l)) r11: prod(nil()) -> s(|0|()) r12: prod(cons(x,l)) -> *(x,prod(l)) The set of usable rules consists of r1, r2, r3, r5, r6 Take the reduction pair: generalized weighted path order (>=MG, >MG) base order 1: matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: +#_A(x1,x2) = x1 + 1 +_A(x1,x2) = x1 + x2 + 4 |0|_A() = 1 s_A(x1) = 3 *_A(x1,x2) = 2 base order 2: precedence: +# > + > s > * > |0| partial status: pi(+#) = [] pi(+) = [2] pi(|0|) = [] pi(s) = [] pi(*) = [] The following rules are removed: p1 Then no dependency pair remains.