Skip to content

Commit

Permalink
feat: Wedderburn's Little Theorem (#6800)
Browse files Browse the repository at this point in the history
Co-authored-by: Eric Rodriguez <37984851+ericrbg@users.noreply.github.com>
  • Loading branch information
ericrbg and ericrbg committed Dec 13, 2023
1 parent d85330e commit 4275e9e
Show file tree
Hide file tree
Showing 5 changed files with 214 additions and 10 deletions.
1 change: 1 addition & 0 deletions Mathlib.lean
Expand Up @@ -3068,6 +3068,7 @@ import Mathlib.RingTheory.Jacobson
import Mathlib.RingTheory.JacobsonIdeal
import Mathlib.RingTheory.Kaehler
import Mathlib.RingTheory.LaurentSeries
import Mathlib.RingTheory.LittleWedderburn
import Mathlib.RingTheory.LocalProperties
import Mathlib.RingTheory.Localization.AsSubring
import Mathlib.RingTheory.Localization.AtPrime
Expand Down
17 changes: 7 additions & 10 deletions Mathlib/RingTheory/IntegralDomain.lean
Expand Up @@ -19,9 +19,10 @@ Assorted theorems about integral domains.
* `isCyclic_of_subgroup_isDomain`: A finite subgroup of the units of an integral domain is cyclic.
* `Fintype.fieldOfDomain`: A finite integral domain is a field.
## TODO
## Notes
Prove Wedderburn's little theorem, which shows that all finite division rings are actually fields.
Wedderburn's little theorem, which shows that all finite division rings are actually fields,
is in `Mathlib.RingTheory.LittleWedderburn`.
## Tags
Expand Down Expand Up @@ -91,19 +92,15 @@ section Ring

variable [Ring R] [IsDomain R] [Fintype R]

/-- Every finite domain is a division ring.
TODO: Prove Wedderburn's little theorem,
which shows a finite domain is in fact commutative, hence a field. -/
/-- Every finite domain is a division ring. More generally, they are fields; this can be found in
`Mathlib.RingTheory.LittleWedderburn`. -/
def Fintype.divisionRingOfIsDomain (R : Type*) [Ring R] [IsDomain R] [DecidableEq R] [Fintype R] :
DivisionRing R :=
{ show GroupWithZero R from Fintype.groupWithZeroOfCancel R, ‹Ring R› with }
#align fintype.division_ring_of_is_domain Fintype.divisionRingOfIsDomain

/-- Every finite commutative domain is a field.
TODO: Prove Wedderburn's little theorem, which shows a finite domain is automatically commutative,
dropping one assumption from this theorem. -/
/-- Every finite commutative domain is a field. More generally, commutativity is not required: this
can be found in `Mathlib.RingTheory.LittleWedderburn`. -/
def Fintype.fieldOfDomain (R) [CommRing R] [IsDomain R] [DecidableEq R] [Fintype R] : Field R :=
{ Fintype.groupWithZeroOfCancel R, ‹CommRing R› with }
#align fintype.field_of_domain Fintype.fieldOfDomain
Expand Down
173 changes: 173 additions & 0 deletions Mathlib/RingTheory/LittleWedderburn.lean
@@ -0,0 +1,173 @@
/-
Copyright (c) 2021 Johan Commelin. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johan Commelin, Eric Rodriguez
-/
import Mathlib.GroupTheory.ClassEquation
import Mathlib.GroupTheory.GroupAction.ConjAct
import Mathlib.RingTheory.Polynomial.Cyclotomic.Eval

