YES We show the termination of the TRS R: f(|0|()) -> true() f(|1|()) -> false() f(s(x)) -> f(x) if(true(),s(x),s(y)) -> s(x) if(false(),s(x),s(y)) -> s(y) g(x,c(y)) -> c(g(x,y)) g(x,c(y)) -> g(x,if(f(x),c(g(s(x),y)),c(y))) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: f#(s(x)) -> f#(x) p2: g#(x,c(y)) -> g#(x,y) p3: g#(x,c(y)) -> g#(x,if(f(x),c(g(s(x),y)),c(y))) p4: g#(x,c(y)) -> if#(f(x),c(g(s(x),y)),c(y)) p5: g#(x,c(y)) -> f#(x) p6: g#(x,c(y)) -> g#(s(x),y) and R consists of: r1: f(|0|()) -> true() r2: f(|1|()) -> false() r3: f(s(x)) -> f(x) r4: if(true(),s(x),s(y)) -> s(x) r5: if(false(),s(x),s(y)) -> s(y) r6: g(x,c(y)) -> c(g(x,y)) r7: g(x,c(y)) -> g(x,if(f(x),c(g(s(x),y)),c(y))) The estimated dependency graph contains the following SCCs: {p2, p6} {p1} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: g#(x,c(y)) -> g#(s(x),y) p2: g#(x,c(y)) -> g#(x,y) and R consists of: r1: f(|0|()) -> true() r2: f(|1|()) -> false() r3: f(s(x)) -> f(x) r4: if(true(),s(x),s(y)) -> s(x) r5: if(false(),s(x),s(y)) -> s(y) r6: g(x,c(y)) -> c(g(x,y)) r7: g(x,c(y)) -> g(x,if(f(x),c(g(s(x),y)),c(y))) The set of usable rules consists of r4 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: max/plus interpretation on natural numbers: g#_A(x1,x2) = max{1, x1 - 9, x2 - 1} c_A(x1) = x1 + 12 s_A(x1) = 4 if_A(x1,x2,x3) = max{13, x1 - 14, x2 - 24, x3 + 8} true_A = 5 base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: g#_A(x1,x2) = x1 + x2 c_A(x1) = x1 + 1 s_A(x1) = x1 + 1 if_A(x1,x2,x3) = x2 true_A() = 3 g#!_A(x1,x2) = x1 + 7 c!_A(x1) = x1 + 6 s!_A(x1) = 0 if!_A(x1,x2,x3) = x1 + x2 + x3 true!_A() = 1 partial status: pi(g#) = [] pi(c) = [1] pi(s) = [] pi(if) = [] pi(true) = [] The following rules are removed: p1 -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: g#(x,c(y)) -> g#(x,y) and R consists of: r1: f(|0|()) -> true() r2: f(|1|()) -> false() r3: f(s(x)) -> f(x) r4: if(true(),s(x),s(y)) -> s(x) r5: if(false(),s(x),s(y)) -> s(y) r6: g(x,c(y)) -> c(g(x,y)) r7: g(x,c(y)) -> g(x,if(f(x),c(g(s(x),y)),c(y))) The estimated dependency graph contains the following SCCs: {p1} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: g#(x,c(y)) -> g#(x,y) and R consists of: r1: f(|0|()) -> true() r2: f(|1|()) -> false() r3: f(s(x)) -> f(x) r4: if(true(),s(x),s(y)) -> s(x) r5: if(false(),s(x),s(y)) -> s(y) r6: g(x,c(y)) -> c(g(x,y)) r7: g(x,c(y)) -> g(x,if(f(x),c(g(s(x),y)),c(y))) The set of usable rules consists of r4 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: max/plus interpretation on natural numbers: g#_A(x1,x2) = max{1, x2 - 5} c_A(x1) = max{4, x1} if_A(x1,x2,x3) = max{2, x2, x3 - 5} true_A = 12 s_A(x1) = 6 base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: g#_A(x1,x2) = x2 c_A(x1) = x1 + 1 if_A(x1,x2,x3) = x2 true_A() = 7 s_A(x1) = x1 + 1 g#!_A(x1,x2) = x2 + 7 c!_A(x1) = x1 + 6 if!_A(x1,x2,x3) = x1 + x2 + x3 true!_A() = 9 s!_A(x1) = 8 partial status: pi(g#) = [] pi(c) = [1] pi(if) = [] pi(true) = [] 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: f#(s(x)) -> f#(x) and R consists of: r1: f(|0|()) -> true() r2: f(|1|()) -> false() r3: f(s(x)) -> f(x) r4: if(true(),s(x),s(y)) -> s(x) r5: if(false(),s(x),s(y)) -> s(y) r6: g(x,c(y)) -> c(g(x,y)) r7: g(x,c(y)) -> g(x,if(f(x),c(g(s(x),y)),c(y))) The set of usable rules consists of (no rules) Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: max/plus interpretation on natural numbers: f#_A(x1) = max{4, x1 - 6} s_A(x1) = x1 + 5 base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: f#_A(x1) = x1 s_A(x1) = x1 + 4 f#!_A(x1) = x1 s!_A(x1) = x1 + 4 partial status: pi(f#) = [] pi(s) = [1] The following rules are removed: p1 Then no dependency pair remains.