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
596e8767
Commit
596e8767
authored
4 years ago
by
Ralf Jung
Committed by
Robbert Krebbers
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
some big_sepL lemmas
parent
a26cf167
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/bi/big_op.v
+32
-13
32 additions, 13 deletions
iris/bi/big_op.v
with
32 additions
and
13 deletions
iris/bi/big_op.v
+
32
−
13
View file @
596e8767
...
@@ -291,21 +291,30 @@ Section sep_list.
...
@@ -291,21 +291,30 @@ Section sep_list.
Proof
.
induction
1
;
simpl
;
apply
_
.
Qed
.
Proof
.
induction
1
;
simpl
;
apply
_
.
Qed
.
End
sep_list
.
End
sep_list
.
Section
sep_list_more
.
(* Some lemmas depend on the generalized versions of the above ones. *)
Context
{
A
:
Type
}
.
Implicit
Types
l
:
list
A
.
Implicit
Types
Φ
Ψ
:
nat
→
A
→
PROP
.
(* Some lemmas depend on the generalized versions of the above ones. *)
Lemma
big_sepL_zip_with
{
B
C
}
Φ
f
(
l1
:
list
B
)
(
l2
:
list
C
)
:
Lemma
big_sepL_sep_zip
{
A
B
}
(
Φ
:
nat
→
A
→
PROP
)
(
Ψ
:
nat
→
B
→
PROP
)
l1
l2
:
([
∗
list
]
k
↦
x
∈
zip_with
f
l1
l2
,
Φ
k
x
)
length
l1
=
length
l2
→
([
∗
list
]
k
↦
x
∈
l1
,
Φ
k
x
)
∗
([
∗
list
]
k
↦
x
∈
l2
,
Ψ
k
x
)
⊣⊢
([
∗
list
]
k
↦
xy
∈
zip
l1
l2
,
Φ
k
xy
.
1
∗
Ψ
k
xy
.
2
)
.
Proof
.
intros
Hlen
.
rewrite
big_sepL_sep
.
f_equiv
.
-
trans
([
∗
list
]
k
↦
x
∈
fst
<$>
zip
l1
l2
,
Φ
k
x
)
%
I
.
+
rewrite
fst_zip
;
auto
with
lia
.
+
rewrite
big_sepL_fmap
//.
-
trans
([
∗
list
]
k
↦
x
∈
snd
<$>
zip
l1
l2
,
Ψ
k
x
)
%
I
.
+
rewrite
snd_zip
;
auto
with
lia
.
+
rewrite
big_sepL_fmap
//.
Qed
.
Lemma
big_sepL_zip_with
{
A
B
C
}
(
Φ
:
nat
→
A
→
PROP
)
f
(
l1
:
list
B
)
(
l2
:
list
C
)
:
([
∗
list
]
k
↦
x
∈
zip_with
f
l1
l2
,
Φ
k
x
)
⊣⊢
([
∗
list
]
k
↦
x
∈
l1
,
if
l2
!!
k
is
Some
y
then
Φ
k
(
f
x
y
)
else
emp
)
.
⊣⊢
([
∗
list
]
k
↦
x
∈
l1
,
if
l2
!!
k
is
Some
y
then
Φ
k
(
f
x
y
)
else
emp
)
.
Proof
.
Proof
.
revert
Φ
l2
;
induction
l1
as
[|
x
l1
IH
]=>
Φ
[|
y
l2
]
//=.
revert
Φ
l2
;
induction
l1
as
[|
x
l1
IH
]=>
Φ
[|
y
l2
]
//=.
-
by
rewrite
big_sepL_emp
left_id
.
-
by
rewrite
big_sepL_emp
left_id
.
-
by
rewrite
IH
.
-
by
rewrite
IH
.
Qed
.
Qed
.
End
sep_list_more
.
Lemma
big_sepL2_alt
{
A
B
}
(
Φ
:
nat
→
A
→
B
→
PROP
)
l1
l2
:
Lemma
big_sepL2_alt
{
A
B
}
(
Φ
:
nat
→
A
→
B
→
PROP
)
l1
l2
:
([
∗
list
]
k
↦
y1
;
y2
∈
l1
;
l2
,
Φ
k
y1
y2
)
([
∗
list
]
k
↦
y1
;
y2
∈
l1
;
l2
,
Φ
k
y1
y2
)
...
@@ -619,6 +628,16 @@ Section sep_list2.
...
@@ -619,6 +628,16 @@ Section sep_list2.
by
rewrite
IH
.
by
rewrite
IH
.
Qed
.
Qed
.
Lemma
big_sepL2_merge
(
Φ
:
nat
→
A
→
PROP
)
(
Ψ
:
nat
→
B
→
PROP
)
(
l1
:
list
A
)
(
l2
:
list
B
):
length
l1
=
length
l2
→
([
∗
list
]
k
↦
y1
∈
l1
,
Φ
k
y1
)
-∗
([
∗
list
]
k
↦
y2
∈
l2
,
Ψ
k
y2
)
-∗
([
∗
list
]
k
↦
y1
;
y2
∈
l1
;
l2
,
Φ
k
y1
∗
Ψ
k
y2
)
.
Proof
.
intros
Hlen
.
apply
wand_intro_r
.
rewrite
big_sepL_sep_zip
//
big_sepL2_alt
pure_True
//
left_id
//.
Qed
.
Global
Instance
big_sepL2_nil_persistent
Φ
:
Global
Instance
big_sepL2_nil_persistent
Φ
:
Persistent
([
∗
list
]
k
↦
y1
;
y2
∈
[];
[],
Φ
k
y1
y2
)
.
Persistent
([
∗
list
]
k
↦
y1
;
y2
∈
[];
[],
Φ
k
y1
y2
)
.
Proof
.
simpl
;
apply
_
.
Qed
.
Proof
.
simpl
;
apply
_
.
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