YES We show the termination of the TRS R: minus(x,|0|()) -> x minus(|0|(),y) -> |0|() minus(s(x),s(y)) -> minus(p(s(x)),p(s(y))) minus(x,plus(y,z)) -> minus(minus(x,y),z) p(s(s(x))) -> s(p(s(x))) p(|0|()) -> s(s(|0|())) div(s(x),s(y)) -> s(div(minus(x,y),s(y))) div(plus(x,y),z) -> plus(div(x,z),div(y,z)) plus(|0|(),y) -> y plus(s(x),y) -> s(plus(y,minus(s(x),s(|0|())))) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: minus#(s(x),s(y)) -> minus#(p(s(x)),p(s(y))) p2: minus#(s(x),s(y)) -> p#(s(x)) p3: minus#(s(x),s(y)) -> p#(s(y)) p4: minus#(x,plus(y,z)) -> minus#(minus(x,y),z) p5: minus#(x,plus(y,z)) -> minus#(x,y) p6: p#(s(s(x))) -> p#(s(x)) p7: div#(s(x),s(y)) -> div#(minus(x,y),s(y)) p8: div#(s(x),s(y)) -> minus#(x,y) p9: div#(plus(x,y),z) -> plus#(div(x,z),div(y,z)) p10: div#(plus(x,y),z) -> div#(x,z) p11: div#(plus(x,y),z) -> div#(y,z) p12: plus#(s(x),y) -> plus#(y,minus(s(x),s(|0|()))) p13: plus#(s(x),y) -> minus#(s(x),s(|0|())) and R consists of: r1: minus(x,|0|()) -> x r2: minus(|0|(),y) -> |0|() r3: minus(s(x),s(y)) -> minus(p(s(x)),p(s(y))) r4: minus(x,plus(y,z)) -> minus(minus(x,y),z) r5: p(s(s(x))) -> s(p(s(x))) r6: p(|0|()) -> s(s(|0|())) r7: div(s(x),s(y)) -> s(div(minus(x,y),s(y))) r8: div(plus(x,y),z) -> plus(div(x,z),div(y,z)) r9: plus(|0|(),y) -> y r10: plus(s(x),y) -> s(plus(y,minus(s(x),s(|0|())))) The estimated dependency graph contains the following SCCs: {p7, p10, p11} {p12} {p1, p4, p5} {p6} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: div#(plus(x,y),z) -> div#(y,z) p2: div#(plus(x,y),z) -> div#(x,z) p3: div#(s(x),s(y)) -> div#(minus(x,y),s(y)) and R consists of: r1: minus(x,|0|()) -> x r2: minus(|0|(),y) -> |0|() r3: minus(s(x),s(y)) -> minus(p(s(x)),p(s(y))) r4: minus(x,plus(y,z)) -> minus(minus(x,y),z) r5: p(s(s(x))) -> s(p(s(x))) r6: p(|0|()) -> s(s(|0|())) r7: div(s(x),s(y)) -> s(div(minus(x,y),s(y))) r8: div(plus(x,y),z) -> plus(div(x,z),div(y,z)) r9: plus(|0|(),y) -> y r10: plus(s(x),y) -> s(plus(y,minus(s(x),s(|0|())))) The set of usable rules consists of r1, r2, r3, r4, r5 Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: div#_A(x1,x2) = x1 + (1,4) plus_A(x1,x2) = x1 + ((1,0),(1,1)) x2 + (2,3) s_A(x1) = ((1,0),(0,0)) x1 + (2,6) minus_A(x1,x2) = x1 + ((0,0),(1,0)) x2 + (0,1) p_A(x1) = ((1,0),(0,0)) x1 + (0,6) |0|_A() = (0,1) precedence: minus = |0| > div# = plus = p > s partial status: pi(div#) = [1] pi(plus) = [1, 2] pi(s) = [] pi(minus) = [] pi(p) = [] pi(|0|) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: div#_A(x1,x2) = ((1,0),(0,0)) x1 plus_A(x1,x2) = ((1,0),(1,1)) x1 + ((1,0),(1,1)) x2 + (1,2) s_A(x1) = (1,2) minus_A(x1,x2) = (0,1) p_A(x1) = (2,0) |0|_A() = (0,0) precedence: minus = p = |0| > plus > div# = s partial status: pi(div#) = [] pi(plus) = [2] pi(s) = [] pi(minus) = [] pi(p) = [] pi(|0|) = [] The next rules are strictly ordered: p2 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: div#(plus(x,y),z) -> div#(y,z) p2: div#(s(x),s(y)) -> div#(minus(x,y),s(y)) and R consists of: r1: minus(x,|0|()) -> x r2: minus(|0|(),y) -> |0|() r3: minus(s(x),s(y)) -> minus(p(s(x)),p(s(y))) r4: minus(x,plus(y,z)) -> minus(minus(x,y),z) r5: p(s(s(x))) -> s(p(s(x))) r6: p(|0|()) -> s(s(|0|())) r7: div(s(x),s(y)) -> s(div(minus(x,y),s(y))) r8: div(plus(x,y),z) -> plus(div(x,z),div(y,z)) r9: plus(|0|(),y) -> y r10: plus(s(x),y) -> s(plus(y,minus(s(x),s(|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#(plus(x,y),z) -> div#(y,z) p2: div#(s(x),s(y)) -> div#(minus(x,y),s(y)) and R consists of: r1: minus(x,|0|()) -> x r2: minus(|0|(),y) -> |0|() r3: minus(s(x),s(y)) -> minus(p(s(x)),p(s(y))) r4: minus(x,plus(y,z)) -> minus(minus(x,y),z) r5: p(s(s(x))) -> s(p(s(x))) r6: p(|0|()) -> s(s(|0|())) r7: div(s(x),s(y)) -> s(div(minus(x,y),s(y))) r8: div(plus(x,y),z) -> plus(div(x,z),div(y,z)) r9: plus(|0|(),y) -> y r10: plus(s(x),y) -> s(plus(y,minus(s(x),s(|0|())))) The set of usable rules consists of r1, r2, r3, r4, r5 Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: div#_A(x1,x2) = x1 + ((1,0),(0,0)) x2 + (1,2) plus_A(x1,x2) = ((1,0),(0,0)) x1 + x2 + (0,1) s_A(x1) = x1 + (1,1) minus_A(x1,x2) = x1 + ((0,0),(1,0)) x2 p_A(x1) = x1 |0|_A() = (1,1) precedence: p > plus > div# = s = minus = |0| partial status: pi(div#) = [1] pi(plus) = [2] pi(s) = [1] pi(minus) = [] pi(p) = [] pi(|0|) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: div#_A(x1,x2) = x1 + (1,1) plus_A(x1,x2) = ((1,0),(1,1)) x2 + (2,2) s_A(x1) = ((1,0),(1,0)) x1 + (5,2) minus_A(x1,x2) = (3,0) p_A(x1) = (2,3) |0|_A() = (1,0) precedence: plus > p > minus > |0| > s > div# partial status: pi(div#) = [1] pi(plus) = [] pi(s) = [] pi(minus) = [] pi(p) = [] pi(|0|) = [] The next rules are strictly ordered: p2 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: div#(plus(x,y),z) -> div#(y,z) and R consists of: r1: minus(x,|0|()) -> x r2: minus(|0|(),y) -> |0|() r3: minus(s(x),s(y)) -> minus(p(s(x)),p(s(y))) r4: minus(x,plus(y,z)) -> minus(minus(x,y),z) r5: p(s(s(x))) -> s(p(s(x))) r6: p(|0|()) -> s(s(|0|())) r7: div(s(x),s(y)) -> s(div(minus(x,y),s(y))) r8: div(plus(x,y),z) -> plus(div(x,z),div(y,z)) r9: plus(|0|(),y) -> y r10: plus(s(x),y) -> s(plus(y,minus(s(x),s(|0|())))) The estimated dependency graph contains the following SCCs: {p1} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: div#(plus(x,y),z) -> div#(y,z) and R consists of: r1: minus(x,|0|()) -> x r2: minus(|0|(),y) -> |0|() r3: minus(s(x),s(y)) -> minus(p(s(x)),p(s(y))) r4: minus(x,plus(y,z)) -> minus(minus(x,y),z) r5: p(s(s(x))) -> s(p(s(x))) r6: p(|0|()) -> s(s(|0|())) r7: div(s(x),s(y)) -> s(div(minus(x,y),s(y))) r8: div(plus(x,y),z) -> plus(div(x,z),div(y,z)) r9: plus(|0|(),y) -> y r10: plus(s(x),y) -> s(plus(y,minus(s(x),s(|0|())))) The set of usable rules consists of (no rules) Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: div#_A(x1,x2) = ((1,0),(1,0)) x1 + ((1,0),(0,0)) x2 + (2,2) plus_A(x1,x2) = x1 + ((1,0),(0,0)) x2 + (1,1) precedence: div# = plus partial status: pi(div#) = [] pi(plus) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: div#_A(x1,x2) = (1,1) plus_A(x1,x2) = x1 + (2,2) precedence: div# = plus partial status: pi(div#) = [] pi(plus) = [] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: plus#(s(x),y) -> plus#(y,minus(s(x),s(|0|()))) and R consists of: r1: minus(x,|0|()) -> x r2: minus(|0|(),y) -> |0|() r3: minus(s(x),s(y)) -> minus(p(s(x)),p(s(y))) r4: minus(x,plus(y,z)) -> minus(minus(x,y),z) r5: p(s(s(x))) -> s(p(s(x))) r6: p(|0|()) -> s(s(|0|())) r7: div(s(x),s(y)) -> s(div(minus(x,y),s(y))) r8: div(plus(x,y),z) -> plus(div(x,z),div(y,z)) r9: plus(|0|(),y) -> y r10: plus(s(x),y) -> s(plus(y,minus(s(x),s(|0|())))) The set of usable rules consists of r1, r2, r3, r4, r5 Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: plus#_A(x1,x2) = x1 + x2 s_A(x1) = (0,0) minus_A(x1,x2) = ((1,0),(1,1)) x1 + x2 |0|_A() = (1,1) plus_A(x1,x2) = x1 + x2 + (1,1) p_A(x1) = x1 precedence: plus# = s = minus = |0| = plus = p partial status: pi(plus#) = [] pi(s) = [] pi(minus) = [] pi(|0|) = [] pi(plus) = [] pi(p) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: plus#_A(x1,x2) = x1 + x2 + (1,0) s_A(x1) = (1,2) minus_A(x1,x2) = ((1,0),(0,0)) x2 |0|_A() = (1,1) plus_A(x1,x2) = ((1,0),(0,0)) x2 + (1,1) p_A(x1) = x1 + (0,1) precedence: |0| > plus# = s = p > minus = plus partial status: pi(plus#) = [] pi(s) = [] pi(minus) = [] pi(|0|) = [] pi(plus) = [] pi(p) = [1] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: minus#(s(x),s(y)) -> minus#(p(s(x)),p(s(y))) p2: minus#(x,plus(y,z)) -> minus#(x,y) p3: minus#(x,plus(y,z)) -> minus#(minus(x,y),z) and R consists of: r1: minus(x,|0|()) -> x r2: minus(|0|(),y) -> |0|() r3: minus(s(x),s(y)) -> minus(p(s(x)),p(s(y))) r4: minus(x,plus(y,z)) -> minus(minus(x,y),z) r5: p(s(s(x))) -> s(p(s(x))) r6: p(|0|()) -> s(s(|0|())) r7: div(s(x),s(y)) -> s(div(minus(x,y),s(y))) r8: div(plus(x,y),z) -> plus(div(x,z),div(y,z)) r9: plus(|0|(),y) -> y r10: plus(s(x),y) -> s(plus(y,minus(s(x),s(|0|())))) The set of usable rules consists of r1, r2, r3, r4, r5 Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: minus#_A(x1,x2) = ((0,0),(1,0)) x2 s_A(x1) = ((1,0),(0,0)) x1 + (3,6) p_A(x1) = ((1,0),(1,0)) x1 + (0,1) plus_A(x1,x2) = ((1,0),(1,1)) x1 + ((1,0),(0,0)) x2 + (3,6) minus_A(x1,x2) = ((1,0),(0,0)) x1 + ((1,0),(0,0)) x2 + (2,5) |0|_A() = (1,1) precedence: minus# = s = p = plus = minus = |0| partial status: pi(minus#) = [] pi(s) = [] pi(p) = [] pi(plus) = [] pi(minus) = [] pi(|0|) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: minus#_A(x1,x2) = (0,0) s_A(x1) = (1,1) p_A(x1) = (2,1) plus_A(x1,x2) = ((1,0),(1,1)) x1 + (1,1) minus_A(x1,x2) = (3,2) |0|_A() = (0,1) precedence: p > minus# = s > minus = |0| > plus partial status: pi(minus#) = [] pi(s) = [] pi(p) = [] pi(plus) = [1] pi(minus) = [] pi(|0|) = [] The next rules are strictly ordered: p2 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: minus#(s(x),s(y)) -> minus#(p(s(x)),p(s(y))) p2: minus#(x,plus(y,z)) -> minus#(minus(x,y),z) and R consists of: r1: minus(x,|0|()) -> x r2: minus(|0|(),y) -> |0|() r3: minus(s(x),s(y)) -> minus(p(s(x)),p(s(y))) r4: minus(x,plus(y,z)) -> minus(minus(x,y),z) r5: p(s(s(x))) -> s(p(s(x))) r6: p(|0|()) -> s(s(|0|())) r7: div(s(x),s(y)) -> s(div(minus(x,y),s(y))) r8: div(plus(x,y),z) -> plus(div(x,z),div(y,z)) r9: plus(|0|(),y) -> y r10: plus(s(x),y) -> s(plus(y,minus(s(x),s(|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: minus#(s(x),s(y)) -> minus#(p(s(x)),p(s(y))) p2: minus#(x,plus(y,z)) -> minus#(minus(x,y),z) and R consists of: r1: minus(x,|0|()) -> x r2: minus(|0|(),y) -> |0|() r3: minus(s(x),s(y)) -> minus(p(s(x)),p(s(y))) r4: minus(x,plus(y,z)) -> minus(minus(x,y),z) r5: p(s(s(x))) -> s(p(s(x))) r6: p(|0|()) -> s(s(|0|())) r7: div(s(x),s(y)) -> s(div(minus(x,y),s(y))) r8: div(plus(x,y),z) -> plus(div(x,z),div(y,z)) r9: plus(|0|(),y) -> y r10: plus(s(x),y) -> s(plus(y,minus(s(x),s(|0|())))) The set of usable rules consists of r1, r2, r3, r4, r5 Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: minus#_A(x1,x2) = ((0,0),(1,0)) x2 + (4,4) s_A(x1) = (0,1) p_A(x1) = x1 plus_A(x1,x2) = x1 + x2 + (3,3) minus_A(x1,x2) = x1 + x2 + (2,1) |0|_A() = (0,1) precedence: minus# > |0| > p > s = plus = minus partial status: pi(minus#) = [] pi(s) = [] pi(p) = [1] pi(plus) = [1, 2] pi(minus) = [] pi(|0|) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: minus#_A(x1,x2) = (3,2) s_A(x1) = (3,2) p_A(x1) = (4,0) plus_A(x1,x2) = ((0,0),(1,0)) x1 + ((0,0),(1,0)) x2 + (1,2) minus_A(x1,x2) = (2,1) |0|_A() = (0,2) precedence: p > minus# = s > plus = minus = |0| partial status: pi(minus#) = [] pi(s) = [] pi(p) = [] pi(plus) = [] pi(minus) = [] pi(|0|) = [] The next rules are strictly ordered: p2 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: minus#(s(x),s(y)) -> minus#(p(s(x)),p(s(y))) and R consists of: r1: minus(x,|0|()) -> x r2: minus(|0|(),y) -> |0|() r3: minus(s(x),s(y)) -> minus(p(s(x)),p(s(y))) r4: minus(x,plus(y,z)) -> minus(minus(x,y),z) r5: p(s(s(x))) -> s(p(s(x))) r6: p(|0|()) -> s(s(|0|())) r7: div(s(x),s(y)) -> s(div(minus(x,y),s(y))) r8: div(plus(x,y),z) -> plus(div(x,z),div(y,z)) r9: plus(|0|(),y) -> y r10: plus(s(x),y) -> s(plus(y,minus(s(x),s(|0|())))) The estimated dependency graph contains the following SCCs: {p1} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: minus#(s(x),s(y)) -> minus#(p(s(x)),p(s(y))) and R consists of: r1: minus(x,|0|()) -> x r2: minus(|0|(),y) -> |0|() r3: minus(s(x),s(y)) -> minus(p(s(x)),p(s(y))) r4: minus(x,plus(y,z)) -> minus(minus(x,y),z) r5: p(s(s(x))) -> s(p(s(x))) r6: p(|0|()) -> s(s(|0|())) r7: div(s(x),s(y)) -> s(div(minus(x,y),s(y))) r8: div(plus(x,y),z) -> plus(div(x,z),div(y,z)) r9: plus(|0|(),y) -> y r10: plus(s(x),y) -> s(plus(y,minus(s(x),s(|0|())))) The set of usable rules consists of r5 Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: matrix interpretations: carrier: N^2 order: standard order interpretations: minus#_A(x1,x2) = ((1,0),(0,0)) x1 + ((1,0),(0,0)) x2 + (1,1) s_A(x1) = ((1,0),(0,0)) x1 + (1,0) p_A(x1) = ((1,0),(1,0)) x1 + (0,1) precedence: minus# = s = p partial status: pi(minus#) = [] pi(s) = [] pi(p) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: standard order interpretations: minus#_A(x1,x2) = x1 + ((0,1),(0,0)) x2 s_A(x1) = ((0,1),(0,1)) x1 + (0,3) p_A(x1) = ((1,0),(1,0)) x1 + (1,1) precedence: p > s > minus# partial status: pi(minus#) = [1] pi(s) = [] pi(p) = [] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: p#(s(s(x))) -> p#(s(x)) and R consists of: r1: minus(x,|0|()) -> x r2: minus(|0|(),y) -> |0|() r3: minus(s(x),s(y)) -> minus(p(s(x)),p(s(y))) r4: minus(x,plus(y,z)) -> minus(minus(x,y),z) r5: p(s(s(x))) -> s(p(s(x))) r6: p(|0|()) -> s(s(|0|())) r7: div(s(x),s(y)) -> s(div(minus(x,y),s(y))) r8: div(plus(x,y),z) -> plus(div(x,z),div(y,z)) r9: plus(|0|(),y) -> y r10: plus(s(x),y) -> s(plus(y,minus(s(x),s(|0|())))) The set of usable rules consists of (no rules) Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: p#_A(x1) = ((1,0),(0,0)) x1 + (1,2) s_A(x1) = ((1,0),(0,0)) x1 + (2,1) precedence: s > p# partial status: pi(p#) = [] pi(s) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: p#_A(x1) = (0,0) s_A(x1) = (1,1) precedence: p# > s partial status: pi(p#) = [] pi(s) = [] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains.