Arguments resource_at_empty [phi] _ _.
Ltac inj_pair_tac :=
match goal with H: (@existT ?U ?P ?p ?x = @existT _ _ _ ?y) |- _ =>
generalize (@inj_pair2 U P p x y H); clear H; intro; try (subst x || subst y)
end.

(* Specifications: *)
Lemma preds_fmap_NoneP:
forall f1 f2, preds_fmap f1 f2 NoneP = NoneP.
Lemma necR_YES':
forall phi phi' loc rsh sh k,
necR phi phi' -> (phi@loc = YES rsh sh k NoneP <-> phi'@loc = YES rsh sh k NoneP).
Lemma necR_YES'':
forall phi phi' loc rsh sh k,
necR phi phi' ->
((exists pp, phi@loc = YES rsh sh k pp) <->
(exists pp, phi'@loc = YES rsh sh k pp)).
Lemma necR_PURE':
forall phi phi' loc k,
necR phi phi' ->
((exists pp, phi@loc = PURE k pp) <->
(exists pp, phi'@loc = PURE k pp)).
Lemma resource_at_join_sub:
forall phi1 phi2 l,
join_sub phi1 phi2 -> join_sub (phi1@l) (phi2@l).
Lemma age1_res_option: forall phi phi' loc,
age1 phi = Some phi' -> res_option (phi @ loc) = res_option (phi' @ loc).
Lemma necR_res_option:
forall (phi phi' : rmap) (loc : AV.address),
necR phi phi' -> res_option (phi @ loc) = res_option (phi' @ loc).
Lemma age1_resource_at:
forall phi phi',
age1 phi = Some phi' ->
forall loc r,
phi @ loc = resource_fmap (approx (level phi)) (approx (level phi)) r ->
phi' @ loc = resource_fmap (approx (level phi')) (approx (level phi')) r.
Lemma age1_ghost_of:
forall phi phi',
age1 phi = Some phi' ->
ghost_of phi' = ghost_fmap (approx (level phi')) (approx (level phi')) (ghost_of phi).
Lemma ghost_fmap_join: forall a b c f g, join a b c ->
join (ghost_fmap f g a) (ghost_fmap f g b) (ghost_fmap f g c).
Lemma age1_ghost_of_identity:
forall phi phi', age1 phi = Some phi' ->
(identity (ghost_of phi) <-> identity (ghost_of phi')).
Lemma age1_YES: forall phi phi' l rsh sh k ,
age1 phi = Some phi' -> (phi @ l = YES rsh sh k NoneP <-> phi' @ l = YES rsh sh k NoneP).
Lemma age1_YES': forall phi phi' l rsh sh k ,
age1 phi = Some phi' -> ((exists P, phi @ l = YES rsh sh k P) <-> exists P, phi' @ l = YES rsh sh k P).
Lemma age1_NO: forall phi phi' l sh nsh,
age1 phi = Some phi' -> (phi @ l = NO sh nsh <-> phi' @ l = NO sh nsh).
Lemma age1_PURE: forall phi phi' l k ,
age1 phi = Some phi' -> ((exists P, phi @ l = PURE k P) <-> exists P, phi' @ l = PURE k P).
Lemma necR_ghost_of:
forall phi phi',
necR phi phi' ->
ghost_of phi' = ghost_fmap (approx (level phi')) (approx (level phi')) (ghost_of phi).
Lemma empty_NO: forall r, identity r -> r = NO Share.bot bot_unreadable \/ exists k, exists pds, r = PURE k pds.
Lemma level_age_fash:
forall m m': rmap, level m = S (level m') -> exists m1, age m m1.
Lemma level_later_fash:
forall m m': rmap, (level m > level m')%nat  -> exists m1, laterR m m1 /\ level m1 = level m'.
Lemma resource_at_constructive_joins2:
forall phi1 phi2,
level phi1 = level phi2 ->
(forall loc, constructive_joins (phi1 @ loc) (phi2 @ loc)) ->
constructive_joins (ghost_of phi1) (ghost_of phi2) ->
constructive_joins phi1 phi2.
Lemma resource_at_joins2:
forall phi1 phi2,
level phi1 = level phi2 ->
(forall loc, constructive_joins (phi1 @ loc) (phi2 @ loc)) ->
constructive_joins (ghost_of phi1) (ghost_of phi2) ->
joins phi1 phi2.