Skip to content

Commit baf40be

Browse files
committed
Merge branch 'master' into tb_art
2 parents d84b3d2 + 09370b0 commit baf40be

54 files changed

Lines changed: 1045 additions & 238 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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2469,6 +2469,7 @@ public import Mathlib.CategoryTheory.Adjunction.Limits
24692469
public import Mathlib.CategoryTheory.Adjunction.Mates
24702470
public import Mathlib.CategoryTheory.Adjunction.Opposites
24712471
public import Mathlib.CategoryTheory.Adjunction.Parametrized
2472+
public import Mathlib.CategoryTheory.Adjunction.ParametrizedLimits
24722473
public import Mathlib.CategoryTheory.Adjunction.PartialAdjoint
24732474
public import Mathlib.CategoryTheory.Adjunction.Quadruple
24742475
public import Mathlib.CategoryTheory.Adjunction.Reflective
@@ -4510,6 +4511,7 @@ public import Mathlib.Geometry.Convex.Cone.Simplicial
45104511
public import Mathlib.Geometry.Convex.Cone.TensorProduct
45114512
public import Mathlib.Geometry.Convex.ConvexSpace.AffineSpace
45124513
public import Mathlib.Geometry.Convex.ConvexSpace.Defs
4514+
public import Mathlib.Geometry.Convex.ConvexSpace.Prod
45134515
public import Mathlib.Geometry.Diffeology.Basic
45144516
public import Mathlib.Geometry.Euclidean.Altitude
45154517
public import Mathlib.Geometry.Euclidean.Angle.Bisector

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,11 @@ theorem mul_prod_eraseIdx {i} (hlen : i < l.length) (hcomm : ∀ a' ∈ l.take i
216216
hcomm a' (by rwa [take_eraseIdx_eq_take_of_le l i i (Nat.le_refl i)] at a'_mem)),
217217
insertIdx_eraseIdx_getElem hlen]
218218

219+
@[to_additive (attr := simp)]
220+
theorem prod_filter_bne_one [BEq M] [LawfulBEq M] (l : List M) :
221+
(l.filter (· != 1)).prod = l.prod := by
222+
classical induction l <;> grind
223+
219224
end Monoid
220225

221226
section CommMonoid

Mathlib/Algebra/Lie/Submodule.lean

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,6 @@ instance : Zero (LieSubmodule R L M) :=
7373
instance : Inhabited (LieSubmodule R L M) :=
7474
0
7575

