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
Yixuan Chen
Iris
Commits
57d390bb
Commit
57d390bb
authored
2 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
add proofmode instances for le_upd
parent
ee671e0a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
iris/base_logic/lib/later_credits.v
+58
-6
58 additions, 6 deletions
iris/base_logic/lib/later_credits.v
with
58 additions
and
6 deletions
iris/base_logic/lib/later_credits.v
+
58
−
6
View file @
57d390bb
...
@@ -213,6 +213,14 @@ Module le_upd.
...
@@ -213,6 +213,14 @@ Module le_upd.
intros
Hent
.
iApply
le_upd_bind
.
intros
Hent
.
iApply
le_upd_bind
.
iIntros
"P"
;
iApply
le_upd_intro
;
by
iApply
Hent
.
iIntros
"P"
;
iApply
le_upd_intro
;
by
iApply
Hent
.
Qed
.
Qed
.
Global
Instance
le_upd_mono'
:
Proper
((
⊢
)
==>
(
⊢
))
le_upd
.
Proof
.
intros
P
Q
PQ
;
by
apply
le_upd_mono
.
Qed
.
Global
Instance
le_upd_flip_mono'
:
Proper
(
flip
(
⊢
)
==>
flip
(
⊢
))
le_upd
.
Proof
.
intros
P
Q
PQ
;
by
apply
le_upd_mono
.
Qed
.
Global
Instance
le_upd_equiv_proper
:
Proper
((
≡
)
==>
(
≡
))
le_upd
.
Proof
.
apply
ne_proper
.
apply
_
.
Qed
.
Lemma
le_upd_trans
P
:
(|
==£>
|
==£>
P
)
-∗
|
==£>
P
.
Lemma
le_upd_trans
P
:
(|
==£>
|
==£>
P
)
-∗
|
==£>
P
.
Proof
.
Proof
.
iIntros
"HP"
.
iApply
le_upd_bind
;
eauto
.
iIntros
"HP"
.
iApply
le_upd_bind
;
eauto
.
...
@@ -222,6 +230,8 @@ Module le_upd.
...
@@ -222,6 +230,8 @@ Module le_upd.
iIntros
"[Hupd R]"
.
iApply
(
le_upd_bind
with
"[R]"
);
last
done
.
iIntros
"[Hupd R]"
.
iApply
(
le_upd_bind
with
"[R]"
);
last
done
.
iIntros
"P"
.
iApply
le_upd_intro
.
by
iFrame
.
iIntros
"P"
.
iApply
le_upd_intro
.
by
iFrame
.
Qed
.
Qed
.
Lemma
le_upd_frame_l
P
R
:
R
∗
(|
==£>
P
)
-∗
|
==£>
R
∗
P
.
Proof
.
rewrite
comm
le_upd_frame_r
comm
//.
Qed
.
Lemma
le_upd_later
P
:
Lemma
le_upd_later
P
:
£
1
-∗
▷
P
-∗
|
==£>
P
.
£
1
-∗
▷
P
-∗
|
==£>
P
.
...
@@ -230,12 +240,11 @@ Module le_upd.
...
@@ -230,12 +240,11 @@ Module le_upd.
iNext
.
by
iApply
le_upd_intro
.
iNext
.
by
iApply
le_upd_intro
.
Qed
.
Qed
.
Global
Instance
le_upd_mono'
:
Proper
((
⊢
)
==>
(
⊢
))
le_upd
.
Lemma
except_0_le_upd
P
:
◇
(
le_upd
P
)
⊢
le_upd
(
◇
P
)
.
Proof
.
intros
P
Q
PQ
;
by
apply
le_upd_mono
.
Qed
.
Proof
.
Global
Instance
le_upd_flip_mono'
:
Proper
(
flip
(
⊢
)
==>
flip
(
⊢
))
le_upd
.
rewrite
/
bi_except_0
.
apply
or_elim
;
eauto
using
le_upd_mono
,
or_intro_r
.
Proof
.
intros
P
Q
PQ
;
by
apply
le_upd_mono
.
Qed
.
by
rewrite
-
le_upd_intro
-
or_intro_l
.
Global
Instance
le_upd_equiv_proper
:
Proper
((
≡
)
==>
(
≡
))
le_upd
.
Qed
.
Proof
.
apply
ne_proper
.
apply
_
.
Qed
.
(** A safety check that later-elimination updates can replace basic updates *)
(** A safety check that later-elimination updates can replace basic updates *)
(** We do not use this to build an instance, because it would conflict
(** We do not use this to build an instance, because it would conflict
...
@@ -291,8 +300,51 @@ Module le_upd.
...
@@ -291,8 +300,51 @@ Module le_upd.
iIntros
"Hupd"
.
iMod
"Hupd"
.
iModIntro
.
iMod
"Hupd"
.
iIntros
"Hupd"
.
iMod
"Hupd"
.
iModIntro
.
iMod
"Hupd"
.
iNext
.
iDestruct
"Hupd"
as
"[%m (_ & _ & $)]"
.
iNext
.
iDestruct
"Hupd"
as
"[%m (_ & _ & $)]"
.
Qed
.
Qed
.
(** Proof mode class instances internally needed for people defining their
[fupd] with [le_upd]. *)
Global
Instance
elim_bupd_le_upd
p
P
Q
:
ElimModal
True
p
false
(
bupd
P
)
P
(
le_upd
Q
)
(
le_upd
Q
)
%
I
.
Proof
.
rewrite
/
ElimModal
bi
.
intuitionistically_if_elim
//=.
rewrite
bupd_le_upd
.
iIntros
"_ [HP HPQ]"
.
iApply
(
le_upd_bind
with
"HPQ HP"
)
.
Qed
.
Global
Instance
from_assumption_le_upd
p
P
Q
:
FromAssumption
p
P
Q
→
KnownRFromAssumption
p
P
(
le_upd
Q
)
.
Proof
.
rewrite
/
KnownRFromAssumption
/
FromAssumption
=>
->
.
apply
le_upd_intro
.
Qed
.
Global
Instance
from_pure_le_upd
a
P
φ
:
FromPure
a
P
φ
→
FromPure
a
(
le_upd
P
)
φ
.
Proof
.
rewrite
/
FromPure
=>
<-.
apply
le_upd_intro
.
Qed
.
Global
Instance
is_except_0_le_upd
P
:
IsExcept0
P
→
IsExcept0
(
le_upd
P
)
.
Proof
.
rewrite
/
IsExcept0
=>
HP
.
by
rewrite
-
{
2
}
HP
-
(
except_0_idemp
P
)
-
except_0_le_upd
-
(
except_0_intro
P
)
.
Qed
.
Global
Instance
from_modal_le_upd
P
:
FromModal
True
modality_id
(
le_upd
P
)
(
le_upd
P
)
P
.
Proof
.
by
rewrite
/
FromModal
/=
-
le_upd_intro
.
Qed
.
Global
Instance
elim_modal_le_upd
p
P
Q
:
ElimModal
True
p
false
(
le_upd
P
)
P
(
le_upd
Q
)
(
le_upd
Q
)
.
Proof
.
by
rewrite
/
ElimModal
intuitionistically_if_elim
le_upd_frame_r
wand_elim_r
le_upd_trans
.
Qed
.
Global
Instance
frame_le_upd
p
R
P
Q
:
Frame
p
R
P
Q
→
Frame
p
R
(
le_upd
P
)
(
le_upd
Q
)
.
Proof
.
rewrite
/
Frame
=>
<-.
by
rewrite
le_upd_frame_l
.
Qed
.
End
le_upd
.
End
le_upd
.
(** You probably do NOT want to use this lemma; use [lc_soundness] if you want
to actually use [le_upd]! *)
Lemma
lc_alloc
`{
!
lcGpreS
Σ
}
n
:
Lemma
lc_alloc
`{
!
lcGpreS
Σ
}
n
:
⊢
|
==>
∃
_
:
lcGS
Σ
,
lc_supply
n
∗
£
n
.
⊢
|
==>
∃
_
:
lcGS
Σ
,
lc_supply
n
∗
£
n
.
Proof
.
Proof
.
...
...
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