YES We show the termination of the relative TRS R/S: 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)) S: rand(x) -> x rand(x) -> rand(s(x)) -- SCC decomposition. Consider the non-minimal 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)) r22: rand(x) -> x r23: rand(x) -> rand(s(x)) The estimated dependency graph contains the following SCCs: {p12, p15, p18} {p8, p10, p11} {p1} {p4, p6, p7} {p2} {p3} -- Reduction pair. Consider the non-minimal 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)) r22: rand(x) -> x r23: rand(x) -> rand(s(x)) The set of usable rules consists of r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15, r16, r17, r18, r19, r20, r21, r22, r23 Take the reduction pair: weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: if_minsort#_A(x1,x2,x3) = ((1,0),(1,0)) x2 + ((1,0),(0,0)) x3 + (5,1) false_A() = (6,5) add_A(x1,x2) = ((1,0),(0,0)) x1 + ((1,0),(0,0)) x2 + (8,7) minsort#_A(x1,x2) = ((1,0),(1,0)) x1 + ((1,0),(0,0)) x2 + (5,8) eq_A(x1,x2) = x2 + (7,18) min_A(x1) = x1 + (4,1) true_A() = (9,6) app_A(x1,x2) = ((1,0),(0,0)) x1 + ((1,0),(1,1)) x2 + (0,8) rm_A(x1,x2) = x2 + (0,10) nil_A() = (0,5) |0|_A() = (10,7) s_A(x1) = x1 + (0,19) le_A(x1,x2) = ((1,0),(1,1)) x1 + ((1,0),(1,1)) x2 + (17,20) if_min_A(x1,x2) = x2 + (0,2) if_rm_A(x1,x2,x3) = x3 + (0,1) minsort_A(x1,x2) = ((1,0),(1,0)) x1 + ((1,0),(0,0)) x2 + (10,4) if_minsort_A(x1,x2,x3) = ((1,0),(1,0)) x2 + ((1,0),(0,0)) x3 + (10,3) rand_A(x1) = ((1,0),(0,0)) x1 + (1,1) precedence: false = add = eq = app = |0| = s = le = if_min = minsort = if_minsort = rand > min > if_minsort# = minsort# = rm > true = if_rm > nil partial status: pi(if_minsort#) = [] pi(false) = [] pi(add) = [] pi(minsort#) = [] pi(eq) = [] pi(min) = [1] pi(true) = [] pi(app) = [] pi(rm) = [] pi(nil) = [] pi(|0|) = [] pi(s) = [] pi(le) = [] pi(if_min) = [] pi(if_rm) = [3] pi(minsort) = [] pi(if_minsort) = [] pi(rand) = [] The next rules are strictly ordered: p1 We remove them from the problem. -- SCC decomposition. Consider the non-minimal dependency pair problem (P, R), where P consists of p1: minsort#(add(n,x),y) -> if_minsort#(eq(n,min(add(n,x))),add(n,x),y) p2: 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)) r22: rand(x) -> x r23: rand(x) -> rand(s(x)) The estimated dependency graph contains the following SCCs: {p1, p2} -- Reduction pair. Consider the non-minimal dependency pair problem (P, R), where P consists of p1: minsort#(add(n,x),y) -> if_minsort#(eq(n,min(add(n,x))),add(n,x),y) p2: 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)) r22: rand(x) -> x r23: rand(x) -> rand(s(x)) The set of usable rules consists of r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15, r16, r17, r18, r19, r20, r21, r22, r23 Take the reduction pair: weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: minsort#_A(x1,x2) = x1 + ((1,0),(0,0)) x2 + (2,0) add_A(x1,x2) = ((1,0),(0,0)) x1 + ((1,0),(0,0)) x2 + (7,2) if_minsort#_A(x1,x2,x3) = ((1,0),(0,0)) x2 + ((1,0),(0,0)) x3 + (1,1) eq_A(x1,x2) = ((1,0),(0,0)) x1 + (6,8) min_A(x1) = ((1,0),(0,0)) x1 + (6,10) true_A() = (3,3) app_A(x1,x2) = ((1,0),(0,0)) x1 + x2 + (0,9) rm_A(x1,x2) = ((1,0),(1,1)) x2 + (0,9) nil_A() = (0,9) |0|_A() = (4,0) s_A(x1) = x1 false_A() = (3,1) le_A(x1,x2) = ((0,0),(1,0)) x1 + (4,11) if_min_A(x1,x2) = x1 + ((1,0),(1,0)) x2 + (1,1) if_rm_A(x1,x2,x3) = ((1,0),(1,0)) x3 + (0,3) minsort_A(x1,x2) = ((1,0),(1,0)) x1 + x2 + (8,2) if_minsort_A(x1,x2,x3) = ((1,0),(1,0)) x2 + ((1,0),(0,0)) x3 + (8,1) rand_A(x1) = ((1,0),(1,1)) x1 + (1,1) precedence: |0| > rand > rm = if_rm > minsort# > add = if_minsort# = min = app = if_min = minsort = if_minsort > eq = false > true > nil > s = le partial status: pi(minsort#) = [] pi(add) = [] pi(if_minsort#) = [] pi(eq) = [] pi(min) = [] pi(true) = [] pi(app) = [2] pi(rm) = [] pi(nil) = [] pi(|0|) = [] pi(s) = [] pi(false) = [] pi(le) = [] pi(if_min) = [] pi(if_rm) = [] pi(minsort) = [] pi(if_minsort) = [] pi(rand) = [1] The next rules are strictly ordered: p1 We remove them from the problem. -- SCC decomposition. Consider the non-minimal dependency pair problem (P, R), where P consists of p1: 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)) r22: rand(x) -> x r23: rand(x) -> rand(s(x)) The estimated dependency graph contains the following SCCs: (no SCCs) -- Reduction pair. Consider the non-minimal 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)) r22: rand(x) -> x r23: rand(x) -> rand(s(x)) The set of usable rules consists of r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15, r16, r17, r18, r19, r20, r21, r22, r23 Take the reduction pair: weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: if_rm#_A(x1,x2,x3) = ((1,0),(1,1)) x2 + ((1,0),(1,0)) x3 + (10,1) false_A() = (10,0) add_A(x1,x2) = ((1,0),(0,0)) x1 + ((1,0),(0,0)) x2 + (4,4) rm#_A(x1,x2) = ((1,0),(1,1)) x1 + ((1,0),(1,0)) x2 + (13,2) eq_A(x1,x2) = x1 + ((1,0),(0,0)) x2 true_A() = (12,3) |0|_A() = (13,4) s_A(x1) = x1 + (0,2) le_A(x1,x2) = x1 + (11,1) app_A(x1,x2) = ((1,0),(1,0)) x1 + x2 + (0,5) nil_A() = (0,0) min_A(x1) = ((1,0),(1,0)) x1 + (5,0) if_min_A(x1,x2) = ((1,0),(0,0)) x2 + (5,1) rm_A(x1,x2) = ((1,0),(1,1)) x2 if_rm_A(x1,x2,x3) = ((1,0),(0,0)) x3 + (0,8) minsort_A(x1,x2) = ((1,0),(1,0)) x1 + x2 + (7,5) if_minsort_A(x1,x2,x3) = ((1,0),(1,0)) x2 + ((1,0),(0,0)) x3 + (7,5) rand_A(x1) = ((1,0),(1,0)) x1 + (1,3) precedence: eq = true = |0| = app = min = if_min > rm = if_rm > add = nil > if_rm# = false = rm# = s = le = minsort = if_minsort = rand partial status: pi(if_rm#) = [] pi(false) = [] pi(add) = [] pi(rm#) = [] pi(eq) = [] pi(true) = [] pi(|0|) = [] pi(s) = [] pi(le) = [] pi(app) = [] pi(nil) = [] pi(min) = [] pi(if_min) = [] pi(rm) = [] pi(if_rm) = [] pi(minsort) = [] pi(if_minsort) = [] pi(rand) = [] The next rules are strictly ordered: p1 We remove them from the problem. -- SCC decomposition. Consider the non-minimal dependency pair problem (P, R), where P consists of p1: rm#(n,add(m,x)) -> if_rm#(eq(n,m),n,add(m,x)) p2: 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)) r22: rand(x) -> x r23: rand(x) -> rand(s(x)) The estimated dependency graph contains the following SCCs: {p1, p2} -- Reduction pair. Consider the non-minimal dependency pair problem (P, R), where P consists of p1: rm#(n,add(m,x)) -> if_rm#(eq(n,m),n,add(m,x)) p2: 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)) r22: rand(x) -> x r23: rand(x) -> rand(s(x)) The set of usable rules consists of r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15, r16, r17, r18, r19, r20, r21, r22, r23 Take the reduction pair: weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: rm#_A(x1,x2) = ((1,0),(1,1)) x1 + ((1,0),(0,0)) x2 + (6,10) add_A(x1,x2) = ((1,0),(0,0)) x1 + ((1,0),(0,0)) x2 + (3,1) if_rm#_A(x1,x2,x3) = ((1,0),(0,0)) x2 + ((1,0),(0,0)) x3 + (4,11) eq_A(x1,x2) = ((1,0),(0,0)) x1 + ((1,0),(0,0)) x2 + (4,9) true_A() = (5,4) |0|_A() = (4,3) s_A(x1) = x1 false_A() = (2,2) le_A(x1,x2) = x1 + ((1,0),(0,0)) x2 + (2,3) app_A(x1,x2) = ((1,0),(1,1)) x1 + x2 + (0,2) nil_A() = (0,2) min_A(x1) = ((1,0),(0,0)) x1 + (1,9) if_min_A(x1,x2) = ((1,0),(0,0)) x2 + (0,2) rm_A(x1,x2) = ((0,0),(1,0)) x1 + ((1,0),(0,0)) x2 + (0,7) if_rm_A(x1,x2,x3) = ((0,0),(1,0)) x2 + ((1,0),(0,0)) x3 + (0,6) minsort_A(x1,x2) = ((1,0),(1,0)) x1 + ((1,0),(0,0)) x2 + (0,5) if_minsort_A(x1,x2,x3) = ((1,0),(1,0)) x2 + ((1,0),(0,0)) x3 + (0,3) rand_A(x1) = ((1,0),(1,1)) x1 + (1,1) precedence: rm > eq = false > add = app = min = if_min = if_rm = minsort = if_minsort = rand > if_rm# > rm# > true > |0| > le > nil > s partial status: pi(rm#) = [1] pi(add) = [] pi(if_rm#) = [] pi(eq) = [] pi(true) = [] pi(|0|) = [] pi(s) = [] pi(false) = [] pi(le) = [] pi(app) = [2] pi(nil) = [] pi(min) = [] pi(if_min) = [] pi(rm) = [] pi(if_rm) = [] pi(minsort) = [] pi(if_minsort) = [] pi(rand) = [] The next rules are strictly ordered: p1 We remove them from the problem. -- SCC decomposition. Consider the non-minimal dependency pair problem (P, R), where P consists of p1: 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)) r22: rand(x) -> x r23: rand(x) -> rand(s(x)) The estimated dependency graph contains the following SCCs: (no SCCs) -- Reduction pair. Consider the non-minimal 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)) r22: rand(x) -> x r23: rand(x) -> rand(s(x)) The set of usable rules consists of r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15, r16, r17, r18, r19, r20, r21, r22, r23 Take the reduction pair: weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: eq#_A(x1,x2) = x2 + (1,2) s_A(x1) = x1 + (0,1) eq_A(x1,x2) = ((1,0),(1,0)) x1 + ((1,0),(0,0)) x2 + (3,8) |0|_A() = (9,5) true_A() = (0,0) false_A() = (8,4) le_A(x1,x2) = ((1,0),(1,0)) x2 app_A(x1,x2) = ((1,0),(0,0)) x1 + ((1,0),(1,1)) x2 + (0,3) nil_A() = (0,3) add_A(x1,x2) = ((1,0),(0,0)) x1 + ((1,0),(0,0)) x2 + (2,2) min_A(x1) = ((1,0),(0,0)) x1 + (1,6) if_min_A(x1,x2) = ((1,0),(0,0)) x2 + (0,1) rm_A(x1,x2) = ((0,0),(1,0)) x1 + ((1,0),(1,0)) x2 + (0,5) if_rm_A(x1,x2,x3) = ((1,0),(0,0)) x3 + (0,3) minsort_A(x1,x2) = ((1,0),(1,0)) x1 + ((1,0),(0,0)) x2 + (5,3) if_minsort_A(x1,x2,x3) = ((1,0),(1,0)) x2 + ((1,0),(0,0)) x3 + (5,2) rand_A(x1) = ((1,0),(0,0)) x1 + (1,2) precedence: le = rm = if_rm = rand > eq# = s = eq = |0| = false = app = add = min = if_min = minsort = if_minsort > true > nil partial status: pi(eq#) = [] pi(s) = [] pi(eq) = [] pi(|0|) = [] pi(true) = [] pi(false) = [] pi(le) = [] pi(app) = [] pi(nil) = [] pi(add) = [] pi(min) = [] pi(if_min) = [] pi(rm) = [] pi(if_rm) = [] pi(minsort) = [] pi(if_minsort) = [] pi(rand) = [] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains. -- Reduction pair. Consider the non-minimal 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)) r22: rand(x) -> x r23: rand(x) -> rand(s(x)) The set of usable rules consists of r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15, r16, r17, r18, r19, r20, r21, r22, r23 Take the reduction pair: weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: if_min#_A(x1,x2) = ((0,0),(1,0)) x1 + ((1,0),(1,0)) x2 false_A() = (5,2) add_A(x1,x2) = ((1,0),(1,0)) x1 + ((1,0),(0,0)) x2 + (6,16) min#_A(x1) = ((1,0),(0,0)) x1 + (1,15) le_A(x1,x2) = x2 + (2,25) true_A() = (1,4) eq_A(x1,x2) = ((1,0),(0,0)) x1 + ((0,0),(1,0)) x2 + (15,47) |0|_A() = (6,3) s_A(x1) = ((1,0),(1,1)) x1 + (0,1) app_A(x1,x2) = ((1,0),(1,1)) x1 + x2 + (0,17) nil_A() = (0,1) min_A(x1) = ((1,0),(1,0)) x1 + (7,12) if_min_A(x1,x2) = x2 + (2,1) rm_A(x1,x2) = ((1,0),(1,1)) x2 + (0,24) if_rm_A(x1,x2,x3) = ((1,0),(1,1)) x3 + (0,1) minsort_A(x1,x2) = ((1,0),(1,0)) x1 + ((1,0),(0,0)) x2 + (8,41) if_minsort_A(x1,x2,x3) = ((1,0),(1,0)) x2 + ((1,0),(0,0)) x3 + (8,36) rand_A(x1) = ((1,0),(1,0)) x1 + (1,2) precedence: false = min# = le = true = eq = |0| = s = app = min = if_min = rand > if_min# = add = rm = if_rm > nil = minsort = if_minsort partial status: pi(if_min#) = [] pi(false) = [] pi(add) = [] pi(min#) = [] pi(le) = [] pi(true) = [] pi(eq) = [] pi(|0|) = [] pi(s) = [] pi(app) = [] pi(nil) = [] pi(min) = [] pi(if_min) = [] pi(rm) = [] pi(if_rm) = [] pi(minsort) = [] pi(if_minsort) = [] pi(rand) = [] The next rules are strictly ordered: p2 We remove them from the problem. -- SCC decomposition. Consider the non-minimal dependency pair problem (P, R), where P consists of p1: if_min#(false(),add(n,add(m,x))) -> min#(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)) r22: rand(x) -> x r23: rand(x) -> rand(s(x)) The estimated dependency graph contains the following SCCs: (no SCCs) -- Reduction pair. Consider the non-minimal 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)) r22: rand(x) -> x r23: rand(x) -> rand(s(x)) The set of usable rules consists of r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15, r16, r17, r18, r19, r20, r21, r22, r23 Take the reduction pair: weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: le#_A(x1,x2) = x2 + (0,1) s_A(x1) = ((1,0),(1,1)) x1 + (0,2) eq_A(x1,x2) = ((0,0),(1,0)) x1 + (4,5) |0|_A() = (4,4) true_A() = (3,5) false_A() = (3,3) le_A(x1,x2) = x1 + ((1,0),(1,1)) x2 + (1,13) app_A(x1,x2) = ((1,0),(1,0)) x1 + x2 + (0,1) nil_A() = (0,0) add_A(x1,x2) = ((1,0),(1,0)) x1 + x2 + (5,0) min_A(x1) = x1 + (6,12) if_min_A(x1,x2) = ((0,0),(1,0)) x1 + x2 + (1,10) rm_A(x1,x2) = x2 + (0,4) if_rm_A(x1,x2,x3) = x3 + (0,4) minsort_A(x1,x2) = ((1,0),(1,0)) x1 + ((1,0),(1,0)) x2 + (7,6) if_minsort_A(x1,x2,x3) = ((1,0),(1,0)) x2 + ((1,0),(1,0)) x3 + (7,6) rand_A(x1) = ((1,0),(0,0)) x1 + (1,1) precedence: |0| = le = minsort = if_minsort = rand > app = rm > if_rm > le# = s = eq = true = nil = add = min = if_min > false partial status: pi(le#) = [2] pi(s) = [1] pi(eq) = [] pi(|0|) = [] pi(true) = [] pi(false) = [] pi(le) = [] pi(app) = [2] pi(nil) = [] pi(add) = [] pi(min) = [1] pi(if_min) = [2] pi(rm) = [] pi(if_rm) = [3] pi(minsort) = [] pi(if_minsort) = [] pi(rand) = [] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains. -- Reduction pair. Consider the non-minimal 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)) r22: rand(x) -> x r23: rand(x) -> rand(s(x)) The set of usable rules consists of r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15, r16, r17, r18, r19, r20, r21, r22, r23 Take the reduction pair: weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: app#_A(x1,x2) = x1 + (0,1) add_A(x1,x2) = ((1,0),(0,0)) x1 + ((1,0),(0,0)) x2 + (8,5) eq_A(x1,x2) = x2 + (7,13) |0|_A() = (11,5) true_A() = (10,4) s_A(x1) = x1 false_A() = (6,0) le_A(x1,x2) = ((0,0),(1,0)) x1 + ((0,0),(1,0)) x2 + (11,12) app_A(x1,x2) = x1 + ((1,0),(1,1)) x2 nil_A() = (0,3) min_A(x1) = ((1,0),(0,0)) x1 + (13,11) if_min_A(x1,x2) = x1 + x2 + (1,7) rm_A(x1,x2) = ((1,0),(1,0)) x2 + (0,4) if_rm_A(x1,x2,x3) = ((0,0),(1,0)) x1 + ((1,0),(0,0)) x3 minsort_A(x1,x2) = ((1,0),(1,0)) x1 + ((1,0),(0,0)) x2 + (1,2) if_minsort_A(x1,x2,x3) = ((1,0),(1,0)) x2 + ((1,0),(0,0)) x3 + (1,1) rand_A(x1) = ((1,0),(1,1)) x1 + (1,1) precedence: app# > |0| > eq = s = rand > min = if_min > add = true = false = le = app = nil = rm = if_rm = minsort = if_minsort partial status: pi(app#) = [1] pi(add) = [] pi(eq) = [] pi(|0|) = [] pi(true) = [] pi(s) = [] pi(false) = [] pi(le) = [] pi(app) = [1, 2] pi(nil) = [] pi(min) = [] pi(if_min) = [] pi(rm) = [] pi(if_rm) = [] pi(minsort) = [] pi(if_minsort) = [] pi(rand) = [] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains.