Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Iris
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
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
Gaëtan Gilbert
Iris
Commits
725ffc11
Commit
725ffc11
authored
4 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Factor out lemma `löb_weak`.
parent
56e966fd
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/bi/derived_laws_later.v
+45
-17
45 additions, 17 deletions
theories/bi/derived_laws_later.v
with
45 additions
and
17 deletions
theories/bi/derived_laws_later.v
+
45
−
17
View file @
725ffc11
...
@@ -84,23 +84,33 @@ Proof. intros. by rewrite /Persistent -later_persistently {1}(persistent P). Qed
...
@@ -84,23 +84,33 @@ Proof. intros. by rewrite /Persistent -later_persistently {1}(persistent P). Qed
Global
Instance
later_absorbing
P
:
Absorbing
P
→
Absorbing
(
▷
P
)
.
Global
Instance
later_absorbing
P
:
Absorbing
P
→
Absorbing
(
▷
P
)
.
Proof
.
intros
?
.
by
rewrite
/
Absorbing
-
later_absorbingly
absorbing
.
Qed
.
Proof
.
intros
?
.
by
rewrite
/
Absorbing
-
later_absorbingly
absorbing
.
Qed
.
(* Proof following https://en.wikipedia.org/wiki/L%C3%B6b's_theorem#Proof_of_L%C3%B6b's_theorem.
(** * Alternatives to Löb induction *)
Their [Ψ] is called [Q] in our proof. *)
(** We prove relations between the following statements:
Global
Instance
later_contractive_bi_löb
:
Contractive
(
bi_later
(
PROP
:=
PROP
))
→
BiLöb
PROP
.
1. [Contractive (▷)]
2. [(▷ P → P) ⊢ P], the internal version of Löb as expressed by [BiLöb].
3. [(▷ P ⊢ P) → (True ⊢ P)], the external/"weak" version of Löb induction.
4. [□ (□ ▷ P -∗ P) ⊢ P], an internal version of Löb with magic wand instead of
implication.
5. [□ (▷ P -∗ P) ⊢ P], a weaker version of the former statement, which does not
make the induction hypothesis intuitionistic.
We prove that:
- (1) implies (2) in all BI logics (lemma [later_contractive_bi_löb]).
- (2) and (3) are logically equivalent in all BI logics (lemma [löb_weak]).
- (2) implies (4) and (5) in all BI logics (lemmas [löb_wand_intuitionistically]
and [löb_wand]).
- (5) and (2) are logically equivalent in affine BI logics (lemma [löb_alt]).
In particular, this gives that (2), (3), (4) and (5) are logically equivalent in
affine BI logics such as Iris. *)
Lemma
löb_alt_weak
:
BiLöb
PROP
↔
∀
P
,
(
▷
P
⊢
P
)
→
(
True
⊢
P
)
.
Proof
.
Proof
.
intros
.
assert
(
∀
P
,
(
▷
P
⊢
P
)
→
(
True
⊢
P
))
as
weak_löb
.
split
;
intros
HLöb
P
.
{
intros
P
.
pose
(
flöb_pre
(
P
Q
:
PROP
)
:=
(
▷
Q
→
P
)
%
I
)
.
{
by
intros
->%
entails_impl_True
.
}
assert
(
∀
P
,
Contractive
(
flöb_pre
P
))
by
solve_contractive
.
apply
entails_impl_True
,
HLöb
.
apply
impl_intro_r
.
set
(
Q
:=
fixpoint
(
flöb_pre
P
))
.
assert
(
Q
⊣⊢
(
▷
Q
→
P
))
as
HQ
by
(
exact
:
fixpoint_unfold
)
.
intros
HP
.
rewrite
-
HP
.
assert
(
▷
Q
⊢
P
)
as
HQP
.
{
rewrite
-
HP
.
rewrite
-
(
idemp
(
∧
)
(
▷
Q
))
%
I
{
2
}(
later_intro
(
▷
Q
))
%
I
.
by
rewrite
{
1
}
HQ
{
1
}
later_impl
impl_elim_l
.
}
rewrite
-
HQP
HQ
-2
!
later_intro
.
apply
(
entails_impl_True
_
P
)
.
done
.
}
intros
P
.
apply
entails_impl_True
,
weak_löb
.
apply
impl_intro_r
.
rewrite
-
{
2
}(
idemp
(
∧
)
(
▷
P
→
P
))
%
I
.
rewrite
-
{
2
}(
idemp
(
∧
)
(
▷
P
→
P
))
%
I
.
rewrite
{
2
}(
later_intro
(
▷
P
→
P
))
%
I
.
rewrite
{
2
}(
later_intro
(
▷
P
→
P
))
%
I
.
rewrite
later_impl
.
rewrite
later_impl
.
...
@@ -108,6 +118,24 @@ Proof.
...
@@ -108,6 +118,24 @@ Proof.
rewrite
impl_elim_r
.
done
.
rewrite
impl_elim_r
.
done
.
Qed
.
Qed
.
(** Proof following https://en.wikipedia.org/wiki/L%C3%B6b's_theorem#Proof_of_L%C3%B6b's_theorem.
Their [Ψ] is called [Q] in our proof. *)
Global
Instance
later_contractive_bi_löb
:
Contractive
(
bi_later
(
PROP
:=
PROP
))
→
BiLöb
PROP
.
Proof
.
intros
.
apply
löb_alt_weak
=>
P
.
pose
(
flöb_pre
(
P
Q
:
PROP
)
:=
(
▷
Q
→
P
)
%
I
)
.
assert
(
∀
P
,
Contractive
(
flöb_pre
P
))
by
solve_contractive
.
set
(
Q
:=
fixpoint
(
flöb_pre
P
))
.
assert
(
Q
⊣⊢
(
▷
Q
→
P
))
as
HQ
by
(
exact
:
fixpoint_unfold
)
.
intros
HP
.
rewrite
-
HP
.
assert
(
▷
Q
⊢
P
)
as
HQP
.
{
rewrite
-
HP
.
rewrite
-
(
idemp
(
∧
)
(
▷
Q
))
%
I
{
2
}(
later_intro
(
▷
Q
))
%
I
.
by
rewrite
{
1
}
HQ
{
1
}
later_impl
impl_elim_l
.
}
rewrite
-
HQP
HQ
-2
!
later_intro
.
apply
(
entails_impl_True
_
P
)
.
done
.
Qed
.
Lemma
löb_wand_intuitionistically
`{
!
BiLöb
PROP
}
P
:
□
(
□
▷
P
-∗
P
)
⊢
P
.
Lemma
löb_wand_intuitionistically
`{
!
BiLöb
PROP
}
P
:
□
(
□
▷
P
-∗
P
)
⊢
P
.
Proof
.
Proof
.
rewrite
-
{
3
}(
intuitionistically_elim
P
)
-
(
löb
(
□
P
)
%
I
)
.
apply
impl_intro_l
.
rewrite
-
{
3
}(
intuitionistically_elim
P
)
-
(
löb
(
□
P
)
%
I
)
.
apply
impl_intro_l
.
...
@@ -123,7 +151,7 @@ Qed.
...
@@ -123,7 +151,7 @@ Qed.
(** The proof of the right-to-left direction relies on the BI being affine. It
(** The proof of the right-to-left direction relies on the BI being affine. It
is unclear how to generalize the lemma or proof to support non-affine BIs. *)
is unclear how to generalize the lemma or proof to support non-affine BIs. *)
Lemma
löb_alt
`{
!
BiAffine
PROP
}
:
BiLöb
PROP
↔
∀
P
,
□
(
▷
P
-∗
P
)
⊢
P
.
Lemma
löb_alt
_wand
`{
!
BiAffine
PROP
}
:
BiLöb
PROP
↔
∀
P
,
□
(
▷
P
-∗
P
)
⊢
P
.
Proof
.
Proof
.
split
;
intros
Hlöb
P
;
[
by
apply
löb_wand
|]
.
split
;
intros
Hlöb
P
;
[
by
apply
löb_wand
|]
.
rewrite
bi
.
impl_alt
.
apply
bi
.
exist_elim
=>
R
.
apply
impl_elim_r'
.
rewrite
bi
.
impl_alt
.
apply
bi
.
exist_elim
=>
R
.
apply
impl_elim_r'
.
...
...
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