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
Rice Wine
Iris
Commits
260b7508
Commit
260b7508
authored
8 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Allow iMod to work under wands and foralls.
parent
fc30ca08
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
program_logic/fancy_updates.v
+5
-11
5 additions, 11 deletions
program_logic/fancy_updates.v
program_logic/invariants.v
+2
-2
2 additions, 2 deletions
program_logic/invariants.v
proofmode/class_instances.v
+12
-0
12 additions, 0 deletions
proofmode/class_instances.v
with
19 additions
and
13 deletions
program_logic/fancy_updates.v
+
5
−
11
View file @
260b7508
...
@@ -51,21 +51,15 @@ Proof. apply ne_proper, _. Qed.
...
@@ -51,21 +51,15 @@ Proof. apply ne_proper, _. Qed.
Lemma
fupd_intro_mask
E1
E2
P
:
E2
⊆
E1
→
P
⊢
|
=
{
E1
,
E2
}=>
|
=
{
E2
,
E1
}=>
P
.
Lemma
fupd_intro_mask
E1
E2
P
:
E2
⊆
E1
→
P
⊢
|
=
{
E1
,
E2
}=>
|
=
{
E2
,
E1
}=>
P
.
Proof
.
Proof
.
intros
(
E1''
&
->
&
?)
%
subseteq_disjoint_union_L
.
intros
(
E1''
&
->
&
?)
%
subseteq_disjoint_union_L
.
rewrite
fupd_eq
/
fupd_def
ownE_op
//.
iIntros
"H ($ & $ & HE) !>"
.
rewrite
fupd_eq
/
fupd_def
ownE_op
//.
iApply
except_0_intro
.
iIntros
"[$ $] !>"
.
iApply
except_0_intro
.
by
iIntros
"$ ($ & $ & HE) !> !> [$ $] !> !>"
.
by
iFrame
.
Qed
.
Qed
.
Lemma
except_0_fupd
E1
E2
P
:
◇
(|
=
{
E1
,
E2
}=>
P
)
=
{
E1
,
E2
}
=★
P
.
Lemma
except_0_fupd
E1
E2
P
:
◇
(|
=
{
E1
,
E2
}=>
P
)
=
{
E1
,
E2
}
=★
P
.
Proof
.
Proof
.
rewrite
fupd_eq
.
iIntros
">H [Hw HE]"
.
iApply
"H"
;
by
iFrame
.
Qed
.
rewrite
fupd_eq
.
iIntros
"H [Hw HE]"
.
iMod
"H"
.
iApply
"H"
;
by
iFrame
.
Qed
.
Lemma
bupd_fupd
E
P
:
(|
==>
P
)
=
{
E
}
=★
P
.
Lemma
bupd_fupd
E
P
:
(|
==>
P
)
=
{
E
}
=★
P
.
Proof
.
Proof
.
rewrite
fupd_eq
/
fupd_def
.
by
iIntros
">? [$ $] !> !>"
.
Qed
.
rewrite
fupd_eq
/
fupd_def
.
iIntros
"H [$ $]"
;
iMod
"H"
.
iModIntro
.
by
iApply
except_0_intro
.
Qed
.
Lemma
fupd_mono
E1
E2
P
Q
:
(
P
⊢
Q
)
→
(|
=
{
E1
,
E2
}=>
P
)
=
{
E1
,
E2
}
=★
Q
.
Lemma
fupd_mono
E1
E2
P
Q
:
(
P
⊢
Q
)
→
(|
=
{
E1
,
E2
}=>
P
)
=
{
E1
,
E2
}
=★
Q
.
Proof
.
Proof
.
...
@@ -85,7 +79,7 @@ Proof.
...
@@ -85,7 +79,7 @@ Proof.
intros
.
rewrite
fupd_eq
/
fupd_def
ownE_op
//.
iIntros
"Hvs (Hw & HE1 &HEf)"
.
intros
.
rewrite
fupd_eq
/
fupd_def
ownE_op
//.
iIntros
"Hvs (Hw & HE1 &HEf)"
.
iMod
(
"Hvs"
with
"[Hw HE1]"
)
as
">($ & HE2 & HP)"
;
first
by
iFrame
.
iMod
(
"Hvs"
with
"[Hw HE1]"
)
as
">($ & HE2 & HP)"
;
first
by
iFrame
.
iDestruct
(
ownE_op'
with
"[HE2 HEf]"
)
as
"[? $]"
;
first
by
iFrame
.
iDestruct
(
ownE_op'
with
"[HE2 HEf]"
)
as
"[? $]"
;
first
by
iFrame
.
i
Mod
Intro
;
iApply
except_0_intro
.
by
iApply
"HP"
.
iIntro
s
"!> !>"
.
by
iApply
"HP"
.
Qed
.
Qed
.
Lemma
fupd_frame_r
E1
E2
P
Q
:
(|
=
{
E1
,
E2
}=>
P
)
★
Q
=
{
E1
,
E2
}
=★
P
★
Q
.
Lemma
fupd_frame_r
E1
E2
P
Q
:
(|
=
{
E1
,
E2
}=>
P
)
★
Q
=
{
E1
,
E2
}
=★
P
★
Q
.
...
...
This diff is collapsed.
Click to expand it.
program_logic/invariants.v
+
2
−
2
View file @
260b7508
...
@@ -49,8 +49,8 @@ Proof.
...
@@ -49,8 +49,8 @@ Proof.
iDestruct
"Hi"
as
%
?
%
elem_of_subseteq_singleton
.
iDestruct
"Hi"
as
%
?
%
elem_of_subseteq_singleton
.
rewrite
{
1
4
}(
union_difference_L
(
nclose
N
)
E
)
//
ownE_op
;
last
set_solver
.
rewrite
{
1
4
}(
union_difference_L
(
nclose
N
)
E
)
//
ownE_op
;
last
set_solver
.
rewrite
{
1
5
}(
union_difference_L
{[
i
]}
(
nclose
N
))
//
ownE_op
;
last
set_solver
.
rewrite
{
1
5
}(
union_difference_L
{[
i
]}
(
nclose
N
))
//
ownE_op
;
last
set_solver
.
iIntros
"(Hw & [HE $] & $)
"
;
iModIntro
;
iApply
except_0_intro
.
iIntros
"(Hw & [HE $] & $)
!> !>"
.
iDestruct
(
ownI_open
i
P
with
"[Hw HE]"
)
as
"($ & $ & HD)"
;
first
by
iFrame
.
iDestruct
(
ownI_open
i
P
with
"[
$
Hw
$
HE
$HiP
]"
)
as
"($ & $ & HD)"
.
iIntros
"HP [Hw $] !> !>"
.
iApply
ownI_close
;
by
iFrame
.
iIntros
"HP [Hw $] !> !>"
.
iApply
ownI_close
;
by
iFrame
.
Qed
.
Qed
.
...
...
This diff is collapsed.
Click to expand it.
proofmode/class_instances.v
+
12
−
0
View file @
260b7508
...
@@ -366,6 +366,18 @@ Global Instance into_modal_except_0 P : IntoModal P (◇ P).
...
@@ -366,6 +366,18 @@ Global Instance into_modal_except_0 P : IntoModal P (◇ P).
Proof
.
apply
except_0_intro
.
Qed
.
Proof
.
apply
except_0_intro
.
Qed
.
(* ElimModal *)
(* ElimModal *)
Global
Instance
elim_modal_wand
P
P'
Q
Q'
R
:
ElimModal
P
P'
Q
Q'
→
ElimModal
P
P'
(
R
-★
Q
)
(
R
-★
Q'
)
.
Proof
.
rewrite
/
ElimModal
=>
H
.
apply
wand_intro_r
.
by
rewrite
wand_curry
-
assoc
(
comm
_
P'
)
-
wand_curry
wand_elim_l
.
Qed
.
Global
Instance
forall_modal_wand
{
A
}
P
P'
(
Φ
Ψ
:
A
→
uPred
M
)
:
(
∀
x
,
ElimModal
P
P'
(
Φ
x
)
(
Ψ
x
))
→
ElimModal
P
P'
(
∀
x
,
Φ
x
)
(
∀
x
,
Ψ
x
)
.
Proof
.
rewrite
/
ElimModal
=>
H
.
apply
forall_intro
=>
a
.
by
rewrite
(
forall_elim
a
)
.
Qed
.
Global
Instance
elim_modal_bupd
P
Q
:
ElimModal
(|
==>
P
)
P
(|
==>
Q
)
(|
==>
Q
)
.
Global
Instance
elim_modal_bupd
P
Q
:
ElimModal
(|
==>
P
)
P
(|
==>
Q
)
(|
==>
Q
)
.
Proof
.
by
rewrite
/
ElimModal
bupd_frame_r
wand_elim_r
bupd_trans
.
Qed
.
Proof
.
by
rewrite
/
ElimModal
bupd_frame_r
wand_elim_r
bupd_trans
.
Qed
.
...
...
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