Ltac address_ordered_auto :=
auto; repeat match goal with
| H: AddressOrdered.eq ?A ?A |- _ => clear H
| H: AddressOrdered.eq ?A ?B |- _ => hnf in H; subst A
| H: ?A <> ?A |- _ => contradiction H; reflexivity
| H: AddressOrdered.lt ?A ?A |- _ =>
apply AddressOrdered.lt_not_eq in H; contradiction H; reflexivity
| H: AddressOrdered.lt ?A ?B, H': AddressOrdered.lt ?B ?A |- _ =>
contradiction (AddressOrdered.lt_not_eq (AddressOrdered.lt_trans H H')); reflexivity
end.

(* Specifications: *)
Lemma gsolockResUpdLock: forall js loc a res,
loc <> a ->
lockRes (updLockSet js loc res) a =
lockRes js a.
Lemma gsslockResRemLock: forall js a,
lockRes (remLockSet js a) a =
None.
Lemma gsolockResRemLock: forall js loc a,
loc <> a ->
lockRes (remLockSet js loc) a =
lockRes js a.
Lemma gsoThreadLock:
forall {i tp} c p (cnti: containsThread tp i),
lockSet (updThread cnti c p) = lockSet tp.
Lemma gsoThreadCLock:
forall {i tp} c (cnti: containsThread tp i),
lockSet (updThreadC cnti c) = lockSet tp.
Lemma gsoThreadRLock:
forall {i tp} p (cnti: containsThread tp i),
lockSet (updThreadR cnti p) = lockSet tp.
Lemma gsoAddLock:
forall tp vf arg p,
lockSet (addThread tp vf arg p) = lockSet tp.
Lemma PX_in_rev:
forall elt a m, AMap.Raw.PX.In (elt:=elt) a m <-> AMap.Raw.PX.In a (rev m).