Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
Iris
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Simon Spies
Iris
Commits
0d471f47
Commit
0d471f47
authored
Dec 20, 2016
by
Ralf Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
show lemma about big_sepL and zip_with
parent
1c9e8581
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
1 deletion
+29
-1
theories/base_logic/big_op.v
theories/base_logic/big_op.v
+28
-0
theories/heap_lang/lifting.v
theories/heap_lang/lifting.v
+1
-1
No files found.
theories/base_logic/big_op.v
View file @
0d471f47
...
...
@@ -312,6 +312,34 @@ Section list.
Proof
.
rewrite
/
big_opL
.
apply
_
.
Qed
.
End
list
.
Section
list2
.
Context
{
A
:
Type
}.
Implicit
Types
l
:
list
A
.
Implicit
Types
Φ
Ψ
:
nat
→
A
→
uPred
M
.
(* 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
)
:
([
∗
list
]
k
↦
x
∈
zip_with
f
l1
l2
,
Φ
k
x
)
⊣
⊢
([
∗
list
]
k
↦
x
∈
l1
,
∀
y
,
⌜
l2
!!
k
=
Some
y
⌝
→
Φ
k
(
f
x
y
)).
Proof
.
revert
Φ
l2
;
induction
l1
;
intros
Φ
l2
;
first
by
rewrite
/=
big_sepL_nil
.
destruct
l2
;
simpl
.
{
rewrite
big_sepL_nil
.
apply
(
anti_symm
_
)
;
last
exact
:
True_intro
.
(* TODO: Can this be done simpler? *)
rewrite
-(
big_sepL_mono
(
λ
_
_
,
True
%
I
)).
-
rewrite
big_sepL_forall
.
apply
forall_intro
=>
k
.
apply
forall_intro
=>
b
.
apply
impl_intro_r
.
apply
True_intro
.
-
intros
k
b
_
.
apply
forall_intro
=>
c
.
apply
impl_intro_l
.
rewrite
right_id
.
apply
pure_elim'
.
done
.
}
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
.
End
list2
.
(** ** Big ops over finite maps *)
Section
gmap
.
...
...
theories/heap_lang/lifting.v
View file @
0d471f47
...
...
@@ -64,7 +64,7 @@ Lemma wp_bind {E e} K Φ :
WP
e
@
E
{{
v
,
WP
fill
K
(
of_val
v
)
@
E
{{
Φ
}}
}}
⊢
WP
fill
K
e
@
E
{{
Φ
}}.
Proof
.
exact
:
wp_ectx_bind
.
Qed
.
Lemma
wp_bind
_ctx
i
{
E
e
}
Ki
Φ
:
Lemma
wp_bindi
{
E
e
}
Ki
Φ
:
WP
e
@
E
{{
v
,
WP
fill_item
Ki
(
of_val
v
)
@
E
{{
Φ
}}
}}
⊢
WP
fill_item
Ki
e
@
E
{{
Φ
}}.
Proof
.
exact
:
weakestpre
.
wp_bind
.
Qed
.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment