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
d4665398
Commit
d4665398
authored
3 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
add map_size_disj_union
parent
10ba5946
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!321
add map_size_disj_union
Pipeline
#51974
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
+14
-0
14 additions, 0 deletions
theories/fin_maps.v
with
14 additions
and
0 deletions
theories/fin_maps.v
+
14
−
0
View file @
d4665398
...
...
@@ -2294,6 +2294,20 @@ Proof.
destruct
(
m1
!!
i
),
(
m2
!!
i
);
simpl
;
repeat
(
destruct
(
f
_));
naive_solver
.
Qed
.
Lemma
map_size_disj_union
{
A
}
(
m1
m2
:
M
A
)
:
m1
##
ₘ
m2
→
size
(
m1
∪
m2
)
=
size
m1
+
size
m2
.
Proof
.
intros
Hdisj
.
induction
m1
as
[|
k
x
m1
Hm1
IH
]
using
map_ind
.
{
rewrite
map_empty_union
.
(* FIXME: [rewrite left_id] leaves a goal *)
rewrite
map_size_empty
.
done
.
}
rewrite
<-
insert_union_l
.
rewrite
map_size_insert
.
rewrite
lookup_union_r
by
done
.
apply
map_disjoint_insert_l
in
Hdisj
as
[
->
Hdisj
]
.
rewrite
map_size_insert
,
Hm1
.
rewrite
IH
by
done
.
done
.
Qed
.
Lemma
map_cross_split
{
A
}
(
ma
mb
mc
md
:
M
A
)
:
ma
##
ₘ
mb
→
mc
##
ₘ
md
→
ma
∪
mb
=
mc
∪
md
→
...
...
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