Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
Iris
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Abel Nieto
Iris
Commits
498660d6
Unverified
Commit
498660d6
authored
5 years ago
by
Maxime Dénès
Browse files
Options
Downloads
Patches
Plain Diff
Avoid unwanted subgoals when applying `from_assumption_exact`
parent
a979391c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/proofmode.v
+3
-0
3 additions, 0 deletions
tests/proofmode.v
theories/proofmode/class_instances_bi.v
+7
-3
7 additions, 3 deletions
theories/proofmode/class_instances_bi.v
with
10 additions
and
3 deletions
tests/proofmode.v
+
3
−
0
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
.
...
...
This diff is collapsed.
Click to expand it.
theories/proofmode/class_instances_bi.v
+
7
−
3
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
}
.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment