(** Soundness of [constval] with respect to the reduction semantics. *)

Theorem constval_steps:
forall f r m v v' ty m',
star step ge (ExprState f r Kstop empty_env m) E0 (ExprState f (Eval v' ty) Kstop empty_env m') ->
constval ge r = OK v ->
m' = m /\ ty = typeof r /\ Val.inject inj v v'.