Definition dest_below (dst: destination) (g: generator) : Prop :=
  match dst with
  | For_set sd => Plt (sd_temp sd) g.(gen_next)
  | _ => True
  end.Remark dest_for_val_below: forall g, dest_below For_val g.Remark dest_for_effect_below: forall g, dest_below For_effects g.

(* Specifications: *)
Lemma dest_for_set_seqbool_val: forall tmp ty g1 g2, within tmp g1 g2 -> dest_below (For_set (sd_seqbool_val tmp ty)) g2.
Lemma dest_for_set_seqbool_set: forall sd ty g, dest_below (For_set sd) g -> dest_below (For_set (sd_seqbool_set ty sd)) g.
Lemma dest_for_set_condition_val: forall tmp tycast ty g1 g2, within tmp g1 g2 -> dest_below (For_set (SDbase tycast ty tmp)) g2.
Lemma dest_for_set_condition_set: forall sd tmp tycast ty g1 g2, dest_below (For_set sd) g2 -> within tmp g1 g2 -> dest_below (For_set (SDcons tycast ty tmp sd)) g2.
Lemma sd_temp_notin: forall sd g1 g2 l, dest_below (For_set sd) g1 -> contained l g1 g2 -> ~In (sd_temp sd) l.
Lemma dest_below_le: forall dst g1 g2, dest_below dst g1 -> Ple g1.(gen_next) g2.(gen_next) -> dest_below dst g2.
Lemma finish_meets_spec_1: forall dst sl a sl' a', finish dst sl a = (sl', a') -> sl' = sl ++ final dst a.
Lemma finish_meets_spec_2: forall dst sl a sl' a', finish dst sl a = (sl', a') -> a' = a.