If M is flat this is clear, so assume tor(R/H,M) = 0. To get us started, assume H is any ideal. We'll step back to finitely generated ideals later.
Let L be finitely generated and consider tor(L,M). Let K be the submodule of L spanned by all but one of the generators. Thus L/K is a cyclic module, isomorphic to R/H for some ideal H. By induction, tor(K,M) = 0, and by assumption, tor(L/K,M) = 0. Apply the previous theorem, and tor(L,M) = 0.
What if L is infinitely generated? Let L be the direct limit of its finitely generated submodules. Let F be a free module whose generators are the elements of L. Let G be the submodule of F that makes the following sequence exact.
0 → G → F → L → 0
Restrict attention to a finitely generated submodule Li of L. Using only the elements of Li, build a submodule Fi of F. This has Gi as its kernel, which is a submodule of G. Thus the following sequence is exact, with Li a submodule of L.
0 → Gi → Fi → Li → 0
Clearly L is covered, but how about F? Given a generator x in F, map it forward to an element of L. This produces a cyclic submodule of L, which pulls back to x in F. Thus F is covered.
Given a word in G, such as xyz, find the submodule of L generated by x y and z. This pulls back to Fi generated by x y and z, such that xyz = 0 in L. Thus xyz is in Gi, and G is covered. A directed system of exact sequences leads to the direct limit 0 → G → F → L → 0.
Tensor each individual exact sequence with M. Since tor(Li,M) = 0, the resulting sequence is exact.
0 → GiM → FiM → LiM → 0
Recall that tensor product commutes with direct limit, and the direct limit of exact sequences is an exact sequence. Therefore 0 → GM → FM → LM → 0 is exact, and tor(L,M) = 0 for all modules L. By the previous theorem, M is flat.
Of course we suspended the restriction that H be finitely generated. However, if tor(R/H,M) = 0 for finitely generated ideals, it holds for all ideals. The argument is similar to the one shown above. Let Hi be the directed system of finitely generated ideals inside H, leading to H as a direct limit. At the same time, R/Hi forms a directed system of quotient rings that map towards R/H. This isn't your standard directed system based on inclusion. See the generalized direct limit for more on this example. Tensor each exact sequence in the directed system with M.
0 → Hi → R → R/Hi → 0
0 → HiM → rm → (R/Hi)M → 0
The second sequence is exact by assumption. In the limit, H×M seeds an exact sequence, and since R is a free R module, tor(R/H,M) = 0. This holds for all ideals H, and that completes the proof.