YES We show the termination of the TRS R: minus(minus(x,y),z) -> minus(x,plus(y,z)) minus(|0|(),y) -> |0|() minus(x,|0|()) -> x minus(s(x),s(y)) -> minus(x,y) plus(|0|(),y) -> y plus(s(x),y) -> plus(x,s(y)) plus(s(x),y) -> s(plus(y,x)) zero(s(x)) -> false() zero(|0|()) -> true() p(s(x)) -> x p(|0|()) -> |0|() div(x,y) -> quot(x,y,|0|()) quot(s(x),s(y),z) -> quot(minus(p(ack(|0|(),x)),y),s(y),s(z)) quot(|0|(),s(y),z) -> z ack(|0|(),x) -> s(x) ack(|0|(),x) -> plus(x,s(|0|())) ack(s(x),|0|()) -> ack(x,s(|0|())) ack(s(x),s(y)) -> ack(x,ack(s(x),y)) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: minus#(minus(x,y),z) -> minus#(x,plus(y,z)) p2: minus#(minus(x,y),z) -> plus#(y,z) p3: minus#(s(x),s(y)) -> minus#(x,y) p4: plus#(s(x),y) -> plus#(x,s(y)) p5: plus#(s(x),y) -> plus#(y,x) p6: div#(x,y) -> quot#(x,y,|0|()) p7: quot#(s(x),s(y),z) -> quot#(minus(p(ack(|0|(),x)),y),s(y),s(z)) p8: quot#(s(x),s(y),z) -> minus#(p(ack(|0|(),x)),y) p9: quot#(s(x),s(y),z) -> p#(ack(|0|(),x)) p10: quot#(s(x),s(y),z) -> ack#(|0|(),x) p11: ack#(|0|(),x) -> plus#(x,s(|0|())) p12: ack#(s(x),|0|()) -> ack#(x,s(|0|())) p13: ack#(s(x),s(y)) -> ack#(x,ack(s(x),y)) p14: ack#(s(x),s(y)) -> ack#(s(x),y) and R consists of: r1: minus(minus(x,y),z) -> minus(x,plus(y,z)) r2: minus(|0|(),y) -> |0|() r3: minus(x,|0|()) -> x r4: minus(s(x),s(y)) -> minus(x,y) r5: plus(|0|(),y) -> y r6: plus(s(x),y) -> plus(x,s(y)) r7: plus(s(x),y) -> s(plus(y,x)) r8: zero(s(x)) -> false() r9: zero(|0|()) -> true() r10: p(s(x)) -> x r11: p(|0|()) -> |0|() r12: div(x,y) -> quot(x,y,|0|()) r13: quot(s(x),s(y),z) -> quot(minus(p(ack(|0|(),x)),y),s(y),s(z)) r14: quot(|0|(),s(y),z) -> z r15: ack(|0|(),x) -> s(x) r16: ack(|0|(),x) -> plus(x,s(|0|())) r17: ack(s(x),|0|()) -> ack(x,s(|0|())) r18: ack(s(x),s(y)) -> ack(x,ack(s(x),y)) The estimated dependency graph contains the following SCCs: {p7} {p1, p3} {p12, p13, p14} {p4, p5} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: quot#(s(x),s(y),z) -> quot#(minus(p(ack(|0|(),x)),y),s(y),s(z)) and R consists of: r1: minus(minus(x,y),z) -> minus(x,plus(y,z)) r2: minus(|0|(),y) -> |0|() r3: minus(x,|0|()) -> x r4: minus(s(x),s(y)) -> minus(x,y) r5: plus(|0|(),y) -> y r6: plus(s(x),y) -> plus(x,s(y)) r7: plus(s(x),y) -> s(plus(y,x)) r8: zero(s(x)) -> false() r9: zero(|0|()) -> true() r10: p(s(x)) -> x r11: p(|0|()) -> |0|() r12: div(x,y) -> quot(x,y,|0|()) r13: quot(s(x),s(y),z) -> quot(minus(p(ack(|0|(),x)),y),s(y),s(z)) r14: quot(|0|(),s(y),z) -> z r15: ack(|0|(),x) -> s(x) r16: ack(|0|(),x) -> plus(x,s(|0|())) r17: ack(s(x),|0|()) -> ack(x,s(|0|())) r18: ack(s(x),s(y)) -> ack(x,ack(s(x),y)) The set of usable rules consists of r1, r2, r3, r4, r5, r6, r7, r10, r11, r15, r16 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: quot#_A(x1,x2,x3) = x1 s_A(x1) = x1 + 1 minus_A(x1,x2) = x1 p_A(x1) = x1 ack_A(x1,x2) = x1 + x2 + 1 |0|_A() = 0 plus_A(x1,x2) = x1 + x2 base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: quot#_A(x1,x2,x3) = 0 s_A(x1) = x1 + 2 minus_A(x1,x2) = x1 + x2 + 1 p_A(x1) = x1 ack_A(x1,x2) = x2 + 8 |0|_A() = 5 plus_A(x1,x2) = x1 + x2 + 1 quot#!_A(x1,x2,x3) = 1 s!_A(x1) = 5 minus!_A(x1,x2) = 0 p!_A(x1) = 2 ack!_A(x1,x2) = x1 + x2 + 2 |0|!_A() = 1 plus!_A(x1,x2) = x1 + 6 partial status: pi(quot#) = [1] pi(s) = [] pi(minus) = [1] pi(p) = [] pi(ack) = [] pi(|0|) = [] pi(plus) = [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: minus#(minus(x,y),z) -> minus#(x,plus(y,z)) p2: minus#(s(x),s(y)) -> minus#(x,y) and R consists of: r1: minus(minus(x,y),z) -> minus(x,plus(y,z)) r2: minus(|0|(),y) -> |0|() r3: minus(x,|0|()) -> x r4: minus(s(x),s(y)) -> minus(x,y) r5: plus(|0|(),y) -> y r6: plus(s(x),y) -> plus(x,s(y)) r7: plus(s(x),y) -> s(plus(y,x)) r8: zero(s(x)) -> false() r9: zero(|0|()) -> true() r10: p(s(x)) -> x r11: p(|0|()) -> |0|() r12: div(x,y) -> quot(x,y,|0|()) r13: quot(s(x),s(y),z) -> quot(minus(p(ack(|0|(),x)),y),s(y),s(z)) r14: quot(|0|(),s(y),z) -> z r15: ack(|0|(),x) -> s(x) r16: ack(|0|(),x) -> plus(x,s(|0|())) r17: ack(s(x),|0|()) -> ack(x,s(|0|())) r18: ack(s(x),s(y)) -> ack(x,ack(s(x),y)) The set of usable rules consists of r1, r2, r3, r4, r5, r6, r7 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: minus#_A(x1,x2) = x1 + x2 + 2 minus_A(x1,x2) = x1 + x2 + 2 plus_A(x1,x2) = x1 + x2 + 1 s_A(x1) = x1 + 9 |0|_A() = 1 base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: minus#_A(x1,x2) = x1 + x2 minus_A(x1,x2) = x1 + x2 + 3 plus_A(x1,x2) = x1 + x2 + 3 s_A(x1) = x1 + 1 |0|_A() = 5 minus#!_A(x1,x2) = x2 + 4 minus!_A(x1,x2) = x2 + 8 plus!_A(x1,x2) = x1 + 9 s!_A(x1) = 3 |0|!_A() = 4 partial status: pi(minus#) = [] pi(minus) = [] pi(plus) = [] pi(s) = [1] pi(|0|) = [] 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: ack#(s(x),s(y)) -> ack#(x,ack(s(x),y)) p2: ack#(s(x),s(y)) -> ack#(s(x),y) p3: ack#(s(x),|0|()) -> ack#(x,s(|0|())) and R consists of: r1: minus(minus(x,y),z) -> minus(x,plus(y,z)) r2: minus(|0|(),y) -> |0|() r3: minus(x,|0|()) -> x r4: minus(s(x),s(y)) -> minus(x,y) r5: plus(|0|(),y) -> y r6: plus(s(x),y) -> plus(x,s(y)) r7: plus(s(x),y) -> s(plus(y,x)) r8: zero(s(x)) -> false() r9: zero(|0|()) -> true() r10: p(s(x)) -> x r11: p(|0|()) -> |0|() r12: div(x,y) -> quot(x,y,|0|()) r13: quot(s(x),s(y),z) -> quot(minus(p(ack(|0|(),x)),y),s(y),s(z)) r14: quot(|0|(),s(y),z) -> z r15: ack(|0|(),x) -> s(x) r16: ack(|0|(),x) -> plus(x,s(|0|())) r17: ack(s(x),|0|()) -> ack(x,s(|0|())) r18: ack(s(x),s(y)) -> ack(x,ack(s(x),y)) The set of usable rules consists of (no rules) Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: ack#_A(x1,x2) = x1 + 6 s_A(x1) = x1 + 1 ack_A(x1,x2) = 8 |0|_A() = 5 base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: ack#_A(x1,x2) = 0 s_A(x1) = 3 ack_A(x1,x2) = 1 |0|_A() = 2 ack#!_A(x1,x2) = 5 s!_A(x1) = 4 ack!_A(x1,x2) = 3 |0|!_A() = 1 partial status: pi(ack#) = [] pi(s) = [] pi(ack) = [] pi(|0|) = [] The following rules are removed: p1, p3 -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: ack#(s(x),s(y)) -> ack#(s(x),y) and R consists of: r1: minus(minus(x,y),z) -> minus(x,plus(y,z)) r2: minus(|0|(),y) -> |0|() r3: minus(x,|0|()) -> x r4: minus(s(x),s(y)) -> minus(x,y) r5: plus(|0|(),y) -> y r6: plus(s(x),y) -> plus(x,s(y)) r7: plus(s(x),y) -> s(plus(y,x)) r8: zero(s(x)) -> false() r9: zero(|0|()) -> true() r10: p(s(x)) -> x r11: p(|0|()) -> |0|() r12: div(x,y) -> quot(x,y,|0|()) r13: quot(s(x),s(y),z) -> quot(minus(p(ack(|0|(),x)),y),s(y),s(z)) r14: quot(|0|(),s(y),z) -> z r15: ack(|0|(),x) -> s(x) r16: ack(|0|(),x) -> plus(x,s(|0|())) r17: ack(s(x),|0|()) -> ack(x,s(|0|())) r18: ack(s(x),s(y)) -> ack(x,ack(s(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: ack#(s(x),s(y)) -> ack#(s(x),y) and R consists of: r1: minus(minus(x,y),z) -> minus(x,plus(y,z)) r2: minus(|0|(),y) -> |0|() r3: minus(x,|0|()) -> x r4: minus(s(x),s(y)) -> minus(x,y) r5: plus(|0|(),y) -> y r6: plus(s(x),y) -> plus(x,s(y)) r7: plus(s(x),y) -> s(plus(y,x)) r8: zero(s(x)) -> false() r9: zero(|0|()) -> true() r10: p(s(x)) -> x r11: p(|0|()) -> |0|() r12: div(x,y) -> quot(x,y,|0|()) r13: quot(s(x),s(y),z) -> quot(minus(p(ack(|0|(),x)),y),s(y),s(z)) r14: quot(|0|(),s(y),z) -> z r15: ack(|0|(),x) -> s(x) r16: ack(|0|(),x) -> plus(x,s(|0|())) r17: ack(s(x),|0|()) -> ack(x,s(|0|())) r18: ack(s(x),s(y)) -> ack(x,ack(s(x),y)) The set of usable rules consists of r2, r3, r15 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: ack#_A(x1,x2) = 0 s_A(x1) = 3 minus_A(x1,x2) = x1 + x2 + 4 |0|_A() = 11 ack_A(x1,x2) = 10 base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: ack#_A(x1,x2) = x2 s_A(x1) = x1 + 2 minus_A(x1,x2) = x1 + x2 + 1 |0|_A() = 5 ack_A(x1,x2) = x1 + x2 + 3 ack#!_A(x1,x2) = x2 + 2 s!_A(x1) = 5 minus!_A(x1,x2) = x1 + x2 + 6 |0|!_A() = 10 ack!_A(x1,x2) = x1 + x2 + 4 partial status: pi(ack#) = [] pi(s) = [] pi(minus) = [1] pi(|0|) = [] pi(ack) = [] 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,s(y)) p2: plus#(s(x),y) -> plus#(y,x) and R consists of: r1: minus(minus(x,y),z) -> minus(x,plus(y,z)) r2: minus(|0|(),y) -> |0|() r3: minus(x,|0|()) -> x r4: minus(s(x),s(y)) -> minus(x,y) r5: plus(|0|(),y) -> y r6: plus(s(x),y) -> plus(x,s(y)) r7: plus(s(x),y) -> s(plus(y,x)) r8: zero(s(x)) -> false() r9: zero(|0|()) -> true() r10: p(s(x)) -> x r11: p(|0|()) -> |0|() r12: div(x,y) -> quot(x,y,|0|()) r13: quot(s(x),s(y),z) -> quot(minus(p(ack(|0|(),x)),y),s(y),s(z)) r14: quot(|0|(),s(y),z) -> z r15: ack(|0|(),x) -> s(x) r16: ack(|0|(),x) -> plus(x,s(|0|())) r17: ack(s(x),|0|()) -> ack(x,s(|0|())) r18: ack(s(x),s(y)) -> ack(x,ack(s(x),y)) The set of usable rules consists of r15 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: plus#_A(x1,x2) = 3 s_A(x1) = 2 ack_A(x1,x2) = 3 |0|_A() = 5 base order 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) = x1 + x2 s_A(x1) = x1 + 4 ack_A(x1,x2) = x1 + x2 + 5 |0|_A() = 2 plus#!_A(x1,x2) = x1 + x2 + 4 s!_A(x1) = 3 ack!_A(x1,x2) = x1 + x2 + 2 |0|!_A() = 9 partial status: pi(plus#) = [] pi(s) = [] pi(ack) = [] pi(|0|) = [] The following rules are removed: p2 -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: plus#(s(x),y) -> plus#(x,s(y)) and R consists of: r1: minus(minus(x,y),z) -> minus(x,plus(y,z)) r2: minus(|0|(),y) -> |0|() r3: minus(x,|0|()) -> x r4: minus(s(x),s(y)) -> minus(x,y) r5: plus(|0|(),y) -> y r6: plus(s(x),y) -> plus(x,s(y)) r7: plus(s(x),y) -> s(plus(y,x)) r8: zero(s(x)) -> false() r9: zero(|0|()) -> true() r10: p(s(x)) -> x r11: p(|0|()) -> |0|() r12: div(x,y) -> quot(x,y,|0|()) r13: quot(s(x),s(y),z) -> quot(minus(p(ack(|0|(),x)),y),s(y),s(z)) r14: quot(|0|(),s(y),z) -> z r15: ack(|0|(),x) -> s(x) r16: ack(|0|(),x) -> plus(x,s(|0|())) r17: ack(s(x),|0|()) -> ack(x,s(|0|())) r18: ack(s(x),s(y)) -> ack(x,ack(s(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#(s(x),y) -> plus#(x,s(y)) and R consists of: r1: minus(minus(x,y),z) -> minus(x,plus(y,z)) r2: minus(|0|(),y) -> |0|() r3: minus(x,|0|()) -> x r4: minus(s(x),s(y)) -> minus(x,y) r5: plus(|0|(),y) -> y r6: plus(s(x),y) -> plus(x,s(y)) r7: plus(s(x),y) -> s(plus(y,x)) r8: zero(s(x)) -> false() r9: zero(|0|()) -> true() r10: p(s(x)) -> x r11: p(|0|()) -> |0|() r12: div(x,y) -> quot(x,y,|0|()) r13: quot(s(x),s(y),z) -> quot(minus(p(ack(|0|(),x)),y),s(y),s(z)) r14: quot(|0|(),s(y),z) -> z r15: ack(|0|(),x) -> s(x) r16: ack(|0|(),x) -> plus(x,s(|0|())) r17: ack(s(x),|0|()) -> ack(x,s(|0|())) r18: ack(s(x),s(y)) -> ack(x,ack(s(x),y)) The set of usable rules consists of r2, r14, r15 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: plus#_A(x1,x2) = x1 + x2 + 1 s_A(x1) = x1 + 3 minus_A(x1,x2) = x2 + 2 |0|_A() = 1 quot_A(x1,x2,x3) = x2 + x3 + 4 ack_A(x1,x2) = x2 + 6 base order 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) = x1 + x2 s_A(x1) = x1 + 4 minus_A(x1,x2) = x1 + x2 + 1 |0|_A() = 2 quot_A(x1,x2,x3) = x3 ack_A(x1,x2) = x1 + x2 + 5 plus#!_A(x1,x2) = x1 + x2 + 8 s!_A(x1) = 11 minus!_A(x1,x2) = x2 + 7 |0|!_A() = 12 quot!_A(x1,x2,x3) = x1 + x2 + x3 ack!_A(x1,x2) = x1 + 8 partial status: pi(plus#) = [1] pi(s) = [] pi(minus) = [] pi(|0|) = [] pi(quot) = [3] pi(ack) = [] The following rules are removed: p1 Then no dependency pair remains.