(* Lemma decode_longs_valid_val: forall f vals tys, valid_val_list f vals -> valid_val_list f (val_casted.decode_longs tys vals). *)
Hint Extern 1 (valid_val _ (@Pregmap.set _ _ _ _ _)) => eapply regset_wd_set : wd.
Hint Resolve regset_wd_set regset_wd_set_res : wd.

(*NOTE: Do i use that?*)
Lemma valid_val_reg_set:
forall f rs r r' v,
valid_val f v ->
regset_wd f rs ->
valid_val f (rs # r <- v r').