Definition CMin_halted (q : CMin_core): option val :=
    match q with
       CMin_Returnstate v Kstop => Some v
     | _ => None
    end.

(* Specifications: *)
Lemma CMin_corestep_not_halted : forall ge m q m' q', CMin_corestep ge q m q' m' -> CMin_halted q = None.
Lemma CMin_at_external_halted_excl : forall q, CMin_at_external q = None \/ CMin_halted q = None.
Lemma CMin_after_at_external_excl : forall retv q q', CMin_after_external retv q = Some q' -> CMin_at_external q' = None.