YES We show the termination of the TRS R: plus(|0|(),x) -> x plus(s(x),y) -> s(plus(p(s(x)),y)) times(|0|(),y) -> |0|() times(s(x),y) -> plus(y,times(p(s(x)),y)) exp(x,|0|()) -> s(|0|()) exp(x,s(y)) -> times(x,exp(x,y)) p(s(|0|())) -> |0|() p(s(s(x))) -> s(p(s(x))) tower(x,y) -> towerIter(x,y,s(|0|())) towerIter(|0|(),y,z) -> z towerIter(s(x),y,z) -> towerIter(p(s(x)),y,exp(y,z)) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: plus#(s(x),y) -> plus#(p(s(x)),y) p2: plus#(s(x),y) -> p#(s(x)) p3: times#(s(x),y) -> plus#(y,times(p(s(x)),y)) p4: times#(s(x),y) -> times#(p(s(x)),y) p5: times#(s(x),y) -> p#(s(x)) p6: exp#(x,s(y)) -> times#(x,exp(x,y)) p7: exp#(x,s(y)) -> exp#(x,y) p8: p#(s(s(x))) -> p#(s(x)) p9: tower#(x,y) -> towerIter#(x,y,s(|0|())) p10: towerIter#(s(x),y,z) -> towerIter#(p(s(x)),y,exp(y,z)) p11: towerIter#(s(x),y,z) -> p#(s(x)) p12: towerIter#(s(x),y,z) -> exp#(y,z) and R consists of: r1: plus(|0|(),x) -> x r2: plus(s(x),y) -> s(plus(p(s(x)),y)) r3: times(|0|(),y) -> |0|() r4: times(s(x),y) -> plus(y,times(p(s(x)),y)) r5: exp(x,|0|()) -> s(|0|()) r6: exp(x,s(y)) -> times(x,exp(x,y)) r7: p(s(|0|())) -> |0|() r8: p(s(s(x))) -> s(p(s(x))) r9: tower(x,y) -> towerIter(x,y,s(|0|())) r10: towerIter(|0|(),y,z) -> z r11: towerIter(s(x),y,z) -> towerIter(p(s(x)),y,exp(y,z)) The estimated dependency graph contains the following SCCs: {p10} {p7} {p4} {p1} {p8} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: towerIter#(s(x),y,z) -> towerIter#(p(s(x)),y,exp(y,z)) and R consists of: r1: plus(|0|(),x) -> x r2: plus(s(x),y) -> s(plus(p(s(x)),y)) r3: times(|0|(),y) -> |0|() r4: times(s(x),y) -> plus(y,times(p(s(x)),y)) r5: exp(x,|0|()) -> s(|0|()) r6: exp(x,s(y)) -> times(x,exp(x,y)) r7: p(s(|0|())) -> |0|() r8: p(s(s(x))) -> s(p(s(x))) r9: tower(x,y) -> towerIter(x,y,s(|0|())) r10: towerIter(|0|(),y,z) -> z r11: towerIter(s(x),y,z) -> towerIter(p(s(x)),y,exp(y,z)) The set of usable rules consists of r7, r8 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: towerIter#_A(x1,x2,x3) = max{0, x1 - 27, x2 - 9} s_A(x1) = x1 + 26 p_A(x1) = max{21, x1 - 4} exp_A(x1,x2) = max{9, x2 - 23} |0|_A = 0 towerIter#!_A(x1,x2,x3) = 0 s!_A(x1) = x1 + 11 p!_A(x1) = max{10, x1 - 18} exp!_A(x1,x2) = 11 |0|!_A = 0 2. marked-algebra reduction triple (>=A, >=A!, >A!): matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: towerIter#_A(x1,x2,x3) = 0 s_A(x1) = 2 p_A(x1) = 3 exp_A(x1,x2) = 1 |0|_A() = 1 towerIter#!_A(x1,x2,x3) = x1 + 2 s!_A(x1) = 6 p!_A(x1) = 3 exp!_A(x1,x2) = 1 |0|!_A() = 0 partial status: pi(towerIter#) = [1] pi(s) = [] pi(p) = [] pi(exp) = [] 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: exp#(x,s(y)) -> exp#(x,y) and R consists of: r1: plus(|0|(),x) -> x r2: plus(s(x),y) -> s(plus(p(s(x)),y)) r3: times(|0|(),y) -> |0|() r4: times(s(x),y) -> plus(y,times(p(s(x)),y)) r5: exp(x,|0|()) -> s(|0|()) r6: exp(x,s(y)) -> times(x,exp(x,y)) r7: p(s(|0|())) -> |0|() r8: p(s(s(x))) -> s(p(s(x))) r9: tower(x,y) -> towerIter(x,y,s(|0|())) r10: towerIter(|0|(),y,z) -> z r11: towerIter(s(x),y,z) -> towerIter(p(s(x)),y,exp(y,z)) 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: exp#_A(x1,x2) = x2 s_A(x1) = max{58, x1 + 15} exp#!_A(x1,x2) = 13 s!_A(x1) = max{12, x1 + 4} 2. marked-algebra reduction triple (>=A, >=A!, >A!): matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: exp#_A(x1,x2) = x2 s_A(x1) = x1 + 2 exp#!_A(x1,x2) = x2 s!_A(x1) = 2 partial status: pi(exp#) = [1] 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: times#(s(x),y) -> times#(p(s(x)),y) and R consists of: r1: plus(|0|(),x) -> x r2: plus(s(x),y) -> s(plus(p(s(x)),y)) r3: times(|0|(),y) -> |0|() r4: times(s(x),y) -> plus(y,times(p(s(x)),y)) r5: exp(x,|0|()) -> s(|0|()) r6: exp(x,s(y)) -> times(x,exp(x,y)) r7: p(s(|0|())) -> |0|() r8: p(s(s(x))) -> s(p(s(x))) r9: tower(x,y) -> towerIter(x,y,s(|0|())) r10: towerIter(|0|(),y,z) -> z r11: towerIter(s(x),y,z) -> towerIter(p(s(x)),y,exp(y,z)) The set of usable rules consists of r7, r8 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) = max{9, x1 - 14, x2 - 4} s_A(x1) = max{35, x1 + 15} p_A(x1) = max{11, x1 - 12} |0|_A = 25 times#!_A(x1,x2) = max{1, x1 - 12} s!_A(x1) = max{10, x1 - 4} p!_A(x1) = max{2, x1 - 31} |0|!_A = 8 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) = x1 s_A(x1) = x1 + 4 p_A(x1) = x1 |0|_A() = 4 times#!_A(x1,x2) = 8 s!_A(x1) = 7 p!_A(x1) = x1 |0|!_A() = 2 partial status: pi(times#) = [2] pi(s) = [] 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: plus#(s(x),y) -> plus#(p(s(x)),y) and R consists of: r1: plus(|0|(),x) -> x r2: plus(s(x),y) -> s(plus(p(s(x)),y)) r3: times(|0|(),y) -> |0|() r4: times(s(x),y) -> plus(y,times(p(s(x)),y)) r5: exp(x,|0|()) -> s(|0|()) r6: exp(x,s(y)) -> times(x,exp(x,y)) r7: p(s(|0|())) -> |0|() r8: p(s(s(x))) -> s(p(s(x))) r9: tower(x,y) -> towerIter(x,y,s(|0|())) r10: towerIter(|0|(),y,z) -> z r11: towerIter(s(x),y,z) -> towerIter(p(s(x)),y,exp(y,z)) The set of usable rules consists of r7, r8 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) = max{0, x1 - 36, x2 - 65} s_A(x1) = x1 + 105 p_A(x1) = max{37, x1 - 68} |0|_A = 44 plus#!_A(x1,x2) = max{149, x1 + 111} s!_A(x1) = max{13, x1 + 10} p!_A(x1) = max{150, x1 - 59} |0|!_A = 15 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) = x1 s_A(x1) = x1 + 4 p_A(x1) = x1 |0|_A() = 9 plus#!_A(x1,x2) = 6 s!_A(x1) = 2 p!_A(x1) = 5 |0|!_A() = 0 partial status: pi(plus#) = [2] pi(s) = [] 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: p#(s(s(x))) -> p#(s(x)) and R consists of: r1: plus(|0|(),x) -> x r2: plus(s(x),y) -> s(plus(p(s(x)),y)) r3: times(|0|(),y) -> |0|() r4: times(s(x),y) -> plus(y,times(p(s(x)),y)) r5: exp(x,|0|()) -> s(|0|()) r6: exp(x,s(y)) -> times(x,exp(x,y)) r7: p(s(|0|())) -> |0|() r8: p(s(s(x))) -> s(p(s(x))) r9: tower(x,y) -> towerIter(x,y,s(|0|())) r10: towerIter(|0|(),y,z) -> z r11: towerIter(s(x),y,z) -> towerIter(p(s(x)),y,exp(y,z)) 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) = x1 s_A(x1) = max{39, x1 + 27} p#!_A(x1) = max{42, x1 - 11} s!_A(x1) = max{4, x1 + 2} 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) = x1 + 2 p#!_A(x1) = 5 s!_A(x1) = 4 partial status: pi(p#) = [1] pi(s) = [] The following rules are removed: p1 Then no dependency pair remains.