def __mul__(self, other): if is_number(other): if other == 1: return self fcmap = _mul_fourier_by_num(self.fc_dct, other, self.prec, cuspidal=self._is_cuspidal, hol=True) if hasattr(other, "parent"): bs = _common_base_ring(self.base_ring, other.parent()) else: bs = self.base_ring return ModFormQexpLevel1(self.wt, fcmap, self.prec, base_ring=bs, is_cuspidal=self._is_cuspidal, given_reduced_tuples_only=True) if isinstance(other, ModFormQexpLevel1) and other.wt == 0: return self.__mul__(other[(0, 0, 0)]) if is_hol_mod_form(other): prec = common_prec([self, other]) bsring = _common_base_ring(self.base_ring, other.base_ring) ms = self.fc_dct mo = other.fc_dct cuspidal = self._is_cuspidal or other._is_cuspidal fcmap = _mul_fourier(ms, mo, prec, cuspidal=cuspidal, hol=True) return ModFormQexpLevel1(self.wt + other.wt, fcmap, prec, base_ring=bsring, is_cuspidal=cuspidal, given_reduced_tuples_only=True) else: return QexpLevel1.__mul__(self, other)
def __mul__(self, other): if is_number(other): if other == 1: return self fcmap = _mul_fourier_by_num(self.fc_dct, other, self.prec, self._is_cuspidal) if hasattr(other, "parent"): bs = _common_base_ring(self.base_ring, other.parent()) else: bs = self.base_ring return QexpLevel1(fcmap, self.prec, base_ring=bs, is_cuspidal=self._is_cuspidal) elif isinstance(other, QexpLevel1): prec = common_prec([self, other]) bsring = _common_base_ring(self.base_ring, other.base_ring) ms = self.fc_dct mo = other.fc_dct cuspidal = self._is_cuspidal or other._is_cuspidal fcmap = _mul_fourier(ms, mo, prec, cuspidal) res = QexpLevel1(fcmap, prec, base_ring=bsring, is_cuspidal=cuspidal) return res elif isinstance(other, (SymWtGenElt, QseriesTimesQminushalf)): return other.__mul__(self) else: raise NotImplementedError