Esempio n. 1
0
def Optimize_Representation(rep):
    K = magma.BaseRing(rep[1])
    F = magma.BaseRing(K)
    if (not magma.IsQQ(F)) or (magma.Degree(K) == 1):
        return rep
    R = magma.PolynomialRing(magma.Rationals())
    g = magma.DefiningPolynomial(K)
    g = R(str(gp.polredabs(R(magma.Eltseq(g)))))
    L = magma.NumberField(g)
    return magma.TransferMatrices(rep, K, L)
Esempio n. 2
0
 def __init__(self, X, periods=""):
     self.X = X
     self.g = magma.Genus(self.X)
     self.F = magma.BaseRing(self.X)
     if periods:
         self._P_ = periods
     else:
         self._P_ = magma.PeriodMatrix(self.X)
Esempio n. 3
0
 def __init__(self, X, prec, bound=0, molin_neurohr=False, periods=""):
     self.X = X
     self.g = magma.Genus(self.X)
     self.F = magma.BaseRing(self.X)
     self.prec = magma(prec)
     self.bound = magma(bound)
     self.molin_neurohr = magma(molin_neurohr)
     self._eqsCC_ = magma.EmbedCurveEquations(self.X, self.prec)
     self._eqsF_ = magma.DefiningEquations(self.X)
     if periods:
         self._P_ = periods
     else:
         self._P_ = self.period_matrix()
     self._calculate_geometric_representation_()
Esempio n. 4
0
def Relative_Splitting_Field_Extra(fs, bound=0):
    bound_set = (bound != 0)
    F = magma.BaseRing(fs[1])
    overQQ = (magma.Degree(F) == 1)
    if overQQ:
        R = PolynomialRing(QQ, 'x')
    fs = sorted(fs, key=lambda f: -magma.Degree(f))
    K = F
    for f in fs:
        if not magma.HasRoot(f, K):
            for tup in magma.Factorization(f, K):
                K = magma.ExtendRelativeSplittingField(K, F, tup[1])
                if overQQ:
                    g = magma.DefiningPolynomial(K)
                    g = R(str(gp.polredabs(R(magma.Eltseq(g)))))
                    K = magma.NumberField(g)
                else:
                    K = magma.ClearFieldDenominator(K)
                if bound_set and magma.Degree(K) >= bound:
                    K = magma.DefineOrExtendInfinitePlaceFunction(K)
                    return K
    K = magma.DefineOrExtendInfinitePlaceFunction(K)
    return K