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
>>> 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
>>> 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
sage.schemes.generic.hypersurface.is_Hypersurface(self)[source]#

Return True if self is a hypersurface, i.e. an object of the type ProjectiveHypersurface or AffineHypersurface.

EXAMPLES:

sage: from sage.schemes.generic.hypersurface import is_Hypersurface
sage: R.<x, y, z> = ZZ[]
sage: H = ProjectiveHypersurface(x*z + y^2)
sage: is_Hypersurface(H)
doctest:warning...
DeprecationWarning: The function is_Hypersurface is deprecated; use 'isinstance(..., (ProjectiveHypersurface, AffineHypersurface))' instead.
See https://github.com/sagemath/sage/issues/38022 for details.
True
>>> from sage.all import *
>>> from sage.schemes.generic.hypersurface import is_Hypersurface
>>> R = ZZ['x, y, z']; (x, y, z,) = R._first_ngens(3)
>>> H = ProjectiveHypersurface(x*z + y**Integer(2))
>>> is_Hypersurface(H)
doctest:warning...
DeprecationWarning: The function is_Hypersurface is deprecated; use 'isinstance(..., (ProjectiveHypersurface, AffineHypersurface))' instead.
See https://github.com/sagemath/sage/issues/38022 for details.
True
sage: H = AffineHypersurface(x*z + y^2)
sage: is_Hypersurface(H)
True
>>> from sage.all import *
>>> H = AffineHypersurface(x*z + y**Integer(2))
>>> is_Hypersurface(H)
True
sage: H = ProjectiveSpace(QQ, 5)
sage: is_Hypersurface(H)
False
>>> from sage.all import *
>>> H = ProjectiveSpace(QQ, Integer(5))
>>> is_Hypersurface(H)
False