Skip to content
Snippets Groups Projects
Commit 84481877 authored by Robbert Krebbers's avatar Robbert Krebbers
Browse files

Add [] spec patterns for missing premises of iApply.

This fixes issue #51.
parent 3d46bb4d
No related branches found
No related tags found
No related merge requests found
......@@ -426,13 +426,14 @@ Tactic Notation "iApply" open_constr(lem) :=
| ITrm ?t ?xs ?pat => constr:(ITrm t xs ("*" +:+ pat))
| _ => constr:(ITrm lem hnil "*")
end in
iPoseProofCore lem as false true (fun H => first
[iExact H
|eapply tac_apply with _ H _ _ _;
let rec go H := first
[eapply tac_apply with _ H _ _ _;
[env_cbv; reflexivity
|let P := match goal with |- IntoWand ?P _ _ => P end in
apply _ || fail 1 "iApply: cannot apply" P
|lazy beta (* reduce betas created by instantiation *)]]).
|apply _
|lazy beta (* reduce betas created by instantiation *)]
|iSpecializePat H "[-]"; last go H] in
iPoseProofCore lem as false true (fun H =>
first [iExact H|go H|iTypeOf H (fun Q => fail 1 "iApply: cannot apply" Q)]).
(** * Revert *)
Local Tactic Notation "iForallRevert" ident(x) :=
......
......@@ -116,3 +116,7 @@ Proof.
iAssert True%I with "[HP]" as %_. { Fail iClear "HQ". by iClear "HP". }
done.
Qed.
Lemma demo_11 (M : ucmraT) (P Q R : uPred M) :
(P -∗ Q -∗ True -∗ True -∗ R) -∗ P -∗ Q -∗ R.
Proof. iIntros "H HP HQ". by iApply ("H" with "[HP]"). 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