(** Commutation with [find_label]. *)

(* Specifications: *)
Lemma remove_unused_labels_cons:
forall bto i c,
remove_unused_labels bto (i :: c) =
match i with
| Llabel lbl =>
if Labelset.mem lbl bto then i :: remove_unused_labels bto c else remove_unused_labels bto c
| _ =>
i :: remove_unused_labels bto c
end.
Lemma find_label_commut:
forall lbl bto,
Labelset.In lbl bto ->
forall c c',
find_label lbl c = Some c' ->
find_label lbl (remove_unused_labels bto c) = Some (remove_unused_labels bto c').
Corollary find_label_translated:
forall f i c' lbl c,
incl (i :: c') (fn_code f) ->
find_label lbl (fn_code f) = Some c ->
instr_branches_to i lbl ->
find_label lbl (fn_code (transf_function f)) =
Some (remove_unused_labels (labels_branched_to (fn_code f)) c).
Lemma find_label_incl:
forall lbl c c', find_label lbl c = Some c' -> incl c' c.