Given R = S/I where S is a polynomial ring, this finds an element of S that restricts to a test element of R. This does this by finding a minor of the Jacobian whose determinant is not in any minimal prime of the defining ideal of R. It looks at random minors until one is found instead of computing all of them. Thus it will not always produce the same answer.
i1 : R = ZZ/5[x,y,z]/(x^3+y^3+z^3); |
i2 : testElement(R) 2 o2 = -y ZZ o2 : --[x, y, z] 5 |
i3 : testElement(R) 2 o3 = -z ZZ o3 : --[x, y, z] 5 |
i4 : testElement(R) 2 o4 = -y ZZ o4 : --[x, y, z] 5 |