Skip to content

Commit 6272103

Browse files
committed
Merge branch 'master' into tb_ramram
2 parents 6f51d0c + 70be100 commit 6272103

105 files changed

Lines changed: 2404 additions & 774 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: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3952,6 +3952,10 @@ public import Mathlib.Data.FunLike.Embedding
39523952
public import Mathlib.Data.FunLike.Equiv
39533953
public import Mathlib.Data.FunLike.Fintype
39543954
public import Mathlib.Data.FunLike.Graded
3955+
public import Mathlib.Data.FunLike.Group
3956+
public import Mathlib.Data.FunLike.IsApply
3957+
public import Mathlib.Data.FunLike.Module
3958+
public import Mathlib.Data.FunLike.Ring
39553959
public import Mathlib.Data.Holor
39563960
public import Mathlib.Data.Ineq
39573961
public import Mathlib.Data.Int.AbsoluteValue
@@ -4518,6 +4522,7 @@ public import Mathlib.Geometry.Convex.ConvexSpace.AffineSpace
45184522
public import Mathlib.Geometry.Convex.ConvexSpace.Defs
45194523
public import Mathlib.Geometry.Convex.ConvexSpace.Module
45204524
public import Mathlib.Geometry.Convex.ConvexSpace.Prod
4525+
public import Mathlib.Geometry.Convex.Set
45214526
public import Mathlib.Geometry.Diffeology.Basic
45224527
public import Mathlib.Geometry.Euclidean.Altitude
45234528
public import Mathlib.Geometry.Euclidean.Angle.Bisector
@@ -6998,6 +7003,7 @@ public import Mathlib.SetTheory.Cardinal.Aleph
69987003
public import Mathlib.SetTheory.Cardinal.Arithmetic
69997004
public import Mathlib.SetTheory.Cardinal.Basic
70007005
public import Mathlib.SetTheory.Cardinal.Cofinality.Basic
7006+
public import Mathlib.SetTheory.Cardinal.Cofinality.Club
70017007
public import Mathlib.SetTheory.Cardinal.Cofinality.Ordinal
70027008
public import Mathlib.SetTheory.Cardinal.Continuum
70037009
public import Mathlib.SetTheory.Cardinal.CountableCover
@@ -7458,12 +7464,16 @@ public import Mathlib.Topology.Algebra.Module.Cardinality
74587464
public import Mathlib.Topology.Algebra.Module.ClosedSubmodule
74597465
public import Mathlib.Topology.Algebra.Module.Compact
74607466
public import Mathlib.Topology.Algebra.Module.Complement
7467+
public import Mathlib.Topology.Algebra.Module.ContinuousLinearMap.Basic
7468+
public import Mathlib.Topology.Algebra.Module.ContinuousLinearMap.Idempotent
7469+
public import Mathlib.Topology.Algebra.Module.ContinuousLinearMap.PiProd
7470+
public import Mathlib.Topology.Algebra.Module.ContinuousLinearMap.Quotient
7471+
public import Mathlib.Topology.Algebra.Module.ContinuousLinearMap.Restrict
7472+
public import Mathlib.Topology.Algebra.Module.ContinuousLinearMap.RestrictScalars
74617473
public import Mathlib.Topology.Algebra.Module.Determinant
74627474
public import Mathlib.Topology.Algebra.Module.Equiv
74637475
public import Mathlib.Topology.Algebra.Module.FiniteDimension
74647476
public import Mathlib.Topology.Algebra.Module.FiniteDimensionBilinear
7465-
public import Mathlib.Topology.Algebra.Module.LinearMap
7466-
public import Mathlib.Topology.Algebra.Module.LinearMapPiProd
74677477
public import Mathlib.Topology.Algebra.Module.LinearPMap
74687478
public import Mathlib.Topology.Algebra.Module.LocallyConvex
74697479
public import Mathlib.Topology.Algebra.Module.ModuleTopology

