0 → K → M → M/K → 0
Everything in KP can be represented by an element in K over a denominator drawn from R-P. Let x/d be a nonzero member of KP that becomes 0 in MP. As shown in the introduction, Some denominator kills x in M, and the same thing happens in K, hence x/d was really 0 after all. Therefore KP embeds, and RP is flat.
There is nothing special about localization here; every fraction ring of R is flat. This holds even if R does not contain 1.
As a special case, Q is a flat Z module. Moving from the rationals to the reals, R is a Q vector space, with a basis, hence R is a direct sum of flat Z modules, and R is a flat Z module.
If M is flat, tensor M with a fraction ring S of R, which is also flat, and the resulting module M×S is a flat R module, and a flat S module. Localization preserves flatness.
Since R is a pid, the summand of a free R module is free. Thus free and projective are synonymous. We will prove F is not free, hence it is not projective.
build a module R/P analogous to the integers mod P. When this is tensored with F the result is 0. The proof is similar to ZP tensor Q. Since R/P tensor F is 0, F cannot be a free R module.
In general, the tensor product preserves surjective, and injective if the module is flat.
Conversely, assume f is not injective, such that f(x) = 0. Find a prime ideal P such that xP is nonzero. Tensor the following sequence with the flat module RP.
0 → K → U → V → 0
The result remains exact, and KP is nonzero, containing xP, hence the localization is not injective.
If f is not surjective let C be the cokernel.
K → U → V → C → 0
Select P such that CP is nonzero, and tensor with RP. The new homomorphism from U to V is not surjective.
In summary, a function is injective, surjective, or bijective iff it is the same under maximal localizations.
Let A and B be submodules of a module M. Note that B contains A iff (B+A)/B is zero. Tensor the sequence 0 → B → B+A → (B+A)/B → 0 with RP. Remember that B+A commutes with localization. The result embeds BP into BP+AP. As above, the cokernel is zero iff it is zero locally. Thus containment of A by B is a local property.