Skip to content

Commit e89a3fe

Browse files
Merge master into nightly-testing
2 parents 9fc131c + 25a4a33 commit e89a3fe

128 files changed

Lines changed: 1695 additions & 482 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.

.github/actions/get-mathlib-ci/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ inputs:
1010
# Default pinned commit used by workflows unless they explicitly override.
1111
# Update this ref as needed to pick up changes to mathlib-ci scripts
1212
# This is also updated automatically by .github/workflows/update_dependencies.yml
13-
default: ca86f6900d53e503e28ec1cfa2bff2f505474553
13+
default: e356ad9e608e88717854e578c6d898b43e37d3e2
1414
path:
1515
description: Checkout destination path.
1616
required: false

Mathlib.lean

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ public import Mathlib.Algebra.Category.Ring.LinearAlgebra
235235
public import Mathlib.Algebra.Category.Ring.Topology
236236
public import Mathlib.Algebra.Category.Ring.Under.Basic
237237
public import Mathlib.Algebra.Category.Ring.Under.Limits
238+
public import Mathlib.Algebra.Category.Ring.Under.Property
238239
public import Mathlib.Algebra.Category.Semigrp.Basic
239240
public import Mathlib.Algebra.Central.Basic
240241
public import Mathlib.Algebra.Central.Defs
@@ -1557,6 +1558,7 @@ public import Mathlib.AlgebraicTopology.SimplicialSet.PiZero
15571558
public import Mathlib.AlgebraicTopology.SimplicialSet.Presentable
15581559
public import Mathlib.AlgebraicTopology.SimplicialSet.ProdStdSimplex
15591560
public import Mathlib.AlgebraicTopology.SimplicialSet.ProdStdSimplexOne
1561+
public import Mathlib.AlgebraicTopology.SimplicialSet.PushoutProduct
15601562
public import Mathlib.AlgebraicTopology.SimplicialSet.RegularEpi
15611563
public import Mathlib.AlgebraicTopology.SimplicialSet.RelativeMorphism
15621564
public import Mathlib.AlgebraicTopology.SimplicialSet.Simplices
@@ -2729,6 +2731,7 @@ public import Mathlib.CategoryTheory.LiftingProperties.Basic
27292731
public import Mathlib.CategoryTheory.LiftingProperties.Limits
27302732
public import Mathlib.CategoryTheory.LiftingProperties.Over
27312733
public import Mathlib.CategoryTheory.LiftingProperties.ParametrizedAdjunction
2734+
public import Mathlib.CategoryTheory.LiftingProperties.PushoutProduct
27322735
public import Mathlib.CategoryTheory.Limits.Bicones
27332736
public import Mathlib.CategoryTheory.Limits.ColimitLimit
27342737
public import Mathlib.CategoryTheory.Limits.Comma
@@ -6725,6 +6728,7 @@ public import Mathlib.RingTheory.Regular.Category
67256728
public import Mathlib.RingTheory.Regular.Depth
67266729
public import Mathlib.RingTheory.Regular.Flat
67276730
public import Mathlib.RingTheory.Regular.IsSMulRegular
6731+
public import Mathlib.RingTheory.Regular.ProjectiveDimension
67286732
public import Mathlib.RingTheory.Regular.RegularSequence
67296733
public import Mathlib.RingTheory.RegularLocalRing.Defs
67306734
public import Mathlib.RingTheory.RingHom.Bijective

Mathlib/Algebra/Azumaya/Matrix.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ abbrev AlgHom.mulLeftRightMatrix_inv :
3737
toFun f := ∑ ⟨⟨i, j⟩, k, l⟩ : (n × n) × n × n,
3838
f (single j k 1) i l • (single i j 1) ⊗ₜ[R] op (single k l 1)
3939
map_add' f1 f2 := by simp [add_smul, Finset.sum_add_distrib]
40-
map_smul' r f := by simp [SemigroupAction.mul_smul, Finset.smul_sum]
40+
map_smul' r f := by simp [mul_smul, Finset.smul_sum]
4141

