Skip to content

Commit 1cfdb12

Browse files
committed
feat: Over a finite ring, a module is finite iff it is finite dimensional (#17707)
From PFR
1 parent f668524 commit 1cfdb12

File tree

5 files changed

+27
-11
lines changed

5 files changed

+27
-11
lines changed

Mathlib/FieldTheory/AxGrothendieck.lean

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ theorem ax_grothendieck_of_locally_finite {ι K R : Type*} [Field K] [Finite K]
4848
(mem_union_left _ (mem_biUnion.2 ⟨i, mem_univ _, mem_image_of_mem _ hk⟩))
4949
letI := isNoetherian_adjoin_finset s fun x _ => Algebra.IsIntegral.isIntegral (R := K) x
5050
letI := Module.IsNoetherian.finite K (Algebra.adjoin K (s : Set R))
51-
letI : Finite (Algebra.adjoin K (s : Set R)) :=
52-
FiniteDimensional.finite_of_finite K (Algebra.adjoin K (s : Set R))
51+
letI : Finite (Algebra.adjoin K (s : Set R)) := Module.finite_of_finite K
5352
-- The restriction of the polynomial map, `ps`, to the subalgebra generated by `s`
5453
let res : (ι → Algebra.adjoin K (s : Set R)) → ι → Algebra.adjoin K (s : Set R) := fun x i =>
5554
⟨eval (fun j : ι => (x j : R)) (ps i), eval_mem (hs₁ _) fun i => (x i).2

Mathlib/FieldTheory/PrimitiveElement.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ theorem exists_primitive_element_of_finite_top [Finite E] : ∃ α : E, F⟮α
6363
/-- Primitive element theorem for finite dimensional extension of a finite field. -/
6464
theorem exists_primitive_element_of_finite_bot [Finite F] [FiniteDimensional F E] :
6565
∃ α : E, F⟮α⟯ = ⊤ :=
66-
haveI : Finite E := FiniteDimensional.finite_of_finite F E
66+
haveI : Finite E := Module.finite_of_finite F
6767
exists_primitive_element_of_finite_top F E
6868

6969
end PrimitiveElementFinite

Mathlib/LinearAlgebra/FiniteDimensional/Defs.lean

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,6 @@ instance finiteDimensional_pi' {ι : Type*} [Finite ι] (M : ι → Type*) [∀
107107
noncomputable def fintypeOfFintype [Fintype K] [FiniteDimensional K V] : Fintype V :=
108108
Module.fintypeOfFintype (@finsetBasis K V _ _ _ (iff_fg.2 inferInstance))
109109

110-
theorem finite_of_finite [Finite K] [FiniteDimensional K V] : Finite V := by
111-
cases nonempty_fintype K
112-
haveI := fintypeOfFintype K V
113-
infer_instance
114-
115110
variable {K V}
116111

117112
/-- If a vector space has a finite basis, then it is finite-dimensional. -/

Mathlib/RingTheory/Finiteness.lean

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,22 @@ lemma exists_fin' [Module.Finite R M] : ∃ (n : ℕ) (f : (Fin n → R) →ₗ[
537537
refine ⟨n, Basis.constr (Pi.basisFun R _) ℕ s, ?_⟩
538538
rw [← LinearMap.range_eq_top, Basis.constr_range, hs]
539539

540+
variable (R) in
541+
lemma _root_.Module.finite_of_finite [Finite R] [Module.Finite R M] : Finite M := by
542+
obtain ⟨n, f, hf⟩ := exists_fin' R M; exact .of_surjective f hf
543+
544+
@[deprecated (since := "2024-10-13")]
545+
alias _root_.FiniteDimensional.finite_of_finite := finite_of_finite
546+
547+
-- See note [lower instance priority]
548+
instance (priority := 100) of_finite [Finite M] : Module.Finite R M := by
549+
cases nonempty_fintype M
550+
exact ⟨⟨Finset.univ, by rw [Finset.coe_univ]; exact Submodule.span_univ⟩⟩
551+
552+
/-- A module over a finite ring has finite dimension iff it is finite. -/
553+
lemma _root_.Module.finite_iff_finite [Finite R] : Module.Finite R M ↔ Finite M :=
554+
fun _ ↦ finite_of_finite R, fun _ ↦ .of_finite⟩
555+
540556
theorem of_surjective [hM : Module.Finite R M] (f : M →ₗ[R] N) (hf : Surjective f) :
541557
Module.Finite R N :=
542558
by
@@ -620,6 +636,12 @@ instance span_singleton (x : M) : Module.Finite R (R ∙ x) :=
620636
instance span_finset (s : Finset M) : Module.Finite R (span R (s : Set M)) :=
621637
⟨(Submodule.fg_top _).mpr ⟨s, rfl⟩⟩
622638

639+
lemma _root_.Set.Finite.submoduleSpan [Finite R] {s : Set M} (hs : s.Finite) :
640+
(Submodule.span R s : Set M).Finite := by
641+
lift s to Finset M using hs
642+
rw [Set.Finite, ← Module.finite_iff_finite (R := R)]
643+
dsimp
644+
infer_instance
623645

624646
theorem Module.End.isNilpotent_iff_of_finite {R M : Type*} [CommSemiring R] [AddCommMonoid M]
625647
[Module R M] [Module.Finite R M] {f : End R M} :

Mathlib/RingTheory/LocalRing/ResidueField/Basic.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,10 @@ instance finiteDimensional_of_noetherian [IsNoetherian R S] :
166166
(LinearMap.range_eq_top.mpr Ideal.Quotient.mk_surjective)
167167
exact Algebra.algebra_ext _ _ (fun r => rfl)
168168

169+
-- We want to be able to refer to `hfin`
170+
set_option linter.unusedVariables false in
169171
lemma finite_of_finite [IsNoetherian R S] (hfin : Finite (ResidueField R)) :
170-
Finite (ResidueField S) := by
171-
have := @finiteDimensional_of_noetherian R S
172-
exact FiniteDimensional.finite_of_finite (ResidueField R) (ResidueField S)
172+
Finite (ResidueField S) := Module.finite_of_finite (ResidueField R)
173173

174174
end FiniteDimensional
175175

0 commit comments

Comments
 (0)