Skip to content

Commit 07a3151

Browse files
author
mathlib4-bot
committed
Merge remote-tracking branch 'upstream/master' into bump/v4.31.0
2 parents dd30058 + 7b476a1 commit 07a3151

50 files changed

Lines changed: 966 additions & 440 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: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6062,7 +6062,8 @@ public import Mathlib.Probability.Independence.Kernel
60626062
public import Mathlib.Probability.Independence.Kernel.Indep
60636063
public import Mathlib.Probability.Independence.Kernel.IndepFun
60646064
public import Mathlib.Probability.Independence.Process.Basic
6065-
public import Mathlib.Probability.Independence.Process.HasIndepIncrements
6065+
public import Mathlib.Probability.Independence.Process.HasIndepIncrements.Basic
6066+
public import Mathlib.Probability.Independence.Process.HasIndepIncrements.IsGaussianProcess
60666067
public import Mathlib.Probability.Independence.ZeroOne
60676068
public import Mathlib.Probability.Kernel.Basic
60686069
public import Mathlib.Probability.Kernel.Category.SFinKer
@@ -6880,6 +6881,7 @@ public import Mathlib.SetTheory.Ordinal.Notation
68806881
public import Mathlib.SetTheory.Ordinal.Principal
68816882
public import Mathlib.SetTheory.Ordinal.Rank
68826883
public import Mathlib.SetTheory.Ordinal.Topology
6884+
public import Mathlib.SetTheory.Ordinal.Univ
68836885
public import Mathlib.SetTheory.Ordinal.Veblen
68846886
public import Mathlib.SetTheory.ZFC.Basic
68856887
public import Mathlib.SetTheory.ZFC.Cardinal

Mathlib/Algebra/Algebra/Unitization.lean

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -362,23 +362,23 @@ section
362362

363363
variable (R)
364364

365-
@[simp]
365+
@[simp, norm_cast]
366366
theorem inr_zero [Zero R] [Zero A] : ↑(0 : A) = (0 : Unitization R A) :=
367367
rfl
368368

369-
@[simp]
369+
@[simp, norm_cast]
370370
theorem inr_add [AddZeroClass R] [Add A] (m₁ m₂ : A) : (↑(m₁ + m₂) : Unitization R A) = m₁ + m₂ :=
371371
Unitization.ext (add_zero 0).symm rfl
372372

373-
@[simp]
373+
@[simp, norm_cast]
374374
theorem inr_neg [AddGroup R] [Neg A] (m : A) : (↑(-m) : Unitization R A) = -m :=
375375
Unitization.ext neg_zero.symm rfl
376376

377-
@[simp]
377+
@[simp, norm_cast]
378378
theorem inr_sub [AddGroup R] [AddGroup A] (m₁ m₂ : A) : (↑(m₁ - m₂) : Unitization R A) = m₁ - m₂ :=
379379
Unitization.ext (sub_zero 0).symm rfl
380380

