本文整理汇总了Python中sage.rings.all.ZZ.gens_reduced方法的典型用法代码示例。如果您正苦于以下问题:Python ZZ.gens_reduced方法的具体用法?Python ZZ.gens_reduced怎么用?Python ZZ.gens_reduced使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sage.rings.all.ZZ
的用法示例。
在下文中一共展示了ZZ.gens_reduced方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: BigArithGroup_class
# 需要导入模块: from sage.rings.all import ZZ [as 别名]
# 或者: from sage.rings.all.ZZ import gens_reduced [as 别名]
#.........这里部分代码省略.........
return self._compute_padic_splitting(prec)
def save_to_db(self):
fname = 'arithgroup%s_%s_%s_%s.sobj'%(self.seed,self.p,self.discriminant,self.level)
self.db(fname)
def small_group(self):
return self.Gpn
def large_group(self):
return self.Gn
def is_in_Gpn_order(self, x):
return self.Gpn._is_in_order(x)
def Gpn_Obasis(self):
return self.Gpn.Obasis
def Gpn_denominator(self, x):
return self.Gpn._denominator(x)
@cached_method
def get_BT_reps(self):
reps = [self.Gn.B(1)] + [None for i in xrange(self.p)]
emb = self.get_embedding(20)
matrices = [(i+1,matrix(QQ,2,2,[i,1,-1,0])) for i in xrange(self.p)]
if self._matrix_group:
verbose('Using hard-coded matrices for BT (Bianchi)')
if F == QQ:
wp = self.wp()
return [self.Gn(1).quaternion_rep] + [1 / self.p * wp * matrix(QQ,2,2,[1,-i,0,self.p]) for i in xrange(self.p)]
else:
pi = self.ideal_p.gens_reduced()[0]
B = self.Gn.B
BTreps0 = [ Matrix(self.F,2,2,[0, -1, 1, -i]) for a in range(self.prime()) ]
BTreps = [self.Gn(1).quaternion_rep] + [self.Gn(B([(o[0,0] + o[1,1])/2, (o[0,0] - o[1,1])/2, (-o[0,1] - o[1,0])/2, (-o[0,1] + o[1,0])/2])).quaternion_rep for o in BTreps0]
return BTreps
for n_iters,elt in enumerate(self.Gn.enumerate_elements()):
new_inv = elt**(-1)
embelt = emb(elt)
if (embelt[0,0]-1).valuation() > 0 and all([not self.is_in_Gpn_order(o * new_inv) for o in reps if o is not None]):
if hasattr(self.Gpn,'nebentypus'):
tmp = self.do_tilde(embelt)**-1
tmp = tmp[0,0] / (self.p**tmp[0,0].valuation())
tmp = ZZ(tmp.lift()) % self.Gpn.level
if tmp not in self.Gpn.nebentypus:
continue
for idx,o1 in enumerate(matrices):
i,mat = o1
if is_in_Gamma0loc(embelt * mat, det_condition = False):
reps[i] = set_immutable(elt)
del matrices[idx]
verbose('%s, len = %s/%s'%(n_iters,self.p+1-len(matrices),self.p+1))
if len(matrices) == 0:
return reps
break
def do_tilde(self, g, wp = None):
if wp is None:
wp = self.wp()
if self.F == QQ and self.discriminant == 1:
lam = -wp.determinant()
else:
lam = -wp.reduced_norm()