Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
Iris
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
81
Issues
81
List
Boards
Labels
Milestones
Merge Requests
11
Merge Requests
11
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Iris
Iris
Commits
498660d6
Commit
498660d6
authored
Dec 12, 2019
by
Maxime Dénès
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid unwanted subgoals when applying `from_assumption_exact`
parent
a979391c
Changes
2
Show whitespace changes
Inline
Sidebyside
Showing
2 changed files
with
10 additions
and
3 deletions
+10
3
tests/proofmode.v
tests/proofmode.v
+3
0
theories/proofmode/class_instances_bi.v
theories/proofmode/class_instances_bi.v
+7
3
No files found.
tests/proofmode.v
View file @
498660d6
...
...
@@ 107,6 +107,9 @@ Proof. by iIntros. Qed.
Lemma
test_iAssumption_evar_ex_false
:
∃
R
,
R
⊢
∀
P
,
P
.
Proof
.
eexists
.
iIntros
"?"
(
P
).
iAssumption
.
Qed
.
Lemma
test_iApply_evar
P
Q
R
:
(
∀
Q
,
Q

∗
P
)

∗
R

∗
P
.
Proof
.
iIntros
"H1 H2"
.
iApply
"H1"
.
iExact
"H2"
.
Qed
.
Lemma
test_iAssumption_affine
P
Q
R
`
{!
Affine
P
,
!
Affine
R
}
:
P

∗
Q

∗
R

∗
Q
.
Proof
.
iIntros
"H1 H2 H3"
.
iAssumption
.
Qed
.
...
...
theories/proofmode/class_instances_bi.v
View file @
498660d6
...
...
@@ 4,12 +4,16 @@ From iris.proofmode Require Import base modality_instances classes ltac_tactics.
Set
Default
Proof
Using
"Type"
.
Import
bi
.
(** The following lemma is not an instance, but defined using a [Hint Extern] to
enable the better unification algorithm. *)
(** The lemma [from_assumption_exact is not an instance, but defined using
[notypeclasses refine] through [Hint Extern] to enable the better unification
algorithm. We use [shelve] to avoid the creation of unshelved goals for evars
by [refine], which otherwise causes TC search to fail. Such unshelved goals are
created for example when solving [FromAssumption p ?P ?Q] where both [?P] and
[?Q] are evars. See [test_iApply_evar] in [tests/proofmode] for an example. *)
Lemma
from_assumption_exact
{
PROP
:
bi
}
p
(
P
:
PROP
)
:
FromAssumption
p
P
P
.
Proof
.
by
rewrite
/
FromAssumption
/=
intuitionistically_if_elim
.
Qed
.
Hint
Extern
0
(
FromAssumption
_
_
_
)
=>
notypeclasses
refine
(
from_assumption_exact
_
_
)
:
typeclass_instances
.
notypeclasses
refine
(
from_assumption_exact
_
_
)
;
shelve
:
typeclass_instances
.
Section
bi_instances
.
Context
{
PROP
:
bi
}.
...
...
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