(** * All of those results in terms of [maps] *)

(* Specifications: *)
Lemma maps_getthread i tp cnti :
Permutation (maps tp)
(@getThreadR _ _ _ i tp cnti :: all_but i (maps tp)).
Lemma maps_updthread i tp cnti c phi :
Permutation (maps (@updThread _ _ _ i tp cnti c phi))
(phi :: all_but i (maps tp)).
Lemma maps_updthreadR i tp cnti phi :
Permutation (maps (@updThreadR _ _ _ i tp cnti phi))
(phi :: all_but i (maps tp)).
Lemma maps_updlock1 (tp : jstate ge) addr :
maps (updLockSet tp addr None) = maps (remLockSet tp addr).
Lemma maps_updlock2 (tp : jstate ge) addr phi :
Permutation (maps (updLockSet tp addr (Some phi)))
(phi :: maps (remLockSet tp addr)).
Lemma maps_getlock1 tp addr :
lockRes tp addr = None ->
maps (remLockSet tp addr) = maps tp.
Lemma maps_getlock2 (tp : jstate ge) addr :
lockRes tp addr = Some None ->
maps (remLockSet tp addr) = maps tp.
Lemma maps_getlock3 (tp : jstate ge) addr phi :
lockRes tp addr = Some (Some phi) ->
Permutation (maps tp) (phi :: maps (remLockSet tp addr)).
Lemma maps_addthread tp v1 v2 phi :
Permutation (maps (addThread tp v1 v2 phi))
(phi :: maps tp).
Lemma maps_age_to i tp :
maps (age_tp_to i tp) = map (age_to i) (maps tp).
Lemma maps_remLockSet_updThread i tp addr cnti c phi :
maps (remLockSet (@updThread _ _ _ i tp cnti c phi) addr) =
maps (@updThread _ _ _ i (remLockSet tp addr) cnti c phi).
Lemma getThread_level i tp cnti Phi :
join_all tp Phi ->
level (@getThreadR _ _ _ i tp cnti) = level Phi.
Lemma join_sub_level {A} `{JA : sepalg.Join A} `{_ : ageable A} {_ : Perm_alg A} {_ : Age_alg A} :
forall x y : A, join_sub x y -> level x = level y.
Lemma joins_level {A} `{JA : sepalg.Join A} `{_ : ageable A} {_ : Perm_alg A} {_ : Age_alg A} :
forall x y : A, joins x y -> level x = level y.