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 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: max/plus interpretation on natural numbers: if_active#_A(x1,x2,x3) = 12 false_A = 1 mark#_A(x1) = 12 if_A(x1,x2,x3) = max{x2 + 13, x3 + 15} mark_A(x1) = max{11, x1 + 8} true_A = 1 div_A(x1,x2) = 10 div_active#_A(x1,x2) = 12 s_A(x1) = 2 ge_active_A(x1,x2) = 13 minus_A(x1,x2) = 1 |0|_A = 0 minus_active_A(x1,x2) = 10 ge_A(x1,x2) = 6 div_active_A(x1,x2) = 17 if_active_A(x1,x2,x3) = max{x2 + 14, x3 + 15} base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: if_active#_A(x1,x2,x3) = max{0, x1 - 40, x2 - 50, x3 - 30} false_A = 52 mark#_A(x1) = max{1, x1 - 50} if_A(x1,x2,x3) = max{x1 + 49, x2 + 39, x3 + 39} mark_A(x1) = x1 + 39 true_A = 53 div_A(x1,x2) = max{51, x1 + 38, x2 + 34} div_active#_A(x1,x2) = max{0, x2 - 16} s_A(x1) = max{33, x1} ge_active_A(x1,x2) = max{49, x2 + 24} minus_A(x1,x2) = 1 |0|_A = 29 minus_active_A(x1,x2) = 38 ge_A(x1,x2) = max{25, x2 - 7} div_active_A(x1,x2) = max{x1 + 38, x2 + 73} if_active_A(x1,x2,x3) = max{x1 + 49, x2 + 39, x3 + 45} if_active#!_A(x1,x2,x3) = max{x1 + 30, x2 + 44, x3 + 82} false!_A = 33 mark#!_A(x1) = max{81, x1 + 44} if!_A(x1,x2,x3) = 66 mark!_A(x1) = max{171, x1 + 120} true!_A = 113 div!_A(x1,x2) = max{x1 + 228, x2 - 72} div_active#!_A(x1,x2) = max{79, x2 + 78} s!_A(x1) = 230 ge_active!_A(x1,x2) = max{112, x2 - 1} minus!_A(x1,x2) = max{0, x1 - 148} |0|!_A = 77 minus_active!_A(x1,x2) = max{0, x1 - 148} ge!_A(x1,x2) = 1 div_active!_A(x1,x2) = max{227, x1 - 38, x2 - 340} if_active!_A(x1,x2,x3) = max{170, x1 + 118, x2 + 159} partial status: pi(if_active#) = [] pi(false) = [] pi(mark#) = [] pi(if) = [2] pi(mark) = [1] pi(true) = [] pi(div) = [] pi(div_active#) = [] pi(s) = [] pi(ge_active) = [] pi(minus) = [] pi(|0|) = [] pi(minus_active) = [] pi(ge) = [] pi(div_active) = [] pi(if_active) = [2] 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: max/plus interpretation on natural numbers: if_active#_A(x1,x2,x3) = 5 true_A = 2 mark#_A(x1) = 5 s_A(x1) = max{9, x1} div_A(x1,x2) = max{41, x1 - 8, x2 + 10} div_active#_A(x1,x2) = 5 mark_A(x1) = max{7, x1} ge_active_A(x1,x2) = max{4, x1 + 1, x2 - 19} minus_A(x1,x2) = x1 |0|_A = 20 minus_active_A(x1,x2) = max{7, x1} false_A = 6 ge_A(x1,x2) = max{4, x1 + 1, x2 - 19} div_active_A(x1,x2) = max{41, x1 - 8, x2 + 10} if_A(x1,x2,x3) = max{x2, x3 + 20} if_active_A(x1,x2,x3) = max{x2, x3 + 20} base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: if_active#_A(x1,x2,x3) = max{74, x2 - 110, x3 - 13} true_A = 3 mark#_A(x1) = max{74, x1 - 110} s_A(x1) = max{84, x1} div_A(x1,x2) = max{133, x1 + 107} div_active#_A(x1,x2) = max{74, x1 - 11} mark_A(x1) = max{11, x1 + 8} ge_active_A(x1,x2) = max{3, x2 - 3} minus_A(x1,x2) = 4 |0|_A = 2 minus_active_A(x1,x2) = 12 false_A = 0 ge_A(x1,x2) = max{3, x2 - 7} div_active_A(x1,x2) = max{141, x1 + 107} if_A(x1,x2,x3) = max{141, x2 + 58, x3 + 132} if_active_A(x1,x2,x3) = max{141, x2 + 58, x3 + 140} if_active#!_A(x1,x2,x3) = max{x2 - 94, x3 + 18} true!_A = 2 mark#!_A(x1) = max{1, x1 - 106} s!_A(x1) = 18 div!_A(x1,x2) = x2 div_active#!_A(x1,x2) = max{19, x1 - 9} mark!_A(x1) = max{0, x1 - 112} ge_active!_A(x1,x2) = max{85, x1 - 85, x2 - 85} minus!_A(x1,x2) = 0 |0|!_A = 0 minus_active!_A(x1,x2) = 0 false!_A = 18 ge!_A(x1,x2) = max{85, x1 - 85, x2 - 85} div_active!_A(x1,x2) = x2 if!_A(x1,x2,x3) = 0 if_active!_A(x1,x2,x3) = max{19, x2 - 111} partial status: pi(if_active#) = [] pi(true) = [] pi(mark#) = [] pi(s) = [] pi(div) = [] pi(div_active#) = [] pi(mark) = [1] pi(ge_active) = [] pi(minus) = [] pi(|0|) = [] pi(minus_active) = [] pi(false) = [] pi(ge) = [] pi(div_active) = [] pi(if) = [2] pi(if_active) = [2, 3] The following rules are removed: p1, p3, p4 -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: 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} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: 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 (no rules) Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: max/plus interpretation on natural numbers: mark#_A(x1) = max{42, x1 + 11} s_A(x1) = x1 + 42 base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: mark#_A(x1) = 0 s_A(x1) = max{3, x1 - 3} mark#!_A(x1) = 0 s!_A(x1) = max{0, x1 - 80} partial status: pi(mark#) = [1] 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: 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 (no rules) Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: max/plus interpretation on natural numbers: minus_active#_A(x1,x2) = max{11, x2} s_A(x1) = x1 + 11 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{10, x1 - 3} minus_active#!_A(x1,x2) = x2 + 5 s!_A(x1) = max{9, x1 + 6} partial status: pi(minus_active#) = [2] 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: 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 (no rules) Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: max/plus interpretation on natural numbers: ge_active#_A(x1,x2) = max{28, x2} s_A(x1) = x1 + 28 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{14, x1 - 3} ge_active#!_A(x1,x2) = x2 + 5 s!_A(x1) = max{9, x1 + 6} partial status: pi(ge_active#) = [2] pi(s) = [1] The following rules are removed: p1 Then no dependency pair remains.