Skip to content

Commit 032752c

Browse files
committed
Merge branch 'master' into aliu/irreducible-comp
2 parents a30ff92 + ac3d0c9 commit 032752c

255 files changed

Lines changed: 4547 additions & 2198 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: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,7 @@ public import Mathlib.Algebra.GroupWithZero.Action.Pi
526526
public import Mathlib.Algebra.GroupWithZero.Action.Pointwise.Finset
527527
public import Mathlib.Algebra.GroupWithZero.Action.Pointwise.Set
528528
public import Mathlib.Algebra.GroupWithZero.Action.Prod
529+
public import Mathlib.Algebra.GroupWithZero.Action.Regular
529530
public import Mathlib.Algebra.GroupWithZero.Action.TransferInstance
530531
public import Mathlib.Algebra.GroupWithZero.Action.Units
531532
public import Mathlib.Algebra.GroupWithZero.Associated
@@ -3980,6 +3981,7 @@ public import Mathlib.Data.Erased
39803981
public import Mathlib.Data.FP.Basic
39813982
public import Mathlib.Data.Fin.Basic
39823983
public import Mathlib.Data.Fin.Embedding
3984+
public import Mathlib.Data.Fin.EquivOfInjective
39833985
public import Mathlib.Data.Fin.Fin2
39843986
public import Mathlib.Data.Fin.FlagRange
39853987
public import Mathlib.Data.Fin.Init
@@ -4357,6 +4359,7 @@ public import Mathlib.Data.Nat.Nth
43574359
public import Mathlib.Data.Nat.NthRoot.Defs
43584360
public import Mathlib.Data.Nat.Order.Lemmas
43594361
public import Mathlib.Data.Nat.PSub
4362+
public import Mathlib.Data.Nat.PadicValNat
43604363
public import Mathlib.Data.Nat.Pairing
43614364
public import Mathlib.Data.Nat.Periodic
43624365
public import Mathlib.Data.Nat.Prime.Basic
@@ -4700,6 +4703,8 @@ public import Mathlib.FieldTheory.SplittingField.Construction
47004703
public import Mathlib.FieldTheory.SplittingField.IsSplittingField
47014704
public import Mathlib.FieldTheory.Tower
47024705
public import Mathlib.FieldTheory.TranscendentalSeparable
4706+
public import Mathlib.Geometry.Convex.AffineMap.Defs
4707+
public import Mathlib.Geometry.Convex.AffineMap.Module
47034708
public import Mathlib.Geometry.Convex.Cone.Basic
47044709
public import Mathlib.Geometry.Convex.Cone.Dual
47054710
public import Mathlib.Geometry.Convex.Cone.DualFinite
@@ -5011,6 +5016,7 @@ public import Mathlib.GroupTheory.SpecificGroups.Cyclic.Basic
50115016
public import Mathlib.GroupTheory.SpecificGroups.Dihedral
50125017
public import Mathlib.GroupTheory.SpecificGroups.KleinFour
50135018
public import Mathlib.GroupTheory.SpecificGroups.Quaternion
5019+
public import Mathlib.GroupTheory.SpecificGroups.VirtuallyCyclic
50145020
public import Mathlib.GroupTheory.SpecificGroups.ZGroup
50155021
public import Mathlib.GroupTheory.Subgroup.Center
50165022
public import Mathlib.GroupTheory.Subgroup.Centralizer
@@ -5242,6 +5248,7 @@ public import Mathlib.LinearAlgebra.Matrix.BilinearForm
52425248
public import Mathlib.LinearAlgebra.Matrix.Block
52435249
public import Mathlib.LinearAlgebra.Matrix.Cartan
52445250
public import Mathlib.LinearAlgebra.Matrix.Cartan.Basic
5251+
public import Mathlib.LinearAlgebra.Matrix.Cartan.Realisation
52455252
public import Mathlib.LinearAlgebra.Matrix.CharP
52465253
public import Mathlib.LinearAlgebra.Matrix.Charpoly.Basic
52475254
public import Mathlib.LinearAlgebra.Matrix.Charpoly.Coeff
@@ -5446,6 +5453,7 @@ public import Mathlib.LinearAlgebra.Trace
54465453
public import Mathlib.LinearAlgebra.Transvection
54475454
public import Mathlib.LinearAlgebra.Transvection.Basic
54485455
public import Mathlib.LinearAlgebra.Transvection.Generation
5456+
public import Mathlib.LinearAlgebra.Unimodular
54495457
public import Mathlib.LinearAlgebra.UnitaryGroup
54505458
public import Mathlib.LinearAlgebra.Vandermonde
54515459
public import Mathlib.Logic.Embedding.Basic

