(** [Loc.norepet ll] holds if the locations in list [ll] are pairwise different. *)
Inductive norepet : list loc -> Prop :=
| norepet_nil:
norepet nil
| norepet_cons:
forall hd tl, notin hd tl -> norepet tl -> norepet (hd :: tl).

(* Specifications: *)
Lemma norepet_dec (ll: list loc) : {norepet ll} + {~norepet ll}.
Lemma gss_reg: forall r v m, (set (R r) v m) (R r) = v.
Lemma gss_typed: forall l v m, Val.has_type v (Loc.type l) -> (set l v m) l = v.
Lemma gso: forall l v m p, Loc.diff l p -> (set l v m) p = m p.
Fixpoint undef (ll: list loc) (m: t) {struct ll} : t :=
match ll with
| nil => m
| l1 :: ll' => undef ll' (set l1 Vundef m)
end.
Lemma guo: forall ll l m, Loc.notin l ll -> (undef ll m) l = m l.
Lemma gus: forall ll l m, In l ll -> (undef ll m) l = Vundef.
Definition getpair (p: rpair loc) (m: t) : val :=
match p with
| One l => m l
| Twolong l1 l2 => Val.longofwords (m l1) (m l2)
end.