YES We show the termination of the TRS R: eq(|0|(),|0|()) -> true() eq(|0|(),s(x)) -> false() eq(s(x),|0|()) -> false() eq(s(x),s(y)) -> eq(x,y) le(|0|(),y) -> true() le(s(x),|0|()) -> false() le(s(x),s(y)) -> le(x,y) app(nil(),y) -> y app(add(n,x),y) -> add(n,app(x,y)) min(add(n,nil())) -> n min(add(n,add(m,x))) -> if_min(le(n,m),add(n,add(m,x))) if_min(true(),add(n,add(m,x))) -> min(add(n,x)) if_min(false(),add(n,add(m,x))) -> min(add(m,x)) rm(n,nil()) -> nil() rm(n,add(m,x)) -> if_rm(eq(n,m),n,add(m,x)) if_rm(true(),n,add(m,x)) -> rm(n,x) if_rm(false(),n,add(m,x)) -> add(m,rm(n,x)) minsort(nil(),nil()) -> nil() minsort(add(n,x),y) -> if_minsort(eq(n,min(add(n,x))),add(n,x),y) if_minsort(true(),add(n,x),y) -> add(n,minsort(app(rm(n,x),y),nil())) if_minsort(false(),add(n,x),y) -> minsort(x,add(n,y)) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: eq#(s(x),s(y)) -> eq#(x,y) p2: le#(s(x),s(y)) -> le#(x,y) p3: app#(add(n,x),y) -> app#(x,y) p4: min#(add(n,add(m,x))) -> if_min#(le(n,m),add(n,add(m,x))) p5: min#(add(n,add(m,x))) -> le#(n,m) p6: if_min#(true(),add(n,add(m,x))) -> min#(add(n,x)) p7: if_min#(false(),add(n,add(m,x))) -> min#(add(m,x)) p8: rm#(n,add(m,x)) -> if_rm#(eq(n,m),n,add(m,x)) p9: rm#(n,add(m,x)) -> eq#(n,m) p10: if_rm#(true(),n,add(m,x)) -> rm#(n,x) p11: if_rm#(false(),n,add(m,x)) -> rm#(n,x) p12: minsort#(add(n,x),y) -> if_minsort#(eq(n,min(add(n,x))),add(n,x),y) p13: minsort#(add(n,x),y) -> eq#(n,min(add(n,x))) p14: minsort#(add(n,x),y) -> min#(add(n,x)) p15: if_minsort#(true(),add(n,x),y) -> minsort#(app(rm(n,x),y),nil()) p16: if_minsort#(true(),add(n,x),y) -> app#(rm(n,x),y) p17: if_minsort#(true(),add(n,x),y) -> rm#(n,x) p18: if_minsort#(false(),add(n,x),y) -> minsort#(x,add(n,y)) and R consists of: r1: eq(|0|(),|0|()) -> true() r2: eq(|0|(),s(x)) -> false() r3: eq(s(x),|0|()) -> false() r4: eq(s(x),s(y)) -> eq(x,y) r5: le(|0|(),y) -> true() r6: le(s(x),|0|()) -> false() r7: le(s(x),s(y)) -> le(x,y) r8: app(nil(),y) -> y r9: app(add(n,x),y) -> add(n,app(x,y)) r10: min(add(n,nil())) -> n r11: min(add(n,add(m,x))) -> if_min(le(n,m),add(n,add(m,x))) r12: if_min(true(),add(n,add(m,x))) -> min(add(n,x)) r13: if_min(false(),add(n,add(m,x))) -> min(add(m,x)) r14: rm(n,nil()) -> nil() r15: rm(n,add(m,x)) -> if_rm(eq(n,m),n,add(m,x)) r16: if_rm(true(),n,add(m,x)) -> rm(n,x) r17: if_rm(false(),n,add(m,x)) -> add(m,rm(n,x)) r18: minsort(nil(),nil()) -> nil() r19: minsort(add(n,x),y) -> if_minsort(eq(n,min(add(n,x))),add(n,x),y) r20: if_minsort(true(),add(n,x),y) -> add(n,minsort(app(rm(n,x),y),nil())) r21: if_minsort(false(),add(n,x),y) -> minsort(x,add(n,y)) The estimated dependency graph contains the following SCCs: {p12, p15, p18} {p8, p10, p11} {p1} {p4, p6, p7} {p2} {p3} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: if_minsort#(false(),add(n,x),y) -> minsort#(x,add(n,y)) p2: minsort#(add(n,x),y) -> if_minsort#(eq(n,min(add(n,x))),add(n,x),y) p3: if_minsort#(true(),add(n,x),y) -> minsort#(app(rm(n,x),y),nil()) and R consists of: r1: eq(|0|(),|0|()) -> true() r2: eq(|0|(),s(x)) -> false() r3: eq(s(x),|0|()) -> false() r4: eq(s(x),s(y)) -> eq(x,y) r5: le(|0|(),y) -> true() r6: le(s(x),|0|()) -> false() r7: le(s(x),s(y)) -> le(x,y) r8: app(nil(),y) -> y r9: app(add(n,x),y) -> add(n,app(x,y)) r10: min(add(n,nil())) -> n r11: min(add(n,add(m,x))) -> if_min(le(n,m),add(n,add(m,x))) r12: if_min(true(),add(n,add(m,x))) -> min(add(n,x)) r13: if_min(false(),add(n,add(m,x))) -> min(add(m,x)) r14: rm(n,nil()) -> nil() r15: rm(n,add(m,x)) -> if_rm(eq(n,m),n,add(m,x)) r16: if_rm(true(),n,add(m,x)) -> rm(n,x) r17: if_rm(false(),n,add(m,x)) -> add(m,rm(n,x)) r18: minsort(nil(),nil()) -> nil() r19: minsort(add(n,x),y) -> if_minsort(eq(n,min(add(n,x))),add(n,x),y) r20: if_minsort(true(),add(n,x),y) -> add(n,minsort(app(rm(n,x),y),nil())) r21: if_minsort(false(),add(n,x),y) -> minsort(x,add(n,y)) The set of usable rules consists of r1, r2, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15, r16, r17 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: if_minsort#_A(x1,x2,x3) = max{x2 + 12, x3 + 12} false_A = 25 add_A(x1,x2) = max{x1 + 8, x2} minsort#_A(x1,x2) = max{18, x1 + 12, x2 + 12} eq_A(x1,x2) = max{42, x2} min_A(x1) = max{66, x1 + 37} true_A = 43 app_A(x1,x2) = max{1, x1, x2} rm_A(x1,x2) = max{x1 - 11, x2} nil_A = 0 |0|_A = 58 s_A(x1) = x1 + 11 le_A(x1,x2) = max{5, x1 + 4, x2 + 1} if_min_A(x1,x2) = max{x1 + 41, x2 + 37} if_rm_A(x1,x2,x3) = max{4, x2 - 11, x3} if_minsort#!_A(x1,x2,x3) = max{16, x2 + 10, x3 + 10} false!_A = 14 add!_A(x1,x2) = 20 minsort#!_A(x1,x2) = max{x1 + 10, x2 + 10} eq!_A(x1,x2) = max{9, x2 - 45} min!_A(x1) = 20 true!_A = 12 app!_A(x1,x2) = max{21, x1 + 9} rm!_A(x1,x2) = 21 nil!_A = 14 |0|!_A = 15 s!_A(x1) = 15 le!_A(x1,x2) = max{21, x1 + 2, x2 + 11} if_min!_A(x1,x2) = 20 if_rm!_A(x1,x2,x3) = 21 2. marked-algebra reduction triple (>=A, >=A!, >A!): matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: if_minsort#_A(x1,x2,x3) = 0 false_A() = 3 add_A(x1,x2) = x1 + x2 + 3 minsort#_A(x1,x2) = 0 eq_A(x1,x2) = x2 + 1 min_A(x1) = x1 true_A() = 1 app_A(x1,x2) = x1 + x2 rm_A(x1,x2) = x2 nil_A() = 1 |0|_A() = 1 s_A(x1) = x1 + 2 le_A(x1,x2) = x1 + x2 + 1 if_min_A(x1,x2) = x2 if_rm_A(x1,x2,x3) = x3 if_minsort#!_A(x1,x2,x3) = x2 + x3 + 5 false!_A() = 9 add!_A(x1,x2) = x1 + x2 + 5 minsort#!_A(x1,x2) = x1 + x2 + 5 eq!_A(x1,x2) = x1 + 11 min!_A(x1) = x1 + 1 true!_A() = 13 app!_A(x1,x2) = x2 + 16 rm!_A(x1,x2) = 10 nil!_A() = 4 |0|!_A() = 10 s!_A(x1) = 11 le!_A(x1,x2) = x1 + 13 if_min!_A(x1,x2) = x2 if_rm!_A(x1,x2,x3) = 10 partial status: pi(if_minsort#) = [] pi(false) = [] pi(add) = [1, 2] pi(minsort#) = [] pi(eq) = [1] pi(min) = [1] pi(true) = [] pi(app) = [1, 2] pi(rm) = [2] pi(nil) = [] pi(|0|) = [] pi(s) = [1] pi(le) = [1, 2] pi(if_min) = [2] pi(if_rm) = [3] The following rules are removed: p3 -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: if_minsort#(false(),add(n,x),y) -> minsort#(x,add(n,y)) p2: minsort#(add(n,x),y) -> if_minsort#(eq(n,min(add(n,x))),add(n,x),y) and R consists of: r1: eq(|0|(),|0|()) -> true() r2: eq(|0|(),s(x)) -> false() r3: eq(s(x),|0|()) -> false() r4: eq(s(x),s(y)) -> eq(x,y) r5: le(|0|(),y) -> true() r6: le(s(x),|0|()) -> false() r7: le(s(x),s(y)) -> le(x,y) r8: app(nil(),y) -> y r9: app(add(n,x),y) -> add(n,app(x,y)) r10: min(add(n,nil())) -> n r11: min(add(n,add(m,x))) -> if_min(le(n,m),add(n,add(m,x))) r12: if_min(true(),add(n,add(m,x))) -> min(add(n,x)) r13: if_min(false(),add(n,add(m,x))) -> min(add(m,x)) r14: rm(n,nil()) -> nil() r15: rm(n,add(m,x)) -> if_rm(eq(n,m),n,add(m,x)) r16: if_rm(true(),n,add(m,x)) -> rm(n,x) r17: if_rm(false(),n,add(m,x)) -> add(m,rm(n,x)) r18: minsort(nil(),nil()) -> nil() r19: minsort(add(n,x),y) -> if_minsort(eq(n,min(add(n,x))),add(n,x),y) r20: if_minsort(true(),add(n,x),y) -> add(n,minsort(app(rm(n,x),y),nil())) r21: if_minsort(false(),add(n,x),y) -> minsort(x,add(n,y)) The estimated dependency graph contains the following SCCs: {p1, p2} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: if_minsort#(false(),add(n,x),y) -> minsort#(x,add(n,y)) p2: minsort#(add(n,x),y) -> if_minsort#(eq(n,min(add(n,x))),add(n,x),y) and R consists of: r1: eq(|0|(),|0|()) -> true() r2: eq(|0|(),s(x)) -> false() r3: eq(s(x),|0|()) -> false() r4: eq(s(x),s(y)) -> eq(x,y) r5: le(|0|(),y) -> true() r6: le(s(x),|0|()) -> false() r7: le(s(x),s(y)) -> le(x,y) r8: app(nil(),y) -> y r9: app(add(n,x),y) -> add(n,app(x,y)) r10: min(add(n,nil())) -> n r11: min(add(n,add(m,x))) -> if_min(le(n,m),add(n,add(m,x))) r12: if_min(true(),add(n,add(m,x))) -> min(add(n,x)) r13: if_min(false(),add(n,add(m,x))) -> min(add(m,x)) r14: rm(n,nil()) -> nil() r15: rm(n,add(m,x)) -> if_rm(eq(n,m),n,add(m,x)) r16: if_rm(true(),n,add(m,x)) -> rm(n,x) r17: if_rm(false(),n,add(m,x)) -> add(m,rm(n,x)) r18: minsort(nil(),nil()) -> nil() r19: minsort(add(n,x),y) -> if_minsort(eq(n,min(add(n,x))),add(n,x),y) r20: if_minsort(true(),add(n,x),y) -> add(n,minsort(app(rm(n,x),y),nil())) r21: if_minsort(false(),add(n,x),y) -> minsort(x,add(n,y)) The set of usable rules consists of r3 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: if_minsort#_A(x1,x2,x3) = max{1, x2 - 67, x3 - 67} false_A = 125 add_A(x1,x2) = max{x1 + 66, x2} minsort#_A(x1,x2) = max{1, x1 - 67, x2 - 67} eq_A(x1,x2) = max{127, x1 - 80} min_A(x1) = max{56, x1 - 6} s_A(x1) = max{0, x1 - 68} |0|_A = 79 if_minsort#!_A(x1,x2,x3) = max{49, x2 - 11} false!_A = 4 add!_A(x1,x2) = max{75, x1 + 50, x2 - 60} minsort#!_A(x1,x2) = max{55, x1 - 11} eq!_A(x1,x2) = 68 min!_A(x1) = max{3, x1 - 6} s!_A(x1) = 69 |0|!_A = 78 2. marked-algebra reduction triple (>=A, >=A!, >A!): matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: if_minsort#_A(x1,x2,x3) = x2 false_A() = 5 add_A(x1,x2) = x2 + 5 minsort#_A(x1,x2) = x1 eq_A(x1,x2) = x1 + 3 min_A(x1) = 1 s_A(x1) = x1 + 2 |0|_A() = 1 if_minsort#!_A(x1,x2,x3) = x2 + 5 false!_A() = 0 add!_A(x1,x2) = 8 minsort#!_A(x1,x2) = x1 + 9 eq!_A(x1,x2) = 3 min!_A(x1) = 10 s!_A(x1) = 12 |0|!_A() = 1 partial status: pi(if_minsort#) = [] pi(false) = [] pi(add) = [1, 2] pi(minsort#) = [] pi(eq) = [2] pi(min) = [] 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: if_rm#(false(),n,add(m,x)) -> rm#(n,x) p2: rm#(n,add(m,x)) -> if_rm#(eq(n,m),n,add(m,x)) p3: if_rm#(true(),n,add(m,x)) -> rm#(n,x) and R consists of: r1: eq(|0|(),|0|()) -> true() r2: eq(|0|(),s(x)) -> false() r3: eq(s(x),|0|()) -> false() r4: eq(s(x),s(y)) -> eq(x,y) r5: le(|0|(),y) -> true() r6: le(s(x),|0|()) -> false() r7: le(s(x),s(y)) -> le(x,y) r8: app(nil(),y) -> y r9: app(add(n,x),y) -> add(n,app(x,y)) r10: min(add(n,nil())) -> n r11: min(add(n,add(m,x))) -> if_min(le(n,m),add(n,add(m,x))) r12: if_min(true(),add(n,add(m,x))) -> min(add(n,x)) r13: if_min(false(),add(n,add(m,x))) -> min(add(m,x)) r14: rm(n,nil()) -> nil() r15: rm(n,add(m,x)) -> if_rm(eq(n,m),n,add(m,x)) r16: if_rm(true(),n,add(m,x)) -> rm(n,x) r17: if_rm(false(),n,add(m,x)) -> add(m,rm(n,x)) r18: minsort(nil(),nil()) -> nil() r19: minsort(add(n,x),y) -> if_minsort(eq(n,min(add(n,x))),add(n,x),y) r20: if_minsort(true(),add(n,x),y) -> add(n,minsort(app(rm(n,x),y),nil())) r21: if_minsort(false(),add(n,x),y) -> minsort(x,add(n,y)) The set of usable rules consists of r1, r2, r3, r4 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: if_rm#_A(x1,x2,x3) = max{1, x1 - 76, x2} false_A = 1 add_A(x1,x2) = max{x1, x2 + 19} rm#_A(x1,x2) = max{1, x1} eq_A(x1,x2) = max{70, x1 - 3} true_A = 17 |0|_A = 2 s_A(x1) = max{2, x1 + 1} if_rm#!_A(x1,x2,x3) = max{8, x3 - 4} false!_A = 6 add!_A(x1,x2) = max{x1 - 7, x2 + 14} rm#!_A(x1,x2) = max{7, x2 + 4} eq!_A(x1,x2) = max{5, x1 + 3} true!_A = 15 |0|!_A = 16 s!_A(x1) = max{7, x1 - 1} 2. marked-algebra reduction triple (>=A, >=A!, >A!): matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: if_rm#_A(x1,x2,x3) = x3 false_A() = 4 add_A(x1,x2) = x1 + x2 + 8 rm#_A(x1,x2) = x2 eq_A(x1,x2) = x1 + x2 + 2 true_A() = 3 |0|_A() = 1 s_A(x1) = x1 + 1 if_rm#!_A(x1,x2,x3) = x3 false!_A() = 3 add!_A(x1,x2) = x2 + 9 rm#!_A(x1,x2) = x2 + 2 eq!_A(x1,x2) = x1 + 13 true!_A() = 15 |0|!_A() = 16 s!_A(x1) = 4 partial status: pi(if_rm#) = [2] pi(false) = [] pi(add) = [] pi(rm#) = [1] pi(eq) = [1, 2] pi(true) = [] pi(|0|) = [] pi(s) = [1] The following rules are removed: p1, p2, p3 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: eq(|0|(),|0|()) -> true() r2: eq(|0|(),s(x)) -> false() r3: eq(s(x),|0|()) -> false() r4: eq(s(x),s(y)) -> eq(x,y) r5: le(|0|(),y) -> true() r6: le(s(x),|0|()) -> false() r7: le(s(x),s(y)) -> le(x,y) r8: app(nil(),y) -> y r9: app(add(n,x),y) -> add(n,app(x,y)) r10: min(add(n,nil())) -> n r11: min(add(n,add(m,x))) -> if_min(le(n,m),add(n,add(m,x))) r12: if_min(true(),add(n,add(m,x))) -> min(add(n,x)) r13: if_min(false(),add(n,add(m,x))) -> min(add(m,x)) r14: rm(n,nil()) -> nil() r15: rm(n,add(m,x)) -> if_rm(eq(n,m),n,add(m,x)) r16: if_rm(true(),n,add(m,x)) -> rm(n,x) r17: if_rm(false(),n,add(m,x)) -> add(m,rm(n,x)) r18: minsort(nil(),nil()) -> nil() r19: minsort(add(n,x),y) -> if_minsort(eq(n,min(add(n,x))),add(n,x),y) r20: if_minsort(true(),add(n,x),y) -> add(n,minsort(app(rm(n,x),y),nil())) r21: if_minsort(false(),add(n,x),y) -> minsort(x,add(n,y)) 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: eq#_A(x1,x2) = max{0, x1 - 2, x2 - 2} s_A(x1) = max{2, x1 + 1} eq#!_A(x1,x2) = max{1, x2 - 3} s!_A(x1) = x1 + 70 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 + 1 eq#!_A(x1,x2) = x1 + x2 + 9 s!_A(x1) = 8 partial status: pi(eq#) = [] 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: if_min#(false(),add(n,add(m,x))) -> min#(add(m,x)) p2: min#(add(n,add(m,x))) -> if_min#(le(n,m),add(n,add(m,x))) p3: if_min#(true(),add(n,add(m,x))) -> min#(add(n,x)) and R consists of: r1: eq(|0|(),|0|()) -> true() r2: eq(|0|(),s(x)) -> false() r3: eq(s(x),|0|()) -> false() r4: eq(s(x),s(y)) -> eq(x,y) r5: le(|0|(),y) -> true() r6: le(s(x),|0|()) -> false() r7: le(s(x),s(y)) -> le(x,y) r8: app(nil(),y) -> y r9: app(add(n,x),y) -> add(n,app(x,y)) r10: min(add(n,nil())) -> n r11: min(add(n,add(m,x))) -> if_min(le(n,m),add(n,add(m,x))) r12: if_min(true(),add(n,add(m,x))) -> min(add(n,x)) r13: if_min(false(),add(n,add(m,x))) -> min(add(m,x)) r14: rm(n,nil()) -> nil() r15: rm(n,add(m,x)) -> if_rm(eq(n,m),n,add(m,x)) r16: if_rm(true(),n,add(m,x)) -> rm(n,x) r17: if_rm(false(),n,add(m,x)) -> add(m,rm(n,x)) r18: minsort(nil(),nil()) -> nil() r19: minsort(add(n,x),y) -> if_minsort(eq(n,min(add(n,x))),add(n,x),y) r20: if_minsort(true(),add(n,x),y) -> add(n,minsort(app(rm(n,x),y),nil())) r21: if_minsort(false(),add(n,x),y) -> minsort(x,add(n,y)) The set of usable rules consists of r5, r6 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: if_min#_A(x1,x2) = max{1, x2 - 61} false_A = 0 add_A(x1,x2) = max{x1 + 33, x2 + 27} min#_A(x1) = max{1, x1 - 61} le_A(x1,x2) = max{151, x1, x2} true_A = 149 |0|_A = 17 s_A(x1) = max{0, x1 - 41} if_min#!_A(x1,x2) = max{54, x2 - 6} false!_A = 14 add!_A(x1,x2) = x1 + 4 min#!_A(x1) = max{15, x1 - 6} le!_A(x1,x2) = max{x1 + 13, x2 + 40} true!_A = 29 |0|!_A = 30 s!_A(x1) = x1 + 27 2. marked-algebra reduction triple (>=A, >=A!, >A!): matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: if_min#_A(x1,x2) = x2 false_A() = 4 add_A(x1,x2) = x2 + 1 min#_A(x1) = x1 le_A(x1,x2) = x1 + x2 + 3 true_A() = 4 |0|_A() = 1 s_A(x1) = x1 + 1 if_min#!_A(x1,x2) = 0 false!_A() = 4 add!_A(x1,x2) = 1 min#!_A(x1) = 0 le!_A(x1,x2) = 5 true!_A() = 7 |0|!_A() = 8 s!_A(x1) = 0 partial status: pi(if_min#) = [] pi(false) = [] pi(add) = [1, 2] pi(min#) = [] pi(le) = [1] pi(true) = [] 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: min#(add(n,add(m,x))) -> if_min#(le(n,m),add(n,add(m,x))) p2: if_min#(true(),add(n,add(m,x))) -> min#(add(n,x)) and R consists of: r1: eq(|0|(),|0|()) -> true() r2: eq(|0|(),s(x)) -> false() r3: eq(s(x),|0|()) -> false() r4: eq(s(x),s(y)) -> eq(x,y) r5: le(|0|(),y) -> true() r6: le(s(x),|0|()) -> false() r7: le(s(x),s(y)) -> le(x,y) r8: app(nil(),y) -> y r9: app(add(n,x),y) -> add(n,app(x,y)) r10: min(add(n,nil())) -> n r11: min(add(n,add(m,x))) -> if_min(le(n,m),add(n,add(m,x))) r12: if_min(true(),add(n,add(m,x))) -> min(add(n,x)) r13: if_min(false(),add(n,add(m,x))) -> min(add(m,x)) r14: rm(n,nil()) -> nil() r15: rm(n,add(m,x)) -> if_rm(eq(n,m),n,add(m,x)) r16: if_rm(true(),n,add(m,x)) -> rm(n,x) r17: if_rm(false(),n,add(m,x)) -> add(m,rm(n,x)) r18: minsort(nil(),nil()) -> nil() r19: minsort(add(n,x),y) -> if_minsort(eq(n,min(add(n,x))),add(n,x),y) r20: if_minsort(true(),add(n,x),y) -> add(n,minsort(app(rm(n,x),y),nil())) r21: if_minsort(false(),add(n,x),y) -> minsort(x,add(n,y)) The estimated dependency graph contains the following SCCs: {p1, p2} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: min#(add(n,add(m,x))) -> if_min#(le(n,m),add(n,add(m,x))) p2: if_min#(true(),add(n,add(m,x))) -> min#(add(n,x)) and R consists of: r1: eq(|0|(),|0|()) -> true() r2: eq(|0|(),s(x)) -> false() r3: eq(s(x),|0|()) -> false() r4: eq(s(x),s(y)) -> eq(x,y) r5: le(|0|(),y) -> true() r6: le(s(x),|0|()) -> false() r7: le(s(x),s(y)) -> le(x,y) r8: app(nil(),y) -> y r9: app(add(n,x),y) -> add(n,app(x,y)) r10: min(add(n,nil())) -> n r11: min(add(n,add(m,x))) -> if_min(le(n,m),add(n,add(m,x))) r12: if_min(true(),add(n,add(m,x))) -> min(add(n,x)) r13: if_min(false(),add(n,add(m,x))) -> min(add(m,x)) r14: rm(n,nil()) -> nil() r15: rm(n,add(m,x)) -> if_rm(eq(n,m),n,add(m,x)) r16: if_rm(true(),n,add(m,x)) -> rm(n,x) r17: if_rm(false(),n,add(m,x)) -> add(m,rm(n,x)) r18: minsort(nil(),nil()) -> nil() r19: minsort(add(n,x),y) -> if_minsort(eq(n,min(add(n,x))),add(n,x),y) r20: if_minsort(true(),add(n,x),y) -> add(n,minsort(app(rm(n,x),y),nil())) r21: if_minsort(false(),add(n,x),y) -> minsort(x,add(n,y)) The set of usable rules consists of r5, r6, r7 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: min#_A(x1) = 1 add_A(x1,x2) = max{x1 + 1, x2} if_min#_A(x1,x2) = max{1, x1 - 13} le_A(x1,x2) = 11 true_A = 5 |0|_A = 0 s_A(x1) = 2 false_A = 2 min#!_A(x1) = max{3, x1 + 1} add!_A(x1,x2) = max{3, x1 - 3, x2 - 7} if_min#!_A(x1,x2) = max{3, x1 - 8, x2 + 1} le!_A(x1,x2) = max{4, x1 - 1} true!_A = 0 |0|!_A = 6 s!_A(x1) = x1 + 6 false!_A = 5 2. marked-algebra reduction triple (>=A, >=A!, >A!): matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: min#_A(x1) = 0 add_A(x1,x2) = x2 + 2 if_min#_A(x1,x2) = 0 le_A(x1,x2) = x2 + 4 true_A() = 3 |0|_A() = 0 s_A(x1) = x1 + 1 false_A() = 4 min#!_A(x1) = x1 + 1 add!_A(x1,x2) = 6 if_min#!_A(x1,x2) = x2 le!_A(x1,x2) = x1 + 9 true!_A() = 2 |0|!_A() = 3 s!_A(x1) = 8 false!_A() = 11 partial status: pi(min#) = [] pi(add) = [1, 2] pi(if_min#) = [] pi(le) = [1] pi(true) = [] pi(|0|) = [] pi(s) = [1] pi(false) = [] 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: le#(s(x),s(y)) -> le#(x,y) and R consists of: r1: eq(|0|(),|0|()) -> true() r2: eq(|0|(),s(x)) -> false() r3: eq(s(x),|0|()) -> false() r4: eq(s(x),s(y)) -> eq(x,y) r5: le(|0|(),y) -> true() r6: le(s(x),|0|()) -> false() r7: le(s(x),s(y)) -> le(x,y) r8: app(nil(),y) -> y r9: app(add(n,x),y) -> add(n,app(x,y)) r10: min(add(n,nil())) -> n r11: min(add(n,add(m,x))) -> if_min(le(n,m),add(n,add(m,x))) r12: if_min(true(),add(n,add(m,x))) -> min(add(n,x)) r13: if_min(false(),add(n,add(m,x))) -> min(add(m,x)) r14: rm(n,nil()) -> nil() r15: rm(n,add(m,x)) -> if_rm(eq(n,m),n,add(m,x)) r16: if_rm(true(),n,add(m,x)) -> rm(n,x) r17: if_rm(false(),n,add(m,x)) -> add(m,rm(n,x)) r18: minsort(nil(),nil()) -> nil() r19: minsort(add(n,x),y) -> if_minsort(eq(n,min(add(n,x))),add(n,x),y) r20: if_minsort(true(),add(n,x),y) -> add(n,minsort(app(rm(n,x),y),nil())) r21: if_minsort(false(),add(n,x),y) -> minsort(x,add(n,y)) 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: le#_A(x1,x2) = max{0, x1 - 2, x2 - 2} s_A(x1) = max{2, x1 + 1} le#!_A(x1,x2) = max{1, x1 - 3, x2 - 3} s!_A(x1) = x1 + 8 2. marked-algebra reduction triple (>=A, >=A!, >A!): matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: le#_A(x1,x2) = x1 + x2 s_A(x1) = x1 + 1 le#!_A(x1,x2) = x1 + x2 s!_A(x1) = 4 partial status: pi(le#) = [] 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: app#(add(n,x),y) -> app#(x,y) and R consists of: r1: eq(|0|(),|0|()) -> true() r2: eq(|0|(),s(x)) -> false() r3: eq(s(x),|0|()) -> false() r4: eq(s(x),s(y)) -> eq(x,y) r5: le(|0|(),y) -> true() r6: le(s(x),|0|()) -> false() r7: le(s(x),s(y)) -> le(x,y) r8: app(nil(),y) -> y r9: app(add(n,x),y) -> add(n,app(x,y)) r10: min(add(n,nil())) -> n r11: min(add(n,add(m,x))) -> if_min(le(n,m),add(n,add(m,x))) r12: if_min(true(),add(n,add(m,x))) -> min(add(n,x)) r13: if_min(false(),add(n,add(m,x))) -> min(add(m,x)) r14: rm(n,nil()) -> nil() r15: rm(n,add(m,x)) -> if_rm(eq(n,m),n,add(m,x)) r16: if_rm(true(),n,add(m,x)) -> rm(n,x) r17: if_rm(false(),n,add(m,x)) -> add(m,rm(n,x)) r18: minsort(nil(),nil()) -> nil() r19: minsort(add(n,x),y) -> if_minsort(eq(n,min(add(n,x))),add(n,x),y) r20: if_minsort(true(),add(n,x),y) -> add(n,minsort(app(rm(n,x),y),nil())) r21: if_minsort(false(),add(n,x),y) -> minsort(x,add(n,y)) 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: app#_A(x1,x2) = max{0, x1 - 15} add_A(x1,x2) = max{x1 - 52, x2 + 14} app#!_A(x1,x2) = max{174, x1 - 15, x2 - 1} add!_A(x1,x2) = max{173, x1 + 70, x2 + 54} 2. marked-algebra reduction triple (>=A, >=A!, >A!): matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: app#_A(x1,x2) = x1 add_A(x1,x2) = x1 + x2 + 1 app#!_A(x1,x2) = x1 add!_A(x1,x2) = 4 partial status: pi(app#) = [] pi(add) = [1, 2] The following rules are removed: p1 Then no dependency pair remains.