def __init__(self, parent, k, chi=None): r""" Create a locally algebraic weight-character. EXAMPLES:: sage: pAdicWeightSpace(29)(13, DirichletGroup(29, Qp(29)).0) (13, 29, [2 + 2*29 + ... + O(29^20)]) """ WeightCharacter.__init__(self, parent) k = ZZ(k) self._k = k if chi is None: chi = trivial_character(self._p, QQ) n = ZZ(chi.conductor()) if n == 1: n = self._p if not n.is_power_of(self._p): raise ValueError, "Character must have %s-power conductor" % p self._chi = DirichletGroup(n, chi.base_ring())(chi)
def __init__(self, parent, k, chi=None): r""" Create a locally algebraic weight-character. EXAMPLES:: sage: pAdicWeightSpace(29)(13, DirichletGroup(29, Qp(29)).0) (13, 29, [2 + 2*29 + ... + O(29^20)]) """ WeightCharacter.__init__(self, parent) k = ZZ(k) self._k = k if chi is None: chi = trivial_character(self._p, QQ) n = ZZ(chi.conductor()) if n == 1: n = self._p if not n.is_power_of(self._p): raise ValueError("Character must have %s-power conductor" % p) self._chi = DirichletGroup(n, chi.base_ring())(chi)