-- The list must be sorted
rm_inits (l1:ll@(l2:ll2)) = 
     if has_init l2 l1 then
         rm_inits (l1:ll2)
     else
         l1:(rm_inits ll)
rm_inits (l1:ll@(l2:ll2)) = 
     if has_init l2 l1 then
         rm_inits (l1:ll2)
     else
         l1:(rm_inits ll)
rm_inits (l1:ll@(l2:ll2)) = 
     if has_init l2 l1 then
         rm_inits (l1:ll2)
     else
         l1:(rm_inits ll)