Definition CMinSel_halted (q : CMinSel_core): option val :=
    match q with
       CMinSel_Returnstate v Kstop => Some v
     | _ => None
    end.

(* Specifications: *)
Lemma CMinSel_corestep_not_halted : forall ge m q m' q', CMinSel_corestep ge q m q' m' -> CMinSel_halted q = None.
Lemma CMinSel_at_external_halted_excl : forall q, CMinSel_at_external q = None \/ CMinSel_halted q = None.
Lemma CMinSel_after_at_external_excl : forall retv q q', CMinSel_after_external retv q = Some q' -> CMinSel_at_external q' = None.