(** Compatibility of evaluation functions with the "less defined than" relation. *)

Ltac TrivialExists :=
  match goal with
  | [ |- exists v, Some ?x = Some v /\ _ ] => exists x; split; auto
  | _ => idtac
  end.

(* Specifications: *)
Lemma eval_unop_compat: forall f op v1 tv1 v, eval_unop op v1 = Some v -> val_inject f v1 tv1 -> exists tv, eval_unop op tv1 = Some tv /\ val_inject f v tv.