def _modular_symbols_space_gamma1(self): """ Return a space of modular symbols for Gamma1, with level a random choice from self.levels, weight from self.weights, and sign chosen randomly from [1, 0, -1]. EXAMPLES: sage: sage.modular.modsym.tests.Test()._modular_symbols_space_gamma1() # random level = 3, weight = 4, sign = 0 Modular Symbols space of dimension 2 for Gamma_1(3) of weight 4 with sign 0 and over Rational Field """ level, weight, sign = self._level_weight_sign() M = modsym.ModularSymbols(arithgroup.Gamma1(level), weight, sign) self.current_space = M return M
def _modular_symbols_space_character(self): """ Return a random space of modular symbols for Gamma1, with (possibly trivial) character, random sign, and weight a random choice from self.weights. EXAMPLES: sage: sage.modular.modsym.tests.Test()._modular_symbols_space_character() # random level = 18, weight = 3, sign = 0 Modular Symbols space of dimension 0 and level 18, weight 3, character [1, zeta6 - 1], sign 0, over Cyclotomic Field of order 6 and degree 2 """ level, weight, sign = self._level_weight_sign() G = dirichlet.DirichletGroup(level) eps = G.random_element() M = modsym.ModularSymbols(eps, weight, sign) self.current_space = M return M