This creates a projection to a hypersurface. It differs from genericProjection(codim I - 1, I) as it only tries to find a hypersurface equation that vanishes along the projection, instead of finding one that vanishes exactly at the projection. This can be faster, and can be useful for finding points.
i1 : R=ZZ/5[x,y,z]; |
i2 : I = ideal(random(3,R)-2, random(2,R)); o2 : Ideal of R |
i3 : projectionToHypersurface(I)
ZZ 6 5 4 2 5 6 2 2
o3 = (map(R,--[y..z],{x, y - 2z}), ideal(y - 2y z - 2y z - 2y*z + z - 2y z + y*z - 1))
5
o3 : Sequence
|
i4 : projectionToHypersurface(R/I)
ZZ
--[y..z]
R 5
o4 = (map(--------------------------------------------------------------------------------,--------------------------------------
3 2 3 2 2 2 2 3 2 6 5 4 2 2 4 5 3
(- 2x - 2x*y - 2y + x z - y z + 2x*z - 2y*z - 2z - 2, - 2x*z + 2y*z - 2z ) y - y z + 2y z - 2y z - y*z + 2y
----------------------------------------------------------------------------------------------------------------------------
ZZ
--[y..z]
5
---------------------,{y + 2z, x + z}), -----------------------------------------------------------)
2 2 3 6 5 4 2 2 4 5 3 2 2 3
- y z - y*z + z + 1 y - y z + 2y z - 2y z - y*z + 2y - y z - y*z + z + 1
o4 : Sequence
|
If you already know the codimension is c, you can set Codimension=>c so the function does not compute it.
The object projectionToHypersurface is a method function with options.