YES We show the termination of the TRS R: min(x,|0|()) -> |0|() min(|0|(),y) -> |0|() min(s(x),s(y)) -> s(min(x,y)) max(x,|0|()) -> x max(|0|(),y) -> y max(s(x),s(y)) -> s(max(x,y)) minus(x,|0|()) -> x minus(s(x),s(y)) -> s(minus(x,any(y))) gcd(s(x),s(y)) -> gcd(minus(max(x,y),min(x,y)),s(min(x,y))) any(s(x)) -> s(s(any(x))) any(x) -> x -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: min#(s(x),s(y)) -> min#(x,y) p2: max#(s(x),s(y)) -> max#(x,y) p3: minus#(s(x),s(y)) -> minus#(x,any(y)) p4: minus#(s(x),s(y)) -> any#(y) p5: gcd#(s(x),s(y)) -> gcd#(minus(max(x,y),min(x,y)),s(min(x,y))) p6: gcd#(s(x),s(y)) -> minus#(max(x,y),min(x,y)) p7: gcd#(s(x),s(y)) -> max#(x,y) p8: gcd#(s(x),s(y)) -> min#(x,y) p9: any#(s(x)) -> any#(x) and R consists of: r1: min(x,|0|()) -> |0|() r2: min(|0|(),y) -> |0|() r3: min(s(x),s(y)) -> s(min(x,y)) r4: max(x,|0|()) -> x r5: max(|0|(),y) -> y r6: max(s(x),s(y)) -> s(max(x,y)) r7: minus(x,|0|()) -> x r8: minus(s(x),s(y)) -> s(minus(x,any(y))) r9: gcd(s(x),s(y)) -> gcd(minus(max(x,y),min(x,y)),s(min(x,y))) r10: any(s(x)) -> s(s(any(x))) r11: any(x) -> x The estimated dependency graph contains the following SCCs: {p5} {p1} {p2} {p3} {p9} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: gcd#(s(x),s(y)) -> gcd#(minus(max(x,y),min(x,y)),s(min(x,y))) and R consists of: r1: min(x,|0|()) -> |0|() r2: min(|0|(),y) -> |0|() r3: min(s(x),s(y)) -> s(min(x,y)) r4: max(x,|0|()) -> x r5: max(|0|(),y) -> y r6: max(s(x),s(y)) -> s(max(x,y)) r7: minus(x,|0|()) -> x r8: minus(s(x),s(y)) -> s(minus(x,any(y))) r9: gcd(s(x),s(y)) -> gcd(minus(max(x,y),min(x,y)),s(min(x,y))) r10: any(s(x)) -> s(s(any(x))) r11: any(x) -> x The set of usable rules consists of r1, r2, r3, r4, r5, r6, r7, r8 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: gcd#_A(x1,x2) = 3 s_A(x1) = 4 minus_A(x1,x2) = x1 + 1 max_A(x1,x2) = x1 + x2 + 1 min_A(x1,x2) = x1 + 2 |0|_A() = 0 any_A(x1) = x1 + 6 base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: gcd#_A(x1,x2) = max{0, x1 - 29, x2 - 45} s_A(x1) = x1 + 28 minus_A(x1,x2) = x1 + 2 max_A(x1,x2) = max{x1, x2 + 7} min_A(x1,x2) = x1 + 16 |0|_A = 16 any_A(x1) = max{17, x1} gcd#!_A(x1,x2) = max{x1 + 13, x2 - 5} s!_A(x1) = 14 minus!_A(x1,x2) = max{69, x1 + 41} max!_A(x1,x2) = max{42, x1 - 32, x2 - 29} min!_A(x1,x2) = 0 |0|!_A = 1 any!_A(x1) = max{70, x1 - 1} partial status: pi(gcd#) = [] pi(s) = [] pi(minus) = [] pi(max) = [1] pi(min) = [1] pi(|0|) = [] pi(any) = [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: min#(s(x),s(y)) -> min#(x,y) and R consists of: r1: min(x,|0|()) -> |0|() r2: min(|0|(),y) -> |0|() r3: min(s(x),s(y)) -> s(min(x,y)) r4: max(x,|0|()) -> x r5: max(|0|(),y) -> y r6: max(s(x),s(y)) -> s(max(x,y)) r7: minus(x,|0|()) -> x r8: minus(s(x),s(y)) -> s(minus(x,any(y))) r9: gcd(s(x),s(y)) -> gcd(minus(max(x,y),min(x,y)),s(min(x,y))) r10: any(s(x)) -> s(s(any(x))) r11: any(x) -> x The set of usable rules consists of r1, r2 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: min#_A(x1,x2) = x1 + x2 + 3 s_A(x1) = x1 + 2 min_A(x1,x2) = x1 + x2 + 3 |0|_A() = 1 base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: min#_A(x1,x2) = 0 s_A(x1) = max{2, x1 - 38} min_A(x1,x2) = max{21, x1 - 4, x2 - 4} |0|_A = 3 min#!_A(x1,x2) = max{2, x1 - 3, x2 - 1} s!_A(x1) = 1 min!_A(x1,x2) = max{4, x1 - 4, x2 - 4} |0|!_A = 0 partial status: pi(min#) = [1] pi(s) = [1] pi(min) = [1] 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: max#(s(x),s(y)) -> max#(x,y) and R consists of: r1: min(x,|0|()) -> |0|() r2: min(|0|(),y) -> |0|() r3: min(s(x),s(y)) -> s(min(x,y)) r4: max(x,|0|()) -> x r5: max(|0|(),y) -> y r6: max(s(x),s(y)) -> s(max(x,y)) r7: minus(x,|0|()) -> x r8: minus(s(x),s(y)) -> s(minus(x,any(y))) r9: gcd(s(x),s(y)) -> gcd(minus(max(x,y),min(x,y)),s(min(x,y))) r10: any(s(x)) -> s(s(any(x))) r11: any(x) -> x 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: max#_A(x1,x2) = x1 + x2 s_A(x1) = x1 + 2 base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: max#_A(x1,x2) = 0 s_A(x1) = max{5, x1 - 19} max#!_A(x1,x2) = max{25, x2 + 20} s!_A(x1) = 1 partial status: pi(max#) = [1] pi(s) = [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: minus#(s(x),s(y)) -> minus#(x,any(y)) and R consists of: r1: min(x,|0|()) -> |0|() r2: min(|0|(),y) -> |0|() r3: min(s(x),s(y)) -> s(min(x,y)) r4: max(x,|0|()) -> x r5: max(|0|(),y) -> y r6: max(s(x),s(y)) -> s(max(x,y)) r7: minus(x,|0|()) -> x r8: minus(s(x),s(y)) -> s(minus(x,any(y))) r9: gcd(s(x),s(y)) -> gcd(minus(max(x,y),min(x,y)),s(min(x,y))) r10: any(s(x)) -> s(s(any(x))) r11: any(x) -> x 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: minus#_A(x1,x2) = x1 s_A(x1) = x1 + 2 any_A(x1) = 1 base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: minus#_A(x1,x2) = 0 s_A(x1) = 5 any_A(x1) = 0 minus#!_A(x1,x2) = 0 s!_A(x1) = 0 any!_A(x1) = 0 partial status: pi(minus#) = [] pi(s) = [] pi(any) = [] 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: any#(s(x)) -> any#(x) and R consists of: r1: min(x,|0|()) -> |0|() r2: min(|0|(),y) -> |0|() r3: min(s(x),s(y)) -> s(min(x,y)) r4: max(x,|0|()) -> x r5: max(|0|(),y) -> y r6: max(s(x),s(y)) -> s(max(x,y)) r7: minus(x,|0|()) -> x r8: minus(s(x),s(y)) -> s(minus(x,any(y))) r9: gcd(s(x),s(y)) -> gcd(minus(max(x,y),min(x,y)),s(min(x,y))) r10: any(s(x)) -> s(s(any(x))) r11: any(x) -> x 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: any#_A(x1) = 0 s_A(x1) = 1 base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: any#_A(x1) = x1 s_A(x1) = x1 + 10 any#!_A(x1) = max{1, x1 - 3} s!_A(x1) = 0 partial status: pi(any#) = [] pi(s) = [] The following rules are removed: p1 Then no dependency pair remains.