Definition pures_same phi1 phi2 := forall loc k pp, phi1 @ loc = PURE k pp <-> phi2 @ loc = PURE k pp.

(* Specifications: *)
Lemma pures_same_sym phi1 phi2 : pures_same phi1 phi2 -> pures_same phi2 phi1.
Lemma joins_pures_same phi1 phi2 : joins phi1 phi2 -> pures_same phi1 phi2.
Lemma join_sub_pures_same phi1 phi2 : join_sub phi1 phi2 -> pures_same phi1 phi2.
Lemma pures_same_eq_l phi1 phi1' phi2 :
pures_same phi1 phi1' ->
pures_eq phi1 phi2 ->
pures_eq phi1' phi2.
Lemma pures_same_eq_r phi1 phi2 phi2' :
level phi2 = level phi2' ->
pures_same phi2 phi2' ->
pures_eq phi1 phi2 ->
pures_eq phi1 phi2'.
Lemma pures_same_pures_eq phi1 phi2 :
level phi1 = level phi2 ->
pures_same phi1 phi2 ->
pures_eq phi1 phi2.
Lemma pures_same_jm_ ge m tp Phi (compat : mem_compatible_with tp m Phi)
i (cnti : containsThread tp i) :
pures_same (m_phi (jm_(ge := ge) cnti compat)) Phi.
Lemma level_m_phi jm : level (m_phi jm) = level jm.
Lemma jsafeN_downward {Z} {Jspec : juicy_ext_spec Z} {ge n z c jm} :
jsafeN Jspec ge (S n) z c jm ->
jsafeN Jspec ge n z c jm.
Lemma jsafe_phi_downward {Z} {Jspec : juicy_ext_spec Z} {ge n z c phi} :
jsafe_phi Jspec ge (S n) z c phi ->
jsafe_phi Jspec ge n z c phi.
Lemma jsafe_phi_bupd_downward {Z} {Jspec : juicy_ext_spec Z} {ge n z c phi} :
jsafe_phi_bupd Jspec ge (S n) z c phi ->
jsafe_phi_bupd Jspec ge n z c phi.
Lemma jsafe_phi_age Z Jspec ge ora q n phi phiaged :
ext_spec_stable age (JE_spec _ Jspec) ->
age phi phiaged ->
le n (level phiaged) ->
@jsafe_phi Z Jspec ge n ora q phi ->
@jsafe_phi Z Jspec ge n ora q phiaged.
Lemma jsafe_phi_age_to Z Jspec ge ora q n l phi :
ext_spec_stable age (JE_spec _ Jspec) ->
le n l ->
@jsafe_phi Z Jspec ge n ora q phi ->
@jsafe_phi Z Jspec ge n ora q (age_to l phi).
Lemma jsafe_phi_bupd_age Z Jspec ge ora q n phi phiaged :
ext_spec_stable age (JE_spec _ Jspec) ->
age phi phiaged ->
le n (level phiaged) ->
@jsafe_phi_bupd Z Jspec ge n ora q phi ->
@jsafe_phi_bupd Z Jspec ge n ora q phiaged.
Lemma jsafe_phi_bupd_age_to Z Jspec ge ora q n l phi :
ext_spec_stable age (JE_spec _ Jspec) ->
le n l ->
@jsafe_phi_bupd Z Jspec ge n ora q phi ->
@jsafe_phi_bupd Z Jspec ge n ora q (age_to l phi).
Lemma m_phi_jm_ ge m (tp : jstate ge) phi i cnti compat :
m_phi (@jm_ ge tp m phi i cnti compat) = @getThreadR _ _ _ i tp cnti.
Lemma rmap_freelock_pures_same phi phi' m loc R length :
rmap_freelock phi phi' m loc R length ->
pures_same phi phi'.
Lemma rmap_makelock_pures_same phi phi' loc R length :
rmap_makelock phi phi' loc R length ->
pures_same phi phi'.