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

Lemma regset_comm:
forall (rs: Pregmap.t val) r r' v,
(rs # r <- v) # r' <- v = (rs # r' <- v) # r <- v.