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: lexicographic combination of reduction pairs: 1. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: if_active#_A(x1,x2,x3) = ((1,0),(1,1)) x2 + x3 + (0,5) false_A() = (0,5) mark#_A(x1) = x1 + (0,4) if_A(x1,x2,x3) = x1 + ((1,0),(1,1)) x2 + x3 + (0,6) mark_A(x1) = x1 + (0,2) true_A() = (0,3) div_A(x1,x2) = ((1,0),(1,1)) x1 + ((0,0),(1,0)) x2 + (1,0) div_active#_A(x1,x2) = ((1,0),(1,1)) x1 + ((0,0),(1,0)) x2 + (1,1) s_A(x1) = ((1,0),(0,0)) x1 + (20,6) ge_active_A(x1,x2) = ((0,0),(1,0)) x1 + ((0,0),(1,0)) x2 + (0,4) minus_A(x1,x2) = ((0,0),(1,0)) x2 + (0,7) |0|_A() = (0,8) minus_active_A(x1,x2) = ((0,0),(1,0)) x2 + (0,8) div_active_A(x1,x2) = ((1,0),(1,1)) x1 + ((0,0),(1,0)) x2 + (1,0) if_active_A(x1,x2,x3) = x1 + ((1,0),(1,1)) x2 + x3 + (0,6) ge_A(x1,x2) = ((0,0),(1,0)) x1 + ((0,0),(1,0)) x2 + (0,3) precedence: if_active# = mark# = mark = div_active# = minus_active = if_active > minus = div_active > s > |0| > ge_active > true > false > div > if = ge partial status: pi(if_active#) = [] pi(false) = [] pi(mark#) = [1] pi(if) = [] pi(mark) = [1] pi(true) = [] pi(div) = [1] pi(div_active#) = [1] pi(s) = [] pi(ge_active) = [] pi(minus) = [] pi(|0|) = [] pi(minus_active) = [] pi(div_active) = [1] pi(if_active) = [3] pi(ge) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: if_active#_A(x1,x2,x3) = (4,2) false_A() = (0,3) mark#_A(x1) = (5,15) if_A(x1,x2,x3) = (2,1) mark_A(x1) = ((1,0),(1,1)) x1 + (3,10) true_A() = (0,11) div_A(x1,x2) = x1 + (0,9) div_active#_A(x1,x2) = ((1,0),(1,1)) x1 + (3,1) s_A(x1) = (4,4) ge_active_A(x1,x2) = (0,14) minus_A(x1,x2) = (0,1) |0|_A() = (1,2) minus_active_A(x1,x2) = (0,1) div_active_A(x1,x2) = x1 + (0,9) if_active_A(x1,x2,x3) = (4,5) ge_A(x1,x2) = (0,5) precedence: ge_active > mark# > mark = s = minus = minus_active = if_active > if > div_active > div > if_active# = div_active# = |0| > ge > false > true partial status: pi(if_active#) = [] pi(false) = [] pi(mark#) = [] pi(if) = [] pi(mark) = [1] pi(true) = [] pi(div) = [1] pi(div_active#) = [1] pi(s) = [] pi(ge_active) = [] pi(minus) = [] pi(|0|) = [] pi(minus_active) = [] pi(div_active) = [] pi(if_active) = [] pi(ge) = [] The next rules are strictly ordered: p1, p3, p4, p6, p7 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: mark#(if(x,y,z)) -> mark#(x) p2: mark#(div(x,y)) -> mark#(x) p3: 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} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: mark#(if(x,y,z)) -> mark#(x) p2: mark#(s(x)) -> mark#(x) p3: mark#(div(x,y)) -> 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: lexicographic combination of reduction pairs: 1. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: mark#_A(x1) = ((1,0),(1,1)) x1 + (1,2) if_A(x1,x2,x3) = ((1,0),(1,1)) x1 + x3 + (2,3) s_A(x1) = x1 + (2,1) div_A(x1,x2) = x1 + x2 + (2,1) precedence: mark# = s > if > div partial status: pi(mark#) = [1] pi(if) = [1, 3] pi(s) = [] pi(div) = [1, 2] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: mark#_A(x1) = (0,0) if_A(x1,x2,x3) = (1,1) s_A(x1) = (1,1) div_A(x1,x2) = x1 + x2 precedence: div > if > mark# = s partial status: pi(mark#) = [] pi(if) = [] pi(s) = [] pi(div) = [1, 2] The next rules are strictly ordered: p3 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: mark#(if(x,y,z)) -> mark#(x) p2: 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} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: mark#(if(x,y,z)) -> mark#(x) p2: 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: lexicographic combination of reduction pairs: 1. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: mark#_A(x1) = ((1,0),(0,0)) x1 if_A(x1,x2,x3) = ((1,0),(0,0)) x1 + x3 + (1,1) s_A(x1) = ((1,0),(0,0)) x1 + (1,1) precedence: if > s > mark# partial status: pi(mark#) = [] pi(if) = [3] pi(s) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: mark#_A(x1) = (0,0) if_A(x1,x2,x3) = x3 + (1,1) s_A(x1) = (1,1) precedence: mark# = if = s partial status: pi(mark#) = [] pi(if) = [] pi(s) = [] The next rules are strictly ordered: p2 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: mark#(if(x,y,z)) -> 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#(if(x,y,z)) -> 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: lexicographic combination of reduction pairs: 1. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: mark#_A(x1) = ((1,0),(1,0)) x1 + (2,2) if_A(x1,x2,x3) = ((1,0),(0,0)) x1 + x2 + x3 + (1,1) precedence: mark# = if partial status: pi(mark#) = [] pi(if) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: mark#_A(x1) = (0,0) if_A(x1,x2,x3) = x2 + x3 + (1,1) precedence: mark# = if partial status: pi(mark#) = [] pi(if) = [2, 3] The next rules are strictly ordered: p1 We remove them from the problem. 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: lexicographic combination of reduction pairs: 1. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: minus_active#_A(x1,x2) = ((1,0),(0,0)) x1 s_A(x1) = ((1,0),(0,0)) x1 + (1,1) precedence: minus_active# > s partial status: pi(minus_active#) = [] pi(s) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: minus_active#_A(x1,x2) = (0,0) s_A(x1) = (1,1) precedence: minus_active# = s partial status: pi(minus_active#) = [] pi(s) = [] The next rules are strictly ordered: p1 We remove them from the problem. 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: lexicographic combination of reduction pairs: 1. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: ge_active#_A(x1,x2) = ((1,0),(0,0)) x1 s_A(x1) = ((1,0),(0,0)) x1 + (1,1) precedence: ge_active# > s partial status: pi(ge_active#) = [] pi(s) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: ge_active#_A(x1,x2) = (0,0) s_A(x1) = (1,1) precedence: ge_active# = s partial status: pi(ge_active#) = [] pi(s) = [] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains.