Skip to content

Commit 7d90da3

Browse files
committed
Merge remote-tracking branch 'upstream/master' into pentagonal
2 parents 2b9181e + 7175569 commit 7d90da3

331 files changed

Lines changed: 4379 additions & 1523 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Mathlib.lean

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ public import Mathlib.Algebra.Category.Ring.FinitePresentation
232232
public import Mathlib.Algebra.Category.Ring.Instances
233233
public import Mathlib.Algebra.Category.Ring.Limits
234234
public import Mathlib.Algebra.Category.Ring.LinearAlgebra
235+
public import Mathlib.Algebra.Category.Ring.Small
235236
public import Mathlib.Algebra.Category.Ring.Topology
236237
public import Mathlib.Algebra.Category.Ring.Under.Basic
237238
public import Mathlib.Algebra.Category.Ring.Under.Limits
@@ -809,6 +810,7 @@ public import Mathlib.Algebra.Module.Shrink
809810
public import Mathlib.Algebra.Module.SnakeLemma
810811
public import Mathlib.Algebra.Module.SpanRank
811812
public import Mathlib.Algebra.Module.SpanRankOperations
813+
public import Mathlib.Algebra.Module.StablyFree.Basic
812814
public import Mathlib.Algebra.Module.Submodule.Basic
813815
public import Mathlib.Algebra.Module.Submodule.Bilinear
814816
public import Mathlib.Algebra.Module.Submodule.Defs
@@ -2241,6 +2243,7 @@ public import Mathlib.Analysis.Polynomial.Order
22412243
public import Mathlib.Analysis.Quaternion
22422244
public import Mathlib.Analysis.RCLike.Basic
22432245
public import Mathlib.Analysis.RCLike.BoundedContinuous
2246+
public import Mathlib.Analysis.RCLike.ContinuousMap
22442247
public import Mathlib.Analysis.RCLike.Extend
22452248
public import Mathlib.Analysis.RCLike.Inner
22462249
public import Mathlib.Analysis.RCLike.Lemmas
@@ -2970,6 +2973,7 @@ public import Mathlib.CategoryTheory.Localization.Monoidal
29702973
public import Mathlib.CategoryTheory.Localization.Monoidal.Basic
29712974
public import Mathlib.CategoryTheory.Localization.Monoidal.Braided
29722975
public import Mathlib.CategoryTheory.Localization.Monoidal.Functor
2976+
public import Mathlib.CategoryTheory.Localization.OfQuotient
29732977
public import Mathlib.CategoryTheory.Localization.Opposite
29742978
public import Mathlib.CategoryTheory.Localization.Pi
29752979
public import Mathlib.CategoryTheory.Localization.Preadditive
@@ -3275,6 +3279,8 @@ public import Mathlib.CategoryTheory.Sites.CoverLifting
32753279
public import Mathlib.CategoryTheory.Sites.CoverPreserving
32763280
public import Mathlib.CategoryTheory.Sites.Coverage
32773281
public import Mathlib.CategoryTheory.Sites.CoversTop
3282+
public import Mathlib.CategoryTheory.Sites.CoversTop.Basic
3283+
public import Mathlib.CategoryTheory.Sites.CoversTop.Over
32783284
public import Mathlib.CategoryTheory.Sites.DenseSubsite.Basic
32793285
public import Mathlib.CategoryTheory.Sites.DenseSubsite.InducedTopology
32803286
public import Mathlib.CategoryTheory.Sites.DenseSubsite.OneHypercoverDense
@@ -3407,6 +3413,7 @@ public import Mathlib.CategoryTheory.Triangulated.Opposite.Basic
34073413
public import Mathlib.CategoryTheory.Triangulated.Opposite.Functor
34083414
public import Mathlib.CategoryTheory.Triangulated.Opposite.OpOp
34093415
public import Mathlib.CategoryTheory.Triangulated.Opposite.Pretriangulated
3416+
public import Mathlib.CategoryTheory.Triangulated.Opposite.Subcategory
34103417
public import Mathlib.CategoryTheory.Triangulated.Opposite.Triangle
34113418
public import Mathlib.CategoryTheory.Triangulated.Opposite.Triangulated
34123419
public import Mathlib.CategoryTheory.Triangulated.Orthogonal
@@ -3485,6 +3492,7 @@ public import Mathlib.Combinatorics.Extremal.RuzsaSzemeredi
34853492
public import Mathlib.Combinatorics.Graph.Basic
34863493
public import Mathlib.Combinatorics.Graph.Delete
34873494
public import Mathlib.Combinatorics.Graph.Lattice
3495+
public import Mathlib.Combinatorics.Graph.Maps
34883496
public import Mathlib.Combinatorics.Graph.Subgraph
34893497
public import Mathlib.Combinatorics.HalesJewett
34903498
public import Mathlib.Combinatorics.Hall.Basic
@@ -5653,6 +5661,7 @@ public import Mathlib.NumberTheory.ModularForms.Cusps
56535661
public import Mathlib.NumberTheory.ModularForms.DedekindEta
56545662
public import Mathlib.NumberTheory.ModularForms.Delta
56555663
public import Mathlib.NumberTheory.ModularForms.Derivative
5664+
public import Mathlib.NumberTheory.ModularForms.DimensionFormulas.LevelOne
56565665
public import Mathlib.NumberTheory.ModularForms.Discriminant
56575666
public import Mathlib.NumberTheory.ModularForms.EisensteinSeries.Basic
56585667
public import Mathlib.NumberTheory.ModularForms.EisensteinSeries.Defs
@@ -6406,6 +6415,7 @@ public import Mathlib.RingTheory.Flat.EquationalCriterion
64066415
public import Mathlib.RingTheory.Flat.FaithfullyFlat.Algebra
64076416
public import Mathlib.RingTheory.Flat.FaithfullyFlat.Basic
64086417
public import Mathlib.RingTheory.Flat.FaithfullyFlat.Descent
6418+
public import Mathlib.RingTheory.Flat.IsBaseChange
64096419
public import Mathlib.RingTheory.Flat.Localization
64106420
public import Mathlib.RingTheory.Flat.Rank
64116421
public import Mathlib.RingTheory.Flat.Stability
@@ -6843,6 +6853,7 @@ public import Mathlib.RingTheory.TensorProduct.IncludeLeftSubRight
68436853
public import Mathlib.RingTheory.TensorProduct.IsBaseChangeFree
68446854
public import Mathlib.RingTheory.TensorProduct.IsBaseChangeHom
68456855
public import Mathlib.RingTheory.TensorProduct.IsBaseChangePi
6856+
public import Mathlib.RingTheory.TensorProduct.IsBaseChangeRightExact
68466857
public import Mathlib.RingTheory.TensorProduct.Maps
68476858
public import Mathlib.RingTheory.TensorProduct.MonoidAlgebra
68486859
public import Mathlib.RingTheory.TensorProduct.MvPolynomial
@@ -7556,6 +7567,7 @@ public import Mathlib.Topology.Category.TopCat.Sphere
75567567
public import Mathlib.Topology.Category.TopCat.ULift
75577568
public import Mathlib.Topology.Category.TopCat.Yoneda
75587569
public import Mathlib.Topology.Category.TopCommRingCat
7570+
public import Mathlib.Topology.Category.TopPair
75597571
public import Mathlib.Topology.Category.UniformSpace
75607572
public import Mathlib.Topology.Clopen
75617573
public import Mathlib.Topology.ClopenBox
@@ -7626,6 +7638,7 @@ public import Mathlib.Topology.ContinuousMap.Units
76267638
public import Mathlib.Topology.ContinuousMap.Weierstrass
76277639
public import Mathlib.Topology.ContinuousMap.ZeroAtInfty
76287640
public import Mathlib.Topology.ContinuousOn
7641+
public import Mathlib.Topology.Convenient.Category
76297642
public import Mathlib.Topology.Convenient.ContinuousMapGeneratedBy
76307643
public import Mathlib.Topology.Convenient.GeneratedBy
76317644
public import Mathlib.Topology.Convenient.HomSpace

