Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
stdpp
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
Model registry
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
Iris
stdpp
Commits
26204e75
Commit
26204e75
authored
3 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Add lemma `map_cross_split`.
parent
64843223
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!274
Make filter lemmas for maps and sets consistent + add cross split property for maps
Pipeline
#48293
passed
3 years ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
theories/fin_maps.v
+25
-0
25 additions, 0 deletions
theories/fin_maps.v
with
25 additions
and
0 deletions
theories/fin_maps.v
+
25
−
0
View file @
26204e75
...
@@ -2226,6 +2226,31 @@ Proof.
...
@@ -2226,6 +2226,31 @@ Proof.
destruct
(
m1
!!
i
),
(
m2
!!
i
);
simpl
;
repeat
(
destruct
(
f
_));
naive_solver
.
destruct
(
m1
!!
i
),
(
m2
!!
i
);
simpl
;
repeat
(
destruct
(
f
_));
naive_solver
.
Qed
.
Qed
.
Lemma
map_cross_split
{
A
}
(
m
ma
mb
mc
md
:
M
A
)
:
ma
##
ₘ
mb
→
mc
##
ₘ
md
→
ma
∪
mb
=
m
→
mc
∪
md
=
m
→
∃
mac
mad
mbc
mbd
,
mac
##
ₘ
mad
∧
mbc
##
ₘ
mbd
∧
mac
##
ₘ
mbc
∧
mad
##
ₘ
mbd
∧
mac
∪
mad
=
ma
∧
mbc
∪
mbd
=
mb
∧
mac
∪
mbc
=
mc
∧
mad
∪
mbd
=
md
.
Proof
.
intros
Hab_disj
Hcd_disj
Hab
Hcd
.
exists
(
filter
(
λ
kx
,
is_Some
(
mc
!!
kx
.
1
))
ma
),
(
filter
(
λ
kx
,
¬
is_Some
(
mc
!!
kx
.
1
))
ma
),
(
filter
(
λ
kx
,
is_Some
(
mc
!!
kx
.
1
))
mb
),
(
filter
(
λ
kx
,
¬
is_Some
(
mc
!!
kx
.
1
))
mb
)
.
split_and
!
;
[
auto
using
map_disjoint_filter_complement
,
map_disjoint_filter
,
map_filter_union_complement
..|
|]
.
-
rewrite
<-
map_filter_union
,
Hab
,
<-
Hcd
by
done
.
apply
map_eq
;
intros
k
.
apply
option_eq
;
intros
x
.
rewrite
map_filter_lookup_Some
,
lookup_union_Some
,
<-
not_eq_None_Some
by
done
.
rewrite
map_disjoint_alt
in
Hcd_disj
;
naive_solver
.
-
rewrite
<-
map_filter_union
,
Hab
,
<-
Hcd
by
done
.
apply
map_eq
;
intros
k
.
apply
option_eq
;
intros
x
.
rewrite
map_filter_lookup_Some
,
lookup_union_Some
,
<-
not_eq_None_Some
by
done
.
rewrite
map_disjoint_alt
in
Hcd_disj
;
naive_solver
.
Qed
.
(** ** Properties of the [union_list] operation *)
(** ** Properties of the [union_list] operation *)
Lemma
map_disjoint_union_list_l
{
A
}
(
ms
:
list
(
M
A
))
(
m
:
M
A
)
:
Lemma
map_disjoint_union_list_l
{
A
}
(
ms
:
list
(
M
A
))
(
m
:
M
A
)
:
⋃
ms
##
ₘ
m
↔
Forall
(.
##
ₘ
m
)
ms
.
⋃
ms
##
ₘ
m
↔
Forall
(.
##
ₘ
m
)
ms
.
...
...
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