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
Tej Chajed
iris
Commits
676054d8
Verified
Commit
676054d8
authored
1 year ago
by
Johannes Hostert
Browse files
Options
Downloads
Patches
Plain Diff
Add comments explaining intricate later shenanigans
parent
7af01091
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
iris/bi/derived_connectives.v
+15
-0
15 additions, 0 deletions
iris/bi/derived_connectives.v
iris/bi/derived_laws_later.v
+6
-4
6 additions, 4 deletions
iris/bi/derived_laws_later.v
iris/bi/interface.v
+6
-0
6 additions, 0 deletions
iris/bi/interface.v
with
27 additions
and
4 deletions
iris/bi/derived_connectives.v
+
15
−
0
View file @
676054d8
...
...
@@ -93,6 +93,21 @@ Notation "◇ P" := (bi_except_0 P) : bi_scope.
Global
Instance
:
Params
(
@
bi_except_0
)
1
:=
{}
.
Global
Typeclasses
Opaque
bi_except_0
.
(* Timeless propositions are propositions that do not depend on the step-index.
There are two equivalent ways of expressing that a step-indexed proposition
[P : nat → Prop] is timeless:
* Option one, used here, says that [∀ n, P n → P (S n)]. In the logic, this
is stated as [▷ P ⊢ ◇ P] (which actually reads [∀ n > 0, P (n-1) → P n],
but this is trivially equivalent).
* Option two says that [∀ n, P 0 → P n]. In the logic, this is stated as a
meta-entailment [∀ P, (▷ False ∧ P ⊢ Q) → (P ⊢ Q)]. The assumption
[▷ False] expresses that the step-index is 0.
Both formulations are equivalent. In the logic, this can be shown using Löb
induction and [later_false_em]. In the model, this follows from regular
natural induction.
The law [timeless_alt] in [derived_laws_later.v] provides option two, by
proving that both versions are equivalent in the logic. *)
Class
Timeless
{
PROP
:
bi
}
(
P
:
PROP
)
:=
timeless
:
▷
P
⊢
◇
P
.
Global
Arguments
Timeless
{_}
_
%
I
:
simpl
never
.
Global
Arguments
timeless
{_}
_
%
I
{_}
.
...
...
This diff is collapsed.
Click to expand it.
iris/bi/derived_laws_later.v
+
6
−
4
View file @
676054d8
...
...
@@ -337,11 +337,13 @@ Proof. rewrite /bi_except_0; apply _. Qed.
Global
Instance
Timeless_proper
:
Proper
((
≡
)
==>
iff
)
(
@
Timeless
PROP
)
.
Proof
.
solve_proper
.
Qed
.
(* To prove a timeless proposition Q, we can additionally assume
that we are at step-index 0 (hypothesis ▷ False).
In fact, this can also serve as a definition of timelessness. *)
(* The left-to-right direction of this lemma shows that to prove a timeless
proposition [Q], we can additionally assume that we are at step-index 0, i.e.
we can add [▷ False] to our assumptions. The right-to-left direction shows
that this is in fact an exact characterization of timeless propositions.
See also the comment above the definition of [Timeless]. *)
Lemma
timeless_alt
`{
!
BiLöb
PROP
}
Q
:
Timeless
Q
↔
∀
P
,
(
▷
False
∧
P
⊢
Q
)
→
(
P
⊢
Q
)
.
Timeless
Q
↔
(
∀
P
,
(
▷
False
∧
P
⊢
Q
)
→
(
P
⊢
Q
)
)
.
Proof
.
split
;
rewrite
/
Timeless
=>
H
.
*
intros
P
Hpr
.
...
...
This diff is collapsed.
Click to expand it.
iris/bi/interface.v
+
6
−
0
View file @
676054d8
...
...
@@ -222,6 +222,12 @@ Section bi_mixin.
bi_mixin_later_persistently_1
P
:
▷
<
pers
>
P
⊢
<
pers
>
▷
P
;
bi_mixin_later_persistently_2
P
:
<
pers
>
▷
P
⊢
▷
<
pers
>
P
;
(* In a step-index model, this law allows case distinctions on whether
the step-index is 0 (expressed as [▷ False] in the logic):
* If it is 0, the left side is true, and we know nothing about [P].
* If not, then it is [S n] for some [n], and [P] holds at [n]. By down-
closure, it also holds at [0]. Thus, we get to use [P], but only if
the step-index is 0 ([▷ False] is true). *)
bi_mixin_later_false_em
P
:
▷
P
⊢
▷
False
∨
(
▷
False
→
P
);
}
.
...
...
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