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
4fe7821b
Commit
4fe7821b
authored
4 years ago
by
Ralf Jung
Committed by
Robbert Krebbers
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
add snoc lemmas to big-list ops
parent
596e8767
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
iris/algebra/big_op.v
+3
-0
3 additions, 0 deletions
iris/algebra/big_op.v
iris/bi/big_op.v
+21
-0
21 additions, 0 deletions
iris/bi/big_op.v
with
24 additions
and
0 deletions
iris/algebra/big_op.v
+
3
−
0
View file @
4fe7821b
...
...
@@ -97,6 +97,9 @@ Section list.
revert
f
.
induction
l1
as
[|
x
l1
IH
]=>
f
/=
;
first
by
rewrite
left_id
.
by
rewrite
IH
assoc
.
Qed
.
Lemma
big_opL_snoc
f
l
x
:
([
^
o
list
]
k
↦
y
∈
l
++
[
x
],
f
k
y
)
≡
([
^
o
list
]
k
↦
y
∈
l
,
f
k
y
)
`
o
`
f
(
length
l
)
x
.
Proof
.
rewrite
big_opL_app
big_opL_singleton
Nat
.
add_0_r
//.
Qed
.
Lemma
big_opL_unit
l
:
([
^
o
list
]
k
↦
y
∈
l
,
monoid_unit
)
≡
(
monoid_unit
:
M
)
.
Proof
.
induction
l
;
rewrite
/=
?left_id
//.
Qed
.
...
...
This diff is collapsed.
Click to expand it.
iris/bi/big_op.v
+
21
−
0
View file @
4fe7821b
...
...
@@ -91,6 +91,9 @@ Section sep_list.
([
∗
list
]
k
↦
y
∈
l1
++
l2
,
Φ
k
y
)
⊣⊢
([
∗
list
]
k
↦
y
∈
l1
,
Φ
k
y
)
∗
([
∗
list
]
k
↦
y
∈
l2
,
Φ
(
length
l1
+
k
)
y
)
.
Proof
.
by
rewrite
big_opL_app
.
Qed
.
Lemma
big_sepL_snoc
Φ
l
x
:
([
∗
list
]
k
↦
y
∈
l
++
[
x
],
Φ
k
y
)
⊣⊢
([
∗
list
]
k
↦
y
∈
l
,
Φ
k
y
)
∗
Φ
(
length
l
)
x
.
Proof
.
by
rewrite
big_opL_snoc
.
Qed
.
Lemma
big_sepL_submseteq
`{
BiAffine
PROP
}
(
Φ
:
A
→
PROP
)
l1
l2
:
l1
⊆+
l2
→
([
∗
list
]
y
∈
l2
,
Φ
y
)
⊢
[
∗
list
]
y
∈
l1
,
Φ
y
.
...
...
@@ -423,6 +426,24 @@ Section sep_list2.
-
by
rewrite
-
assoc
IH
.
Qed
.
Lemma
big_sepL2_snoc
Φ
x1
x2
l1
l2
:
([
∗
list
]
k
↦
y1
;
y2
∈
(
l1
++
[
x1
]);(
l2
++
[
x2
]),
Φ
k
y1
y2
)
⊣⊢
([
∗
list
]
k
↦
y1
;
y2
∈
l1
;
l2
,
Φ
k
y1
y2
)
∗
Φ
(
length
l1
)
x1
x2
.
Proof
.
apply
(
anti_symm
(
⊢
));
last
first
.
-
apply
wand_elim_l'
.
rewrite
big_sepL2_app
.
apply
wand_mono
;
last
done
.
rewrite
big_sepL2_singleton
Nat
.
add_0_r
.
done
.
-
rewrite
big_sepL2_app_inv_l
.
apply
exist_elim
=>
l2l
.
apply
exist_elim
=>
l2r
.
apply
pure_elim_l
=>
Hl2
.
apply
(
pure_elim
(
length
[
x1
]
=
length
l2r
))
.
{
rewrite
!
big_sepL2_length
sep_elim_r
.
done
.
}
simpl
.
destruct
l2r
as
[?
l2r
|];
first
done
.
destruct
l2r
as
[|];
last
done
.
intros
_
.
apply
app_inj_tail
in
Hl2
as
[
->
->
]
.
apply
sep_mono_r
.
rewrite
big_sepL2_singleton
Nat
.
add_0_r
.
done
.
Qed
.
(** The lemmas [big_sepL2_mono], [big_sepL2_ne] and [big_sepL2_proper] are more
generic than the instances as they also give [li !! k = Some yi] in the premise. *)
Lemma
big_sepL2_mono
Φ
Ψ
l1
l2
:
...
...
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