Commit c90d55ae authored by Jacques-Henri Jourdan's avatar Jacques-Henri Jourdan

Add instance elim_inv_embed_inv.

parent d1b836c8
......@@ -104,6 +104,15 @@ Proof.
iApply (Helim with "[$H2]"); first done.
iMod (inv_open _ N with "[#]") as "(HP&Hclose)"; auto with iFrame.
Global Instance elim_inv_embed_inv {PROP' : sbi} `{SbiEmbedding _ PROP'}
E N (P : iProp Σ) (Q Q' : PROP') :
( R, ElimModal True |={E,E∖↑N}=> R R Q Q')
ElimInv (N E) inv N P True (⎡▷ P) (⎡▷ P ={E∖↑N,E}= True) Q Q'.
rewrite /ElimInv /ElimModal. iIntros (Helim ?) "(#H1&TRUE&H2)".
rewrite -bi_embed_sep. iApply (Helim with "[$H2 $TRUE]"); first done.
iModIntro. iMod (inv_open _ N with "[#]") as "(HP&Hclose)"; auto with iFrame.
  • Cannot we have a more general instance that applies to any kind of invariant? Something like:

    ElimInv φ P ?? Pinv Pout ?? ?? 
    ElimInv φ P ?? Pinv Pout Q Q'.
  • I spent 15 minutes thinking about something like this, but I could not come with anything like this. Please propose something if you have a better idea.

    The issue is that potentially, Q and Q' are not in the embedded logic, so you cannot just use ⎡Q⎤ and ⎡Q'⎤. Btw, we have a similar problem for ElimMod, and we have to define several instances in proofmode/monpred.v to make this kinda work.

  • For monpred couldn't you do something like this:

    ( i, ElimInv φ P ?? Pinv Pout (Q i) (Q' i)) 
    ElimInv φ P ?? Pinv Pout Q Q'.
Please register or sign in to reply
Lemma inv_open_timeless E N P `{!Timeless P} :
N E inv N P ={E,E∖↑N}= P (P ={E∖↑N,E}= True).
......@@ -849,6 +849,10 @@ Global Instance from_forall_embed `{BiEmbedding PROP PROP'} {A} P (Φ : A → PR
FromForall P Φ FromForall P%I (λ a, ⎡Φ a%I).
Proof. by rewrite /FromForall -bi_embed_forall => <-. Qed.
(* IntoInv *)
Global Instance into_inv_embed {PROP' : bi} `{BiEmbed PROP PROP'} P N :
IntoInv P N IntoInv P N.
(* ElimModal *)
Global Instance elim_modal_wand φ P P' Q Q' R :
ElimModal φ P P' Q Q' ElimModal φ P P' (R - Q) (R - Q').
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment