diff --git a/tests/proofmode.ref b/tests/proofmode.ref index ce21d1c9d1c2c3b7629c0e461fa8a4ff09977bb1..58739cd69d4e2b275403abd12ee31e493d190595 100644 --- a/tests/proofmode.ref +++ b/tests/proofmode.ref @@ -396,6 +396,29 @@ No applicable tactic. "HQ" : Q --------------------------------------∗ ▷ P ∗ Q +"test_iRevert_pure" + : string +1 goal + + PROP : bi + φ : Prop + P : PROP + ============================ + "H" : <affine> ⌜φ⌠-∗ P + --------------------------------------∗ + <affine> ⌜φ⌠-∗ P +"test_iRevert_pure_affine" + : string +1 goal + + PROP : bi + BiAffine0 : BiAffine PROP + φ : Prop + P : PROP + ============================ + "H" : ⌜φ⌠-∗ P + --------------------------------------∗ + ⌜φ⌠-∗ P "elim_mod_accessor" : string 1 goal diff --git a/tests/proofmode.v b/tests/proofmode.v index 8ad3f6da4b95f11a1f86e15748228e9556d8b504..e83bd50bfcfc45ea2a06fae6bd001eaa466f6dc0 100644 --- a/tests/proofmode.v +++ b/tests/proofmode.v @@ -1146,6 +1146,22 @@ Proof. iIntros (?) "HP HQ". iModIntro. Show. by iFrame. Qed. +Check "test_iRevert_pure". +Lemma test_iRevert_pure (φ : Prop) P : + φ → (<affine> ⌜ φ ⌠-∗ P) -∗ P. +Proof. + (* Check that iRevert creates a wand instead of an implication *) + iIntros (Hφ) "H". iRevert (Hφ). Show. done. +Qed. + +Check "test_iRevert_pure_affine". +Lemma test_iRevert_pure_affine `{!BiAffine PROP} (φ : Prop) P : + φ → (⌜ φ ⌠-∗ P) -∗ P. +Proof. + (* If the BI is affine, no affine modality should be added *) + iIntros (Hφ) "H". iRevert (Hφ). Show. done. +Qed. + End tests. Section parsing_tests.