YES We show the termination of the TRS R: g(x,|0|()) -> |0|() g(d(),s(x)) -> s(s(g(d(),x))) g(h(),s(|0|())) -> |0|() g(h(),s(s(x))) -> s(g(h(),x)) double(x) -> g(d(),x) half(x) -> g(h(),x) f(s(x),y) -> f(half(s(x)),double(y)) f(s(|0|()),y) -> y id(x) -> f(x,s(|0|())) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: g#(d(),s(x)) -> g#(d(),x) p2: g#(h(),s(s(x))) -> g#(h(),x) p3: double#(x) -> g#(d(),x) p4: half#(x) -> g#(h(),x) p5: f#(s(x),y) -> f#(half(s(x)),double(y)) p6: f#(s(x),y) -> half#(s(x)) p7: f#(s(x),y) -> double#(y) p8: id#(x) -> f#(x,s(|0|())) and R consists of: r1: g(x,|0|()) -> |0|() r2: g(d(),s(x)) -> s(s(g(d(),x))) r3: g(h(),s(|0|())) -> |0|() r4: g(h(),s(s(x))) -> s(g(h(),x)) r5: double(x) -> g(d(),x) r6: half(x) -> g(h(),x) r7: f(s(x),y) -> f(half(s(x)),double(y)) r8: f(s(|0|()),y) -> y r9: id(x) -> f(x,s(|0|())) The estimated dependency graph contains the following SCCs: {p5} {p1} {p2} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: f#(s(x),y) -> f#(half(s(x)),double(y)) and R consists of: r1: g(x,|0|()) -> |0|() r2: g(d(),s(x)) -> s(s(g(d(),x))) r3: g(h(),s(|0|())) -> |0|() r4: g(h(),s(s(x))) -> s(g(h(),x)) r5: double(x) -> g(d(),x) r6: half(x) -> g(h(),x) r7: f(s(x),y) -> f(half(s(x)),double(y)) r8: f(s(|0|()),y) -> y r9: id(x) -> f(x,s(|0|())) The set of usable rules consists of r1, r3, r4, r6 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: f#_A(x1,x2) = 0 s_A(x1) = 5 half_A(x1) = max{5, x1} double_A(x1) = x1 + 5 g_A(x1,x2) = max{5, x1 - 12} |0|_A = 5 h_A = 15 f#!_A(x1,x2) = max{7, x1 + 3} s!_A(x1) = x1 + 12 half!_A(x1) = max{14, x1 - 7} double!_A(x1) = 23 g!_A(x1,x2) = max{10, x1 - 1} |0|!_A = 7 h!_A = 18 2. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: f#_A(x1,x2) = 0 s_A(x1) = max{8, x1 + 5} half_A(x1) = max{4, x1 - 3} double_A(x1) = 10 g_A(x1,x2) = max{4, x2 - 4} |0|_A = 3 h_A = 9 f#!_A(x1,x2) = max{10, x1 + 3} s!_A(x1) = 5 half!_A(x1) = max{4, x1 + 1} double!_A(x1) = max{12, x1 + 1} g!_A(x1,x2) = max{2, x1 - 6, x2 - 13} |0|!_A = 7 h!_A = 6 partial status: pi(f#) = [] pi(s) = [] pi(half) = [1] pi(double) = [1] pi(g) = [2] pi(|0|) = [] pi(h) = [] 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: g#(d(),s(x)) -> g#(d(),x) and R consists of: r1: g(x,|0|()) -> |0|() r2: g(d(),s(x)) -> s(s(g(d(),x))) r3: g(h(),s(|0|())) -> |0|() r4: g(h(),s(s(x))) -> s(g(h(),x)) r5: double(x) -> g(d(),x) r6: half(x) -> g(h(),x) r7: f(s(x),y) -> f(half(s(x)),double(y)) r8: f(s(|0|()),y) -> y r9: id(x) -> f(x,s(|0|())) 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: g#_A(x1,x2) = 0 d_A = 0 s_A(x1) = max{3, x1 - 11} g#!_A(x1,x2) = max{2, x1 - 22, x2 - 24} d!_A = 1 s!_A(x1) = max{4, x1 - 23} 2. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: g#_A(x1,x2) = 0 d_A = 0 s_A(x1) = max{7, x1 - 14} g#!_A(x1,x2) = max{2, x1 - 58, x2 - 43} d!_A = 1 s!_A(x1) = max{4, x1 - 42} partial status: pi(g#) = [1, 2] pi(d) = [] 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: g#(h(),s(s(x))) -> g#(h(),x) and R consists of: r1: g(x,|0|()) -> |0|() r2: g(d(),s(x)) -> s(s(g(d(),x))) r3: g(h(),s(|0|())) -> |0|() r4: g(h(),s(s(x))) -> s(g(h(),x)) r5: double(x) -> g(d(),x) r6: half(x) -> g(h(),x) r7: f(s(x),y) -> f(half(s(x)),double(y)) r8: f(s(|0|()),y) -> y r9: id(x) -> f(x,s(|0|())) The set of usable rules consists of r1, r3 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: g#_A(x1,x2) = 0 h_A = 68 s_A(x1) = max{4, x1 - 12} g_A(x1,x2) = max{11, x1 - 70, x2 - 7} |0|_A = 1 g#!_A(x1,x2) = max{23, x1 - 132, x2 - 39} h!_A = 24 s!_A(x1) = max{29, x1 - 26} g!_A(x1,x2) = max{26, x1 - 39, x2 + 25} |0|!_A = 27 2. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: g#_A(x1,x2) = 0 h_A = 16 s_A(x1) = max{3, x1 - 15} g_A(x1,x2) = max{14, x1 - 18, x2 - 6} |0|_A = 5 g#!_A(x1,x2) = max{1, x1 - 17, x2 - 50} h!_A = 3 s!_A(x1) = max{2, x1 - 34} g!_A(x1,x2) = max{4, x1 - 27, x2 - 11} |0|!_A = 0 partial status: pi(g#) = [1, 2] pi(h) = [] pi(s) = [1] pi(g) = [2] pi(|0|) = [] The following rules are removed: p1 Then no dependency pair remains.