YES We show the termination of the TRS R: eq(|0|(),|0|()) -> true() eq(|0|(),s(m)) -> false() eq(s(n),|0|()) -> false() eq(s(n),s(m)) -> eq(n,m) le(|0|(),m) -> true() le(s(n),|0|()) -> false() le(s(n),s(m)) -> le(n,m) min(cons(x,nil())) -> x min(cons(n,cons(m,x))) -> if_min(le(n,m),cons(n,cons(m,x))) if_min(true(),cons(n,cons(m,x))) -> min(cons(n,x)) if_min(false(),cons(n,cons(m,x))) -> min(cons(m,x)) replace(n,m,nil()) -> nil() replace(n,m,cons(k,x)) -> if_replace(eq(n,k),n,m,cons(k,x)) if_replace(true(),n,m,cons(k,x)) -> cons(m,x) if_replace(false(),n,m,cons(k,x)) -> cons(k,replace(n,m,x)) empty(nil()) -> true() empty(cons(n,x)) -> false() head(cons(n,x)) -> n tail(nil()) -> nil() tail(cons(n,x)) -> x |sort|(x) -> sortIter(x,nil()) sortIter(x,y) -> if(empty(x),x,y,append(y,cons(min(x),nil()))) if(true(),x,y,z) -> y if(false(),x,y,z) -> sortIter(replace(min(x),head(x),tail(x)),z) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: eq#(s(n),s(m)) -> eq#(n,m) p2: le#(s(n),s(m)) -> le#(n,m) p3: min#(cons(n,cons(m,x))) -> if_min#(le(n,m),cons(n,cons(m,x))) p4: min#(cons(n,cons(m,x))) -> le#(n,m) p5: if_min#(true(),cons(n,cons(m,x))) -> min#(cons(n,x)) p6: if_min#(false(),cons(n,cons(m,x))) -> min#(cons(m,x)) p7: replace#(n,m,cons(k,x)) -> if_replace#(eq(n,k),n,m,cons(k,x)) p8: replace#(n,m,cons(k,x)) -> eq#(n,k) p9: if_replace#(false(),n,m,cons(k,x)) -> replace#(n,m,x) p10: |sort|#(x) -> sortIter#(x,nil()) p11: sortIter#(x,y) -> if#(empty(x),x,y,append(y,cons(min(x),nil()))) p12: sortIter#(x,y) -> empty#(x) p13: sortIter#(x,y) -> min#(x) p14: if#(false(),x,y,z) -> sortIter#(replace(min(x),head(x),tail(x)),z) p15: if#(false(),x,y,z) -> replace#(min(x),head(x),tail(x)) p16: if#(false(),x,y,z) -> min#(x) p17: if#(false(),x,y,z) -> head#(x) p18: if#(false(),x,y,z) -> tail#(x) and R consists of: r1: eq(|0|(),|0|()) -> true() r2: eq(|0|(),s(m)) -> false() r3: eq(s(n),|0|()) -> false() r4: eq(s(n),s(m)) -> eq(n,m) r5: le(|0|(),m) -> true() r6: le(s(n),|0|()) -> false() r7: le(s(n),s(m)) -> le(n,m) r8: min(cons(x,nil())) -> x r9: min(cons(n,cons(m,x))) -> if_min(le(n,m),cons(n,cons(m,x))) r10: if_min(true(),cons(n,cons(m,x))) -> min(cons(n,x)) r11: if_min(false(),cons(n,cons(m,x))) -> min(cons(m,x)) r12: replace(n,m,nil()) -> nil() r13: replace(n,m,cons(k,x)) -> if_replace(eq(n,k),n,m,cons(k,x)) r14: if_replace(true(),n,m,cons(k,x)) -> cons(m,x) r15: if_replace(false(),n,m,cons(k,x)) -> cons(k,replace(n,m,x)) r16: empty(nil()) -> true() r17: empty(cons(n,x)) -> false() r18: head(cons(n,x)) -> n r19: tail(nil()) -> nil() r20: tail(cons(n,x)) -> x r21: |sort|(x) -> sortIter(x,nil()) r22: sortIter(x,y) -> if(empty(x),x,y,append(y,cons(min(x),nil()))) r23: if(true(),x,y,z) -> y r24: if(false(),x,y,z) -> sortIter(replace(min(x),head(x),tail(x)),z) The estimated dependency graph contains the following SCCs: {p11, p14} {p7, p9} {p1} {p3, p5, p6} {p2} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: sortIter#(x,y) -> if#(empty(x),x,y,append(y,cons(min(x),nil()))) p2: if#(false(),x,y,z) -> sortIter#(replace(min(x),head(x),tail(x)),z) and R consists of: r1: eq(|0|(),|0|()) -> true() r2: eq(|0|(),s(m)) -> false() r3: eq(s(n),|0|()) -> false() r4: eq(s(n),s(m)) -> eq(n,m) r5: le(|0|(),m) -> true() r6: le(s(n),|0|()) -> false() r7: le(s(n),s(m)) -> le(n,m) r8: min(cons(x,nil())) -> x r9: min(cons(n,cons(m,x))) -> if_min(le(n,m),cons(n,cons(m,x))) r10: if_min(true(),cons(n,cons(m,x))) -> min(cons(n,x)) r11: if_min(false(),cons(n,cons(m,x))) -> min(cons(m,x)) r12: replace(n,m,nil()) -> nil() r13: replace(n,m,cons(k,x)) -> if_replace(eq(n,k),n,m,cons(k,x)) r14: if_replace(true(),n,m,cons(k,x)) -> cons(m,x) r15: if_replace(false(),n,m,cons(k,x)) -> cons(k,replace(n,m,x)) r16: empty(nil()) -> true() r17: empty(cons(n,x)) -> false() r18: head(cons(n,x)) -> n r19: tail(nil()) -> nil() r20: tail(cons(n,x)) -> x r21: |sort|(x) -> sortIter(x,nil()) r22: sortIter(x,y) -> if(empty(x),x,y,append(y,cons(min(x),nil()))) r23: if(true(),x,y,z) -> y r24: if(false(),x,y,z) -> sortIter(replace(min(x),head(x),tail(x)),z) The set of usable rules consists of r1, r2, r3, r4, r12, r13, r14, r15, r16, r17, r19, r20 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: sortIter#_A(x1,x2) = 1 if#_A(x1,x2,x3,x4) = 1 empty_A(x1) = x1 + 43 append_A(x1,x2) = max{114, x1 - 2} cons_A(x1,x2) = x2 + 17 min_A(x1) = 62 nil_A = 26 false_A = 41 replace_A(x1,x2,x3) = x3 + 2 head_A(x1) = max{57, x1 - 36} tail_A(x1) = max{22, x1 + 20} eq_A(x1,x2) = 69 |0|_A = 2 true_A = 39 s_A(x1) = max{2, x1 - 37} if_replace_A(x1,x2,x3,x4) = x4 + 2 sortIter#!_A(x1,x2) = max{0, x2 - 116} if#!_A(x1,x2,x3,x4) = max{0, x3 - 116, x4 - 115} empty!_A(x1) = 30 append!_A(x1,x2) = max{41, x1 - 73} cons!_A(x1,x2) = max{28, x2 + 13} min!_A(x1) = max{0, x1 - 22} nil!_A = 26 false!_A = 29 replace!_A(x1,x2,x3) = max{30, x3 + 1} head!_A(x1) = 0 tail!_A(x1) = max{25, x1 - 26} eq!_A(x1,x2) = 30 |0|!_A = 28 true!_A = 27 s!_A(x1) = x1 + 37 if_replace!_A(x1,x2,x3,x4) = max{30, x1 - 40, x4 - 1} 2. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: sortIter#_A(x1,x2) = max{206, x2} if#_A(x1,x2,x3,x4) = max{206, x3 - 1, x4 + 205} empty_A(x1) = max{4, x1 - 36} append_A(x1,x2) = max{0, x2 - 139} cons_A(x1,x2) = x2 + 67 min_A(x1) = 0 nil_A = 1 false_A = 29 replace_A(x1,x2,x3) = x3 + 12 head_A(x1) = x1 + 59 tail_A(x1) = max{1, x1 - 57} eq_A(x1,x2) = 29 |0|_A = 4 true_A = 4 s_A(x1) = x1 + 7 if_replace_A(x1,x2,x3,x4) = x4 + 12 sortIter#!_A(x1,x2) = x1 + 46 if#!_A(x1,x2,x3,x4) = max{x1 + 41, x2 + 45, x4 - 2} empty!_A(x1) = max{0, x1 - 7} append!_A(x1,x2) = max{62, x1 - 1} cons!_A(x1,x2) = max{39, x2 + 1} min!_A(x1) = max{69, x1 + 47} nil!_A = 59 false!_A = 60 replace!_A(x1,x2,x3) = max{63, x3 - 2} head!_A(x1) = 60 tail!_A(x1) = max{44, x1 - 2} eq!_A(x1,x2) = 65 |0|!_A = 61 true!_A = 58 s!_A(x1) = max{66, x1 + 1} if_replace!_A(x1,x2,x3,x4) = max{39, x1 + 35, x4 - 30} partial status: pi(sortIter#) = [] pi(if#) = [] pi(empty) = [1] pi(append) = [1] pi(cons) = [2] pi(min) = [1] pi(nil) = [] pi(false) = [] pi(replace) = [3] pi(head) = [] pi(tail) = [1] pi(eq) = [] pi(|0|) = [] pi(true) = [] pi(s) = [1] pi(if_replace) = [4] 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_replace#(false(),n,m,cons(k,x)) -> replace#(n,m,x) p2: replace#(n,m,cons(k,x)) -> if_replace#(eq(n,k),n,m,cons(k,x)) and R consists of: r1: eq(|0|(),|0|()) -> true() r2: eq(|0|(),s(m)) -> false() r3: eq(s(n),|0|()) -> false() r4: eq(s(n),s(m)) -> eq(n,m) r5: le(|0|(),m) -> true() r6: le(s(n),|0|()) -> false() r7: le(s(n),s(m)) -> le(n,m) r8: min(cons(x,nil())) -> x r9: min(cons(n,cons(m,x))) -> if_min(le(n,m),cons(n,cons(m,x))) r10: if_min(true(),cons(n,cons(m,x))) -> min(cons(n,x)) r11: if_min(false(),cons(n,cons(m,x))) -> min(cons(m,x)) r12: replace(n,m,nil()) -> nil() r13: replace(n,m,cons(k,x)) -> if_replace(eq(n,k),n,m,cons(k,x)) r14: if_replace(true(),n,m,cons(k,x)) -> cons(m,x) r15: if_replace(false(),n,m,cons(k,x)) -> cons(k,replace(n,m,x)) r16: empty(nil()) -> true() r17: empty(cons(n,x)) -> false() r18: head(cons(n,x)) -> n r19: tail(nil()) -> nil() r20: tail(cons(n,x)) -> x r21: |sort|(x) -> sortIter(x,nil()) r22: sortIter(x,y) -> if(empty(x),x,y,append(y,cons(min(x),nil()))) r23: if(true(),x,y,z) -> y r24: if(false(),x,y,z) -> sortIter(replace(min(x),head(x),tail(x)),z) The set of usable rules consists of r1, r2, r3, r4, r5, r6, r12, r19 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_replace#_A(x1,x2,x3,x4) = max{0, x1 - 24, x2 - 3, x3 - 3, x4 - 10} false_A = 1 cons_A(x1,x2) = max{8, x1 - 30, x2 + 2} replace#_A(x1,x2,x3) = max{0, x1 - 3, x2 - 3, x3 - 10} eq_A(x1,x2) = max{23, x1 - 16, x2 - 16} |0|_A = 0 true_A = 1 s_A(x1) = x1 + 15 le_A(x1,x2) = max{5, x1 - 16, x2 - 16} replace_A(x1,x2,x3) = max{12, x1 - 51, x2 - 5, x3 - 11} nil_A = 6 tail_A(x1) = max{33, x1 - 7} if_replace#!_A(x1,x2,x3,x4) = max{35, x4 + 31} false!_A = 3 cons!_A(x1,x2) = max{41, x1 - 68, x2 - 81} replace#!_A(x1,x2,x3) = max{36, x3 + 32} eq!_A(x1,x2) = max{42, x1 - 89, x2 - 114} |0|!_A = 4 true!_A = 1 s!_A(x1) = max{4, x1 - 113} le!_A(x1,x2) = max{6, x1 - 69, x2 - 112} replace!_A(x1,x2,x3) = max{42, x1 - 88, x2 - 91, x3 - 58} nil!_A = 5 tail!_A(x1) = max{4, x1 - 7} 2. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: if_replace#_A(x1,x2,x3,x4) = max{0, x1 - 19, x2 - 3, x3 - 3, x4 - 19} false_A = 1 cons_A(x1,x2) = max{17, x1 - 9, x2 + 3} replace#_A(x1,x2,x3) = max{0, x1 - 3, x2 - 3, x3 - 19} eq_A(x1,x2) = max{18, x1 - 9, x2 - 9} |0|_A = 0 true_A = 1 s_A(x1) = max{8, x1} le_A(x1,x2) = max{6, x1 - 9, x2 - 1} replace_A(x1,x2,x3) = max{21, x1 - 29, x2 - 11, x3 - 20} nil_A = 0 tail_A(x1) = max{41, x1 - 4} if_replace#!_A(x1,x2,x3,x4) = max{4, x1 - 171, x2 - 2, x3 - 127, x4 - 144} false!_A = 4 cons!_A(x1,x2) = max{8, x1 - 152, x2 - 134} replace#!_A(x1,x2,x3) = max{5, x1 - 1, x2 - 126, x3 - 142} eq!_A(x1,x2) = max{6, x1 - 130, x2 - 131} |0|!_A = 3 true!_A = 2 s!_A(x1) = max{1, x1 - 131} le!_A(x1,x2) = max{2, x1 - 153, x2 - 144} replace!_A(x1,x2,x3) = max{7, x1 - 253, x2 - 111, x3 - 123} nil!_A = 10 tail!_A(x1) = max{0, x1 - 1} partial status: pi(if_replace#) = [2] pi(false) = [] pi(cons) = [1, 2] pi(replace#) = [1] pi(eq) = [] pi(|0|) = [] pi(true) = [] pi(s) = [1] pi(le) = [2] pi(replace) = [] pi(nil) = [] pi(tail) = [1] 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: eq#(s(n),s(m)) -> eq#(n,m) and R consists of: r1: eq(|0|(),|0|()) -> true() r2: eq(|0|(),s(m)) -> false() r3: eq(s(n),|0|()) -> false() r4: eq(s(n),s(m)) -> eq(n,m) r5: le(|0|(),m) -> true() r6: le(s(n),|0|()) -> false() r7: le(s(n),s(m)) -> le(n,m) r8: min(cons(x,nil())) -> x r9: min(cons(n,cons(m,x))) -> if_min(le(n,m),cons(n,cons(m,x))) r10: if_min(true(),cons(n,cons(m,x))) -> min(cons(n,x)) r11: if_min(false(),cons(n,cons(m,x))) -> min(cons(m,x)) r12: replace(n,m,nil()) -> nil() r13: replace(n,m,cons(k,x)) -> if_replace(eq(n,k),n,m,cons(k,x)) r14: if_replace(true(),n,m,cons(k,x)) -> cons(m,x) r15: if_replace(false(),n,m,cons(k,x)) -> cons(k,replace(n,m,x)) r16: empty(nil()) -> true() r17: empty(cons(n,x)) -> false() r18: head(cons(n,x)) -> n r19: tail(nil()) -> nil() r20: tail(cons(n,x)) -> x r21: |sort|(x) -> sortIter(x,nil()) r22: sortIter(x,y) -> if(empty(x),x,y,append(y,cons(min(x),nil()))) r23: if(true(),x,y,z) -> y r24: if(false(),x,y,z) -> sortIter(replace(min(x),head(x),tail(x)),z) The set of usable rules consists of r5, r6, r12, r19 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 - 1, x2 - 1} s_A(x1) = max{2, x1} le_A(x1,x2) = max{3, x1 - 3, x2 - 7} |0|_A = 2 true_A = 1 false_A = 1 replace_A(x1,x2,x3) = max{16, x1 - 7, x2 - 12, x3 - 5} nil_A = 0 tail_A(x1) = max{21, x1 - 1} eq#!_A(x1,x2) = max{9, x1 - 1, x2 - 3} s!_A(x1) = 8 le!_A(x1,x2) = max{9, x1 - 37, x2 - 54} |0|!_A = 6 true!_A = 1 false!_A = 5 replace!_A(x1,x2,x3) = max{4, x1 - 33, x2 - 38, x3 - 23} nil!_A = 3 tail!_A(x1) = max{4, x1 - 4} 2. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: eq#_A(x1,x2) = max{0, x1 - 5, x2 - 5} s_A(x1) = x1 + 4 le_A(x1,x2) = max{3, x1 - 5, x2 - 7} |0|_A = 4 true_A = 1 false_A = 1 replace_A(x1,x2,x3) = max{13, x1 - 12, x2 - 12, x3 - 13} nil_A = 0 tail_A(x1) = max{24, x1 - 11} eq#!_A(x1,x2) = max{2, x1 - 1, x2 - 77} s!_A(x1) = max{1, x1 - 77} le!_A(x1,x2) = max{4, x1 - 76, x2 - 90} |0|!_A = 7 true!_A = 3 false!_A = 6 replace!_A(x1,x2,x3) = max{5, x1 - 50, x2 - 50, x3 - 44} nil!_A = 4 tail!_A(x1) = max{5, x1 - 55} partial status: pi(eq#) = [2] pi(s) = [1] pi(le) = [] pi(|0|) = [] pi(true) = [] pi(false) = [] pi(replace) = [] pi(nil) = [] pi(tail) = [] 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(),cons(n,cons(m,x))) -> min#(cons(m,x)) p2: min#(cons(n,cons(m,x))) -> if_min#(le(n,m),cons(n,cons(m,x))) p3: if_min#(true(),cons(n,cons(m,x))) -> min#(cons(n,x)) and R consists of: r1: eq(|0|(),|0|()) -> true() r2: eq(|0|(),s(m)) -> false() r3: eq(s(n),|0|()) -> false() r4: eq(s(n),s(m)) -> eq(n,m) r5: le(|0|(),m) -> true() r6: le(s(n),|0|()) -> false() r7: le(s(n),s(m)) -> le(n,m) r8: min(cons(x,nil())) -> x r9: min(cons(n,cons(m,x))) -> if_min(le(n,m),cons(n,cons(m,x))) r10: if_min(true(),cons(n,cons(m,x))) -> min(cons(n,x)) r11: if_min(false(),cons(n,cons(m,x))) -> min(cons(m,x)) r12: replace(n,m,nil()) -> nil() r13: replace(n,m,cons(k,x)) -> if_replace(eq(n,k),n,m,cons(k,x)) r14: if_replace(true(),n,m,cons(k,x)) -> cons(m,x) r15: if_replace(false(),n,m,cons(k,x)) -> cons(k,replace(n,m,x)) r16: empty(nil()) -> true() r17: empty(cons(n,x)) -> false() r18: head(cons(n,x)) -> n r19: tail(nil()) -> nil() r20: tail(cons(n,x)) -> x r21: |sort|(x) -> sortIter(x,nil()) r22: sortIter(x,y) -> if(empty(x),x,y,append(y,cons(min(x),nil()))) r23: if(true(),x,y,z) -> y r24: if(false(),x,y,z) -> sortIter(replace(min(x),head(x),tail(x)),z) 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: if_min#_A(x1,x2) = max{0, x1 - 107, x2 - 73} false_A = 1 cons_A(x1,x2) = max{58, x1 + 16, x2 + 13} min#_A(x1) = max{0, x1 - 73} le_A(x1,x2) = max{106, x1 - 2, x2 - 2} true_A = 91 |0|_A = 0 s_A(x1) = x1 + 1 if_min#!_A(x1,x2) = max{40, x1 - 92, x2 - 44} false!_A = 6 cons!_A(x1,x2) = max{x1 + 12, x2 - 3} min#!_A(x1) = max{11, x1 - 30} le!_A(x1,x2) = max{8, x1 - 15, x2 - 2} true!_A = 2 |0|!_A = 3 s!_A(x1) = max{7, x1 - 103} 2. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: if_min#_A(x1,x2) = max{0, x1 - 31, x2 - 14} false_A = 7 cons_A(x1,x2) = max{x1 + 8, x2 + 4} min#_A(x1) = max{0, x1 - 14} le_A(x1,x2) = max{30, x1 - 13, x2 - 13} true_A = 1 |0|_A = 1 s_A(x1) = max{12, x1 + 1} if_min#!_A(x1,x2) = max{0, x1 - 30} false!_A = 4 cons!_A(x1,x2) = 8 min#!_A(x1) = max{0, x1 - 26} le!_A(x1,x2) = max{9, x1 - 2, x2 - 13} true!_A = 2 |0|!_A = 3 s!_A(x1) = max{4, x1 - 14} partial status: pi(if_min#) = [1, 2] pi(false) = [] pi(cons) = [1, 2] pi(min#) = [1] pi(le) = [1] 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: le#(s(n),s(m)) -> le#(n,m) and R consists of: r1: eq(|0|(),|0|()) -> true() r2: eq(|0|(),s(m)) -> false() r3: eq(s(n),|0|()) -> false() r4: eq(s(n),s(m)) -> eq(n,m) r5: le(|0|(),m) -> true() r6: le(s(n),|0|()) -> false() r7: le(s(n),s(m)) -> le(n,m) r8: min(cons(x,nil())) -> x r9: min(cons(n,cons(m,x))) -> if_min(le(n,m),cons(n,cons(m,x))) r10: if_min(true(),cons(n,cons(m,x))) -> min(cons(n,x)) r11: if_min(false(),cons(n,cons(m,x))) -> min(cons(m,x)) r12: replace(n,m,nil()) -> nil() r13: replace(n,m,cons(k,x)) -> if_replace(eq(n,k),n,m,cons(k,x)) r14: if_replace(true(),n,m,cons(k,x)) -> cons(m,x) r15: if_replace(false(),n,m,cons(k,x)) -> cons(k,replace(n,m,x)) r16: empty(nil()) -> true() r17: empty(cons(n,x)) -> false() r18: head(cons(n,x)) -> n r19: tail(nil()) -> nil() r20: tail(cons(n,x)) -> x r21: |sort|(x) -> sortIter(x,nil()) r22: sortIter(x,y) -> if(empty(x),x,y,append(y,cons(min(x),nil()))) r23: if(true(),x,y,z) -> y r24: if(false(),x,y,z) -> sortIter(replace(min(x),head(x),tail(x)),z) The set of usable rules consists of r5, r6, r12, r19 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 - 1, x2 - 1} s_A(x1) = max{2, x1} le_A(x1,x2) = max{5, x1 - 3, x2 - 25} |0|_A = 0 true_A = 1 false_A = 3 replace_A(x1,x2,x3) = max{13, x1 - 22, x2 - 32, x3 - 27} nil_A = 4 tail_A(x1) = max{51, x1 - 5} le#!_A(x1,x2) = max{4, x1 - 1, x2 - 3} s!_A(x1) = max{3, x1 - 4} le!_A(x1,x2) = max{7, x1 - 79, x2 - 93} |0|!_A = 7 true!_A = 6 false!_A = 2 replace!_A(x1,x2,x3) = max{6, x1 - 66, x2 - 96, x3 - 89} nil!_A = 0 tail!_A(x1) = max{1, x1 - 69} 2. 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{11, x1 + 1} le_A(x1,x2) = max{3, x1 - 22, x2 - 18} |0|_A = 17 true_A = 1 false_A = 1 replace_A(x1,x2,x3) = max{22, x1 - 22, x2 - 6, x3 - 5} nil_A = 0 tail_A(x1) = max{26, x1 - 3} le#!_A(x1,x2) = max{9, x1 - 12, x2 - 2} s!_A(x1) = max{5, x1 - 3} le!_A(x1,x2) = max{6, x1 - 4, x2 - 18} |0|!_A = 5 true!_A = 2 false!_A = 4 replace!_A(x1,x2,x3) = max{5, x1 - 71, x2 - 56, x3 - 27} nil!_A = 0 tail!_A(x1) = max{1, x1 - 30} partial status: pi(le#) = [2] pi(s) = [1] pi(le) = [] pi(|0|) = [] pi(true) = [] pi(false) = [] pi(replace) = [] pi(nil) = [] pi(tail) = [] The following rules are removed: p1 Then no dependency pair remains.