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
Simcha van Collem
Iris
Commits
f972b5a9
Commit
f972b5a9
authored
8 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Properties for uPred_big_opM and fn_insert.
parent
5eb59e13
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
algebra/upred_big_op.v
+21
-5
21 additions, 5 deletions
algebra/upred_big_op.v
heap_lang/lib/barrier/proof.v
+2
-2
2 additions, 2 deletions
heap_lang/lib/barrier/proof.v
with
23 additions
and
7 deletions
algebra/upred_big_op.v
+
21
−
5
View file @
f972b5a9
...
@@ -112,7 +112,7 @@ Section gmap.
...
@@ -112,7 +112,7 @@ Section gmap.
Implicit
Types
Φ
Ψ
:
K
→
A
→
uPred
M
.
Implicit
Types
Φ
Ψ
:
K
→
A
→
uPred
M
.
Lemma
big_sepM_mono
Φ
Ψ
m1
m2
:
Lemma
big_sepM_mono
Φ
Ψ
m1
m2
:
m2
⊆
m1
→
(
∀
x
k
,
m2
!!
k
=
Some
x
→
Φ
k
x
⊢
Ψ
k
x
)
→
m2
⊆
m1
→
(
∀
k
x
,
m2
!!
k
=
Some
x
→
Φ
k
x
⊢
Ψ
k
x
)
→
([
★
map
]
k
↦
x
∈
m1
,
Φ
k
x
)
⊢
([
★
map
]
k
↦
x
∈
m2
,
Ψ
k
x
)
.
([
★
map
]
k
↦
x
∈
m1
,
Φ
k
x
)
⊢
([
★
map
]
k
↦
x
∈
m2
,
Ψ
k
x
)
.
Proof
.
Proof
.
intros
HX
HΦ
.
trans
([
★
map
]
k
↦
x
∈
m2
,
Φ
k
x
)
%
I
.
intros
HX
HΦ
.
trans
([
★
map
]
k
↦
x
∈
m2
,
Φ
k
x
)
%
I
.
...
@@ -121,7 +121,7 @@ Section gmap.
...
@@ -121,7 +121,7 @@ Section gmap.
apply
Forall_forall
=>
-
[
i
x
]
?
/=.
by
apply
HΦ
,
elem_of_map_to_list
.
apply
Forall_forall
=>
-
[
i
x
]
?
/=.
by
apply
HΦ
,
elem_of_map_to_list
.
Qed
.
Qed
.
Lemma
big_sepM_proper
Φ
Ψ
m1
m2
:
Lemma
big_sepM_proper
Φ
Ψ
m1
m2
:
m1
≡
m2
→
(
∀
x
k
,
m1
!!
k
=
Some
x
→
m2
!!
k
=
Some
x
→
Φ
k
x
⊣⊢
Ψ
k
x
)
→
m1
≡
m2
→
(
∀
k
x
,
m1
!!
k
=
Some
x
→
m2
!!
k
=
Some
x
→
Φ
k
x
⊣⊢
Ψ
k
x
)
→
([
★
map
]
k
↦
x
∈
m1
,
Φ
k
x
)
⊣⊢
([
★
map
]
k
↦
x
∈
m2
,
Ψ
k
x
)
.
([
★
map
]
k
↦
x
∈
m1
,
Φ
k
x
)
⊣⊢
([
★
map
]
k
↦
x
∈
m2
,
Ψ
k
x
)
.
Proof
.
Proof
.
(* FIXME: Coq bug since 8.5pl1. Without the @ in [@lookup_weaken] it gives
(* FIXME: Coq bug since 8.5pl1. Without the @ in [@lookup_weaken] it gives
...
@@ -149,14 +149,30 @@ Section gmap.
...
@@ -149,14 +149,30 @@ Section gmap.
Lemma
big_sepM_empty
Φ
:
([
★
map
]
k
↦
x
∈
∅
,
Φ
k
x
)
⊣⊢
True
.
Lemma
big_sepM_empty
Φ
:
([
★
map
]
k
↦
x
∈
∅
,
Φ
k
x
)
⊣⊢
True
.
Proof
.
by
rewrite
/
uPred_big_sepM
map_to_list_empty
.
Qed
.
Proof
.
by
rewrite
/
uPred_big_sepM
map_to_list_empty
.
Qed
.
Lemma
big_sepM_insert
Φ
(
m
:
gmap
K
A
)
i
x
:
Lemma
big_sepM_insert
Φ
(
m
:
gmap
K
A
)
i
x
:
m
!!
i
=
None
→
m
!!
i
=
None
→
([
★
map
]
k
↦
y
∈
<
[
i
:=
x
]
>
m
,
Φ
k
y
)
⊣⊢
(
Φ
i
x
★
[
★
map
]
k
↦
y
∈
m
,
Φ
k
y
)
.
([
★
map
]
k
↦
y
∈
<
[
i
:=
x
]
>
m
,
Φ
k
y
)
⊣⊢
(
Φ
i
x
★
[
★
map
]
k
↦
y
∈
m
,
Φ
k
y
)
.
Proof
.
intros
?;
by
rewrite
/
uPred_big_sepM
map_to_list_insert
.
Qed
.
Proof
.
intros
?;
by
rewrite
/
uPred_big_sepM
map_to_list_insert
.
Qed
.
Lemma
big_sepM_fn_insert
(
Ψ
:
K
→
A
→
uPred
M
→
uPred
M
)
(
Φ
:
K
→
uPred
M
)
m
i
x
P
:
m
!!
i
=
None
→
([
★
map
]
k
↦
y
∈
<
[
i
:=
x
]
>
m
,
Ψ
k
y
(
<
[
i
:=
P
]
>
Φ
k
))
⊣⊢
(
Ψ
i
x
P
★
[
★
map
]
k
↦
y
∈
m
,
Ψ
k
y
(
Φ
k
))
.
Proof
.
intros
.
rewrite
big_sepM_insert
//
fn_lookup_insert
.
apply
sep_proper
,
big_sepM_proper
;
auto
=>
k
y
??
.
by
rewrite
fn_lookup_insert_ne
;
last
set_solver
.
Qed
.
Lemma
big_sepM_fn_insert'
(
Φ
:
K
→
uPred
M
)
m
i
x
P
:
m
!!
i
=
None
→
([
★
map
]
k
↦
y
∈
<
[
i
:=
x
]
>
m
,
<
[
i
:=
P
]
>
Φ
k
)
⊣⊢
(
P
★
[
★
map
]
k
↦
y
∈
m
,
Φ
k
)
.
Proof
.
apply
(
big_sepM_fn_insert
(
λ
_
_,
id
))
.
Qed
.
Lemma
big_sepM_delete
Φ
(
m
:
gmap
K
A
)
i
x
:
Lemma
big_sepM_delete
Φ
(
m
:
gmap
K
A
)
i
x
:
m
!!
i
=
Some
x
→
m
!!
i
=
Some
x
→
([
★
map
]
k
↦
y
∈
m
,
Φ
k
y
)
⊣⊢
(
Φ
i
x
★
[
★
map
]
k
↦
y
∈
delete
i
m
,
Φ
k
y
)
.
([
★
map
]
k
↦
y
∈
m
,
Φ
k
y
)
⊣⊢
(
Φ
i
x
★
[
★
map
]
k
↦
y
∈
delete
i
m
,
Φ
k
y
)
.
Proof
.
intros
.
by
rewrite
-
big_sepM_insert
?lookup_delete
//
insert_delete
.
Qed
.
Proof
.
intros
.
by
rewrite
-
big_sepM_insert
?lookup_delete
//
insert_delete
.
Qed
.
Lemma
big_sepM_singleton
Φ
i
x
:
([
★
map
]
k
↦
y
∈
{[
i
:=
x
]},
Φ
k
y
)
⊣⊢
Φ
i
x
.
Lemma
big_sepM_singleton
Φ
i
x
:
([
★
map
]
k
↦
y
∈
{[
i
:=
x
]},
Φ
k
y
)
⊣⊢
Φ
i
x
.
Proof
.
Proof
.
rewrite
-
insert_empty
big_sepM_insert
/=
;
last
auto
using
lookup_empty
.
rewrite
-
insert_empty
big_sepM_insert
/=
;
last
auto
using
lookup_empty
.
...
@@ -222,7 +238,7 @@ Section gset.
...
@@ -222,7 +238,7 @@ Section gset.
Lemma
big_sepS_insert
Φ
X
x
:
Lemma
big_sepS_insert
Φ
X
x
:
x
∉
X
→
([
★
set
]
y
∈
{[
x
]}
∪
X
,
Φ
y
)
⊣⊢
(
Φ
x
★
[
★
set
]
y
∈
X
,
Φ
y
)
.
x
∉
X
→
([
★
set
]
y
∈
{[
x
]}
∪
X
,
Φ
y
)
⊣⊢
(
Φ
x
★
[
★
set
]
y
∈
X
,
Φ
y
)
.
Proof
.
intros
.
by
rewrite
/
uPred_big_sepS
elements_union_singleton
.
Qed
.
Proof
.
intros
.
by
rewrite
/
uPred_big_sepS
elements_union_singleton
.
Qed
.
Lemma
big_sepS_insert
'
(
Ψ
:
A
→
uPred
M
→
uPred
M
)
Φ
X
x
P
:
Lemma
big_sepS_
fn_
insert
(
Ψ
:
A
→
uPred
M
→
uPred
M
)
Φ
X
x
P
:
x
∉
X
→
x
∉
X
→
([
★
set
]
y
∈
{[
x
]}
∪
X
,
Ψ
y
(
<
[
x
:=
P
]
>
Φ
y
))
([
★
set
]
y
∈
{[
x
]}
∪
X
,
Ψ
y
(
<
[
x
:=
P
]
>
Φ
y
))
⊣⊢
(
Ψ
x
P
★
[
★
set
]
y
∈
X
,
Ψ
y
(
Φ
y
))
.
⊣⊢
(
Ψ
x
P
★
[
★
set
]
y
∈
X
,
Ψ
y
(
Φ
y
))
.
...
@@ -231,9 +247,9 @@ Section gset.
...
@@ -231,9 +247,9 @@ Section gset.
apply
sep_proper
,
big_sepS_proper
;
auto
=>
y
??
.
apply
sep_proper
,
big_sepS_proper
;
auto
=>
y
??
.
by
rewrite
fn_lookup_insert_ne
;
last
set_solver
.
by
rewrite
fn_lookup_insert_ne
;
last
set_solver
.
Qed
.
Qed
.
Lemma
big_sepS_insert'
'
Φ
X
x
P
:
Lemma
big_sepS_
fn_
insert'
Φ
X
x
P
:
x
∉
X
→
([
★
set
]
y
∈
{[
x
]}
∪
X
,
<
[
x
:=
P
]
>
Φ
y
)
⊣⊢
(
P
★
[
★
set
]
y
∈
X
,
Φ
y
)
.
x
∉
X
→
([
★
set
]
y
∈
{[
x
]}
∪
X
,
<
[
x
:=
P
]
>
Φ
y
)
⊣⊢
(
P
★
[
★
set
]
y
∈
X
,
Φ
y
)
.
Proof
.
apply
(
big_sepS_insert
'
(
λ
y
,
id
))
.
Qed
.
Proof
.
apply
(
big_sepS_
fn_
insert
(
λ
y
,
id
))
.
Qed
.
Lemma
big_sepS_delete
Φ
X
x
:
Lemma
big_sepS_delete
Φ
X
x
:
x
∈
X
→
([
★
set
]
y
∈
X
,
Φ
y
)
⊣⊢
(
Φ
x
★
[
★
set
]
y
∈
X
∖
{[
x
]},
Φ
y
)
.
x
∈
X
→
([
★
set
]
y
∈
X
,
Φ
y
)
⊣⊢
(
Φ
x
★
[
★
set
]
y
∈
X
∖
{[
x
]},
Φ
y
)
.
...
...
This diff is collapsed.
Click to expand it.
heap_lang/lib/barrier/proof.v
+
2
−
2
View file @
f972b5a9
...
@@ -88,9 +88,9 @@ Proof.
...
@@ -88,9 +88,9 @@ Proof.
iNext
.
iRewrite
"Heq"
in
"HQR"
.
iIntros
"HP"
.
iSpecialize
(
"HPΨ"
with
"HP"
)
.
iNext
.
iRewrite
"Heq"
in
"HQR"
.
iIntros
"HP"
.
iSpecialize
(
"HPΨ"
with
"HP"
)
.
iDestruct
(
big_sepS_delete
_
_
i
with
"HPΨ"
)
as
"[HΨ HPΨ]"
;
first
done
.
iDestruct
(
big_sepS_delete
_
_
i
with
"HPΨ"
)
as
"[HΨ HPΨ]"
;
first
done
.
iDestruct
(
"HQR"
with
"HΨ"
)
as
"[HR1 HR2]"
.
iDestruct
(
"HQR"
with
"HΨ"
)
as
"[HR1 HR2]"
.
rewrite
-
assoc_L
!
big_sepS_insert'
'
;
[|
abstract
set_solver
..]
.
rewrite
-
assoc_L
!
big_sepS_
fn_
insert'
;
[|
abstract
set_solver
..]
.
by
iFrame
"HR1 HR2"
.
by
iFrame
"HR1 HR2"
.
-
rewrite
-
assoc_L
!
big_sepS_insert
'
;
[|
abstract
set_solver
..]
.
-
rewrite
-
assoc_L
!
big_sepS_
fn_
insert
;
[|
abstract
set_solver
..]
.
by
repeat
iSplit
.
by
repeat
iSplit
.
Qed
.
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