Skip to content

Commit 5d050a0

Browse files
committed
feat: add Module.Finite.of_exact (leanprover-community#34243)
Also add two `stacks` tags for https://stacks.math.columbia.edu/tag/0519.
1 parent b79b184 commit 5d050a0

2 files changed

Lines changed: 17 additions & 4 deletions

File tree

Mathlib/RingTheory/Finiteness/Basic.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ variable {S} {P : Type*} [Semiring S] [AddCommMonoid P] [Module S P]
235235
{σ : R →+* S} [RingHomSurjective σ]
236236

237237
-- TODO: remove RingHomSurjective
238+
@[stacks 0519 "(3)"]
238239
theorem of_surjective [hM : Module.Finite R M] (f : M →ₛₗ[σ] P) (hf : Surjective f) :
239240
Module.Finite S P :=
240241
by

Mathlib/RingTheory/Finiteness/Finsupp.lean

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ public import Mathlib.Algebra.MonoidAlgebra.Module
1010
public import Mathlib.LinearAlgebra.Finsupp.LinearCombination
1111
public import Mathlib.LinearAlgebra.Quotient.Basic
1212
public import Mathlib.RingTheory.Finiteness.Basic
13+
public import Mathlib.Algebra.Exact
1314

1415
/-!
1516
# Finiteness of (sub)modules and finitely supported functions
@@ -113,11 +114,22 @@ theorem fg_ker_comp (f : M →ₗ[R] N) (g : N →ₗ[R] P)
113114
· rwa [inf_of_le_right (show (LinearMap.ker f) ≤
114115
(LinearMap.ker g).comap f from comap_mono bot_le)]
115116

117+
/-- If $M → N → P → 0$ is exact and $M$ and $P$ are finitely generated then so is $N$.
118+
119+
This is the `Module.Finite` version of `Submodule.fg_of_fg_map_of_fg_inf_ker`. -/
120+
@[stacks 0519 "(1)"]
121+
lemma _root_.Module.Finite.of_exact {f : M →ₗ[R] N} {g : N →ₗ[R] P}
122+
(h_exact : Function.Exact f g) (h_surj : Function.Surjective g)
123+
[Module.Finite R M] [Module.Finite R P] : Module.Finite R N := by
124+
refine ⟨(⊤ : Submodule R _).fg_of_fg_map_of_fg_inf_ker g ?_ ?_⟩
125+
· rw [← LinearMap.range_eq_top] at h_surj
126+
rw [Submodule.map_top, h_surj]
127+
exact Module.Finite.fg_top
128+
· simp [LinearMap.exact_iff.1 h_exact]
129+
116130
theorem _root_.Module.Finite.of_submodule_quotient (N : Submodule R M) [Module.Finite R N]
117-
[Module.Finite R (M ⧸ N)] : Module.Finite R M where
118-
fg_top := fg_of_fg_map_of_fg_inf_ker N.mkQ
119-
(by simpa only [map_top, range_mkQ] using Module.finite_def.mp ‹_›) <| by
120-
simpa only [top_inf_eq, ker_mkQ] using .of_finite
131+
[Module.Finite R (M ⧸ N)] : Module.Finite R M :=
132+
.of_exact (LinearMap.exact_subtype_mkQ N) (Quotient.mk_surjective _)
121133

122134
end Submodule
123135

0 commit comments

Comments
 (0)