Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iris
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
Tej Chajed
iris
Commits
ba30e046
Commit
ba30e046
authored
9 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
show that monadic set operations respect the partial order
parent
8c22bd60
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
prelude/collections.v
+9
-0
9 additions, 0 deletions
prelude/collections.v
prelude/sets.v
+1
-1
1 addition, 1 deletion
prelude/sets.v
with
10 additions
and
1 deletion
prelude/collections.v
+
9
−
0
View file @
ba30e046
...
@@ -531,12 +531,21 @@ End fresh.
...
@@ -531,12 +531,21 @@ End fresh.
Section
collection_monad
.
Section
collection_monad
.
Context
`{
CollectionMonad
M
}
.
Context
`{
CollectionMonad
M
}
.
Global
Instance
collection_fmap_mono
{
A
B
}
:
Proper
(
pointwise_relation
_
(
=
)
==>
(
⊆
)
==>
(
⊆
))
(
@
fmap
M
_
A
B
)
.
Proof
.
intros
f
g
?
X
Y
?;
solve_elem_of
.
Qed
.
Global
Instance
collection_fmap_proper
{
A
B
}
:
Global
Instance
collection_fmap_proper
{
A
B
}
:
Proper
(
pointwise_relation
_
(
=
)
==>
(
≡
)
==>
(
≡
))
(
@
fmap
M
_
A
B
)
.
Proper
(
pointwise_relation
_
(
=
)
==>
(
≡
)
==>
(
≡
))
(
@
fmap
M
_
A
B
)
.
Proof
.
intros
f
g
?
X
Y
[??];
split
;
solve_elem_of
.
Qed
.
Proof
.
intros
f
g
?
X
Y
[??];
split
;
solve_elem_of
.
Qed
.
Global
Instance
collection_bind_mono
{
A
B
}
:
Proper
(((
=
)
==>
(
⊆
))
==>
(
⊆
)
==>
(
⊆
))
(
@
mbind
M
_
A
B
)
.
Proof
.
unfold
respectful
;
intros
f
g
Hfg
X
Y
?;
solve_elem_of
.
Qed
.
Global
Instance
collection_bind_proper
{
A
B
}
:
Global
Instance
collection_bind_proper
{
A
B
}
:
Proper
(((
=
)
==>
(
≡
))
==>
(
≡
)
==>
(
≡
))
(
@
mbind
M
_
A
B
)
.
Proper
(((
=
)
==>
(
≡
))
==>
(
≡
)
==>
(
≡
))
(
@
mbind
M
_
A
B
)
.
Proof
.
unfold
respectful
;
intros
f
g
Hfg
X
Y
[??];
split
;
solve_elem_of
.
Qed
.
Proof
.
unfold
respectful
;
intros
f
g
Hfg
X
Y
[??];
split
;
solve_elem_of
.
Qed
.
Global
Instance
collection_join_mono
{
A
}
:
Proper
((
⊆
)
==>
(
⊆
))
(
@
mjoin
M
_
A
)
.
Proof
.
intros
X
Y
?;
solve_elem_of
.
Qed
.
Global
Instance
collection_join_proper
{
A
}
:
Global
Instance
collection_join_proper
{
A
}
:
Proper
((
≡
)
==>
(
≡
))
(
@
mjoin
M
_
A
)
.
Proper
((
≡
)
==>
(
≡
))
(
@
mjoin
M
_
A
)
.
Proof
.
intros
X
Y
[??];
split
;
solve_elem_of
.
Qed
.
Proof
.
intros
X
Y
[??];
split
;
solve_elem_of
.
Qed
.
...
...
This diff is collapsed.
Click to expand it.
prelude/sets.v
+
1
−
1
View file @
ba30e046
...
@@ -28,4 +28,4 @@ Instance set_join : MJoin set := λ A (XX : set (set A)),
...
@@ -28,4 +28,4 @@ Instance set_join : MJoin set := λ A (XX : set (set A)),
Instance
set_collection_monad
:
CollectionMonad
set
.
Instance
set_collection_monad
:
CollectionMonad
set
.
Proof
.
by
split
;
try
apply
_
.
Qed
.
Proof
.
by
split
;
try
apply
_
.
Qed
.
Global
Opaque
set_union
set_intersection
.
Global
Opaque
set_union
set_intersection
set_difference
.
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