New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Merged by Bors] - feat: port algebra.group.pi #1088
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
thorimur
added
WIP
Work in progress
mathlib-port
This is a port of a theory file from mathlib.
labels
Dec 16, 2022
* Data.Int.Cast.Lemmas * Data.Nat.Cast.Basic
thorimur
force-pushed
the
algebra.group.pi
branch
from
December 17, 2022 20:18
c371e56
to
e38a169
Compare
* change `Pi.Single` -> `Pi.single` * add `to_additive` #aligns
thorimur
added
awaiting-review
The author would like community review of the PR
and removed
WIP
Work in progress
labels
Dec 17, 2022
kbuzzard
reviewed
Dec 18, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need all the rename_i
s and I'm slightly worried that they rely on the order that instances are generated. I've given a suggested workaround.
bors merge |
github-actions
bot
added
ready-to-merge
This PR has been sent to bors.
and removed
awaiting-review
The author would like community review of the PR
labels
Dec 18, 2022
bors bot
pushed a commit
that referenced
this pull request
Dec 18, 2022
mathlib3port tracking sha: `b3f25363ae62cb169e72cd6b8b1ac97bacf21ca7` ### Porting notes * Moved `AddMonoidWithOne` and `AddGroupWithOne` here from their original files. * Corrected the name of `Pi.Single` to `Pi.single` in `Data.Pi.Algebra`, on which this depends. (Note: this change was only done in the final two commits, which can be split off into a subsequent PR for a good history if need be.) * Replaced explicit data fields by sourcing previously-defined instances where possible, as per [this zulip discussion](https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/not.20porting.20pi_instance) * Changed a name: `update_eq_div_mulSingle` => `update_eq_div_mul_mulSingle`, as it involves a multiplication of two `mulSingle`s. (Note: the additive version in mathlib is `update_eq_sub_add_single`, and `to_additive` "agrees" that `update_eq_div_mul_mulSingle` is the right name in mathlib4.) ### Review questions * Are we sure about using instances as sources where possible? Just want to double-check that it won't cause any problems. * If so, should the "highest-up" or "lowest-down" instances be used for sourcing when diamonds occur? E.g. `Foo` extends `Bar0`, `Bar1`, and both have relevant instances `bar0`, `bar1`. However, `Bar1` extends `Baz`, and we also have a relevant instance `baz` which suffices for everything not in `Bar0`. Should the instance for `Foo` start `{ bar0, bar1 with ... }` or `{ bar0, baz with ... }`? Does it matter? * Should the data `mul := (· * ·)`, `zero := (0 : ∀ i, f i)` remain explicit or be obtained by sourcing `Pi.instMul`, `Pi.instZero` respectively?
Pull request successfully merged into master. Build succeeded: |
bors
bot
changed the title
feat: port algebra.group.pi
[Merged by Bors] - feat: port algebra.group.pi
Dec 18, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
mathlib-port
This is a port of a theory file from mathlib.
ready-to-merge
This PR has been sent to bors.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
mathlib3port tracking sha:
b3f25363ae62cb169e72cd6b8b1ac97bacf21ca7
Porting notes
AddMonoidWithOne
andAddGroupWithOne
here from their original files.Pi.Single
toPi.single
inData.Pi.Algebra
, on which this depends. (Note: this change was only done in the final two commits, which can be split off into a subsequent PR for a good history if need be.)update_eq_div_mulSingle
=>update_eq_div_mul_mulSingle
, as it involves a multiplication of twomulSingle
s. (Note: the additive version in mathlib isupdate_eq_sub_add_single
, andto_additive
"agrees" thatupdate_eq_div_mul_mulSingle
is the right name in mathlib4.)Review questions
Foo
extendsBar0
,Bar1
, and both have relevant instancesbar0
,bar1
. However,Bar1
extendsBaz
, and we also have a relevant instancebaz
which suffices for everything not inBar0
. Should the instance forFoo
start{ bar0, bar1 with ... }
or{ bar0, baz with ... }
? Does it matter?mul := (· * ·)
,zero := (0 : ∀ i, f i)
remain explicit or be obtained by sourcingPi.instMul
,Pi.instZero
respectively?