Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iris-coq
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
Operate
Environments
Monitor
Incidents
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
Amin Timany
iris-coq
Commits
f3e78cbb
Commit
f3e78cbb
authored
8 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
More mapset deciders.
parent
72bfb1ea
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
prelude/mapset.v
+24
-10
24 additions, 10 deletions
prelude/mapset.v
with
24 additions
and
10 deletions
prelude/mapset.v
+
24
−
10
View file @
f3e78cbb
...
...
@@ -34,16 +34,6 @@ Proof.
f_equal
.
apply
map_eq
.
intros
i
.
apply
option_eq
.
intros
[]
.
by
apply
E
.
Qed
.
Global
Instance
mapset_eq_dec
`{
∀
m1
m2
:
M
unit
,
Decision
(
m1
=
m2
)}
(
X1
X2
:
mapset
M
)
:
Decision
(
X1
=
X2
)
|
1
.
Proof
.
refine
match
X1
,
X2
with
Mapset
m1
,
Mapset
m2
=>
cast_if
(
decide
(
m1
=
m2
))
end
;
abstract
congruence
.
Defined
.
Global
Instance
mapset_elem_of_dec
x
(
X
:
mapset
M
)
:
Decision
(
x
∈
X
)
|
1
.
Proof
.
solve_decision
.
Defined
.
Instance
:
Collection
K
(
mapset
M
)
.
Proof
.
split
;
[
split
|
|
]
.
...
...
@@ -77,6 +67,30 @@ Proof.
apply
NoDup_fst_map_to_list
.
Qed
.
Section
deciders
.
Context
`{
∀
m1
m2
:
M
unit
,
Decision
(
m1
=
m2
)}
.
Global
Instance
mapset_eq_dec
(
X1
X2
:
mapset
M
)
:
Decision
(
X1
=
X2
)
|
1
.
Proof
.
refine
match
X1
,
X2
with
Mapset
m1
,
Mapset
m2
=>
cast_if
(
decide
(
m1
=
m2
))
end
;
abstract
congruence
.
Defined
.
Global
Instance
mapset_equiv_dec
(
X1
X2
:
mapset
M
)
:
Decision
(
X1
≡
X2
)
|
1
.
Proof
.
refine
(
cast_if
(
decide
(
X1
=
X2
)));
abstract
(
by
fold_leibniz
)
.
Defined
.
Global
Instance
mapset_elem_of_dec
x
(
X
:
mapset
M
)
:
Decision
(
x
∈
X
)
|
1
.
Proof
.
solve_decision
.
Defined
.
Global
Instance
mapset_disjoint_dec
(
X1
X2
:
mapset
M
)
:
Decision
(
X1
⊥
X2
)
.
Proof
.
refine
(
cast_if
(
decide
(
X1
∩
X2
=
∅
)));
abstract
(
by
rewrite
disjoint_intersection_L
)
.
Defined
.
Global
Instance
mapset_subseteq_dec
(
X1
X2
:
mapset
M
)
:
Decision
(
X1
⊆
X2
)
.
Proof
.
refine
(
cast_if
(
decide
(
X1
∪
X2
=
X2
)));
abstract
(
by
rewrite
subseteq_union_L
)
.
Defined
.
End
deciders
.
Definition
mapset_map_with
{
A
B
}
(
f
:
bool
→
A
→
option
B
)
(
X
:
mapset
M
)
:
M
A
→
M
B
:=
let
(
mX
)
:=
X
in
merge
(
λ
x
y
,
...
...
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