[Merged by Bors] - feat(GroupWithZero): monoid with zero homs to (co)products#25466
[Merged by Bors] - feat(GroupWithZero): monoid with zero homs to (co)products#25466
Conversation
Factored out from #22420
PR summary 8b8fe2fa63Import changes exceeding 2%
|
| File | Base Count | Head Count | Change |
|---|---|---|---|
| Mathlib.Algebra.GroupWithZero.Prod | 219 | 334 | +115 (+52.51%) |
Import changes for all files
| Files | Import difference |
|---|---|
252 filesMathlib.Algebra.Algebra.Basic Mathlib.Algebra.Algebra.Bilinear Mathlib.Algebra.Algebra.Equiv Mathlib.Algebra.Algebra.Hom.Rat Mathlib.Algebra.Algebra.Hom Mathlib.Algebra.Algebra.NonUnitalHom Mathlib.Algebra.Algebra.NonUnitalSubalgebra Mathlib.Algebra.Algebra.Operations Mathlib.Algebra.Algebra.Opposite Mathlib.Algebra.Algebra.Pi Mathlib.Algebra.Algebra.Prod Mathlib.Algebra.Algebra.RestrictScalars Mathlib.Algebra.Algebra.Subalgebra.Basic Mathlib.Algebra.Algebra.Subalgebra.Directed Mathlib.Algebra.Algebra.Subalgebra.Lattice Mathlib.Algebra.Algebra.Subalgebra.MulOpposite Mathlib.Algebra.Algebra.Subalgebra.Order Mathlib.Algebra.Algebra.Subalgebra.Pi Mathlib.Algebra.Algebra.Subalgebra.Pointwise Mathlib.Algebra.Algebra.Subalgebra.Prod Mathlib.Algebra.Algebra.Subalgebra.Tower Mathlib.Algebra.Algebra.Subalgebra.Unitization Mathlib.Algebra.Algebra.Tower Mathlib.Algebra.Algebra.Unitization Mathlib.Algebra.Category.AlgCat.Basic Mathlib.Algebra.Category.AlgCat.Monoidal Mathlib.Algebra.Category.AlgCat.Symmetric Mathlib.Algebra.Category.AlgebraCat.Symmetric Mathlib.Algebra.Category.Grp.Biproducts Mathlib.Algebra.Category.Grp.CartesianMonoidal Mathlib.Algebra.Category.Grp.ChosenFiniteProducts Mathlib.Algebra.Category.Grp.Colimits Mathlib.Algebra.Category.Grp.LeftExactFunctor Mathlib.Algebra.Category.Grp.Limits Mathlib.Algebra.Category.Grp.ZModuleEquivalence Mathlib.Algebra.Category.ModuleCat.Algebra Mathlib.Algebra.Category.ModuleCat.Basic Mathlib.Algebra.Category.ModuleCat.Colimits Mathlib.Algebra.Category.ModuleCat.FilteredColimits Mathlib.Algebra.Category.ModuleCat.Monoidal.Basic Mathlib.Algebra.Category.ModuleCat.Monoidal.Closed Mathlib.Algebra.Category.ModuleCat.Monoidal.Symmetric Mathlib.Algebra.Category.ModuleCat.Tannaka Mathlib.Algebra.Category.MonCat.Limits Mathlib.Algebra.Category.Ring.Limits Mathlib.Algebra.Central.Basic Mathlib.Algebra.Central.Defs Mathlib.Algebra.Central.Matrix Mathlib.Algebra.DirectSum.AddChar Mathlib.Algebra.DualNumber Mathlib.Algebra.Equiv.TransferInstance Mathlib.Algebra.Field.Subfield.Basic Mathlib.Algebra.FreeAlgebra Mathlib.Algebra.FreeNonUnitalNonAssocAlgebra Mathlib.Algebra.Group.AddChar Mathlib.Algebra.Homology.ExactSequence Mathlib.Algebra.Homology.Factorizations.Basic Mathlib.Algebra.Homology.GrothendieckAbelian Mathlib.Algebra.Homology.HomologicalComplexAbelian Mathlib.Algebra.Homology.ShortComplex.ExactFunctor Mathlib.Algebra.Homology.ShortComplex.Exact Mathlib.Algebra.Homology.ShortComplex.Linear Mathlib.Algebra.Homology.ShortComplex.Preadditive Mathlib.Algebra.Homology.ShortComplex.ShortExact Mathlib.Algebra.Homology.ShortComplex.SnakeLemma Mathlib.Algebra.Lie.Basic Mathlib.Algebra.Lie.NonUnitalNonAssocAlgebra Mathlib.Algebra.Module.Bimodule Mathlib.Algebra.Module.Injective Mathlib.Algebra.Module.Submodule.Invariant Mathlib.Algebra.Module.Submodule.Pointwise Mathlib.Algebra.MonoidAlgebra.Basic Mathlib.Algebra.MonoidAlgebra.Defs Mathlib.Algebra.MonoidAlgebra.Degree Mathlib.Algebra.MonoidAlgebra.Division Mathlib.Algebra.MonoidAlgebra.MapDomain Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors Mathlib.Algebra.MonoidAlgebra.Support Mathlib.Algebra.Order.Star.Prod Mathlib.Algebra.Polynomial.Basic Mathlib.Algebra.Polynomial.Basis Mathlib.Algebra.Polynomial.Degree.Definitions Mathlib.Algebra.Polynomial.Degree.Monomial Mathlib.Algebra.Polynomial.Eval.Algebra Mathlib.Algebra.Polynomial.Eval.Defs Mathlib.Algebra.Polynomial.Monomial Mathlib.Algebra.Ring.CentroidHom Mathlib.Algebra.Ring.Semireal.Defs Mathlib.Algebra.Ring.Subring.Basic Mathlib.Algebra.Ring.Subring.MulOpposite Mathlib.Algebra.Ring.Subring.Pointwise Mathlib.Algebra.Ring.Subsemiring.Basic Mathlib.Algebra.Ring.Subsemiring.MulOpposite Mathlib.Algebra.Ring.Subsemiring.Pointwise Mathlib.Algebra.Ring.SumsOfSquares Mathlib.Algebra.SkewMonoidAlgebra.Basic Mathlib.Algebra.Small.Group Mathlib.Algebra.Small.Module Mathlib.Algebra.Small.Ring Mathlib.Algebra.Star.CentroidHom Mathlib.Algebra.Star.Free Mathlib.Algebra.Star.Module Mathlib.Algebra.Star.NonUnitalSubalgebra Mathlib.Algebra.Star.NonUnitalSubsemiring Mathlib.Algebra.Star.StarAlgHom Mathlib.Algebra.Star.Subalgebra Mathlib.Algebra.Star.Subsemiring Mathlib.Algebra.TrivSqZeroExt Mathlib.Algebra.Vertex.HVertexOperator Mathlib.Algebra.Vertex.VertexOperator Mathlib.CategoryTheory.Abelian.CommSq Mathlib.CategoryTheory.Abelian.DiagramLemmas.Four Mathlib.CategoryTheory.Abelian.DiagramLemmas.KernelCokernelComp Mathlib.CategoryTheory.Abelian.EpiWithInjectiveKernel Mathlib.CategoryTheory.Abelian.Exact Mathlib.CategoryTheory.Abelian.GrothendieckAxioms.Basic Mathlib.CategoryTheory.Abelian.GrothendieckAxioms.Colim Mathlib.CategoryTheory.Abelian.GrothendieckAxioms.Connected Mathlib.CategoryTheory.Abelian.GrothendieckAxioms.FunctorCategory Mathlib.CategoryTheory.Abelian.GrothendieckAxioms.Indization Mathlib.CategoryTheory.Abelian.GrothendieckAxioms.Sheaf Mathlib.CategoryTheory.Abelian.GrothendieckAxioms.Types Mathlib.CategoryTheory.Abelian.GrothendieckCategory.Basic Mathlib.CategoryTheory.Abelian.GrothendieckCategory.Monomorphisms Mathlib.CategoryTheory.Abelian.Indization Mathlib.CategoryTheory.Abelian.Opposite Mathlib.CategoryTheory.Abelian.Refinements Mathlib.CategoryTheory.Abelian.SerreClass.Basic Mathlib.CategoryTheory.Abelian.Transfer Mathlib.CategoryTheory.Action.Continuous Mathlib.CategoryTheory.Action.Limits Mathlib.CategoryTheory.Action.Monoidal Mathlib.CategoryTheory.Adjunction.Additive Mathlib.CategoryTheory.Generator.Abelian Mathlib.CategoryTheory.Generator.Indization Mathlib.CategoryTheory.Generator.Preadditive Mathlib.CategoryTheory.Limits.ConcreteCategory.WithAlgebraicStructures Mathlib.CategoryTheory.Linear.Yoneda Mathlib.CategoryTheory.Localization.CalculusOfFractions.Preadditive Mathlib.CategoryTheory.Monoidal.Cartesian.CommGrp_ Mathlib.CategoryTheory.Monoidal.Cartesian.CommMon_ Mathlib.CategoryTheory.Monoidal.Cartesian.Grp_ Mathlib.CategoryTheory.Monoidal.Cartesian.Mon_ Mathlib.CategoryTheory.Monoidal.CommGrp_ Mathlib.CategoryTheory.Monoidal.Grp_ Mathlib.CategoryTheory.Monoidal.Internal.Module Mathlib.CategoryTheory.Monoidal.Internal.Types.CommGrp_ Mathlib.CategoryTheory.Monoidal.Internal.Types.Grp_ Mathlib.CategoryTheory.ObjectProperty.EpiMono Mathlib.CategoryTheory.ObjectProperty.Extensions Mathlib.CategoryTheory.Preadditive.CommGrp_ Mathlib.CategoryTheory.Preadditive.Indization Mathlib.CategoryTheory.Preadditive.Opposite Mathlib.CategoryTheory.Preadditive.Transfer Mathlib.CategoryTheory.Preadditive.Yoneda.Basic Mathlib.CategoryTheory.Shift.Opposite Mathlib.CategoryTheory.Shift.ShiftedHomOpposite Mathlib.CategoryTheory.Sites.Abelian Mathlib.CategoryTheory.Subobject.NoetherianObject Mathlib.CategoryTheory.Triangulated.Opposite.Basic Mathlib.CategoryTheory.Triangulated.Opposite.Triangle Mathlib.Combinatorics.Optimization.ValuedCSP Mathlib.Computability.ContextFreeGrammar Mathlib.Computability.Language Mathlib.Computability.RegularExpressions Mathlib.Data.Matrix.Auto Mathlib.Data.Matrix.Basic Mathlib.Data.Matrix.Basis Mathlib.Data.Matrix.Bilinear Mathlib.Data.Matrix.Block Mathlib.Data.Matrix.Composition Mathlib.Data.Matrix.ConjTranspose Mathlib.Data.Matrix.DualNumber Mathlib.Data.Matrix.Hadamard Mathlib.Data.Matrix.Invertible Mathlib.Data.Matrix.Notation Mathlib.Data.Matrix.Reflection Mathlib.Data.Matrix.RowCol Mathlib.Data.Set.Semiring Mathlib.Dynamics.Flow Mathlib.Dynamics.Minimal Mathlib.Dynamics.OmegaLimit Mathlib.Geometry.RingedSpace.Basic Mathlib.GroupTheory.Coxeter.Matrix Mathlib.LinearAlgebra.Basis.Basic Mathlib.LinearAlgebra.Basis.Bilinear Mathlib.LinearAlgebra.Basis.Defs Mathlib.LinearAlgebra.Basis.Fin Mathlib.LinearAlgebra.Basis.Flag Mathlib.LinearAlgebra.Basis.Prod Mathlib.LinearAlgebra.Basis.SMul Mathlib.LinearAlgebra.Basis.Submodule Mathlib.LinearAlgebra.BilinearForm.Basic Mathlib.LinearAlgebra.BilinearForm.Hom Mathlib.LinearAlgebra.Countable Mathlib.LinearAlgebra.Dual.Basis Mathlib.LinearAlgebra.Finsupp.LSum Mathlib.LinearAlgebra.Finsupp.LinearCombination Mathlib.LinearAlgebra.Finsupp.Pi Mathlib.LinearAlgebra.Finsupp.Supported Mathlib.LinearAlgebra.FreeModule.Basic Mathlib.LinearAlgebra.LinearIndependent.Basic Mathlib.LinearAlgebra.LinearIndependent.Defs Mathlib.LinearAlgebra.LinearPMap Mathlib.LinearAlgebra.Matrix.Circulant Mathlib.LinearAlgebra.Matrix.DotProduct Mathlib.LinearAlgebra.Matrix.Permanent Mathlib.LinearAlgebra.Matrix.Symmetric Mathlib.LinearAlgebra.Matrix.Trace Mathlib.LinearAlgebra.Matrix.Unique Mathlib.LinearAlgebra.Multilinear.Basic Mathlib.LinearAlgebra.Multilinear.Basis Mathlib.LinearAlgebra.Multilinear.Curry Mathlib.LinearAlgebra.Multilinear.Pi Mathlib.LinearAlgebra.Multilinear.TensorProduct Mathlib.LinearAlgebra.PiTensorProduct Mathlib.LinearAlgebra.Pi Mathlib.LinearAlgebra.Prod Mathlib.LinearAlgebra.SModEq Mathlib.LinearAlgebra.TensorProduct.Associator Mathlib.LinearAlgebra.TensorProduct.Basic Mathlib.LinearAlgebra.TensorProduct.Opposite Mathlib.LinearAlgebra.TensorProduct.Pi Mathlib.LinearAlgebra.TensorProduct.Prod Mathlib.LinearAlgebra.TensorProduct.Tower Mathlib.MeasureTheory.Constructions.AddChar Mathlib.RingTheory.Adjoin.Basic Mathlib.RingTheory.AlgebraTower Mathlib.RingTheory.HahnSeries.Multiplication Mathlib.RingTheory.HahnSeries.Summable Mathlib.RingTheory.IntegralClosure.Algebra.Defs Mathlib.RingTheory.IntegralClosure.IsIntegral.Defs Mathlib.RingTheory.IntegralClosure.IsIntegralClosure.Defs Mathlib.RingTheory.LocalRing.Subring Mathlib.RingTheory.NonUnitalSubring.Basic Mathlib.RingTheory.NonUnitalSubsemiring.Basic Mathlib.RingTheory.PiTensorProduct Mathlib.RingTheory.SimpleRing.Field Mathlib.RingTheory.TensorProduct.Basic Mathlib.RingTheory.TensorProduct.Pi Mathlib.Tactic.Algebraize Mathlib.Topology.Algebra.Algebra.Rat Mathlib.Topology.Algebra.ConstMulAction Mathlib.Topology.Algebra.GroupWithZero Mathlib.Topology.Algebra.Monoid.AddChar Mathlib.Topology.Algebra.Monoid Mathlib.Topology.Algebra.MulAction Mathlib.Topology.Algebra.ProperAction.Basic Mathlib.Topology.Algebra.ProperConstSMul Mathlib.Topology.Algebra.Star Mathlib.Topology.ApproximateUnit Mathlib.Topology.LocallyConstant.Algebra |
2 |
14 filesMathlib.Algebra.Algebra.Rat Mathlib.Algebra.GroupWithZero.Action.Pointwise.Finset Mathlib.Algebra.GroupWithZero.Action.Pointwise.Set Mathlib.Algebra.GroupWithZero.Subgroup Mathlib.Algebra.GroupWithZero.Submonoid.Pointwise Mathlib.Algebra.Module.Equiv.Basic Mathlib.Algebra.Ring.Action.End Mathlib.Algebra.Ring.Action.Group Mathlib.Algebra.Ring.Subgroup Mathlib.Algebra.Star.Prod Mathlib.Data.Set.Pointwise.Support Mathlib.GroupTheory.Divisible Mathlib.LinearAlgebra.GeneralLinearGroup Mathlib.Topology.Bornology.Absorbs |
3 |
Mathlib.Algebra.GroupWithZero.Action.Basic Mathlib.Algebra.Ring.AddAut |
4 |
3 filesMathlib.Algebra.Order.Kleene Mathlib.Algebra.Order.Ring.Prod Mathlib.Algebra.Ring.Prod |
93 |
Mathlib.Algebra.GroupWithZero.Prod |
115 |
Mathlib.Algebra.GroupWithZero.ProdHom (new file) |
339 |
Declarations diff
+ WithZero.toMonoidWithZeroHom_withZeroUnitsEquiv
+ apply_one_apply_eq
+ commute_inl_inr
+ comp_one
+ fst
+ fst_apply_coe
+ fst_comp_inl
+ fst_comp_inr
+ fst_inl
+ fst_inr_apply_of_ne_zero
+ fst_surjective
+ inl
+ inl_apply_unit
+ inl_injective
+ inl_mul_inr_eq_mk_of_unit
+ inr
+ inr_apply_unit
+ inr_injective
+ map_eq_zero_iff
+ one
+ one_apply_apply_eq
+ one_apply_of_ne_zero
+ one_apply_val_unit
+ one_apply_zero
+ one_comp
+ recZeroCoe_one
+ snd
+ snd_apply_coe
+ snd_comp_inl
+ snd_comp_inr
+ snd_inl_apply_of_ne_zero
+ snd_inr
+ snd_surjective
+ withZeroUnitsEquiv_symm_apply_coe
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.
No changes to technical debt.
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).
|
|
||
| /-- The trivial homomorphism between monoids with zero, sending everything to 1 other than 0. -/ | ||
| noncomputable def trivial (M N : Type*) [MulZeroOneClass M] [MulZeroOneClass N] | ||
| [DecidablePred fun x : M ↦ x = 0] [Nontrivial M] [NoZeroDivisors M] : |
There was a problem hiding this comment.
I'd suggest using the simpler
| [DecidablePred fun x : M ↦ x = 0] [Nontrivial M] [NoZeroDivisors M] : | |
| [DecidableEq M] [Nontrivial M] [NoZeroDivisors M] : |
until you reach a case where you really need the precision
There was a problem hiding this comment.
The DecidablePred = 0 is trivially true for WithZero X for arbitrary X. Is that alright?
There was a problem hiding this comment.
Does mathlib know that fact, and is it used in this PR right now?
If everything is noncomputable for WithZero right now anyway, I'd prefer to leave that to a follow-up PR with the other changes you have in mind.
There was a problem hiding this comment.
I've removed the noncomputable here. Also, this DecidablePred is how the existing withZeroUnitsEquiv is defined.
and absorbing lemmas
…rooneclass basically associativity isn't needed
YaelDillies
left a comment
There was a problem hiding this comment.
Thanks!
maintainer delegate
|
🚀 Pull request has been placed on the maintainer queue by YaelDillies. |
|
Thanks! bors d+ |
|
✌️ pechersky can now approve this pull request. To approve and merge a pull request, simply reply with |
|
bors r+ |
Factored out from #22420
|
Build failed: |
|
bors r- |
|
bors r+ |
Factored out from #22420
|
Pull request successfully merged into master. Build succeeded: |
Factored out from #22420