let rec iter_subsumed f cube trie = match cube, trie with
| [], _ -> iter f trie
| _, Empty
| _, Full _ -> ()
| _, Node l -> iter_subsumed_list f cube l
and iter_subsumed_list f cube l = match l with
| [] -> ()
| (atom',t')::n ->
let atom = List.hd cube in
let cmp = Atom.compare atom atom' in
if cmp=0 then
iter_subsumed f (List.tl cube) t'
else if cmp>0 then begin
iter_subsumed f cube t';
iter_subsumed_list f cube n
end