Skip to content
Snippets Groups Projects
Commit a16d59ea authored by Jacques-Henri Jourdan's avatar Jacques-Henri Jourdan Committed by Robbert Krebbers
Browse files

When using [iAssert ... with ">[]"], we should not use...

When using [iAssert ... with ">[]"], we should not use [tac_assert_persistent], and eliminate the modality instead.

This patch is still not ideal, because some modalities (e.g., later) preserve persistence.
parent f1b30a2e
No related branches found
No related tags found
No related merge requests found
...@@ -1247,7 +1247,7 @@ Tactic Notation "iAssertCore" open_constr(Q) ...@@ -1247,7 +1247,7 @@ Tactic Notation "iAssertCore" open_constr(Q)
|tac H] |tac H]
| [SGoal (SpecGoal ?m ?lr ?Hs_frame ?Hs)] => | [SGoal (SpecGoal ?m ?lr ?Hs_frame ?Hs)] =>
let Hs' := eval cbv in (if lr then Hs else Hs_frame ++ Hs) in let Hs' := eval cbv in (if lr then Hs else Hs_frame ++ Hs) in
match p with match eval cbv in (p && negb m) with
| false => | false =>
eapply tac_assert with _ _ _ lr Hs' H Q _; eapply tac_assert with _ _ _ lr Hs' H Q _;
[match m with [match m with
......
...@@ -124,3 +124,6 @@ Proof. iIntros "H HP HQ". by iApply ("H" with "[HP]"). Qed. ...@@ -124,3 +124,6 @@ Proof. iIntros "H HP HQ". by iApply ("H" with "[HP]"). Qed.
(* Check coercions *) (* Check coercions *)
Lemma demo_12 (M : ucmraT) (P : Z uPred M) : ( x, P x) -∗ x, P x. Lemma demo_12 (M : ucmraT) (P : Z uPred M) : ( x, P x) -∗ x, P x.
Proof. iIntros "HP". iExists (0:nat). iApply ("HP" $! (0:nat)). Qed. Proof. iIntros "HP". iExists (0:nat). iApply ("HP" $! (0:nat)). Qed.
Lemma demo_13 (M : ucmraT) (P : uPred M) : (|==> False) -∗ |==> P.
Proof. iIntros. iAssert False%I with ">[-]" as "[]". done. Qed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment