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 + 1 s_A(x1) = x1 + 1 minus_A(x1,x2) = x1 p_A(x1) = x1 ack_A(x1,x2) = x2 + 1 |0|_A() = 0 plus_A(x1,x2) = x1 + x2 base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: quot#_A(x1,x2,x3) = max{1, x1 - 7, x2 - 7, x3 - 1} s_A(x1) = x1 minus_A(x1,x2) = x1 p_A(x1) = x1 ack_A(x1,x2) = max{8, x1 - 8, x2} |0|_A = 8 plus_A(x1,x2) = max{1, x1, x2} quot#!_A(x1,x2,x3) = max{x1 + 28, x2 + 37, x3 + 37} s!_A(x1) = max{16, x1 + 6} minus!_A(x1,x2) = max{5, x1 - 8} p!_A(x1) = max{4, x1 - 9} ack!_A(x1,x2) = max{26, x2 + 7} |0|!_A = 2 plus!_A(x1,x2) = max{x1 + 6, x2 + 17} partial status: pi(quot#) = [1] pi(s) = [] pi(minus) = [1] pi(p) = [] pi(ack) = [] pi(|0|) = [] pi(plus) = [1, 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 + 3 minus_A(x1,x2) = x1 + x2 + 7 plus_A(x1,x2) = x1 + x2 + 3 s_A(x1) = x1 + 2 |0|_A() = 1 base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: minus#_A(x1,x2) = max{0, x1 - 42, x2 - 79} minus_A(x1,x2) = max{x1 + 41, x2 - 37} plus_A(x1,x2) = max{36, x1, x2} s_A(x1) = max{3, x1} |0|_A = 12 minus#!_A(x1,x2) = max{3, x1 - 42, x2 - 80} minus!_A(x1,x2) = max{2, x1 - 45, x2 - 119} plus!_A(x1,x2) = max{1, x1 - 79, x2 - 83} s!_A(x1) = max{0, x1 - 83} |0|!_A = 0 partial status: pi(minus#) = [1] pi(minus) = [1, 2] pi(plus) = [1] pi(s) = [] 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 r5, r11, 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) = 4 ack_A(x1,x2) = 10 |0|_A() = 1 plus_A(x1,x2) = x2 + 5 p_A(x1) = 2 base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: ack#_A(x1,x2) = max{0, x1 - 6} s_A(x1) = x1 + 5 ack_A(x1,x2) = max{x1 - 43, x2 + 60} |0|_A = 21 plus_A(x1,x2) = max{61, x1 - 31, x2 + 59} p_A(x1) = max{38, x1 - 22} ack#!_A(x1,x2) = max{1, x1 - 1} s!_A(x1) = max{12, x1 + 4} ack!_A(x1,x2) = max{0, x2 - 13} |0|!_A = 26 plus!_A(x1,x2) = max{28, x1 - 27, x2 - 27} p!_A(x1) = max{13, x1 - 85} partial status: pi(ack#) = [] pi(s) = [] pi(ack) = [] pi(|0|) = [] pi(plus) = [] pi(p) = [] 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, 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) = x2 + 1 s_A(x1) = x1 + 5 minus_A(x1,x2) = x1 + 1 |0|_A() = 4 ack_A(x1,x2) = x1 + x2 + 6 base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: ack#_A(x1,x2) = 0 s_A(x1) = max{2, x1 - 38} minus_A(x1,x2) = max{10, x1 - 12, x2 - 38} |0|_A = 3 ack_A(x1,x2) = max{19, x1 - 25, x2 - 20} ack#!_A(x1,x2) = max{4, x1 - 79, x2 - 3} s!_A(x1) = max{4, x1 - 118} minus!_A(x1,x2) = max{5, x1 - 4} |0|!_A = 2 ack!_A(x1,x2) = max{4, x1 - 80, x2 - 39} partial status: pi(ack#) = [] pi(s) = [1] pi(minus) = [1] pi(|0|) = [] pi(ack) = [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: 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 r11 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 + 5 s_A(x1) = x1 + 4 p_A(x1) = x1 + 1 |0|_A() = 1 base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: plus#_A(x1,x2) = 0 s_A(x1) = max{24, x1 - 11} p_A(x1) = max{51, x1 - 2} |0|_A = 1 plus#!_A(x1,x2) = max{0, x2 - 123} s!_A(x1) = max{5, x1 - 123} p!_A(x1) = max{4, x1 - 144} |0|!_A = 1 partial status: pi(plus#) = [] pi(s) = [] pi(p) = [] 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 r11, 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 p_A(x1) = x1 + 1 |0|_A() = 1 ack_A(x1,x2) = x1 + x2 + 4 base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: plus#_A(x1,x2) = max{0, x2 - 2} s_A(x1) = 1 p_A(x1) = max{17, x1 + 6} |0|_A = 19 ack_A(x1,x2) = max{11, x1 + 7, x2 - 12} plus#!_A(x1,x2) = max{9, x2 + 7} s!_A(x1) = max{0, x1 - 40} p!_A(x1) = max{10, x1 - 27} |0|!_A = 0 ack!_A(x1,x2) = max{10, x1 - 60, x2} partial status: pi(plus#) = [1, 2] pi(s) = [1] pi(p) = [] pi(|0|) = [] pi(ack) = [1, 2] The following rules are removed: p1 Then no dependency pair remains.