381-
@[simp]
381+
@[simp, norm_cast]
382382
theorem inr_smul [Zero R] [SMulZeroClass S R] [SMul S A] (r : S) (m : A) :
383383
(↑(r • m) : Unitization R A) = r • (m : Unitization R A) :=
384384
Unitization.ext (smul_zero _).symm rfl
@@ -485,10 +485,12 @@ theorem inr_mul [MulZeroClass R] [AddZeroClass A] [Mul A] [SMulWithZero R A] (a
485485

486486
end
487487

488+
@[norm_cast]
488489
theorem inl_mul_inr [MulZeroClass R] [NonUnitalNonAssocSemiring A] [SMulZeroClass R A] (r : R)
489490
(a : A) : ((inl r : Unitization R A) * a) = ↑(r • a) :=
490491
Unitization.ext (mul_zero r) <| by simp
491492

493+
@[norm_cast]
492494
theorem inr_mul_inl [MulZeroClass R] [NonUnitalNonAssocSemiring A] [SMulZeroClass R A] (r : R)
493495
(a : A) : a * (inl r : Unitization R A) = ↑(r • a) :=
494496
Unitization.ext (zero_mul r) <| by simp
@@ -590,7 +592,7 @@ theorem inl_star [Star R] [AddMonoid A] [StarAddMonoid A] (r : R) :
590592
inl (star r) = star (inl r : Unitization R A) :=
591593
Unitization.ext rfl (by simp only [snd_star, star_zero, snd_inl])
592594

593-
@[simp]
595+
@[simp, norm_cast]
594596
theorem inr_star [AddMonoid R] [StarAddMonoid R] [Star A] (a : A) :
595597
↑(star a) = star (a : Unitization R A) :=
596598
Unitization.ext (by simp only [fst_star, star_zero, fst_inr]) rfl

Mathlib/Algebra/Group/Indicator.lean

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,10 @@ assert_not_exists MonoidWithZero
4141

4242
open Function
4343

44-
variable {α β M N : Type*}
44+
variable {α β γ M N : Type*}
4545

4646
namespace Set
47+
4748
section Monoid
4849

4950
variable [MulOneClass M] {s t : Set α} {a : α}
@@ -196,6 +197,19 @@ theorem apply_mulIndicator_symmDiff {g : G → β} (hg : ∀ x, g x⁻¹ = g x)
196197

197198
end Group
198199

200+
section One
201+
202+
@[to_additive]
203+
lemma mulSupport_subset_subsingleton_of_disjoint_on_mulSupport [One β] {s : γ → Set α} (f : α → β)
204+
(hs : Pairwise (Disjoint on (fun j ↦ s j ∩ f.mulSupport))) (i : α) (j : γ) (hj : i ∈ s j) :
205+
(fun d ↦ (s d).mulIndicator f i).mulSupport ⊆ {j} := by
206+
suffices ∀ j', j' ≠ j → {i} ⊆ s j → {i} ⊆ s j' → {i} ⊆ mulSupport f → False by by_contra; aesop
207+
intro j' h hj hj' hi
208+
simp only [Pairwise, Disjoint, Set.le_eq_subset, Set.subset_inter_iff] at hs
209+
simpa using hs h ⟨hj', hi⟩ ⟨hj, hi⟩
210+
211+
end One
212+
199213
/-! ### Relationship with `Pi.mulSingle`/`Pi.single` -/
200214

201215
variable {ι : Type*} [DecidableEq ι] {M : Type*} [One M]

Mathlib/Algebra/Group/Subgroup/Basic.lean

Lines changed: 47 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,43 @@ variable (H)
321321

322322
section Normalizer
323323

324+
@[to_additive]
325+
theorem normalizer_empty : normalizer (∅ : Set G) = ⊤ :=
326+
ext fun _ ↦ ⟨fun _ ↦ trivial, fun _ _ ↦ .rfl⟩
327+
328+
@[to_additive]
329+
theorem _root_.CommGroup.normalizer_eq_top {G : Type*} [CommGroup G] (s : Set G) :
330+
normalizer s = ⊤ := by
331+
ext
332+
simp [mem_set_normalizer_iff]
333+
334+
theorem mem_normalizer_iff_conj_image_eq {s : Set G} {g : G} :
335+
g ∈ normalizer s ↔ MulAut.conj g '' s = s := by
336+
simp_rw [mem_set_normalizer_iff'', Set.ext_iff, Set.mem_image, MulAut.conj_apply]
337+
refine forall_congr' fun h ↦ ?_
338+
simp_rw [mul_inv_eq_iff_eq_mul, ← eq_inv_mul_iff_mul_eq, ← mul_assoc, exists_eq_right, iff_comm]
339+
340+
theorem _root_.AddSubgroup.mem_normalizer_iff_conj_image_eq {G : Type*} [AddGroup G] {s : Set G}
341+
{g : G} : g ∈ AddSubgroup.normalizer s ↔ AddAut.conj g '' s = s := by
342+
simp_rw [AddSubgroup.mem_set_normalizer_iff'', Set.ext_iff, Set.mem_image, AddAut.conj_apply]
343+
refine forall_congr' fun h ↦ ?_
344+
simp_rw [add_neg_eq_iff_eq_add, ← eq_neg_add_iff_add_eq, ← add_assoc, exists_eq_right, iff_comm]
345+
346+
theorem normalizer_le_normalizer_closure (s : Set G) : normalizer s ≤ normalizer (closure s) := by
347+
intro g hg
348+
have : MulAut.conj g '' (closure s) = closure (MulAut.conj g '' s) :=
349+
congr(SetLike.coe $(MulAut.conj g |>.toMonoidHom.map_closure s))
350+
rw [mem_normalizer_iff_conj_image_eq.mp hg] at this
351+
rwa [mem_normalizer_iff_conj_image_eq]
352+
353+
theorem _root_.AddSubgroup.normalizer_le_normalizer_closure {G : Type*} [AddGroup G] (s : Set G) :
354+
AddSubgroup.normalizer s ≤ AddSubgroup.normalizer (AddSubgroup.closure s) := by
355+
intro g hg
356+
have : AddAut.conj g '' (AddSubgroup.closure s) = AddSubgroup.closure (AddAut.conj g '' s) :=
357+
congr(SetLike.coe $(AddAut.conj g |>.toAddMonoidHom.map_closure s))
358+
rw [AddSubgroup.mem_normalizer_iff_conj_image_eq.mp hg] at this
359+
rwa [AddSubgroup.mem_normalizer_iff_conj_image_eq]
360+
324361
variable {H}
325362

326363
@[to_additive]
@@ -385,6 +422,11 @@ theorem normal_subgroupOf_iff_le_normalizer_inf :
385422
instance (priority := 100) normal_in_normalizer : (H.subgroupOf <| normalizer H).Normal :=
386423
(normal_subgroupOf_iff_le_normalizer H.le_normalizer).mpr le_rfl
387424

425+
@[to_additive]
426+
theorem maximal_normal_subgroupOf_normalizer : Maximal (H.subgroupOf · |>.Normal) (normalizer H) :=
427+
⟨inferInstance,
428+
fun _ hnormal hle ↦ (normal_subgroupOf_iff_le_normalizer <| le_normalizer.trans hle).mp hnormal⟩
429+
388430
@[to_additive]
389431
theorem le_normalizer_of_normal_subgroupOf [hK : (H.subgroupOf K).Normal] (HK : H ≤ K) :
390432
K ≤ normalizer H :=
@@ -825,10 +867,6 @@ theorem Normal.of_map_subtype {K : Subgroup G} {L : Subgroup K}
825867
(n : (Subgroup.map K.subtype L).Normal) : L.Normal :=
826868
n.of_map_injective K.subtype_injective
827869

828-
end Subgroup
829-
830-
namespace Subgroup
831-
832870
section SubgroupNormal
833871

834872
@[to_additive]
@@ -917,6 +955,11 @@ theorem normal_subgroupOf_sup_of_le_normalizer {H N : Subgroup G}
917955

918956
end SubgroupNormal
919957

958+
@[to_additive]
959+
instance normal_subgroupOf_closure_normalizer (s : Set G) :
960+
(closure s |>.subgroupOf <| normalizer s).Normal :=
961+
normal_subgroupOf_of_le_normalizer <| normalizer_le_normalizer_closure s
962+
920963
end Subgroup
921964

922965
namespace IsConj

Mathlib/Algebra/Group/Subgroup/Defs.lean

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -672,33 +672,36 @@ def normalizer (S : Set G) : Subgroup G where
672672
rw [ha (a⁻¹ * n * a⁻¹⁻¹)]
673673
simp only [inv_inv, mul_assoc, mul_inv_cancel_left, mul_inv_cancel, mul_one]
674674

675-
@[deprecated (since := "2026-03-19")] alias setNormalizer := normalizer
675+
@[deprecated (since := "2026-03-19")]
676+
alias setNormalizer := normalizer
677+
@[deprecated (since := "2026-03-19")]
678+
alias _root_.AddSubgroup.setNormalizer := AddSubgroup.normalizer
676679

677-
variable {H} {S : Set G}
680+
variable {H} {S : Set G} {g : G}
678681

679682
@[to_additive]
680-
theorem mem_set_normalizer_iff {g : G} : g ∈ normalizer S ↔ ∀ h, h ∈ S ↔ g * h * g⁻¹ ∈ S :=
681-
Iff.rfl
683+
theorem mem_set_normalizer_iff : g ∈ normalizer S ↔ ∀ h, h ∈ S ↔ g * h * g⁻¹ ∈ S :=
684+
.rfl
682685

683686
@[to_additive]
684-
theorem mem_set_normalizer_iff'' {g : G} : g ∈ normalizer S ↔ ∀ h : G, h ∈ S ↔ g⁻¹ * h * g ∈ S := by
685-
rw [← inv_mem_iff (x := g), mem_set_normalizer_iff, inv_inv]
687+
theorem mem_set_normalizer_iff'' : g ∈ normalizer S ↔ ∀ h, h ∈ S ↔ g⁻¹ * h * g ∈ S := by
688+
rw [← inv_mem_iff, mem_set_normalizer_iff, inv_inv]
686689

687690
@[to_additive]
688-
theorem mem_set_normalizer_iff' {g : G} : g ∈ normalizer S ↔ ∀ n, n * g ∈ S ↔ g * n ∈ S :=
691+
theorem mem_set_normalizer_iff' : g ∈ normalizer S ↔ ∀ h, h * g ∈ S ↔ g * h ∈ S :=
689692
fun h n ↦ by rw [h, mul_assoc, mul_inv_cancel_right],
690693
fun h n ↦ by rw [mul_assoc, ← h, inv_mul_cancel_right]⟩
691694

692695
@[to_additive]
693-
theorem mem_normalizer_iff {g : G} : g ∈ normalizer H ↔ ∀ h, h ∈ H ↔ g * h * g⁻¹ ∈ H :=
696+
theorem mem_normalizer_iff : g ∈ normalizer H ↔ ∀ h, h ∈ H ↔ g * h * g⁻¹ ∈ H :=
694697
mem_set_normalizer_iff
695698

696699
@[to_additive]
697-
theorem mem_normalizer_iff'' {g : G} : g ∈ normalizer H ↔ ∀ h : G, h ∈ H ↔ g⁻¹ * h * g ∈ H :=
700+
theorem mem_normalizer_iff'' : g ∈ normalizer H ↔ ∀ h : G, h ∈ H ↔ g⁻¹ * h * g ∈ H :=
698701
mem_set_normalizer_iff''
699702

700703
@[to_additive]
701-
theorem mem_normalizer_iff' {g : G} : g ∈ normalizer H ↔ ∀ n, n * g ∈ H ↔ g * n ∈ H :=
704+
theorem mem_normalizer_iff' : g ∈ normalizer H ↔ ∀ n, n * g ∈ H ↔ g * n ∈ H :=
702705
mem_set_normalizer_iff'
703706

704707
@[to_additive]

Mathlib/Algebra/MonoidAlgebra/Basic.lean

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -395,15 +395,15 @@ noncomputable def mapAlgEquiv (e : A ≃ₐ[R] B) : A[M] ≃ₐ[R] B[M] where
395395
@[deprecated (since := "2026-03-20")] alias mapRangeAlgEquiv := mapAlgEquiv
396396

397397
@[to_additive (attr := simp)]
398-
lemma symm_mapAlgEquiv (e : A ≃ₐ[R] B) :
399-
(mapAlgEquiv R M e).symm = mapAlgEquiv R M e.symm := rfl
398+
lemma symm_mapAlgEquiv (e : A ≃ₐ[R] B) : (mapAlgEquiv R M e).symm = mapAlgEquiv R M e.symm := rfl
400399

401400
@[deprecated (since := "2026-03-20")] alias symm_mapRangeAlgEquiv := symm_mapAlgEquiv
402401

403402
@[to_additive (attr := simp)]
404-
lemma mapRangeAlgEquiv_trans (e₁ : A ≃ₐ[R] B) (e₂ : B ≃ₐ[R] C) :
405-
mapAlgEquiv R M (e₁.trans e₂) =
406-
(mapAlgEquiv R M e₁).trans (mapAlgEquiv R M e₂) := by ext; simp
403+
lemma mapAlgEquiv_trans (e₁ : A ≃ₐ[R] B) (e₂ : B ≃ₐ[R] C) :
404+
mapAlgEquiv R M (e₁.trans e₂) = (mapAlgEquiv R M e₁).trans (mapAlgEquiv R M e₂) := by ext; simp
405+
406+
@[deprecated (since := "2026-03-27")] alias mapRangeAlgEquiv_trans := mapAlgEquiv_trans
407407

408408
end mapRange
409409

Mathlib/Algebra/MvPolynomial/Basic.lean

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -549,9 +549,12 @@ theorem coeff_zero (m : σ →₀ ℕ) : coeff m (0 : MvPolynomial σ R) = 0 :=
549549
theorem coeff_zero_X (i : σ) : coeff 0 (X i : MvPolynomial σ R) = 0 :=
550550
single_eq_of_ne' fun h => by cases Finsupp.single_eq_zero.1 h
551551

552+
-- TODO: Remove once its use in the Witt vector API has been removed.
552553
@[simp]
553-
theorem coeff_mapRange (g : S₁ → R) (hg : g 0 = 0) (φ : MvPolynomial σ S₁) (m) :
554-
coeff m (mapRange g hg φ) = g (coeff m φ) := rfl
554+
lemma coeff_addMonoidAlgebraMap (g : S₁ →+ R) (φ : MvPolynomial σ S₁) (m) :
555+
coeff m (φ.map g) = g (coeff m φ) := rfl
556+
557+
@[deprecated (since := "2026-03-27")] alias coeff_mapRange := coeff_addMonoidAlgebraMap
555558

556559
/-- `MvPolynomial.coeff m` but promoted to an `AddMonoidHom`. -/
557560
@[simps]

Mathlib/Algebra/MvPolynomial/Equiv.lean

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ public import Mathlib.Algebra.BigOperators.Finsupp.Fin
99
public import Mathlib.Algebra.MvPolynomial.Degrees
1010
public import Mathlib.Algebra.MvPolynomial.Rename
1111
public import Mathlib.Algebra.Polynomial.AlgebraMap
12+
public import Mathlib.Algebra.MonoidAlgebra.Basic
13+
public import Mathlib.Algebra.Polynomial.Degree.Lemmas
1214
public import Mathlib.Data.Finsupp.Option
1315
public import Mathlib.Logic.Equiv.Fin.Basic
1416

@@ -102,14 +104,13 @@ section Map
102104
variable {R} (σ)
103105

104106
/-- If `e : A ≃+* B` is an isomorphism of rings, then so is `map e`. -/
105-
@[simps apply]
106107
def mapEquiv [CommSemiring S₁] [CommSemiring S₂] (e : S₁ ≃+* S₂) :
107108
MvPolynomial σ S₁ ≃+* MvPolynomial σ S₂ :=
108-
{ map (e : S₁ →+* S₂) with
109-
toFun := map (e : S₁ →+* S₂)
110-
invFun := map (e.symm : S₂ →+* S₁)
111-
left_inv := map_leftInverse e.left_inv
112-
right_inv := map_rightInverse e.right_inv }
109+
AddMonoidAlgebra.mapRingEquiv _ e
110+
111+
@[simp]
112+
lemma mapEquiv_apply [CommSemiring S₁] [CommSemiring S₂] (e : S₁ ≃+* S₂) (x : MvPolynomial σ S₁) :
113+
mapEquiv σ e x = map e x := rfl
113114

114115
@[simp]
115116
theorem mapEquiv_refl : mapEquiv σ (RingEquiv.refl R) = RingEquiv.refl _ :=
@@ -123,17 +124,18 @@ theorem mapEquiv_symm [CommSemiring S₁] [CommSemiring S₂] (e : S₁ ≃+* S
123124
@[simp]
124125
theorem mapEquiv_trans [CommSemiring S₁] [CommSemiring S₂] [CommSemiring S₃] (e : S₁ ≃+* S₂)
125126
(f : S₂ ≃+* S₃) : (mapEquiv σ e).trans (mapEquiv σ f) = mapEquiv σ (e.trans f) :=
126-
RingEquiv.ext fun p => by
127-
simp only [RingEquiv.coe_trans, comp_apply, mapEquiv_apply, RingEquiv.coe_ringHom_trans,
128-
map_map]
127+
(AddMonoidAlgebra.mapRingEquiv_trans _ _).symm
129128

130129
variable {A₁ A₂ A₃ : Type*} [CommSemiring A₁] [CommSemiring A₂] [CommSemiring A₃]
131130
variable [Algebra R A₁] [Algebra R A₂] [Algebra R A₃]
132131

133132
/-- If `e : A ≃ₐ[R] B` is an isomorphism of `R`-algebras, then so is `map e`. -/
134-
@[simps apply]
135133
def mapAlgEquiv (e : A₁ ≃ₐ[R] A₂) : MvPolynomial σ A₁ ≃ₐ[R] MvPolynomial σ A₂ :=
136-
{ mapAlgHom (e : A₁ →ₐ[R] A₂), mapEquiv σ (e : A₁ ≃+* A₂) with toFun := map (e : A₁ →+* A₂) }
134+
AddMonoidAlgebra.mapAlgEquiv _ _ e
135+
136+
@[simp]
137+
lemma mapAlgEquiv_apply (e : A₁ ≃ₐ[R] A₂) (x : MvPolynomial σ A₁) : mapAlgEquiv σ e x = map e x :=
138+
rfl
137139

138140
@[simp]
139141
theorem mapAlgEquiv_refl : mapAlgEquiv σ (AlgEquiv.refl : A₁ ≃ₐ[R] A₁) = AlgEquiv.refl :=
@@ -145,10 +147,8 @@ theorem mapAlgEquiv_symm (e : A₁ ≃ₐ[R] A₂) : (mapAlgEquiv σ e).symm = m
145147

146148
@[simp]
147149
theorem mapAlgEquiv_trans (e : A₁ ≃ₐ[R] A₂) (f : A₂ ≃ₐ[R] A₃) :
148-
(mapAlgEquiv σ e).trans (mapAlgEquiv σ f) = mapAlgEquiv σ (e.trans f) := by
149-
ext
150-
simp only [AlgEquiv.trans_apply, mapAlgEquiv_apply, map_map]
151-
rfl
150+
(mapAlgEquiv σ e).trans (mapAlgEquiv σ f) = mapAlgEquiv σ (e.trans f) :=
151+
(AddMonoidAlgebra.mapAlgEquiv_trans _ _).symm
152152

153153
end Map
154154

0 commit comments

Comments
 (0)