Flatness testing over singular bases
  We show that non-flatness of a morphism f of complex-analytic spaces with a locally irreducible target Y of dimension n manifests in the existence of vertical components in the n-fold fibred power of the pull-back of f to the desingularization of Y. An algebraic analogue follows: Let R be a locally (analytically) irreducible finite type complex-algebra and an integral domain of Krull dimension n, and let S be a regular n-dimensional algebra of finite type over R (but not necessarily a finite R-module), such that the induced morphism of spectra is dominant. Then a finite type R-algebra A is R-flat if and only if the tensor product of S with the n-fold tensor power of A over R is a torsion-free R-module. 
Janusz Adamus and Hadi Seyedinejad
math.AC math.CV