YES We show the termination of the TRS R: p(s(x)) -> x plus(x,|0|()) -> x plus(|0|(),y) -> y plus(s(x),y) -> s(plus(x,y)) plus(s(x),y) -> s(plus(p(s(x)),y)) plus(x,s(y)) -> s(plus(x,p(s(y)))) times(|0|(),y) -> |0|() times(s(|0|()),y) -> y times(s(x),y) -> plus(y,times(x,y)) div(|0|(),y) -> |0|() div(x,y) -> quot(x,y,y) quot(|0|(),s(y),z) -> |0|() quot(s(x),s(y),z) -> quot(x,y,z) quot(x,|0|(),s(z)) -> s(div(x,s(z))) div(div(x,y),z) -> div(x,times(y,z)) eq(|0|(),|0|()) -> true() eq(s(x),|0|()) -> false() eq(|0|(),s(y)) -> false() eq(s(x),s(y)) -> eq(x,y) divides(y,x) -> eq(x,times(div(x,y),y)) prime(s(s(x))) -> pr(s(s(x)),s(x)) pr(x,s(|0|())) -> true() pr(x,s(s(y))) -> if(divides(s(s(y)),x),x,s(y)) if(true(),x,y) -> false() if(false(),x,y) -> pr(x,y) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: plus#(s(x),y) -> plus#(x,y) p2: plus#(s(x),y) -> plus#(p(s(x)),y) p3: plus#(s(x),y) -> p#(s(x)) p4: plus#(x,s(y)) -> plus#(x,p(s(y))) p5: plus#(x,s(y)) -> p#(s(y)) p6: times#(s(x),y) -> plus#(y,times(x,y)) p7: times#(s(x),y) -> times#(x,y) p8: div#(x,y) -> quot#(x,y,y) p9: quot#(s(x),s(y),z) -> quot#(x,y,z) p10: quot#(x,|0|(),s(z)) -> div#(x,s(z)) p11: div#(div(x,y),z) -> div#(x,times(y,z)) p12: div#(div(x,y),z) -> times#(y,z) p13: eq#(s(x),s(y)) -> eq#(x,y) p14: divides#(y,x) -> eq#(x,times(div(x,y),y)) p15: divides#(y,x) -> times#(div(x,y),y) p16: divides#(y,x) -> div#(x,y) p17: prime#(s(s(x))) -> pr#(s(s(x)),s(x)) p18: pr#(x,s(s(y))) -> if#(divides(s(s(y)),x),x,s(y)) p19: pr#(x,s(s(y))) -> divides#(s(s(y)),x) p20: if#(false(),x,y) -> pr#(x,y) and R consists of: r1: p(s(x)) -> x r2: plus(x,|0|()) -> x r3: plus(|0|(),y) -> y r4: plus(s(x),y) -> s(plus(x,y)) r5: plus(s(x),y) -> s(plus(p(s(x)),y)) r6: plus(x,s(y)) -> s(plus(x,p(s(y)))) r7: times(|0|(),y) -> |0|() r8: times(s(|0|()),y) -> y r9: times(s(x),y) -> plus(y,times(x,y)) r10: div(|0|(),y) -> |0|() r11: div(x,y) -> quot(x,y,y) r12: quot(|0|(),s(y),z) -> |0|() r13: quot(s(x),s(y),z) -> quot(x,y,z) r14: quot(x,|0|(),s(z)) -> s(div(x,s(z))) r15: div(div(x,y),z) -> div(x,times(y,z)) r16: eq(|0|(),|0|()) -> true() r17: eq(s(x),|0|()) -> false() r18: eq(|0|(),s(y)) -> false() r19: eq(s(x),s(y)) -> eq(x,y) r20: divides(y,x) -> eq(x,times(div(x,y),y)) r21: prime(s(s(x))) -> pr(s(s(x)),s(x)) r22: pr(x,s(|0|())) -> true() r23: pr(x,s(s(y))) -> if(divides(s(s(y)),x),x,s(y)) r24: if(true(),x,y) -> false() r25: if(false(),x,y) -> pr(x,y) The estimated dependency graph contains the following SCCs: {p18, p20} {p8, p9, p10, p11} {p7} {p1, p2, p4} {p13} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: if#(false(),x,y) -> pr#(x,y) p2: pr#(x,s(s(y))) -> if#(divides(s(s(y)),x),x,s(y)) and R consists of: r1: p(s(x)) -> x r2: plus(x,|0|()) -> x r3: plus(|0|(),y) -> y r4: plus(s(x),y) -> s(plus(x,y)) r5: plus(s(x),y) -> s(plus(p(s(x)),y)) r6: plus(x,s(y)) -> s(plus(x,p(s(y)))) r7: times(|0|(),y) -> |0|() r8: times(s(|0|()),y) -> y r9: times(s(x),y) -> plus(y,times(x,y)) r10: div(|0|(),y) -> |0|() r11: div(x,y) -> quot(x,y,y) r12: quot(|0|(),s(y),z) -> |0|() r13: quot(s(x),s(y),z) -> quot(x,y,z) r14: quot(x,|0|(),s(z)) -> s(div(x,s(z))) r15: div(div(x,y),z) -> div(x,times(y,z)) r16: eq(|0|(),|0|()) -> true() r17: eq(s(x),|0|()) -> false() r18: eq(|0|(),s(y)) -> false() r19: eq(s(x),s(y)) -> eq(x,y) r20: divides(y,x) -> eq(x,times(div(x,y),y)) r21: prime(s(s(x))) -> pr(s(s(x)),s(x)) r22: pr(x,s(|0|())) -> true() r23: pr(x,s(s(y))) -> if(divides(s(s(y)),x),x,s(y)) r24: if(true(),x,y) -> false() r25: if(false(),x,y) -> pr(x,y) The set of usable rules consists of r3, r8, r10, r16, r22, r24 Take the reduction pair: generalized weighted path order (>=MG, >MG) base order 1: matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: if#_A(x1,x2,x3) = x3 false_A() = 3 pr#_A(x1,x2) = x2 s_A(x1) = x1 divides_A(x1,x2) = 1 plus_A(x1,x2) = x2 + 2 |0|_A() = 2 times_A(x1,x2) = x2 + 4 div_A(x1,x2) = 3 eq_A(x1,x2) = x2 true_A() = 1 pr_A(x1,x2) = x2 + 5 if_A(x1,x2,x3) = 4 base order 2: precedence: |0| > s = plus = pr > if# = div = true = if > pr# = times = eq > false = divides partial status: pi(if#) = [3] pi(false) = [] pi(pr#) = [2] pi(s) = [1] pi(divides) = [] pi(plus) = [] pi(|0|) = [] pi(times) = [] pi(div) = [] pi(eq) = [] pi(true) = [] pi(pr) = [] pi(if) = [] The following rules are removed: p2 -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: if#(false(),x,y) -> pr#(x,y) and R consists of: r1: p(s(x)) -> x r2: plus(x,|0|()) -> x r3: plus(|0|(),y) -> y r4: plus(s(x),y) -> s(plus(x,y)) r5: plus(s(x),y) -> s(plus(p(s(x)),y)) r6: plus(x,s(y)) -> s(plus(x,p(s(y)))) r7: times(|0|(),y) -> |0|() r8: times(s(|0|()),y) -> y r9: times(s(x),y) -> plus(y,times(x,y)) r10: div(|0|(),y) -> |0|() r11: div(x,y) -> quot(x,y,y) r12: quot(|0|(),s(y),z) -> |0|() r13: quot(s(x),s(y),z) -> quot(x,y,z) r14: quot(x,|0|(),s(z)) -> s(div(x,s(z))) r15: div(div(x,y),z) -> div(x,times(y,z)) r16: eq(|0|(),|0|()) -> true() r17: eq(s(x),|0|()) -> false() r18: eq(|0|(),s(y)) -> false() r19: eq(s(x),s(y)) -> eq(x,y) r20: divides(y,x) -> eq(x,times(div(x,y),y)) r21: prime(s(s(x))) -> pr(s(s(x)),s(x)) r22: pr(x,s(|0|())) -> true() r23: pr(x,s(s(y))) -> if(divides(s(s(y)),x),x,s(y)) r24: if(true(),x,y) -> false() r25: if(false(),x,y) -> pr(x,y) The estimated dependency graph contains the following SCCs: (no SCCs) -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: div#(div(x,y),z) -> div#(x,times(y,z)) p2: div#(x,y) -> quot#(x,y,y) p3: quot#(x,|0|(),s(z)) -> div#(x,s(z)) p4: quot#(s(x),s(y),z) -> quot#(x,y,z) and R consists of: r1: p(s(x)) -> x r2: plus(x,|0|()) -> x r3: plus(|0|(),y) -> y r4: plus(s(x),y) -> s(plus(x,y)) r5: plus(s(x),y) -> s(plus(p(s(x)),y)) r6: plus(x,s(y)) -> s(plus(x,p(s(y)))) r7: times(|0|(),y) -> |0|() r8: times(s(|0|()),y) -> y r9: times(s(x),y) -> plus(y,times(x,y)) r10: div(|0|(),y) -> |0|() r11: div(x,y) -> quot(x,y,y) r12: quot(|0|(),s(y),z) -> |0|() r13: quot(s(x),s(y),z) -> quot(x,y,z) r14: quot(x,|0|(),s(z)) -> s(div(x,s(z))) r15: div(div(x,y),z) -> div(x,times(y,z)) r16: eq(|0|(),|0|()) -> true() r17: eq(s(x),|0|()) -> false() r18: eq(|0|(),s(y)) -> false() r19: eq(s(x),s(y)) -> eq(x,y) r20: divides(y,x) -> eq(x,times(div(x,y),y)) r21: prime(s(s(x))) -> pr(s(s(x)),s(x)) r22: pr(x,s(|0|())) -> true() r23: pr(x,s(s(y))) -> if(divides(s(s(y)),x),x,s(y)) r24: if(true(),x,y) -> false() r25: if(false(),x,y) -> pr(x,y) The set of usable rules consists of r2, r10, r12, r16, r17, r18, r22, r24 Take the reduction pair: generalized weighted path order (>=MG, >MG) base order 1: matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: div#_A(x1,x2) = x1 + 2 div_A(x1,x2) = x1 + x2 + 3 times_A(x1,x2) = 0 quot#_A(x1,x2,x3) = x1 + 2 |0|_A() = 1 s_A(x1) = x1 + 3 plus_A(x1,x2) = x1 + 4 quot_A(x1,x2,x3) = 2 eq_A(x1,x2) = x2 + 5 true_A() = 5 false_A() = 4 pr_A(x1,x2) = 7 if_A(x1,x2,x3) = 8 base order 2: precedence: times > div# = quot# = eq > div = true = if > quot = false > s = plus = pr > |0| partial status: pi(div#) = [1] pi(div) = [] pi(times) = [] pi(quot#) = [1] pi(|0|) = [] pi(s) = [] pi(plus) = [1] pi(quot) = [] pi(eq) = [2] pi(true) = [] pi(false) = [] pi(pr) = [] pi(if) = [] The following rules are removed: p4 -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: div#(div(x,y),z) -> div#(x,times(y,z)) p2: div#(x,y) -> quot#(x,y,y) p3: quot#(x,|0|(),s(z)) -> div#(x,s(z)) and R consists of: r1: p(s(x)) -> x r2: plus(x,|0|()) -> x r3: plus(|0|(),y) -> y r4: plus(s(x),y) -> s(plus(x,y)) r5: plus(s(x),y) -> s(plus(p(s(x)),y)) r6: plus(x,s(y)) -> s(plus(x,p(s(y)))) r7: times(|0|(),y) -> |0|() r8: times(s(|0|()),y) -> y r9: times(s(x),y) -> plus(y,times(x,y)) r10: div(|0|(),y) -> |0|() r11: div(x,y) -> quot(x,y,y) r12: quot(|0|(),s(y),z) -> |0|() r13: quot(s(x),s(y),z) -> quot(x,y,z) r14: quot(x,|0|(),s(z)) -> s(div(x,s(z))) r15: div(div(x,y),z) -> div(x,times(y,z)) r16: eq(|0|(),|0|()) -> true() r17: eq(s(x),|0|()) -> false() r18: eq(|0|(),s(y)) -> false() r19: eq(s(x),s(y)) -> eq(x,y) r20: divides(y,x) -> eq(x,times(div(x,y),y)) r21: prime(s(s(x))) -> pr(s(s(x)),s(x)) r22: pr(x,s(|0|())) -> true() r23: pr(x,s(s(y))) -> if(divides(s(s(y)),x),x,s(y)) r24: if(true(),x,y) -> false() r25: if(false(),x,y) -> pr(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: div#(div(x,y),z) -> div#(x,times(y,z)) p2: div#(x,y) -> quot#(x,y,y) p3: quot#(x,|0|(),s(z)) -> div#(x,s(z)) and R consists of: r1: p(s(x)) -> x r2: plus(x,|0|()) -> x r3: plus(|0|(),y) -> y r4: plus(s(x),y) -> s(plus(x,y)) r5: plus(s(x),y) -> s(plus(p(s(x)),y)) r6: plus(x,s(y)) -> s(plus(x,p(s(y)))) r7: times(|0|(),y) -> |0|() r8: times(s(|0|()),y) -> y r9: times(s(x),y) -> plus(y,times(x,y)) r10: div(|0|(),y) -> |0|() r11: div(x,y) -> quot(x,y,y) r12: quot(|0|(),s(y),z) -> |0|() r13: quot(s(x),s(y),z) -> quot(x,y,z) r14: quot(x,|0|(),s(z)) -> s(div(x,s(z))) r15: div(div(x,y),z) -> div(x,times(y,z)) r16: eq(|0|(),|0|()) -> true() r17: eq(s(x),|0|()) -> false() r18: eq(|0|(),s(y)) -> false() r19: eq(s(x),s(y)) -> eq(x,y) r20: divides(y,x) -> eq(x,times(div(x,y),y)) r21: prime(s(s(x))) -> pr(s(s(x)),s(x)) r22: pr(x,s(|0|())) -> true() r23: pr(x,s(s(y))) -> if(divides(s(s(y)),x),x,s(y)) r24: if(true(),x,y) -> false() r25: if(false(),x,y) -> pr(x,y) The set of usable rules consists of r2, r3, r10, r12, r16, r17, r18, r19, r22, r24 Take the reduction pair: generalized weighted path order (>=MG, >MG) base order 1: matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: div#_A(x1,x2) = x1 div_A(x1,x2) = x1 + 4 times_A(x1,x2) = 0 quot#_A(x1,x2,x3) = x1 |0|_A() = 3 s_A(x1) = x1 + 6 plus_A(x1,x2) = x1 + x2 + 7 quot_A(x1,x2,x3) = x1 + x3 + 7 eq_A(x1,x2) = x1 true_A() = 2 false_A() = 1 pr_A(x1,x2) = x2 if_A(x1,x2,x3) = 2 base order 2: precedence: quot > |0| = eq > div# = quot# = plus = true = if > div = times = s = false > pr partial status: pi(div#) = [] pi(div) = [] pi(times) = [] pi(quot#) = [] pi(|0|) = [] pi(s) = [1] pi(plus) = [1] pi(quot) = [3] pi(eq) = [1] pi(true) = [] pi(false) = [] pi(pr) = [] pi(if) = [] The following rules are removed: p1 -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: div#(x,y) -> quot#(x,y,y) p2: quot#(x,|0|(),s(z)) -> div#(x,s(z)) and R consists of: r1: p(s(x)) -> x r2: plus(x,|0|()) -> x r3: plus(|0|(),y) -> y r4: plus(s(x),y) -> s(plus(x,y)) r5: plus(s(x),y) -> s(plus(p(s(x)),y)) r6: plus(x,s(y)) -> s(plus(x,p(s(y)))) r7: times(|0|(),y) -> |0|() r8: times(s(|0|()),y) -> y r9: times(s(x),y) -> plus(y,times(x,y)) r10: div(|0|(),y) -> |0|() r11: div(x,y) -> quot(x,y,y) r12: quot(|0|(),s(y),z) -> |0|() r13: quot(s(x),s(y),z) -> quot(x,y,z) r14: quot(x,|0|(),s(z)) -> s(div(x,s(z))) r15: div(div(x,y),z) -> div(x,times(y,z)) r16: eq(|0|(),|0|()) -> true() r17: eq(s(x),|0|()) -> false() r18: eq(|0|(),s(y)) -> false() r19: eq(s(x),s(y)) -> eq(x,y) r20: divides(y,x) -> eq(x,times(div(x,y),y)) r21: prime(s(s(x))) -> pr(s(s(x)),s(x)) r22: pr(x,s(|0|())) -> true() r23: pr(x,s(s(y))) -> if(divides(s(s(y)),x),x,s(y)) r24: if(true(),x,y) -> false() r25: if(false(),x,y) -> pr(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: div#(x,y) -> quot#(x,y,y) p2: quot#(x,|0|(),s(z)) -> div#(x,s(z)) and R consists of: r1: p(s(x)) -> x r2: plus(x,|0|()) -> x r3: plus(|0|(),y) -> y r4: plus(s(x),y) -> s(plus(x,y)) r5: plus(s(x),y) -> s(plus(p(s(x)),y)) r6: plus(x,s(y)) -> s(plus(x,p(s(y)))) r7: times(|0|(),y) -> |0|() r8: times(s(|0|()),y) -> y r9: times(s(x),y) -> plus(y,times(x,y)) r10: div(|0|(),y) -> |0|() r11: div(x,y) -> quot(x,y,y) r12: quot(|0|(),s(y),z) -> |0|() r13: quot(s(x),s(y),z) -> quot(x,y,z) r14: quot(x,|0|(),s(z)) -> s(div(x,s(z))) r15: div(div(x,y),z) -> div(x,times(y,z)) r16: eq(|0|(),|0|()) -> true() r17: eq(s(x),|0|()) -> false() r18: eq(|0|(),s(y)) -> false() r19: eq(s(x),s(y)) -> eq(x,y) r20: divides(y,x) -> eq(x,times(div(x,y),y)) r21: prime(s(s(x))) -> pr(s(s(x)),s(x)) r22: pr(x,s(|0|())) -> true() r23: pr(x,s(s(y))) -> if(divides(s(s(y)),x),x,s(y)) r24: if(true(),x,y) -> false() r25: if(false(),x,y) -> pr(x,y) The set of usable rules consists of r3, r4, r5, r6, r7, r10, r12, r14, r16, r17, r18, r22, r24 Take the reduction pair: generalized weighted path order (>=MG, >MG) base order 1: matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: div#_A(x1,x2) = x2 + 1 quot#_A(x1,x2,x3) = x2 |0|_A() = 5 s_A(x1) = 3 plus_A(x1,x2) = x2 + 4 p_A(x1) = 1 times_A(x1,x2) = x1 + 13 div_A(x1,x2) = x1 + 6 quot_A(x1,x2,x3) = x1 + 7 eq_A(x1,x2) = x1 + x2 + 4 true_A() = 2 false_A() = 1 pr_A(x1,x2) = 4 if_A(x1,x2,x3) = x2 + 5 base order 2: precedence: div# = times = quot = if > quot# = div = eq = pr > s > plus = true > p = false > |0| partial status: pi(div#) = [] pi(quot#) = [2] pi(|0|) = [] pi(s) = [] pi(plus) = [2] pi(p) = [] pi(times) = [] pi(div) = [1] pi(quot) = [1] pi(eq) = [1, 2] pi(true) = [] pi(false) = [] pi(pr) = [] pi(if) = [2] The following rules are removed: p2 -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: div#(x,y) -> quot#(x,y,y) and R consists of: r1: p(s(x)) -> x r2: plus(x,|0|()) -> x r3: plus(|0|(),y) -> y r4: plus(s(x),y) -> s(plus(x,y)) r5: plus(s(x),y) -> s(plus(p(s(x)),y)) r6: plus(x,s(y)) -> s(plus(x,p(s(y)))) r7: times(|0|(),y) -> |0|() r8: times(s(|0|()),y) -> y r9: times(s(x),y) -> plus(y,times(x,y)) r10: div(|0|(),y) -> |0|() r11: div(x,y) -> quot(x,y,y) r12: quot(|0|(),s(y),z) -> |0|() r13: quot(s(x),s(y),z) -> quot(x,y,z) r14: quot(x,|0|(),s(z)) -> s(div(x,s(z))) r15: div(div(x,y),z) -> div(x,times(y,z)) r16: eq(|0|(),|0|()) -> true() r17: eq(s(x),|0|()) -> false() r18: eq(|0|(),s(y)) -> false() r19: eq(s(x),s(y)) -> eq(x,y) r20: divides(y,x) -> eq(x,times(div(x,y),y)) r21: prime(s(s(x))) -> pr(s(s(x)),s(x)) r22: pr(x,s(|0|())) -> true() r23: pr(x,s(s(y))) -> if(divides(s(s(y)),x),x,s(y)) r24: if(true(),x,y) -> false() r25: if(false(),x,y) -> pr(x,y) The estimated dependency graph contains the following SCCs: (no SCCs) -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: times#(s(x),y) -> times#(x,y) and R consists of: r1: p(s(x)) -> x r2: plus(x,|0|()) -> x r3: plus(|0|(),y) -> y r4: plus(s(x),y) -> s(plus(x,y)) r5: plus(s(x),y) -> s(plus(p(s(x)),y)) r6: plus(x,s(y)) -> s(plus(x,p(s(y)))) r7: times(|0|(),y) -> |0|() r8: times(s(|0|()),y) -> y r9: times(s(x),y) -> plus(y,times(x,y)) r10: div(|0|(),y) -> |0|() r11: div(x,y) -> quot(x,y,y) r12: quot(|0|(),s(y),z) -> |0|() r13: quot(s(x),s(y),z) -> quot(x,y,z) r14: quot(x,|0|(),s(z)) -> s(div(x,s(z))) r15: div(div(x,y),z) -> div(x,times(y,z)) r16: eq(|0|(),|0|()) -> true() r17: eq(s(x),|0|()) -> false() r18: eq(|0|(),s(y)) -> false() r19: eq(s(x),s(y)) -> eq(x,y) r20: divides(y,x) -> eq(x,times(div(x,y),y)) r21: prime(s(s(x))) -> pr(s(s(x)),s(x)) r22: pr(x,s(|0|())) -> true() r23: pr(x,s(s(y))) -> if(divides(s(s(y)),x),x,s(y)) r24: if(true(),x,y) -> false() r25: if(false(),x,y) -> pr(x,y) The set of usable rules consists of r2, r3, r8, r10, r12, r16, r17, r18, r21, r22, r23, r24, r25 Take the reduction pair: generalized weighted path order (>=MG, >MG) base order 1: matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: times#_A(x1,x2) = x1 s_A(x1) = x1 + 5 plus_A(x1,x2) = x1 + x2 + 6 |0|_A() = 1 times_A(x1,x2) = x1 + x2 + 6 div_A(x1,x2) = x1 + x2 + 7 quot_A(x1,x2,x3) = x1 + x3 + 13 eq_A(x1,x2) = 4 true_A() = 3 false_A() = 2 prime_A(x1) = x1 + 1 pr_A(x1,x2) = 4 if_A(x1,x2,x3) = 4 divides_A(x1,x2) = x1 base order 2: precedence: plus > times = quot > div = prime > s > times# = eq > true = divides > |0| > false > pr = if partial status: pi(times#) = [1] pi(s) = [1] pi(plus) = [1] pi(|0|) = [] pi(times) = [] pi(div) = [2] pi(quot) = [3] pi(eq) = [] pi(true) = [] pi(false) = [] pi(prime) = [1] pi(pr) = [] pi(if) = [] pi(divides) = [] 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: plus#(s(x),y) -> plus#(x,y) p2: plus#(x,s(y)) -> plus#(x,p(s(y))) p3: plus#(s(x),y) -> plus#(p(s(x)),y) and R consists of: r1: p(s(x)) -> x r2: plus(x,|0|()) -> x r3: plus(|0|(),y) -> y r4: plus(s(x),y) -> s(plus(x,y)) r5: plus(s(x),y) -> s(plus(p(s(x)),y)) r6: plus(x,s(y)) -> s(plus(x,p(s(y)))) r7: times(|0|(),y) -> |0|() r8: times(s(|0|()),y) -> y r9: times(s(x),y) -> plus(y,times(x,y)) r10: div(|0|(),y) -> |0|() r11: div(x,y) -> quot(x,y,y) r12: quot(|0|(),s(y),z) -> |0|() r13: quot(s(x),s(y),z) -> quot(x,y,z) r14: quot(x,|0|(),s(z)) -> s(div(x,s(z))) r15: div(div(x,y),z) -> div(x,times(y,z)) r16: eq(|0|(),|0|()) -> true() r17: eq(s(x),|0|()) -> false() r18: eq(|0|(),s(y)) -> false() r19: eq(s(x),s(y)) -> eq(x,y) r20: divides(y,x) -> eq(x,times(div(x,y),y)) r21: prime(s(s(x))) -> pr(s(s(x)),s(x)) r22: pr(x,s(|0|())) -> true() r23: pr(x,s(s(y))) -> if(divides(s(s(y)),x),x,s(y)) r24: if(true(),x,y) -> false() r25: if(false(),x,y) -> pr(x,y) The set of usable rules consists of r1, r2, r3, r7, r10, r12, r16, r17, r18, r19, r22, r24 Take the reduction pair: generalized weighted path order (>=MG, >MG) base order 1: matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: plus#_A(x1,x2) = x1 s_A(x1) = x1 + 6 p_A(x1) = x1 plus_A(x1,x2) = x1 + x2 + 7 |0|_A() = 3 times_A(x1,x2) = 5 div_A(x1,x2) = 4 quot_A(x1,x2,x3) = x1 + x3 + 7 eq_A(x1,x2) = x1 + x2 + 7 true_A() = 2 false_A() = 1 pr_A(x1,x2) = x1 + x2 + 7 if_A(x1,x2,x3) = x3 + 2 base order 2: precedence: pr > plus = quot > s > plus# = times > p = div > |0| > true > eq > false = if partial status: pi(plus#) = [1] pi(s) = [] pi(p) = [] pi(plus) = [2] pi(|0|) = [] pi(times) = [] pi(div) = [] pi(quot) = [3] pi(eq) = [1, 2] pi(true) = [] pi(false) = [] pi(pr) = [] pi(if) = [3] The following rules are removed: p3 -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: plus#(s(x),y) -> plus#(x,y) p2: plus#(x,s(y)) -> plus#(x,p(s(y))) and R consists of: r1: p(s(x)) -> x r2: plus(x,|0|()) -> x r3: plus(|0|(),y) -> y r4: plus(s(x),y) -> s(plus(x,y)) r5: plus(s(x),y) -> s(plus(p(s(x)),y)) r6: plus(x,s(y)) -> s(plus(x,p(s(y)))) r7: times(|0|(),y) -> |0|() r8: times(s(|0|()),y) -> y r9: times(s(x),y) -> plus(y,times(x,y)) r10: div(|0|(),y) -> |0|() r11: div(x,y) -> quot(x,y,y) r12: quot(|0|(),s(y),z) -> |0|() r13: quot(s(x),s(y),z) -> quot(x,y,z) r14: quot(x,|0|(),s(z)) -> s(div(x,s(z))) r15: div(div(x,y),z) -> div(x,times(y,z)) r16: eq(|0|(),|0|()) -> true() r17: eq(s(x),|0|()) -> false() r18: eq(|0|(),s(y)) -> false() r19: eq(s(x),s(y)) -> eq(x,y) r20: divides(y,x) -> eq(x,times(div(x,y),y)) r21: prime(s(s(x))) -> pr(s(s(x)),s(x)) r22: pr(x,s(|0|())) -> true() r23: pr(x,s(s(y))) -> if(divides(s(s(y)),x),x,s(y)) r24: if(true(),x,y) -> false() r25: if(false(),x,y) -> pr(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: plus#(s(x),y) -> plus#(x,y) p2: plus#(x,s(y)) -> plus#(x,p(s(y))) and R consists of: r1: p(s(x)) -> x r2: plus(x,|0|()) -> x r3: plus(|0|(),y) -> y r4: plus(s(x),y) -> s(plus(x,y)) r5: plus(s(x),y) -> s(plus(p(s(x)),y)) r6: plus(x,s(y)) -> s(plus(x,p(s(y)))) r7: times(|0|(),y) -> |0|() r8: times(s(|0|()),y) -> y r9: times(s(x),y) -> plus(y,times(x,y)) r10: div(|0|(),y) -> |0|() r11: div(x,y) -> quot(x,y,y) r12: quot(|0|(),s(y),z) -> |0|() r13: quot(s(x),s(y),z) -> quot(x,y,z) r14: quot(x,|0|(),s(z)) -> s(div(x,s(z))) r15: div(div(x,y),z) -> div(x,times(y,z)) r16: eq(|0|(),|0|()) -> true() r17: eq(s(x),|0|()) -> false() r18: eq(|0|(),s(y)) -> false() r19: eq(s(x),s(y)) -> eq(x,y) r20: divides(y,x) -> eq(x,times(div(x,y),y)) r21: prime(s(s(x))) -> pr(s(s(x)),s(x)) r22: pr(x,s(|0|())) -> true() r23: pr(x,s(s(y))) -> if(divides(s(s(y)),x),x,s(y)) r24: if(true(),x,y) -> false() r25: if(false(),x,y) -> pr(x,y) The set of usable rules consists of r2, r3, r7, r10, r12, r16, r17, r18, r19 Take the reduction pair: generalized weighted path order (>=MG, >MG) base order 1: matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: plus#_A(x1,x2) = x1 + 1 s_A(x1) = x1 p_A(x1) = x1 + 2 plus_A(x1,x2) = x1 + x2 + 3 |0|_A() = 3 times_A(x1,x2) = x1 + 5 div_A(x1,x2) = x1 + 2 quot_A(x1,x2,x3) = x1 + x2 + x3 + 3 eq_A(x1,x2) = x1 + x2 + 1 true_A() = 2 false_A() = 1 base order 2: precedence: quot > times = div > |0| = eq > plus# = s = p = plus > true > false partial status: pi(plus#) = [1] pi(s) = [1] pi(p) = [] pi(plus) = [1] pi(|0|) = [] pi(times) = [] pi(div) = [1] pi(quot) = [3] pi(eq) = [2] pi(true) = [] pi(false) = [] The following rules are removed: p1 -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: plus#(x,s(y)) -> plus#(x,p(s(y))) and R consists of: r1: p(s(x)) -> x r2: plus(x,|0|()) -> x r3: plus(|0|(),y) -> y r4: plus(s(x),y) -> s(plus(x,y)) r5: plus(s(x),y) -> s(plus(p(s(x)),y)) r6: plus(x,s(y)) -> s(plus(x,p(s(y)))) r7: times(|0|(),y) -> |0|() r8: times(s(|0|()),y) -> y r9: times(s(x),y) -> plus(y,times(x,y)) r10: div(|0|(),y) -> |0|() r11: div(x,y) -> quot(x,y,y) r12: quot(|0|(),s(y),z) -> |0|() r13: quot(s(x),s(y),z) -> quot(x,y,z) r14: quot(x,|0|(),s(z)) -> s(div(x,s(z))) r15: div(div(x,y),z) -> div(x,times(y,z)) r16: eq(|0|(),|0|()) -> true() r17: eq(s(x),|0|()) -> false() r18: eq(|0|(),s(y)) -> false() r19: eq(s(x),s(y)) -> eq(x,y) r20: divides(y,x) -> eq(x,times(div(x,y),y)) r21: prime(s(s(x))) -> pr(s(s(x)),s(x)) r22: pr(x,s(|0|())) -> true() r23: pr(x,s(s(y))) -> if(divides(s(s(y)),x),x,s(y)) r24: if(true(),x,y) -> false() r25: if(false(),x,y) -> pr(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: plus#(x,s(y)) -> plus#(x,p(s(y))) and R consists of: r1: p(s(x)) -> x r2: plus(x,|0|()) -> x r3: plus(|0|(),y) -> y r4: plus(s(x),y) -> s(plus(x,y)) r5: plus(s(x),y) -> s(plus(p(s(x)),y)) r6: plus(x,s(y)) -> s(plus(x,p(s(y)))) r7: times(|0|(),y) -> |0|() r8: times(s(|0|()),y) -> y r9: times(s(x),y) -> plus(y,times(x,y)) r10: div(|0|(),y) -> |0|() r11: div(x,y) -> quot(x,y,y) r12: quot(|0|(),s(y),z) -> |0|() r13: quot(s(x),s(y),z) -> quot(x,y,z) r14: quot(x,|0|(),s(z)) -> s(div(x,s(z))) r15: div(div(x,y),z) -> div(x,times(y,z)) r16: eq(|0|(),|0|()) -> true() r17: eq(s(x),|0|()) -> false() r18: eq(|0|(),s(y)) -> false() r19: eq(s(x),s(y)) -> eq(x,y) r20: divides(y,x) -> eq(x,times(div(x,y),y)) r21: prime(s(s(x))) -> pr(s(s(x)),s(x)) r22: pr(x,s(|0|())) -> true() r23: pr(x,s(s(y))) -> if(divides(s(s(y)),x),x,s(y)) r24: if(true(),x,y) -> false() r25: if(false(),x,y) -> pr(x,y) The set of usable rules consists of r1, r2, r3, r7, r10, r12, r16, r17, r18, r22, r24 Take the reduction pair: generalized weighted path order (>=MG, >MG) base order 1: matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: plus#_A(x1,x2) = x2 s_A(x1) = x1 + 5 p_A(x1) = x1 plus_A(x1,x2) = x1 + x2 + 4 |0|_A() = 4 times_A(x1,x2) = x1 + 25 div_A(x1,x2) = x1 + 12 quot_A(x1,x2,x3) = x1 + x3 + 6 eq_A(x1,x2) = x1 + x2 + 6 true_A() = 1 false_A() = 3 pr_A(x1,x2) = 2 if_A(x1,x2,x3) = x3 + 4 base order 2: precedence: plus = false > times = eq > s = div = quot = if > plus# = |0| = pr > p = true partial status: pi(plus#) = [2] pi(s) = [1] pi(p) = [] pi(plus) = [1] pi(|0|) = [] pi(times) = [] pi(div) = [1] pi(quot) = [3] pi(eq) = [1] pi(true) = [] pi(false) = [] pi(pr) = [] pi(if) = [] 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: eq#(s(x),s(y)) -> eq#(x,y) and R consists of: r1: p(s(x)) -> x r2: plus(x,|0|()) -> x r3: plus(|0|(),y) -> y r4: plus(s(x),y) -> s(plus(x,y)) r5: plus(s(x),y) -> s(plus(p(s(x)),y)) r6: plus(x,s(y)) -> s(plus(x,p(s(y)))) r7: times(|0|(),y) -> |0|() r8: times(s(|0|()),y) -> y r9: times(s(x),y) -> plus(y,times(x,y)) r10: div(|0|(),y) -> |0|() r11: div(x,y) -> quot(x,y,y) r12: quot(|0|(),s(y),z) -> |0|() r13: quot(s(x),s(y),z) -> quot(x,y,z) r14: quot(x,|0|(),s(z)) -> s(div(x,s(z))) r15: div(div(x,y),z) -> div(x,times(y,z)) r16: eq(|0|(),|0|()) -> true() r17: eq(s(x),|0|()) -> false() r18: eq(|0|(),s(y)) -> false() r19: eq(s(x),s(y)) -> eq(x,y) r20: divides(y,x) -> eq(x,times(div(x,y),y)) r21: prime(s(s(x))) -> pr(s(s(x)),s(x)) r22: pr(x,s(|0|())) -> true() r23: pr(x,s(s(y))) -> if(divides(s(s(y)),x),x,s(y)) r24: if(true(),x,y) -> false() r25: if(false(),x,y) -> pr(x,y) The set of usable rules consists of r2, r7, r10, r12, r16, r17, r18, r21, r22, r23, r24, r25 Take the reduction pair: generalized weighted path order (>=MG, >MG) base order 1: matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: eq#_A(x1,x2) = x1 + x2 + 1 s_A(x1) = x1 plus_A(x1,x2) = x1 + 2 |0|_A() = 2 times_A(x1,x2) = x1 + 7 div_A(x1,x2) = x1 + 3 quot_A(x1,x2,x3) = x1 + x3 + 4 eq_A(x1,x2) = x1 + x2 + 2 true_A() = 1 false_A() = 3 prime_A(x1) = x1 + 5 pr_A(x1,x2) = 4 if_A(x1,x2,x3) = 4 divides_A(x1,x2) = x1 base order 2: precedence: times = quot > div = false > eq# = plus = |0| = eq = prime > s = true = pr = if > divides partial status: pi(eq#) = [1] pi(s) = [1] pi(plus) = [] pi(|0|) = [] pi(times) = [1] pi(div) = [1] pi(quot) = [3] pi(eq) = [] pi(true) = [] pi(false) = [] pi(prime) = [1] pi(pr) = [] pi(if) = [] pi(divides) = [] The following rules are removed: p1 Then no dependency pair remains.