Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iris-coq
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
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
Dan Frumin
iris-coq
Commits
b17456b1
Commit
b17456b1
authored
9 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
prove that bigops commute with later
parent
e22c4a28
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.v
+7
-0
7 additions, 0 deletions
algebra/upred.v
algebra/upred_big_op.v
+24
-7
24 additions, 7 deletions
algebra/upred_big_op.v
with
31 additions
and
7 deletions
algebra/upred.v
+
7
−
0
View file @
b17456b1
...
@@ -679,6 +679,8 @@ Proof.
...
@@ -679,6 +679,8 @@ Proof.
intros
x
n
?
HP
;
induction
n
as
[
|
n
IH
];
[
by
apply
HP
|
].
intros
x
n
?
HP
;
induction
n
as
[
|
n
IH
];
[
by
apply
HP
|
].
apply
HP
,
IH
,
uPred_weaken
with
x
(
S
n
);
eauto
using
cmra_validN_S
.
apply
HP
,
IH
,
uPred_weaken
with
x
(
S
n
);
eauto
using
cmra_validN_S
.
Qed
.
Qed
.
Lemma
later_True
'
:
True
⊑
(
▷
True
:
uPred
M
).
Proof
.
by
intros
x
[
|
n
].
Qed
.
Lemma
later_and
P
Q
:
(
▷
(
P
∧
Q
))
%
I
≡
(
▷
P
∧
▷
Q
)
%
I
.
Lemma
later_and
P
Q
:
(
▷
(
P
∧
Q
))
%
I
≡
(
▷
P
∧
▷
Q
)
%
I
.
Proof
.
by
intros
x
[
|
n
];
split
.
Qed
.
Proof
.
by
intros
x
[
|
n
];
split
.
Qed
.
Lemma
later_or
P
Q
:
(
▷
(
P
∨
Q
))
%
I
≡
(
▷
P
∨
▷
Q
)
%
I
.
Lemma
later_or
P
Q
:
(
▷
(
P
∨
Q
))
%
I
≡
(
▷
P
∨
▷
Q
)
%
I
.
...
@@ -705,6 +707,11 @@ Qed.
...
@@ -705,6 +707,11 @@ Qed.
(
*
Later
derived
*
)
(
*
Later
derived
*
)
Global
Instance
later_mono
'
:
Proper
((
⊑
)
==>
(
⊑
))
(
@
uPred_later
M
).
Global
Instance
later_mono
'
:
Proper
((
⊑
)
==>
(
⊑
))
(
@
uPred_later
M
).
Proof
.
intros
P
Q
;
apply
later_mono
.
Qed
.
Proof
.
intros
P
Q
;
apply
later_mono
.
Qed
.
Lemma
later_True
:
(
▷
True
:
uPred
M
)
%
I
≡
True
%
I
.
Proof
.
apply
(
anti_symm
(
⊑
));
first
done
.
apply
later_True
'
.
Qed
.
Lemma
later_impl
P
Q
:
▷
(
P
→
Q
)
⊑
(
▷
P
→
▷
Q
).
Lemma
later_impl
P
Q
:
▷
(
P
→
Q
)
⊑
(
▷
P
→
▷
Q
).
Proof
.
Proof
.
apply
impl_intro_l
;
rewrite
-
later_and
.
apply
impl_intro_l
;
rewrite
-
later_and
.
...
...
This diff is collapsed.
Click to expand it.
algebra/upred_big_op.v
+
24
−
7
View file @
b17456b1
From
algebra
Require
Export
upred
.
From
algebra
Require
Export
upred
.
From
prelude
Require
Import
gmap
fin_collections
.
From
prelude
Require
Import
gmap
fin_collections
.
Import
uPred
.
(
**
*
Big
ops
over
lists
*
)
(
**
*
Big
ops
over
lists
*
)
(
*
These
are
the
basic
building
blocks
for
other
big
ops
*
)
(
*
These
are
the
basic
building
blocks
for
other
big
ops
*
)
...
@@ -77,11 +78,11 @@ Proof. by induction Ps as [|?? IH]; rewrite /= ?left_id -?assoc ?IH. Qed.
...
@@ -77,11 +78,11 @@ Proof. by induction Ps as [|?? IH]; rewrite /= ?left_id -?assoc ?IH. Qed.
Lemma
big_and_contains
Ps
Qs
:
Qs
`contains
`
Ps
→
(
Π∧
Ps
)
%
I
⊑
(
Π∧
Qs
)
%
I
.
Lemma
big_and_contains
Ps
Qs
:
Qs
`contains
`
Ps
→
(
Π∧
Ps
)
%
I
⊑
(
Π∧
Qs
)
%
I
.
Proof
.
Proof
.
intros
[
Ps
'
->
]
%
contains_Permutation
.
by
rewrite
big_and_app
uPred
.
and_elim_l
.
intros
[
Ps
'
->
]
%
contains_Permutation
.
by
rewrite
big_and_app
and_elim_l
.
Qed
.
Qed
.
Lemma
big_sep_contains
Ps
Qs
:
Qs
`contains
`
Ps
→
(
Π★
Ps
)
%
I
⊑
(
Π★
Qs
)
%
I
.
Lemma
big_sep_contains
Ps
Qs
:
Qs
`contains
`
Ps
→
(
Π★
Ps
)
%
I
⊑
(
Π★
Qs
)
%
I
.
Proof
.
Proof
.
intros
[
Ps
'
->
]
%
contains_Permutation
.
by
rewrite
big_sep_app
uPred
.
sep_elim_l
.
intros
[
Ps
'
->
]
%
contains_Permutation
.
by
rewrite
big_sep_app
sep_elim_l
.
Qed
.
Qed
.
Lemma
big_sep_and
Ps
:
(
Π★
Ps
)
⊑
(
Π∧
Ps
).
Lemma
big_sep_and
Ps
:
(
Π★
Ps
)
⊑
(
Π∧
Ps
).
...
@@ -138,13 +139,21 @@ Section gmap.
...
@@ -138,13 +139,21 @@ Section gmap.
by
rewrite
big_sepM_empty
right_id
.
by
rewrite
big_sepM_empty
right_id
.
Qed
.
Qed
.
Lemma
big_sepM_sep
P
Q
m
:
Lemma
big_sepM_sep
M
P
Q
m
:
(
Π★
{
map
m
}
(
λ
i
x
,
P
i
x
★
Q
i
x
))
%
I
≡
(
Π★
{
map
m
}
P
★
Π★
{
map
m
}
Q
)
%
I
.
(
Π★
{
map
m
}
(
λ
i
x
,
P
i
x
★
Q
i
x
))
%
I
≡
(
Π★
{
map
m
}
P
★
Π★
{
map
m
}
Q
)
%
I
.
Proof
.
Proof
.
rewrite
/
uPred_big_sepM
.
induction
(
map_to_list
m
);
simpl
;
rewrite
/
uPred_big_sepM
.
induction
(
map_to_list
m
);
simpl
;
first
by
rewrite
right_id
.
first
by
rewrite
right_id
.
destruct
a
.
rewrite
IHl
/=
-!
assoc
.
apply
uPred
.
sep_proper
;
first
done
.
destruct
a
.
rewrite
IHl
/=
-!
assoc
.
apply
sep_proper
;
first
done
.
rewrite
!
assoc
[(
_
★
Q
_
_
)
%
I
]
comm
-!
assoc
.
apply
uPred
.
sep_proper
;
done
.
rewrite
!
assoc
[(
_
★
Q
_
_
)
%
I
]
comm
-!
assoc
.
apply
sep_proper
;
done
.
Qed
.
Lemma
big_sepM_later
P
m
:
(
Π★
{
map
m
}
(
λ
i
x
,
▷
P
i
x
))
%
I
≡
(
▷
Π★
{
map
m
}
P
)
%
I
.
Proof
.
rewrite
/
uPred_big_sepM
.
induction
(
map_to_list
m
);
simpl
;
first
by
rewrite
later_True
.
destruct
a
.
by
rewrite
IHl
later_sep
.
Qed
.
Qed
.
End
gmap
.
End
gmap
.
...
@@ -193,13 +202,21 @@ Section gset.
...
@@ -193,13 +202,21 @@ Section gset.
Lemma
big_sepS_singleton
P
x
:
(
Π★
{
set
{
[
x
]
}}
P
)
%
I
≡
(
P
x
)
%
I
.
Lemma
big_sepS_singleton
P
x
:
(
Π★
{
set
{
[
x
]
}}
P
)
%
I
≡
(
P
x
)
%
I
.
Proof
.
intros
.
by
rewrite
/
uPred_big_sepS
elements_singleton
/=
right_id
.
Qed
.
Proof
.
intros
.
by
rewrite
/
uPred_big_sepS
elements_singleton
/=
right_id
.
Qed
.
Lemma
big_sepS_sep
P
Q
X
:
Lemma
big_sepS_sep
S
P
Q
X
:
(
Π★
{
set
X
}
(
λ
x
,
P
x
★
Q
x
))
%
I
≡
(
Π★
{
set
X
}
P
★
Π★
{
set
X
}
Q
)
%
I
.
(
Π★
{
set
X
}
(
λ
x
,
P
x
★
Q
x
))
%
I
≡
(
Π★
{
set
X
}
P
★
Π★
{
set
X
}
Q
)
%
I
.
Proof
.
Proof
.
rewrite
/
uPred_big_sepS
.
induction
(
elements
X
);
simpl
;
rewrite
/
uPred_big_sepS
.
induction
(
elements
X
);
simpl
;
first
by
rewrite
right_id
.
first
by
rewrite
right_id
.
rewrite
IHl
-!
assoc
.
apply
uPred
.
sep_proper
;
first
done
.
rewrite
IHl
-!
assoc
.
apply
uPred
.
sep_proper
;
first
done
.
rewrite
!
assoc
[(
_
★
Q
a
)
%
I
]
comm
-!
assoc
.
apply
uPred
.
sep_proper
;
done
.
rewrite
!
assoc
[(
_
★
Q
a
)
%
I
]
comm
-!
assoc
.
apply
sep_proper
;
done
.
Qed
.
Lemma
big_sepS_later
P
X
:
(
Π★
{
set
X
}
(
λ
x
,
▷
P
x
))
%
I
≡
(
▷
Π★
{
set
X
}
P
)
%
I
.
Proof
.
rewrite
/
uPred_big_sepS
.
induction
(
elements
X
);
simpl
;
first
by
rewrite
later_True
.
by
rewrite
IHl
later_sep
.
Qed
.
Qed
.
End
gset
.
End
gset
.
...
...
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