Commit 2022-12-18 21:16 f0939b2f
View on Github →feat: port algebra.group.pi (#1088)
mathlib3port tracking sha: b3f25363ae62cb169e72cd6b8b1ac97bacf21ca7
Porting notes
- Moved
AddMonoidWithOneandAddGroupWithOnehere from their original files. - Corrected the name of
Pi.SingletoPi.singleinData.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
- Changed a name:
update_eq_div_mulSingle=>update_eq_div_mul_mulSingle, as it involves a multiplication of twomulSingles. (Note: the additive version in mathlib isupdate_eq_sub_add_single, andto_additive"agrees" thatupdate_eq_div_mul_mulSingleis 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.
FooextendsBar0,Bar1, and both have relevant instancesbar0,bar1. However,Bar1extendsBaz, and we also have a relevant instancebazwhich suffices for everything not inBar0. Should the instance forFoostart{ 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 sourcingPi.instMul,Pi.instZerorespectively?