[Merged by Bors] - feat(data/option/n_ary): Binary map of options#16763
[Merged by Bors] - feat(data/option/n_ary): Binary map of options#16763YaelDillies wants to merge 6 commits intomasterfrom
Conversation
src/data/option/n_ary.lean
Outdated
| (map₂ f a b).map g = map₂ f' (a.map g₁) (b.map g₂) := | ||
| by cases a; cases b; simp [h_distrib] | ||
|
|
||
| /-- Symmetric of `option.map₂_map_left_comm`. -/ |
There was a problem hiding this comment.
"Symmetric of" doesn't really make sense in English - I'm not sure what you mean here?
There was a problem hiding this comment.
Same equality but written the other way around.
If you wonder why we need this, it's because unification has a hard time figuring all the functions if you symmetrize on the spot. This is also how the other n-ary APIs do it.
There was a problem hiding this comment.
In that case, how about:
| /-- Symmetric of `option.map₂_map_left_comm`. -/ | |
| /-- Symmetric form of `option.map₂_map_left_comm`. -/ |
or
| /-- Symmetric of `option.map₂_map_left_comm`. -/ | |
| /-- Symmetric restatement of `option.map₂_map_left_comm`. -/ |
(also below)
src/data/option/n_ary.lean
Outdated
| (map₂ f a b).map g = map₂ f' (a.map g₁) (b.map g₂) := | ||
| by cases a; cases b; simp [h_distrib] | ||
|
|
||
| /-- Symmetric of `option.map₂_map_left_comm`. -/ |
There was a problem hiding this comment.
In that case, how about:
| /-- Symmetric of `option.map₂_map_left_comm`. -/ | |
| /-- Symmetric form of `option.map₂_map_left_comm`. -/ |
or
| /-- Symmetric of `option.map₂_map_left_comm`. -/ | |
| /-- Symmetric restatement of `option.map₂_map_left_comm`. -/ |
(also below)
|
✌️ YaelDillies can now approve this pull request. To approve and merge a pull request, simply reply with |
|
bors merge |
Define `option.map₂`, the binary map of options.
|
Build failed (retrying...): |
Define `option.map₂`, the binary map of options.
|
Pull request successfully merged into master. Build succeeded: |
Define
option.map₂, the binary map of options.This will be used to turn arithmetic operations on
nonempty_interval αinto the ones oninterval α.