76-
instance (priority := high) coeSort : CoeSort (LieSubmodule R L M) (Type w) where
77-
coe N := { x : M // x ∈ N }
78-
7976
instance (priority := mid) coeSubmodule : CoeOut (LieSubmodule R L M) (Submodule R M) :=
8077
⟨toSubmodule⟩
8178

Mathlib/Algebra/Module/StablyFree/Basic.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ public import Mathlib.RingTheory.Finiteness.Small
1313
# Stably free modules
1414
1515
## Main definition
16-
* `IsStablyFree`: A module `M` over a commutative ring `R` is called stably free if there exists a
17-
finite free module `N` over `R` such that `M ⊕ N` is free.
16+
* `IsStablyFree`: A module `M` over a ring `R` is called stably free if there exists a finite free
17+
`R`-module `N` such that `M ⊕ N` is free.
1818
-/
1919

2020
public section
@@ -23,8 +23,8 @@ universe u v w
2323

2424
namespace Module
2525

26-
/-- A module `M` over a commutative ring `R` is called stably free if there exists a
27-
finite free module `N` over `R` such that `M ⊕ N` is free.
26+
/-- A module `M` over a ring `R` is called stably free if there exists a finite free `R`-module `N`
27+
such that `M ⊕ N` is free.
2828
2929
The underlying constructor is marked as private. The intended constructor of `IsStablyFree` is
3030
`IsStablyFree.of_free_prod`, and use `IsStablyFree.exist_free_prod` to extract the property from

Mathlib/Algebra/MvPolynomial/Equiv.lean

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,25 @@ theorem uniqueAlgEquiv_symm_monomial [Unique σ] {d : σ →₀ ℕ} {r : R} :
9999
= MvPolynomial.monomial d r := by
100100
simp [MvPolynomial.monomial_eq]
101101

102+
/-- The coefficient of `X ^ n` in `uniqueAlgEquiv R σ P` is the coefficient of the unique
103+
monomial of degree `n` in `P`. -/
104+
theorem coeff_uniqueAlgEquiv [Unique σ] (P : MvPolynomial σ R) (n : ℕ) :
105+
(MvPolynomial.uniqueAlgEquiv R σ P : Polynomial R).coeff n =
106+
coeff (Finsupp.single default n) P := by
107+
induction P using induction_on' with
108+
| monomial d r =>
109+
rw [uniqueAlgEquiv_monomial, Finsupp.unique_single d]
110+
simp [Polynomial.coeff_monomial, MvPolynomial.coeff_monomial]
111+
| add P Q hP hQ =>
112+
simpa using congrArg₂ (· + ·) hP hQ
113+
114+
/-- The coefficient of a monomial in `(uniqueAlgEquiv R σ).symm P` is the coefficient of the
115+
corresponding univariate monomial in `P`. -/
116+
theorem coeff_uniqueAlgEquiv_symm [Unique σ] (P : Polynomial R) (d : σ →₀ ℕ) :
117+
coeff d ((MvPolynomial.uniqueAlgEquiv R σ).symm P) = P.coeff (d default) := by
118+
rw [Finsupp.unique_single d, ← coeff_uniqueAlgEquiv R, AlgEquiv.apply_symm_apply,
119+
Finsupp.single_eq_same]
120+
102121
/-- The algebra isomorphism between multivariable polynomials in a single variable and
103122
polynomials over the ground ring. -/
104123
@[deprecated uniqueAlgEquiv (since := "2026-04-15")]

Mathlib/AlgebraicGeometry/ProjectiveSpectrum/StructureSheaf.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ def homogeneousLocalizationToStalk (x : ProjectiveSpectrum.top 𝒜) (y : at x)
313313

314314
lemma homogeneousLocalizationToStalk_stalkToFiberRingHom (x z) :
315315
homogeneousLocalizationToStalk 𝒜 x (stalkToFiberRingHom 𝒜 x z) = z := by
316-
obtain ⟨U, hxU, s, rfl⟩ := (Proj.structureSheaf 𝒜).presheaf.germ_exist x z
316+
obtain ⟨U, hxU, s, rfl⟩ := (Proj.structureSheaf 𝒜).presheaf.exists_germ_eq z
317317
change homogeneousLocalizationToStalk 𝒜 x ((stalkToFiberRingHom 𝒜 x).hom
318318
(((Proj.structureSheaf 𝒜).presheaf.germ U x hxU) s)) =
319319
((Proj.structureSheaf 𝒜).presheaf.germ U x hxU) s

Mathlib/AlgebraicGeometry/Properties.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ instance isReduced_stalk_of_isReduced [IsReduced X] (x : X) :
8585
_root_.IsReduced (X.presheaf.stalk x) := by
8686
constructor
8787
rintro g ⟨n, e⟩
88-
obtain ⟨U, hxU, s, (rfl : (X.presheaf.germ U x hxU) s = g)⟩ := X.presheaf.germ_exist x g
88+
obtain ⟨U, hxU, s, (rfl : (X.presheaf.germ U x hxU) s = g)⟩ := X.presheaf.exists_germ_eq g
8989
rw [← map_pow, ← map_zero (X.presheaf.germ _ x hxU).hom] at e
9090
obtain ⟨V, hxV, iU, iV, (e' : (X.presheaf.map iU.op) (s ^ n) = (X.presheaf.map iV.op) 0)⟩ :=
9191
X.presheaf.germ_eq x hxU hxU _ 0 e

Mathlib/AlgebraicGeometry/Spec.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ def toPushforwardStalkAlgHom :
356356

357357
theorem isLocalizedModule_toPushforwardStalkAlgHom_aux (y) :
358358
∃ x : S × p.asIdeal.primeCompl, x.2 • y = toPushforwardStalkAlgHom R S p x.1 := by
359-
obtain ⟨U, hp, s, e⟩ := TopCat.Presheaf.germ_exist _ _ y
359+
obtain ⟨U, hp, s, e⟩ := TopCat.Presheaf.exists_germ_eq _ y
360360
obtain ⟨_, ⟨r, rfl⟩, hpr : p ∈ PrimeSpectrum.basicOpen r, hrU : PrimeSpectrum.basicOpen r ≤ U⟩ :=
361361
PrimeSpectrum.isTopologicalBasis_basic_opens.exists_subset_of_mem_open (show p ∈ U from hp) U.2
362362
change PrimeSpectrum.basicOpen r ≤ U at hrU

Mathlib/AlgebraicGeometry/SpreadingOut.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ lemma exists_lift_of_germInjective_aux {U : X.Opens} {x : X} (hxU)
245245
V ≤ U ∧ RingHom.range φ.hom ≤ RingHom.range (X.presheaf.germ V x hxV).hom := by
246246
letI := φRA.hom.toAlgebra
247247
obtain ⟨s, hs⟩ := hφRA
248-
choose W hxW f hf using fun t ↦ X.presheaf.germ_exist x (φ t)
248+
choose W hxW f hf using fun t ↦ X.presheaf.exists_germ_eq (φ t)
249249
have H : x ∈ s.inf W ⊓ U := by
250250
rw [← SetLike.mem_coe, TopologicalSpace.Opens.coe_inf, TopologicalSpace.Opens.coe_finset_inf]
251251
exact ⟨by simpa using fun x _ ↦ hxW x, hxU⟩

Mathlib/AlgebraicGeometry/StructureSheaf.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ def modulePresheafStalkIso (x : PrimeSpectrum.Top R) :
600600
Limits.colimit.isoColimitCocone ⟨_, Limits.isColimitOfPreserves (forget₂ (ModuleCat R) Ab)
601601
(Limits.colimit.isColimit ((OpenNhds.inclusion x).op ⋙
602602
structurePresheafInModuleCat R M))⟩
603-
obtain ⟨U, hxU, s, rfl⟩ := TopCat.Presheaf.germ_exist _ _ m
603+
obtain ⟨U, hxU, s, rfl⟩ := TopCat.Presheaf.exists_germ_eq _ m
604604
have : TopCat.Presheaf.germ (moduleStructurePresheaf R M).presheaf U x hxU ≫ α.hom =
605605
(forget₂ _ _).map ((structurePresheafInModuleCat R M).germ U x hxU) :=
606606
Limits.colimit.isoColimitCocone_ι_hom (C := Ab) ..
@@ -828,7 +828,7 @@ def commRingCatStalkEquivModuleStalk (x : PrimeSpectrum.Top R) :
828828
(forget₂ CommRingCat RingCat ⋙ forget₂ RingCat AddCommGrpCat)
829829
(Limits.colimit.isColimit ((OpenNhds.inclusion x).op ⋙
830830
structurePresheafInCommRingCat R))⟩)
831-
obtain ⟨U, hxU, s, rfl⟩ := TopCat.Presheaf.germ_exist _ _ m
831+
obtain ⟨U, hxU, s, rfl⟩ := TopCat.Presheaf.exists_germ_eq _ m
832832
have : (TopCat.Presheaf.germ (moduleStructurePresheaf R R).presheaf U x hxU) ≫ α.hom =
833833
(forget₂ CommRingCat RingCat ⋙ forget₂ RingCat AddCommGrpCat).map
834834
((structurePresheafInCommRingCat R).germ U x hxU) :=

0 commit comments

Comments
 (0)