Hypersurfaces in affine and projective space

AUTHORS:

class sage.schemes.generic.hypersurface.AffineHypersurface(poly, ambient=None)[source]

Bases: AlgebraicScheme_subscheme_affine

The affine hypersurface defined by the given polynomial.

EXAMPLES:

sage: A.<x, y, z> = AffineSpace(ZZ, 3)
sage: AffineHypersurface(x*y - z^3, A)
Affine hypersurface defined by -z^3 + x*y
 in Affine Space of dimension 3 over Integer Ring
>>> from sage.all import *
>>> A = AffineSpace(ZZ, Integer(3), names=('x', 'y', 'z',)); (x, y, z,) = A._first_ngens(3)
>>> AffineHypersurface(x*y - z**Integer(3), A)
Affine hypersurface defined by -z^3 + x*y
 in Affine Space of dimension 3 over Integer Ring

sage: A.<x, y, z> = QQ[]
sage: AffineHypersurface(x*y - z^3)
Affine hypersurface defined by -z^3 + x*y
 in Affine Space of dimension 3 over Rational Field
[Python]
>>> from sage.all import *
>>> A = QQ['x, y, z']; (x, y, z,) = A._first_ngens(3)
>>> AffineHypersurface(x*y - z**Integer(3))
Affine hypersurface defined by -z^3 + x*y
 in Affine Space of dimension 3 over Rational Field
defining_polynomial()[source]

Return the polynomial equation that cuts out this affine hypersurface.

EXAMPLES:

sage: R.<x, y, z> = ZZ[]
sage: H = AffineHypersurface(x*z + y^2)
sage: H.defining_polynomial()
y^2 + x*z
>>> from sage.all import *
>>> R = ZZ['x, y, z']; (x, y, z,) = R._first_ngens(3)
>>> H = AffineHypersurface(x*z + y**Integer(2))
>>> H.defining_polynomial()
y^2 + x*z
class sage.schemes.generic.hypersurface.ProjectiveHypersurface(poly, ambient=None)[source]

Bases: AlgebraicScheme_subscheme_projective

The projective hypersurface defined by the given polynomial.

EXAMPLES:

sage: P.<x, y, z> = ProjectiveSpace(ZZ, 2)
sage: ProjectiveHypersurface(x - y, P)
Projective hypersurface defined by x - y
 in Projective Space of dimension 2 over Integer Ring
>>> from sage.all import *
>>> P = ProjectiveSpace(ZZ, Integer(2), names=('x', 'y', 'z',)); (x, y, z,) = P._first_ngens(3)
>>> ProjectiveHypersurface(x - y, P)
Projective hypersurface defined by x - y
 in Projective Space of dimension 2 over Integer Ring

sage: R.<x, y, z> = QQ[]
sage: ProjectiveHypersurface(x - y)
Projective hypersurface defined by x - y
 in Projective Space of dimension 2 over Rational Field
[Python]
>>> from sage.all import *
>>> R = QQ['x, y, z']; (x, y, z,) = R._first_ngens(3)
>>> ProjectiveHypersurface(x - y)
Projective hypersurface defined by x - y
 in Projective Space of dimension 2 over Rational Field
defining_polynomial()[source]

Return the polynomial equation that cuts out this projective hypersurface.

EXAMPLES:

sage: R.<x, y, z> = ZZ[]
sage: H = ProjectiveHypersurface(x*z + y^2)
sage: H.defining_polynomial()
y^2 + x*z
>>> from sage.all import *
>>> R = ZZ['x, y, z']; (x, y, z,) = R._first_ngens(3)
>>> H = ProjectiveHypersurface(x*z + y**Integer(2))
>>> H.defining_polynomial()
y^2 + x*z