congruence.
Qed.
(*+ Core steps *)
Variable C' : Set.
Variable corestep : C' -> map -> C' -> map -> Prop.
Variable corestep_fun : forall c m c1 m1 c2 m2,
corestep c m c1 m1 ->
corestep c m c2 m2 ->
c1 = c2 /\ m1 = m2.
Variable corestep_sameperms : forall c m c' m', corestep c m c' m' -> sameperms m m'.
Variable corestep_samelocks : forall c m c' m' l lock,
corestep c m c' m' -> (m l = Some (inr lock) <-> m' l = Some (inr lock)).
Variable cancellative : forall m1 m1' m2 m3, join m1 m2 m3 -> join m1' m2 m3 -> m1 = m1'.
(** Concurrent instructions are built on top of those [C'] *)
Inductive C : Set :=
| acquire : nat -> C -> C
| release : nat -> C -> C
| normal : C' -> C.
(*+ Joinability hypotheses *)
(* Those lemmas can be proved if the support set of maps is finite. We omit those for conveninence, here. *)
Variable jointo : forall {A} (maps : A -> map) (m : map), Prop.

(* Specifications: *)
Axiom selfjoins_jointo : forall {A} (maps : A -> map),
selfjoins maps -> exists m, jointo maps m.
Axiom jointo_selfjoins : forall {A} (maps : A -> map) m,
jointo maps m -> selfjoins maps.
Axiom jointo_det : forall {A} (maps : A -> map) m1 m2,
jointo maps m1 -> jointo maps m2 -> m1 = m2.
Axiom jointo_Some : forall {A} (maps : A -> map) m a addr v,
jointo maps m -> maps a addr = Some v -> m addr = Some v.
Axiom jointo_Some_inv : forall {A} (maps : A -> map) m addr v,
jointo maps m -> m addr = Some v -> exists a, maps a addr = Some v.
Lemma join_Some m1 m2 m addr v :
join m1 m2 m ->
m1 addr = Some v ->
m addr = Some v.
Axiom jointo_swapped :
forall {A} {m1 m2 : A -> map} (Adec:forall x y:A,{x=y}+{x<>y})
i j Phi e a b a' b',
swapped m1 m2 i j a b a' b' ->
join a b e ->
join a' b' e ->
jointo m1 Phi ->
jointo m2 Phi.