Input TRS: 1: eq(0(),0()) -> true() 2: eq(0(),s(m)) -> false() 3: eq(s(n),0()) -> false() 4: eq(s(n),s(m)) -> eq(n,m) 5: le(0(),m) -> true() 6: le(s(n),0()) -> false() 7: le(s(n),s(m)) -> le(n,m) 8: min(cons(x,nil())) -> x 9: min(cons(n,cons(m,x))) -> if_min(le(n,m),cons(n,cons(m,x))) 10: if_min(true(),cons(n,cons(m,x))) -> min(cons(n,x)) 11: if_min(false(),cons(n,cons(m,x))) -> min(cons(m,x)) 12: replace(n,m,nil()) -> nil() 13: replace(n,m,cons(k,x)) -> if_replace(eq(n,k),n,m,cons(k,x)) 14: if_replace(true(),n,m,cons(k,x)) -> cons(m,x) 15: if_replace(false(),n,m,cons(k,x)) -> cons(k,replace(n,m,x)) 16: empty(nil()) -> true() 17: empty(cons(n,x)) -> false() 18: head(cons(n,x)) -> n 19: tail(nil()) -> nil() 20: tail(cons(n,x)) -> x 21: sort(x) -> sortIter(x,nil()) 22: sortIter(x,y) -> if(empty(x),x,y,append(y,cons(min(x),nil()))) 23: if(true(),x,y,z) -> y 24: if(false(),x,y,z) -> sortIter(replace(min(x),head(x),tail(x)),z) Number of strict rules: 24 Direct Order(PosReal,>,Poly) ... failed. Freezing min 1: eq(0(),0()) -> true() 2: eq(0(),s(m)) -> false() 3: eq(s(n),0()) -> false() 4: eq(s(n),s(m)) -> eq(n,m) 5: le(0(),m) -> true() 6: le(s(n),0()) -> false() 7: le(s(n),s(m)) -> le(n,m) 8: min❆1_cons(x,nil()) -> x 9: min❆1_cons(n,cons(m,x)) -> if_min(le(n,m),cons(n,cons(m,x))) 10: if_min(true(),cons(n,cons(m,x))) -> min❆1_cons(n,x) 11: if_min(false(),cons(n,cons(m,x))) -> min❆1_cons(m,x) 12: replace(n,m,nil()) -> nil() 13: replace(n,m,cons(k,x)) -> if_replace(eq(n,k),n,m,cons(k,x)) 14: if_replace(true(),n,m,cons(k,x)) -> cons(m,x) 15: if_replace(false(),n,m,cons(k,x)) -> cons(k,replace(n,m,x)) 16: empty(nil()) -> true() 17: empty(cons(n,x)) -> false() 18: head(cons(n,x)) -> n 19: tail(nil()) -> nil() 20: tail(cons(n,x)) -> x 21: sort(x) -> sortIter(x,nil()) 22: sortIter(x,y) -> if(empty(x),x,y,append(y,cons(min(x),nil()))) 23: if(true(),x,y,z) -> y 24: if(false(),x,y,z) -> sortIter(replace(min(x),head(x),tail(x)),z) 25: min(cons(_1,_2)) ->= min❆1_cons(_1,_2) Number of strict rules: 24 Direct Order(PosReal,>,Poly) ... failed. Dependency Pairs: #1: #replace(n,m,cons(k,x)) -> #if_replace(eq(n,k),n,m,cons(k,x)) #2: #replace(n,m,cons(k,x)) -> #eq(n,k) #3: #min❆1_cons(n,cons(m,x)) -> #if_min(le(n,m),cons(n,cons(m,x))) #4: #min❆1_cons(n,cons(m,x)) -> #le(n,m) #5: #if_min(false(),cons(n,cons(m,x))) -> #min❆1_cons(m,x) #6: #if(false(),x,y,z) -> #sortIter(replace(min(x),head(x),tail(x)),z) #7: #if(false(),x,y,z) -> #replace(min(x),head(x),tail(x)) #8: #if(false(),x,y,z) -> #min(x) #9: #if(false(),x,y,z) -> #head(x) #10: #if(false(),x,y,z) -> #tail(x) #11: #min(cons(_1,_2)) ->? #min❆1_cons(_1,_2) #12: #le(s(n),s(m)) -> #le(n,m) #13: #if_min(true(),cons(n,cons(m,x))) -> #min❆1_cons(n,x) #14: #sortIter(x,y) -> #if(empty(x),x,y,append(y,cons(min(x),nil()))) #15: #sortIter(x,y) -> #empty(x) #16: #sortIter(x,y) -> #min(x) #17: #sort(x) -> #sortIter(x,nil()) #18: #if_replace(false(),n,m,cons(k,x)) -> #replace(n,m,x) #19: #eq(s(n),s(m)) -> #eq(n,m) Number of SCCs: 5, DPs: 9, edges: 10 SCC { #19 } Removing DPs: Order(PosReal,>,Sum)... succeeded. le(x1,x2) weight: 0 #empty(x1) weight: 0 s(x1) weight: (/ 1 2) + x1 #le(x1,x2) weight: 0 #if_min(x1,x2) weight: 0 eq(x1,x2) weight: 0 false() weight: 0 #min(x1) weight: 0 #head(x1) weight: 0 sortIter(x1,x2) weight: 0 min❆1_cons(x1,x2) weight: 0 #sortIter(x1,x2) weight: 0 true() weight: 0 #eq(x1,x2) weight: x2 #sort(x1) weight: 0 tail(x1) weight: 0 append(x1,x2) weight: 0 0() weight: 0 if(x1,x2,x3,x4) weight: 0 if_replace(x1,x2,x3,x4) weight: 0 nil() weight: 0 #tail(x1) weight: 0 sort(x1) weight: 0 #replace(x1,x2,x3) weight: 0 #if_replace(x1,x2,x3,x4) weight: 0 min(x1) weight: 0 #min❆1_cons(x1,x2) weight: 0 head(x1) weight: 0 cons(x1,x2) weight: 0 #if(x1,x2,x3,x4) weight: 0 empty(x1) weight: 0 if_min(x1,x2) weight: 0 replace(x1,x2,x3) weight: 0 Usable rules: { } Removed DPs: #19 Number of SCCs: 4, DPs: 8, edges: 9 SCC { #12 } Removing DPs: Order(PosReal,>,Sum)... succeeded. le(x1,x2) weight: 0 #empty(x1) weight: 0 s(x1) weight: (/ 1 2) + x1 #le(x1,x2) weight: x2 #if_min(x1,x2) weight: 0 eq(x1,x2) weight: 0 false() weight: 0 #min(x1) weight: 0 #head(x1) weight: 0 sortIter(x1,x2) weight: 0 min❆1_cons(x1,x2) weight: 0 #sortIter(x1,x2) weight: 0 true() weight: 0 #eq(x1,x2) weight: 0 #sort(x1) weight: 0 tail(x1) weight: 0 append(x1,x2) weight: 0 0() weight: 0 if(x1,x2,x3,x4) weight: 0 if_replace(x1,x2,x3,x4) weight: 0 nil() weight: 0 #tail(x1) weight: 0 sort(x1) weight: 0 #replace(x1,x2,x3) weight: 0 #if_replace(x1,x2,x3,x4) weight: 0 min(x1) weight: 0 #min❆1_cons(x1,x2) weight: 0 head(x1) weight: 0 cons(x1,x2) weight: 0 #if(x1,x2,x3,x4) weight: 0 empty(x1) weight: 0 if_min(x1,x2) weight: 0 replace(x1,x2,x3) weight: 0 Usable rules: { } Removed DPs: #12 Number of SCCs: 3, DPs: 7, edges: 8 SCC { #1 #18 } Removing DPs: Order(PosReal,>,Sum)... succeeded. le(x1,x2) weight: 0 #empty(x1) weight: 0 s(x1) weight: (/ 1 4) #le(x1,x2) weight: 0 #if_min(x1,x2) weight: 0 eq(x1,x2) weight: (/ 1 4) + x2 false() weight: 0 #min(x1) weight: 0 #head(x1) weight: 0 sortIter(x1,x2) weight: 0 min❆1_cons(x1,x2) weight: 0 #sortIter(x1,x2) weight: 0 true() weight: 0 #eq(x1,x2) weight: 0 #sort(x1) weight: 0 tail(x1) weight: 0 append(x1,x2) weight: 0 0() weight: 0 if(x1,x2,x3,x4) weight: 0 if_replace(x1,x2,x3,x4) weight: 0 nil() weight: 0 #tail(x1) weight: 0 sort(x1) weight: 0 #replace(x1,x2,x3) weight: (/ 1 4) + x3 #if_replace(x1,x2,x3,x4) weight: x4 min(x1) weight: 0 #min❆1_cons(x1,x2) weight: 0 head(x1) weight: 0 cons(x1,x2) weight: (/ 1 2) + x1 + x2 #if(x1,x2,x3,x4) weight: 0 empty(x1) weight: 0 if_min(x1,x2) weight: 0 replace(x1,x2,x3) weight: 0 Usable rules: { } Removed DPs: #1 #18 Number of SCCs: 2, DPs: 5, edges: 6 SCC { #6 #14 } Removing DPs: Order(PosReal,>,Sum)... Order(PosReal,>,Max)... QLPOpS... Order(PosReal,>,MaxSum)... succeeded. le(x1,x2) weight: max{0, (- (/ 23 16)) + x1} #empty(x1) weight: 0 s(x1) weight: max{0, (- (/ 1 16)) + x1} #le(x1,x2) weight: 0 #if_min(x1,x2) weight: 0 eq(x1,x2) weight: max{0, (/ 1 8) + x1} false() weight: (/ 3 8) #min(x1) weight: 0 #head(x1) weight: 0 sortIter(x1,x2) weight: 0 min❆1_cons(x1,x2) weight: max{0, (/ 3 4) + x2} #sortIter(x1,x2) weight: max{0, (/ 3 8) + x1, (/ 1 16) + x2} true() weight: (/ 3 16) #eq(x1,x2) weight: 0 #sort(x1) weight: 0 tail(x1) weight: max{0, (- (/ 9 16)) + x1} append(x1,x2) weight: max{0, (- (/ 3 4)) + x2} 0() weight: 0 if(x1,x2,x3,x4) weight: 0 if_replace(x1,x2,x3,x4) weight: max{0, (/ 1 16) + x4} nil() weight: 0 #tail(x1) weight: 0 sort(x1) weight: 0 #replace(x1,x2,x3) weight: 0 #if_replace(x1,x2,x3,x4) weight: 0 min(x1) weight: max{0, (/ 1 8) + x1} #min❆1_cons(x1,x2) weight: 0 head(x1) weight: (max (- (/ 1 16)) 0) cons(x1,x2) weight: max{0, (/ 9 16) + x2} #if(x1,x2,x3,x4) weight: max{0, (/ 1 8) + x1, (- (/ 1 16)) + x2, (/ 5 16) + x4} empty(x1) weight: max{0, (/ 3 16) + x1} if_min(x1,x2) weight: max{0, (/ 11 8) + x1} replace(x1,x2,x3) weight: max{0, (/ 1 16) + x3} Usable rules: { 12..17 19 20 } Removed DPs: #6 #14 Number of SCCs: 1, DPs: 3, edges: 4 SCC { #3 #5 #13 } Removing DPs: Order(PosReal,>,Sum)... succeeded. le(x1,x2) weight: (/ 1 4) + x1 #empty(x1) weight: 0 s(x1) weight: (/ 1 8) #le(x1,x2) weight: 0 #if_min(x1,x2) weight: x2 eq(x1,x2) weight: (/ 1 8) false() weight: 0 #min(x1) weight: 0 #head(x1) weight: 0 sortIter(x1,x2) weight: 0 min❆1_cons(x1,x2) weight: (/ 1 8) + x1 #sortIter(x1,x2) weight: 0 true() weight: 0 #eq(x1,x2) weight: 0 #sort(x1) weight: 0 tail(x1) weight: (/ 1 8) + x1 append(x1,x2) weight: 0 0() weight: 0 if(x1,x2,x3,x4) weight: 0 if_replace(x1,x2,x3,x4) weight: x4 nil() weight: 0 #tail(x1) weight: 0 sort(x1) weight: 0 #replace(x1,x2,x3) weight: (/ 1 8) #if_replace(x1,x2,x3,x4) weight: 0 min(x1) weight: 0 #min❆1_cons(x1,x2) weight: (/ 3 8) + x2 head(x1) weight: (/ 1 8) + x1 cons(x1,x2) weight: (/ 1 4) + x2 #if(x1,x2,x3,x4) weight: (/ 1 8) empty(x1) weight: (/ 1 8) if_min(x1,x2) weight: x1 replace(x1,x2,x3) weight: (/ 1 8) Usable rules: { } Removed DPs: #3 #5 #13 Number of SCCs: 0, DPs: 0, edges: 0 YES