Mathlib/Algebra/Algebra/Equiv.lean

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,13 @@ protected theorem coe_coe {F : Type*} [EquivLike F A₁ A₂] [AlgEquivClass F R
140140
theorem coe_fun_injective : @Function.Injective (A₁ ≃ₐ[R] A₂) (A₁ → A₂) fun e => (e : A₁ → A₂) :=
141141
DFunLike.coe_injective
142142

143-
instance : CoeOut (A₁ ≃ₐ[R] A₂) (A₁ ≃+* A₂) where coe := AlgEquiv.toRingEquiv
143+
/-- Forgetting the multiplicative structures, an equivalence of algebras is a linear equivalence. -/
144+
@[coe, simps! apply] def toLinearEquiv (e : A₁ ≃ₐ[R] A₂) : A₁ ≃ₗ[R] A₂ where
145+
toAddEquiv := e.toAddEquiv
146+
map_smul' := map_smulₛₗ e
147+
148+
instance : CoeOut (A₁ ≃ₐ[R] A₂) (A₁ ≃ₗ[R] A₂) where coe := toLinearEquiv
149+
instance : CoeOut (A₁ ≃ₐ[R] A₂) (A₁ ≃+* A₂) where coe := toRingEquiv
144150

145151
@[simp]
146152
theorem coe_toEquiv : ((e : A₁ ≃ A₂) : A₁ → A₂) = e :=
@@ -483,14 +489,6 @@ theorem ofAlgHom_symm (f : A₁ →ₐ[R] A₂) (g : A₂ →ₐ[R] A₁) (h₁
483489
(ofAlgHom f g h₁ h₂).symm = ofAlgHom g f h₂ h₁ :=
484490
rfl
485491

486-
/-- Forgetting the multiplicative structures, an equivalence of algebras is a linear equivalence. -/
487-
@[simps apply]
488-
def toLinearEquiv (e : A₁ ≃ₐ[R] A₂) : A₁ ≃ₗ[R] A₂ :=
489-
{ e with
490-
toFun := e
491-
map_smul' := map_smul e
492-
invFun := e.symm }
493-
494492
@[simp]
495493
theorem toLinearEquiv_refl : (AlgEquiv.refl : A₁ ≃ₐ[R] A₁).toLinearEquiv = LinearEquiv.refl R A₁ :=
496494
rfl
@@ -514,18 +512,16 @@ theorem toLinearEquiv_injective : Function.Injective (toLinearEquiv : _ → A₁
514512
fun _ _ h => ext <| LinearEquiv.congr_fun h
515513

516514
/-- Interpret an algebra equivalence as a linear map. -/
517-
def toLinearMap : A₁ →ₗ[R] A₂ :=
518-
e.toAlgHom.toLinearMap
515+
abbrev toLinearMap : A₁ →ₗ[R] A₂ :=
516+
e.toLinearEquiv
519517

520518
@[simp]
521-
theorem toAlgHom_toLinearMap : (e : A₁ →ₐ[R] A₂).toLinearMap = e.toLinearMap :=
522-
rfl
519+
lemma toAlgHom_toLinearMap : e.toAlgHom.toLinearMap = e.toLinearEquiv.toLinearMap := rfl
523520

524521
theorem toLinearMap_ofAlgHom (f : A₁ →ₐ[R] A₂) (g : A₂ →ₐ[R] A₁) (h₁ h₂) :
525522
(ofAlgHom f g h₁ h₂).toLinearMap = f.toLinearMap :=
526523
LinearMap.ext fun _ => rfl
527524

528-
@[simp]
529525
theorem toLinearEquiv_toLinearMap : e.toLinearEquiv.toLinearMap = e.toLinearMap :=
530526
rfl
531527

Mathlib/Algebra/Algebra/Tower.lean

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,9 @@ def restrictScalars (f : A →ₐ[S] B) : A →ₐ[R] B :=
187187

188188
theorem restrictScalars_apply (f : A →ₐ[S] B) (x : A) : f.restrictScalars R x = f x := rfl
189189

190+
@[simp] lemma toLinearMap_restrictScalars (f : A →ₐ[S] B) :
191+
(f.restrictScalars R).toLinearMap = f.toLinearMap.restrictScalars R := rfl
192+
190193
@[simp]
191194
theorem coe_restrictScalars (f : A →ₐ[S] B) : (f.restrictScalars R : A →+* B) = f := rfl
192195

@@ -229,6 +232,12 @@ def restrictScalars (f : A ≃ₐ[S] B) : A ≃ₐ[R] B :=
229232

230233
theorem restrictScalars_apply (f : A ≃ₐ[S] B) (x : A) : f.restrictScalars R x = f x := rfl
231234

235+
@[simp] lemma toAlgHom_restrictScalars (f : A ≃ₐ[S] B) :
236+
(f.restrictScalars R).toAlgHom = f.toAlgHom.restrictScalars R := rfl
237+
238+
@[simp] lemma toLinearEquiv_restrictScalars (f : A ≃ₐ[S] B) :
239+
(f.restrictScalars R).toLinearEquiv = f.toLinearEquiv.restrictScalars R := rfl
240+
232241
@[simp]
233242
theorem coe_restrictScalars (f : A ≃ₐ[S] B) : (f.restrictScalars R : A ≃+* B) = f := rfl
234243

Mathlib/Algebra/BigOperators/Finsupp/Basic.lean

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ theorem prod_mapRange_index {f : M → M'} {hf : f 0 = 0} {g : α →₀ M} {h :
7878
(h0 : ∀ a, h a 0 = 1) : (mapRange f hf g).prod h = g.prod fun a b => h a (f b) :=
7979
Finset.prod_subset support_mapRange fun _ _ H => by rw [notMem_support_iff.1 H, h0]
8080

81+
@[to_additive (attr := simp)]
82+
lemma prod_onFinset (s : Finset α) (f : α → M) (hf) (g : α → M → N) (hg : ∀ i ∈ s, g i 0 = 1) :
83+
(onFinset s f hf).prod g = ∏ a ∈ s, g a (f a) :=
84+
prod_of_support_subset _ support_onFinset_subset _ hg
85+
8186
@[to_additive (attr := simp)]
8287
theorem prod_zero_index {h : α → M → N} : (0 : α →₀ M).prod h = 1 :=
8388
rfl

Mathlib/Algebra/Module/Equiv/Basic.lean

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,12 @@ are defined by an action of `R` on `S` (formally, we have two scalar towers), th
4444
equivalence from `M` to `M₂` is also an `R`-linear equivalence.
4545
4646
See also `LinearMap.restrictScalars`. -/
47-
@[simps]
48-
def restrictScalars (f : M ≃ₗ[S] M₂) : M ≃ₗ[R] M₂ :=
49-
{ f.toLinearMap.restrictScalars R with
50-
toFun := f
51-
invFun := f.symm
52-
left_inv := f.left_inv
53-
right_inv := f.right_inv }
47+
@[simps!, simps toLinearMap]
48+
def restrictScalars (f : M ≃ₗ[S] M₂) : M ≃ₗ[R] M₂ where
49+
toLinearMap := f.toLinearMap.restrictScalars R
50+
invFun := f.symm
51+
left_inv := f.left_inv
52+
right_inv := f.right_inv
5453

5554
theorem restrictScalars_injective :
5655
Function.Injective (restrictScalars R : (M ≃ₗ[S] M₂) → M ≃ₗ[R] M₂) := fun _ _ h ↦

Mathlib/Algebra/Module/Equiv/Defs.lean

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,6 @@ def semilinearEquiv [RingHomInvPair σ σ'] [RingHomInvPair σ' σ]
120120
[EquivLike F M M₂] [SemilinearEquivClass F σ M M₂] (f : F) : M ≃ₛₗ[σ] M₂ :=
121121
{ (f : M ≃+ M₂), (f : M →ₛₗ[σ] M₂) with }
122122

123-
/-- Reinterpret an element of a type of semilinear equivalences as a semilinear equivalence. -/
124-
instance instCoeToSemilinearEquiv [RingHomInvPair σ σ'] [RingHomInvPair σ' σ]
125-
[EquivLike F M M₂] [SemilinearEquivClass F σ M M₂] : CoeHead F (M ≃ₛₗ[σ] M₂) where
126-
coe f := semilinearEquiv f
127-
128123
end SemilinearEquivClass
129124

130125
namespace LinearEquiv

Mathlib/Algebra/Polynomial/Basic.lean

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,9 @@ theorem coeff_C : coeff (C a) n = ite (n = 0) a 0 := by
640640
theorem coeff_C_zero : coeff (C a) 0 = a :=
641641
coeff_monomial
642642

643-
theorem coeff_C_ne_zero (h : n ≠ 0) : (C a).coeff n = 0 := by rw [coeff_C, if_neg h]
643+
theorem coeff_C_of_ne_zero (h : n ≠ 0) : (C a).coeff n = 0 := by rw [coeff_C, if_neg h]
644+
645+
@[deprecated (since := "2026-05-20")] alias coeff_C_ne_zero := coeff_C_of_ne_zero
644646

645647
@[simp]
646648
lemma coeff_C_succ {r : R} {n : ℕ} : coeff (C r) (n + 1) = 0 := by simp [coeff_C]

Mathlib/Algebra/Polynomial/Eval/Defs.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ theorem eval₂_mul_C' (h : Commute (f a) x) : eval₂ f x (p * C a) = eval₂ f
162162
intro k
163163
by_cases hk : k = 0
164164
· simp only [hk, h, coeff_C_zero]
165-
· simp only [coeff_C_ne_zero hk, map_zero, Commute.zero_left]
165+
· simp only [coeff_C_of_ne_zero hk, map_zero, Commute.zero_left]
166166

167167
theorem eval₂_list_prod_noncomm (ps : List R[X])
168168
(hf : ∀ p ∈ ps, ∀ (k), Commute (f <| coeff p k) x) :

Mathlib/Analysis/Asymptotics/TVS.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public import Mathlib.Analysis.Convex.EGauge
99
public import Mathlib.Analysis.LocallyConvex.BalancedCoreHull
1010
public import Mathlib.Analysis.Seminorm
1111
public import Mathlib.Analysis.Asymptotics.Defs
12-
public import Mathlib.Topology.Algebra.Module.LinearMapPiProd
12+
public import Mathlib.Topology.Algebra.Module.ContinuousLinearMap.PiProd
1313
import Mathlib.Tactic.Peel
1414
public import Mathlib.Tactic.Bound
1515
public import Mathlib.Topology.Instances.ENNReal.Lemmas

Mathlib/Analysis/Complex/Basic.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ public import Mathlib.Data.Complex.BigOperators
1111
public import Mathlib.LinearAlgebra.Complex.Module
1212
public import Mathlib.Topology.Algebra.Algebra.Equiv
1313
public import Mathlib.Topology.Algebra.InfiniteSum.Module
14+
public import Mathlib.Topology.Algebra.Module.ContinuousLinearMap.RestrictScalars
1415
public import Mathlib.Topology.Instances.RealVectorSpace
1516

1617
/-!
@@ -261,9 +262,8 @@ theorem conjCAE_toAlgEquiv : conjCAE.toAlgEquiv = conjAe :=
261262
@[simp] theorem conjCLE_toLinearEquiv : conjCLE.toLinearEquiv = conjAe.toLinearEquiv :=
262263
rfl
263264

264-
@[simp] lemma conjCLE_coe_toLinearMap :
265-
(conjCLE : ℂ →ₗ[ℝ] ℂ) = conjAe.toLinearMap :=
266-
rfl
265+
@[deprecated "Now provable by simp" (since := "2026-04-13")]
266+
lemma conjCLE_coe_toLinearMap : (conjCLE : ℂ →ₗ[ℝ] ℂ) = conjAe.toLinearMap := by simp
267267

268268
@[simp]
269269
theorem conjCAE_apply (z : ℂ) : conjCAE z = conj z :=

0 commit comments

Comments
 (0)