4242
lemma AlgHom.mulLeftRightMatrix.inv_comp :
4343
(AlgHom.mulLeftRightMatrix_inv R n).comp

Mathlib/Algebra/BigOperators/Group/Finset/Basic.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,10 @@ lemma prod_filter_not_mul_prod_filter (s : Finset ι) (p : ι → Prop) [Decidab
156156
set_option backward.isDefEq.respectTransparency false in
157157
@[to_additive]
158158
theorem prod_filter_xor (p q : ι → Prop) [DecidablePred p] [DecidablePred q] :
159-
(∏ x ∈ s with (Xor' (p x) (q x)), f x) =
159+
(∏ x ∈ s with (Xor (p x) (q x)), f x) =
160160
(∏ x ∈ s with (p x ∧ ¬ q x), f x) * (∏ x ∈ s with (q x ∧ ¬ p x), f x) := by
161161
classical rw [← prod_union (disjoint_filter_and_not_filter _ _), ← filter_or]
162-
simp only [Xor']
162+
simp only [Xor]
163163

164164
@[to_additive]
165165
theorem _root_.IsCompl.prod_mul_prod [Fintype ι] {s t : Finset ι} (h : IsCompl s t) (f : ι → M) :

Mathlib/Algebra/Category/ModuleCat/Ext/Finite.lean

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ variable (R : Type u) [CommRing R]
2424

2525
open CategoryTheory Abelian
2626

27-
set_option backward.isDefEq.respectTransparency false in
2827
instance ModuleCat.finite_ext [Small.{v} R] [IsNoetherianRing R] (N M : ModuleCat.{v} R)
2928
[Module.Finite R N] [Module.Finite R M] (i : ℕ) : Module.Finite R (Ext N M i) := by
3029
induction i generalizing N with

Mathlib/Algebra/Category/ModuleCat/Monoidal/Closed.lean

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ theorem monoidalClosed_uncurry
6565
MonoidalClosed.uncurry f (x ⊗ₜ[R] y) = (f y).hom x :=
6666
rfl
6767

68-
set_option backward.isDefEq.respectTransparency false in
6968
/-- Describes the counit of the adjunction `M ⊗ - ⊣ Hom(M, -)`. Given an `R`-module `N` this
7069
should give a map `M ⊗ Hom(M, N) ⟶ N`, so we flip the order of the arguments in the identity map
7170
`Hom(M, N) ⟶ (M ⟶ N)` and uncurry the resulting map `M ⟶ Hom(M, N) ⟶ N.` -/
@@ -85,7 +84,6 @@ theorem ihom_coev_app (M N : ModuleCat.{u} R) :
8584
(ihom.coev M).app N = ModuleCat.ofHom₂ (TensorProduct.mk _ _ _).flip :=
8685
rfl
8786

88-
set_option backward.isDefEq.respectTransparency false in
8987
theorem monoidalClosed_pre_app {M N : ModuleCat.{u} R} (P : ModuleCat.{u} R) (f : N ⟶ M) :
9088
(MonoidalClosed.pre f).app P = ofHom (homLinearEquiv.symm.toLinearMap ∘ₗ
9189
LinearMap.lcomp _ _ f.hom ∘ₗ homLinearEquiv.toLinearMap) :=

Mathlib/Algebra/Category/Ring/Limits.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module
88
public import Mathlib.Algebra.Category.Grp.Limits
99
public import Mathlib.Algebra.Category.Ring.Basic
1010
public import Mathlib.Algebra.Ring.Pi
11-
public import Mathlib.Algebra.Ring.Shrink
11+
public import Mathlib.Algebra.Ring.Shrink -- shake: keep (Semiring (Shrink ...)), cf. lean#13417
1212
public import Mathlib.Algebra.Ring.Subring.Defs
1313

1414
/-!
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
/-
2+
Copyright (c) 2025 Christian Merten. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Christian Merten
5+
-/
6+
module
7+
8+
public import Mathlib.Algebra.Category.Ring.Under.Limits
9+
public import Mathlib.CategoryTheory.Limits.MorphismProperty
10+
public import Mathlib.CategoryTheory.ObjectProperty.FiniteProducts
11+
12+
/-!
13+
# Properties of `P.Under ⊤ R` for `R : CommRingCat`
14+
15+
In this file we translate ring theoretic properties of a property of ring homomorphisms
16+
`P` in properties of the category `P.Under ⊤ R`.
17+
18+
## Main results
19+
20+
- `CommRingCat.Under.hasFiniteLimits`: If `P` is stable under finite products and equalizers,
21+
`P.Under ⊤ R` has finite limits.
22+
-/
23+
24+
@[expose] public section
25+
26+
universe u
27+
28+
open CategoryTheory Limits
29+
30+
variable {Q : ∀ {R S : Type u} [CommRing R] [CommRing S], (R →+* S) → Prop}
31+
32+
open MorphismProperty
33+
34+
lemma RingHom.HasFiniteProducts.isClosedUnderLimitsOfShape (hQi : RespectsIso Q)
35+
(hQp : HasFiniteProducts Q) (R : CommRingCat.{u}) :
36+
(toMorphismProperty Q).underObj (X := R).IsClosedUnderFiniteProducts := by
37+
refine .of_isClosedUnderLimitsOfShape fun (J : Type u) _ ↦ ⟨fun A ⟨pres, hpres⟩ ↦ ?_⟩
38+
let e : A ≅ CommRingCat.mkUnder R (Π i, pres.diag.obj ⟨i⟩) :=
39+
(limit.isoLimitCone ⟨_, pres.isLimit⟩).symm ≪≫
40+
HasLimit.isoOfNatIso (Discrete.natIso fun i ↦ eqToIso <| by simp) ≪≫
41+
limit.isoLimitCone ⟨CommRingCat.Under.piFan <| fun i ↦ (pres.diag.obj ⟨i⟩),
42+
CommRingCat.Under.piFanIsLimit <| fun i ↦ (pres.diag.obj ⟨i⟩)⟩
43+
have : (toMorphismProperty Q).RespectsIso := toMorphismProperty_respectsIso_iff.mp hQi
44+
rw [underObj_iff, ← Under.w e.inv, (toMorphismProperty Q).cancel_right_of_respectsIso]
45+
exact hQp _ fun i ↦ hpres _
46+
47+
lemma RingHom.HasEqualizers.isClosedUnderLimitsOfShape (hQi : RespectsIso Q)
48+
(hQe : HasEqualizers Q) (R : CommRingCat.{u}) :
49+
(toMorphismProperty Q).underObj (X := R).IsClosedUnderLimitsOfShape WalkingParallelPair := by
50+
refine ⟨fun A ⟨pres, hpres⟩ ↦ ?_⟩
51+
let e : A ≅
52+
CommRingCat.mkUnder R
53+
(AlgHom.equalizer (R := R)
54+
(CommRingCat.toAlgHom (pres.diag.map .left))
55+
(CommRingCat.toAlgHom (pres.diag.map .right))) :=
56+
(limit.isoLimitCone ⟨_, pres.isLimit⟩).symm ≪≫
57+
HasLimit.isoOfNatIso (diagramIsoParallelPair _) ≪≫ limit.isoLimitCone
58+
⟨CommRingCat.Under.equalizerFork (pres.diag.map .left) (pres.diag.map .right),
59+
CommRingCat.Under.equalizerForkIsLimit
60+
(pres.diag.map .left) (pres.diag.map .right)⟩
61+
have : (toMorphismProperty Q).RespectsIso := toMorphismProperty_respectsIso_iff.mp hQi
62+
rw [underObj_iff, ← Under.w e.inv, (toMorphismProperty Q).cancel_right_of_respectsIso]
63+
exact hQe _ _ (hpres .zero) (hpres .one)
64+
65+
/-- If `Q` is stable under finite products, the inclusion from the subcategory of `Under R` defined
66+
by `Q` creates finite products. -/
67+
@[implicit_reducible]
68+
noncomputable def RingHom.HasFiniteProducts.createsFiniteProductsForget
69+
(hQi : RespectsIso Q) (hQp : HasFiniteProducts Q) (R : CommRingCat.{u}) :
70+
CreatesFiniteProducts (MorphismProperty.Under.forget (toMorphismProperty Q) ⊤ R) := by
71+
refine .mk' _ fun (J : Type u) _ ↦ ?_
72+
apply +allowSynthFailures Comma.forgetCreatesLimitsOfShapeOfClosed
73+
have := hQp.isClosedUnderLimitsOfShape hQi R
74+
exact inferInstanceAs <| (toMorphismProperty Q).underObj.IsClosedUnderLimitsOfShape _
75+
76+
lemma RingHom.HasFiniteProducts.hasFiniteProducts (hQi : RespectsIso Q) (hQp : HasFiniteProducts Q)
77+
(R : CommRingCat.{u}) :
78+
Limits.HasFiniteProducts ((RingHom.toMorphismProperty Q).Under ⊤ R) := by
79+
refine ⟨fun n ↦ ⟨fun D ↦ ?_⟩⟩
80+
have := hQp.createsFiniteProductsForget hQi R
81+
exact CategoryTheory.hasLimit_of_created D (Under.forget _ _ R)
82+
83+
/-- If `Q` is stable under equalizers, the inclusion from the subcategory of `Under R` defined
84+
by `Q` creates equalizers. -/
85+
@[implicit_reducible]
86+
noncomputable def RingHom.HasEqualizers.createsLimitsWalkingParallelPair (hQi : RespectsIso Q)
87+
(hQe : HasEqualizers Q) (R : CommRingCat.{u}) :
88+
CreatesLimitsOfShape WalkingParallelPair
89+
(MorphismProperty.Under.forget (toMorphismProperty Q) ⊤ R) := by
90+
apply +allowSynthFailures Comma.forgetCreatesLimitsOfShapeOfClosed
91+
exact hQe.isClosedUnderLimitsOfShape hQi _
92+
93+
lemma RingHom.HasEqualizers.hasEqualizers (hQi : RespectsIso Q) (hQe : HasEqualizers Q)
94+
(R : CommRingCat.{u}) :
95+
Limits.HasEqualizers ((toMorphismProperty Q).Under ⊤ R) := by
96+
refine ⟨fun D ↦ ?_⟩
97+
have := hQe.createsLimitsWalkingParallelPair hQi R
98+
exact hasLimit_of_created D (Under.forget _ _ R)
99+
100+
namespace CommRingCat
101+
102+
/-- If `Q` is stable under finite products and equalizers, the inclusion from the subcategory of
103+
`Under R` defined by `Q` creates finite limits. -/
104+
@[implicit_reducible]
105+
noncomputable def Under.createsFiniteLimitsForget (hQi : RingHom.RespectsIso Q)
106+
(hQp : RingHom.HasFiniteProducts Q) (hQe : RingHom.HasEqualizers Q) (R : CommRingCat.{u}) :
107+
CreatesFiniteLimits (Under.forget (RingHom.toMorphismProperty Q) ⊤ R) :=
108+
letI := hQp.createsFiniteProductsForget hQi
109+
letI := hQe.createsLimitsWalkingParallelPair hQi
110+
createsFiniteLimitsOfCreatesEqualizersAndFiniteProducts _
111+
112+
lemma Under.hasFiniteLimits (hQi : RingHom.RespectsIso Q)
113+
(hQp : RingHom.HasFiniteProducts Q) (hQe : RingHom.HasEqualizers Q) (R : CommRingCat.{u}) :
114+
HasFiniteLimits ((RingHom.toMorphismProperty Q).Under ⊤ R) :=
115+
have := hQp.hasFiniteProducts hQi
116+
have := hQe.hasEqualizers hQi
117+
hasFiniteLimits_of_hasEqualizers_and_finite_products
118+
119+
end CommRingCat

0 commit comments

Comments
 (0)