Skip to content

Commit 79741db

Browse files
committed
feat(RingTheory/Flat): a module is flat iff tensoring preserves exact sequences (#14482)
1 parent eed869b commit 79741db

File tree

2 files changed

+70
-0
lines changed

2 files changed

+70
-0
lines changed

Mathlib.lean

+1
Original file line numberDiff line numberDiff line change
@@ -3655,6 +3655,7 @@ import Mathlib.RingTheory.Finiteness
36553655
import Mathlib.RingTheory.Fintype
36563656
import Mathlib.RingTheory.Flat.Algebra
36573657
import Mathlib.RingTheory.Flat.Basic
3658+
import Mathlib.RingTheory.Flat.CategoryTheory
36583659
import Mathlib.RingTheory.Flat.EquationalCriterion
36593660
import Mathlib.RingTheory.Flat.Stability
36603661
import Mathlib.RingTheory.FractionalIdeal.Basic
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
/-
2+
Copyright (c) 2024 Jujian Zhang. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Jujian Zhang
5+
-/
6+
import Mathlib.RingTheory.Flat.Basic
7+
import Mathlib.Algebra.Homology.ShortComplex.ModuleCat
8+
import Mathlib.Algebra.Category.ModuleCat.Monoidal.Basic
9+
10+
/-!
11+
# Tensoring with a flat module is an exact functor
12+
13+
In this file we prove that tensoring with a flat module is an exact functor.
14+
15+
## Main results
16+
17+
- `Module.Flat.iff_lTensor_preserves_shortComplex_exact`: an `R`-module `M` is flat if and only if
18+
for every exact sequence `A ⟶ B ⟶ C`, `M ⊗ A ⟶ M ⊗ B ⟶ M ⊗ C` is also exact.
19+
20+
- `Module.Flat.iff_rTensor_preserves_shortComplex_exact`: an `R`-module `M` is flat if and only if
21+
for every short exact sequence `A ⟶ B ⟶ C`, `A ⊗ M ⟶ B ⊗ M ⟶ C ⊗ M` is also exact.
22+
23+
## TODO
24+
25+
- Prove that tensoring with a flat module is an exact functor in the sense that it preserves both
26+
finite limits and colimits.
27+
- Relate flatness with `Tor`
28+
29+
-/
30+
31+
universe u
32+
33+
open CategoryTheory MonoidalCategory ShortComplex.ShortExact
34+
35+
namespace Module.Flat
36+
37+
variable {R : Type u} [CommRing R] (M : ModuleCat.{u} R)
38+
39+
lemma lTensor_shortComplex_exact [Flat R M] (C : ShortComplex $ ModuleCat R) (hC : C.Exact) :
40+
C.map (tensorLeft M) |>.Exact := by
41+
rw [moduleCat_exact_iff_function_exact] at hC ⊢
42+
exact lTensor_exact M hC
43+
44+
lemma rTensor_shortComplex_exact [Flat R M] (C : ShortComplex $ ModuleCat R) (hC : C.Exact) :
45+
C.map (tensorRight M) |>.Exact := by
46+
rw [moduleCat_exact_iff_function_exact] at hC ⊢
47+
exact rTensor_exact M hC
48+
49+
lemma iff_lTensor_preserves_shortComplex_exact :
50+
Flat R M ↔
51+
∀ (C : ShortComplex $ ModuleCat R) (_ : C.Exact), (C.map (tensorLeft M) |>.Exact) :=
52+
fun _ _ ↦ lTensor_shortComplex_exact _ _, fun H ↦ iff_lTensor_exact.2 $
53+
fun _ _ _ _ _ _ _ _ _ f g h ↦
54+
moduleCat_exact_iff_function_exact _ |>.1 $
55+
H (.mk (ModuleCat.ofHom f) (ModuleCat.ofHom g)
56+
(DFunLike.ext _ _ h.apply_apply_eq_zero))
57+
(moduleCat_exact_iff_function_exact _ |>.2 h)⟩
58+
59+
lemma iff_rTensor_preserves_shortComplex_exact :
60+
Flat R M ↔
61+
∀ (C : ShortComplex $ ModuleCat R) (_ : C.Exact), (C.map (tensorRight M) |>.Exact) :=
62+
fun _ _ ↦ rTensor_shortComplex_exact _ _, fun H ↦ iff_rTensor_exact.2 $
63+
fun _ _ _ _ _ _ _ _ _ f g h ↦
64+
moduleCat_exact_iff_function_exact _ |>.1 $
65+
H (.mk (ModuleCat.ofHom f) (ModuleCat.ofHom g)
66+
(DFunLike.ext _ _ h.apply_apply_eq_zero))
67+
(moduleCat_exact_iff_function_exact _ |>.2 h)⟩
68+
69+
end Module.Flat

0 commit comments

Comments
 (0)