MISSING TITLE¶
- sage.schemes.weighted_projective.weighted_projective_space.WeightedProjectiveSpace(weights, R=None, names=None)[source]¶
Return a weighted projective space with the given
weightsover the ringR.EXAMPLES:
sage: WP = WeightedProjectiveSpace([1, 3, 1]); WP Weighted Projective Space of dimension 2 with weights (1, 3, 1) over Integer Ring
>>> from sage.all import * >>> WP = WeightedProjectiveSpace([Integer(1), Integer(3), Integer(1)]); WP Weighted Projective Space of dimension 2 with weights (1, 3, 1) over Integer Ring
- class sage.schemes.weighted_projective.weighted_projective_space.WeightedProjectiveSpace_ring(weights: tuple[~sage.rings.integer.Integer], R=Integer Ring, names=None)[source]¶
Bases:
UniqueRepresentation,AmbientSpaceWeighted projective space with the given
weightsover the ring \(R\).EXAMPLES:
sage: WeightedProjectiveSpace(Zp(5), [1, 3, 1], 'y') # needs sage.rings.padics Weighted Projective Space of dimension 2 with weights (1, 3, 1) over 5-adic Ring with capped relative precision 20 sage: WeightedProjectiveSpace(QQ, 5, 'y') Projective Space of dimension 5 over Rational Field sage: _ is ProjectiveSpace(QQ, 5, 'y') True
>>> from sage.all import * >>> WeightedProjectiveSpace(Zp(Integer(5)), [Integer(1), Integer(3), Integer(1)], 'y') # needs sage.rings.padics Weighted Projective Space of dimension 2 with weights (1, 3, 1) over 5-adic Ring with capped relative precision 20 >>> WeightedProjectiveSpace(QQ, Integer(5), 'y') Projective Space of dimension 5 over Rational Field >>> _ is ProjectiveSpace(QQ, Integer(5), 'y') True
- change_ring(R)[source]¶
Return a weighted projective space over ring
R.INPUT:
R– commutative ring or morphism
OUTPUT: weighted projective space over
R. IfRis a morphism, return a weighted projective space over its codomain.Note
There is no need to have any relation between
Rand the base ring of this space, if you want to have such a relation, useself.base_extend(R)instead.EXAMPLES:
sage: WP = WeightedProjectiveSpace([1, 3, 1], ZZ); WP Weighted Projective Space of dimension 2 with weights (1, 3, 1) over Integer Ring sage: WP.change_ring(QQ) Weighted Projective Space of dimension 2 with weights (1, 3, 1) over Rational Field sage: WP.change_ring(GF(5)) Weighted Projective Space of dimension 2 with weights (1, 3, 1) over Finite Field of size 5
>>> from sage.all import * >>> WP = WeightedProjectiveSpace([Integer(1), Integer(3), Integer(1)], ZZ); WP Weighted Projective Space of dimension 2 with weights (1, 3, 1) over Integer Ring >>> WP.change_ring(QQ) Weighted Projective Space of dimension 2 with weights (1, 3, 1) over Rational Field >>> WP.change_ring(GF(Integer(5))) Weighted Projective Space of dimension 2 with weights (1, 3, 1) over Finite Field of size 5
- coordinate_ring()[source]¶
Return the coordinate ring of this weighted projective space.
EXAMPLES:
sage: WP = WeightedProjectiveSpace(GF(19^2, 'α'), [1, 3, 4, 1], 'abcd') sage: # needs sage.rings.finite_rings sage: R = WP.coordinate_ring(); R Multivariate Polynomial Ring in a, b, c, d over Finite Field in α of size 19^2 sage: R.term_order() Weighted degree reverse lexicographic term order with weights (1, 3, 4, 1)
>>> from sage.all import * >>> WP = WeightedProjectiveSpace(GF(Integer(19)**Integer(2), 'α'), [Integer(1), Integer(3), Integer(4), Integer(1)], 'abcd') >>> # needs sage.rings.finite_rings >>> R = WP.coordinate_ring(); R Multivariate Polynomial Ring in a, b, c, d over Finite Field in α of size 19^2 >>> R.term_order() Weighted degree reverse lexicographic term order with weights (1, 3, 4, 1)
sage: WP = WeightedProjectiveSpace(QQ, [1, 1, 1], ['alpha', 'beta', 'gamma']) sage: R = WP.coordinate_ring(); R Multivariate Polynomial Ring in alpha, beta, gamma over Rational Field sage: R.term_order() Weighted degree reverse lexicographic term order with weights (1, 1, 1)
[Python]>>> from sage.all import * >>> WP = WeightedProjectiveSpace(QQ, [Integer(1), Integer(1), Integer(1)], ['alpha', 'beta', 'gamma']) >>> R = WP.coordinate_ring(); R Multivariate Polynomial Ring in alpha, beta, gamma over Rational Field >>> R.term_order() Weighted degree reverse lexicographic term order with weights (1, 1, 1)
- curve(F)[source]¶
Return a curve defined by
Fin this weighted projective space.INPUT:
F– a polynomial, or a list or tuple of polynomials in the coordinate ring of this weighted projective space
EXAMPLES:
sage: WP.<x, y, z> = WeightedProjectiveSpace([1, 3, 1], QQ) sage: WP.curve(y^2 - x^5 * z - 3 * x^2 * z^4 - 2 * z^6) # needs sage.schemes Weighted Projective Curve over Rational Field defined by y^2 - x^5*z - 3*x^2*z^4 - 2*z^6
>>> from sage.all import * >>> WP = WeightedProjectiveSpace([Integer(1), Integer(3), Integer(1)], QQ, names=('x', 'y', 'z',)); (x, y, z,) = WP._first_ngens(3) >>> WP.curve(y**Integer(2) - x**Integer(5) * z - Integer(3) * x**Integer(2) * z**Integer(4) - Integer(2) * z**Integer(6)) # needs sage.schemes Weighted Projective Curve over Rational Field defined by y^2 - x^5*z - 3*x^2*z^4 - 2*z^6
- ngens()[source]¶
Return the number of generators of this weighted projective space.
This is the number of variables in the coordinate ring of
self.EXAMPLES:
sage: WeightedProjectiveSpace(QQ, [1, 3, 1]).ngens() 3 sage: WeightedProjectiveSpace(ZZ, 5).ngens() 6
>>> from sage.all import * >>> WeightedProjectiveSpace(QQ, [Integer(1), Integer(3), Integer(1)]).ngens() 3 >>> WeightedProjectiveSpace(ZZ, Integer(5)).ngens() 6
- point(v, check=True)[source]¶
Create a point on this weighted projective space.
INPUT:
INPUT:
v– anything that defines a pointcheck– boolean (default:True); whether to check the defining data for consistency
OUTPUT: A point of this weighted projective space.
EXAMPLES:
sage: WP = WeightedProjectiveSpace(QQ, [1, 3, 1]) sage: WP.point([2, 3, 1]) (2 : 3 : 1)
>>> from sage.all import * >>> WP = WeightedProjectiveSpace(QQ, [Integer(1), Integer(3), Integer(1)]) >>> WP.point([Integer(2), Integer(3), Integer(1)]) (2 : 3 : 1)