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
3bdeb62f
Commit
3bdeb62f
authored
8 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Shorten a lemma.
parent
7047a278
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
theories/base_logic/big_op.v
+11
-18
11 additions, 18 deletions
theories/base_logic/big_op.v
with
11 additions
and
18 deletions
theories/base_logic/big_op.v
+
11
−
18
View file @
3bdeb62f
...
@@ -320,25 +320,18 @@ Section list2.
...
@@ -320,25 +320,18 @@ Section list2.
(* Some lemmas depend on the generalized versions of the above ones. *)
(* 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_zip_with
{
B
C
}
Φ
f
(
l1
:
list
B
)
(
l2
:
list
C
)
:
([
∗
list
]
k
↦
x
∈
zip_with
f
l1
l2
,
Φ
k
x
)
⊣⊢
([
∗
list
]
k
↦
x
∈
l1
,
∀
y
,
⌜
l2
!!
k
=
Some
y
⌝
→
Φ
k
(
f
x
y
))
.
([
∗
list
]
k
↦
x
∈
zip_with
f
l1
l2
,
Φ
k
x
)
⊣⊢
([
∗
list
]
k
↦
x
∈
l1
,
∀
y
,
⌜
l2
!!
k
=
Some
y
⌝
→
Φ
k
(
f
x
y
))
.
Proof
.
Proof
.
revert
Φ
l2
;
induction
l1
;
intros
Φ
l2
;
first
by
rewrite
/=
big_sepL_nil
.
revert
Φ
l2
;
induction
l1
as
[|
x
l1
IH
]=>
Φ
[|
y
l2
]
//=.
destruct
l2
;
simpl
.
-
rewrite
big_sepL_nil
.
apply
(
anti_symm
_),
True_intro
.
{
rewrite
big_sepL_nil
.
apply
(
anti_symm
_);
last
exact
:
True_intro
.
trans
([
∗
list
]
_
↦_
∈
x
::
l1
,
True
:
uPred
M
)
%
I
.
(* TODO: Can this be done simpler? *)
+
rewrite
big_sepL_forall
.
auto
using
forall_intro
,
impl_intro_l
,
True_intro
.
rewrite
-
(
big_sepL_mono
(
λ
_
_,
True
%
I
))
.
+
apply
big_sepL_mono
=>
k
y
_
.
apply
forall_intro
=>
z
.
-
rewrite
big_sepL_forall
.
apply
forall_intro
=>
k
.
apply
forall_intro
=>
b
.
by
apply
impl_intro_l
,
pure_elim_l
.
apply
impl_intro_r
.
apply
True_intro
.
-
rewrite
!
big_sepL_cons
IH
.
apply
sep_proper
=>
//.
apply
(
anti_symm
_)
.
-
intros
k
b
_
.
apply
forall_intro
=>
c
.
apply
impl_intro_l
.
rewrite
right_id
.
+
apply
forall_intro
=>
z
/=.
by
apply
impl_intro_r
,
pure_elim_r
=>
-
[
->
]
.
apply
pure_elim'
.
done
.
+
rewrite
(
forall_elim
y
)
/=.
by
eapply
impl_elim
,
pure_intro
.
}
rewrite
!
big_sepL_cons
.
apply
sep_proper
;
last
exact
:
IHl1
.
apply
(
anti_symm
_)
.
-
apply
forall_intro
=>
c'
.
simpl
.
apply
impl_intro_r
.
eapply
pure_elim
;
first
exact
:
and_elim_r
.
intros
[
=->
]
.
apply
and_elim_l
.
-
rewrite
(
forall_elim
c
)
.
simpl
.
eapply
impl_elim
;
first
done
.
apply
pure_intro
.
done
.
Qed
.
Qed
.
End
list2
.
End
list2
.
...
...
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