Mathlib/Algebra/Algebra/Defs.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ instance (priority := 1100) id : Algebra R R where
386386
-- be made so without a significant performance hit.
387387
-- see library note [reducible non-instances].
388388
toSMul := instSMulOfMul
389-
__ := ({ RingHom.id R with toFun x := x }).toAlgebra
389+
__ := (RingHom.id R).toAlgebra
390390

391391
@[simp] lemma linearMap_self : Algebra.linearMap R R = .id := rfl
392392

Mathlib/Algebra/Category/CommAlgCat/FiniteType.lean

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,13 @@ lemma Algebra.FiniteType.exists_fgAlgCatSkeleton (A : Type v) [CommRing A] [Alge
4747
obtain ⟨n, f, hf⟩ := Algebra.FiniteType.iff_quotient_mvPolynomial''.mp h
4848
exact ⟨⟨n, RingHom.ker f⟩, ⟨(Ideal.quotientKerAlgEquivOfSurjective hf).symm⟩⟩
4949

50+
lemma RingHom.FiniteType.exists_smallRepr {S : Type v} [CommRing S] {f : R →+* S}
51+
(hf : f.FiniteType) :
52+
∃ (T : FGAlgCatSkeleton R) (e : T.eval.obj ≃+* S), f = e.toRingHom.comp (algebraMap _ _) := by
53+
algebraize [f]
54+
obtain ⟨T, ⟨e⟩⟩ := Algebra.FiniteType.exists_fgAlgCatSkeleton R S
55+
exact ⟨T, e.symm.toRingEquiv, e.symm.toAlgHom.comp_algebraMap.symm⟩
56+
5057
/-- Universe lift functor for finitely generated algebras. -/
5158
def FGAlgCat.uliftFunctor : FGAlgCat.{v} R ⥤ FGAlgCat.{max v w} R where
5259
obj A := ⟨.of R <| ULift A.1, .equiv inferInstance ULift.algEquiv.symm⟩

Mathlib/Algebra/Category/Grp/FilteredColimits.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ noncomputable def colimitCocone : Cocone F where
130130
ι.app J := GrpCat.ofHom ((MonCat.FilteredColimits.colimitCocone
131131
(F ⋙ forget₂ GrpCat MonCat)).ι.app J).hom
132132
ι.naturality _ _ f := (forget₂ _ MonCat).map_injective
133-
((MonCat.FilteredColimits.colimitCocone _).ι.naturality f)
133+
((MonCat.FilteredColimits.colimitCocone (F ⋙ forget₂ GrpCat MonCat)).ι.naturality f)
134134

135135
/-- The proposed colimit cocone is a colimit in `GrpCat`. -/
136136
@[to_additive /-- The proposed colimit cocone is a colimit in `AddGroup`. -/]
@@ -191,7 +191,7 @@ noncomputable def colimitCocone : Cocone F where
191191
ι.app J := CommGrpCat.ofHom
192192
((GrpCat.FilteredColimits.colimitCocone (F ⋙ forget₂ CommGrpCat GrpCat)).ι.app J).hom
193193
ι.naturality _ _ f := (forget₂ _ GrpCat).map_injective
194-
((GrpCat.FilteredColimits.colimitCocone _).ι.naturality f)
194+
((GrpCat.FilteredColimits.colimitCocone (F ⋙ forget₂ CommGrpCat GrpCat)).ι.naturality f)
195195

196196
/-- The proposed colimit cocone is a colimit in `CommGrpCat`. -/
197197
@[to_additive /-- The proposed colimit cocone is a colimit in `AddCommGroup`. -/]

Mathlib/Algebra/Category/ModuleCat/ChangeOfRings.lean

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1037,7 +1037,6 @@ lemma extendScalars_assoc :
10371037
erw [h₂]
10381038
rw [h₃, ExtendScalars.map_tmul, h₄]
10391039

1040-
set_option backward.isDefEq.respectTransparency false in
10411040
/-- The associativity compatibility for the extension of scalars, in the exact form
10421041
that is needed in the definition `CommRingCat.moduleCatExtendScalarsPseudofunctor`
10431042
in the file `Mathlib/Algebra/Category/ModuleCat/Pseudofunctor.lean` -/

Mathlib/Algebra/Category/ModuleCat/Presheaf/Pushforward.lean

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ variable (F : C ⥤ D)
3737
set_option backward.isDefEq.respectTransparency false in
3838
/-- Implementation of `pushforward₀`. -/
3939
@[simps]
40-
def pushforward₀_obj (R : Dᵒᵖ ⥤ RingCat.{u}) (M : PresheafOfModules R) :
40+
def pushforward₀Obj (R : Dᵒᵖ ⥤ RingCat.{u}) (M : PresheafOfModules R) :
4141
PresheafOfModules (F.op ⋙ R) :=
4242
{ obj X := ModuleCat.of _ (M.obj (F.op.obj X))
4343
map {X Y} f := M.map (F.op.map f)
@@ -52,13 +52,15 @@ def pushforward₀_obj (R : Dᵒᵖ ⥤ RingCat.{u}) (M : PresheafOfModules R) :
5252
(@LinearMap.ext _ _ _ _ _ _ _ _ (_) (_) _ _ _ (fun x => ?_))
5353
exact (M.congr_map_apply (F.op.map_comp f g) x).trans (by simp) }
5454

55+
@[deprecated (since := "2026-04-27")] alias pushforward₀_obj := pushforward₀Obj
56+
5557
set_option backward.isDefEq.respectTransparency false in
5658
/-- The pushforward functor on presheaves of modules for a functor `F : C ⥤ D` and
5759
`R : Dᵒᵖ ⥤ RingCat`. On the underlying presheaves of abelian groups, it is induced
5860
by the precomposition with `F.op`. -/
5961
def pushforward₀ (R : Dᵒᵖ ⥤ RingCat.{u}) :
6062
PresheafOfModules.{v} R ⥤ PresheafOfModules.{v} (F.op ⋙ R) where
61-
obj M := pushforward₀_obj F R M
63+
obj M := pushforward₀Obj F R M
6264
map {M₁ M₂} φ := { app X := φ.app _ }
6365

6466
/-- If `F : C ⥤ D` if a functor and `R : Dᵒᵖ ⥤ CommRingCat` is a presheaf

Mathlib/Algebra/Category/ModuleCat/Sheaf/Generators.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module
77

88
public import Mathlib.Algebra.Category.ModuleCat.Sheaf.Free
99
public import Mathlib.Algebra.Category.ModuleCat.Sheaf.PushforwardContinuous
10-
public import Mathlib.CategoryTheory.Sites.CoversTop
10+
public import Mathlib.CategoryTheory.Sites.CoversTop.Basic
1111

1212
/-!
1313
# Generating sections of sheaves of modules

Mathlib/Algebra/Category/ModuleCat/Sheaf/Quasicoherent.lean

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ Authors: Joël Riou
55
-/
66
module
77

8-
public import Mathlib.Algebra.Category.ModuleCat.Sheaf.Generators
98
public import Mathlib.Algebra.Category.ModuleCat.Sheaf.Abelian
10-
public import Mathlib.CategoryTheory.Comma.Over.Pullback
9+
public import Mathlib.Algebra.Category.ModuleCat.Sheaf.Generators
10+
public import Mathlib.CategoryTheory.Sites.CoversTop.Over
1111

1212
/-!
1313
# Quasicoherent sheaves
@@ -361,11 +361,9 @@ noncomputable def QuasicoherentData.bind {R : Sheaf J RingCat.{u}}
361361
(M : SheafOfModules.{u} R) {I : Type u}
362362
(X : I → C) (hX : J.CoversTop X) (D : Π i, QuasicoherentData (M.over (X i))) :
363363
M.QuasicoherentData where
364-
I := Σ i, (D i).I
364+
I := (i : I) × (D i).I
365365
X ij := ((D ij.1).X ij.2).left
366-
coversTop Y := J.transitive (hX Y) _ fun Z f ⟨i, ⟨g⟩⟩ ↦
367-
J.superset_covering ((Sieve.functorPushforward_ofObjects_le _ _ _).trans
368-
(Sieve.ofObjects_mono fun i' ↦ by aesop)) ((D i).coversTop (.mk g))
366+
coversTop := hX.over (fun i ↦ (D i).coversTop)
369367
presentation i :=
370368
letI e := pushforwardPushforwardEquivalence (Over.iteratedSliceEquiv ((D i.1).X i.2))
371369
(S := (R.over _).over _) (R := R.over _) (𝟙 _) (𝟙 _)

Mathlib/Algebra/Category/ModuleCat/Topology/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ def freeMap {X Y : TopCat.{v}} (f : X ⟶ Y) : freeObj R X ⟶ freeObj R Y :=
421421
ext x
422422
simp [coe_freeObj]⟩
423423

424-
lemma freeMap_map {X Y : TopCat} (f : X ⟶ Y) (v : X →₀ R) :
424+
lemma freeMap_map {X Y : TopCat.{v}} (f : X ⟶ Y) (v : X →₀ R) :
425425
(freeMap R f : (X →₀ R) → (Y →₀ R)) v = Finsupp.mapDomain f.hom v := rfl
426426

427427
/-- The free topological module over a topological space as a functor.
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
/-
2+
Copyright (c) 2026 Andrew Yang. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Andrew Yang
5+
-/
6+
module
7+
8+
public import Mathlib.Algebra.Category.CommAlgCat.FiniteType
9+
public import Mathlib.CategoryTheory.ObjectProperty.Small
10+
11+
12+
/-! # Smallness results on the category of `CommRing` -/
13+
14+
@[expose] public section
15+
16+
universe u
17+
18+
open CategoryTheory
19+
20+
namespace CommRingCat
21+
22+
variable {P Q : ObjectProperty CommRingCat.{u}}
23+
24+
lemma essentiallySmall_of_finiteType [ObjectProperty.EssentiallySmall.{u} Q]
25+
(hPQ : ∀ S, P S → ∃ R, Q R ∧ ∃ (f : R ⟶ S), f.hom.FiniteType) :
26+
ObjectProperty.EssentiallySmall.{u} P := by
27+
obtain ⟨Q', _, hQ'Q, hQQ'⟩ := ObjectProperty.EssentiallySmall.exists_small_le Q
28+
let f (S : Σ R : Subtype Q', FGAlgCatSkeleton R) : CommRingCat := .of S.2.eval.obj
29+
refine ⟨.ofObj f, inferInstance, fun S hS ↦ ?_⟩
30+
obtain ⟨R, hR, φ, hφ⟩ := hPQ S hS
31+
wlog hR' : Q' R generalizing R
32+
· obtain ⟨R', hR', ⟨e⟩⟩ := hQQ' _ hR
33+
exact this R' (hQ'Q _ hR') (e.inv ≫ φ)
34+
(hφ.comp e.symm.commRingCatIsoToRingEquiv.finite.finiteType) hR'
35+
obtain ⟨T, e, he⟩ := hφ.exists_smallRepr
36+
exact ⟨_, ⟨⟨_, hR'⟩, T⟩, ⟨RingEquiv.toCommRingCatIso e.symm⟩⟩
37+
38+
lemma essentiallySmall_of_localizationAway [ObjectProperty.EssentiallySmall.{u} Q]
39+
(hPQ : ∀ S, P S → ∃ s : Set S, Ideal.span s = ⊤ ∧ ∀ f ∈ s, Q (.of (Localization.Away f))) :
40+
ObjectProperty.EssentiallySmall.{u} P := by
41+
obtain ⟨Q', _, hQ'Q, hQQ'⟩ := ObjectProperty.EssentiallySmall.exists_small_le Q
42+
let f (S : Σ (n : ℕ) (R : Fin n → Subtype Q'), Subring (Π i, (R i).1)) : CommRingCat := .of S.2.2
43+
refine ⟨.ofObj f, inferInstance, fun S hS ↦ ?_⟩
44+
obtain ⟨s, hs, H⟩ := hPQ S hS
45+
wlog hs' : s.Finite generalizing s
46+
· obtain ⟨s', hs's, hs'⟩ := (Ideal.span_eq_top_iff_finite _).mp hs
47+
exact this s' hs' (fun f hf ↦ H f (hs's hf)) s'.finite_toSet
48+
choose S' hS' e using fun (f : s) ↦ hQQ' _ (H _ f.2)
49+
let φ : S →+* Π i, S' (hs'.equivFin.symm i) :=
50+
((RingEquiv.piCongrRight fun i ↦ (e i).some.commRingCatIsoToRingEquiv).trans
51+
(RingEquiv.piCongrLeft (S' ·) hs'.equivFin.symm).symm).toRingHom.comp (algebraMap _ _)
52+
have hφ : Function.Injective φ := by
53+
dsimp only [RingHom.coe_comp, φ]
54+
refine (RingEquiv.injective _).comp (Localization.algebraMap_injective_of_span_eq_top _ hs)
55+
refine ⟨_, ⟨Nat.card s, (fun f ↦ ⟨S' f, hS' f⟩) ∘ hs'.equivFin.symm, φ.range⟩, ⟨?_⟩⟩
56+
exact (RingEquiv.ofBijective φ.rangeRestrict
57+
⟨φ.injective_codRestrict.mpr hφ, φ.rangeRestrict_surjective⟩).toCommRingCatIso
58+
59+
end CommRingCat

0 commit comments

Comments
 (0)