(* 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.

(* Specifications: *)
(*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').
Lemma regset_comm:
forall (rs: Pregmap.t val) r r' v,
(rs # r <- v) # r' <- v = (rs # r' <- v) # r <- v.
Lemma undef_regs_comm:
forall regs rs r,
undef_regs regs (rs # r <- Vundef) =
(undef_regs regs rs) # r <- Vundef.
Lemma regset_wd_undef:
forall f rs regs
(Hrs_wd: regset_wd f rs),
regset_wd f (undef_regs regs rs).