Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Iris
stdpp
Commits
947cd733
Commit
947cd733
authored
Nov 20, 2017
by
Robbert Krebbers
Browse files
Use `pointwise_relation` for `mbind`.
This one works for setoid rewriting under binders.
parent
572581f1
Changes
1
Hide whitespace changes
Inline
Side-by-side
theories/collections.v
View file @
947cd733
...
...
@@ -71,10 +71,10 @@ Section setoids_monad.
by
rewrite
HX
,
Hf
.
Qed
.
Global
Instance
collection_bind_proper
{
A
B
}
:
Proper
(
((=)
==>
(
≡
)
)
==>
(
≡
)
==>
(
≡
))
(@
mbind
M
_
A
B
).
Proper
(
pointwise_relation
_
(
≡
)
==>
(
≡
)
==>
(
≡
))
(@
mbind
M
_
A
B
).
Proof
.
intros
f1
f2
Hf
X1
X2
HX
x
.
rewrite
!
elem_of_bind
.
f_equiv
;
intros
z
.
by
rewrite
HX
,
(
Hf
z
z
).
by
rewrite
HX
,
(
Hf
z
).
Qed
.
Global
Instance
collection_join_proper
{
A
}
:
Proper
((
≡
)
==>
(
≡
))
(@
mjoin
M
_
A
).
...
...
@@ -940,8 +940,8 @@ Section collection_monad.
Proper
(
pointwise_relation
_
(=)
==>
(
⊆
)
==>
(
⊆
))
(@
fmap
M
_
A
B
).
Proof
.
intros
f
g
?
X
Y
?
;
set_solver
by
eauto
.
Qed
.
Global
Instance
collection_bind_mono
{
A
B
}
:
Proper
(
((=)
==>
(
⊆
)
)
==>
(
⊆
)
==>
(
⊆
))
(@
mbind
M
_
A
B
).
Proof
.
unfold
respectful
;
intros
f
g
Hfg
X
Y
?
;
set_solver
.
Qed
.
Proper
(
pointwise_relation
_
(
⊆
)
==>
(
⊆
)
==>
(
⊆
))
(@
mbind
M
_
A
B
).
Proof
.
unfold
respectful
,
pointwise_relation
;
intros
f
g
Hfg
X
Y
?
.
set_solver
.
Qed
.
Global
Instance
collection_join_mono
{
A
}
:
Proper
((
⊆
)
==>
(
⊆
))
(@
mjoin
M
_
A
).
Proof
.
intros
X
Y
?
;
set_solver
.
Qed
.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment