Affine and Projective Plane Curve Arrangements#
We create classes AffinePlaneCurveArrangements
and ProjectivePlaneCurveArrangements
following the properties of HyperplaneArrangements
:
sage: H.<x, y> = AffinePlaneCurveArrangements(QQ)
sage: C = H(3*x + 2*y - x^2 + y^3 - 7); C
Arrangement (y^3 - x^2 + 3*x + 2*y - 7) in Affine Space of dimension 2 over Rational Field
>>> from sage.all import *
>>> H = AffinePlaneCurveArrangements(QQ, names=('x', 'y',)); (x, y,) = H._first_ngens(2)
>>> C = H(Integer(3)*x + Integer(2)*y - x**Integer(2) + y**Integer(3) - Integer(7)); C
Arrangement (y^3 - x^2 + 3*x + 2*y - 7) in Affine Space of dimension 2 over Rational Field
The individual curves will be in AffinePlaneCurve
or in ProjectivePlaneCurve
:
sage: C[0].parent()
<class 'sage.schemes.curves.affine_curve.IntegralAffinePlaneCurve_with_category'>
>>> from sage.all import *
>>> C[Integer(0)].parent()
<class 'sage.schemes.curves.affine_curve.IntegralAffinePlaneCurve_with_category'>
The default base field is \(\QQ\), the rational numbers. Number fields are also possible (also with fixed embeddings in \(\QQbar\)):
sage: # needs sage.rings.number_field
sage: x = polygen(QQ, 'x')
sage: NF.<a> = NumberField(x^4 - 5 * x^2 + 5, embedding=1.90)
sage: H.<y,z> = AffinePlaneCurveArrangements(NF)
sage: A = H(y^2 - a * z, y^2 + a * z); A
Arrangement (y^2 + (-a)*z, y^2 + a*z) in Affine Space of dimension 2
over Number Field in a with defining polynomial
x^4 - 5*x^2 + 5 with a = 1.902113032590308?
sage: A.base_ring()
Number Field in a with defining polynomial x^4 - 5*x^2 + 5
with a = 1.902113032590308?
>>> from sage.all import *
>>> # needs sage.rings.number_field
>>> x = polygen(QQ, 'x')
>>> NF = NumberField(x**Integer(4) - Integer(5) * x**Integer(2) + Integer(5), embedding=RealNumber('1.90'), names=('a',)); (a,) = NF._first_ngens(1)
>>> H = AffinePlaneCurveArrangements(NF, names=('y', 'z',)); (y, z,) = H._first_ngens(2)
>>> A = H(y**Integer(2) - a * z, y**Integer(2) + a * z); A
Arrangement (y^2 + (-a)*z, y^2 + a*z) in Affine Space of dimension 2
over Number Field in a with defining polynomial
x^4 - 5*x^2 + 5 with a = 1.902113032590308?
>>> A.base_ring()
Number Field in a with defining polynomial x^4 - 5*x^2 + 5
with a = 1.902113032590308?
AUTHORS:
Enrique Artal (2023-10): initial version
- class sage.schemes.curves.plane_curve_arrangement.AffinePlaneCurveArrangementElement(parent, curves, check=True)[source]#
Bases:
PlaneCurveArrangementElement
An ordered affine plane curve arrangement.
- braid_monodromy(vertical=True)[source]#
Return the braid monodromy of the complement of the union of affine plane curves in \(\CC^2\). If there are vertical asymptotes a change of variable is done.
INPUT:
vertical
– boolean (default:True
); if it isTrue
, there are no vertical asymptotes, and there are vertical lines, then a simplifiedbraid_monodromy()
is computed.
OUTPUT:
A braid monodromy with dictionnaries identifying strands with components and braids with vertical lines.
Note
This functionality requires the
sirocco
package to be installed.EXAMPLES:
sage: # needs sirocco sage: H.<x, y> = AffinePlaneCurveArrangements(QQ) sage: A = H(y^2 + x, y + x - 1, x) sage: A.braid_monodromy(vertical=False) [s1*s0*(s1*s2*s1)^2*s2*(s1^-1*s2^-1)^2*s1^-1*s0^-1*s1^-1, s1*s0*(s1*s2)^2*s2*s1^-1*s2^-1*s1^-1*s0^-1*s1^-1, s1*s0*s1*s2*(s1*s2^-1)^2*s0*s1*s2*s1*s0*s2^-1*s1^-3*s2*s1^-1*s2^-1*s1^-1*s0^-1*s1^-1, s1*s0*s1*s2*s1*s2^-1*s1^4*s2*s1^-1*s2^-1*s1^-1*s0^-1*s1^-1, s1*s0*s1*s2*s1*s2^-1*s1^-1*s2*s0^-1*s1^-1] sage: A.braid_monodromy(vertical=True) [s1*s0*s1*s0^-1*s1^-1*s0, s0^-1*s1*s0*s1^-1*s0, s0^-1*s1^2*s0]
>>> from sage.all import * >>> # needs sirocco >>> H = AffinePlaneCurveArrangements(QQ, names=('x', 'y',)); (x, y,) = H._first_ngens(2) >>> A = H(y**Integer(2) + x, y + x - Integer(1), x) >>> A.braid_monodromy(vertical=False) [s1*s0*(s1*s2*s1)^2*s2*(s1^-1*s2^-1)^2*s1^-1*s0^-1*s1^-1, s1*s0*(s1*s2)^2*s2*s1^-1*s2^-1*s1^-1*s0^-1*s1^-1, s1*s0*s1*s2*(s1*s2^-1)^2*s0*s1*s2*s1*s0*s2^-1*s1^-3*s2*s1^-1*s2^-1*s1^-1*s0^-1*s1^-1, s1*s0*s1*s2*s1*s2^-1*s1^4*s2*s1^-1*s2^-1*s1^-1*s0^-1*s1^-1, s1*s0*s1*s2*s1*s2^-1*s1^-1*s2*s0^-1*s1^-1] >>> A.braid_monodromy(vertical=True) [s1*s0*s1*s0^-1*s1^-1*s0, s0^-1*s1*s0*s1^-1*s0, s0^-1*s1^2*s0]
- fundamental_group(simplified=True, vertical=True, projective=False)[source]#
Return the fundamental group of the complement of the union of affine plane curves in \(\CC^2\).
INPUT:
vertical
– boolean (default:True
); ifTrue
, there are no vertical asymptotes, and there are vertical lines, then a simplified braidbraid_monodromy()
is usedsimplified
– boolean (default:True
); if it isTrue
, the group is simplifiedprojective
– boolean (default:False
); to be used in the method for projective curves
OUTPUT:
A finitely presented group.
Note
This functionality requires the
sirocco
package to be installed.EXAMPLES:
sage: # needs sirocco sage: H.<x, y> = AffinePlaneCurveArrangements(QQ) sage: A = H(y^2 + x, y + x - 1, x) sage: A.fundamental_group() Finitely presented group < x0, x1, x2 | x2*x0*x2^-1*x0^-1, x1*x0*x1^-1*x0^-1, (x2*x1)^2*(x2^-1*x1^-1)^2 > sage: A.meridians() {0: [x1, x2*x1*x2^-1], 1: [x0], 2: [x2], 3: [x1^-1*x2^-1*x1^-1*x0^-1]} sage: G = A.fundamental_group(simplified=False) sage: G.sorted_presentation() Finitely presented group < x0, x1, x2, x3 | x3^-1*x2^-1*x3*x0*x1*x0^-1, x3^-1*x1^-1*x3*x0*x1*x0^-1*x2^-1*x0^-1*(x2*x0)^2*x1^-1*x0^-1, x3^-1*x0^-1*x3*x0*x1*x0^-1*x2^-1*x0*x2*x0*x1^-1*x0^-1, x2^-1*x0^-1*x2*x0, x1^-1*x0^-1*x1*x0 > sage: A.meridians(simplified=False) {0: [x1, x2], 1: [x0], 2: [x3], 3: [x3^-1*x2^-1*x1^-1*x0^-1]} sage: A.fundamental_group(vertical=False) Finitely presented group < x0, x1, x2 | x2^-1*x1^-1*x2*x1, x1*x0*x1^-1*x0^-1, (x0*x2)^2*(x0^-1*x2^-1)^2 > sage: A.meridians(vertical=False) {0: [x2, x0*x2*x0^-1], 1: [x1], 2: [x0], 3: [x0*x2^-1*x0^-1*x2^-1*x1^-1*x0^-1]} sage: G = A.fundamental_group(simplified=False, vertical=False) sage: G.sorted_presentation() Finitely presented group < x0, x1, x2, x3 | x3^-1*x2^-1*x1^-1*x2*x3*x2^-1*x1*x2, x3^-1*x2^-1*x1^-1*x2*x3*x2^-1*x1*x2, (x3^-1*x2^-1*x0^-1*x2)^2*(x3*x2^-1*x0*x2)^2, x3^-1*x2^-1*x0^-1*x2*x3^-1*x2^-1*x0*x2*x3*x2, x1^-1*x0^-1*x1*x0 > sage: A.meridians(simplified=False, vertical=False) {0: [x2, x3], 1: [x1], 2: [x0], 3: [x3^-1*x2^-1*x1^-1*x0^-1]} sage: A = H(x * y^2 + x + y, y + x -1, x, y) sage: G = A.fundamental_group() sage: G.sorted_presentation() Finitely presented group < x0, x1, x2, x3 | x3^-1*x2^-1*x3*x2, x3^-1*x1^-1*x3*x1, x3^-1*x0^-1*x3*x0, x2^-1*x1^-1*x2*x1, x2^-1*x0^-1*x2*x0, x1^-1*x0^-1*x1*x0 >
>>> from sage.all import * >>> # needs sirocco >>> H = AffinePlaneCurveArrangements(QQ, names=('x', 'y',)); (x, y,) = H._first_ngens(2) >>> A = H(y**Integer(2) + x, y + x - Integer(1), x) >>> A.fundamental_group() Finitely presented group < x0, x1, x2 | x2*x0*x2^-1*x0^-1, x1*x0*x1^-1*x0^-1, (x2*x1)^2*(x2^-1*x1^-1)^2 > >>> A.meridians() {0: [x1, x2*x1*x2^-1], 1: [x0], 2: [x2], 3: [x1^-1*x2^-1*x1^-1*x0^-1]} >>> G = A.fundamental_group(simplified=False) >>> G.sorted_presentation() Finitely presented group < x0, x1, x2, x3 | x3^-1*x2^-1*x3*x0*x1*x0^-1, x3^-1*x1^-1*x3*x0*x1*x0^-1*x2^-1*x0^-1*(x2*x0)^2*x1^-1*x0^-1, x3^-1*x0^-1*x3*x0*x1*x0^-1*x2^-1*x0*x2*x0*x1^-1*x0^-1, x2^-1*x0^-1*x2*x0, x1^-1*x0^-1*x1*x0 > >>> A.meridians(simplified=False) {0: [x1, x2], 1: [x0], 2: [x3], 3: [x3^-1*x2^-1*x1^-1*x0^-1]} >>> A.fundamental_group(vertical=False) Finitely presented group < x0, x1, x2 | x2^-1*x1^-1*x2*x1, x1*x0*x1^-1*x0^-1, (x0*x2)^2*(x0^-1*x2^-1)^2 > >>> A.meridians(vertical=False) {0: [x2, x0*x2*x0^-1], 1: [x1], 2: [x0], 3: [x0*x2^-1*x0^-1*x2^-1*x1^-1*x0^-1]} >>> G = A.fundamental_group(simplified=False, vertical=False) >>> G.sorted_presentation() Finitely presented group < x0, x1, x2, x3 | x3^-1*x2^-1*x1^-1*x2*x3*x2^-1*x1*x2, x3^-1*x2^-1*x1^-1*x2*x3*x2^-1*x1*x2, (x3^-1*x2^-1*x0^-1*x2)^2*(x3*x2^-1*x0*x2)^2, x3^-1*x2^-1*x0^-1*x2*x3^-1*x2^-1*x0*x2*x3*x2, x1^-1*x0^-1*x1*x0 > >>> A.meridians(simplified=False, vertical=False) {0: [x2, x3], 1: [x1], 2: [x0], 3: [x3^-1*x2^-1*x1^-1*x0^-1]} >>> A = H(x * y**Integer(2) + x + y, y + x -Integer(1), x, y) >>> G = A.fundamental_group() >>> G.sorted_presentation() Finitely presented group < x0, x1, x2, x3 | x3^-1*x2^-1*x3*x2, x3^-1*x1^-1*x3*x1, x3^-1*x0^-1*x3*x0, x2^-1*x1^-1*x2*x1, x2^-1*x0^-1*x2*x0, x1^-1*x0^-1*x1*x0 >
- meridians(simplified=True, vertical=True)[source]#
Return the meridians of each irreducible component.
OUTPUT:
A dictionary which associates the index of each curve with its meridians, including the line at infinity if it can be omputed
Note
This functionality requires the
sirocco
package to be installed andAffinePlaneCurveArrangements.fundamental_group()
with the same options, where some examples are shown.EXAMPLES:
sage: # needs sirocco sage: H.<x, y> = AffinePlaneCurveArrangements(QQ) sage: A = H(x-1, y, x, y - 1) sage: A.fundamental_group() Finitely presented group < x0, x1, x2, x3 | x2*x0*x2^-1*x0^-1, x2*x1*x2^-1*x1^-1, x3*x0*x3^-1*x0^-1, x3*x1*x3^-1*x1^-1 > sage: A.meridians() {0: [x2], 1: [x0], 2: [x3], 3: [x1], 4: [x3^-1*x2^-1*x1^-1*x0^-1]}
>>> from sage.all import * >>> # needs sirocco >>> H = AffinePlaneCurveArrangements(QQ, names=('x', 'y',)); (x, y,) = H._first_ngens(2) >>> A = H(x-Integer(1), y, x, y - Integer(1)) >>> A.fundamental_group() Finitely presented group < x0, x1, x2, x3 | x2*x0*x2^-1*x0^-1, x2*x1*x2^-1*x1^-1, x3*x0*x3^-1*x0^-1, x3*x1*x3^-1*x1^-1 > >>> A.meridians() {0: [x2], 1: [x0], 2: [x3], 3: [x1], 4: [x3^-1*x2^-1*x1^-1*x0^-1]}
- strands()[source]#
Return the strands for each member of the arrangement.
OUTPUT:
A dictionary which associates to the index of each strand its associated component if the braid monodromy has been calculated with
vertical=False
.Note
This functionality requires the
sirocco
package to be installed.EXAMPLES:
sage: # needs sirocco sage: H.<x, y> = AffinePlaneCurveArrangements(QQ) sage: A = H(y^2 + x, y + x - 1, x) sage: bm = A.braid_monodromy() sage: A.strands() {0: 2, 1: 1, 2: 0, 3: 0}
>>> from sage.all import * >>> # needs sirocco >>> H = AffinePlaneCurveArrangements(QQ, names=('x', 'y',)); (x, y,) = H._first_ngens(2) >>> A = H(y**Integer(2) + x, y + x - Integer(1), x) >>> bm = A.braid_monodromy() >>> A.strands() {0: 2, 1: 1, 2: 0, 3: 0}
- vertical_lines_in_braid_monodromy()[source]#
Return the vertical lines in the arrangement.
OUTPUT:
A dictionary which associates the index of a braid to the index of the vertical line associated to the braid.
Note
This functionality requires the
sirocco
package to be installed.EXAMPLES:
sage: # needs sirocco sage: H.<x, y> = AffinePlaneCurveArrangements(QQ) sage: A = H(y^2 + x, y + x - 1, x) sage: A.vertical_lines_in_braid_monodromy() {1: 2} sage: A.braid_monodromy(vertical=True) [s1*s0*s1*s0^-1*s1^-1*s0, s0^-1*s1*s0*s1^-1*s0, s0^-1*s1^2*s0]
>>> from sage.all import * >>> # needs sirocco >>> H = AffinePlaneCurveArrangements(QQ, names=('x', 'y',)); (x, y,) = H._first_ngens(2) >>> A = H(y**Integer(2) + x, y + x - Integer(1), x) >>> A.vertical_lines_in_braid_monodromy() {1: 2} >>> A.braid_monodromy(vertical=True) [s1*s0*s1*s0^-1*s1^-1*s0, s0^-1*s1*s0*s1^-1*s0, s0^-1*s1^2*s0]
- vertical_strands()[source]#
Return the strands if the braid monodromy has been computed with the vertical option.
OUTPUT:
A dictionary which associates to the index of each strand its associated component if the braid monodromy has been calculated with
vertical=True
.Note
This functionality requires the
sirocco
package to be installed.EXAMPLES:
sage: # needs sirocco sage: H.<x, y> = AffinePlaneCurveArrangements(QQ) sage: A = H(y^2 + x, y + x - 1, x) sage: A.vertical_strands() {0: 1, 1: 0, 2: 0} sage: A.braid_monodromy(vertical=True) [s1*s0*s1*s0^-1*s1^-1*s0, s0^-1*s1*s0*s1^-1*s0, s0^-1*s1^2*s0]
>>> from sage.all import * >>> # needs sirocco >>> H = AffinePlaneCurveArrangements(QQ, names=('x', 'y',)); (x, y,) = H._first_ngens(2) >>> A = H(y**Integer(2) + x, y + x - Integer(1), x) >>> A.vertical_strands() {0: 1, 1: 0, 2: 0} >>> A.braid_monodromy(vertical=True) [s1*s0*s1*s0^-1*s1^-1*s0, s0^-1*s1*s0*s1^-1*s0, s0^-1*s1^2*s0]
- class sage.schemes.curves.plane_curve_arrangement.AffinePlaneCurveArrangements(base_ring, names=())[source]#
Bases:
PlaneCurveArrangements
Affine curve arrangements.
INPUT:
base_ring
– ring; the base ringnames
– tuple of strings; the variable names
EXAMPLES:
sage: H.<x, y> = AffinePlaneCurveArrangements(QQ) sage: H(x, y^2, x-1, y-1) Arrangement (x, y^2, x - 1, y - 1) in Affine Space of dimension 2 over Rational Field
>>> from sage.all import * >>> H = AffinePlaneCurveArrangements(QQ, names=('x', 'y',)); (x, y,) = H._first_ngens(2) >>> H(x, y**Integer(2), x-Integer(1), y-Integer(1)) Arrangement (x, y^2, x - 1, y - 1) in Affine Space of dimension 2 over Rational Field
- Element[source]#
alias of
AffinePlaneCurveArrangementElement
- ambient_space()[source]#
Return the ambient space.
EXAMPLES:
sage: L.<x, y> = AffinePlaneCurveArrangements(QQ) sage: L.ambient_space() Affine Space of dimension 2 over Rational Field
>>> from sage.all import * >>> L = AffinePlaneCurveArrangements(QQ, names=('x', 'y',)); (x, y,) = L._first_ngens(2) >>> L.ambient_space() Affine Space of dimension 2 over Rational Field
- class sage.schemes.curves.plane_curve_arrangement.PlaneCurveArrangementElement(parent, curves, check=True)[source]#
Bases:
Element
An ordered plane curve arrangement.
- add_curves(other)[source]#
The union of
self
withother
.INPUT:
other
– a curve arrangement or something that can be converted into a curve arrangement
OUTPUT:
A new curve arrangement.
EXAMPLES:
sage: H.<x, y> = AffinePlaneCurveArrangements(QQ) sage: h = H([x * y, x + y + 1, x^3 - y^5, x^2 * y^2 + x^5 + y^5, (x^2 + y^2)^3 + (x^3 + y^3 - 1)^2]) sage: C = Curve(x^8 - y^8 -x^4 * y^4) sage: h1 = h.union(C); h1 Arrangement of 6 curves in Affine Space of dimension 2 over Rational Field sage: h1 == h1.union(C) True
>>> from sage.all import * >>> H = AffinePlaneCurveArrangements(QQ, names=('x', 'y',)); (x, y,) = H._first_ngens(2) >>> h = H([x * y, x + y + Integer(1), x**Integer(3) - y**Integer(5), x**Integer(2) * y**Integer(2) + x**Integer(5) + y**Integer(5), (x**Integer(2) + y**Integer(2))**Integer(3) + (x**Integer(3) + y**Integer(3) - Integer(1))**Integer(2)]) >>> C = Curve(x**Integer(8) - y**Integer(8) -x**Integer(4) * y**Integer(4)) >>> h1 = h.union(C); h1 Arrangement of 6 curves in Affine Space of dimension 2 over Rational Field >>> h1 == h1.union(C) True
- change_ring(base_ring)[source]#
Return curve arrangement over the new base ring.
INPUT:
base_ring
– the new base ring; must be a field for curve arrangements
OUTPUT:
The curve arrangement obtained by changing the base field, as a new curve arrangement.
EXAMPLES:
sage: # needs sage.rings.number_field sage: H.<x, y> = AffinePlaneCurveArrangements(QQ) sage: A = H(y^2 - x^3, x, y, y^2 + x * y + x^2) sage: K.<a> = CyclotomicField(3) sage: A.change_ring(K) Arrangement (-x^3 + y^2, x, y, x^2 + x*y + y^2) in Affine Space of dimension 2 over Cyclotomic Field of order 3 and degree 2
>>> from sage.all import * >>> # needs sage.rings.number_field >>> H = AffinePlaneCurveArrangements(QQ, names=('x', 'y',)); (x, y,) = H._first_ngens(2) >>> A = H(y**Integer(2) - x**Integer(3), x, y, y**Integer(2) + x * y + x**Integer(2)) >>> K = CyclotomicField(Integer(3), names=('a',)); (a,) = K._first_ngens(1) >>> A.change_ring(K) Arrangement (-x^3 + y^2, x, y, x^2 + x*y + y^2) in Affine Space of dimension 2 over Cyclotomic Field of order 3 and degree 2
- coordinate_ring()[source]#
Return the coordinate ring of
self
.OUTPUT:
The coordinate ring of the curve arrangement.
EXAMPLES:
sage: L.<x, y> = AffinePlaneCurveArrangements(QQ) sage: C = L(x, y) sage: C.coordinate_ring() Multivariate Polynomial Ring in x, y over Rational Field sage: P.<x, y, z> = ProjectivePlaneCurveArrangements(QQ) sage: C = P(x, y) sage: C.coordinate_ring() Multivariate Polynomial Ring in x, y, z over Rational Field
>>> from sage.all import * >>> L = AffinePlaneCurveArrangements(QQ, names=('x', 'y',)); (x, y,) = L._first_ngens(2) >>> C = L(x, y) >>> C.coordinate_ring() Multivariate Polynomial Ring in x, y over Rational Field >>> P = ProjectivePlaneCurveArrangements(QQ, names=('x', 'y', 'z',)); (x, y, z,) = P._first_ngens(3) >>> C = P(x, y) >>> C.coordinate_ring() Multivariate Polynomial Ring in x, y, z over Rational Field
- curves()[source]#
Return the curves in the arrangement as a tuple.
OUTPUT:
A tuple.
EXAMPLES:
sage: H.<x, y> = AffinePlaneCurveArrangements(QQ) sage: h = H((x * y, x + y + 1)) sage: h.curves() (Affine Plane Curve over Rational Field defined by x*y, Affine Plane Curve over Rational Field defined by x + y + 1)
>>> from sage.all import * >>> H = AffinePlaneCurveArrangements(QQ, names=('x', 'y',)); (x, y,) = H._first_ngens(2) >>> h = H((x * y, x + y + Integer(1))) >>> h.curves() (Affine Plane Curve over Rational Field defined by x*y, Affine Plane Curve over Rational Field defined by x + y + 1)
Note that the curves can be indexed as if they were a list:
sage: h[1] Affine Plane Curve over Rational Field defined by x + y + 1
>>> from sage.all import * >>> h[Integer(1)] Affine Plane Curve over Rational Field defined by x + y + 1
- defining_polynomial(simplified=True)[source]#
Return the defining polynomial of the union of the curves in
self
.EXAMPLES:
sage: H.<x, y> = AffinePlaneCurveArrangements(QQ) sage: A = H(y ** 2 + x ** 2, x, y) sage: prod(A.defining_polynomials()) == A.defining_polynomial() True
>>> from sage.all import * >>> H = AffinePlaneCurveArrangements(QQ, names=('x', 'y',)); (x, y,) = H._first_ngens(2) >>> A = H(y ** Integer(2) + x ** Integer(2), x, y) >>> prod(A.defining_polynomials()) == A.defining_polynomial() True
- defining_polynomials()[source]#
Return the defining polynomials of the elements of
self
.EXAMPLES:
sage: H.<x, y> = AffinePlaneCurveArrangements(QQ) sage: A = H(y^2 - x^3, x, y, y^2 + x * y + x^2) sage: A.defining_polynomials() (-x^3 + y^2, x, y, x^2 + x*y + y^2)
>>> from sage.all import * >>> H = AffinePlaneCurveArrangements(QQ, names=('x', 'y',)); (x, y,) = H._first_ngens(2) >>> A = H(y**Integer(2) - x**Integer(3), x, y, y**Integer(2) + x * y + x**Integer(2)) >>> A.defining_polynomials() (-x^3 + y^2, x, y, x^2 + x*y + y^2)
- deletion(curves)[source]#
Return the curve arrangement obtained by removing
curves
.INPUT:
curves
– a curve or curve arrangement
OUTPUT:
A new curve arrangement with the given curve(s)
h
removed.EXAMPLES:
sage: H.<x, y> = AffinePlaneCurveArrangements(QQ) sage: h = H([x * y, x + y + 1, x^3 - y^5, x^2 * y^2 + x^5 + y^5, (x^2 + y^2)^3 + (x^3 + y^3 - 1)^2]) sage: C = h[-1] sage: h.deletion(C) Arrangement (x*y, x + y + 1, -y^5 + x^3, x^5 + y^5 + x^2*y^2) in Affine Space of dimension 2 over Rational Field sage: h.deletion(x) Traceback (most recent call last): ... ValueError: curve is not in the arrangement
>>> from sage.all import * >>> H = AffinePlaneCurveArrangements(QQ, names=('x', 'y',)); (x, y,) = H._first_ngens(2) >>> h = H([x * y, x + y + Integer(1), x**Integer(3) - y**Integer(5), x**Integer(2) * y**Integer(2) + x**Integer(5) + y**Integer(5), (x**Integer(2) + y**Integer(2))**Integer(3) + (x**Integer(3) + y**Integer(3) - Integer(1))**Integer(2)]) >>> C = h[-Integer(1)] >>> h.deletion(C) Arrangement (x*y, x + y + 1, -y^5 + x^3, x^5 + y^5 + x^2*y^2) in Affine Space of dimension 2 over Rational Field >>> h.deletion(x) Traceback (most recent call last): ... ValueError: curve is not in the arrangement
- have_common_factors()[source]#
Check if the curves have common factors.
EXAMPLES:
sage: H.<x, y> = AffinePlaneCurveArrangements(QQ) sage: A = H(x * y, x^2 + x* y^3) sage: A.have_common_factors() True sage: H(x * y, x + y^3).have_common_factors() False
>>> from sage.all import * >>> H = AffinePlaneCurveArrangements(QQ, names=('x', 'y',)); (x, y,) = H._first_ngens(2) >>> A = H(x * y, x**Integer(2) + x* y**Integer(3)) >>> A.have_common_factors() True >>> H(x * y, x + y**Integer(3)).have_common_factors() False
- ncurves()[source]#
Return the number of curves in the arrangement.
OUTPUT:
An integer.
EXAMPLES:
sage: H.<x, y, z> = ProjectivePlaneCurveArrangements(QQ) sage: h = H((x * y, x + y + z)) sage: h.ncurves() 2 sage: len(h) # equivalent 2
>>> from sage.all import * >>> H = ProjectivePlaneCurveArrangements(QQ, names=('x', 'y', 'z',)); (x, y, z,) = H._first_ngens(3) >>> h = H((x * y, x + y + z)) >>> h.ncurves() 2 >>> len(h) # equivalent 2
- reduce(clean=False, verbose=False)[source]#
Replace the curves by their reduction.
INPUT:
clean
– boolean (default:False
); ifFalse
and there are common factors it returnsNone
and a warning message. IfTrue
, the common factors are kept only in the first occurance.
EXAMPLES:
sage: H.<x, y> = AffinePlaneCurveArrangements(QQ) sage: A = H(y^2, (x + y)^3 * (x^2 + x * y + y^2)) sage: A.reduce() Arrangement (y, x^3 + 2*x^2*y + 2*x*y^2 + y^3) in Affine Space of dimension 2 over Rational Field sage: C = H(x*y, x*(y + 1)) sage: C.reduce(verbose=True) Some curves have common components sage: C.reduce(clean=True) Arrangement (x*y, y + 1) in Affine Space of dimension 2 over Rational Field sage: C = H(x*y, x) sage: C.reduce(clean=True) Arrangement (x*y) in Affine Space of dimension 2 over Rational Field
>>> from sage.all import * >>> H = AffinePlaneCurveArrangements(QQ, names=('x', 'y',)); (x, y,) = H._first_ngens(2) >>> A = H(y**Integer(2), (x + y)**Integer(3) * (x**Integer(2) + x * y + y**Integer(2))) >>> A.reduce() Arrangement (y, x^3 + 2*x^2*y + 2*x*y^2 + y^3) in Affine Space of dimension 2 over Rational Field >>> C = H(x*y, x*(y + Integer(1))) >>> C.reduce(verbose=True) Some curves have common components >>> C.reduce(clean=True) Arrangement (x*y, y + 1) in Affine Space of dimension 2 over Rational Field >>> C = H(x*y, x) >>> C.reduce(clean=True) Arrangement (x*y) in Affine Space of dimension 2 over Rational Field
- union(other)[source]#
The union of
self
withother
.INPUT:
other
– a curve arrangement or something that can be converted into a curve arrangement
OUTPUT:
A new curve arrangement.
EXAMPLES:
sage: H.<x, y> = AffinePlaneCurveArrangements(QQ) sage: h = H([x * y, x + y + 1, x^3 - y^5, x^2 * y^2 + x^5 + y^5, (x^2 + y^2)^3 + (x^3 + y^3 - 1)^2]) sage: C = Curve(x^8 - y^8 -x^4 * y^4) sage: h1 = h.union(C); h1 Arrangement of 6 curves in Affine Space of dimension 2 over Rational Field sage: h1 == h1.union(C) True
>>> from sage.all import * >>> H = AffinePlaneCurveArrangements(QQ, names=('x', 'y',)); (x, y,) = H._first_ngens(2) >>> h = H([x * y, x + y + Integer(1), x**Integer(3) - y**Integer(5), x**Integer(2) * y**Integer(2) + x**Integer(5) + y**Integer(5), (x**Integer(2) + y**Integer(2))**Integer(3) + (x**Integer(3) + y**Integer(3) - Integer(1))**Integer(2)]) >>> C = Curve(x**Integer(8) - y**Integer(8) -x**Integer(4) * y**Integer(4)) >>> h1 = h.union(C); h1 Arrangement of 6 curves in Affine Space of dimension 2 over Rational Field >>> h1 == h1.union(C) True
- class sage.schemes.curves.plane_curve_arrangement.PlaneCurveArrangements(base_ring, names=())[source]#
Bases:
UniqueRepresentation
,Parent
Plane curve arrangements.
INPUT:
base_ring
– ring; the base ringnames
– tuple of strings; the variable names
EXAMPLES:
sage: H.<x, y> = AffinePlaneCurveArrangements(QQ) sage: H(x, y^2, x-1, y-1) Arrangement (x, y^2, x - 1, y - 1) in Affine Space of dimension 2 over Rational Field
>>> from sage.all import * >>> H = AffinePlaneCurveArrangements(QQ, names=('x', 'y',)); (x, y,) = H._first_ngens(2) >>> H(x, y**Integer(2), x-Integer(1), y-Integer(1)) Arrangement (x, y^2, x - 1, y - 1) in Affine Space of dimension 2 over Rational Field
- Element[source]#
alias of
PlaneCurveArrangementElement
- ambient_space()[source]#
Return the ambient space.
EXAMPLES:
sage: L.<x, y> = PlaneCurveArrangements(QQ) Traceback (most recent call last): ... NotImplementedError: <abstract method ambient_space at 0x...> sage: L.<x, y> = AffinePlaneCurveArrangements(QQ) sage: L.ambient_space() Affine Space of dimension 2 over Rational Field sage: L.<x, y, z> = ProjectivePlaneCurveArrangements(QQ) sage: L.ambient_space() Projective Space of dimension 2 over Rational Field
>>> from sage.all import * >>> L = PlaneCurveArrangements(QQ, names=('x', 'y',)); (x, y,) = L._first_ngens(2) Traceback (most recent call last): ... NotImplementedError: <abstract method ambient_space at 0x...> >>> L = AffinePlaneCurveArrangements(QQ, names=('x', 'y',)); (x, y,) = L._first_ngens(2) >>> L.ambient_space() Affine Space of dimension 2 over Rational Field >>> L = ProjectivePlaneCurveArrangements(QQ, names=('x', 'y', 'z',)); (x, y, z,) = L._first_ngens(3) >>> L.ambient_space() Projective Space of dimension 2 over Rational Field
- change_ring(base_ring)[source]#
Return curve arrangements over a different base ring.
INPUT:
base_ring
– a ring; the new base ring.
OUTPUT:
A new
PlaneCurveArrangements
instance over the new base ringEXAMPLES:
sage: L.<x, y> = AffinePlaneCurveArrangements(QQ) sage: L.change_ring(RR).base_ring() Real Field with 53 bits of precision
>>> from sage.all import * >>> L = AffinePlaneCurveArrangements(QQ, names=('x', 'y',)); (x, y,) = L._first_ngens(2) >>> L.change_ring(RR).base_ring() Real Field with 53 bits of precision
- coordinate_ring()[source]#
Return the coordinate ring.
OUTPUT:
The coordinate ring of the curve arrangement.
EXAMPLES:
sage: L.<x, y> = AffinePlaneCurveArrangements(QQ) sage: L.coordinate_ring() Multivariate Polynomial Ring in x, y over Rational Field
>>> from sage.all import * >>> L = AffinePlaneCurveArrangements(QQ, names=('x', 'y',)); (x, y,) = L._first_ngens(2) >>> L.coordinate_ring() Multivariate Polynomial Ring in x, y over Rational Field
- gen(i)[source]#
Return the \(i\)-th coordinate.
INPUT:
i
– integer
OUTPUT:
A variable.
EXAMPLES:
sage: L.<x, y> = AffinePlaneCurveArrangements(QQ) sage: L.gen(1) y sage: L.<x, y, z> = ProjectivePlaneCurveArrangements(QQ) sage: L.gen(2) z
>>> from sage.all import * >>> L = AffinePlaneCurveArrangements(QQ, names=('x', 'y',)); (x, y,) = L._first_ngens(2) >>> L.gen(Integer(1)) y >>> L = ProjectivePlaneCurveArrangements(QQ, names=('x', 'y', 'z',)); (x, y, z,) = L._first_ngens(3) >>> L.gen(Integer(2)) z
- gens()[source]#
Return the coordinates.
OUTPUT:
A tuple of linear expressions, one for each linear variable.
EXAMPLES:
sage: L = AffinePlaneCurveArrangements(QQ, ('x', 'y')) sage: L.gens() (x, y) sage: L = ProjectivePlaneCurveArrangements(QQ, ('x', 'y', 'z')) sage: L.gens() (x, y, z)
>>> from sage.all import * >>> L = AffinePlaneCurveArrangements(QQ, ('x', 'y')) >>> L.gens() (x, y) >>> L = ProjectivePlaneCurveArrangements(QQ, ('x', 'y', 'z')) >>> L.gens() (x, y, z)
- ngens()[source]#
Return the number of variables, i.e. 2 or 3, kept for completness.
OUTPUT:
An integer, 2 or 3, depending if the arrangement is projective or affine.
EXAMPLES:
sage: L.<x, y> = AffinePlaneCurveArrangements(QQ) sage: L.ngens() 2 sage: L.<x, y, z> = ProjectivePlaneCurveArrangements(QQ) sage: L.ngens() 3
>>> from sage.all import * >>> L = AffinePlaneCurveArrangements(QQ, names=('x', 'y',)); (x, y,) = L._first_ngens(2) >>> L.ngens() 2 >>> L = ProjectivePlaneCurveArrangements(QQ, names=('x', 'y', 'z',)); (x, y, z,) = L._first_ngens(3) >>> L.ngens() 3
- class sage.schemes.curves.plane_curve_arrangement.ProjectivePlaneCurveArrangementElement(parent, curves, check=True)[source]#
Bases:
PlaneCurveArrangementElement
An ordered projective plane curve arrangement.
- fundamental_group(simplified=True)[source]#
Return the fundamental group of the complement of the union of an arragnement of projective plane curves in the projective plane.
INPUT:
simplified
– boolean (default:True
); set if the group is simplified
OUTPUT:
A finitely presented group.
Note
This functionality requires the
sirocco
package to be installed.EXAMPLES:
sage: # needs sirocco sage: H.<x, y, z> = ProjectivePlaneCurveArrangements(QQ) sage: H(z).fundamental_group() Finitely presented group < | > sage: H(x*y).fundamental_group() Finitely presented group < x | > sage: A = H(y^2 + x*z, y + x - z, x) sage: A.fundamental_group().sorted_presentation() Finitely presented group < x0, x1 | x1^-1*x0^-1*x1*x0 > sage: A.meridians() {0: [x1], 1: [x0], 2: [x1^-1*x0^-1*x1^-1]} sage: G = A.fundamental_group(simplified=False) sage: G.sorted_presentation() Finitely presented group < x0, x1, x2, x3 | x3^-1*x2^-1*x1^-1*x0^-1, x3^-1*x2^-1*x3*x0*x1*x0^-1, x3^-1*x1^-1*x3*x0*x1*x0^-1*x2^-1*x0^-1*(x2*x0)^2*x1^-1*x0^-1, x3^-1*x0^-1*x3*x0*x1*x0^-1*x2^-1*x0*x2*x0*x1^-1*x0^-1, x2^-1*x0^-1*x2*x0, x1^-1*x0^-1*x1*x0 > sage: A.meridians(simplified=False) {0: [x1, x2], 1: [x0], 2: [x3]} sage: A = H(y^2 + x*z, z, x) sage: A.fundamental_group() Finitely presented group < x0, x1 | (x1*x0)^2*(x1^-1*x0^-1)^2 > sage: A = H(y^2 + x*z, z*x, y) sage: A.fundamental_group() Finitely presented group < x0, x1, x2 | x2*x0*x1*x0^-1*x2^-1*x1^-1, x1*(x2*x0)^2*x2^-1*x1^-1*x0^-1*x2^-1*x0^-1 >
>>> from sage.all import * >>> # needs sirocco >>> H = ProjectivePlaneCurveArrangements(QQ, names=('x', 'y', 'z',)); (x, y, z,) = H._first_ngens(3) >>> H(z).fundamental_group() Finitely presented group < | > >>> H(x*y).fundamental_group() Finitely presented group < x | > >>> A = H(y**Integer(2) + x*z, y + x - z, x) >>> A.fundamental_group().sorted_presentation() Finitely presented group < x0, x1 | x1^-1*x0^-1*x1*x0 > >>> A.meridians() {0: [x1], 1: [x0], 2: [x1^-1*x0^-1*x1^-1]} >>> G = A.fundamental_group(simplified=False) >>> G.sorted_presentation() Finitely presented group < x0, x1, x2, x3 | x3^-1*x2^-1*x1^-1*x0^-1, x3^-1*x2^-1*x3*x0*x1*x0^-1, x3^-1*x1^-1*x3*x0*x1*x0^-1*x2^-1*x0^-1*(x2*x0)^2*x1^-1*x0^-1, x3^-1*x0^-1*x3*x0*x1*x0^-1*x2^-1*x0*x2*x0*x1^-1*x0^-1, x2^-1*x0^-1*x2*x0, x1^-1*x0^-1*x1*x0 > >>> A.meridians(simplified=False) {0: [x1, x2], 1: [x0], 2: [x3]} >>> A = H(y**Integer(2) + x*z, z, x) >>> A.fundamental_group() Finitely presented group < x0, x1 | (x1*x0)^2*(x1^-1*x0^-1)^2 > >>> A = H(y**Integer(2) + x*z, z*x, y) >>> A.fundamental_group() Finitely presented group < x0, x1, x2 | x2*x0*x1*x0^-1*x2^-1*x1^-1, x1*(x2*x0)^2*x2^-1*x1^-1*x0^-1*x2^-1*x0^-1 >
- meridians(simplified=True)[source]#
Return the meridians of each irreducible component.
OUTPUT:
A dictionary which associates the index of each curve with its meridians, including the line at infinity if it can be computed
Note
This function requires the
sirocco
package to be installed andProjectivePlaneCurveArrangements.fundamental_group()
with the same options, where some examples are shown.EXAMPLES:
sage: # needs sirocco sage: H.<x, y, z> = ProjectivePlaneCurveArrangements(QQ) sage: A = H(y^2 + x*z, y + x - z, x) sage: A.fundamental_group().sorted_presentation() Finitely presented group < x0, x1 | x1^-1*x0^-1*x1*x0 > sage: A.meridians() {0: [x1], 1: [x0], 2: [x1^-1*x0^-1*x1^-1]} sage: A = H(y^2 + x*z, z, x) sage: A.fundamental_group() Finitely presented group < x0, x1 | (x1*x0)^2*(x1^-1*x0^-1)^2 > sage: A.meridians() {0: [x0, x1*x0*x1^-1], 1: [x0^-1*x1^-1*x0^-1], 2: [x1]} sage: A = H(y^2 + x*z, z*x, y) sage: A.fundamental_group() Finitely presented group < x0, x1, x2 | x2*x0*x1*x0^-1*x2^-1*x1^-1, x1*(x2*x0)^2*x2^-1*x1^-1*x0^-1*x2^-1*x0^-1 > sage: A.meridians() {0: [x0, x2*x0*x2^-1], 1: [x2, x0^-1*x2^-1*x1^-1*x0^-1], 2: [x1]}
>>> from sage.all import * >>> # needs sirocco >>> H = ProjectivePlaneCurveArrangements(QQ, names=('x', 'y', 'z',)); (x, y, z,) = H._first_ngens(3) >>> A = H(y**Integer(2) + x*z, y + x - z, x) >>> A.fundamental_group().sorted_presentation() Finitely presented group < x0, x1 | x1^-1*x0^-1*x1*x0 > >>> A.meridians() {0: [x1], 1: [x0], 2: [x1^-1*x0^-1*x1^-1]} >>> A = H(y**Integer(2) + x*z, z, x) >>> A.fundamental_group() Finitely presented group < x0, x1 | (x1*x0)^2*(x1^-1*x0^-1)^2 > >>> A.meridians() {0: [x0, x1*x0*x1^-1], 1: [x0^-1*x1^-1*x0^-1], 2: [x1]} >>> A = H(y**Integer(2) + x*z, z*x, y) >>> A.fundamental_group() Finitely presented group < x0, x1, x2 | x2*x0*x1*x0^-1*x2^-1*x1^-1, x1*(x2*x0)^2*x2^-1*x1^-1*x0^-1*x2^-1*x0^-1 > >>> A.meridians() {0: [x0, x2*x0*x2^-1], 1: [x2, x0^-1*x2^-1*x1^-1*x0^-1], 2: [x1]}
- class sage.schemes.curves.plane_curve_arrangement.ProjectivePlaneCurveArrangements(base_ring, names=())[source]#
Bases:
PlaneCurveArrangements
Projective curve arrangements.
INPUT:
base_ring
– ring; the base ringnames
– tuple of strings; the variable names
EXAMPLES:
sage: H.<x, y, z> = ProjectivePlaneCurveArrangements(QQ) sage: H(x, y^2, x-z, y-z) Arrangement (x, y^2, x - z, y - z) in Projective Space of dimension 2 over Rational Field
>>> from sage.all import * >>> H = ProjectivePlaneCurveArrangements(QQ, names=('x', 'y', 'z',)); (x, y, z,) = H._first_ngens(3) >>> H(x, y**Integer(2), x-z, y-z) Arrangement (x, y^2, x - z, y - z) in Projective Space of dimension 2 over Rational Field
- ambient_space()[source]#
Return the ambient space.
EXAMPLES:
sage: L.<x, y, z> = ProjectivePlaneCurveArrangements(QQ) sage: L.ambient_space() Projective Space of dimension 2 over Rational Field
>>> from sage.all import * >>> L = ProjectivePlaneCurveArrangements(QQ, names=('x', 'y', 'z',)); (x, y, z,) = L._first_ngens(3) >>> L.ambient_space() Projective Space of dimension 2 over Rational Field