(** A variant of [match_env_update_var] where a variable is optionally assigned to, depending on the [dst] parameter. *)

(* Specifications: *)
Lemma match_env_update_dest:
forall j map e le rs dst r v tv,
val_inject j v tv ->
map_wf map ->
reg_map_ok map r dst ->
match_env j map e le rs ->
match_env j map (set_optvar dst v e) le (rs#r <- tv).