Skip to content

Commit 1f090b0

Browse files
committed
feat(LinearAlgebra/TensorProduct/RightExactness): generalize TensorProduct.(map|mk)_surjective to [Comm]Semiring (#20034)
Originally they were `[Comm]Ring`.
1 parent faa9c3f commit 1f090b0

File tree

1 file changed

+19
-17
lines changed

1 file changed

+19
-17
lines changed

Mathlib/LinearAlgebra/TensorProduct/RightExactness.lean

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,25 @@ lemma LinearMap.rTensor_exact_iff_lTensor_exact :
165165
(e₂ := TensorProduct.comm _ _ _) (e₃ := TensorProduct.comm _ _ _)
166166
(by ext; simp) (by ext; simp)
167167

168+
variable (hg : Function.Surjective g)
169+
{N' P' : Type*} [AddCommMonoid N'] [AddCommMonoid P'] [Module R N'] [Module R P']
170+
{g' : N' →ₗ[R] P'} (hg' : Function.Surjective g')
171+
172+
include hg hg' in
173+
theorem TensorProduct.map_surjective : Function.Surjective (TensorProduct.map g g') := by
174+
rw [← lTensor_comp_rTensor, coe_comp]
175+
exact Function.Surjective.comp (lTensor_surjective _ hg') (rTensor_surjective _ hg)
176+
177+
variable (M R) in
178+
theorem TensorProduct.mk_surjective (S) [Semiring S] [Algebra R S]
179+
(h : Function.Surjective (algebraMap R S)) :
180+
Function.Surjective (TensorProduct.mk R S M 1) := by
181+
rw [← LinearMap.range_eq_top, ← top_le_iff, ← span_tmul_eq_top, Submodule.span_le]
182+
rintro _ ⟨x, y, rfl⟩
183+
obtain ⟨x, rfl⟩ := h x
184+
rw [Algebra.algebraMap_eq_smul_one, smul_tmul]
185+
exact ⟨x • y, rfl⟩
186+
168187
end Semiring
169188

170189
variable {R M N P : Type*} [CommRing R]
@@ -393,11 +412,6 @@ variable {M' N' P' : Type*}
393412
{f' : M' →ₗ[R] N'} {g' : N' →ₗ[R] P'}
394413
(hfg' : Exact f' g') (hg' : Function.Surjective g')
395414

396-
include hg hg' in
397-
theorem TensorProduct.map_surjective : Function.Surjective (TensorProduct.map g g') := by
398-
rw [← lTensor_comp_rTensor, coe_comp]
399-
exact Function.Surjective.comp (lTensor_surjective _ hg') (rTensor_surjective _ hg)
400-
401415
include hg hg' hfg hfg' in
402416
/-- Kernel of a product map (right-exactness of tensor product) -/
403417
theorem TensorProduct.map_ker :
@@ -414,18 +428,6 @@ theorem TensorProduct.map_ker :
414428
rw [range_eq_top.mpr (rTensor_surjective M' hg), Submodule.map_top]
415429
rw [Exact.linearMap_ker_eq (lTensor_exact P hfg' hg')]
416430

417-
variable (M)
418-
419-
variable (R) in
420-
theorem TensorProduct.mk_surjective (S) [Semiring S] [Algebra R S]
421-
(h : Surjective (algebraMap R S)) :
422-
Surjective (TensorProduct.mk R S M 1) := by
423-
rw [← LinearMap.range_eq_top, ← top_le_iff, ← span_tmul_eq_top, Submodule.span_le]
424-
rintro _ ⟨x, y, rfl⟩
425-
obtain ⟨x, rfl⟩ := h x
426-
rw [Algebra.algebraMap_eq_smul_one, smul_tmul]
427-
exact ⟨x • y, rfl⟩
428-
429431
end Modules
430432

431433
section Algebras

0 commit comments

Comments
 (0)