YES We show the termination of the TRS R: cond(true(),x,y) -> cond(and(gr(x,|0|()),gr(y,|0|())),p(x),p(y)) and(true(),true()) -> true() and(x,false()) -> false() and(false(),x) -> false() gr(|0|(),|0|()) -> false() gr(|0|(),x) -> false() gr(s(x),|0|()) -> true() gr(s(x),s(y)) -> gr(x,y) p(|0|()) -> |0|() p(s(x)) -> x -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: cond#(true(),x,y) -> cond#(and(gr(x,|0|()),gr(y,|0|())),p(x),p(y)) p2: cond#(true(),x,y) -> and#(gr(x,|0|()),gr(y,|0|())) p3: cond#(true(),x,y) -> gr#(x,|0|()) p4: cond#(true(),x,y) -> gr#(y,|0|()) p5: cond#(true(),x,y) -> p#(x) p6: cond#(true(),x,y) -> p#(y) p7: gr#(s(x),s(y)) -> gr#(x,y) and R consists of: r1: cond(true(),x,y) -> cond(and(gr(x,|0|()),gr(y,|0|())),p(x),p(y)) r2: and(true(),true()) -> true() r3: and(x,false()) -> false() r4: and(false(),x) -> false() r5: gr(|0|(),|0|()) -> false() r6: gr(|0|(),x) -> false() r7: gr(s(x),|0|()) -> true() r8: gr(s(x),s(y)) -> gr(x,y) r9: p(|0|()) -> |0|() r10: p(s(x)) -> x The estimated dependency graph contains the following SCCs: {p1} {p7} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: cond#(true(),x,y) -> cond#(and(gr(x,|0|()),gr(y,|0|())),p(x),p(y)) and R consists of: r1: cond(true(),x,y) -> cond(and(gr(x,|0|()),gr(y,|0|())),p(x),p(y)) r2: and(true(),true()) -> true() r3: and(x,false()) -> false() r4: and(false(),x) -> false() r5: gr(|0|(),|0|()) -> false() r6: gr(|0|(),x) -> false() r7: gr(s(x),|0|()) -> true() r8: gr(s(x),s(y)) -> gr(x,y) r9: p(|0|()) -> |0|() r10: p(s(x)) -> x The set of usable rules consists of r2, r3, r4, r5, r6, r7, r8, r9, r10 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: cond#_A(x1,x2,x3) = max{0, x1 - 16, x2 - 6, x3 - 17} true_A = 14 and_A(x1,x2) = x2 + 9 gr_A(x1,x2) = max{3, x1 - 20, x2 - 49} |0|_A = 5 p_A(x1) = max{5, x1 - 20} false_A = 1 s_A(x1) = max{34, x1 + 20} cond#!_A(x1,x2,x3) = max{25, x1 + 12, x2 + 19, x3 + 13} true!_A = 2 and!_A(x1,x2) = max{49, x1 - 11, x2 - 4} gr!_A(x1,x2) = max{49, x1 - 35, x2 - 1} |0|!_A = 2 p!_A(x1) = max{0, x1 - 36} false!_A = 3 s!_A(x1) = max{3, x1 - 34} 2. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: cond#_A(x1,x2,x3) = max{0, x1 - 7, x2 - 10, x3 - 10} true_A = 0 and_A(x1,x2) = max{3, x1 - 1, x2 - 1} gr_A(x1,x2) = max{2, x1 - 6, x2 - 1} |0|_A = 0 p_A(x1) = max{9, x1 - 1} false_A = 0 s_A(x1) = x1 + 5 cond#!_A(x1,x2,x3) = max{4, x1 - 14, x2 - 17, x3 - 10} true!_A = 2 and!_A(x1,x2) = max{7, x1 - 20, x2 - 17} gr!_A(x1,x2) = max{5, x1 + 1, x2 - 35} |0|!_A = 2 p!_A(x1) = max{3, x1 - 25} false!_A = 6 s!_A(x1) = max{1, x1 - 36} partial status: pi(cond#) = [2] pi(true) = [] pi(and) = [2] pi(gr) = [1] pi(|0|) = [] pi(p) = [1] pi(false) = [] 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: gr#(s(x),s(y)) -> gr#(x,y) and R consists of: r1: cond(true(),x,y) -> cond(and(gr(x,|0|()),gr(y,|0|())),p(x),p(y)) r2: and(true(),true()) -> true() r3: and(x,false()) -> false() r4: and(false(),x) -> false() r5: gr(|0|(),|0|()) -> false() r6: gr(|0|(),x) -> false() r7: gr(s(x),|0|()) -> true() r8: gr(s(x),s(y)) -> gr(x,y) r9: p(|0|()) -> |0|() r10: p(s(x)) -> 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: gr#_A(x1,x2) = max{x1, x2} s_A(x1) = max{2, x1} gr#!_A(x1,x2) = max{4, x1 - 14, x2 - 3} s!_A(x1) = max{3, x1 - 13} 2. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: gr#_A(x1,x2) = max{x1, x2} s_A(x1) = max{2, x1 + 1} gr#!_A(x1,x2) = max{3, x1 - 16, x2 - 3} s!_A(x1) = max{2, x1 - 15} partial status: pi(gr#) = [1] pi(s) = [1] The following rules are removed: p1 Then no dependency pair remains.