YES We show the termination of the TRS R: p(|0|()) -> |0|() 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(zero(y),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(zero(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) zero(div(x,x)) -> x zero(divides(x,x)) -> x zero(times(x,x)) -> x zero(quot(x,x,x)) -> x zero(s(x)) -> if(eq(x,s(|0|())),plus(zero(|0|()),|0|()),s(plus(|0|(),zero(|0|())))) -- 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(zero(y),z)) p12: div#(div(x,y),z) -> times#(zero(y),z) p13: div#(div(x,y),z) -> zero#(y) p14: eq#(s(x),s(y)) -> eq#(x,y) p15: divides#(y,x) -> eq#(x,times(div(x,y),y)) p16: divides#(y,x) -> times#(div(x,y),y) p17: divides#(y,x) -> div#(x,y) p18: prime#(s(s(x))) -> pr#(s(s(x)),s(x)) p19: pr#(x,s(s(y))) -> if#(divides(s(s(y)),x),x,s(y)) p20: pr#(x,s(s(y))) -> divides#(s(s(y)),x) p21: if#(false(),x,y) -> pr#(x,y) p22: zero#(s(x)) -> if#(eq(x,s(|0|())),plus(zero(|0|()),|0|()),s(plus(|0|(),zero(|0|())))) p23: zero#(s(x)) -> eq#(x,s(|0|())) p24: zero#(s(x)) -> plus#(zero(|0|()),|0|()) p25: zero#(s(x)) -> zero#(|0|()) p26: zero#(s(x)) -> plus#(|0|(),zero(|0|())) and R consists of: r1: p(|0|()) -> |0|() r2: p(s(x)) -> x r3: plus(x,|0|()) -> x r4: plus(|0|(),y) -> y r5: plus(s(x),y) -> s(plus(x,y)) r6: plus(s(x),y) -> s(plus(p(s(x)),y)) r7: plus(x,s(y)) -> s(plus(x,p(s(y)))) r8: times(|0|(),y) -> |0|() r9: times(s(|0|()),y) -> y r10: times(s(x),y) -> plus(y,times(x,y)) r11: div(|0|(),y) -> |0|() r12: div(x,y) -> quot(x,y,y) r13: quot(zero(y),s(y),z) -> |0|() r14: quot(s(x),s(y),z) -> quot(x,y,z) r15: quot(x,|0|(),s(z)) -> s(div(x,s(z))) r16: div(div(x,y),z) -> div(x,times(zero(y),z)) r17: eq(|0|(),|0|()) -> true() r18: eq(s(x),|0|()) -> false() r19: eq(|0|(),s(y)) -> false() r20: eq(s(x),s(y)) -> eq(x,y) r21: divides(y,x) -> eq(x,times(div(x,y),y)) r22: prime(s(s(x))) -> pr(s(s(x)),s(x)) r23: pr(x,s(|0|())) -> true() r24: pr(x,s(s(y))) -> if(divides(s(s(y)),x),x,s(y)) r25: if(true(),x,y) -> false() r26: if(false(),x,y) -> pr(x,y) r27: zero(div(x,x)) -> x r28: zero(divides(x,x)) -> x r29: zero(times(x,x)) -> x r30: zero(quot(x,x,x)) -> x r31: zero(s(x)) -> if(eq(x,s(|0|())),plus(zero(|0|()),|0|()),s(plus(|0|(),zero(|0|())))) The estimated dependency graph contains the following SCCs: {p8, p9, p10, p11, p13, p17, p19, p20, p21, p22} {p7} {p1, p2, p4} {p14} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: pr#(x,s(s(y))) -> divides#(s(s(y)),x) p2: divides#(y,x) -> div#(x,y) p3: div#(div(x,y),z) -> zero#(y) p4: zero#(s(x)) -> if#(eq(x,s(|0|())),plus(zero(|0|()),|0|()),s(plus(|0|(),zero(|0|())))) p5: if#(false(),x,y) -> pr#(x,y) p6: pr#(x,s(s(y))) -> if#(divides(s(s(y)),x),x,s(y)) p7: div#(div(x,y),z) -> div#(x,times(zero(y),z)) p8: div#(x,y) -> quot#(x,y,y) p9: quot#(x,|0|(),s(z)) -> div#(x,s(z)) p10: quot#(s(x),s(y),z) -> quot#(x,y,z) and R consists of: r1: p(|0|()) -> |0|() r2: p(s(x)) -> x r3: plus(x,|0|()) -> x r4: plus(|0|(),y) -> y r5: plus(s(x),y) -> s(plus(x,y)) r6: plus(s(x),y) -> s(plus(p(s(x)),y)) r7: plus(x,s(y)) -> s(plus(x,p(s(y)))) r8: times(|0|(),y) -> |0|() r9: times(s(|0|()),y) -> y r10: times(s(x),y) -> plus(y,times(x,y)) r11: div(|0|(),y) -> |0|() r12: div(x,y) -> quot(x,y,y) r13: quot(zero(y),s(y),z) -> |0|() r14: quot(s(x),s(y),z) -> quot(x,y,z) r15: quot(x,|0|(),s(z)) -> s(div(x,s(z))) r16: div(div(x,y),z) -> div(x,times(zero(y),z)) r17: eq(|0|(),|0|()) -> true() r18: eq(s(x),|0|()) -> false() r19: eq(|0|(),s(y)) -> false() r20: eq(s(x),s(y)) -> eq(x,y) r21: divides(y,x) -> eq(x,times(div(x,y),y)) r22: prime(s(s(x))) -> pr(s(s(x)),s(x)) r23: pr(x,s(|0|())) -> true() r24: pr(x,s(s(y))) -> if(divides(s(s(y)),x),x,s(y)) r25: if(true(),x,y) -> false() r26: if(false(),x,y) -> pr(x,y) r27: zero(div(x,x)) -> x r28: zero(divides(x,x)) -> x r29: zero(times(x,x)) -> x r30: zero(quot(x,x,x)) -> x r31: zero(s(x)) -> if(eq(x,s(|0|())),plus(zero(|0|()),|0|()),s(plus(|0|(),zero(|0|())))) The set of usable rules consists of r1, r3, r9, r11, r13, r18, r19, r23 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: pr#_A(x1,x2) = x1 s_A(x1) = x1 divides#_A(x1,x2) = x2 div#_A(x1,x2) = x1 div_A(x1,x2) = x1 + x2 zero#_A(x1) = x1 if#_A(x1,x2,x3) = x2 eq_A(x1,x2) = x1 + x2 + 1 |0|_A() = 1 plus_A(x1,x2) = x1 zero_A(x1) = 0 false_A() = 0 divides_A(x1,x2) = 5 times_A(x1,x2) = x1 + x2 + 6 quot#_A(x1,x2,x3) = x1 p_A(x1) = 2 quot_A(x1,x2,x3) = x3 + 2 pr_A(x1,x2) = x2 + 4 true_A() = 4 base order 2: precedence: div = times > |0| > s = zero = divides = quot > eq = plus > p = true > false > pr# = if# > divides# = pr > div# = quot# > zero# partial status: pi(pr#) = [1] pi(s) = [1] pi(divides#) = [2] pi(div#) = [1] pi(div) = [1, 2] pi(zero#) = [1] pi(if#) = [2] pi(eq) = [1, 2] pi(|0|) = [] pi(plus) = [1] pi(zero) = [] pi(false) = [] pi(divides) = [] pi(times) = [] pi(quot#) = [1] pi(p) = [] pi(quot) = [3] pi(pr) = [] pi(true) = [] The following rules are removed: p1 -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: divides#(y,x) -> div#(x,y) p2: div#(div(x,y),z) -> zero#(y) p3: zero#(s(x)) -> if#(eq(x,s(|0|())),plus(zero(|0|()),|0|()),s(plus(|0|(),zero(|0|())))) p4: if#(false(),x,y) -> pr#(x,y) p5: pr#(x,s(s(y))) -> if#(divides(s(s(y)),x),x,s(y)) p6: div#(div(x,y),z) -> div#(x,times(zero(y),z)) p7: div#(x,y) -> quot#(x,y,y) p8: quot#(x,|0|(),s(z)) -> div#(x,s(z)) p9: quot#(s(x),s(y),z) -> quot#(x,y,z) and R consists of: r1: p(|0|()) -> |0|() r2: p(s(x)) -> x r3: plus(x,|0|()) -> x r4: plus(|0|(),y) -> y r5: plus(s(x),y) -> s(plus(x,y)) r6: plus(s(x),y) -> s(plus(p(s(x)),y)) r7: plus(x,s(y)) -> s(plus(x,p(s(y)))) r8: times(|0|(),y) -> |0|() r9: times(s(|0|()),y) -> y r10: times(s(x),y) -> plus(y,times(x,y)) r11: div(|0|(),y) -> |0|() r12: div(x,y) -> quot(x,y,y) r13: quot(zero(y),s(y),z) -> |0|() r14: quot(s(x),s(y),z) -> quot(x,y,z) r15: quot(x,|0|(),s(z)) -> s(div(x,s(z))) r16: div(div(x,y),z) -> div(x,times(zero(y),z)) r17: eq(|0|(),|0|()) -> true() r18: eq(s(x),|0|()) -> false() r19: eq(|0|(),s(y)) -> false() r20: eq(s(x),s(y)) -> eq(x,y) r21: divides(y,x) -> eq(x,times(div(x,y),y)) r22: prime(s(s(x))) -> pr(s(s(x)),s(x)) r23: pr(x,s(|0|())) -> true() r24: pr(x,s(s(y))) -> if(divides(s(s(y)),x),x,s(y)) r25: if(true(),x,y) -> false() r26: if(false(),x,y) -> pr(x,y) r27: zero(div(x,x)) -> x r28: zero(divides(x,x)) -> x r29: zero(times(x,x)) -> x r30: zero(quot(x,x,x)) -> x r31: zero(s(x)) -> if(eq(x,s(|0|())),plus(zero(|0|()),|0|()),s(plus(|0|(),zero(|0|())))) The estimated dependency graph contains the following SCCs: {p6, p7, p8, p9} {p4, p5} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: quot#(x,|0|(),s(z)) -> div#(x,s(z)) p2: div#(x,y) -> quot#(x,y,y) p3: quot#(s(x),s(y),z) -> quot#(x,y,z) p4: div#(div(x,y),z) -> div#(x,times(zero(y),z)) and R consists of: r1: p(|0|()) -> |0|() r2: p(s(x)) -> x r3: plus(x,|0|()) -> x r4: plus(|0|(),y) -> y r5: plus(s(x),y) -> s(plus(x,y)) r6: plus(s(x),y) -> s(plus(p(s(x)),y)) r7: plus(x,s(y)) -> s(plus(x,p(s(y)))) r8: times(|0|(),y) -> |0|() r9: times(s(|0|()),y) -> y r10: times(s(x),y) -> plus(y,times(x,y)) r11: div(|0|(),y) -> |0|() r12: div(x,y) -> quot(x,y,y) r13: quot(zero(y),s(y),z) -> |0|() r14: quot(s(x),s(y),z) -> quot(x,y,z) r15: quot(x,|0|(),s(z)) -> s(div(x,s(z))) r16: div(div(x,y),z) -> div(x,times(zero(y),z)) r17: eq(|0|(),|0|()) -> true() r18: eq(s(x),|0|()) -> false() r19: eq(|0|(),s(y)) -> false() r20: eq(s(x),s(y)) -> eq(x,y) r21: divides(y,x) -> eq(x,times(div(x,y),y)) r22: prime(s(s(x))) -> pr(s(s(x)),s(x)) r23: pr(x,s(|0|())) -> true() r24: pr(x,s(s(y))) -> if(divides(s(s(y)),x),x,s(y)) r25: if(true(),x,y) -> false() r26: if(false(),x,y) -> pr(x,y) r27: zero(div(x,x)) -> x r28: zero(divides(x,x)) -> x r29: zero(times(x,x)) -> x r30: zero(quot(x,x,x)) -> x r31: zero(s(x)) -> if(eq(x,s(|0|())),plus(zero(|0|()),|0|()),s(plus(|0|(),zero(|0|())))) The set of usable rules consists of r1, r8, r11, r13, r17, r18, r19, r23, 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: quot#_A(x1,x2,x3) = x1 + 1 |0|_A() = 4 s_A(x1) = x1 + 11 div#_A(x1,x2) = x1 + 1 div_A(x1,x2) = x1 + 6 times_A(x1,x2) = x1 + 3 zero_A(x1) = 5 p_A(x1) = 12 quot_A(x1,x2,x3) = 5 eq_A(x1,x2) = x1 + 9 true_A() = 1 false_A() = 3 pr_A(x1,x2) = 2 if_A(x1,x2,x3) = x1 + 13 base order 2: precedence: quot# = div# > times > eq > quot = false > s = p = true = pr = if > zero > div > |0| partial status: pi(quot#) = [] pi(|0|) = [] pi(s) = [1] pi(div#) = [] pi(div) = [] pi(times) = [1] pi(zero) = [] pi(p) = [] pi(quot) = [] pi(eq) = [] pi(true) = [] pi(false) = [] pi(pr) = [] pi(if) = [1] The following rules are removed: p3 -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: quot#(x,|0|(),s(z)) -> div#(x,s(z)) p2: div#(x,y) -> quot#(x,y,y) p3: div#(div(x,y),z) -> div#(x,times(zero(y),z)) and R consists of: r1: p(|0|()) -> |0|() r2: p(s(x)) -> x r3: plus(x,|0|()) -> x r4: plus(|0|(),y) -> y r5: plus(s(x),y) -> s(plus(x,y)) r6: plus(s(x),y) -> s(plus(p(s(x)),y)) r7: plus(x,s(y)) -> s(plus(x,p(s(y)))) r8: times(|0|(),y) -> |0|() r9: times(s(|0|()),y) -> y r10: times(s(x),y) -> plus(y,times(x,y)) r11: div(|0|(),y) -> |0|() r12: div(x,y) -> quot(x,y,y) r13: quot(zero(y),s(y),z) -> |0|() r14: quot(s(x),s(y),z) -> quot(x,y,z) r15: quot(x,|0|(),s(z)) -> s(div(x,s(z))) r16: div(div(x,y),z) -> div(x,times(zero(y),z)) r17: eq(|0|(),|0|()) -> true() r18: eq(s(x),|0|()) -> false() r19: eq(|0|(),s(y)) -> false() r20: eq(s(x),s(y)) -> eq(x,y) r21: divides(y,x) -> eq(x,times(div(x,y),y)) r22: prime(s(s(x))) -> pr(s(s(x)),s(x)) r23: pr(x,s(|0|())) -> true() r24: pr(x,s(s(y))) -> if(divides(s(s(y)),x),x,s(y)) r25: if(true(),x,y) -> false() r26: if(false(),x,y) -> pr(x,y) r27: zero(div(x,x)) -> x r28: zero(divides(x,x)) -> x r29: zero(times(x,x)) -> x r30: zero(quot(x,x,x)) -> x r31: zero(s(x)) -> if(eq(x,s(|0|())),plus(zero(|0|()),|0|()),s(plus(|0|(),zero(|0|())))) 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: quot#(x,|0|(),s(z)) -> div#(x,s(z)) p2: div#(div(x,y),z) -> div#(x,times(zero(y),z)) p3: div#(x,y) -> quot#(x,y,y) and R consists of: r1: p(|0|()) -> |0|() r2: p(s(x)) -> x r3: plus(x,|0|()) -> x r4: plus(|0|(),y) -> y r5: plus(s(x),y) -> s(plus(x,y)) r6: plus(s(x),y) -> s(plus(p(s(x)),y)) r7: plus(x,s(y)) -> s(plus(x,p(s(y)))) r8: times(|0|(),y) -> |0|() r9: times(s(|0|()),y) -> y r10: times(s(x),y) -> plus(y,times(x,y)) r11: div(|0|(),y) -> |0|() r12: div(x,y) -> quot(x,y,y) r13: quot(zero(y),s(y),z) -> |0|() r14: quot(s(x),s(y),z) -> quot(x,y,z) r15: quot(x,|0|(),s(z)) -> s(div(x,s(z))) r16: div(div(x,y),z) -> div(x,times(zero(y),z)) r17: eq(|0|(),|0|()) -> true() r18: eq(s(x),|0|()) -> false() r19: eq(|0|(),s(y)) -> false() r20: eq(s(x),s(y)) -> eq(x,y) r21: divides(y,x) -> eq(x,times(div(x,y),y)) r22: prime(s(s(x))) -> pr(s(s(x)),s(x)) r23: pr(x,s(|0|())) -> true() r24: pr(x,s(s(y))) -> if(divides(s(s(y)),x),x,s(y)) r25: if(true(),x,y) -> false() r26: if(false(),x,y) -> pr(x,y) r27: zero(div(x,x)) -> x r28: zero(divides(x,x)) -> x r29: zero(times(x,x)) -> x r30: zero(quot(x,x,x)) -> x r31: zero(s(x)) -> if(eq(x,s(|0|())),plus(zero(|0|()),|0|()),s(plus(|0|(),zero(|0|())))) The set of usable rules consists of r1, r9, r11, r13, r17, r18, r19, r23, r25, r27, r28, r29, r30 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: quot#_A(x1,x2,x3) = x1 + 3 |0|_A() = 4 s_A(x1) = x1 + 15 div#_A(x1,x2) = x1 + 3 div_A(x1,x2) = x1 + x2 + 22 times_A(x1,x2) = x1 + x2 + 16 zero_A(x1) = x1 + 5 p_A(x1) = x1 quot_A(x1,x2,x3) = x2 + x3 + 14 eq_A(x1,x2) = x1 + 11 true_A() = 1 false_A() = 3 pr_A(x1,x2) = 2 if_A(x1,x2,x3) = x1 + 3 divides_A(x1,x2) = x1 + x2 + 1 base order 2: precedence: times = zero > s = quot = eq = false = if = divides > div = p = pr > |0| > quot# = div# = true partial status: pi(quot#) = [] pi(|0|) = [] pi(s) = [1] pi(div#) = [] pi(div) = [1] pi(times) = [] pi(zero) = [1] pi(p) = [] pi(quot) = [3] pi(eq) = [1] pi(true) = [] pi(false) = [] pi(pr) = [] pi(if) = [] pi(divides) = [1] The following rules are removed: p2 -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: quot#(x,|0|(),s(z)) -> div#(x,s(z)) p2: div#(x,y) -> quot#(x,y,y) and R consists of: r1: p(|0|()) -> |0|() r2: p(s(x)) -> x r3: plus(x,|0|()) -> x r4: plus(|0|(),y) -> y r5: plus(s(x),y) -> s(plus(x,y)) r6: plus(s(x),y) -> s(plus(p(s(x)),y)) r7: plus(x,s(y)) -> s(plus(x,p(s(y)))) r8: times(|0|(),y) -> |0|() r9: times(s(|0|()),y) -> y r10: times(s(x),y) -> plus(y,times(x,y)) r11: div(|0|(),y) -> |0|() r12: div(x,y) -> quot(x,y,y) r13: quot(zero(y),s(y),z) -> |0|() r14: quot(s(x),s(y),z) -> quot(x,y,z) r15: quot(x,|0|(),s(z)) -> s(div(x,s(z))) r16: div(div(x,y),z) -> div(x,times(zero(y),z)) r17: eq(|0|(),|0|()) -> true() r18: eq(s(x),|0|()) -> false() r19: eq(|0|(),s(y)) -> false() r20: eq(s(x),s(y)) -> eq(x,y) r21: divides(y,x) -> eq(x,times(div(x,y),y)) r22: prime(s(s(x))) -> pr(s(s(x)),s(x)) r23: pr(x,s(|0|())) -> true() r24: pr(x,s(s(y))) -> if(divides(s(s(y)),x),x,s(y)) r25: if(true(),x,y) -> false() r26: if(false(),x,y) -> pr(x,y) r27: zero(div(x,x)) -> x r28: zero(divides(x,x)) -> x r29: zero(times(x,x)) -> x r30: zero(quot(x,x,x)) -> x r31: zero(s(x)) -> if(eq(x,s(|0|())),plus(zero(|0|()),|0|()),s(plus(|0|(),zero(|0|())))) The estimated dependency graph contains the following SCCs: {p1, p2} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: quot#(x,|0|(),s(z)) -> div#(x,s(z)) p2: div#(x,y) -> quot#(x,y,y) and R consists of: r1: p(|0|()) -> |0|() r2: p(s(x)) -> x r3: plus(x,|0|()) -> x r4: plus(|0|(),y) -> y r5: plus(s(x),y) -> s(plus(x,y)) r6: plus(s(x),y) -> s(plus(p(s(x)),y)) r7: plus(x,s(y)) -> s(plus(x,p(s(y)))) r8: times(|0|(),y) -> |0|() r9: times(s(|0|()),y) -> y r10: times(s(x),y) -> plus(y,times(x,y)) r11: div(|0|(),y) -> |0|() r12: div(x,y) -> quot(x,y,y) r13: quot(zero(y),s(y),z) -> |0|() r14: quot(s(x),s(y),z) -> quot(x,y,z) r15: quot(x,|0|(),s(z)) -> s(div(x,s(z))) r16: div(div(x,y),z) -> div(x,times(zero(y),z)) r17: eq(|0|(),|0|()) -> true() r18: eq(s(x),|0|()) -> false() r19: eq(|0|(),s(y)) -> false() r20: eq(s(x),s(y)) -> eq(x,y) r21: divides(y,x) -> eq(x,times(div(x,y),y)) r22: prime(s(s(x))) -> pr(s(s(x)),s(x)) r23: pr(x,s(|0|())) -> true() r24: pr(x,s(s(y))) -> if(divides(s(s(y)),x),x,s(y)) r25: if(true(),x,y) -> false() r26: if(false(),x,y) -> pr(x,y) r27: zero(div(x,x)) -> x r28: zero(divides(x,x)) -> x r29: zero(times(x,x)) -> x r30: zero(quot(x,x,x)) -> x r31: zero(s(x)) -> if(eq(x,s(|0|())),plus(zero(|0|()),|0|()),s(plus(|0|(),zero(|0|())))) The set of usable rules consists of r1, r8, r9, r11, r12, r13, r14, r15, r17, r18, r19, r25, r27, r28, r29 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: quot#_A(x1,x2,x3) = x1 + x2 + 2 |0|_A() = 2 s_A(x1) = 0 div#_A(x1,x2) = x1 + x2 + 3 p_A(x1) = 3 times_A(x1,x2) = x1 + x2 + 10 div_A(x1,x2) = x1 + x2 + 6 quot_A(x1,x2,x3) = 3 zero_A(x1) = x1 + 3 eq_A(x1,x2) = x1 + 4 true_A() = 4 false_A() = 3 if_A(x1,x2,x3) = x1 divides_A(x1,x2) = x2 + 5 base order 2: precedence: div# = times > quot# = p = div = true = if = divides > s = quot > zero > |0| > eq = false partial status: pi(quot#) = [1, 2] pi(|0|) = [] pi(s) = [] pi(div#) = [1] pi(p) = [] pi(times) = [2] pi(div) = [] pi(quot) = [] pi(zero) = [1] pi(eq) = [] pi(true) = [] pi(false) = [] pi(if) = [] pi(divides) = [2] The following rules are removed: p2 -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: quot#(x,|0|(),s(z)) -> div#(x,s(z)) and R consists of: r1: p(|0|()) -> |0|() r2: p(s(x)) -> x r3: plus(x,|0|()) -> x r4: plus(|0|(),y) -> y r5: plus(s(x),y) -> s(plus(x,y)) r6: plus(s(x),y) -> s(plus(p(s(x)),y)) r7: plus(x,s(y)) -> s(plus(x,p(s(y)))) r8: times(|0|(),y) -> |0|() r9: times(s(|0|()),y) -> y r10: times(s(x),y) -> plus(y,times(x,y)) r11: div(|0|(),y) -> |0|() r12: div(x,y) -> quot(x,y,y) r13: quot(zero(y),s(y),z) -> |0|() r14: quot(s(x),s(y),z) -> quot(x,y,z) r15: quot(x,|0|(),s(z)) -> s(div(x,s(z))) r16: div(div(x,y),z) -> div(x,times(zero(y),z)) r17: eq(|0|(),|0|()) -> true() r18: eq(s(x),|0|()) -> false() r19: eq(|0|(),s(y)) -> false() r20: eq(s(x),s(y)) -> eq(x,y) r21: divides(y,x) -> eq(x,times(div(x,y),y)) r22: prime(s(s(x))) -> pr(s(s(x)),s(x)) r23: pr(x,s(|0|())) -> true() r24: pr(x,s(s(y))) -> if(divides(s(s(y)),x),x,s(y)) r25: if(true(),x,y) -> false() r26: if(false(),x,y) -> pr(x,y) r27: zero(div(x,x)) -> x r28: zero(divides(x,x)) -> x r29: zero(times(x,x)) -> x r30: zero(quot(x,x,x)) -> x r31: zero(s(x)) -> if(eq(x,s(|0|())),plus(zero(|0|()),|0|()),s(plus(|0|(),zero(|0|())))) The estimated dependency graph contains the following SCCs: (no SCCs) -- 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(|0|()) -> |0|() r2: p(s(x)) -> x r3: plus(x,|0|()) -> x r4: plus(|0|(),y) -> y r5: plus(s(x),y) -> s(plus(x,y)) r6: plus(s(x),y) -> s(plus(p(s(x)),y)) r7: plus(x,s(y)) -> s(plus(x,p(s(y)))) r8: times(|0|(),y) -> |0|() r9: times(s(|0|()),y) -> y r10: times(s(x),y) -> plus(y,times(x,y)) r11: div(|0|(),y) -> |0|() r12: div(x,y) -> quot(x,y,y) r13: quot(zero(y),s(y),z) -> |0|() r14: quot(s(x),s(y),z) -> quot(x,y,z) r15: quot(x,|0|(),s(z)) -> s(div(x,s(z))) r16: div(div(x,y),z) -> div(x,times(zero(y),z)) r17: eq(|0|(),|0|()) -> true() r18: eq(s(x),|0|()) -> false() r19: eq(|0|(),s(y)) -> false() r20: eq(s(x),s(y)) -> eq(x,y) r21: divides(y,x) -> eq(x,times(div(x,y),y)) r22: prime(s(s(x))) -> pr(s(s(x)),s(x)) r23: pr(x,s(|0|())) -> true() r24: pr(x,s(s(y))) -> if(divides(s(s(y)),x),x,s(y)) r25: if(true(),x,y) -> false() r26: if(false(),x,y) -> pr(x,y) r27: zero(div(x,x)) -> x r28: zero(divides(x,x)) -> x r29: zero(times(x,x)) -> x r30: zero(quot(x,x,x)) -> x r31: zero(s(x)) -> if(eq(x,s(|0|())),plus(zero(|0|()),|0|()),s(plus(|0|(),zero(|0|())))) The set of usable rules consists of r8, r11, r13, r17, r18, r19, r20, r21, r23, 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: if#_A(x1,x2,x3) = x1 + x3 false_A() = 0 pr#_A(x1,x2) = x2 s_A(x1) = x1 + 3 divides_A(x1,x2) = 3 times_A(x1,x2) = x1 + 2 |0|_A() = 4 div_A(x1,x2) = 11 quot_A(x1,x2,x3) = 10 zero_A(x1) = 8 eq_A(x1,x2) = 2 true_A() = 1 pr_A(x1,x2) = x2 if_A(x1,x2,x3) = x3 + 4 base order 2: precedence: if > |0| = zero > true > s = quot = eq = pr > if# = pr# > false = divides > div > times partial status: pi(if#) = [3] pi(false) = [] pi(pr#) = [2] pi(s) = [1] pi(divides) = [] pi(times) = [] pi(|0|) = [] pi(div) = [] pi(quot) = [] pi(zero) = [] pi(eq) = [] pi(true) = [] pi(pr) = [2] 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(|0|()) -> |0|() r2: p(s(x)) -> x r3: plus(x,|0|()) -> x r4: plus(|0|(),y) -> y r5: plus(s(x),y) -> s(plus(x,y)) r6: plus(s(x),y) -> s(plus(p(s(x)),y)) r7: plus(x,s(y)) -> s(plus(x,p(s(y)))) r8: times(|0|(),y) -> |0|() r9: times(s(|0|()),y) -> y r10: times(s(x),y) -> plus(y,times(x,y)) r11: div(|0|(),y) -> |0|() r12: div(x,y) -> quot(x,y,y) r13: quot(zero(y),s(y),z) -> |0|() r14: quot(s(x),s(y),z) -> quot(x,y,z) r15: quot(x,|0|(),s(z)) -> s(div(x,s(z))) r16: div(div(x,y),z) -> div(x,times(zero(y),z)) r17: eq(|0|(),|0|()) -> true() r18: eq(s(x),|0|()) -> false() r19: eq(|0|(),s(y)) -> false() r20: eq(s(x),s(y)) -> eq(x,y) r21: divides(y,x) -> eq(x,times(div(x,y),y)) r22: prime(s(s(x))) -> pr(s(s(x)),s(x)) r23: pr(x,s(|0|())) -> true() r24: pr(x,s(s(y))) -> if(divides(s(s(y)),x),x,s(y)) r25: if(true(),x,y) -> false() r26: if(false(),x,y) -> pr(x,y) r27: zero(div(x,x)) -> x r28: zero(divides(x,x)) -> x r29: zero(times(x,x)) -> x r30: zero(quot(x,x,x)) -> x r31: zero(s(x)) -> if(eq(x,s(|0|())),plus(zero(|0|()),|0|()),s(plus(|0|(),zero(|0|())))) 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(|0|()) -> |0|() r2: p(s(x)) -> x r3: plus(x,|0|()) -> x r4: plus(|0|(),y) -> y r5: plus(s(x),y) -> s(plus(x,y)) r6: plus(s(x),y) -> s(plus(p(s(x)),y)) r7: plus(x,s(y)) -> s(plus(x,p(s(y)))) r8: times(|0|(),y) -> |0|() r9: times(s(|0|()),y) -> y r10: times(s(x),y) -> plus(y,times(x,y)) r11: div(|0|(),y) -> |0|() r12: div(x,y) -> quot(x,y,y) r13: quot(zero(y),s(y),z) -> |0|() r14: quot(s(x),s(y),z) -> quot(x,y,z) r15: quot(x,|0|(),s(z)) -> s(div(x,s(z))) r16: div(div(x,y),z) -> div(x,times(zero(y),z)) r17: eq(|0|(),|0|()) -> true() r18: eq(s(x),|0|()) -> false() r19: eq(|0|(),s(y)) -> false() r20: eq(s(x),s(y)) -> eq(x,y) r21: divides(y,x) -> eq(x,times(div(x,y),y)) r22: prime(s(s(x))) -> pr(s(s(x)),s(x)) r23: pr(x,s(|0|())) -> true() r24: pr(x,s(s(y))) -> if(divides(s(s(y)),x),x,s(y)) r25: if(true(),x,y) -> false() r26: if(false(),x,y) -> pr(x,y) r27: zero(div(x,x)) -> x r28: zero(divides(x,x)) -> x r29: zero(times(x,x)) -> x r30: zero(quot(x,x,x)) -> x r31: zero(s(x)) -> if(eq(x,s(|0|())),plus(zero(|0|()),|0|()),s(plus(|0|(),zero(|0|())))) The set of usable rules consists of r1, r8, r9, r11, r13, r17, r18, r19, r23, r25, r27, r28, r29, r30 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 + 8 p_A(x1) = x1 + 1 |0|_A() = 3 times_A(x1,x2) = x1 + x2 + 9 div_A(x1,x2) = x1 + x2 + 14 quot_A(x1,x2,x3) = x1 + x3 + 9 zero_A(x1) = x1 + 4 eq_A(x1,x2) = x1 + 1 true_A() = 2 false_A() = 1 pr_A(x1,x2) = 3 if_A(x1,x2,x3) = x1 + 3 divides_A(x1,x2) = x1 + x2 + 2 base order 2: precedence: divides > p = times > |0| = div = pr > true > s = quot > zero > if > times# = eq = false partial status: pi(times#) = [1] pi(s) = [1] pi(p) = [] pi(|0|) = [] pi(times) = [] pi(div) = [1, 2] pi(quot) = [3] pi(zero) = [1] pi(eq) = [1] pi(true) = [] pi(false) = [] 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(|0|()) -> |0|() r2: p(s(x)) -> x r3: plus(x,|0|()) -> x r4: plus(|0|(),y) -> y r5: plus(s(x),y) -> s(plus(x,y)) r6: plus(s(x),y) -> s(plus(p(s(x)),y)) r7: plus(x,s(y)) -> s(plus(x,p(s(y)))) r8: times(|0|(),y) -> |0|() r9: times(s(|0|()),y) -> y r10: times(s(x),y) -> plus(y,times(x,y)) r11: div(|0|(),y) -> |0|() r12: div(x,y) -> quot(x,y,y) r13: quot(zero(y),s(y),z) -> |0|() r14: quot(s(x),s(y),z) -> quot(x,y,z) r15: quot(x,|0|(),s(z)) -> s(div(x,s(z))) r16: div(div(x,y),z) -> div(x,times(zero(y),z)) r17: eq(|0|(),|0|()) -> true() r18: eq(s(x),|0|()) -> false() r19: eq(|0|(),s(y)) -> false() r20: eq(s(x),s(y)) -> eq(x,y) r21: divides(y,x) -> eq(x,times(div(x,y),y)) r22: prime(s(s(x))) -> pr(s(s(x)),s(x)) r23: pr(x,s(|0|())) -> true() r24: pr(x,s(s(y))) -> if(divides(s(s(y)),x),x,s(y)) r25: if(true(),x,y) -> false() r26: if(false(),x,y) -> pr(x,y) r27: zero(div(x,x)) -> x r28: zero(divides(x,x)) -> x r29: zero(times(x,x)) -> x r30: zero(quot(x,x,x)) -> x r31: zero(s(x)) -> if(eq(x,s(|0|())),plus(zero(|0|()),|0|()),s(plus(|0|(),zero(|0|())))) The set of usable rules consists of r1, r2, r8, r9, r11, r13, r17, r18, r19, r23, r25, r27, r28, r29, r30 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 + 10 p_A(x1) = x1 |0|_A() = 4 times_A(x1,x2) = x1 + x2 + 11 div_A(x1,x2) = x1 + x2 + 17 quot_A(x1,x2,x3) = x1 + x3 + 28 zero_A(x1) = x1 + 5 eq_A(x1,x2) = x1 + 1 true_A() = 1 false_A() = 3 pr_A(x1,x2) = 2 if_A(x1,x2,x3) = x1 + 3 divides_A(x1,x2) = x1 + x2 + 27 base order 2: precedence: times = quot > div = divides > s > plus# = zero = if > p > |0| = eq > false > pr > true partial status: pi(plus#) = [1] pi(s) = [] pi(p) = [] pi(|0|) = [] pi(times) = [1, 2] pi(div) = [] pi(quot) = [3] pi(zero) = [1] pi(eq) = [1] pi(true) = [] pi(false) = [] pi(pr) = [] pi(if) = [1] pi(divides) = [1, 2] 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(|0|()) -> |0|() r2: p(s(x)) -> x r3: plus(x,|0|()) -> x r4: plus(|0|(),y) -> y r5: plus(s(x),y) -> s(plus(x,y)) r6: plus(s(x),y) -> s(plus(p(s(x)),y)) r7: plus(x,s(y)) -> s(plus(x,p(s(y)))) r8: times(|0|(),y) -> |0|() r9: times(s(|0|()),y) -> y r10: times(s(x),y) -> plus(y,times(x,y)) r11: div(|0|(),y) -> |0|() r12: div(x,y) -> quot(x,y,y) r13: quot(zero(y),s(y),z) -> |0|() r14: quot(s(x),s(y),z) -> quot(x,y,z) r15: quot(x,|0|(),s(z)) -> s(div(x,s(z))) r16: div(div(x,y),z) -> div(x,times(zero(y),z)) r17: eq(|0|(),|0|()) -> true() r18: eq(s(x),|0|()) -> false() r19: eq(|0|(),s(y)) -> false() r20: eq(s(x),s(y)) -> eq(x,y) r21: divides(y,x) -> eq(x,times(div(x,y),y)) r22: prime(s(s(x))) -> pr(s(s(x)),s(x)) r23: pr(x,s(|0|())) -> true() r24: pr(x,s(s(y))) -> if(divides(s(s(y)),x),x,s(y)) r25: if(true(),x,y) -> false() r26: if(false(),x,y) -> pr(x,y) r27: zero(div(x,x)) -> x r28: zero(divides(x,x)) -> x r29: zero(times(x,x)) -> x r30: zero(quot(x,x,x)) -> x r31: zero(s(x)) -> if(eq(x,s(|0|())),plus(zero(|0|()),|0|()),s(plus(|0|(),zero(|0|())))) 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(|0|()) -> |0|() r2: p(s(x)) -> x r3: plus(x,|0|()) -> x r4: plus(|0|(),y) -> y r5: plus(s(x),y) -> s(plus(x,y)) r6: plus(s(x),y) -> s(plus(p(s(x)),y)) r7: plus(x,s(y)) -> s(plus(x,p(s(y)))) r8: times(|0|(),y) -> |0|() r9: times(s(|0|()),y) -> y r10: times(s(x),y) -> plus(y,times(x,y)) r11: div(|0|(),y) -> |0|() r12: div(x,y) -> quot(x,y,y) r13: quot(zero(y),s(y),z) -> |0|() r14: quot(s(x),s(y),z) -> quot(x,y,z) r15: quot(x,|0|(),s(z)) -> s(div(x,s(z))) r16: div(div(x,y),z) -> div(x,times(zero(y),z)) r17: eq(|0|(),|0|()) -> true() r18: eq(s(x),|0|()) -> false() r19: eq(|0|(),s(y)) -> false() r20: eq(s(x),s(y)) -> eq(x,y) r21: divides(y,x) -> eq(x,times(div(x,y),y)) r22: prime(s(s(x))) -> pr(s(s(x)),s(x)) r23: pr(x,s(|0|())) -> true() r24: pr(x,s(s(y))) -> if(divides(s(s(y)),x),x,s(y)) r25: if(true(),x,y) -> false() r26: if(false(),x,y) -> pr(x,y) r27: zero(div(x,x)) -> x r28: zero(divides(x,x)) -> x r29: zero(times(x,x)) -> x r30: zero(quot(x,x,x)) -> x r31: zero(s(x)) -> if(eq(x,s(|0|())),plus(zero(|0|()),|0|()),s(plus(|0|(),zero(|0|())))) The set of usable rules consists of r1, r8, r9, r11, r13, r17, r18, r19, r23, r25, r27, r28, r29, r30 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 + 15 s_A(x1) = x1 + 16 p_A(x1) = 4 |0|_A() = 3 times_A(x1,x2) = x1 + x2 + 17 div_A(x1,x2) = x1 + x2 + 1 quot_A(x1,x2,x3) = x1 + x3 + 18 zero_A(x1) = x1 + 12 eq_A(x1,x2) = x1 + 3 true_A() = 2 false_A() = 1 pr_A(x1,x2) = 3 if_A(x1,x2,x3) = x1 + x3 + 3 divides_A(x1,x2) = x1 + x2 + 2 base order 2: precedence: times > quot = if > plus# = s = eq = divides > p = zero = pr > div > |0| > true > false partial status: pi(plus#) = [1] pi(s) = [1] pi(p) = [] pi(|0|) = [] pi(times) = [] pi(div) = [] pi(quot) = [3] pi(zero) = [1] pi(eq) = [] pi(true) = [] pi(false) = [] pi(pr) = [] pi(if) = [] pi(divides) = [2] 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(|0|()) -> |0|() r2: p(s(x)) -> x r3: plus(x,|0|()) -> x r4: plus(|0|(),y) -> y r5: plus(s(x),y) -> s(plus(x,y)) r6: plus(s(x),y) -> s(plus(p(s(x)),y)) r7: plus(x,s(y)) -> s(plus(x,p(s(y)))) r8: times(|0|(),y) -> |0|() r9: times(s(|0|()),y) -> y r10: times(s(x),y) -> plus(y,times(x,y)) r11: div(|0|(),y) -> |0|() r12: div(x,y) -> quot(x,y,y) r13: quot(zero(y),s(y),z) -> |0|() r14: quot(s(x),s(y),z) -> quot(x,y,z) r15: quot(x,|0|(),s(z)) -> s(div(x,s(z))) r16: div(div(x,y),z) -> div(x,times(zero(y),z)) r17: eq(|0|(),|0|()) -> true() r18: eq(s(x),|0|()) -> false() r19: eq(|0|(),s(y)) -> false() r20: eq(s(x),s(y)) -> eq(x,y) r21: divides(y,x) -> eq(x,times(div(x,y),y)) r22: prime(s(s(x))) -> pr(s(s(x)),s(x)) r23: pr(x,s(|0|())) -> true() r24: pr(x,s(s(y))) -> if(divides(s(s(y)),x),x,s(y)) r25: if(true(),x,y) -> false() r26: if(false(),x,y) -> pr(x,y) r27: zero(div(x,x)) -> x r28: zero(divides(x,x)) -> x r29: zero(times(x,x)) -> x r30: zero(quot(x,x,x)) -> x r31: zero(s(x)) -> if(eq(x,s(|0|())),plus(zero(|0|()),|0|()),s(plus(|0|(),zero(|0|())))) 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(|0|()) -> |0|() r2: p(s(x)) -> x r3: plus(x,|0|()) -> x r4: plus(|0|(),y) -> y r5: plus(s(x),y) -> s(plus(x,y)) r6: plus(s(x),y) -> s(plus(p(s(x)),y)) r7: plus(x,s(y)) -> s(plus(x,p(s(y)))) r8: times(|0|(),y) -> |0|() r9: times(s(|0|()),y) -> y r10: times(s(x),y) -> plus(y,times(x,y)) r11: div(|0|(),y) -> |0|() r12: div(x,y) -> quot(x,y,y) r13: quot(zero(y),s(y),z) -> |0|() r14: quot(s(x),s(y),z) -> quot(x,y,z) r15: quot(x,|0|(),s(z)) -> s(div(x,s(z))) r16: div(div(x,y),z) -> div(x,times(zero(y),z)) r17: eq(|0|(),|0|()) -> true() r18: eq(s(x),|0|()) -> false() r19: eq(|0|(),s(y)) -> false() r20: eq(s(x),s(y)) -> eq(x,y) r21: divides(y,x) -> eq(x,times(div(x,y),y)) r22: prime(s(s(x))) -> pr(s(s(x)),s(x)) r23: pr(x,s(|0|())) -> true() r24: pr(x,s(s(y))) -> if(divides(s(s(y)),x),x,s(y)) r25: if(true(),x,y) -> false() r26: if(false(),x,y) -> pr(x,y) r27: zero(div(x,x)) -> x r28: zero(divides(x,x)) -> x r29: zero(times(x,x)) -> x r30: zero(quot(x,x,x)) -> x r31: zero(s(x)) -> if(eq(x,s(|0|())),plus(zero(|0|()),|0|()),s(plus(|0|(),zero(|0|())))) The set of usable rules consists of r1, r2, r8, r9, r11, r13, r17, r18, r19, r25, r27, r28, r29, r30 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 + 10 p_A(x1) = x1 |0|_A() = 4 times_A(x1,x2) = x1 + x2 + 2 div_A(x1,x2) = x1 + x2 + 8 quot_A(x1,x2,x3) = x1 + x3 + 19 zero_A(x1) = x1 + 5 eq_A(x1,x2) = x1 + 3 true_A() = 3 false_A() = 2 if_A(x1,x2,x3) = x1 + x3 divides_A(x1,x2) = x1 + x2 + 9 base order 2: precedence: quot = divides > s > plus# = times = eq > p = zero > div = if > |0| > true > false partial status: pi(plus#) = [2] pi(s) = [1] pi(p) = [] pi(|0|) = [] pi(times) = [] pi(div) = [] pi(quot) = [3] pi(zero) = [1] pi(eq) = [1] pi(true) = [] pi(false) = [] pi(if) = [] pi(divides) = [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: eq#(s(x),s(y)) -> eq#(x,y) and R consists of: r1: p(|0|()) -> |0|() r2: p(s(x)) -> x r3: plus(x,|0|()) -> x r4: plus(|0|(),y) -> y r5: plus(s(x),y) -> s(plus(x,y)) r6: plus(s(x),y) -> s(plus(p(s(x)),y)) r7: plus(x,s(y)) -> s(plus(x,p(s(y)))) r8: times(|0|(),y) -> |0|() r9: times(s(|0|()),y) -> y r10: times(s(x),y) -> plus(y,times(x,y)) r11: div(|0|(),y) -> |0|() r12: div(x,y) -> quot(x,y,y) r13: quot(zero(y),s(y),z) -> |0|() r14: quot(s(x),s(y),z) -> quot(x,y,z) r15: quot(x,|0|(),s(z)) -> s(div(x,s(z))) r16: div(div(x,y),z) -> div(x,times(zero(y),z)) r17: eq(|0|(),|0|()) -> true() r18: eq(s(x),|0|()) -> false() r19: eq(|0|(),s(y)) -> false() r20: eq(s(x),s(y)) -> eq(x,y) r21: divides(y,x) -> eq(x,times(div(x,y),y)) r22: prime(s(s(x))) -> pr(s(s(x)),s(x)) r23: pr(x,s(|0|())) -> true() r24: pr(x,s(s(y))) -> if(divides(s(s(y)),x),x,s(y)) r25: if(true(),x,y) -> false() r26: if(false(),x,y) -> pr(x,y) r27: zero(div(x,x)) -> x r28: zero(divides(x,x)) -> x r29: zero(times(x,x)) -> x r30: zero(quot(x,x,x)) -> x r31: zero(s(x)) -> if(eq(x,s(|0|())),plus(zero(|0|()),|0|()),s(plus(|0|(),zero(|0|())))) The set of usable rules consists of r1, r8, r9, r11, r13, r17, r18, r19, r23, r25, r27, r28, r29, r30 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 + 19 s_A(x1) = x1 + 18 p_A(x1) = x1 + 1 |0|_A() = 4 times_A(x1,x2) = x1 + x2 + 19 div_A(x1,x2) = x1 + x2 + 31 quot_A(x1,x2,x3) = x3 + 19 zero_A(x1) = x1 + 11 eq_A(x1,x2) = x1 + 1 true_A() = 1 false_A() = 3 pr_A(x1,x2) = 2 if_A(x1,x2,x3) = x1 + x3 + 3 divides_A(x1,x2) = x1 + x2 + 32 base order 2: precedence: times = quot > div > false = divides > pr > eq# = if > s = |0| = zero > p = eq > true partial status: pi(eq#) = [1] pi(s) = [1] pi(p) = [] pi(|0|) = [] pi(times) = [] pi(div) = [2] pi(quot) = [3] pi(zero) = [1] pi(eq) = [1] pi(true) = [] pi(false) = [] pi(pr) = [] pi(if) = [] pi(divides) = [] The following rules are removed: p1 Then no dependency pair remains.