‎Mathlib/Algebra/EuclideanDomain/Defs.lean‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class EuclideanDomain (R : Type u) extends CommRing R, Nontrivial R where
8888
protected r : R → R → Prop
8989
/-- The relation `r` must be well-founded.
9090
This ensures that the GCD algorithm always terminates. -/
91-
r_wellFounded : WellFounded r
91+
[r_wellFounded : WellFounded r]
9292
/-- The relation `r` satisfies `r (a % b) b`. -/
9393
protected remainder_lt : ∀ (a) {b}, b ≠ 0 → r (remainder a b) b
9494
/-- An additional constraint on `r`. -/
@@ -116,9 +116,6 @@ local instance wellFoundedRelation : WellFoundedRelation R where
116116
rel := EuclideanDomain.r
117117
wf := r_wellFounded
118118

119-
instance isWellFounded : IsWellFounded R (· ≺ ·) where
120-
wf := r_wellFounded
121-
122119
-- see Note [lower instance priority]
123120
instance (priority := 70) : Div R :=
124121
⟨EuclideanDomain.quotient⟩

‎Mathlib/Algebra/Group/Basic.lean‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,14 @@ lemma mul_left_iterate_apply (a b : M) : (a * ·)^[n] b = a ^ n * b := by simp
197197
@[to_additive /-- Version of `add_right_iterate` that is fully applied, for `rw`. -/ ]
198198
lemma mul_right_iterate_apply (a b : M) : (· * a)^[n] b = b * a ^ n := by simp
199199

