(** * Properties of equations *)
Module ESF := FSetFacts.Facts(EqSet).
Module ESP := FSetProperties.Properties(EqSet).
Module ESD := FSetDecide.Decide(EqSet).
Definition sel_val (k: equation_kind) (v: val) : val :=
match k with
| Full => v
| Low => Val.loword v
| High => Val.hiword v
end.
(** A set of equations [e] is satisfied in a RTL pseudoreg state [rs] and an LTL location state [ls] if, for every equation [r = l [k]] in [e], [sel_val k (rs#r)] (the [k] fragment of [r]'s value in the RTL code) is less defined than [ls l] (the value of [l] in the LTL code). *)
Definition satisf (rs: regset) (ls: locset) (e: eqs) : Prop :=
forall q, EqSet.In q e -> Val.lessdef (sel_val (ekind q) rs#(ereg q)) (ls (eloc q)).

Lemma satisf_incr:
forall rs ls (e1 e2: eqs),
satisf rs ls e2 -> EqSet.Subset e1 e2 -> satisf rs ls e1.