YES We show the termination of the TRS R: +(x,|0|()) -> x +(|0|(),x) -> x +(s(x),s(y)) -> s(s(+(x,y))) *(x,|0|()) -> |0|() *(|0|(),x) -> |0|() *(s(x),s(y)) -> s(+(*(x,y),+(x,y))) 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: *#(s(x),s(y)) -> +#(*(x,y),+(x,y)) p3: *#(s(x),s(y)) -> *#(x,y) p4: *#(s(x),s(y)) -> +#(x,y) p5: sum#(cons(x,l)) -> +#(x,sum(l)) p6: sum#(cons(x,l)) -> sum#(l) p7: prod#(cons(x,l)) -> *#(x,prod(l)) p8: 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,|0|()) -> |0|() r5: *(|0|(),x) -> |0|() r6: *(s(x),s(y)) -> s(+(*(x,y),+(x,y))) r7: sum(nil()) -> |0|() r8: sum(cons(x,l)) -> +(x,sum(l)) r9: prod(nil()) -> s(|0|()) r10: prod(cons(x,l)) -> *(x,prod(l)) The estimated dependency graph contains the following SCCs: {p6} {p8} {p3} {p1} -- 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,|0|()) -> |0|() r5: *(|0|(),x) -> |0|() r6: *(s(x),s(y)) -> s(+(*(x,y),+(x,y))) r7: sum(nil()) -> |0|() r8: sum(cons(x,l)) -> +(x,sum(l)) r9: prod(nil()) -> s(|0|()) r10: 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: max/plus interpretation on natural numbers: sum#_A(x1) = max{2, x1 - 16} cons_A(x1,x2) = max{19, x1 - 36, x2 + 15} *_A(x1,x2) = max{18, x1 - 54, x2 - 20} |0|_A = 13 base order 2: precedence: cons > sum# > * > |0| partial status: pi(sum#) = [] pi(cons) = [2] pi(*) = [] pi(|0|) = [] 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,|0|()) -> |0|() r5: *(|0|(),x) -> |0|() r6: *(s(x),s(y)) -> s(+(*(x,y),+(x,y))) r7: sum(nil()) -> |0|() r8: sum(cons(x,l)) -> +(x,sum(l)) r9: prod(nil()) -> s(|0|()) r10: 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: max/plus interpretation on natural numbers: prod#_A(x1) = max{2, x1 - 16} cons_A(x1,x2) = max{19, x1 - 36, x2 + 15} *_A(x1,x2) = max{18, x1 - 54, x2 - 20} |0|_A = 13 base order 2: precedence: cons > prod# > * > |0| partial status: pi(prod#) = [] pi(cons) = [2] pi(*) = [] pi(|0|) = [] 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) and R consists of: r1: +(x,|0|()) -> x r2: +(|0|(),x) -> x r3: +(s(x),s(y)) -> s(s(+(x,y))) r4: *(x,|0|()) -> |0|() r5: *(|0|(),x) -> |0|() r6: *(s(x),s(y)) -> s(+(*(x,y),+(x,y))) r7: sum(nil()) -> |0|() r8: sum(cons(x,l)) -> +(x,sum(l)) r9: prod(nil()) -> s(|0|()) r10: prod(cons(x,l)) -> *(x,prod(l)) The set of usable rules consists of r1, r5 Take the reduction pair: generalized weighted path order (>=MG, >MG) base order 1: max/plus interpretation on natural numbers: *#_A(x1,x2) = max{x1 - 3, x2 + 5} s_A(x1) = x1 + 6 +_A(x1,x2) = max{x1 + 23, x2 - 17} |0|_A = 1 *_A(x1,x2) = max{7, x1 - 41, x2 - 39} base order 2: precedence: + > *# = * > s = |0| partial status: pi(*#) = [2] pi(s) = [1] pi(+) = [1] 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: +#(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,|0|()) -> |0|() r5: *(|0|(),x) -> |0|() r6: *(s(x),s(y)) -> s(+(*(x,y),+(x,y))) r7: sum(nil()) -> |0|() r8: sum(cons(x,l)) -> +(x,sum(l)) r9: prod(nil()) -> s(|0|()) r10: prod(cons(x,l)) -> *(x,prod(l)) The set of usable rules consists of r1, r5 Take the reduction pair: generalized weighted path order (>=MG, >MG) base order 1: max/plus interpretation on natural numbers: +#_A(x1,x2) = max{x1 - 1, x2 + 6} s_A(x1) = max{9, x1 + 5} +_A(x1,x2) = max{x1 + 24, x2 - 19} |0|_A = 2 *_A(x1,x2) = max{10, x1 - 39, x2 - 38} base order 2: precedence: + > * > +# = s > |0| partial status: pi(+#) = [2] pi(s) = [1] pi(+) = [1] pi(|0|) = [] pi(*) = [] The following rules are removed: p1 Then no dependency pair remains.