Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
1b045b9
feat(Topology/Sets): separation properties of `(Nonempty)Compacts` (#…
gasparattila May 8, 2026
043e9e0
chore(NumberTheory/Dioph): reduce defeq abuse of `Set α = α → Prop` (…
SnirBroshi May 8, 2026
8675f0a
feat(CategoryTheory): `ObjectProperty.ind P` is stable under products…
chrisflav May 9, 2026
210dc9f
feat(AlgebraicTopology/Quasicategory): inner fibrations and inner ano…
mckoen May 9, 2026
14d1d1e
chore(RingTheory/Localization/Finiteness): change some `CommRing` to …
mbkybky May 9, 2026
1ad783f
feat(FieldTheory/Galois/IsGaloisGroup): the top subgroup of a Galois …
tb65536 May 9, 2026
26c4381
feat(Translate): locally modify name guessing dictionaries (#37808)
JovanGerb May 9, 2026
81cccd5
fix(FunProp): be less strict about the shape of morphism theorems (#3…
lecopivo May 10, 2026
175f378
chore: split `SetTheory.Cardinal.Cofinality` (#38363)
vihdzp May 10, 2026
bac93a8
feat(Tactic/Translate/ToAdditive.lean): add conGen/AddConGen to the t…
AntoineChambert-Loir May 10, 2026
8431d92
feat(Order): OrderType cardinality lemmas (#38846)
YanYablonovskiy May 10, 2026
9304940
feat(Order/ConditionallyCompleteLattice/Indexed): `ciSup_mono'` for `…
SnirBroshi May 10, 2026
7d6fdac
feat(Order/ConditionallyCompleteLattice/Indexed): conditional version…
SnirBroshi May 10, 2026
c495aa5
feat(Order/ConditionallyCompleteLattice/Basic): `ConditionallyComplet…
SnirBroshi May 10, 2026
d8cbbf9
feat(Order/SuccPred/LinearLocallyFinite): `StrictMono toZ` (#39014)
vihdzp May 10, 2026
0b5b3a7
chore(*): golf while reducing defeq abuse `Set α = α → Prop` (#39020)
urkud May 10, 2026
fbe99d1
feat(Algebra/Order/SuccPred): generalize `CanonicallyOrderedAdd` to `…
vihdzp May 10, 2026
10647b5
feat(Data/List/TakeDrop): `take`/`drop` + `tail`/`dropLast` almost co…
SnirBroshi May 10, 2026
1bfec08
chore(Data/Int/Init): generalize `le_induction` from `Prop` to `Sort*…
SnirBroshi May 10, 2026
bcfd981
feat(Data/List): add lemma `List.notMem_subset` (#37561)
IvanRenison May 10, 2026
9e7d86b
feat(Data/Finset/Preimage): add lemmas about `Equiv.symm` (#37676)
IvanRenison May 10, 2026
7c80450
feat(Data/Finset/Powerset): add `filter_powersetCard_subset` (#38370)
FordUniver May 10, 2026
84fbb36
chore(RingTheory): move `IsLocalizedModule.Away` to the `Basic` file …
chrisflav May 10, 2026
47e40c5
feat: arbitrary-order induction on `Nat` (#38442)
Parcly-Taxel May 10, 2026
76ee00a
feat(Data/Finsupp/Weight): add `Finsupp.degree_mapDomain` (#38656)
NoahW314 May 10, 2026
15ac533
fix: rename `Pi.prod` to `Function.prod` (#38963)
linesthatinterlace May 10, 2026
6927ac9
chore(Order/SuccPred/LinearLocallyFinite): no expose (#39015)
vihdzp May 10, 2026
d9694e3
chore(Tactic/Translate): remove extra `}` in debug message (#39131)
hanwenzhu May 10, 2026
fdcab2e
chore(SetTheory): turn `#Ordinal = univ` around (#38365)
vihdzp May 10, 2026
b941391
chore: remove set_option in Analysis.Analytic.Composition (#38929)
sgouezel May 10, 2026
c31ea4a
chore(RepresentationTheory/Character): allow field and group to have …
tb65536 May 10, 2026
34d82a7
chore: fix accidental namespace (#39135)
vihdzp May 10, 2026
ec65f5a
doc: fix misleading docstrings (#39121)
HerrLaal May 10, 2026
835f8a3
feat(RingTheory): refactor `smulShortComplex` (#37355)
Thmoas-Guan May 10, 2026
e0b7a96
feat: supremum of `≤ c` ordinals of cardinal `≤ c` has cardinal `≤ c`…
vihdzp May 10, 2026
03fe349
feat(RingTheory/LocalRing/ResidueField/Fiber): `Ideal.Fiber` is a quo…
tb65536 May 10, 2026
dc38604
feat(CategoryTheory/Monoidal): Yoneda embedding of ring objects (#36913)
joelriou May 10, 2026
c05f2e2
chore(Algebra): remove simps projections for structures of bundled ob…
robin-carlier May 10, 2026
6cf2883
feat(CategoryTheory/Monoidal): tensorμ_braid_swap and tensor-product …
pedroscortes May 10, 2026
ed395cb
feat: `IsEquiv` is equivalent to `Equivalence` (#38827)
eric-wieser May 10, 2026
6152136
feat(Algebra/Order/Ring/Unbundled/Basic): add a generalization of `tw…
mortarsanjaya May 10, 2026
f764ddf
feat(AlgebraicTopology/DoldKan): the homotopy equivalence given by a …
joelriou May 10, 2026
c180dc7
feat(CategoryTheory): horizontal composition of Guitart exact squares…
joelriou May 10, 2026
73da2ca
feat(RingTheory): local isomorphisms (#38176)
chrisflav May 10, 2026
99178e1
feat(AlgebraicTopology/SimplicialSet): faces of the boundary (#38662)
joelriou May 10, 2026
fcf5297
chore(GroupTheory/SpecificGroups/Alternating): deprecate old proof of…
tb65536 May 10, 2026
6f105f7
feat(GroupTheory/Torsion): add `torsion_eq_top_iff` (#38718)
tb65536 May 10, 2026
154aaf0
feat: `DirSupClosedOn` is preserved under union (#38807)
vihdzp May 10, 2026
9086a86
feat(AlgebraicTopology/ModelCategory): precylinders in full subcatego…
joelriou May 10, 2026
ea680d1
feat(Algebra/Colimit/DirectLimit): nonunital algebra instances (#39017)
eric-wieser May 10, 2026
4514e7b
perf(AlgebraicGeometry/EllipticCurve/Affine/Point): help elaborator (…
kbuzzard May 10, 2026
1142854
feat(CategoryTheory/Triangulated): localizing subcategories (#38651)
joelriou May 10, 2026
be95839
feat(AlgebraicTopology/SimplicialSet): characterization of Kan comple…
joelriou May 10, 2026
1b6244b
feat(AlgebraicGeometry): rank of finite flat morphism (#38090)
chrisflav May 10, 2026
879015f
feat(Analysis): the trivial inner product space (#39065)
YaelDillies May 10, 2026
08fe4f2
feat: the cardinal of a finset is an ite sum over a bigger finset (#3…
EtienneC30 May 10, 2026
7d8b819
chore(Algebra/Module): remove some `backward.privateInPublic` (#38604)
wwylele May 10, 2026
f71cc9d
chore(NumberTheory/Divisors): golf `Int.mem_divisorsAntidiag` (#38889)
emlis42 May 10, 2026
06e0d3d
feat(AlgebraicTopology/SimplicialObject): iterations of δ 0 and σ 0 (…
joelriou May 10, 2026
9799e69
feat(Algebra/Homology): the homotopy fiber and the path object (#38997)
joelriou May 10, 2026
3b9726b
feat(Topology): ENat.toENNReal is a closed embedding (#39132)
wwylele May 10, 2026
7a3d878
feat(CategoryTheory/Localization): LocalizerMorphism.IsInduced (#39025)
joelriou May 10, 2026
cb63a06
feat: (anti-)periodicity of complex sinh,cosh,tanh (#38392)
ldct May 10, 2026
196aaf9
feat(NumberTheory/ModularForms): Δ = (E₄³ - E₆²) / 1728 (#38806)
CBirkbeck May 10, 2026
706bea1
feat(Analysis/SpecialFunctions/Pow/Continuity): add Filter.Tendsto.rp…
FordUniver May 10, 2026
6b495b4
Merge upstream/master@706bea155c (2026-05-10)
github-actions[bot] May 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Archive/Sensitivity.lean
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ set_option backward.isDefEq.respectTransparency false in
theorem g_injective : Injective (g m) := by
rw [g]
intro x₁ x₂ h
simp only [V, LinearMap.prod_apply, LinearMap.id_apply, Prod.mk_inj, Pi.prod] at h
simp only [V, LinearMap.prod_apply, LinearMap.id_apply, Prod.mk_inj, Function.prod_apply] at h
exact h.right

set_option backward.isDefEq.respectTransparency false in
Expand Down
17 changes: 14 additions & 3 deletions Mathlib.lean
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,7 @@ public import Mathlib.Algebra.Homology.HomotopyCategory.SingleFunctors
public import Mathlib.Algebra.Homology.HomotopyCategory.SpectralObject
public import Mathlib.Algebra.Homology.HomotopyCategory.Triangulated
public import Mathlib.Algebra.Homology.HomotopyCofiber
public import Mathlib.Algebra.Homology.HomotopyFiber
public import Mathlib.Algebra.Homology.ImageToKernel
public import Mathlib.Algebra.Homology.LeftResolution.Basic
public import Mathlib.Algebra.Homology.LeftResolution.Reduced
Expand Down Expand Up @@ -1379,6 +1380,7 @@ public import Mathlib.AlgebraicGeometry.Morphisms.FiniteType
public import Mathlib.AlgebraicGeometry.Morphisms.Flat
public import Mathlib.AlgebraicGeometry.Morphisms.FlatDescent
public import Mathlib.AlgebraicGeometry.Morphisms.FlatMono
public import Mathlib.AlgebraicGeometry.Morphisms.FlatRank
public import Mathlib.AlgebraicGeometry.Morphisms.FormallyUnramified
public import Mathlib.AlgebraicGeometry.Morphisms.Immersion
public import Mathlib.AlgebraicGeometry.Morphisms.Integral
Expand Down Expand Up @@ -1493,6 +1495,7 @@ public import Mathlib.AlgebraicTopology.ModelCategory.RightHomotopy
public import Mathlib.AlgebraicTopology.ModelCategory.Transport
public import Mathlib.AlgebraicTopology.MooreComplex
public import Mathlib.AlgebraicTopology.Quasicategory.Basic
public import Mathlib.AlgebraicTopology.Quasicategory.InnerFibration
public import Mathlib.AlgebraicTopology.Quasicategory.Nerve
public import Mathlib.AlgebraicTopology.Quasicategory.StrictBicategory
public import Mathlib.AlgebraicTopology.Quasicategory.StrictSegal
Expand All @@ -1519,11 +1522,13 @@ public import Mathlib.AlgebraicTopology.SimplicialNerve
public import Mathlib.AlgebraicTopology.SimplicialObject.Basic
public import Mathlib.AlgebraicTopology.SimplicialObject.ChainHomotopy
public import Mathlib.AlgebraicTopology.SimplicialObject.Coskeletal
public import Mathlib.AlgebraicTopology.SimplicialObject.DeltaZeroIter
public import Mathlib.AlgebraicTopology.SimplicialObject.Homotopy
public import Mathlib.AlgebraicTopology.SimplicialObject.II
public import Mathlib.AlgebraicTopology.SimplicialObject.Op
public import Mathlib.AlgebraicTopology.SimplicialObject.Split
public import Mathlib.AlgebraicTopology.SimplicialSet.AnodyneExtensions.Basic
public import Mathlib.AlgebraicTopology.SimplicialSet.AnodyneExtensions.Inner.Basic
public import Mathlib.AlgebraicTopology.SimplicialSet.AnodyneExtensions.IsUniquelyCodimOneFace
public import Mathlib.AlgebraicTopology.SimplicialSet.AnodyneExtensions.Op
public import Mathlib.AlgebraicTopology.SimplicialSet.AnodyneExtensions.Pairing
Expand Down Expand Up @@ -2718,6 +2723,7 @@ public import Mathlib.CategoryTheory.Groupoid.Grpd.Basic
public import Mathlib.CategoryTheory.Groupoid.Subgroupoid
public import Mathlib.CategoryTheory.Groupoid.VertexGroup
public import Mathlib.CategoryTheory.GuitartExact.Basic
public import Mathlib.CategoryTheory.GuitartExact.HorizontalComposition
public import Mathlib.CategoryTheory.GuitartExact.KanExtension
public import Mathlib.CategoryTheory.GuitartExact.Opposite
public import Mathlib.CategoryTheory.GuitartExact.Over
Expand Down Expand Up @@ -3037,6 +3043,7 @@ public import Mathlib.CategoryTheory.Monoidal.Cartesian.Mon
public import Mathlib.CategoryTheory.Monoidal.Cartesian.Mon_
public import Mathlib.CategoryTheory.Monoidal.Cartesian.Normal
public import Mathlib.CategoryTheory.Monoidal.Cartesian.Over
public import Mathlib.CategoryTheory.Monoidal.Cartesian.Ring
public import Mathlib.CategoryTheory.Monoidal.Cartesian.ShrinkYoneda
public import Mathlib.CategoryTheory.Monoidal.Category
public import Mathlib.CategoryTheory.Monoidal.Center
Expand Down Expand Up @@ -5673,7 +5680,6 @@ public import Mathlib.NumberTheory.ModularForms.Cusps
public import Mathlib.NumberTheory.ModularForms.DedekindEta
public import Mathlib.NumberTheory.ModularForms.Delta
public import Mathlib.NumberTheory.ModularForms.Derivative
public import Mathlib.NumberTheory.ModularForms.DimensionFormulas.LevelOne
public import Mathlib.NumberTheory.ModularForms.Discriminant
public import Mathlib.NumberTheory.ModularForms.EisensteinSeries.Basic
public import Mathlib.NumberTheory.ModularForms.EisensteinSeries.Defs
Expand All @@ -5691,7 +5697,9 @@ public import Mathlib.NumberTheory.ModularForms.JacobiTheta.Bounds
public import Mathlib.NumberTheory.ModularForms.JacobiTheta.Manifold
public import Mathlib.NumberTheory.ModularForms.JacobiTheta.OneVariable
public import Mathlib.NumberTheory.ModularForms.JacobiTheta.TwoVariable
public import Mathlib.NumberTheory.ModularForms.LevelOne
public import Mathlib.NumberTheory.ModularForms.LevelOne.Basic
public import Mathlib.NumberTheory.ModularForms.LevelOne.DimensionFormula
public import Mathlib.NumberTheory.ModularForms.LevelOne.GradedRing
public import Mathlib.NumberTheory.ModularForms.NormTrace
public import Mathlib.NumberTheory.ModularForms.Petersson
public import Mathlib.NumberTheory.ModularForms.ProperlyDiscontinuous
Expand Down Expand Up @@ -6569,6 +6577,7 @@ public import Mathlib.RingTheory.LaurentSeries
public import Mathlib.RingTheory.Length
public import Mathlib.RingTheory.LinearDisjoint
public import Mathlib.RingTheory.LittleWedderburn
public import Mathlib.RingTheory.LocalIso
public import Mathlib.RingTheory.LocalProperties.Basic
public import Mathlib.RingTheory.LocalProperties.Exactness
public import Mathlib.RingTheory.LocalProperties.Injective
Expand Down Expand Up @@ -6958,7 +6967,8 @@ public import Mathlib.RingTheory.ZariskisMainTheorem
public import Mathlib.SetTheory.Cardinal.Aleph
public import Mathlib.SetTheory.Cardinal.Arithmetic
public import Mathlib.SetTheory.Cardinal.Basic
public import Mathlib.SetTheory.Cardinal.Cofinality
public import Mathlib.SetTheory.Cardinal.Cofinality.Basic
public import Mathlib.SetTheory.Cardinal.Cofinality.Ordinal
public import Mathlib.SetTheory.Cardinal.Continuum
public import Mathlib.SetTheory.Cardinal.CountableCover
public import Mathlib.SetTheory.Cardinal.Defs
Expand Down Expand Up @@ -7722,6 +7732,7 @@ public import Mathlib.Topology.Instances.AddCircle.Real
public import Mathlib.Topology.Instances.CantorSet
public import Mathlib.Topology.Instances.Complex
public import Mathlib.Topology.Instances.Discrete
public import Mathlib.Topology.Instances.ENNReal.ENatENNReal
public import Mathlib.Topology.Instances.ENNReal.Lemmas
public import Mathlib.Topology.Instances.ENat
public import Mathlib.Topology.Instances.EReal.Lemmas
Expand Down
14 changes: 7 additions & 7 deletions Mathlib/Algebra/Algebra/NonUnitalHom.lean
Original file line number Diff line number Diff line change
Expand Up @@ -371,13 +371,13 @@ variable [DistribMulAction R C]
/-- The prod of two morphisms is a morphism. -/
@[simps]
def prod (f : A →ₙₐ[R] B) (g : A →ₙₐ[R] C) : A →ₙₐ[R] B × C where
toFun := Pi.prod f g
map_zero' := by simp only [Pi.prod, Prod.mk_zero_zero, map_zero]
map_add' x y := by simp only [Pi.prod, Prod.mk_add_mk, map_add]
map_mul' x y := by simp only [Pi.prod, Prod.mk_mul_mk, map_mul]
map_smul' c x := by simp only [Pi.prod, map_smul, MonoidHom.id_apply, Prod.smul_mk]
toFun := Function.prod f g
map_zero' := by simp only [Function.prod_apply, Prod.mk_zero_zero, map_zero]
map_add' x y := by simp only [Function.prod_apply, Prod.mk_add_mk, map_add]
map_mul' x y := by simp only [Function.prod_apply, Prod.mk_mul_mk, map_mul]
map_smul' c x := by simp only [Function.prod_apply, map_smul, MonoidHom.id_apply, Prod.smul_mk]

theorem coe_prod (f : A →ₙₐ[R] B) (g : A →ₙₐ[R] C) : ⇑(f.prod g) = Pi.prod f g :=
theorem coe_prod (f : A →ₙₐ[R] B) (g : A →ₙₐ[R] C) : ⇑(f.prod g) = Function.prod f g :=
rfl

@[simp]
Expand All @@ -390,7 +390,7 @@ theorem snd_prod (f : A →ₙₐ[R] B) (g : A →ₙₐ[R] C) : (snd R B C).com

@[simp]
theorem prod_fst_snd : prod (fst R A B) (snd R A B) = 1 :=
coe_injective Pi.prod_fst_snd
coe_injective Function.prod_fst_snd

/-- Taking the product of two maps with the same domain is equivalent to taking the product of
their codomains. -/
Expand Down
4 changes: 2 additions & 2 deletions Mathlib/Algebra/Algebra/Prod.lean
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,15 @@ theorem snd_apply (a) : snd R A B a = a.2 := rfl

variable {R}

/-- The `Pi.prod` of two morphisms is a morphism. -/
/-- The `Function.prod` of two morphisms is a morphism. -/
@[simps!]
def prod (f : A →ₐ[R] B) (g : A →ₐ[R] C) : A →ₐ[R] B × C :=
{ f.toRingHom.prod g.toRingHom with
commutes' := fun r => by
simp only [toRingHom_eq_coe, RingHom.toFun_eq_coe, RingHom.prod_apply, coe_toRingHom,
commutes, Prod.algebraMap_apply] }

theorem coe_prod (f : A →ₐ[R] B) (g : A →ₐ[R] C) : ⇑(f.prod g) = Pi.prod f g :=
theorem coe_prod (f : A →ₐ[R] B) (g : A →ₐ[R] C) : ⇑(f.prod g) = Function.prod f g :=
rfl

@[simp]
Expand Down
12 changes: 2 additions & 10 deletions Mathlib/Algebra/Algebra/Subalgebra/Lattice.lean
Original file line number Diff line number Diff line change
Expand Up @@ -700,19 +700,11 @@ theorem adjoin_span {s : Set A} : adjoin R (Submodule.span R s : Set A) = adjoin
le_antisymm (adjoin_le (span_le_adjoin _ _)) (adjoin_mono Submodule.subset_span)

theorem adjoin_image (f : A →ₐ[R] B) (s : Set A) : adjoin R (f '' s) = (adjoin R s).map f :=
le_antisymm (adjoin_le <| Set.image_mono subset_adjoin) <|
Subalgebra.map_le.2 <| adjoin_le <| Set.image_subset_iff.1 <| by
simp only [Set.image_id', coe_carrier_toSubmonoid, Subalgebra.coe_toSubsemiring,
Subalgebra.coe_comap]
exact fun x hx => subset_adjoin ⟨x, hx, rfl⟩
eq_of_forall_ge_iff fun t ↦ by simp [Subalgebra.map_le, adjoin_le_iff]

@[simp]
theorem adjoin_insert_adjoin (x : A) : adjoin R (insert x ↑(adjoin R s)) = adjoin R (insert x s) :=
le_antisymm
(adjoin_le
(Set.insert_subset_iff.mpr
⟨subset_adjoin (Set.mem_insert _ _), adjoin_mono (Set.subset_insert _ _)⟩))
(Algebra.adjoin_mono (Set.insert_subset_insert Algebra.subset_adjoin))
eq_of_forall_ge_iff fun t ↦ by simp [adjoin_le_iff, Set.insert_subset_iff]

theorem mem_adjoin_of_map_mul {s} {x : A} {f : A →ₗ[R] B} (hf : ∀ a₁ a₂, f (a₁ * a₂) = f a₁ * f a₂)
(h : x ∈ adjoin R s) : f x ∈ adjoin R (f '' (s ∪ {1})) := by
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/Algebra/Tower.lean
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ section Algebra.algebraMapSubmonoid

@[simp]
theorem Algebra.algebraMapSubmonoid_map_map {R A B : Type*} [CommSemiring R] [CommSemiring A]
[Algebra R A] (M : Submonoid R) [CommRing B] [Algebra R B] [Algebra A B] [IsScalarTower R A B] :
[Algebra R A] (M : Submonoid R) [Semiring B] [Algebra R B] [Algebra A B] [IsScalarTower R A B] :
algebraMapSubmonoid B (algebraMapSubmonoid A M) = algebraMapSubmonoid B M :=
algebraMapSubmonoid_map_eq _ (IsScalarTower.toAlgHom R A B)

Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/BigOperators/Finprod.lean
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ lemma one_le_finprod {M : Type*} [CommMonoidWithZero M] [Preorder M] [ZeroLEOneC
theorem MonoidHom.map_finprod_plift (f : M →* N) (g : α → M)
(h : HasFiniteMulSupport <| g ∘ PLift.down) : f (∏ᶠ x, g x) = ∏ᶠ x, f (g x) := by
rw [finprod_eq_prod_plift_of_mulSupport_subset h.coe_toFinset.ge,
finprod_eq_prod_plift_of_mulSupport_subset, map_prod]
finprod_eq_prod_plift_of_mulSupport_subset, _root_.map_prod]
rw [h.coe_toFinset]
exact mulSupport_comp_subset f.map_one (g ∘ PLift.down)

Expand Down
3 changes: 3 additions & 0 deletions Mathlib/Algebra/BigOperators/Ring/Finset.lean
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ lemma natCast_card_filter (p) [DecidablePred p] (s : Finset ι) :
(∑ x ∈ s, if p x then 1 else 0 : R) = #{x ∈ s | p x} :=
(natCast_card_filter _ _).symm

lemma card_eq_sum_ite {s t : Finset ι} [DecidablePred (· ∈ s)] (hst : s ⊆ t) :
s.card = ∑ i ∈ t, if i ∈ s then 1 else 0 := by simp [hst]

end AddCommMonoidWithOne

section NonUnitalNonAssocSemiring
Expand Down
1 change: 1 addition & 0 deletions Mathlib/Algebra/Category/BialgCat/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ structure BialgCat where
[instRing : Ring carrier]
[instBialgebra : Bialgebra R carrier]

initialize_simps_projections BialgCat (-instRing, -instBialgebra)
attribute [instance] BialgCat.instBialgebra BialgCat.instRing

variable {R}
Expand Down
1 change: 1 addition & 0 deletions Mathlib/Algebra/Category/HopfAlgCat/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ structure HopfAlgCat where
[instRing : Ring carrier]
[instHopfAlgebra : HopfAlgebra R carrier]

initialize_simps_projections HopfAlgCat (-instRing, -instHopfAlgebra)
attribute [instance] HopfAlgCat.instHopfAlgebra HopfAlgCat.instRing

variable {R}
Expand Down
1 change: 1 addition & 0 deletions Mathlib/Algebra/Category/ModuleCat/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ structure ModuleCat where
[isAddCommGroup : AddCommGroup carrier]
[isModule : Module R carrier]

initialize_simps_projections ModuleCat (-isModule, -isAddCommGroup)
attribute [instance] ModuleCat.isAddCommGroup
attribute [instance 1100] ModuleCat.isModule

Expand Down
1 change: 1 addition & 0 deletions Mathlib/Algebra/Category/ModuleCat/Semi.lean
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ structure SemimoduleCat where
[isAddCommMonoid : AddCommMonoid carrier]
[isModule : Module R carrier]

initialize_simps_projections SemimoduleCat (-isModule, -isAddCommMonoid)
attribute [instance] SemimoduleCat.isAddCommMonoid SemimoduleCat.isModule

namespace SemimoduleCat
Expand Down
18 changes: 18 additions & 0 deletions Mathlib/Algebra/Colimit/DirectLimit.lean
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,24 @@ instance [Semiring R] [∀ i, AddCommMonoid (G i)] [∀ i, Module R (G i)]
{ add_smul _ _ := DirectLimit.induction _ fun i _ ↦ by simp_rw [smul_def, add_smul, add_def],
zero_smul := DirectLimit.induction _ fun i _ ↦ by simp_rw [smul_def, zero_smul, zero_def i] }

instance [∀ i, Mul (G i)] [∀ i, SMul R (G i)] [∀ i, IsScalarTower R (G i) (G i)]
[∀ i j h, MulHomClass (T h) (G i) (G j)] [∀ i j h, MulActionHomClass (T h) R (G i) (G j)] :
IsScalarTower R (DirectLimit G f) (DirectLimit G f) where
smul_assoc r := DirectLimit.induction₂ _ fun i _ _ ↦ by
simp_rw [smul_eq_mul, smul_def, mul_def, smul_def, smul_mul_assoc]

instance [∀ i, Mul (G i)] [∀ i, SMul R (G i)] [∀ i, SMulCommClass R (G i) (G i)]
[∀ i j h, MulHomClass (T h) (G i) (G j)] [∀ i j h, MulActionHomClass (T h) R (G i) (G j)] :
SMulCommClass R (DirectLimit G f) (DirectLimit G f) where
smul_comm r := DirectLimit.induction₂ _ fun i _ _ ↦ by
simp_rw [smul_eq_mul, smul_def, mul_def, smul_def, mul_smul_comm]

instance [∀ i, Mul (G i)] [∀ i, SMul R (G i)] [∀ i, SMulCommClass (G i) R (G i)]
[∀ i j h, MulHomClass (T h) (G i) (G j)] [∀ i j h, MulActionHomClass (T h) R (G i) (G j)] :
SMulCommClass (DirectLimit G f) R (DirectLimit G f) :=
have _ (i) : SMulCommClass R (G i) (G i) := SMulCommClass.symm _ _ _
SMulCommClass.symm _ _ _

end Action

section DivisionSemiring
Expand Down
4 changes: 2 additions & 2 deletions Mathlib/Algebra/Exact.lean
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ namespace Function
variable (f : M → N) (g : N → P) (g' : P → P')

/-- The maps `f` and `g` form an exact pair: `g y = 1` iff `y` belongs to the image of `f`. -/
@[to_additive Exact /-- The maps `f` and `g` form an exact pair:
@[to_additive /-- The maps `f` and `g` form an exact pair:
`g y = 0` iff `y` belongs to the image of `f`. -/]
def MulExact [One P] : Prop := ∀ y, g y = 1 ↔ y ∈ Set.range f

Expand Down Expand Up @@ -428,7 +428,7 @@ def Exact.splitInjectiveEquiv
have h₂ : ∀ x, g (f x) = 0 := congr_fun h.comp_eq_zero
constructor
· intro x y e
simp only [prod_apply, Pi.prod, Prod.mk.injEq] at e
simp only [LinearMap.prod_apply, Function.prod_apply, Prod.mk.injEq] at e
obtain ⟨z, hz⟩ := (h (x - y)).mp (by simpa [sub_eq_zero] using e.2)
rw [← sub_eq_zero, ← hz, ← h₁ z, hz, map_sub, e.1, sub_self, map_zero]
· rintro ⟨x, y⟩
Expand Down
8 changes: 4 additions & 4 deletions Mathlib/Algebra/Group/Prod.lean
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,11 @@ theorem coe_snd : ⇑(snd M N) = Prod.snd :=
`f.prod g : AddHom M (N × P)` given by `(f.prod g) x = (f x, g x)` -/]
protected def prod (f : M →ₙ* N) (g : M →ₙ* P) :
M →ₙ* N × P where
toFun := Pi.prod f g
toFun := Function.prod f g
map_mul' x y := Prod.ext (f.map_mul x y) (g.map_mul x y)

@[to_additive coe_prod]
theorem coe_prod (f : M →ₙ* N) (g : M →ₙ* P) : ⇑(f.prod g) = Pi.prod f g :=
theorem coe_prod (f : M →ₙ* N) (g : M →ₙ* P) : ⇑(f.prod g) = Function.prod f g :=
rfl

@[to_additive (attr := simp) prod_apply]
Expand Down Expand Up @@ -387,12 +387,12 @@ given by `(f.prod g) x = (f x, g x)`. -/
`f.prod g : M →+ N × P` given by `(f.prod g) x = (f x, g x)` -/]
protected def prod (f : M →* N) (g : M →* P) :
M →* N × P where
toFun := Pi.prod f g
toFun := Function.prod f g
map_one' := Prod.ext f.map_one g.map_one
map_mul' x y := Prod.ext (f.map_mul x y) (g.map_mul x y)

@[to_additive coe_prod]
theorem coe_prod (f : M →* N) (g : M →* P) : ⇑(f.prod g) = Pi.prod f g :=
theorem coe_prod (f : M →* N) (g : M →* P) : ⇑(f.prod g) = Function.prod f g :=
rfl

@[to_additive (attr := simp) prod_apply]
Expand Down
4 changes: 4 additions & 0 deletions Mathlib/Algebra/Group/Subgroup/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,10 @@ theorem normalClosure_le_normal {N : Subgroup G} [N.Normal] (h : s ⊆ N) : norm
theorem normalClosure_subset_iff {N : Subgroup G} [N.Normal] : s ⊆ N ↔ normalClosure s ≤ N :=
⟨normalClosure_le_normal, Set.Subset.trans subset_normalClosure⟩

@[simp]
theorem normalClosure_eq_bot_iff : normalClosure s = ⊥ ↔ s ⊆ {1} := by
rw [eq_bot_iff, ← normalClosure_subset_iff, coe_bot]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing @[to_additive] on new subgroup lemma

Low Severity

The new normalClosure_eq_bot_iff lemma is missing the @[to_additive] attribute. Every surrounding lemma in this section (normalClosure_subset_iff, normalClosure_mono, normalClosure_eq_iInf, normalClosure_eq_self, normalClosure_idempotent) carries @[to_additive] to auto-generate the AddSubgroup version. Without it, the additive counterpart AddSubgroup.normalClosure_eq_bot_iff won't exist, breaking the expected API symmetry between Subgroup and AddSubgroup.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 6b495b4. Configure here.


@[to_additive (attr := gcongr)]
theorem normalClosure_mono {s t : Set G} (h : s ⊆ t) : normalClosure s ≤ normalClosure t :=
normalClosure_le_normal (Set.Subset.trans h subset_normalClosure)
Expand Down
7 changes: 7 additions & 0 deletions Mathlib/Algebra/Homology/ComplexShape.lean
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,13 @@ def symm (c : ComplexShape ι) : ComplexShape ι where
next_eq w w' := c.prev_eq w w'
prev_eq w w' := c.next_eq w w'

/-- If `c : ComplexShape α` is such that `c.Rel` is decidable, it is also the
case of `c.symm.Rel`. -/
@[implicit_reducible]
def decidableRelSymm {α : Type*} (c : ComplexShape α) [DecidableRel c.Rel] :
DecidableRel c.symm.Rel :=
fun a b ↦ decidable_of_iff (c.Rel b a) Iff.rfl

@[simp]
theorem symm_symm (c : ComplexShape ι) : c.symm.symm = c := rfl

Expand Down
19 changes: 18 additions & 1 deletion Mathlib/Algebra/Homology/HomotopyCofiber.lean
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,16 @@ noncomputable def XIso (i : ι) (hi : ¬ c.Rel i (c.next i)) :
X φ i ≅ G.X i :=
eqToIso (dif_neg hi)

lemma isZero_X (i : ι) (hG : IsZero (G.X i))
(hF : ∀ (j : ι), c.Rel i j → IsZero (F.X j)) :
IsZero (X φ i) := by
by_cases h : c.Rel i (c.next i)
· haveI := HasHomotopyCofiber.hasBinaryBiproduct φ _ _ h
refine IsZero.of_iso ?_ (XIsoBiprod φ _ _ h)
simp only [biprod_isZero_iff]
exact ⟨hF _ h, hG⟩
· exact hG.of_iso (XIso φ i h)

/-- The second projection `(homotopyCofiber φ).X i ⟶ G.X i`. -/
noncomputable def sndX (i : ι) : X φ i ⟶ G.X i :=
if hi : c.Rel i (c.next i)
Expand Down Expand Up @@ -376,7 +386,13 @@ section

variable (K)
variable [∀ i, HasBinaryBiproduct (K.X i) (K.X i)]
[HasHomotopyCofiber (biprod.lift (𝟙 K) (-𝟙 K))]

/-- Given a homological complex `K`, this is the property that the morphism
`K ⟶ K ⊞ K` induced by `𝟙 K` and `-𝟙 K` has a cofiber, which allows
to define `K.cylinder` as this cofiber. -/
abbrev HasCylinder : Prop := HasHomotopyCofiber (biprod.lift (𝟙 K) (-𝟙 K))

variable [K.HasCylinder]

/-- The cylinder object of a homological complex `K` is the homotopy cofiber
of the morphism `biprod.lift (𝟙 K) (-𝟙 K) : K ⟶ K ⊞ K`. -/
Expand Down Expand Up @@ -525,6 +541,7 @@ noncomputable def πCompι₀Homotopy : Homotopy (π K ≫ ι₀ K) (𝟙 K.cyli
(πCompι₀Homotopy.nullHomotopy K))

/-- The homotopy equivalence between `K.cylinder` and `K`. -/
@[simps]
noncomputable def homotopyEquiv : HomotopyEquiv K.cylinder K where
hom := π K
inv := ι₀ K
Expand Down
Loading
Loading