isMRegular(F,G,m) tests definition 1.8.4 of Lazarsfeld’s Positivity in Algebraic Geometry I, which is to say whether Hi(F ⊗G(m-i)) = 0 for every i>0. It tests (in this order) H1, H2, ..., Hdim(X), and stops as soon as a non-zero cohomology is found. If none is found, F is m-G-regular, and it outputs true.