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
fb7a1e04
Commit
fb7a1e04
authored
7 months ago
by
Ralf Jung
Browse files
Options
Downloads
Plain Diff
Merge branch 'robbert/map_Forall2_dom' into 'master'
Add `map_Forall2_dom`. See merge request
!569
parents
d37b5e70
83c6c5eb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!569
Add `map_Forall2_dom`.
Pipeline
#106836
passed
7 months ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
stdpp/fin_map_dom.v
+13
-0
13 additions, 0 deletions
stdpp/fin_map_dom.v
with
13 additions
and
0 deletions
stdpp/fin_map_dom.v
+
13
−
0
View file @
fb7a1e04
...
...
@@ -187,6 +187,15 @@ Lemma map_first_key_dom_L {A B} (m1 : M A) (m2 : M B) i :
dom
m1
=
dom
m2
→
map_first_key
m1
i
↔
map_first_key
m2
i
.
Proof
.
intros
Hm
.
apply
map_first_key_dom
.
by
rewrite
Hm
.
Qed
.
Lemma
map_Forall2_dom
{
A
B
}
(
P
:
K
→
A
→
B
→
Prop
)
(
m1
:
M
A
)
(
m2
:
M
B
)
:
map_Forall2
P
m1
m2
→
dom
m1
≡
dom
m2
.
Proof
.
revert
m2
.
induction
m1
as
[|
i
x1
m1
?
IH
]
using
map_ind
;
intros
m2
.
{
intros
->%
map_Forall2_empty_inv_l
.
by
rewrite
!
dom_empty
.
}
intros
(
x2
&
m2'
&
->
&
?
&
?
&
?)
%
map_Forall2_insert_inv_l
;
last
done
.
by
rewrite
!
dom_insert
,
IH
by
done
.
Qed
.
(** Alternative definition of [dom] in terms of [map_to_list]. *)
Lemma
dom_alt
{
A
}
(
m
:
M
A
)
:
dom
m
≡
list_to_set
(
map_to_list
m
).
*
1
.
...
...
@@ -324,6 +333,7 @@ Proof. intros ???. unfold_leibniz. by apply dom_proper. Qed.
Section
leibniz
.
Context
`{
!
LeibnizEquiv
D
}
.
Lemma
dom_filter_L
{
A
}
(
P
:
K
*
A
→
Prop
)
`{
!∀
x
,
Decision
(
P
x
)}
(
m
:
M
A
)
X
:
(
∀
i
,
i
∈
X
↔
∃
x
,
m
!!
i
=
Some
x
∧
P
(
i
,
x
))
→
dom
(
filter
P
m
)
=
X
.
...
...
@@ -358,6 +368,9 @@ Section leibniz.
Proof
.
unfold_leibniz
;
apply
dom_difference
.
Qed
.
Lemma
dom_fmap_L
{
A
B
}
(
f
:
A
→
B
)
(
m
:
M
A
)
:
dom
(
f
<$>
m
)
=
dom
m
.
Proof
.
unfold_leibniz
;
apply
dom_fmap
.
Qed
.
Lemma
map_Forall2_dom_L
{
A
B
}
(
P
:
K
→
A
→
B
→
Prop
)
(
m1
:
M
A
)
(
m2
:
M
B
)
:
map_Forall2
P
m1
m2
→
dom
m1
=
dom
m2
.
Proof
.
unfold_leibniz
.
apply
map_Forall2_dom
.
Qed
.
Lemma
dom_imap_L
{
A
B
}
(
f
:
K
→
A
→
option
B
)
(
m
:
M
A
)
X
:
(
∀
i
,
i
∈
X
↔
∃
x
,
m
!!
i
=
Some
x
∧
is_Some
(
f
i
x
))
→
dom
(
map_imap
f
m
)
=
X
.
...
...
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