@@ -4,26 +4,24 @@ Released under Apache 2.0 license as described in the file LICENSE.
4
4
Authors: Christian Merten
5
5
-/
6
6
import Mathlib.RingTheory.Flat.Basic
7
+ import Mathlib.RingTheory.IsTensorProduct
7
8
import Mathlib.LinearAlgebra.TensorProduct.Tower
8
9
9
10
/-!
10
11
# Flatness is stable under composition and base change
11
12
12
- We show that flatness is stable under composition and base change. The latter is not formalized yet.
13
+ We show that flatness is stable under composition and base change.
13
14
14
15
## Main theorems
15
16
16
17
* `Module.Flat.comp`: if `S` is a flat `R`-algebra and `M` is a flat `S`-module,
17
18
then `M` is a flat `R`-module
18
-
19
- ## TODO
20
-
21
- * Show that flatness is stable under base change, i.e. if `S` is any `R`-algebra and `M` is a flat
22
- `R`-module, then `M ⊗[R] S` is a flat `S`-module.
19
+ * `Module.Flat.baseChange`: if `M` is a flat `R`-module and `S` is any `R`-algebra,
20
+ then `S ⊗[R] M` is `S`-flat.
23
21
24
22
-/
25
23
26
- universe u v w
24
+ universe u v w t
27
25
28
26
open Function (Injective Surjective)
29
27
@@ -33,6 +31,8 @@ open TensorProduct
33
31
34
32
namespace Module.Flat
35
33
34
+ section Composition
35
+
36
36
/-! ### Composition
37
37
38
38
Let `R` be a ring, `S` a flat `R`-algebra and `M` a flat `S`-module. To show that `M` is flat
@@ -93,4 +93,56 @@ theorem comp [Module.Flat R S] [Module.Flat S M] : Module.Flat R M := by
93
93
LinearEquiv.coe_coe, EquivLike.comp_injective, EquivLike.injective_comp]
94
94
exact (Module.Flat.iff_lTensor_injective' S M).mp inferInstance _
95
95
96
+ end Composition
97
+
98
+ section BaseChange
99
+
100
+ /-! ### Base change
101
+
102
+ Let `R` be a ring, `M` a flat `R`-module and `S` an `R`-algebra. To show that
103
+ `S ⊗[R] M` is `S`-flat, we consider for an ideal `I` in `S` the composition of natural maps
104
+
105
+ `I ⊗[S] (S ⊗[R] M) ≃ I ⊗[R] M → S ⊗[R] M ≃ S ⊗[S] (S ⊗[R] M)`.
106
+
107
+ One checks that this composition is precisely the inclusion `I → S` tensored on the right
108
+ with `S ⊗[R] M` and that the former is injective (note that `I ⊗[R] M → S ⊗[R] M` is
109
+ injective, since `M` is `R`-flat).
110
+
111
+ -/
112
+
113
+ variable (R : Type u) (S : Type v) (M : Type w)
114
+ [CommRing R] [CommRing S] [Algebra R S]
115
+ [AddCommGroup M] [Module R M]
116
+
117
+ private noncomputable abbrev auxRTensorBaseChange (I : Ideal S) :
118
+ I ⊗[S] (S ⊗[R] M) →ₗ[S] S ⊗[S] (S ⊗[R] M) :=
119
+ letI e1 : I ⊗[S] (S ⊗[R] M) ≃ₗ[S] I ⊗[R] M :=
120
+ AlgebraTensorModule.cancelBaseChange R S S I M
121
+ letI e2 : S ⊗[S] (S ⊗[R] M) ≃ₗ[S] S ⊗[R] M :=
122
+ AlgebraTensorModule.cancelBaseChange R S S S M
123
+ letI f : I ⊗[R] M →ₗ[S] S ⊗[R] M := AlgebraTensorModule.map
124
+ (Submodule.subtype I) LinearMap.id
125
+ e2.symm.toLinearMap ∘ₗ f ∘ₗ e1.toLinearMap
126
+
127
+ private lemma auxRTensorBaseChange_eq (I : Ideal S) :
128
+ auxRTensorBaseChange R S M I = rTensor (S ⊗[R] M) (Submodule.subtype I) := by
129
+ ext
130
+ simp
131
+
132
+ /-- If `M` is a flat `R`-module and `S` is any `R`-algebra, `S ⊗[R] M` is `S`-flat. -/
133
+ instance baseChange [Module.Flat R M] : Module.Flat S (S ⊗[R] M) := by
134
+ rw [Module.Flat.iff_rTensor_injective']
135
+ intro I
136
+ simp only [← auxRTensorBaseChange_eq, auxRTensorBaseChange, LinearMap.coe_comp,
137
+ LinearEquiv.coe_coe, EmbeddingLike.comp_injective, EquivLike.injective_comp]
138
+ exact rTensor_preserves_injective_linearMap (I.subtype : I →ₗ[R] S) Subtype.val_injective
139
+
140
+ /-- A base change of a flat module is flat. -/
141
+ theorem isBaseChange [Module.Flat R M] (N : Type t) [AddCommGroup N] [Module R N] [Module S N]
142
+ [IsScalarTower R S N] {f : M →ₗ[R] N} (h : IsBaseChange S f) :
143
+ Module.Flat S N :=
144
+ of_linearEquiv S (S ⊗[R] M) N (IsBaseChange.equiv h).symm
145
+
146
+ end BaseChange
147
+
96
148
end Module.Flat
0 commit comments