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 r3, r4, r9, r11 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: trivial reduction triple (T x T, T x T, Φ) base order 2: lexicographic combination of reduction triples: 1. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: pr#_A(x1,x2) = 8 s_A(x1) = 10 divides#_A(x1,x2) = max{8, x1 - 2} div#_A(x1,x2) = 8 div_A(x1,x2) = max{x1 + 3, x2 + 3} zero#_A(x1) = 8 if#_A(x1,x2,x3) = 8 eq_A(x1,x2) = max{20, x1 + 3, x2 + 11} |0|_A = 0 plus_A(x1,x2) = max{x1, x2} zero_A(x1) = x1 + 8 false_A = 1 divides_A(x1,x2) = max{x1 + 19, x2 + 3} times_A(x1,x2) = max{54, x1 - 16, x2 + 48} quot#_A(x1,x2,x3) = 8 pr#!_A(x1,x2) = max{14, x1 + 1, x2 + 3} s!_A(x1) = 0 divides#!_A(x1,x2) = 12 div#!_A(x1,x2) = 11 div!_A(x1,x2) = max{10, x2 + 5} zero#!_A(x1) = max{10, x1 + 5} if#!_A(x1,x2,x3) = max{14, x2 + 1, x3 + 4} eq!_A(x1,x2) = max{0, x2 - 11} |0|!_A = 3 plus!_A(x1,x2) = max{0, x1 - 44, x2 - 45} zero!_A(x1) = max{0, x1 - 56} false!_A = 1 divides!_A(x1,x2) = max{15, x1 - 27, x2} times!_A(x1,x2) = max{x1 - 2, x2 + 2} quot#!_A(x1,x2,x3) = 11 2. marked-algebra reduction triple (>=A, >=A!, >A!): matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: pr#_A(x1,x2) = x1 + x2 s_A(x1) = x1 + 11 divides#_A(x1,x2) = x2 + 22 div#_A(x1,x2) = 22 div_A(x1,x2) = x1 + x2 zero#_A(x1) = 22 if#_A(x1,x2,x3) = x2 + x3 eq_A(x1,x2) = 2 |0|_A() = 3 plus_A(x1,x2) = x1 + x2 zero_A(x1) = 1 false_A() = 3 divides_A(x1,x2) = 1 times_A(x1,x2) = x2 + 1 quot#_A(x1,x2,x3) = 22 pr#!_A(x1,x2) = x1 + x2 + 3 s!_A(x1) = 15 divides#!_A(x1,x2) = x1 + x2 + 2 div#!_A(x1,x2) = x1 + 1 div!_A(x1,x2) = x1 + x2 + 6 zero#!_A(x1) = x1 if#!_A(x1,x2,x3) = x2 + x3 + 3 eq!_A(x1,x2) = 19 |0|!_A() = 8 plus!_A(x1,x2) = 16 zero!_A(x1) = x1 + 7 false!_A() = 2 divides!_A(x1,x2) = 16 times!_A(x1,x2) = 9 quot#!_A(x1,x2,x3) = x1 + 1 partial status: pi(pr#) = [1, 2] pi(s) = [1] pi(divides#) = [2] pi(div#) = [1] pi(div) = [1, 2] pi(zero#) = [] pi(if#) = [2, 3] pi(eq) = [2] pi(|0|) = [] pi(plus) = [1, 2] pi(zero) = [1] pi(false) = [] pi(divides) = [] pi(times) = [2] pi(quot#) = [1] The following rules are removed: p1, p2, p3, p4, p6, p10 -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: if#(false(),x,y) -> pr#(x,y) p2: div#(div(x,y),z) -> div#(x,times(zero(y),z)) p3: div#(x,y) -> quot#(x,y,y) p4: 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: {p2, p3, p4} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: div#(div(x,y),z) -> div#(x,times(zero(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(|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 r9, r11 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: trivial reduction triple (T x T, T x T, Φ) base order 2: lexicographic combination of reduction triples: 1. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: div#_A(x1,x2) = max{1, x1 - 15} div_A(x1,x2) = max{x1 + 14, x2 - 83} times_A(x1,x2) = max{60, x1 - 23, x2} zero_A(x1) = x1 + 8 quot#_A(x1,x2,x3) = max{1, x1 - 15} |0|_A = 61 s_A(x1) = max{17, x1 - 15} div#!_A(x1,x2) = max{0, x1 - 15} div!_A(x1,x2) = max{90, x1 + 76, x2 - 59} times!_A(x1,x2) = max{89, x1 - 107, x2 - 60} zero!_A(x1) = max{87, x1 - 81} quot#!_A(x1,x2,x3) = max{0, x1 - 15} |0|!_A = 25 s!_A(x1) = x1 + 26 2. marked-algebra reduction triple (>=A, >=A!, >A!): matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: div#_A(x1,x2) = 0 div_A(x1,x2) = x1 + x2 + 10 times_A(x1,x2) = x2 + 11 zero_A(x1) = 15 quot#_A(x1,x2,x3) = 0 |0|_A() = 12 s_A(x1) = 21 div#!_A(x1,x2) = x1 + 6 div!_A(x1,x2) = x1 + 14 times!_A(x1,x2) = x1 zero!_A(x1) = 23 quot#!_A(x1,x2,x3) = x1 + 6 |0|!_A() = 7 s!_A(x1) = 22 partial status: pi(div#) = [] pi(div) = [] pi(times) = [1, 2] pi(zero) = [] pi(quot#) = [] pi(|0|) = [] pi(s) = [1] 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(|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: div#(x,y) -> quot#(x,y,y) p2: 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 set of usable rules consists of (no rules) Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: trivial reduction triple (T x T, T x T, Φ) base order 2: lexicographic combination of reduction triples: 1. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: div#_A(x1,x2) = max{7, x1 - 1, x2} quot#_A(x1,x2,x3) = max{7, x1 - 1, x2 - 9, x3} |0|_A = 8 s_A(x1) = 6 div#!_A(x1,x2) = 0 quot#!_A(x1,x2,x3) = 0 |0|!_A = 12 s!_A(x1) = 0 2. marked-algebra reduction triple (>=A, >=A!, >A!): matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: div#_A(x1,x2) = x2 quot#_A(x1,x2,x3) = x3 |0|_A() = 5 s_A(x1) = 3 div#!_A(x1,x2) = x2 + 5 quot#!_A(x1,x2,x3) = x2 + 3 |0|!_A() = 3 s!_A(x1) = 7 partial status: pi(div#) = [2] pi(quot#) = [2] pi(|0|) = [] pi(s) = [] The following rules are removed: p1, p2 Then no dependency pair remains. -- 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 r11 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: trivial reduction triple (T x T, T x T, Φ) base order 2: lexicographic combination of reduction triples: 1. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: times#_A(x1,x2) = x1 s_A(x1) = x1 + 20 div_A(x1,x2) = max{254, x1 - 468, x2 - 472} |0|_A = 254 times#!_A(x1,x2) = max{18, x1 - 21, x2 - 1} s!_A(x1) = max{17, x1 + 12} div!_A(x1,x2) = max{10, x2 + 1} |0|!_A = 9 2. marked-algebra reduction triple (>=A, >=A!, >A!): matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: times#_A(x1,x2) = x1 s_A(x1) = x1 + 2 div_A(x1,x2) = x1 + x2 + 4 |0|_A() = 6 times#!_A(x1,x2) = x1 + 10 s!_A(x1) = 9 div!_A(x1,x2) = x1 + 10 |0|!_A() = 2 partial status: pi(times#) = [1] pi(s) = [1] pi(div) = [2] pi(|0|) = [] 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 r2 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: trivial reduction triple (T x T, T x T, Φ) base order 2: lexicographic combination of reduction triples: 1. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: plus#_A(x1,x2) = max{0, x1 - 61, x2 - 61} s_A(x1) = max{60, x1 + 4} p_A(x1) = max{59, x1 - 3} plus#!_A(x1,x2) = x2 + 2 s!_A(x1) = max{0, x1 - 50} p!_A(x1) = max{106, x1 - 111} 2. marked-algebra reduction triple (>=A, >=A!, >A!): matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: plus#_A(x1,x2) = 0 s_A(x1) = x1 + 5 p_A(x1) = x1 plus#!_A(x1,x2) = x1 + 10 s!_A(x1) = 11 p!_A(x1) = 8 partial status: pi(plus#) = [] pi(s) = [1] pi(p) = [1] The following rules are removed: p1, p2 -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: 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 estimated dependency graph contains the following SCCs: {p1} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: 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 r2 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: trivial reduction triple (T x T, T x T, Φ) base order 2: lexicographic combination of reduction triples: 1. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: plus#_A(x1,x2) = max{0, x1 - 12, x2 - 5} s_A(x1) = max{11, x1 + 4} p_A(x1) = max{8, x1 - 3} plus#!_A(x1,x2) = max{1, x1 - 2} s!_A(x1) = max{80, x1 + 69} p!_A(x1) = max{80, x1 - 5} 2. marked-algebra reduction triple (>=A, >=A!, >A!): matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: plus#_A(x1,x2) = 0 s_A(x1) = x1 + 1 p_A(x1) = x1 plus#!_A(x1,x2) = 13 s!_A(x1) = 12 p!_A(x1) = x1 + 8 partial status: pi(plus#) = [] pi(s) = [1] pi(p) = [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: 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 r11 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: trivial reduction triple (T x T, T x T, Φ) base order 2: lexicographic combination of reduction triples: 1. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: eq#_A(x1,x2) = max{0, x1 - 7, x2 - 7} s_A(x1) = x1 + 6 div_A(x1,x2) = max{x1 + 109, x2 - 171} |0|_A = 77 eq#!_A(x1,x2) = 0 s!_A(x1) = 0 div!_A(x1,x2) = x2 + 159 |0|!_A = 0 2. marked-algebra reduction triple (>=A, >=A!, >A!): matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: eq#_A(x1,x2) = x1 + x2 s_A(x1) = x1 + 7 div_A(x1,x2) = x1 + x2 + 2 |0|_A() = 6 eq#!_A(x1,x2) = x1 s!_A(x1) = x1 + 9 div!_A(x1,x2) = x1 + 13 |0|!_A() = 8 partial status: pi(eq#) = [] pi(s) = [] pi(div) = [] pi(|0|) = [] The following rules are removed: p1 Then no dependency pair remains.