extendIdealByNonZeroMinor(n,M,I)
This function finds a submatrix of size $n\times n$ using findANonZeroMinor; it extracts the last entry of the output, finds its determinant and adds it to the ideal $I$, thus extending $I$.




One use for this function can be in showing a certain rings are R1 (regular in codimension 1). Consider the following example which is R1 where computing the dimension of the singular locus takes around 30 seconds as there are 15500 minors of size $4 \times 4$ in the associated $7 \times 12$ Jacobian matrix. However, we can use this function to quickly find interesting minors.








In this particular example, there tend to be about 5 associated primes when adding the first minor to J, and so one would expect about 5 steps as each minor computed most likely will eliminate one of those primes.
There is some similar functionality obtained via heuristics (as opposed to actually finding rational points) in the package "FastMinors".
The object extendIdealByNonZeroMinor is a method function with options.