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
Abhishek Anand
Iris
Commits
c6f4eac5
Commit
c6f4eac5
authored
7 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Avoid exponential proof search due to Plain → Persistent instance.
parent
0722547a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
theories/base_logic/derived.v
+13
-1
13 additions, 1 deletion
theories/base_logic/derived.v
with
13 additions
and
1 deletion
theories/base_logic/derived.v
+
13
−
1
View file @
c6f4eac5
...
...
@@ -960,7 +960,8 @@ Global Instance limit_preserving_Plain {A:ofeT} `{Cofe A} (Φ : A → uPred M) :
NonExpansive
Φ
→
LimitPreserving
(
λ
x
,
Plain
(
Φ
x
))
.
Proof
.
intros
.
apply
limit_preserving_entails
;
solve_proper
.
Qed
.
Global
Instance
Plain_Persistent
P
:
Plain
P
→
Persistent
P
.
(* Not an instance, see the bottom of this file *)
Lemma
plain_persistent
P
:
Plain
P
→
Persistent
P
.
Proof
.
rewrite
/
Plain
/
Persistent
=>
HP
.
by
rewrite
{
1
}
HP
plainly_elim'
.
Qed
.
Lemma
plainly_plainly
P
`{
!
Plain
P
}
:
■
P
⊣⊢
P
.
...
...
@@ -1061,6 +1062,8 @@ Proof.
rewrite
/
Persistent
-
impl_wand
pure_impl_forall
persistently_forall
.
auto
using
forall_mono
.
Qed
.
Global
Instance
plainly_persistent
P
:
Persistent
(
■
P
)
.
Proof
.
by
rewrite
/
Persistent
persistently_plainly
.
Qed
.
Global
Instance
persistently_persistent
P
:
Persistent
(
□
P
)
.
Proof
.
by
intros
;
apply
persistently_intro'
.
Qed
.
Global
Instance
and_persistent
P
Q
:
...
...
@@ -1165,3 +1168,12 @@ Global Instance uPred_ownM_sep_homomorphism :
Proof
.
split
;
[
split
;
try
apply
_|]
.
apply
ownM_op
.
apply
ownM_unit'
.
Qed
.
End
derived
.
End
uPred
.
(* When declared as an actual instance, [plain_persistent] will give cause
failing proof searches to take exponential time, as Coq will try to apply it
the instance at any node in the proof search tree.
To avoid that, we declare it using a [Hint Immediate], so that it will only be
used at the leaves of the proof search tree, i.e. when the premise of the hint
can be derived from just the current context. *)
Hint
Immediate
uPred
.
plain_persistent
:
typeclass_instances
.
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