Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Iris
stdpp
Commits
d21800ed
Commit
d21800ed
authored
May 04, 2014
by
Robbert Krebbers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Commutativity of altering bytes in memory trees.
parent
83f05bf1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
15 deletions
+11
-15
theories/list.v
theories/list.v
+11
-15
No files found.
theories/list.v
View file @
d21800ed
...
@@ -1054,7 +1054,6 @@ Proof.
...
@@ -1054,7 +1054,6 @@ Proof.
end
;
rewrite
<-
?take_drop_commute
,
?drop_drop
,
?take_take
,
?Min
.
min_l
by
lia
;
end
;
rewrite
<-
?take_drop_commute
,
?drop_drop
,
?take_take
,
?Min
.
min_l
by
lia
;
auto
with
lia
.
auto
with
lia
.
Qed
.
Qed
.
Lemma
sublist_alter_length
f
i
n
l
:
Lemma
sublist_alter_length
f
i
n
l
:
(
∀
k
,
sublist_lookup
i
n
l
=
Some
k
→
length
(
f
k
)
=
n
)
→
(
∀
k
,
sublist_lookup
i
n
l
=
Some
k
→
length
(
f
k
)
=
n
)
→
i
+
n
≤
length
l
→
length
(
sublist_alter
f
i
n
l
)
=
length
l
.
i
+
n
≤
length
l
→
length
(
sublist_alter
f
i
n
l
)
=
length
l
.
...
@@ -1107,22 +1106,19 @@ Lemma mask_app f βs1 βs2 l :
...
@@ -1107,22 +1106,19 @@ Lemma mask_app f βs1 βs2 l :
mask
f
(
β
s1
++
β
s2
)
l
mask
f
(
β
s1
++
β
s2
)
l
=
mask
f
β
s1
(
take
(
length
β
s1
)
l
)
++
mask
f
β
s2
(
drop
(
length
β
s1
)
l
).
=
mask
f
β
s1
(
take
(
length
β
s1
)
l
)
++
mask
f
β
s2
(
drop
(
length
β
s1
)
l
).
Proof
.
revert
l
.
induction
β
s1
;
intros
[|??]
;
f_equal'
;
auto
using
mask_nil
.
Qed
.
Proof
.
revert
l
.
induction
β
s1
;
intros
[|??]
;
f_equal'
;
auto
using
mask_nil
.
Qed
.
Lemma
mask_take
f βs l n : mask f βs (take n
l) =
take n
(mask f βs
l).
Lemma
take_mask
f
β
s
l
n
:
take
n
(
mask
f
β
s
l
)
=
mask
f
(
take
n
β
s
)
(
take
n
l
).
Proof
.
revert
n
β
s
.
induction
l
;
intros
[|?]
[|[]
?]
;
f_equal'
;
auto
.
Qed
.
Proof
.
revert
n
β
s
.
induction
l
;
intros
[|?]
[|[]
?]
;
f_equal'
;
auto
.
Qed
.
(*
Lemma
drop_mask
f
β
s
l
n
:
drop
n
(
mask
f
β
s
l
)
=
mask
f
(
drop
n
β
s
)
(
drop
n
l
).
Lemma lookup_mask_None x y βs l i :
Proof
.
βs !! i = None → mask x y βs l !! i = None.
revert
n
β
s
.
induction
l
;
intros
[|?]
[|[]
?]
;
f_equal'
;
auto
using
mask_nil
.
Proof. revert i l. induction βs; intros [] [] ?; simplify_equality'; auto. Qed.
Qed
.
Lemma lookup_mask_true x y βs l i :
Lemma
sublist_lookup_mask
f
β
s
l
i
n
:
βs !! i = Some true → mask x y βs l !! i = Some y.
sublist_lookup
i
n
(
mask
f
β
s
l
)
Proof. revert i l. induction βs; intros [] [] ?; simplify_equality'; auto. Qed.
=
mask
f
(
take
n
(
drop
i
β
s
))
<$>
sublist_lookup
i
n
l
.
Lemma lookup_mask x y βs l i :
Proof
.
βs !! i = Some false → i < length l → mask x y βs l !! i = l !! i.
unfold
sublist_lookup
;
rewrite
mask_length
;
simplify_option_equality
;
auto
.
Proof.
by
rewrite
drop_mask
,
take_mask
.
revert i βs. induction l; intros [|?] [|??] ??;
simplify_equality'; auto with lia.
Qed
.
Qed
.
*)
(** ** Properties of the [seq] function *)
(** ** Properties of the [seq] function *)
Lemma
fmap_seq
j
n
:
S
<$>
seq
j
n
=
seq
(
S
j
)
n
.
Lemma
fmap_seq
j
n
:
S
<$>
seq
j
n
=
seq
(
S
j
)
n
.
...
...
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