----
> [!definition] Definition. ([[flat module]])
Let $R$ be a [[commutative ring|commutative]] [[ring]] and $N$ an $R$-[[module]]. The [[tensor functor]] $\_ \otimes_{R} N$ [[adjointness and exactness|is always]] [[exact functor|right-exact]]. If it is [[exact functor|left-exact]] as well (making it [[exact functor|exact]]), then we call $N$ a **flat** $R$-[[module]].
^definition
> [!equivalence]
> The following are equivalent:
> 1. $N$ is flat (i.e., $\_ \otimes_{R} N$ preserves [[exact sequence|exact sequences]])
> 2. $\_ \otimes_{R }N$ preserves [[short exact sequence|short exact sequences]]
> 3. $\_ \otimes _{R}N$ preserves exact sequences of the form $0 \to M \to M'$
> 4. For all [[injection|injective]] $R$-linear maps $f:M \to M'$ between *finitely generated* $R$-modules, the [[tensor functor|tensor product of linear maps]] $f \otimes \id_{N}: M \otimes N \to M' \otimes N $
is [[injection|injective]], i.e., there is an exact sequence $0 \to M \otimes_{R} N \xrightarrow{f \otimes \id_{N}} M' \otimes_{R} N$.
^equivalence
> [!basicproperties]
> - If $N,N'$ are flat, then so is $N \otimes_{R} N'$.
>
> >[!proof]-
> >Indeed, if $0 \to A \to B \to C \to 0$ is an exact sequence of $R$-modules, then so is $0 \to M' \otimes_{R} A \to M' \otimes_{R} B \to M' \otimes_{R} C \to 0$ by flatness of $M'$. Then so is $0 \to M \otimes_{R} (M' \otimes _{R} A) \to M \otimes_{R} (M' \otimes_{R} B) \to M \otimes_{R} (M' \otimes_{R} C) \to 0$
> >by flatness of $M.$ The result now follows from associativity of the tensor product.
> [!proof]- Proof of Equivalence.
>
>
> It is clear that $(1) \implies (2) \implies(3) \implies(4)$. We will show $(2) \implies (1)$, $(3) \implies (2)$, and $(4) \implies (3)$.
>
> **$(2) \implies (1)$.** In [[short exact sequence]], there is a demonstration of how any [[exact sequence]] may be sliced into short exact sequences. The result follows from there. Also: [[exact functor iff preserves exactness of short exact sequences]].
>
> **$(3) \implies (2).$** Follows since [[adjointness and exactness|the tensor functor is right-exact]].
>
> **$(4) \implies (3)$.** Suppose that $f \otimes \id_{N}$ is [[injection|injective]] for all [[injection|injective]] $f:M \to M'$, i.e., the sequence
> $0 \to M \otimes_{R} N \xrightarrow{f \otimes \id_{N}} M'\otimes_{R} N $ is exact for all $f: M \to N'$.
>
> (He omitted the rest of the discussion)
>
> - [ ] todo get from his notes
> [!basicnonexample]
> $\frac{\mathbb{Z}}{2\mathbb{Z}}$ is *not* a flat $\mathbb{Z}$-[[module]].
>
> Indeed, consider the [[exact sequence]] of $\mathbb{Z}$-[[module|modules]] $0 \to \mathbb{Z} \xrightarrow{x \mapsto 2x} \mathbb{Z}$
> and tensor with $\frac{\mathbb{Z}}{2\mathbb{Z}}$, yielding: $0 \to \mathbb{Z} \otimes_{\mathbb{Z}} \frac{\mathbb{Z}}{2\mathbb{Z}} \xrightarrow{(x \mapsto 2x) \otimes \id} \mathbb{Z} \otimes_{\mathbb{Z}} \frac{\mathbb{Z}}{2\mathbb{Z}}$
> which is equivalent to $0 \to \mathbb{Z} / 2\mathbb{Z} \xrightarrow{[a] \mapsto [2a]=0} \mathbb{Z} / 2\mathbb{Z}$
> which is not exact, cf. the following diagram:
>
>
> ```tikz
> \usepackage{tikz-cd}
> \usepackage{amsmath}
> \usepackage{amsfonts}
> \begin{document}
> % https://tikzcd.yichuanshen.de/#N4Igdg9gJgpgziAXAbVABwnAlgFyxMJZABgBpiBdUkANwEMAbAVxiRAB12BbOnACwBGA4AC0AvgAJOEPF3gB9Tj35DRkpb0HDxAegBMGldrEgxpdJlz5CKAIzkqtRizaGtaqexlY5cRd01VcU9ld10DAKM1U3MQDGw8AiIyW0d6ZlZEDkiwyR0JCNCgkzMLBOsie1TqdJcst2KJfMLA41NHGCgAc3giUAAzACcILiQyEBwIJHsnDLYACk4AYygZAoBKT29fTxwYAA8cYCwoEtihkbHqSaQ9GudMkDot2XgJZAEKELo0OEn3uifEDUBiAmAMAAKlkSNhAgywXT4OBiA2Go0QMxuiAAzPc5llntJXnB3p9vr9-shARQUSALui7hMpji8XUQFSvhoKRB3no6BQALzEYEgUECcFQ8pJLLwxHIsQUMRAA
> \begin{tikzcd}
> \mathbb{Z} \otimes_\mathbb{Z} \mathbb{Z}/2\mathbb{Z} \arrow[r, "(\cdot 2) \otimes \text{id}"] \arrow[d, "{a \otimes [b] \mapsto [ab]}"'] & \mathbb{Z} \otimes_\mathbb{Z} \mathbb{Z}/2\mathbb{Z} \arrow[d, "{a \otimes [b] \mapsto [ab]}"] \\
> \mathbb{Z} / 2\mathbb{Z} \arrow[r, "{[a] \mapsto [2a]=0}"'] & \mathbb{Z} / 2\mathbb{Z}
> \end{tikzcd}
> \end{document}
> ```
>
>
> [!basicexample]
>
> - [[free module|Free modules]] (e.g., [[vector space|vector spaces]]) are flat: considering properties of the [[tensor product of modules|tensor product]], one has $R^{\oplus I} \otimes M \cong (R \otimes M)^{\oplus I} \cong M^{\oplus I}$. Then considering $f: M \to M'$ [[injection|injective]], the map $R^{\oplus I} \otimes M \xrightarrow{\id \otimes f} R^{\otimes I} \otimes M'$
> is isomorphic to the map $M^{\oplus I} \to M'^{\oplus I}$ that sends $(m_{i})_{i \in I} \mapsto \big( f(m_{i}) \big)_{i \in I}$ which is certainly [[injection|injective]].
>
>
> - Let $B=\frac{A[T]}{(f)}$, $A$ a [[ring]], $f$ a [[monic polynomial|monic]] [[polynomial 4|polynomial]]. Then the $A$-[[algebra]] $B$ is flat as an $A$-[[module]], as it is seen in [[characterization of quotienting a polynomial ring by a principal ideal]] that $B$ is free.
>
>
> This breaks down for more than one [[indeterminate]]. Indeed, consider the $A$-[[algebra]] $B:=k[X,Y] / (XY)$ for $k$ a [[field]]. This is not a flat $k[X]$-[[module]]. Indeed, if we put $\varphi:M \to M'$ to be the embedding $(X) \hookrightarrow k[X]$, then for any class $[f(X,Y)] \in B$, we have $\begin{align}
> (\varphi \otimes \id_{B})(X \otimes [f(X,Y)]) &= \varphi(X) \otimes [f(X,Y)] \\
> &= X \otimes [f(X, Y)] \\
> &= X (1 \otimes [f(X,Y)]) \\
> &= 1 \otimes [X f(X, Y)].
> \end{align}$ We see that choosing $f(X,Y):=Y \neq0$ kills $\varphi$. Hence $\varphi \otimes \id_{B}$ must not be injective.
>
----
####
----
#### References
> [!backlink]
> ```dataview
> TABLE rows.file.link as "Further Reading"
> FROM [[]]
> FLATTEN file.tags as Tag
> WHERE Tag = "#definition" OR Tag = "#theorem" OR Tag = "#MOC" OR Tag = "#proposition" OR Tag = "#axiom"
> GROUP BY Tag
> ```
> [!frontlink]
> ```dataview
> TABLE rows.file.link as "Further Reading"
> FROM outgoing([[]])
> FLATTEN file.tags as Tag
> WHERE Tag = "#definition" OR Tag = "#theorem" OR Tag = "#MOC" OR Tag = "#proposition" OR Tag = "#axiom"
> GROUP BY Tag
> ```