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
Joshua Yanovski
iris-coq
Commits
ab19e50e
Commit
ab19e50e
authored
May 04, 2016
by
Robbert Krebbers
Browse files
Allow intro_patterns for destructing existentials using iDestruct.
parent
b5fcf2eb
Changes
2
Hide whitespace changes
Inline
Side-by-side
heap_lang/lib/lock.v
View file @
ab19e50e
...
@@ -66,7 +66,7 @@ Lemma acquire_spec l R (Φ : val → iProp) :
...
@@ -66,7 +66,7 @@ Lemma acquire_spec l R (Φ : val → iProp) :
Proof
.
Proof
.
iIntros
"[Hl HΦ]"
.
iDestruct
"Hl"
as
{
N
γ
}
"(%&#?&#?)"
.
iIntros
"[Hl HΦ]"
.
iDestruct
"Hl"
as
{
N
γ
}
"(%&#?&#?)"
.
iL
ö
b
as
"IH"
.
wp_rec
.
wp_focus
(
CAS
_
_
_
)
%
E
.
iL
ö
b
as
"IH"
.
wp_rec
.
wp_focus
(
CAS
_
_
_
)
%
E
.
iInv
N
as
"Hinv"
.
iDestruct
"Hinv"
as
{
b
}
"[Hl HR]"
;
destruct
b
.
iInv
N
as
"Hinv"
.
iDestruct
"Hinv"
as
{
[]
}
"[Hl HR]"
.
-
wp_cas_fail
.
iSplitL
"Hl"
.
-
wp_cas_fail
.
iSplitL
"Hl"
.
+
iNext
.
iExists
true
.
by
iSplit
.
+
iNext
.
iExists
true
.
by
iSplit
.
+
wp_if
.
by
iApply
"IH"
.
+
wp_if
.
by
iApply
"IH"
.
...
...
proofmode/tactics.v
View file @
ab19e50e
...
@@ -402,13 +402,16 @@ Tactic Notation "iExists" uconstr(x1) "," uconstr(x2) "," uconstr(x3) ","
...
@@ -402,13 +402,16 @@ Tactic Notation "iExists" uconstr(x1) "," uconstr(x2) "," uconstr(x3) ","
uconstr
(
x8
)
:=
uconstr
(
x8
)
:=
iExists
x1
;
iExists
x2
,
x3
,
x4
,
x5
,
x6
,
x7
,
x8
.
iExists
x1
;
iExists
x2
,
x3
,
x4
,
x5
,
x6
,
x7
,
x8
.
Local
Tactic
Notation
"iExistDestruct"
constr
(
H
)
"as"
ident
(
x
)
constr
(
Hx
)
:=
Local
Tactic
Notation
"iExistDestruct"
constr
(
H
)
"as"
simple_intropattern
(
x
)
constr
(
Hx
)
:=
eapply
tac_exist_destruct
with
H
_
Hx
_
_
;
(
*
(
i
:=
H
)
(
j
:=
Hx
)
*
)
eapply
tac_exist_destruct
with
H
_
Hx
_
_
;
(
*
(
i
:=
H
)
(
j
:=
Hx
)
*
)
[
env_cbv
;
reflexivity
||
fail
"iExistDestruct:"
H
"not found"
[
env_cbv
;
reflexivity
||
fail
"iExistDestruct:"
H
"not found"
|
let
P
:=
match
goal
with
|-
ExistDestruct
?
P
_
=>
P
end
in
|
let
P
:=
match
goal
with
|-
ExistDestruct
?
P
_
=>
P
end
in
apply
_
||
fail
"iExistDestruct:"
H
":"
P
"not an existential"
|
];
apply
_
||
fail
"iExistDestruct:"
H
":"
P
"not an existential"
|
];
intros
x
;
eexists
;
split
;
let
y
:=
fresh
in
[
env_cbv
;
reflexivity
||
fail
"iExistDestruct:"
Hx
"not fresh"
|
].
intros
y
;
eexists
;
split
;
[
env_cbv
;
reflexivity
||
fail
"iExistDestruct:"
Hx
"not fresh"
|
revert
y
;
intros
x
].
(
**
*
Destruct
tactic
*
)
(
**
*
Destruct
tactic
*
)
Local
Tactic
Notation
"iDestructHyp"
constr
(
H
)
"as"
constr
(
pat
)
:=
Local
Tactic
Notation
"iDestructHyp"
constr
(
H
)
"as"
constr
(
pat
)
:=
...
...
Write
Preview
Markdown
is supported
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