..nodoctest
CM types and CM fields¶
x.__init__(...) initializes x; see help(type(x)) for signature
-
recip.cm_types.
CM_Field
(field, name=None, relative_name=None, check=True, embedding=None)¶ Constructs a CM_Field object, which is an absolute number field that is a CM-field, together with useful data such as its complex conjugation automorphism, its maximal real subfield, and an optional embedding into a complex field.
INPUT:
polynomial
– a polynomial defining a CM-field \(K\). Alternatively, a totally negative element \(r\) of a totally real number field \(K_0`is taken to mean `K = K_0(sqrt{r})\), while a triple[D, A, B]
is taken to mean \(K = QQ[x]/(x^4+A*x^2+B)\), a quartic CM-field with totally real subfield \(K_0 = QQ(sqrt{D})\).name
– the name of the generator of \(K\) as an absolute number fieldrelative_name
– the name of the generator of the CM-field as a relative quadratic extension of a totally real field.embedding
– (default: None) an embedding ofK
into a complex field, given by the image of a generator. If a complex field is given, then take an embedding such that the generator has maximal imaginary part.
OUTPUT:
- a CM_Field object corresponding to the input data
EXAMPLES:
sage: from recip import * sage: CM_Field([5, 165, 5445]) CM Number Field in alpha with defining polynomial x^4 + 165*x^2 + 5445 sage: CM_Field(-3) CM Number Field in alpha with defining polynomial x^2 + 3 sage: var("x") x sage: CM_Field(x^2+1) CM Number Field in alpha with defining polynomial x^2 + 1 sage: P.<Y> = QQ[] sage: CM_Field(Y^8+1) CM Number Field in alpha with defining polynomial Y^8 + 1 sage: CM_Field(CM_Field(-7), 'b') CM Number Field in b with defining polynomial x^2 + 7 sage: CM_Field(NumberField(x^4+1,'gamma')) CM Number Field in gamma with defining polynomial x^4 + 1
-
class
recip.cm_types.
CM_Field_absolute
(absolute_polynomial, relative_field=None, real_field=None, name=None, latex_name=None, relative_name=None, check=True, embedding=None)¶ Bases:
sage.rings.number_field.number_field.NumberField_absolute
This is called by the function CM_Field and initializes a CM_Field_absolute object.
INPUT:
- \(absolute_polynomial\) – a polynomial over \(QQ\) defining a CM-field.
- \(relative_field\) (default: None) – the same CM-field as a purely imaginary quadratic extension of a totally real field. If None, then automatically computed.
- \(real_field\) (default: None) – the maximal totally real subfield of the CM-field. If None, then automatically computed.
- \(name\) – the name of the generator of
self
. - \(latex_name\) – a latex representation of the generator.
- \(relative_name\) – the name of the generator of the relative extension mentioned above, if it still needs to be created.
- \(check\) (default: True) – whether to check if the input satisfies the requirements.
- \(embedding\) (default: None) – a root of \(absolute_polynomial\) in ambient field.`self` is considered to be embedded in that ambient field by identifying its generator with \(embedding\). If None, then \(self\) is not embedded.
EXAMPLES:
sage: from recip import * sage: CM_Field(x^4+5*x^2+1) # implicit doctest CM Number Field in alpha with defining polynomial x^4 + 5*x^2 + 1
-
CM_types
(L=None, equivalence_classes=False)¶ Returns the CM-types Phi of self with values in L.
Not cached.
INPUT:
L
– (default: QQbar) A number field or CM-field containing a normal closure ofself
, or a complex field.equivalence_classes
– (default: False) whether to give only one element of each equivalence class.
OUTPUT:
The CM-types of Phi of self with values in L if L is a CM-field. If L is a complex field, then a normal closure N of self is constructed and embedded into L, and CM-types with values in N are given.
EXAMPLES:
sage: from recip import * sage: K = CM_Field(x^4 + 8*x^2 + 3) sage: K.is_galois() False sage: types = K.CM_types(QQbar, equivalence_classes=True); types [CM-type of CM Number Field in alpha with defining polynomial x^4 + 8*x^2 + 3 with values in CM Number Field in b with defining polynomial x^8 + 80*x^6 + 2070*x^4 + 18800*x^2 + 32761 given by alpha |--> [7/37467*b^7 + 445/49956*b^5 + 305/12489*b^3 - 273439/149868*b, 7/74934*b^7 + 445/99912*b^5 + 305/24978*b^3 - 123571/299736*b], CM-type of CM Number Field in alpha with defining polynomial x^4 + 8*x^2 + 3 with values in CM Number Field in b with defining polynomial x^8 + 80*x^6 + 2070*x^4 + 18800*x^2 + 32761 given by alpha |--> [7/37467*b^7 + 445/49956*b^5 + 305/12489*b^3 - 273439/149868*b, -7/74934*b^7 - 445/99912*b^5 - 305/24978*b^3 + 123571/299736*b]] sage: types[0].domain() is K True sage: K = CM_Field((x^2+2)^2-2, 'a') sage: K.is_galois() True sage: Phi = K.CM_types()[0]; Phi CM-type Phi of CM Number Field in a with defining polynomial x^4 + 4*x^2 + 2 sage: Phi.domain() is K True sage: phi = [phi for phi in Phi][0] sage: phi Ring morphism: From: CM Number Field in a with defining polynomial x^4 + 4*x^2 + 2 To: Complex Lazy Field Defn: a |--> 1.847759065022574?*I sage: phi.domain() is K True
-
a_CM_type
()¶ Returns a CM-type of self.
-
abs_to_rel
()¶ Returns the identity map from self to self.relative_field().
EXAMPLES:
sage: from recip import * sage: K = CM_Field(x^4+5*x^2+1) sage: K.abs_to_rel() Ring morphism: From: CM Number Field in alpha with defining polynomial x^4 + 5*x^2 + 1 To: Number Field in alpha0 with defining polynomial x^2 - 1/2*alpha1 over its base field Defn: alpha |--> alpha0
-
class_group_iter
()¶ Iterates over the class group, but returns ideals instead of ideal classes, and starts with the unit ideal before computing the class group. This can save time if the unit ideal is all you need.
-
complex_conjugation
()¶ Returns the complex conjugation automorphism of self.
EXAMPLES:
sage: from recip import * sage: CM_Field([5, 165, 5445]).complex_conjugation() Ring endomorphism of CM Number Field in alpha with defining polynomial x^4 + 165*x^2 + 5445 Defn: alpha |--> -alpha
-
embed
(embedding=Algebraic Field)¶ Changes the chosen embedding of self into an ambient field.
INPUT:
- \(embedding\) (default: QQbar) – either a complex field,
or an embedding of self into a complex field. If a complex field, then the embedding is chosen such that the generator of \(self\) has the maximal imaginary part.
EXAMPLES:
sage: from recip import * sage: K = CM_Field(-7) sage: K.embedding() sage: K.embed(CC) sage: K.embedding() Ring morphism:
From: CM Number Field in alpha with defining polynomial x^2 + 7 To: Complex Field with 53 bits of precision Defn: alpha |–> 2.64575131106459*Isage: K.embed(QQbar(-sqrt(-7))) sage: K.embedding() Ring morphism:
From: CM Number Field in alpha with defining polynomial x^2 + 7 To: Algebraic Field Defn: alpha |–> -2.645751311064591?*I
-
embedding
()¶ Returns the chosen embedding of self into an ambient field.
Does not really work.
EXAMPLES:
sage: from recip import * sage: CM_Field([5, 165, 5445]).embedding() == None True sage: CM_Field(x^4+7*x^2+8, embedding = QQbar).embedding()
-
g
()¶ Returns half the degree of self.
EXAMPLES:
sage: from recip import * sage: CM_Field(-3).g() 1 sage: CM_Field(x^4+8*x^2+8).g() 2
-
galois_closure
(names=None, map=False, embed=True)¶ Return a CM number field K that is the Galois closure of self, i.e., is generated by all roots of the defining polynomial of self, and possibly an embedding of self into K.
INPUT:
names
– variable name for Galois closuremap
(default: False) – also return an embedding of self into Kembed
(default: True) – if self is embedded, then give
K an embedding that extends the embedding of self.
EXAMPLES:
sage: from recip import * sage: K = CM_Field(x^4 + 8*x^2 + 3) sage: L, m = K.galois_closure('b', map=True); L CM Number Field in b with defining polynomial x^8 + 80*x^6 + 2070*x^4 + 18800*x^2 + 32761 sage: m Ring morphism: From: CM Number Field in alpha with defining polynomial x^4 + 8*x^2 + 3 To: CM Number Field in b with defining polynomial x^8 + 80*x^6 + 2070*x^4 + 18800*x^2 + 32761 Defn: alpha |--> -7/74934*b^7 - 445/99912*b^5 - 305/24978*b^3 + 123571/299736*b sage: K = CM_Field(x^4 + 8*x^2 + 3, embedding=QQbar) # long time, does not currently work very well: embedding is not there sage: L = K.galois_closure(embed=True); L # long time CM Number Field in alpha0 with defining polynomial x^8 + 80*x^6 + 2070*x^4 + 18800*x^2 + 32761 sage: L.embedding() # long time, embedding wasn't there for K, so will not appear for L
Genus-three:
sage: K = CM_Field((x^2+1)*(x^2+3)*(x^2+5)+1) sage: K.galois_closure() CM Number Field in alpha0 with defining polynomial x^48 + 72*x^46 + 80*x^45 + 2692*x^44 + 4612*x^43 + 64124*x^42 + 123852*x^41 + 1028650*x^40 + 1829576*x^39 + 10447880*x^38 + 12019876*x^37 + 50258300*x^36 - 43026036*x^35 - 136889692*x^34 - 1331961552*x^33 - 2963236937*x^32 - 7718599196*x^31 - 7146191020*x^30 + 8504396980*x^29 + 87525433872*x^28 + 282027249844*x^27 + 605609380956*x^26 + 815516286320*x^25 - 88439203430*x^24 - 4254091272044*x^23 - 15185634342676*x^22 - 35530163136508*x^21 - 61057325330100*x^20 - 69796449648272*x^19 - 6160328327104*x^18 + 226759213095652*x^17 + 760552021937945*x^16 + 1718448648945196*x^15 + 3142781220480156*x^14 + 4919956841221648*x^13 + 6743690042716028*x^12 + 8183680911040904*x^11 + 8840183773407848*x^10 + 8531995881160800*x^9 + 7396811998421180*x^8 + 5807303468842192*x^7 + 4187178898937392*x^6 + 2799780355636992*x^5 + 1732733524962960*x^4 + 957303364563328*x^3 + 439000398925408*x^2 + 150222835195840*x + 29629511650768
-
is_totally_imaginary_element
(a)¶ Return True if and only if a is totally imaginary.
EXAMPLES:
sage: from recip import * sage: K = CM_Field([5,5,5]) sage: a = K.gen() sage: K.is_totally_imaginary_element(a) True sage: K.is_totally_imaginary_element(a^2) False sage: K.is_totally_imaginary_element(a+1) False
-
is_totally_positive_real_element
(a)¶ Return True if and only if a is totally real and totally positive.
-
is_totally_real_element
(a)¶ Return True if and only if a is totally real.
EXAMPLES:
sage: from recip import * sage: K = CM_Field([5,5,5]) sage: a = K.gen() sage: K.is_totally_real_element(a) False sage: K.is_totally_real_element(a^2) True sage: K.is_totally_real_element(a^2+a) False
-
minimal_DAB
()¶ Returns the unique triple [D,A,B] for this field with D the discriminant of the real quadratic subfield and self isomorphic to \(\QQ[X]/(X^4+AX^2+B)\).
-
one_period_matrix
(CM_types=None, reduced=200)¶ Returns one isomorphism class of principally polarized abelian varieties with one of the given CM-types, given by a period matrix that remembers a triple (Phi, A, xi) as in my thesis.
INPUT:
- CM_types (default=None) – a CM-type, None, or tuple of CM-types. If CM_types == None, then take all CM-types with values in QQbar up to equivalence.
- reduced (default=100) – if False, then don’t reduce the period matrices. If reduced is a non-zero integer, reduce numerically with at least that number of digits precision.
EXAMPLES:
sage: from recip import * sage: x = var('x') sage: K = CM_Field(x^4+68*x^2+578) sage: K.one_period_matrix() Period Matrix [3.8092528978903?*I 1.5778442128152?*I] [1.5778442128152?*I 6.9649413235207?*I]
-
period_matrices_iter
(CM_types=None, reduced=200)¶ Iterates over the set of isomorphism classes of principally polarized abelian varieties with the given CM-types, each given by a period matrix that remembers a triple (Phi, A, xi) as in my thesis.
INPUT:
- CM_types (default=None) – a CM-type, None, or tuple of CM-types. If CM_types == None, then take all CM-types with values in QQbar up to equivalence.
- reduced (default=100) – if False, then don’t reduce the period matrices. If reduced is a non-zero integer, reduce numerically with at least that number of digits precision.
EXAMPLES:
sage: from recip import * sage: x = var('x') sage: K = CM_Field(x^4+68*x^2+578) sage: len(list(K.period_matrices_iter())) # long time, 3 seconds 8 sage: K.period_matrices_iter().next() Period Matrix [3.8092528978903?*I 1.5778442128152?*I] [1.5778442128152?*I 6.9649413235207?*I]
-
real_field
()¶ Returns the maximal totally real subfield of self.
EXAMPLES:
sage: from recip import * sage: CM_Field([5, 165, 5445]).real_field() Number Field in alpha1 with defining polynomial x^2 + 330*x + 21780 sage: CM_Field(-3).real_field() Number Field in alpha0 with defining polynomial x
A genus-three example:
sage: K = CM_Field((x^2+1)*(x^2+3)*(x^2+5)+1) sage: K.real_field() Number Field in alpha1 with defining polynomial x^3 - 9*x^2 + 23*x - 16
-
real_generator_in_self
()¶ Returns a generator of the real quadratic field expressed in terms of the power basis of self.
EXAMPLES:
sage: from recip import * sage: CM_Field([5, 165, 5445]).real_generator_in_self() [0, 0, 2, 0]
-
real_to_self
(x=None)¶ Given x in self.real_field(), returns x as an element of self. If x is None, then returns the inclusion homomorphism from self.real_field() to self.
EXAMPLES:
sage: from recip import * sage: K = CM_Field([5, 165, 5445]) sage: K0 = K.real_field() sage: K.real_to_self(K0.gen()) 2*alpha^2 sage: K.real_to_self() Ring morphism: From: Number Field in alpha1 with defining polynomial x^2 + 330*x + 21780 To: CM Number Field in alpha with defining polynomial x^4 + 165*x^2 + 5445 Defn: alpha1 |--> 2*alpha^2 sage: CM_Field(-3).real_to_self() Ring morphism: From: Number Field in alpha0 with defining polynomial x To: CM Number Field in alpha with defining polynomial x^2 + 3 Defn: 0 |--> 0
-
rel_to_self
(x)¶ Given x in self.relative_field(), returns x as an element of self.
EXAMPLE:
sage: from recip import * sage: K = CM_Field(x^4+5*x^2+1) sage: K.rel_to_self('alpha0') alpha sage: K.rel_to_self('alpha1') 2*alpha^2
-
relative_different
()¶ Returns the relative different of self over its real field, as an ideal of (the maximal order of) self.
-
relative_field
()¶ Returns self as a relative number field over self.real_field().
EXAMPLE:
sage: from recip import * sage: K = CM_Field(x^4+5*x^2+1) sage: K.relative_field() Number Field in alpha0 with defining polynomial x^2 - 1/2*alpha1 over its base field
-
relative_norm
(x)¶ Returns x*xbar as an element of self.real_field().
-
relative_trace
(x)¶ Returns x+xbar as an element of self.real_field().
-
self_to_real
(x)¶ Given x in self such that x = xbar, returns x as an element of self.real_field().
-
self_to_rel
(x)¶ Given x in self, returns x as an element of self.relative_field().
EXAMPLE:
sage: from recip import * sage: K = CM_Field([5,5,5]) sage: alpha = K.gen() sage: K.self_to_rel(alpha) alpha0
-
class
recip.cm_types.
CM_Field_quartic
(DAB, relative_field=None, real_field=None, name=None, latex_name=None, relative_name=None, check=True, embedding=None)¶ Bases:
recip.cm_types.CM_Field_absolute
This is called by the function CM_Field and initializes a CM_Field_absolute object.
INPUT:
- \(DAB\) – a triple of positive integers D,A,B such that A^2 > 4B, D is a fundamental discriminant and (A^2-4B)/D is a square. The CM-field is QQ[X]/(X^4+A*X^2+B).
- \(relative_field\) (default: None) – the same CM-field as a purely imaginary quadratic extension of a totally real field. If None, then automatically computed.
- \(real_field\) (default: None) – the maximal totally real subfield of the CM-field. If None, then automatically computed.
- \(name\) – the name of the generator of
self
. - \(latex_name\) – a latex representation of the generator.
- \(relative_name\) – the name of the generator of the relative extension mentioned above, if it still needs to be created.
- \(check\) (default: True) – whether to check if the input satisfies the requirements.
- \(embedding\) (default: None) – a root of \(absolute_polynomial\) in ambient field.`self` is considered to be embedded in that ambient field by identifying its generator with \(embedding\). If None, then \(self\) is not embedded.
EXAMPLES:
sage: from recip import * sage: CM_Field([21, 5,1]) # indirect doctest CM Number Field in alpha with defining polynomial x^4 + 5*x^2 + 1
-
CM_types
(L=None, equivalence_classes=False)¶ Returns the CM-types Phi of self with values in L.
Not cached.
INPUT:
L
– (default: None) A number field or CM-field containing a normal closure ofself
, or a complex field, or None, for using a complex lazy field, which tends to work best in practice. Actually all other options are buggy (TODO).equivalence_classes
– (default: False) whether to give only one element of each equivalence class.
OUTPUT:
The CM-types of Phi of self with values in L if L is a CM-field. If L is a complex field, then a normal closure N of self is constructed and embedded into L, and CM-types with values in N are given.
EXAMPLES:
sage: from recip import * sage: K = CM_Field(x^4 + 8*x^2 + 3) sage: K.CM_types(equivalence_classes=True) [CM-type Phi of CM Number Field in alpha with defining polynomial x^4 + 8*x^2 + 3, CM-type Phi' of CM Number Field in alpha with defining polynomial x^4 + 8*x^2 + 3]
-
DAB
()¶
-
Phi
()¶
-
g
()¶ Returns half the degree of self.
EXAMPLES:
sage: from recip import * sage: CM_Field(x^4+8*x^2+8).g() 2
-
is_D4
()¶ Returns True if and only if self is quartic non-Galois.
-
is_totally_imaginary_element
(xi)¶ Returns True if and only if
self
is totally imaginary.
-
is_totally_real
(xi)¶ Returns True if and only if
self
is totally real.
-
is_totally_real_positive
(xi, check_real=True)¶ Returns True if and only if
self
is totally real and totally positive.TODO: examples
-
recip.cm_types.
CM_Type
(embeddings, reflex_field=None, reflex_to_codomain=None, check=True)¶ Create a CM-type using one of the following two possibilities:
INPUT:
embeddings
– A set of embeddings of a CM-field to another CM-fieldreflex_field
– A Number Field or CM-field object giving the reflex field of the CM-type. Automatically constructed if not supplied.reflex_to_codomain
– An embedding ofreflex_field
into the codomain of the embeddings. Required ifreflex_field
is supplied, and not used otherwise.check
– Whether to check if the input is valid.
OUTPUT:
The CM-type object given by the set of embeddings.INPUT:
embeddings
– A totally imaginary element xi of a CM-field.reflex_field
– Nonereflex_to_codomain
– A field, the codomain of the CM-type.check
– Whether to check if the input is valid.
OUTPUT:
The CM-type that maps xi to the positive imaginary axis.EXAMPLES:
sage: from recip import * sage: K = CM_Field([5,5,5]) sage: alpha = K.gen() sage: s = 5+2*alpha^2 sage: l = [alpha, s*alpha, -alpha, -s*alpha] sage: Phis = [CM_Type(a) for a in l]; Phis [CM-type Phi of CM Number Field in alpha with defining polynomial x^4 + 5*x^2 + 5, CM-type Phibar' of CM Number Field in alpha with defining polynomial x^4 + 5*x^2 + 5, CM-type Phibar of CM Number Field in alpha with defining polynomial x^4 + 5*x^2 + 5, CM-type Phi' of CM Number Field in alpha with defining polynomial x^4 + 5*x^2 + 5] sage: Matrix([[1 if Phi.is_totally_positive_imaginary(a) else 0 for Phi in Phis] for a in l]) [1 0 0 0] [0 1 0 0] [0 0 1 0] [0 0 0 1]
-
class
recip.cm_types.
CM_Type_base
¶ Bases:
sage.structure.sage_object.SageObject
Base class for CM-types.
-
domain
()¶
-
type_norm
(x, reflex=True)¶ INPUT:
x
– an element or ideal of self.domain()reflex
– True or False
OUTPUT:
- y : the type norm of x, which is an element or ideal of self.reflex_field() (if reflex is True) or self.codomain() (if reflex is False).
EXAMPLES:
sage: from recip import * sage: K = CM_Field(x^4+15*x^2+7) sage: Phi = K.CM_types()[0] sage: Phi.type_norm(K.gen()) 1/2*alphar^2 + 15/2
-
-
class
recip.cm_types.
CM_Type_embeddings
(embeddings, reflex_field=None, reflex_to_codomain=None, check=True)¶ Bases:
recip.cm_types.CM_Type_base
An object representing a CM-type.
-
codomain
()¶
-
embeddings
()¶
-
g
()¶
-
g_reflex
()¶
-
is_totally_positive_imaginary
(xi, check=True)¶ Given a totally imaginary element \(xi\), returns true if and only if \(phi(xi))\) is on the positve imaginary axis for all \(phi\) in the CM-type
self
.INPUT:
- \(xi\) – an element of the domain of
self
- \(check\) – If \(check\) is True and \(xi\) is not totally imaginary, then the output is False. If \(check\) is False, then save time by assuming that \(xi\) is totally imaginary.
- \(xi\) – an element of the domain of
-
reflex
()¶ Returns the reflex type of \(self\).
Assumes self is primitive (later versions can be more general).
Do not override this method, override
_compute_reflex()
instead.EXAMPLES:
sage: from recip import * sage: K = CM_Field(x^4+15*x^2+7) sage: Phi = K.CM_types()[0] sage: Psi = Phi.reflex(); Psi CM-type Phi of CM Number Field in alphar with defining polynomial x^4 + 30*x^2 + 197 sage: Psi.reflex() CM-type Phi of CM Number Field in alpha with defining polynomial x^4 + 15*x^2 + 7 sage: Phi == Psi.reflex() True
-
reflex_field
()¶ Returns the reflex field of this CM-type.
EXAMPLES:
sage: from recip import * sage: K = CM_Field(x^4+15*x^2+7) sage: Phi = K.CM_types()[0] sage: Phi.reflex_field() CM Number Field in alphar with defining polynomial x^4 + 30*x^2 + 197
-
reflex_to_codomain
()¶ Returns the embedding of self.reflex_field() into self.codomain()
EXAMPLES:
sage: from recip import * sage: K = CM_Field(x^4+15*x^2+7) sage: Phi = K.CM_types()[0] sage: Phi.reflex_to_codomain() Traceback (most recent call last): ... NotImplementedError
-
-
class
recip.cm_types.
CM_Type_quartic
(DAB, prime=False, conjugate=False, scale_down=False, domain=None, reflex_field=None, check=True)¶ Bases:
recip.cm_types.CM_Type_embeddings
An object representing a CM-type.
-
codomain
()¶
-
complex_conjugate
()¶
-
domain
()¶
-
embeddings
()¶
-
g
()¶
-
g_reflex
()¶
-
is_totally_positive_imaginary
(xi, check=True)¶ Given a totally imaginary element \(xi\) and a CM-type
self
, returns true if and only if \(psi(xi)\) is on the positve imaginary axis for all \(psi\) inself
.EXAMPLES:
sage: from recip import * sage: K = CM_Field([5,5,5]) sage: alpha = K.gen() sage: s = 5+2*alpha^2 sage: l = [alpha, s*alpha, -alpha, -s*alpha] sage: Phis = [CM_Type(a) for a in l]; Phis [CM-type Phi of CM Number Field in alpha with defining polynomial x^4 + 5*x^2 + 5, CM-type Phibar' of CM Number Field in alpha with defining polynomial x^4 + 5*x^2 + 5, CM-type Phibar of CM Number Field in alpha with defining polynomial x^4 + 5*x^2 + 5, CM-type Phi' of CM Number Field in alpha with defining polynomial x^4 + 5*x^2 + 5] sage: Matrix([[1 if Phi.is_totally_positive_imaginary(a) else 0 for Phi in Phis] for a in l]) [1 0 0 0] [0 1 0 0] [0 0 1 0] [0 0 0 1]
-
reflex_field
()¶ Returns the reflex field of this CM-type.
EXAMPLES:
sage: from recip import * sage: K = CM_Field(x^4+15*x^2+7) sage: Phi = K.CM_types()[0] sage: Phi.reflex_field() CM Number Field in alphar with defining polynomial x^4 + 30*x^2 + 197
-
reflex_to_codomain
()¶ Returns the embedding of self.reflex_field() into self.codomain()
-
type_trace
(x)¶ Returns the type trace of x.
-
-
class
recip.cm_types.
CM_Type_xi
(xi, reflex_field=None, reflex_to_codomain=None, check=True)¶ Bases:
recip.cm_types.CM_Type_base
CM-type specified by an element xi.
-
codomain
()¶
-
embeddings
(complex_field=None)¶ EXAMPLES:
sage: class Foo: ....: def __init__(self, x): ....: self._x = x ....: @cached_method ....: def f(self,*args): ....: return self._x^2 sage: a = Foo(2) sage: a.f.cache {} sage: a.f() 4 sage: a.f.cache {((), ()): 4}
-
g
()¶
-
g_reflex
()¶
-
is_totally_positive_imaginary
(xi, check=True)¶ Given a totally imaginary element \(xi\) and a CM-type
self
, returns true if and only if \(phi(xi))\) is on the positve imaginary axis for all \(phi\) inself
.
-
reflex
()¶ Returns the reflex type of \(self\).
Assumes self is primitive (later versions can be more general).
Do not override this method, override
_compute_reflex()
instead.EXAMPLES:
sage: from recip import * sage: K = CM_Field(x^4+15*x^2+7) sage: Phi = K.CM_types()[0] sage: Psi = Phi.reflex(); Psi CM-type Phi of CM Number Field in alphar with defining polynomial x^4 + 30*x^2 + 197 sage: Psi.reflex() CM-type Phi of CM Number Field in alpha with defining polynomial x^4 + 15*x^2 + 7 sage: Phi == Psi.reflex() True
-
reflex_field
()¶ Returns the reflex field of this CM-type.
EXAMPLES:
sage: from recip import * sage: K = CM_Field(x^4+15*x^2+7) sage: Phi = K.CM_types()[0] sage: Phi.reflex_field() CM Number Field in alphar with defining polynomial x^4 + 30*x^2 + 197
-
reflex_to_codomain
()¶ Returns the embedding of self.reflex_field() into self.codomain()
EXAMPLES:
sage: from recip import * sage: K = CM_Field(x^4+15*x^2+7) sage: Phi = K.CM_types()[0] sage: Phi.reflex_to_codomain() Traceback (most recent call last): ... NotImplementedError
-
xi
()¶
-
-
recip.cm_types.
DAB_to_minimal
(DAB, K0=None, m=None, check=False)¶ Given a triple DAB, finds a triple representing the same field, but such that A is minimal (and B is minimal with that A).
K0, if given, should be the quadratic field with discriminant D.
m, if given, must be a positive integer satisfying m^2 * D = A^2 - 4B
-
recip.cm_types.
highest_root
(poly, field)¶ Returns a root of poly in field that is the highest in the upper half plane, i.e., that has the maximal imaginary part.
EXAMPLES:
sage: from recip import * sage: P.<x> = QQ[] sage: highest_root(x^7+1, CC) 0.222520933956314 + 0.974927912181824*I sage: highest_root(x^6+1, QQbar) 1*I
-
recip.cm_types.
inverse_field_hom
(m, y)¶ Given a field homomorphism m and y in the image of m, returns x such that m(x) = y
EXAMPLE:
sage: from recip import * sage: K.<a> = QuadraticField(2) sage: L.<b> = CyclotomicField(8) sage: m = K.hom(b+b^-1, K) sage: inverse_field_hom(m, b^3+b^5 + 7) -a + 7