/-!
# Wedderburn's Little Theorem
This file proves Wedderburn's Little Theorem.
## Main Declarations
* `littleWedderburn`: a finite division ring is a field.
## Future work
A couple simple generalisations are possible:
* A finite ring is commutative iff all its nilpotents lie in the center.
[Chintala, Vineeth, *Sorry, the Nilpotents Are in the Center*][chintala2020]
* A ring is commutative if all its elements have finite order.
[Dolan, S. W., *A Proof of Jacobson's Theorem*][dolan1975]
When alternativity is added to Mathlib, one could formalise the Artin-Zorn theorem, which states
that any finite alternative division ring is in fact a field.
https://en.wikipedia.org/wiki/Artin%E2%80%93Zorn_theorem
If interested, generalisations to semifields could be explored. The theory of semi-vector spaces is
not clear, but assuming that such a theory could be found where every module considered in the
below proof is free, then the proof works nearly verbatim.
-/

open scoped BigOperators Polynomial
open Fintype

/- Everything in this namespace is internal to the proof of Wedderburn's little theorem. -/

namespace LittleWedderburn

variable (D : Type*) [DivisionRing D]

private def InductionHyp : Prop :=
∀ {R : Subring D}, R < ⊤ → ∀ ⦃x y⦄, x ∈ R → y ∈ R → x * y = y * x

namespace InductionHyp

open FiniteDimensional Polynomial

variable {D}

private def field (hD : InductionHyp D) {R : Subring D} (hR : R < ⊤)
[Fintype D] [DecidableEq D] [DecidablePred (· ∈ R)] :
Field R :=
{ show DivisionRing R from Fintype.divisionRingOfIsDomain R with
mul_comm := fun x y ↦ Subtype.ext <| hD hR x.2 y.2 }

/-- We prove that if every subring of `D` is central, then so is `D`. -/
private theorem center_eq_top [Finite D] (hD : InductionHyp D) : Subring.center D = ⊤ := by
classical
cases nonempty_fintype D
set Z := Subring.center D
-- We proceed by contradiction; that is, we assume the center is strictly smaller than `D`.
by_contra! hZ
letI : Field Z := hD.field hZ.lt_top
set q := card Z with card_Z
have hq : 1 < q := by rw [card_Z]; exact one_lt_card
let n := finrank Z D
have card_D : card D = q ^ n := card_eq_pow_finrank
have h1qn : 1 ≤ q ^ n := by rw [← card_D]; exact card_pos
-- We go about this by looking at the class equation for `Dˣ`:
-- `q ^ n - 1 = q - 1 + ∑ x : conjugacy classes (D ∖ Dˣ), |x|`.
-- The next few lines gets the equation into basically this form over `ℤ`.
have key := Group.card_center_add_sum_card_noncenter_eq_card (Dˣ)
rw [card_congr (show _ ≃* Zˣ from Subgroup.centerUnitsEquivUnitsCenter D).toEquiv,
card_units, ← card_Z, card_units, card_D] at key
-- By properties of the cyclotomic function, we have that `Φₙ(q) ∣ q ^ n - 1`; however, when
-- `n ≠ 1`, then `¬Φₙ(q) | q - 1`; so if the sum over the conjugacy classes is divisible by
-- `Φₙ(q)`, then `n = 1`, and therefore the vector space is trivial, as desired.
let Φₙ := cyclotomic n ℤ
apply_fun (Nat.cast : ℕ → ℤ) at key
rw [Nat.cast_add, Nat.cast_sub h1qn, Nat.cast_sub hq.le, Nat.cast_one, Nat.cast_pow] at key
suffices : Φₙ.eval ↑q ∣ ↑(∑ x in (ConjClasses.noncenter Dˣ).toFinset, x.carrier.toFinset.card)
· have contra : Φₙ.eval _ ∣ _ := eval_dvd (cyclotomic.dvd_X_pow_sub_one n ℤ) (x := (q : ℤ))
rw [eval_sub, eval_pow, eval_X, eval_one, ← key, Int.dvd_add_left this] at contra
refine (Nat.le_of_dvd ?_ ?_).not_lt (sub_one_lt_natAbs_cyclotomic_eval (n := n) ?_ hq.ne')
· exact tsub_pos_of_lt hq
· convert Int.natAbs_dvd_natAbs.mpr contra
clear_value q
simp only [eq_comm, Int.natAbs_eq_iff, Nat.cast_sub hq.le, Nat.cast_one, neg_sub, true_or]
· by_contra! h
obtain ⟨x, hx⟩ := finrank_le_one_iff.mp h
refine not_le_of_lt hZ.lt_top (fun y _ ↦ Subring.mem_center_iff.mpr fun z ↦ ?_)
obtain ⟨r, rfl⟩ := hx y
obtain ⟨s, rfl⟩ := hx z
rw [smul_mul_smul, smul_mul_smul, mul_comm]
rw [Nat.cast_sum]
apply Finset.dvd_sum
rintro ⟨x⟩ hx
simp (config := {zeta := false}) only [ConjClasses.quot_mk_eq_mk, Set.mem_toFinset] at hx ⊢
set Zx := Subring.centralizer ({↑x} : Set D)
-- The key thing is then to note that for all conjugacy classes `x`, `|x|` is given by
-- `|Dˣ| / |Zxˣ|`, where `Zx` is the centralizer of `x`; but `Zx` is an algebra over `Z`, and
-- therefore `|Zxˣ| = q ^ d - 1`, where `d` is the dimension of `D` as a vector space over `Z`.
-- We therefore get that `|x| = (q ^ n - 1) / (q ^ d - 1)`, and as `d` is a strict divisor of `n`,
-- we do have that `Φₙ(q) | (q ^ n - 1) / (q ^ d - 1)`; extending this over the whole sum
-- gives us the desired contradiction..
rw [Set.toFinset_card, ConjClasses.card_carrier, ← card_congr
(show Zxˣ ≃* _ from unitsCentralizerEquiv _ x).toEquiv, card_units, card_D]
have hZx : Zx ≠ ⊤ := by
by_contra! hZx
refine (ConjClasses.mk_bijOn (Dˣ)).mapsTo (Set.subset_center_units ?_) hx
refine Subring.centralizer_eq_top_iff_subset.mp hZx <| Set.mem_singleton _
letI : Field Zx := hD.field hZx.lt_top
letI : Algebra Z Zx := (Subring.inclusion <| Subring.center_le_centralizer {(x : D)}).toAlgebra
let d := finrank Z Zx
have card_Zx : card Zx = q ^ d := card_eq_pow_finrank
have h1qd : 1 ≤ q ^ d := by rw [← card_Zx]; exact card_pos
haveI : IsScalarTower Z Zx D := ⟨fun x y z ↦ mul_assoc _ _ _⟩
rw [card_units, card_Zx, Int.coe_nat_div, Nat.cast_sub h1qd, Nat.cast_sub h1qn, Nat.cast_one,
Nat.cast_pow, Nat.cast_pow]
apply Int.dvd_div_of_mul_dvd
have aux : ∀ {k : ℕ}, ((X : ℤ[X]) ^ k - 1).eval ↑q = (q : ℤ) ^ k - 1 := by
simp only [eval_X, eval_one, eval_pow, eval_sub, eq_self_iff_true, forall_const]
rw [← aux, ← aux, ← eval_mul]
refine (evalRingHom ↑q).map_dvd (X_pow_sub_one_mul_cyclotomic_dvd_X_pow_sub_one_of_dvd ℤ ?_)
refine Nat.mem_properDivisors.mpr ⟨⟨_, (finrank_mul_finrank Z Zx D).symm⟩, ?_⟩
rw [← (Nat.pow_right_strictMono hq).lt_iff_lt, ← card_D, ← card_Zx]
obtain ⟨b, -, hb⟩ := SetLike.exists_of_lt hZx.lt_top
refine card_lt_of_injective_of_not_mem _ Subtype.val_injective (?_ : b ∉ _)
rintro ⟨b, rfl⟩
exact hb b.2

end InductionHyp

private theorem center_eq_top [Finite D] : Subring.center D = ⊤ := by
classical
cases nonempty_fintype D
induction' hn : Fintype.card D using Nat.strong_induction_on with n IH generalizing D
apply InductionHyp.center_eq_top
intro R hR x y hx hy
suffices : (⟨y, hy⟩ : R) ∈ Subring.center R
· rw [Subring.mem_center_iff] at this
simpa using this ⟨x, hx⟩
let R_dr : DivisionRing R := Fintype.divisionRingOfIsDomain R
rw [IH (Fintype.card R) _ R inferInstance rfl]
· trivial
rw [← hn, ← Subring.card_top D]
exact Set.card_lt_card hR

end LittleWedderburn

open LittleWedderburn

/-- A finite division ring is a field. See `Finite.isDomain_to_isField` and
`Fintype.divisionRingOfIsDomain` for more general statements, but these create data, and therefore
may cause diamonds if used improperly. -/
instance (priority := 100) littleWedderburn (D : Type*) [DivisionRing D] [Finite D] : Field D :=
{ ‹DivisionRing D› with
mul_comm := fun x y ↦ by simp [Subring.mem_center_iff.mp ?_ x, center_eq_top D] }

alias Finite.divisionRing_to_field := littleWedderburn

/-- A finite domain is a field. See also `littleWedderburn` and `Fintype.divisionRingOfIsDomain`. -/
theorem Finite.isDomain_to_isField (D : Type*) [Finite D] [Ring D] [IsDomain D] : IsField D := by
classical
cases nonempty_fintype D
let _ := Fintype.divisionRingOfIsDomain D
let _ := littleWedderburn D
exact Field.toIsField D
3 changes: 3 additions & 0 deletions Mathlib/RingTheory/Subring/Basic.lean
Expand Up @@ -559,6 +559,9 @@ def topEquiv : (⊤ : Subring R) ≃+* R :=
Subsemiring.topEquiv
#align subring.top_equiv Subring.topEquiv

theorem card_top (R) [Ring R] [Fintype R] : Fintype.card (⊤ : Subring R) = Fintype.card R :=
Fintype.card_congr topEquiv.toEquiv

/-! ## comap -/


Expand Down
30 changes: 30 additions & 0 deletions docs/references.bib
Expand Up @@ -632,6 +632,21 @@ @Article{ chapman1996
Association of America}
}

@Misc{ chintala2020,
title = {Sorry, the Nilpotents Are in the Center},
author = {Chintala, Vineeth},
year = {2020},
month = jun,
number = {arXiv:1805.11451},
eprint = {1805.11451},
primaryclass = {math},
publisher = {{arXiv}},
doi = {10.48550/arXiv.1805.11451},
urldate = {2023-12-13},
archiveprefix = {arxiv},
keywords = {{16P10, 16U99},Mathematics - Rings and Algebras}
}

@InProceedings{ Chou1994,
author = {Chou, Ching-Tsun},
booktitle = {Higher Order Logic Theorem Proving and Its Applications},
Expand Down Expand Up @@ -820,6 +835,21 @@ @InProceedings{ demoura2015lean
isbn = {978-3-319-21401-6}
}

@Article{ dolan1976,
title = {A {{Proof}} of {{Jacobson}}'s {{Theorem}}},
author = {Dolan, S. W.},
year = {1976},
month = mar,
journal = {Canadian Mathematical Bulletin},
volume = {19},
number = {1},
pages = {59--61},
issn = {0008-4395, 1496-4287},
doi = {10.4153/CMB-1976-007-9},
urldate = {2023-12-13},
langid = {english}
}

@Article{ dold1958,
author = {Dold, Albrecht},
title = {Homology of symmetric products and other functors of
Expand Down

0 comments on commit 4275e9e

Please sign in to comment.