The set \(\mathbb{P}^1(K)\) of cusps of a number field \(K\)¶
AUTHORS:
Maite Aranes (2009): Initial version
EXAMPLES:
The space of cusps over a number field k:
sage: x = polygen(ZZ, 'x')
sage: k.<a> = NumberField(x^2 + 5)
sage: kCusps = NFCusps(k); kCusps
Set of all cusps of Number Field in a with defining polynomial x^2 + 5
sage: kCusps is NFCusps(k)
True
>>> from sage.all import *
>>> x = polygen(ZZ, 'x')
>>> k = NumberField(x**Integer(2) + Integer(5), names=('a',)); (a,) = k._first_ngens(1)
>>> kCusps = NFCusps(k); kCusps
Set of all cusps of Number Field in a with defining polynomial x^2 + 5
>>> kCusps is NFCusps(k)
True
Define a cusp over a number field:
sage: NFCusp(k, a, 2/(a+1))
Cusp [a - 5: 2] of Number Field in a with defining polynomial x^2 + 5
sage: kCusps((a,2))
Cusp [a: 2] of Number Field in a with defining polynomial x^2 + 5
sage: NFCusp(k,oo)
Cusp Infinity of Number Field in a with defining polynomial x^2 + 5
>>> from sage.all import *
>>> NFCusp(k, a, Integer(2)/(a+Integer(1)))
Cusp [a - 5: 2] of Number Field in a with defining polynomial x^2 + 5
>>> kCusps((a,Integer(2)))
Cusp [a: 2] of Number Field in a with defining polynomial x^2 + 5
>>> NFCusp(k,oo)
Cusp Infinity of Number Field in a with defining polynomial x^2 + 5
Different operations with cusps over a number field:
sage: alpha = NFCusp(k, 3, 1/a + 2); alpha
Cusp [a + 10: 7] of Number Field in a with defining polynomial x^2 + 5
sage: alpha.numerator()
a + 10
sage: alpha.denominator()
7
sage: alpha.ideal()
Fractional ideal (7, a + 3)
sage: M = alpha.ABmatrix(); M # random
[a + 10, 2*a + 6, 7, a + 5]
sage: NFCusp(k, oo).apply(M)
Cusp [a + 10: 7] of Number Field in a with defining polynomial x^2 + 5
>>> from sage.all import *
>>> alpha = NFCusp(k, Integer(3), Integer(1)/a + Integer(2)); alpha
Cusp [a + 10: 7] of Number Field in a with defining polynomial x^2 + 5
>>> alpha.numerator()
a + 10
>>> alpha.denominator()
7
>>> alpha.ideal()
Fractional ideal (7, a + 3)
>>> M = alpha.ABmatrix(); M # random
[a + 10, 2*a + 6, 7, a + 5]
>>> NFCusp(k, oo).apply(M)
Cusp [a + 10: 7] of Number Field in a with defining polynomial x^2 + 5
Check Gamma0(N)-equivalence of cusps:
sage: N = k.ideal(3)
sage: alpha = NFCusp(k, 3, a + 1)
sage: beta = kCusps((2, a - 3))
sage: alpha.is_Gamma0_equivalent(beta, N)
True
>>> from sage.all import *
>>> N = k.ideal(Integer(3))
>>> alpha = NFCusp(k, Integer(3), a + Integer(1))
>>> beta = kCusps((Integer(2), a - Integer(3)))
>>> alpha.is_Gamma0_equivalent(beta, N)
True
Obtain transformation matrix for equivalent cusps:
sage: t, M = alpha.is_Gamma0_equivalent(beta, N, Transformation=True)
sage: M[2] in N
True
sage: M[0]*M[3] - M[1]*M[2] == 1
True
sage: alpha.apply(M) == beta
True
>>> from sage.all import *
>>> t, M = alpha.is_Gamma0_equivalent(beta, N, Transformation=True)
>>> M[Integer(2)] in N
True
>>> M[Integer(0)]*M[Integer(3)] - M[Integer(1)]*M[Integer(2)] == Integer(1)
True
>>> alpha.apply(M) == beta
True
List representatives for Gamma_0(N) - equivalence classes of cusps:
sage: Gamma0_NFCusps(N)
[Cusp [0: 1] of Number Field in a with defining polynomial x^2 + 5,
Cusp [1: 3] of Number Field in a with defining polynomial x^2 + 5,
...]
>>> from sage.all import *
>>> Gamma0_NFCusps(N)
[Cusp [0: 1] of Number Field in a with defining polynomial x^2 + 5,
Cusp [1: 3] of Number Field in a with defining polynomial x^2 + 5,
...]
- sage.modular.cusps_nf.Gamma0_NFCusps(N)[source]¶
Return a list of inequivalent cusps for \(\Gamma_0(N)\), i.e., a set of representatives for the orbits of
self
on \(\mathbb{P}^1(k)\).INPUT:
N
– an integral ideal of the number field k (the level)
OUTPUT: list of inequivalent number field cusps
EXAMPLES:
sage: x = polygen(ZZ, 'x') sage: k.<a> = NumberField(x^2 + 5) sage: N = k.ideal(3) sage: L = Gamma0_NFCusps(N)
>>> from sage.all import * >>> x = polygen(ZZ, 'x') >>> k = NumberField(x**Integer(2) + Integer(5), names=('a',)); (a,) = k._first_ngens(1) >>> N = k.ideal(Integer(3)) >>> L = Gamma0_NFCusps(N)
The cusps in the list are inequivalent:
sage: any(L[i].is_Gamma0_equivalent(L[j], N) ....: for i in range(len(L)) for j in range(len(L)) if i < j) False
>>> from sage.all import * >>> any(L[i].is_Gamma0_equivalent(L[j], N) ... for i in range(len(L)) for j in range(len(L)) if i < j) False
We test that we obtain the right number of orbits:
sage: from sage.modular.cusps_nf import number_of_Gamma0_NFCusps sage: len(L) == number_of_Gamma0_NFCusps(N) True
>>> from sage.all import * >>> from sage.modular.cusps_nf import number_of_Gamma0_NFCusps >>> len(L) == number_of_Gamma0_NFCusps(N) True
Another example:
sage: x = polygen(ZZ, 'x') sage: k.<a> = NumberField(x^4 - x^3 -21*x^2 + 17*x + 133) sage: N = k.ideal(5) sage: from sage.modular.cusps_nf import number_of_Gamma0_NFCusps sage: len(Gamma0_NFCusps(N)) == number_of_Gamma0_NFCusps(N) # long time (over 1 sec) True
>>> from sage.all import * >>> x = polygen(ZZ, 'x') >>> k = NumberField(x**Integer(4) - x**Integer(3) -Integer(21)*x**Integer(2) + Integer(17)*x + Integer(133), names=('a',)); (a,) = k._first_ngens(1) >>> N = k.ideal(Integer(5)) >>> from sage.modular.cusps_nf import number_of_Gamma0_NFCusps >>> len(Gamma0_NFCusps(N)) == number_of_Gamma0_NFCusps(N) # long time (over 1 sec) True
- class sage.modular.cusps_nf.NFCusp(number_field, a, b=None, parent=None, lreps=None)[source]¶
Bases:
Element
Create a number field cusp, i.e., an element of \(\mathbb{P}^1(k)\).
A cusp on a number field is either an element of the field or infinity, i.e., an element of the projective line over the number field. It is stored as a pair (a,b), where a, b are integral elements of the number field.
INPUT:
number_field
– the number field over which the cusp is defineda
– it can be a number field element (integral or not), or a number field cuspb
– (optional) when present, it must be either Infinity or coercible to an element of the number fieldlreps
– (optional) a list of chosen representatives for all the ideal classes of the field. When given, the representative of the cusp will be changed so its associated ideal is one of the ideals in the list.
OUTPUT:
[a: b]
– a number field cusp.EXAMPLES:
sage: x = polygen(ZZ, 'x') sage: k.<a> = NumberField(x^2 + 5) sage: NFCusp(k, a, 2) Cusp [a: 2] of Number Field in a with defining polynomial x^2 + 5 sage: NFCusp(k, (a,2)) Cusp [a: 2] of Number Field in a with defining polynomial x^2 + 5 sage: NFCusp(k, a, 2/(a+1)) Cusp [a - 5: 2] of Number Field in a with defining polynomial x^2 + 5
>>> from sage.all import * >>> x = polygen(ZZ, 'x') >>> k = NumberField(x**Integer(2) + Integer(5), names=('a',)); (a,) = k._first_ngens(1) >>> NFCusp(k, a, Integer(2)) Cusp [a: 2] of Number Field in a with defining polynomial x^2 + 5 >>> NFCusp(k, (a,Integer(2))) Cusp [a: 2] of Number Field in a with defining polynomial x^2 + 5 >>> NFCusp(k, a, Integer(2)/(a+Integer(1))) Cusp [a - 5: 2] of Number Field in a with defining polynomial x^2 + 5
Cusp Infinity:
sage: NFCusp(k, 0) Cusp [0: 1] of Number Field in a with defining polynomial x^2 + 5 sage: NFCusp(k, oo) Cusp Infinity of Number Field in a with defining polynomial x^2 + 5 sage: NFCusp(k, 3*a, oo) Cusp [0: 1] of Number Field in a with defining polynomial x^2 + 5 sage: NFCusp(k, a + 5, 0) Cusp Infinity of Number Field in a with defining polynomial x^2 + 5
>>> from sage.all import * >>> NFCusp(k, Integer(0)) Cusp [0: 1] of Number Field in a with defining polynomial x^2 + 5 >>> NFCusp(k, oo) Cusp Infinity of Number Field in a with defining polynomial x^2 + 5 >>> NFCusp(k, Integer(3)*a, oo) Cusp [0: 1] of Number Field in a with defining polynomial x^2 + 5 >>> NFCusp(k, a + Integer(5), Integer(0)) Cusp Infinity of Number Field in a with defining polynomial x^2 + 5
Saving and loading works:
sage: alpha = NFCusp(k, a, 2/(a+1)) sage: loads(dumps(alpha))==alpha True
>>> from sage.all import * >>> alpha = NFCusp(k, a, Integer(2)/(a+Integer(1))) >>> loads(dumps(alpha))==alpha True
Some tests:
sage: I*I -1 sage: NFCusp(k, I) Traceback (most recent call last): ... TypeError: unable to convert I to a cusp of the number field
>>> from sage.all import * >>> I*I -1 >>> NFCusp(k, I) Traceback (most recent call last): ... TypeError: unable to convert I to a cusp of the number field
sage: NFCusp(k, oo, oo) Traceback (most recent call last): ... TypeError: unable to convert (+Infinity, +Infinity) to a cusp of the number field
>>> from sage.all import * >>> NFCusp(k, oo, oo) Traceback (most recent call last): ... TypeError: unable to convert (+Infinity, +Infinity) to a cusp of the number field
sage: NFCusp(k, 0, 0) Traceback (most recent call last): ... TypeError: unable to convert (0, 0) to a cusp of the number field
>>> from sage.all import * >>> NFCusp(k, Integer(0), Integer(0)) Traceback (most recent call last): ... TypeError: unable to convert (0, 0) to a cusp of the number field
sage: NFCusp(k, "a + 2", a) Cusp [-2*a + 5: 5] of Number Field in a with defining polynomial x^2 + 5
>>> from sage.all import * >>> NFCusp(k, "a + 2", a) Cusp [-2*a + 5: 5] of Number Field in a with defining polynomial x^2 + 5
sage: NFCusp(k, NFCusp(k, oo)) Cusp Infinity of Number Field in a with defining polynomial x^2 + 5 sage: c = NFCusp(k, 3, 2*a) sage: NFCusp(k, c, a + 1) Cusp [-a - 5: 20] of Number Field in a with defining polynomial x^2 + 5 sage: L.<b> = NumberField(x^2 + 2) sage: NFCusp(L, c) Traceback (most recent call last): ... ValueError: Cannot coerce cusps from one field to another
>>> from sage.all import * >>> NFCusp(k, NFCusp(k, oo)) Cusp Infinity of Number Field in a with defining polynomial x^2 + 5 >>> c = NFCusp(k, Integer(3), Integer(2)*a) >>> NFCusp(k, c, a + Integer(1)) Cusp [-a - 5: 20] of Number Field in a with defining polynomial x^2 + 5 >>> L = NumberField(x**Integer(2) + Integer(2), names=('b',)); (b,) = L._first_ngens(1) >>> NFCusp(L, c) Traceback (most recent call last): ... ValueError: Cannot coerce cusps from one field to another
- ABmatrix()[source]¶
Return AB-matrix associated to the cusp
self
.Given R a Dedekind domain and A, B ideals of R in inverse classes, an AB-matrix is a matrix realizing the isomorphism between R+R and A+B. An AB-matrix associated to a cusp [a1: a2] is an AB-matrix with A the ideal associated to the cusp (A=<a1, a2>) and first column given by the coefficients of the cusp.
EXAMPLES:
sage: x = polygen(ZZ, 'x') sage: k.<a> = NumberField(x^3 + 11) sage: alpha = NFCusp(k, oo) sage: alpha.ABmatrix() [1, 0, 0, 1]
>>> from sage.all import * >>> x = polygen(ZZ, 'x') >>> k = NumberField(x**Integer(3) + Integer(11), names=('a',)); (a,) = k._first_ngens(1) >>> alpha = NFCusp(k, oo) >>> alpha.ABmatrix() [1, 0, 0, 1]
sage: alpha = NFCusp(k, 0) sage: alpha.ABmatrix() [0, -1, 1, 0]
>>> from sage.all import * >>> alpha = NFCusp(k, Integer(0)) >>> alpha.ABmatrix() [0, -1, 1, 0]
Note that the AB-matrix associated to a cusp is not unique, and the output of the
ABmatrix
function may change.sage: alpha = NFCusp(k, 3/2, a-1) sage: M = alpha.ABmatrix() sage: M # random [-a^2 - a - 1, -3*a - 7, 8, -2*a^2 - 3*a + 4] sage: M[0] == alpha.numerator() and M[2] == alpha.denominator() True
>>> from sage.all import * >>> alpha = NFCusp(k, Integer(3)/Integer(2), a-Integer(1)) >>> M = alpha.ABmatrix() >>> M # random [-a^2 - a - 1, -3*a - 7, 8, -2*a^2 - 3*a + 4] >>> M[Integer(0)] == alpha.numerator() and M[Integer(2)] == alpha.denominator() True
An AB-matrix associated to a cusp alpha will send Infinity to alpha:
sage: alpha = NFCusp(k, 3, a-1) sage: M = alpha.ABmatrix() sage: (k.ideal(M[1], M[3])*alpha.ideal()).is_principal() True sage: M[0] == alpha.numerator() and M[2] == alpha.denominator() True sage: NFCusp(k, oo).apply(M) == alpha True
>>> from sage.all import * >>> alpha = NFCusp(k, Integer(3), a-Integer(1)) >>> M = alpha.ABmatrix() >>> (k.ideal(M[Integer(1)], M[Integer(3)])*alpha.ideal()).is_principal() True >>> M[Integer(0)] == alpha.numerator() and M[Integer(2)] == alpha.denominator() True >>> NFCusp(k, oo).apply(M) == alpha True
- apply(g)[source]¶
Return g(
self
), whereg
is a 2x2 matrix, which we view as a linear fractional transformation.INPUT:
g
– list of integral elements [a, b, c, d] that are the entries of a 2x2 matrix
OUTPUT:
A number field cusp, obtained by the action of
g
on the cuspself
.EXAMPLES:
sage: x = polygen(ZZ, 'x') sage: k.<a> = NumberField(x^2 + 23) sage: beta = NFCusp(k, 0, 1) sage: beta.apply([0, -1, 1, 0]) Cusp Infinity of Number Field in a with defining polynomial x^2 + 23 sage: beta.apply([1, a, 0, 1]) Cusp [a: 1] of Number Field in a with defining polynomial x^2 + 23
>>> from sage.all import * >>> x = polygen(ZZ, 'x') >>> k = NumberField(x**Integer(2) + Integer(23), names=('a',)); (a,) = k._first_ngens(1) >>> beta = NFCusp(k, Integer(0), Integer(1)) >>> beta.apply([Integer(0), -Integer(1), Integer(1), Integer(0)]) Cusp Infinity of Number Field in a with defining polynomial x^2 + 23 >>> beta.apply([Integer(1), a, Integer(0), Integer(1)]) Cusp [a: 1] of Number Field in a with defining polynomial x^2 + 23
- denominator()[source]¶
Return the denominator of the cusp
self
.EXAMPLES:
sage: x = polygen(ZZ, 'x') sage: k.<a> = NumberField(x^2 + 1) sage: c = NFCusp(k, a, 2) sage: c.denominator() 2 sage: d = NFCusp(k, 1, a + 1);d Cusp [1: a + 1] of Number Field in a with defining polynomial x^2 + 1 sage: d.denominator() a + 1 sage: NFCusp(k, oo).denominator() 0
>>> from sage.all import * >>> x = polygen(ZZ, 'x') >>> k = NumberField(x**Integer(2) + Integer(1), names=('a',)); (a,) = k._first_ngens(1) >>> c = NFCusp(k, a, Integer(2)) >>> c.denominator() 2 >>> d = NFCusp(k, Integer(1), a + Integer(1));d Cusp [1: a + 1] of Number Field in a with defining polynomial x^2 + 1 >>> d.denominator() a + 1 >>> NFCusp(k, oo).denominator() 0
- ideal()[source]¶
Return the ideal associated to the cusp
self
.EXAMPLES:
sage: x = polygen(ZZ, 'x') sage: k.<a> = NumberField(x^2 + 23) sage: alpha = NFCusp(k, 3, a-1) sage: alpha.ideal() Fractional ideal (3, 1/2*a - 1/2) sage: NFCusp(k, oo).ideal() Fractional ideal (1)
>>> from sage.all import * >>> x = polygen(ZZ, 'x') >>> k = NumberField(x**Integer(2) + Integer(23), names=('a',)); (a,) = k._first_ngens(1) >>> alpha = NFCusp(k, Integer(3), a-Integer(1)) >>> alpha.ideal() Fractional ideal (3, 1/2*a - 1/2) >>> NFCusp(k, oo).ideal() Fractional ideal (1)
- is_Gamma0_equivalent(other, N, Transformation=False)[source]¶
Check if cusps
self
andother
are \(\Gamma_0(N)\)- equivalent.INPUT:
other
– a number field cusp or a list of two number field elements which define a cuspN
– an ideal of the number field (level)
OUTPUT: boolean;
True
if the cusps are equivalenta transformation matrix – (if
Transformation=True
) a list of integral elements [a, b, c, d] which are the entries of a 2x2 matrix M in \(\Gamma_0(N)\) such that M *self
=other
ifother
andself
are \(\Gamma_0(N)\)- equivalent. Ifself
andother
are not equivalent it returns zero.
EXAMPLES:
sage: x = polygen(ZZ, 'x') sage: K.<a> = NumberField(x^3 - 10) sage: N = K.ideal(a - 1) sage: alpha = NFCusp(K, 0) sage: beta = NFCusp(K, oo) sage: alpha.is_Gamma0_equivalent(beta, N) False sage: alpha.is_Gamma0_equivalent(beta, K.ideal(1)) True sage: b, M = alpha.is_Gamma0_equivalent(beta, K.ideal(1),Transformation=True) sage: alpha.apply(M) Cusp Infinity of Number Field in a with defining polynomial x^3 - 10
>>> from sage.all import * >>> x = polygen(ZZ, 'x') >>> K = NumberField(x**Integer(3) - Integer(10), names=('a',)); (a,) = K._first_ngens(1) >>> N = K.ideal(a - Integer(1)) >>> alpha = NFCusp(K, Integer(0)) >>> beta = NFCusp(K, oo) >>> alpha.is_Gamma0_equivalent(beta, N) False >>> alpha.is_Gamma0_equivalent(beta, K.ideal(Integer(1))) True >>> b, M = alpha.is_Gamma0_equivalent(beta, K.ideal(Integer(1)),Transformation=True) >>> alpha.apply(M) Cusp Infinity of Number Field in a with defining polynomial x^3 - 10
sage: k.<a> = NumberField(x^2 + 23) sage: N = k.ideal(3) sage: alpha1 = NFCusp(k, a+1, 4) sage: alpha2 = NFCusp(k, a-8, 29) sage: alpha1.is_Gamma0_equivalent(alpha2, N) True sage: b, M = alpha1.is_Gamma0_equivalent(alpha2, N, Transformation=True) sage: alpha1.apply(M) == alpha2 True sage: M[2] in N True
>>> from sage.all import * >>> k = NumberField(x**Integer(2) + Integer(23), names=('a',)); (a,) = k._first_ngens(1) >>> N = k.ideal(Integer(3)) >>> alpha1 = NFCusp(k, a+Integer(1), Integer(4)) >>> alpha2 = NFCusp(k, a-Integer(8), Integer(29)) >>> alpha1.is_Gamma0_equivalent(alpha2, N) True >>> b, M = alpha1.is_Gamma0_equivalent(alpha2, N, Transformation=True) >>> alpha1.apply(M) == alpha2 True >>> M[Integer(2)] in N True
- is_infinity()[source]¶
Return
True
if this is the cusp infinity.EXAMPLES:
sage: x = polygen(ZZ, 'x') sage: k.<a> = NumberField(x^2 + 1) sage: NFCusp(k, a, 2).is_infinity() False sage: NFCusp(k, 2, 0).is_infinity() True sage: NFCusp(k, oo).is_infinity() True
>>> from sage.all import * >>> x = polygen(ZZ, 'x') >>> k = NumberField(x**Integer(2) + Integer(1), names=('a',)); (a,) = k._first_ngens(1) >>> NFCusp(k, a, Integer(2)).is_infinity() False >>> NFCusp(k, Integer(2), Integer(0)).is_infinity() True >>> NFCusp(k, oo).is_infinity() True
- number_field()[source]¶
Return the number field of definition of the cusp
self
.EXAMPLES:
sage: x = polygen(ZZ, 'x') sage: k.<a> = NumberField(x^2 + 2) sage: alpha = NFCusp(k, 1, a + 1) sage: alpha.number_field() Number Field in a with defining polynomial x^2 + 2
>>> from sage.all import * >>> x = polygen(ZZ, 'x') >>> k = NumberField(x**Integer(2) + Integer(2), names=('a',)); (a,) = k._first_ngens(1) >>> alpha = NFCusp(k, Integer(1), a + Integer(1)) >>> alpha.number_field() Number Field in a with defining polynomial x^2 + 2
- numerator()[source]¶
Return the numerator of the cusp
self
.EXAMPLES:
sage: x = polygen(ZZ, 'x') sage: k.<a> = NumberField(x^2 + 1) sage: c = NFCusp(k, a, 2) sage: c.numerator() a sage: d = NFCusp(k, 1, a) sage: d.numerator() 1 sage: NFCusp(k, oo).numerator() 1
>>> from sage.all import * >>> x = polygen(ZZ, 'x') >>> k = NumberField(x**Integer(2) + Integer(1), names=('a',)); (a,) = k._first_ngens(1) >>> c = NFCusp(k, a, Integer(2)) >>> c.numerator() a >>> d = NFCusp(k, Integer(1), a) >>> d.numerator() 1 >>> NFCusp(k, oo).numerator() 1
- sage.modular.cusps_nf.NFCusps()[source]¶
The set of cusps of a number field \(K\), i.e. \(\mathbb{P}^1(K)\).
INPUT:
number_field
– a number field
OUTPUT: the set of cusps over the given number field
EXAMPLES:
sage: x = polygen(ZZ, 'x') sage: k.<a> = NumberField(x^2 + 5) sage: kCusps = NFCusps(k); kCusps Set of all cusps of Number Field in a with defining polynomial x^2 + 5 sage: kCusps is NFCusps(k) True
>>> from sage.all import * >>> x = polygen(ZZ, 'x') >>> k = NumberField(x**Integer(2) + Integer(5), names=('a',)); (a,) = k._first_ngens(1) >>> kCusps = NFCusps(k); kCusps Set of all cusps of Number Field in a with defining polynomial x^2 + 5 >>> kCusps is NFCusps(k) True
Saving and loading works:
sage: loads(kCusps.dumps()) == kCusps True
>>> from sage.all import * >>> loads(kCusps.dumps()) == kCusps True
- class sage.modular.cusps_nf.NFCuspsSpace(number_field)[source]¶
Bases:
UniqueRepresentation
,Parent
The set of cusps of a number field. See
NFCusps
for full documentation.EXAMPLES:
sage: x = polygen(ZZ, 'x') sage: k.<a> = NumberField(x^2 + 5) sage: kCusps = NFCusps(k); kCusps Set of all cusps of Number Field in a with defining polynomial x^2 + 5
>>> from sage.all import * >>> x = polygen(ZZ, 'x') >>> k = NumberField(x**Integer(2) + Integer(5), names=('a',)); (a,) = k._first_ngens(1) >>> kCusps = NFCusps(k); kCusps Set of all cusps of Number Field in a with defining polynomial x^2 + 5
- number_field()[source]¶
Return the number field that this set of cusps is attached to.
EXAMPLES:
sage: x = polygen(ZZ, 'x') sage: k.<a> = NumberField(x^2 + 1) sage: kCusps = NFCusps(k) sage: kCusps.number_field() Number Field in a with defining polynomial x^2 + 1
>>> from sage.all import * >>> x = polygen(ZZ, 'x') >>> k = NumberField(x**Integer(2) + Integer(1), names=('a',)); (a,) = k._first_ngens(1) >>> kCusps = NFCusps(k) >>> kCusps.number_field() Number Field in a with defining polynomial x^2 + 1
- zero()[source]¶
Return the zero cusp.
Note
This method just exists to make some general algorithms work. It is not intended that the returned cusp is an additive neutral element.
EXAMPLES:
sage: x = polygen(ZZ, 'x') sage: k.<a> = NumberField(x^2 + 5) sage: kCusps = NFCusps(k) sage: kCusps.zero() Cusp [0: 1] of Number Field in a with defining polynomial x^2 + 5
>>> from sage.all import * >>> x = polygen(ZZ, 'x') >>> k = NumberField(x**Integer(2) + Integer(5), names=('a',)); (a,) = k._first_ngens(1) >>> kCusps = NFCusps(k) >>> kCusps.zero() Cusp [0: 1] of Number Field in a with defining polynomial x^2 + 5
- sage.modular.cusps_nf.NFCusps_ideal_reps_for_levelN(N, nlists=1)[source]¶
Return a list of lists (
nlists
different lists) of prime ideals, coprime toN
, representing every ideal class of the number field.INPUT:
N
– number field idealnlists
– (default: 1) the number of lists of prime ideals we want
OUTPUT:
A list of lists of ideals representatives of the ideal classes, all coprime to
N
, representing every ideal.EXAMPLES:
sage: x = polygen(ZZ, 'x') sage: k.<a> = NumberField(x^3 + 11) sage: N = k.ideal(5, a + 1) sage: from sage.modular.cusps_nf import NFCusps_ideal_reps_for_levelN sage: NFCusps_ideal_reps_for_levelN(N) [(Fractional ideal (1), Fractional ideal (2, a + 1))] sage: L = NFCusps_ideal_reps_for_levelN(N, 3) sage: all(len(L[i]) == k.class_number() for i in range(len(L))) True
>>> from sage.all import * >>> x = polygen(ZZ, 'x') >>> k = NumberField(x**Integer(3) + Integer(11), names=('a',)); (a,) = k._first_ngens(1) >>> N = k.ideal(Integer(5), a + Integer(1)) >>> from sage.modular.cusps_nf import NFCusps_ideal_reps_for_levelN >>> NFCusps_ideal_reps_for_levelN(N) [(Fractional ideal (1), Fractional ideal (2, a + 1))] >>> L = NFCusps_ideal_reps_for_levelN(N, Integer(3)) >>> all(len(L[i]) == k.class_number() for i in range(len(L))) True
sage: k.<a> = NumberField(x^4 - x^3 - 21*x^2 + 17*x + 133) sage: N = k.ideal(6) sage: from sage.modular.cusps_nf import NFCusps_ideal_reps_for_levelN sage: NFCusps_ideal_reps_for_levelN(N) [(Fractional ideal (1), Fractional ideal (67, a + 17), Fractional ideal (127, a + 48), Fractional ideal (157, a - 19))] sage: L = NFCusps_ideal_reps_for_levelN(N, 5) sage: all(len(L[i]) == k.class_number() for i in range(len(L))) True
>>> from sage.all import * >>> k = NumberField(x**Integer(4) - x**Integer(3) - Integer(21)*x**Integer(2) + Integer(17)*x + Integer(133), names=('a',)); (a,) = k._first_ngens(1) >>> N = k.ideal(Integer(6)) >>> from sage.modular.cusps_nf import NFCusps_ideal_reps_for_levelN >>> NFCusps_ideal_reps_for_levelN(N) [(Fractional ideal (1), Fractional ideal (67, a + 17), Fractional ideal (127, a + 48), Fractional ideal (157, a - 19))] >>> L = NFCusps_ideal_reps_for_levelN(N, Integer(5)) >>> all(len(L[i]) == k.class_number() for i in range(len(L))) True
- sage.modular.cusps_nf.list_of_representatives()[source]¶
Return a list of ideals, coprime to the ideal
N
, representatives of the ideal classes of the corresponding number field.Note
This list, used every time we check \(\Gamma_0(N)\) - equivalence of cusps, is cached.
INPUT:
N
– an ideal of a number field
OUTPUT:
A list of ideals coprime to the ideal
N
, such that they are representatives of all the ideal classes of the number field.EXAMPLES:
sage: from sage.modular.cusps_nf import list_of_representatives sage: x = polygen(ZZ, 'x') sage: k.<a> = NumberField(x^4 + 13*x^3 - 11) sage: N = k.ideal(713, a + 208) sage: L = list_of_representatives(N); L (Fractional ideal (1), Fractional ideal (47, a - 9), Fractional ideal (53, a - 16))
>>> from sage.all import * >>> from sage.modular.cusps_nf import list_of_representatives >>> x = polygen(ZZ, 'x') >>> k = NumberField(x**Integer(4) + Integer(13)*x**Integer(3) - Integer(11), names=('a',)); (a,) = k._first_ngens(1) >>> N = k.ideal(Integer(713), a + Integer(208)) >>> L = list_of_representatives(N); L (Fractional ideal (1), Fractional ideal (47, a - 9), Fractional ideal (53, a - 16))
- sage.modular.cusps_nf.number_of_Gamma0_NFCusps(N)[source]¶
Return the total number of orbits of cusps under the action of the congruence subgroup \(\Gamma_0(N)\).
INPUT:
N
– a number field ideal
OUTPUT: integer; the number of orbits of cusps under Gamma0(N)-action
EXAMPLES:
sage: x = polygen(ZZ, 'x') sage: k.<a> = NumberField(x^3 + 11) sage: N = k.ideal(2, a+1) sage: from sage.modular.cusps_nf import number_of_Gamma0_NFCusps sage: number_of_Gamma0_NFCusps(N) 4 sage: L = Gamma0_NFCusps(N) sage: len(L) == number_of_Gamma0_NFCusps(N) True sage: k.<a> = NumberField(x^2 + 7) sage: N = k.ideal(9) sage: number_of_Gamma0_NFCusps(N) 6 sage: N = k.ideal(a*9 + 7) sage: number_of_Gamma0_NFCusps(N) 24
>>> from sage.all import * >>> x = polygen(ZZ, 'x') >>> k = NumberField(x**Integer(3) + Integer(11), names=('a',)); (a,) = k._first_ngens(1) >>> N = k.ideal(Integer(2), a+Integer(1)) >>> from sage.modular.cusps_nf import number_of_Gamma0_NFCusps >>> number_of_Gamma0_NFCusps(N) 4 >>> L = Gamma0_NFCusps(N) >>> len(L) == number_of_Gamma0_NFCusps(N) True >>> k = NumberField(x**Integer(2) + Integer(7), names=('a',)); (a,) = k._first_ngens(1) >>> N = k.ideal(Integer(9)) >>> number_of_Gamma0_NFCusps(N) 6 >>> N = k.ideal(a*Integer(9) + Integer(7)) >>> number_of_Gamma0_NFCusps(N) 24
- sage.modular.cusps_nf.units_mod_ideal(I)[source]¶
Return integral elements of the number field representing the images of the global units modulo the ideal
I
.INPUT:
I
– number field ideal
OUTPUT:
A list of integral elements of the number field representing the images of the global units modulo the ideal
I
. Elements of the list might be equivalent to each other modI
.EXAMPLES:
sage: from sage.modular.cusps_nf import units_mod_ideal sage: x = polygen(ZZ, 'x') sage: k.<a> = NumberField(x^2 + 1) sage: I = k.ideal(a + 1) sage: units_mod_ideal(I) [1] sage: I = k.ideal(3) sage: units_mod_ideal(I) [1, a, -1, -a]
>>> from sage.all import * >>> from sage.modular.cusps_nf import units_mod_ideal >>> x = polygen(ZZ, 'x') >>> k = NumberField(x**Integer(2) + Integer(1), names=('a',)); (a,) = k._first_ngens(1) >>> I = k.ideal(a + Integer(1)) >>> units_mod_ideal(I) [1] >>> I = k.ideal(Integer(3)) >>> units_mod_ideal(I) [1, a, -1, -a]
sage: from sage.modular.cusps_nf import units_mod_ideal sage: k.<a> = NumberField(x^3 + 11) sage: k.unit_group() Unit group with structure C2 x Z of Number Field in a with defining polynomial x^3 + 11 sage: I = k.ideal(5, a + 1) sage: units_mod_ideal(I) [1, -2*a^2 - 4*a + 1, ...]
>>> from sage.all import * >>> from sage.modular.cusps_nf import units_mod_ideal >>> k = NumberField(x**Integer(3) + Integer(11), names=('a',)); (a,) = k._first_ngens(1) >>> k.unit_group() Unit group with structure C2 x Z of Number Field in a with defining polynomial x^3 + 11 >>> I = k.ideal(Integer(5), a + Integer(1)) >>> units_mod_ideal(I) [1, -2*a^2 - 4*a + 1, ...]
sage: from sage.modular.cusps_nf import units_mod_ideal sage: k.<a> = NumberField(x^4 - x^3 -21*x^2 + 17*x + 133) sage: k.unit_group() Unit group with structure C6 x Z of Number Field in a with defining polynomial x^4 - x^3 - 21*x^2 + 17*x + 133 sage: I = k.ideal(3) sage: U = units_mod_ideal(I) sage: all(U[j].is_unit() and (U[j] not in I) for j in range(len(U))) True
>>> from sage.all import * >>> from sage.modular.cusps_nf import units_mod_ideal >>> k = NumberField(x**Integer(4) - x**Integer(3) -Integer(21)*x**Integer(2) + Integer(17)*x + Integer(133), names=('a',)); (a,) = k._first_ngens(1) >>> k.unit_group() Unit group with structure C6 x Z of Number Field in a with defining polynomial x^4 - x^3 - 21*x^2 + 17*x + 133 >>> I = k.ideal(Integer(3)) >>> U = units_mod_ideal(I) >>> all(U[j].is_unit() and (U[j] not in I) for j in range(len(U))) True