200+
@[to_additive]
201+
lemma mul_left_iterate_apply_self (a : M) (n : ℕ) : (a * ·)^[n] a = a ^ (n + 1) := by
202+
rw [pow_succ, mul_left_iterate_apply]
203+
204+
@[to_additive]
205+
lemma mul_right_iterate_apply_self (a : M) (n : ℕ) : (· * a)^[n] a = a ^ (n + 1) := by
206+
rw [pow_succ', mul_right_iterate_apply]
207+
200208
@[to_additive]
201209
lemma mul_left_iterate_apply_one (a : M) : (a * ·)^[n] 1 = a ^ n := by simp
202210

‎Mathlib/Algebra/Group/Fin/Basic.lean‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ instance addCommGroup (n : ℕ) [NeZero n] : AddCommGroup (Fin n) where
7070
neg_add_cancel := fun ⟨a, ha⟩ ↦
7171
Fin.ext <| (Nat.mod_add_mod _ _ _).trans <| by
7272
rw [Fin.val_zero, Nat.sub_add_cancel, Nat.mod_self]
73-
exact le_of_lt ha
73+
exact Nat.le_of_lt ha
7474
sub := Fin.sub
7575
sub_eq_add_neg := fun ⟨a, ha⟩ ⟨b, hb⟩ ↦
7676
Fin.ext <| by simp [Fin.sub_def, Fin.neg_def, Fin.add_def, Nat.add_comm]
@@ -126,13 +126,11 @@ lemma lt_sub_one_iff {k : Fin (n + 2)} : k < k - 1 ↔ k = 0 := by
126126
@[simp] lemma le_sub_one_iff {k : Fin (n + 1)} : k ≤ k - 1 ↔ k = 0 := by
127127
cases n
128128
· simp [fin_one_eq_zero k]
129-
simp only [le_def]
130-
rw [← lt_sub_one_iff, le_iff_lt_or_eq, val_fin_lt, val_inj, lt_sub_one_iff, or_iff_left_iff_imp,
131-
eq_comm, sub_eq_iff_eq_add]
129+
rw [le_def, Nat.le_iff_lt_or_eq, val_fin_lt, lt_sub_iff, val_inj, eq_comm, sub_eq_self]
132130
simp
133131

134132
lemma sub_one_lt_iff {k : Fin (n + 1)} : k - 1 < k ↔ 0 < k :=
135-
not_iff_not.1 <| by simp only [lt_def, not_lt, val_fin_le, le_sub_one_iff, le_zero_iff]
133+
not_iff_not.1 <| by simp only [lt_def, Nat.not_lt, val_fin_le, le_sub_one_iff, le_zero_iff]
136134

137135
@[simp] lemma neg_last (n : ℕ) : -Fin.last n = 1 := by simp [neg_eq_iff_add_eq_zero]
138136

‎Mathlib/Algebra/Group/Subgroup/Map.lean‎

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -497,9 +497,17 @@ def subgroupComap (f : G →* G') (H' : Subgroup G') : H'.comap f →* H' :=
497497
f.submonoidComap H'.toSubmonoid
498498

499499
@[to_additive]
500-
lemma subgroupComap_surjective_of_surjective (f : G →* G') (H' : Subgroup G') (hf : Surjective f) :
500+
lemma subgroupComap_surjective (f : G →* G') (H' : Subgroup G') (hf : Surjective f) :
501501
Surjective (f.subgroupComap H') :=
502-
f.submonoidComap_surjective_of_surjective H'.toSubmonoid hf
502+
f.submonoidComap_surjective H'.toSubmonoid hf
503+
504+
@[to_additive (attr := deprecated (since := "2026-09-09"))]
505+
alias subgroupComap_surjective_of_surjective := subgroupComap_surjective
506+
507+
@[to_additive]
508+
lemma subgroupComap_injective (f : G →* G') (H' : Subgroup G') (hf : Injective f) :
509+
Injective (f.subgroupComap H') :=
510+
f.submonoidComap_injective H'.toSubmonoid hf
503511

504512
/-- The `MonoidHom` from a subgroup to its image. -/
505513
@[to_additive (attr := simps!) /-- the `AddMonoidHom` from an additive subgroup to its image -/]
@@ -511,6 +519,11 @@ theorem subgroupMap_surjective (f : G →* G') (H : Subgroup G) :
511519
Function.Surjective (f.subgroupMap H) :=
512520
f.submonoidMap_surjective H.toSubmonoid
513521

522+
@[to_additive]
523+
theorem subgroupMap_injective (f : G →* G') (H : Subgroup G) (hf : Function.Injective f) :
524+
Function.Injective (f.subgroupMap H) :=
525+
f.submonoidMap_injective hf H.toSubmonoid
526+
514527
end MonoidHom
515528

516529
namespace MulEquiv

‎Mathlib/Algebra/Group/Submonoid/Operations.lean‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -871,13 +871,21 @@ def submonoidComap (f : M →* N) (N' : Submonoid N) :
871871
map_mul' x y := Subtype.ext (f.map_mul x y)
872872

873873
@[to_additive]
874-
lemma submonoidComap_surjective_of_surjective (f : M →* N) (N' : Submonoid N) (hf : Surjective f) :
874+
lemma submonoidComap_surjective (f : M →* N) (N' : Submonoid N) (hf : Surjective f) :
875875
Surjective (f.submonoidComap N') := fun y ↦ by
876876
obtain ⟨x, hx⟩ := hf y
877877
use ⟨x, mem_comap.mpr (hx ▸ y.2)⟩
878878
apply Subtype.val_injective
879879
simp [hx]
880880

881+
@[to_additive (attr := deprecated (since := "2026-09-09"))]
882+
alias submonoidComap_surjective_of_surjective := submonoidComap_surjective
883+
884+
@[to_additive]
885+
lemma submonoidComap_injective (f : M →* N) (N' : Submonoid N) (hf : Injective f) :
886+
Injective (f.submonoidComap N') :=
887+
fun _ _ h ↦ Subtype.ext (hf (congrArg Subtype.val h))
888+
881889
/-- The `MonoidHom` from a `Submonoid` to its image.
882890
See `MulEquiv.SubmonoidMap` for a variant for `MulEquiv`s. -/
883891
@[to_additive (attr := simps)

‎Mathlib/Algebra/Group/UniqueProds/Basic.lean‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -433,8 +433,8 @@ open UniqueMul in
433433
uniqueMul_of_nonempty {A} := by
434434
classical
435435
let _ := isWellFounded_ssubset (α := ∀ i, G i) -- why need this?
436-
apply IsWellFounded.induction (· ⊂ ·) A; intro A ihA B hA
437-
apply IsWellFounded.induction (· ⊂ ·) B; intro B ihB hB
436+
apply WellFounded.induction' (· ⊂ ·) A; intro A ihA B hA
437+
apply WellFounded.induction' (· ⊂ ·) B; intro B ihB hB
438438
by_cases! +distrib hc : #A ≤ 1 ∧ #B ≤ 1
439439
· exact of_card_le_one hA hB hc.1 hc.2
440440
obtain ⟨i, hc⟩ := exists_or.mpr (hc.imp exists_of_one_lt_card_pi exists_of_one_lt_card_pi)
@@ -511,8 +511,8 @@ instance instForall {ι} (G : ι → Type*) [∀ i, Mul (G i)] [∀ i, TwoUnique
511511
uniqueMul_of_one_lt_card {A} := by
512512
classical
513513
let _ := isWellFounded_ssubset (α := ∀ i, G i) -- why need this?
514-
apply IsWellFounded.induction (· ⊂ ·) A; intro A ihA B
515-
apply IsWellFounded.induction (· ⊂ ·) B; intro B ihB hc
514+
apply WellFounded.induction' (· ⊂ ·) A; intro A ihA B
515+
apply WellFounded.induction' (· ⊂ ·) B; intro B ihB hc
516516
obtain ⟨hA, hB, hc⟩ := Nat.one_lt_mul_iff.mp hc
517517
rw [card_pos] at hA hB
518518
obtain ⟨i, hc⟩ := exists_or.mpr (hc.imp exists_of_one_lt_card_pi exists_of_one_lt_card_pi)
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
/-
2+
Copyright (c) 2021 Damiano Testa. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Damiano Testa
5+
-/
6+
module
7+
8+
public import Mathlib.Algebra.Regular.SMul
9+
public import Mathlib.Algebra.GroupWithZero.Action.Defs
10+
11+
/-!
12+
# Results about `IsSMulRegular` for `MonoidWithZero`
13+
-/
14+
15+
@[expose] public section
16+
17+
variable {R S M : Type*} {a b : R} {s : S}
18+
19+
namespace IsSMulRegular
20+
21+
section MonoidWithZero
22+
variable [MonoidWithZero R] [Zero M] [MulActionWithZero R M]
23+
24+
/-- The element `0` is `M`-regular if and only if `M` is trivial. -/
25+
protected theorem subsingleton (h : IsSMulRegular M (0 : R)) : Subsingleton M :=
26+
⟨fun a b => h (by dsimp only [Function.comp_def]; repeat' rw [MulActionWithZero.zero_smul])⟩
27+
28+
/-- The element `0` is `M`-regular if and only if `M` is trivial. -/
29+
theorem zero_iff_subsingleton : IsSMulRegular M (0 : R) ↔ Subsingleton M :=
30+
⟨fun h => h.subsingleton, fun H a b _ => @Subsingleton.elim _ H a b⟩
31+
32+
/-- The `0` element is not `M`-regular, on a non-trivial module. -/
33+
theorem not_zero_iff : ¬IsSMulRegular M (0 : R) ↔ Nontrivial M := by
34+
rw [nontrivial_iff, not_iff_comm, zero_iff_subsingleton, subsingleton_iff]
35+
push Not
36+
exact Iff.rfl
37+
38+
/-- The element `0` is `M`-regular when `M` is trivial. -/
39+
theorem zero [sM : Subsingleton M] : IsSMulRegular M (0 : R) :=
40+
zero_iff_subsingleton.mpr sM
41+
42+
/-- The `0` element is not `M`-regular, on a non-trivial module. -/
43+
theorem not_zero [nM : Nontrivial M] : ¬IsSMulRegular M (0 : R) :=
44+
not_zero_iff.mpr nM
45+
46+
end MonoidWithZero
47+
48+
end IsSMulRegular
49+
50+
section SMulZeroClass
51+
52+
protected lemma IsSMulRegular.right_eq_zero_of_smul [Zero M] [SMulZeroClass R M]
53+
{r : R} {x : M} (h1 : IsSMulRegular M r) (h2 : r • x = 0) : x = 0 :=
54+
h1 (h2.trans (smul_zero r).symm)
55+
56+
end SMulZeroClass
57+
58+
lemma isSMulRegular_iff_right_eq_zero_of_smul [AddGroup M] [DistribSMul R M] {r : R} :
59+
IsSMulRegular M r ↔ ∀ m : M, r • m = 0 → m = 0 where
60+
mp h _ := h.right_eq_zero_of_smul
61+
mpr h m₁ m₂ eq := sub_eq_zero.mp <| h _ <| by simp_rw [smul_sub, eq, sub_self]
62+
63+
alias ⟨_, IsSMulRegular.of_right_eq_zero_of_smul⟩ := isSMulRegular_iff_right_eq_zero_of_smul

‎Mathlib/Algebra/GroupWithZero/NonZeroDivisors.lean‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ Authors: Kenny Lau, Devon Tuma, Oliver Nash
66
module
77

88
public import Mathlib.Algebra.Group.Submonoid.Membership
9+
public import Mathlib.Algebra.GroupWithZero.Action.Defs
910
public import Mathlib.Algebra.GroupWithZero.Associated
1011
public import Mathlib.Algebra.GroupWithZero.Regular
1112
public import Mathlib.Algebra.Regular.SMul
1213
public import Mathlib.Algebra.BigOperators.Group.Finset.Defs
14+
import Mathlib.Algebra.GroupWithZero.Action.Regular
1315

1416
/-!
1517
# Non-zero divisors and smul-divisors

‎Mathlib/Algebra/Lie/Engel.lean‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ theorem LieAlgebra.isEngelian_of_isNoetherian [IsNoetherian R L] : LieAlgebra.Is
254254
refine isNoetherian_of_surjective (LieHom.rangeRestrict (toEnd R L M)).toLinearMap ?_
255255
simp only [LinearMap.range_eq_top]
256256
exact LieHom.surjective_rangeRestrict (toEnd R L M)
257-
obtain ⟨K, hK₁, hK₂⟩ := (LieSubalgebra.wellFoundedGT_of_noetherian R L').wf.has_min s hs
257+
obtain ⟨K, hK₁, hK₂⟩ := (LieSubalgebra.wellFoundedGT_of_noetherian R L').has_min s hs
258258
obtain rfl : K = ⊤ := by grind
259259
exact hK₁
260260

0 commit comments

Comments
 (0)