YES We show the termination of the TRS R: minus_active(|0|(),y) -> |0|() mark(|0|()) -> |0|() minus_active(s(x),s(y)) -> minus_active(x,y) mark(s(x)) -> s(mark(x)) ge_active(x,|0|()) -> true() mark(minus(x,y)) -> minus_active(x,y) ge_active(|0|(),s(y)) -> false() mark(ge(x,y)) -> ge_active(x,y) ge_active(s(x),s(y)) -> ge_active(x,y) mark(div(x,y)) -> div_active(mark(x),y) div_active(|0|(),s(y)) -> |0|() mark(if(x,y,z)) -> if_active(mark(x),y,z) div_active(s(x),s(y)) -> if_active(ge_active(x,y),s(div(minus(x,y),s(y))),|0|()) if_active(true(),x,y) -> mark(x) minus_active(x,y) -> minus(x,y) if_active(false(),x,y) -> mark(y) ge_active(x,y) -> ge(x,y) if_active(x,y,z) -> if(x,y,z) div_active(x,y) -> div(x,y) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: minus_active#(s(x),s(y)) -> minus_active#(x,y) p2: mark#(s(x)) -> mark#(x) p3: mark#(minus(x,y)) -> minus_active#(x,y) p4: mark#(ge(x,y)) -> ge_active#(x,y) p5: ge_active#(s(x),s(y)) -> ge_active#(x,y) p6: mark#(div(x,y)) -> div_active#(mark(x),y) p7: mark#(div(x,y)) -> mark#(x) p8: mark#(if(x,y,z)) -> if_active#(mark(x),y,z) p9: mark#(if(x,y,z)) -> mark#(x) p10: div_active#(s(x),s(y)) -> if_active#(ge_active(x,y),s(div(minus(x,y),s(y))),|0|()) p11: div_active#(s(x),s(y)) -> ge_active#(x,y) p12: if_active#(true(),x,y) -> mark#(x) p13: if_active#(false(),x,y) -> mark#(y) and R consists of: r1: minus_active(|0|(),y) -> |0|() r2: mark(|0|()) -> |0|() r3: minus_active(s(x),s(y)) -> minus_active(x,y) r4: mark(s(x)) -> s(mark(x)) r5: ge_active(x,|0|()) -> true() r6: mark(minus(x,y)) -> minus_active(x,y) r7: ge_active(|0|(),s(y)) -> false() r8: mark(ge(x,y)) -> ge_active(x,y) r9: ge_active(s(x),s(y)) -> ge_active(x,y) r10: mark(div(x,y)) -> div_active(mark(x),y) r11: div_active(|0|(),s(y)) -> |0|() r12: mark(if(x,y,z)) -> if_active(mark(x),y,z) r13: div_active(s(x),s(y)) -> if_active(ge_active(x,y),s(div(minus(x,y),s(y))),|0|()) r14: if_active(true(),x,y) -> mark(x) r15: minus_active(x,y) -> minus(x,y) r16: if_active(false(),x,y) -> mark(y) r17: ge_active(x,y) -> ge(x,y) r18: if_active(x,y,z) -> if(x,y,z) r19: div_active(x,y) -> div(x,y) The estimated dependency graph contains the following SCCs: {p2, p6, p7, p8, p9, p10, p12, p13} {p1} {p5} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: if_active#(false(),x,y) -> mark#(y) p2: mark#(if(x,y,z)) -> mark#(x) p3: mark#(if(x,y,z)) -> if_active#(mark(x),y,z) p4: if_active#(true(),x,y) -> mark#(x) p5: mark#(div(x,y)) -> mark#(x) p6: mark#(div(x,y)) -> div_active#(mark(x),y) p7: div_active#(s(x),s(y)) -> if_active#(ge_active(x,y),s(div(minus(x,y),s(y))),|0|()) p8: mark#(s(x)) -> mark#(x) and R consists of: r1: minus_active(|0|(),y) -> |0|() r2: mark(|0|()) -> |0|() r3: minus_active(s(x),s(y)) -> minus_active(x,y) r4: mark(s(x)) -> s(mark(x)) r5: ge_active(x,|0|()) -> true() r6: mark(minus(x,y)) -> minus_active(x,y) r7: ge_active(|0|(),s(y)) -> false() r8: mark(ge(x,y)) -> ge_active(x,y) r9: ge_active(s(x),s(y)) -> ge_active(x,y) r10: mark(div(x,y)) -> div_active(mark(x),y) r11: div_active(|0|(),s(y)) -> |0|() r12: mark(if(x,y,z)) -> if_active(mark(x),y,z) r13: div_active(s(x),s(y)) -> if_active(ge_active(x,y),s(div(minus(x,y),s(y))),|0|()) r14: if_active(true(),x,y) -> mark(x) r15: minus_active(x,y) -> minus(x,y) r16: if_active(false(),x,y) -> mark(y) r17: ge_active(x,y) -> ge(x,y) r18: if_active(x,y,z) -> if(x,y,z) r19: div_active(x,y) -> div(x,y) The set of usable rules consists of r2, r5, r7, r11 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: if_active#_A(x1,x2,x3) = x2 + x3 + 7 false_A() = 3 mark#_A(x1) = x1 + 7 if_A(x1,x2,x3) = x1 + x2 + x3 + 5 mark_A(x1) = x1 + 2 true_A() = 1 div_A(x1,x2) = x1 + 6 div_active#_A(x1,x2) = 13 s_A(x1) = x1 ge_active_A(x1,x2) = 4 minus_A(x1,x2) = 0 |0|_A() = 0 div_active_A(x1,x2) = 7 base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: if_active#_A(x1,x2,x3) = 1 false_A = 66 mark#_A(x1) = 1 if_A(x1,x2,x3) = max{70, x3 + 68} mark_A(x1) = x1 + 4 true_A = 4 div_A(x1,x2) = x2 + 32 div_active#_A(x1,x2) = 1 s_A(x1) = max{31, x1} ge_active_A(x1,x2) = max{x1 + 4, x2 + 66} minus_A(x1,x2) = max{13, x1 - 5} |0|_A = 19 div_active_A(x1,x2) = max{75, x1 - 31} if_active#!_A(x1,x2,x3) = max{54, x2 - 8, x3 + 2} false!_A = 26 mark#!_A(x1) = max{24, x1 - 8} if!_A(x1,x2,x3) = max{x1 - 9, x2} mark!_A(x1) = max{0, x1 - 65} true!_A = 10 div!_A(x1,x2) = 21 div_active#!_A(x1,x2) = x2 + 24 s!_A(x1) = 25 ge_active!_A(x1,x2) = 21 minus!_A(x1,x2) = max{26, x1 - 15, x2 - 1} |0|!_A = 9 div_active!_A(x1,x2) = 21 partial status: pi(if_active#) = [] pi(false) = [] pi(mark#) = [] pi(if) = [1, 3] pi(mark) = [1] pi(true) = [] pi(div) = [] pi(div_active#) = [] pi(s) = [1] pi(ge_active) = [] pi(minus) = [] pi(|0|) = [] pi(div_active) = [] The following rules are removed: p1, p2, p3, p5 -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: if_active#(true(),x,y) -> mark#(x) p2: mark#(div(x,y)) -> div_active#(mark(x),y) p3: div_active#(s(x),s(y)) -> if_active#(ge_active(x,y),s(div(minus(x,y),s(y))),|0|()) p4: mark#(s(x)) -> mark#(x) and R consists of: r1: minus_active(|0|(),y) -> |0|() r2: mark(|0|()) -> |0|() r3: minus_active(s(x),s(y)) -> minus_active(x,y) r4: mark(s(x)) -> s(mark(x)) r5: ge_active(x,|0|()) -> true() r6: mark(minus(x,y)) -> minus_active(x,y) r7: ge_active(|0|(),s(y)) -> false() r8: mark(ge(x,y)) -> ge_active(x,y) r9: ge_active(s(x),s(y)) -> ge_active(x,y) r10: mark(div(x,y)) -> div_active(mark(x),y) r11: div_active(|0|(),s(y)) -> |0|() r12: mark(if(x,y,z)) -> if_active(mark(x),y,z) r13: div_active(s(x),s(y)) -> if_active(ge_active(x,y),s(div(minus(x,y),s(y))),|0|()) r14: if_active(true(),x,y) -> mark(x) r15: minus_active(x,y) -> minus(x,y) r16: if_active(false(),x,y) -> mark(y) r17: ge_active(x,y) -> ge(x,y) r18: if_active(x,y,z) -> if(x,y,z) r19: div_active(x,y) -> div(x,y) The estimated dependency graph contains the following SCCs: {p1, p2, p3, p4} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: if_active#(true(),x,y) -> mark#(x) p2: mark#(s(x)) -> mark#(x) p3: mark#(div(x,y)) -> div_active#(mark(x),y) p4: div_active#(s(x),s(y)) -> if_active#(ge_active(x,y),s(div(minus(x,y),s(y))),|0|()) and R consists of: r1: minus_active(|0|(),y) -> |0|() r2: mark(|0|()) -> |0|() r3: minus_active(s(x),s(y)) -> minus_active(x,y) r4: mark(s(x)) -> s(mark(x)) r5: ge_active(x,|0|()) -> true() r6: mark(minus(x,y)) -> minus_active(x,y) r7: ge_active(|0|(),s(y)) -> false() r8: mark(ge(x,y)) -> ge_active(x,y) r9: ge_active(s(x),s(y)) -> ge_active(x,y) r10: mark(div(x,y)) -> div_active(mark(x),y) r11: div_active(|0|(),s(y)) -> |0|() r12: mark(if(x,y,z)) -> if_active(mark(x),y,z) r13: div_active(s(x),s(y)) -> if_active(ge_active(x,y),s(div(minus(x,y),s(y))),|0|()) r14: if_active(true(),x,y) -> mark(x) r15: minus_active(x,y) -> minus(x,y) r16: if_active(false(),x,y) -> mark(y) r17: ge_active(x,y) -> ge(x,y) r18: if_active(x,y,z) -> if(x,y,z) r19: div_active(x,y) -> div(x,y) The set of usable rules consists of r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15, r16, r17, r18, r19 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: if_active#_A(x1,x2,x3) = x1 + x2 + x3 + 1 true_A() = 2 mark#_A(x1) = x1 + 3 s_A(x1) = x1 + 4 div_A(x1,x2) = x1 + x2 + 1 div_active#_A(x1,x2) = x1 + x2 + 4 mark_A(x1) = x1 ge_active_A(x1,x2) = 2 minus_A(x1,x2) = x1 |0|_A() = 0 minus_active_A(x1,x2) = x1 false_A() = 1 ge_A(x1,x2) = 2 div_active_A(x1,x2) = x1 + x2 + 1 if_A(x1,x2,x3) = x2 + x3 if_active_A(x1,x2,x3) = x2 + x3 base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: if_active#_A(x1,x2,x3) = max{1, x3 - 26} true_A = 1 mark#_A(x1) = 1 s_A(x1) = max{9, x1 - 25} div_A(x1,x2) = max{x1 + 76, x2 + 62} div_active#_A(x1,x2) = 1 mark_A(x1) = x1 + 32 ge_active_A(x1,x2) = 9 minus_A(x1,x2) = 2 |0|_A = 27 minus_active_A(x1,x2) = 27 false_A = 1 ge_A(x1,x2) = 1 div_active_A(x1,x2) = max{x1 + 76, x2 + 69} if_A(x1,x2,x3) = max{53, x1 - 10, x2, x3 + 52} if_active_A(x1,x2,x3) = max{85, x1 - 10, x2 + 32, x3 + 52} if_active#!_A(x1,x2,x3) = max{15, x2 + 4, x3 + 4} true!_A = 0 mark#!_A(x1) = max{3, x1 - 6} s!_A(x1) = 1 div!_A(x1,x2) = 2 div_active#!_A(x1,x2) = x2 + 54 mark!_A(x1) = 2 ge_active!_A(x1,x2) = 0 minus!_A(x1,x2) = 0 |0|!_A = 0 minus_active!_A(x1,x2) = 0 false!_A = 2 ge!_A(x1,x2) = 0 div_active!_A(x1,x2) = 2 if!_A(x1,x2,x3) = 0 if_active!_A(x1,x2,x3) = 2 partial status: pi(if_active#) = [2, 3] pi(true) = [] pi(mark#) = [1] pi(s) = [] pi(div) = [] pi(div_active#) = [] pi(mark) = [] pi(ge_active) = [] pi(minus) = [] pi(|0|) = [] pi(minus_active) = [] pi(false) = [] pi(ge) = [] pi(div_active) = [] pi(if) = [] pi(if_active) = [] The following rules are removed: p1, p2, p3, p4 Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: minus_active#(s(x),s(y)) -> minus_active#(x,y) and R consists of: r1: minus_active(|0|(),y) -> |0|() r2: mark(|0|()) -> |0|() r3: minus_active(s(x),s(y)) -> minus_active(x,y) r4: mark(s(x)) -> s(mark(x)) r5: ge_active(x,|0|()) -> true() r6: mark(minus(x,y)) -> minus_active(x,y) r7: ge_active(|0|(),s(y)) -> false() r8: mark(ge(x,y)) -> ge_active(x,y) r9: ge_active(s(x),s(y)) -> ge_active(x,y) r10: mark(div(x,y)) -> div_active(mark(x),y) r11: div_active(|0|(),s(y)) -> |0|() r12: mark(if(x,y,z)) -> if_active(mark(x),y,z) r13: div_active(s(x),s(y)) -> if_active(ge_active(x,y),s(div(minus(x,y),s(y))),|0|()) r14: if_active(true(),x,y) -> mark(x) r15: minus_active(x,y) -> minus(x,y) r16: if_active(false(),x,y) -> mark(y) r17: ge_active(x,y) -> ge(x,y) r18: if_active(x,y,z) -> if(x,y,z) r19: div_active(x,y) -> div(x,y) The set of usable rules consists of r1, r2, r11 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: minus_active#_A(x1,x2) = x1 + x2 s_A(x1) = x1 + 3 minus_active_A(x1,x2) = x1 + x2 + 10 |0|_A() = 2 mark_A(x1) = x1 + 4 div_active_A(x1,x2) = x2 + 1 base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: minus_active#_A(x1,x2) = 0 s_A(x1) = max{3, x1 - 3} minus_active_A(x1,x2) = max{3, x1 - 1, x2 - 1} |0|_A = 0 mark_A(x1) = max{2, x1 - 48} div_active_A(x1,x2) = max{0, x1 - 57, x2 - 57} minus_active#!_A(x1,x2) = max{8, x1 - 4, x2 - 4} s!_A(x1) = max{7, x1 - 54} minus_active!_A(x1,x2) = max{10, x1 - 55, x2 - 4} |0|!_A = 6 mark!_A(x1) = max{8, x1 - 35} div_active!_A(x1,x2) = max{8, x1 - 35, x2 - 21} partial status: pi(minus_active#) = [] pi(s) = [1] pi(minus_active) = [2] pi(|0|) = [] pi(mark) = [] pi(div_active) = [2] 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: ge_active#(s(x),s(y)) -> ge_active#(x,y) and R consists of: r1: minus_active(|0|(),y) -> |0|() r2: mark(|0|()) -> |0|() r3: minus_active(s(x),s(y)) -> minus_active(x,y) r4: mark(s(x)) -> s(mark(x)) r5: ge_active(x,|0|()) -> true() r6: mark(minus(x,y)) -> minus_active(x,y) r7: ge_active(|0|(),s(y)) -> false() r8: mark(ge(x,y)) -> ge_active(x,y) r9: ge_active(s(x),s(y)) -> ge_active(x,y) r10: mark(div(x,y)) -> div_active(mark(x),y) r11: div_active(|0|(),s(y)) -> |0|() r12: mark(if(x,y,z)) -> if_active(mark(x),y,z) r13: div_active(s(x),s(y)) -> if_active(ge_active(x,y),s(div(minus(x,y),s(y))),|0|()) r14: if_active(true(),x,y) -> mark(x) r15: minus_active(x,y) -> minus(x,y) r16: if_active(false(),x,y) -> mark(y) r17: ge_active(x,y) -> ge(x,y) r18: if_active(x,y,z) -> if(x,y,z) r19: div_active(x,y) -> div(x,y) The set of usable rules consists of r1, r2, r11 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: ge_active#_A(x1,x2) = x1 + x2 s_A(x1) = x1 + 3 minus_active_A(x1,x2) = x1 + x2 + 14 |0|_A() = 2 mark_A(x1) = x1 + 9 div_active_A(x1,x2) = x2 + 9 base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: ge_active#_A(x1,x2) = 0 s_A(x1) = max{3, x1 - 3} minus_active_A(x1,x2) = max{3, x1 - 1, x2 - 1} |0|_A = 0 mark_A(x1) = max{2, x1 - 28} div_active_A(x1,x2) = max{0, x1 - 37, x2 - 37} ge_active#!_A(x1,x2) = max{7, x1 - 4, x2 - 4} s!_A(x1) = max{6, x1 - 56} minus_active!_A(x1,x2) = max{5, x1 - 35, x2 - 4} |0|!_A = 5 mark!_A(x1) = max{9, x1 - 34} div_active!_A(x1,x2) = max{8, x1 - 28, x2 - 36} partial status: pi(ge_active#) = [] pi(s) = [1] pi(minus_active) = [2] pi(|0|) = [] pi(mark) = [] pi(div_active) = [2] The following rules are removed: p1 Then no dependency pair remains.