Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Janno
iris-coq
Commits
84481877
Commit
84481877
authored
Jan 22, 2017
by
Robbert Krebbers
Browse files
Add [] spec patterns for missing premises of iApply.
This fixes issue #51.
parent
3d46bb4d
Changes
2
Hide whitespace changes
Inline
Side-by-side
theories/proofmode/tactics.v
View file @
84481877
...
...
@@ -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
)
:
=
...
...
theories/tests/proofmode.v
View file @
84481877
...
...
@@ -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
.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment