[Merged by Bors] - refactor(Algebra/Category/Grp/Colimits): change the construction of colimits in AddCommGrp#20474
[Merged by Bors] - refactor(Algebra/Category/Grp/Colimits): change the construction of colimits in AddCommGrp#20474
AddCommGrp#20474Conversation
PR summary 551492e1a7Import changes exceeding 2%
|
| File | Base Count | Head Count | Change |
|---|---|---|---|
| Mathlib.Algebra.Category.Grp.Colimits | 691 | 816 | +125 (+18.09%) |
Import changes for all files
| Files | Import difference |
|---|---|
76 filesMathlib.Algebra.Homology.ShortComplex.Ab Mathlib.AlgebraicGeometry.Modules.Sheaf Mathlib.RepresentationTheory.GroupCohomology.Hilbert90 Mathlib.Algebra.Category.Grp.AB Mathlib.Condensed.Limits Mathlib.Algebra.Category.ModuleCat.AB Mathlib.Algebra.Category.ModuleCat.Differentials.Basic Mathlib.AlgebraicGeometry.Modules.Presheaf Mathlib.Algebra.Category.ModuleCat.ChangeOfRings Mathlib.CategoryTheory.Sites.SheafCohomology.Basic Mathlib.Algebra.Category.ModuleCat.Presheaf.Limits Mathlib.Topology.Category.Profinite.Nobeling Mathlib.Condensed.Light.Explicit Mathlib.Analysis.Fourier.FiniteAbelian.PontryaginDuality Mathlib.Topology.Sheaves.MayerVietoris Mathlib.Algebra.Category.Grp.Abelian Mathlib.Condensed.AB Mathlib.Condensed.Explicit Mathlib.Algebra.Category.ModuleCat.Sheaf.Colimits Mathlib.Condensed.Module Mathlib.Condensed.Discrete.Characterization Mathlib.RepresentationTheory.GroupCohomology.Resolution Mathlib.Algebra.Category.ModuleCat.Sheaf Mathlib.RepresentationTheory.Rep Mathlib.Algebra.Category.ModuleCat.Sheaf.Free Mathlib.NumberTheory.DirichletCharacter.Orthogonality Mathlib.Algebra.Homology.ShortComplex.ModuleCat Mathlib.Algebra.Category.ModuleCat.Differentials.Presheaf Mathlib.Algebra.Category.ModuleCat.Pseudofunctor Mathlib.Algebra.Category.ModuleCat.Sheaf.ChangeOfRings Mathlib.Algebra.Category.ModuleCat.Biproducts Mathlib.RepresentationTheory.Invariants Mathlib.RingTheory.Flat.CategoryTheory Mathlib.Condensed.Solid Mathlib.Algebra.Category.ModuleCat.EnoughInjectives Mathlib.Condensed.Discrete.Module Mathlib.Algebra.Category.ModuleCat.Sheaf.Limits Mathlib.AlgebraicGeometry.Modules.Tilde Mathlib.NumberTheory.MulChar.Duality Mathlib.Condensed.Light.Epi Mathlib.RepresentationTheory.Character Mathlib.Algebra.Homology.DerivedCategory.Ext.ExactSequences Mathlib.Algebra.Category.ModuleCat.Sheaf.Generators Mathlib.Algebra.Category.ModuleCat.Sheaf.Abelian Mathlib.Algebra.Module.PID Mathlib.RingTheory.AdicCompletion.AsTensorProduct Mathlib.Algebra.Category.ModuleCat.Presheaf.Generator Mathlib.Algebra.Category.Grp.Images Mathlib.Condensed.Light.AB Mathlib.Algebra.Category.ModuleCat.Presheaf.Colimits Mathlib.Condensed.Light.Limits Mathlib.RepresentationTheory.GroupCohomology.Basic Mathlib.RepresentationTheory.FDRep Mathlib.Algebra.Homology.LocalCohomology Mathlib.Algebra.Category.ModuleCat.Presheaf Mathlib.RepresentationTheory.GroupCohomology.LowDegree Mathlib.CategoryTheory.Sites.MayerVietorisSquare Mathlib.Condensed.Light.Module Mathlib.Algebra.Category.ModuleCat.Presheaf.Sheafification Mathlib.GroupTheory.FiniteAbelian.Duality Mathlib.Algebra.Category.ModuleCat.Presheaf.EpiMono Mathlib.Condensed.Epi Mathlib.Algebra.Homology.ShortComplex.ConcreteCategory Mathlib.Algebra.Category.ModuleCat.Free Mathlib.GroupTheory.FiniteAbelian.Basic Mathlib.NumberTheory.LSeries.PrimesInAP Mathlib.Algebra.Category.ModuleCat.Presheaf.Monoidal Mathlib.Algebra.Category.ModuleCat.Presheaf.Abelian Mathlib.Algebra.Category.ModuleCat.Presheaf.Pushforward Mathlib.Algebra.Category.ModuleCat.Sheaf.PushforwardContinuous Mathlib.Algebra.Category.ModuleCat.Presheaf.Sheafify Mathlib.Algebra.Category.ModuleCat.Sheaf.Quasicoherent Mathlib.CategoryTheory.Triangulated.Yoneda Mathlib.Algebra.Category.ModuleCat.Presheaf.ChangeOfRings Mathlib.Algebra.Homology.ConcreteCategory Mathlib.Algebra.Category.ModuleCat.Presheaf.Free |
1 |
Mathlib.Algebra.Category.ModuleCat.FilteredColimits |
35 |
Mathlib.Algebra.Category.ModuleCat.Colimits |
98 |
Mathlib.Algebra.Category.Grp.Colimits |
125 |
Mathlib.Data.DFinsupp.Small (new file) |
458 |
Declarations diff
+ DFinsupp.small
+ Quot
+ Quot.addMonoidHom_ext
+ Quot.desc
+ Quot.desc_colimitCocone
+ Quot.desc_toCocone_desc
+ Quot.desc_toCocone_desc_app
+ Quot.map_ι
+ Quot.ι
+ Quot.ι_desc
+ Relations
+ hasColimit_of_small_quot
+ instance (priority := 1300) hasColimitsOfSize [UnivLE.{u, w}] :
+ instance [DecidableEq J] : AddCommGroup (Quot F)
+ instance [DecidableEq J] [Small.{w} J] : Small.{w} (Quot F)
+ isColimit_of_bijective_desc
+ on
+ toCocone
- ColimitType
- ColimitTypeInhabited
- Prequotient
- Relation
- coconeFun
- coconeMorphism
- cocone_naturality
- cocone_naturality_components
- colimit
- colimitSetoid
- descFun
- descFunLift
- descMorphism
- hasColimits
- hasColimitsOfSize
- instance : Add (ColimitType.{w} F)
- instance : AddCommGroup (ColimitType.{w} F)
- instance : HasColimitsOfSize.{0, 0} (AddCommGrp.{u}) := hasColimitsOfSize.{u, 0, 0}
- instance : HasColimitsOfSize.{u, u} (AddCommGrpMax.{u, v}) := hasColimitsOfSize.{v}
- instance : HasColimitsOfSize.{u, v} (AddCommGrpMax.{u, v}) := hasColimitsOfSize.{u}
- instance : HasColimitsOfSize.{v, u} (AddCommGrpMax.{u, v}) := hasColimitsOfSize.{u}
- instance : HasColimitsOfSize.{v, v} (AddCommGrpMax.{u, v}) := hasColimitsOfSize.{u}
- instance : Inhabited (Prequotient.{w} F)
- instance : Neg (ColimitType.{w} F)
- instance : Zero (ColimitType.{w} F)
- quot_add
- quot_neg
- quot_zero
You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>
## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>The doc-module for script/declarations_diff.sh contains some details about this script.
Increase in tech debt: (relative, absolute) = (2.56, 0.00)
| Current number | Change | Type |
|---|---|---|
| 4824 | -2 | porting notes |
| 1518 | 4 | erw |
Current commit 551492e1a7
Reference commit 0f18102487
You can run this locally as
./scripts/technical-debt-metrics.sh pr_summary
- The
relativevalue is the weighted sum of the differences with weight given by the inverse of the current value of the statistic. - The
absolutevalue is therelativevalue divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).
|
!bench |
|
Here are the benchmark results for commit 75fa8cf. Benchmark Metric Change
============================================================================
- ~Mathlib.Algebra.Category.Grp.Colimits instructions 126.9%
+ ~Mathlib.Algebra.Category.ModuleCat.Presheaf.Abelian instructions -80.1%
+ ~Mathlib.Condensed.Discrete.Module instructions -16.7% |
Co-authored-by: Joël Riou <37772949+joelriou@users.noreply.github.com>
Co-authored-by: Joël Riou <37772949+joelriou@users.noreply.github.com>
Co-authored-by: Joël Riou <37772949+joelriou@users.noreply.github.com>
Co-authored-by: Joël Riou <37772949+joelriou@users.noreply.github.com>
Co-authored-by: Joël Riou <37772949+joelriou@users.noreply.github.com>
Co-authored-by: Joël Riou <37772949+joelriou@users.noreply.github.com>
Co-authored-by: Joël Riou <37772949+joelriou@users.noreply.github.com>
Co-authored-by: Joël Riou <37772949+joelriou@users.noreply.github.com>
Co-authored-by: Joël Riou <37772949+joelriou@users.noreply.github.com>
Co-authored-by: Joël Riou <37772949+joelriou@users.noreply.github.com>
Co-authored-by: Joël Riou <37772949+joelriou@users.noreply.github.com>
|
Thanks! bors merge |
…olimits in `AddCommGrp` (#20474) The old version of this file has a remark saying "TODO: In fact, in `AddCommGrp` there is a much nicer model of colimits as quotients of finitely supported functions, and we really should implement this as well (or instead)." This PR does precisely this (choosing the "instead" option). In fact, given a functor `F : J ⥤ AddCommGrp.{w}`, it constructs a candidate for the colimit of `F` as a quotient of `DFinsupp (fun j ↦ F.obj j)`, without any smallness assumptions on `J`. It then proves that this quotient is a colimit of `F` if it is `w`-small, then deduces that `AddCommGrp.{w}` has all small colimits. Co-authored-by: smorel394 <67864981+smorel394@users.noreply.github.com>
|
Pull request successfully merged into master. Build succeeded: |
AddCommGrpAddCommGrp
* origin/master: (189 commits) chore(Algebra): make more names consistent (#20449) feat: Polynomial FLT (#18882) feat: A disjoint union is finite iff all sets are finite, and all but finitely many are empty (#20457) fix: linkfix in 100.yaml (#20517) feat(1000): fill in more entries (#20470) feat(Combinatorics/SimpleGraph/Walk): add `penultimate` and `snd` (#16769) feat(ContinuousMultilinearMap): add lemmas about `.prod` (#20462) feat(RingTheory): classification of etale algebras over fields (#20324) fix: Allow multiple builds on staging branch (#20515) feat(CategoryTheory/Shift/Adjunction): properties of `Adjunction.CommShift` (#20337) chore(Data/Multiset/Basic): move the `sub`, `union`, `inter` sections lower (#19863) chore(Topology/UniformSpace/Completion): make coe' argument implicit (#20514) refactor(Algebra/Category/Grp/Colimits): change the construction of colimits in `AddCommGrp` (#20474) feat(Topology/Algebra/InfiniteSum/NatInt): Add pnat lems (#16544) chore(RingTheory/Finiteness): rename Module.Finite.out (#20506) refactor(CategoryTheory/Limits/Preserves/Ulift): simplify the proof that the universe lifting functor for types preserves all colimits (#20508) feat(CategoryTheory): products in the category of Ind-objects (#20507) chore: remove >9 month old deprecations (#20505) chore(FieldTheory/Galois): small cleanup (#20217) chore(LinearIndependent): generalize to semirings (#20480) chore(NumberTheory/NumberField/AdeleRing): refactor adele rings (#20500) chore: replace `aesop` with `simp` where possible (#20483) chore(1000): remove nonexistent fields (#20493) chore(CategoryTheory/Adjunction.Basic, CategoryTheory/Equivalence): change definition of `Adjunction.comp` and `Equivalence.trans` (#20490) feat(Asymptotics): add `Asymptotics.*.*Prod` lemmas (#20458) feat: a conditional kernel is almost everywhere a probability measure (#20430) feat: if `f` is a measurable group hom, then every point has a neighborhood `s` such that `f '' s` is bounded (#20304) feat: `Ico`, `Ioc`, and `Ioo` are not closed or compact (#20479) chore: drop redundant hypothesis in `Module.Dual.eq_of_preReflection_mapsTo` (#20492) feat(FaaDiBruno): derive `DecidableEq` (#20482) chore(SetTheory/Ordinal/Basic): `{x // x < y}` → `Iio y` (#20413) chore: generalize `FormalMultilinearSeries.ofScalars_norm` to `Seminormed` (#20351) chore(MvPolynomial/Localization): golf using TensorProduct (#20309) chore(Combinatorics/Enumerative/Partition): auto-derive DecidableEq (#20277) chore(CategoryTheory): make relevant parameters explicit in `Arrow.homMk`. (#20259) feat: add `IsStarNormal (↑x⁻¹ : R)` instance for `x : Rˣ` (#20091) fix: Stop cancelling builds of master (#20435) chore: update Mathlib dependencies 2025-01-05 (#20485) feat(SetTheory/Cardinal/Arithmetic): miscellaneous cardinality lemmas (#18933) chore: bump toolchain to v4.16.0-rc1, and merge bump/v4.16.0 (#20464) chore: bot validates lean-toolchain on bump/v4.X.0 branches (#20478) feat: shorthand lemmas for the L1 norm (#20383) chore: remove unnecessary adaptation notes (#20467) chore(Algebra/Category/MonCat/Colimits): remove smallness condition (#20473) chore(SetTheory/Ordinal/Arithmetic): `IsLeftCancelAdd Ordinal` (#19888) feat(Algebra): more on `OrthogonalIdempotents` (#18195) feat(Radical): `(radical a).natDegree ≤ a.natDegree` (#20468) feat(Polynomial): `(a^n)' = 0` iff `a' = 0` when `n` doesn't divide the characteristic (#20190) feat(Algebra/Lie): add Lie's theorem (#13480) chore(RingTheory/Generators): make algebra instance a def (#14265) ...
The old version of this file has a remark saying "TODO: In fact, in
AddCommGrpthere is a much nicer model of colimits as quotients of finitely supported functions, and we really should implement this as well (or instead)."This PR does precisely this (choosing the "instead" option). In fact, given a functor
F : J ⥤ AddCommGrp.{w}, it constructs a candidate for the colimit ofFas a quotient ofDFinsupp (fun j ↦ F.obj j), without any smallness assumptions onJ. It then proves that this quotient is a colimit ofFif it isw-small, then deduces thatAddCommGrp.{w}has all small colimits.