YES We show the termination of the TRS R: plus(x,|0|()) -> x plus(x,s(y)) -> s(plus(x,y)) times(|0|(),y) -> |0|() times(x,|0|()) -> |0|() times(s(x),y) -> plus(times(x,y),y) p(s(s(x))) -> s(p(s(x))) p(s(|0|())) -> |0|() fac(s(x)) -> times(fac(p(s(x))),s(x)) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: plus#(x,s(y)) -> plus#(x,y) p2: times#(s(x),y) -> plus#(times(x,y),y) p3: times#(s(x),y) -> times#(x,y) p4: p#(s(s(x))) -> p#(s(x)) p5: fac#(s(x)) -> times#(fac(p(s(x))),s(x)) p6: fac#(s(x)) -> fac#(p(s(x))) p7: fac#(s(x)) -> p#(s(x)) and R consists of: r1: plus(x,|0|()) -> x r2: plus(x,s(y)) -> s(plus(x,y)) r3: times(|0|(),y) -> |0|() r4: times(x,|0|()) -> |0|() r5: times(s(x),y) -> plus(times(x,y),y) r6: p(s(s(x))) -> s(p(s(x))) r7: p(s(|0|())) -> |0|() r8: fac(s(x)) -> times(fac(p(s(x))),s(x)) The estimated dependency graph contains the following SCCs: {p6} {p3} {p1} {p4} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: fac#(s(x)) -> fac#(p(s(x))) and R consists of: r1: plus(x,|0|()) -> x r2: plus(x,s(y)) -> s(plus(x,y)) r3: times(|0|(),y) -> |0|() r4: times(x,|0|()) -> |0|() r5: times(s(x),y) -> plus(times(x,y),y) r6: p(s(s(x))) -> s(p(s(x))) r7: p(s(|0|())) -> |0|() r8: fac(s(x)) -> times(fac(p(s(x))),s(x)) The set of usable rules consists of r6, r7 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: trivial reduction triple (T x T, T x T, Φ) base order 2: lexicographic combination of reduction triples: 1. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: fac#_A(x1) = 0 s_A(x1) = x1 + 10 p_A(x1) = max{2, x1 - 8} |0|_A = 2 fac#!_A(x1) = max{14, x1 + 13} s!_A(x1) = x1 + 19 p!_A(x1) = max{13, x1 + 5} |0|!_A = 2 2. marked-algebra reduction triple (>=A, >=A!, >A!): matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: fac#_A(x1) = x1 s_A(x1) = x1 + 1 p_A(x1) = x1 |0|_A() = 3 fac#!_A(x1) = 4 s!_A(x1) = 3 p!_A(x1) = 2 |0|!_A() = 1 partial status: pi(fac#) = [1] pi(s) = [1] pi(p) = [] 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: times#(s(x),y) -> times#(x,y) and R consists of: r1: plus(x,|0|()) -> x r2: plus(x,s(y)) -> s(plus(x,y)) r3: times(|0|(),y) -> |0|() r4: times(x,|0|()) -> |0|() r5: times(s(x),y) -> plus(times(x,y),y) r6: p(s(s(x))) -> s(p(s(x))) r7: p(s(|0|())) -> |0|() r8: fac(s(x)) -> times(fac(p(s(x))),s(x)) The set of usable rules consists of (no rules) Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: trivial reduction triple (T x T, T x T, Φ) base order 2: lexicographic combination of reduction triples: 1. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: times#_A(x1,x2) = x1 s_A(x1) = max{33, x1 + 3} times#!_A(x1,x2) = max{20, x1 + 18} s!_A(x1) = max{19, x1 - 21} 2. marked-algebra reduction triple (>=A, >=A!, >A!): matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: times#_A(x1,x2) = 0 s_A(x1) = 4 times#!_A(x1,x2) = 2 s!_A(x1) = 1 partial status: pi(times#) = [] pi(s) = [1] 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: plus#(x,s(y)) -> plus#(x,y) and R consists of: r1: plus(x,|0|()) -> x r2: plus(x,s(y)) -> s(plus(x,y)) r3: times(|0|(),y) -> |0|() r4: times(x,|0|()) -> |0|() r5: times(s(x),y) -> plus(times(x,y),y) r6: p(s(s(x))) -> s(p(s(x))) r7: p(s(|0|())) -> |0|() r8: fac(s(x)) -> times(fac(p(s(x))),s(x)) The set of usable rules consists of (no rules) Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: trivial reduction triple (T x T, T x T, Φ) base order 2: lexicographic combination of reduction triples: 1. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: plus#_A(x1,x2) = 0 s_A(x1) = max{2, x1} plus#!_A(x1,x2) = max{1, x1 - 1, x2 - 3} s!_A(x1) = 7 2. marked-algebra reduction triple (>=A, >=A!, >A!): matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: plus#_A(x1,x2) = 0 s_A(x1) = 6 plus#!_A(x1,x2) = 0 s!_A(x1) = x1 + 1 partial status: pi(plus#) = [2] pi(s) = [1] 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: p#(s(s(x))) -> p#(s(x)) and R consists of: r1: plus(x,|0|()) -> x r2: plus(x,s(y)) -> s(plus(x,y)) r3: times(|0|(),y) -> |0|() r4: times(x,|0|()) -> |0|() r5: times(s(x),y) -> plus(times(x,y),y) r6: p(s(s(x))) -> s(p(s(x))) r7: p(s(|0|())) -> |0|() r8: fac(s(x)) -> times(fac(p(s(x))),s(x)) The set of usable rules consists of (no rules) Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: trivial reduction triple (T x T, T x T, Φ) base order 2: lexicographic combination of reduction triples: 1. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: p#_A(x1) = 0 s_A(x1) = max{21, x1 + 14} p#!_A(x1) = max{12, x1 - 15} s!_A(x1) = max{2, x1 - 9} 2. marked-algebra reduction triple (>=A, >=A!, >A!): matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: p#_A(x1) = x1 s_A(x1) = 4 p#!_A(x1) = 1 s!_A(x1) = 2 partial status: pi(p#) = [] pi(s) = [1] The following rules are removed: p1 Then no dependency pair remains.