passagemath-schemes 10.6.40__cp314-cp314-macosx_13_0_arm64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of passagemath-schemes might be problematic. Click here for more details.
- passagemath_schemes/.dylibs/libflint.22.0.dylib +0 -0
- passagemath_schemes/.dylibs/libgmp.10.dylib +0 -0
- passagemath_schemes/.dylibs/libgmpxx.4.dylib +0 -0
- passagemath_schemes/.dylibs/libmpfr.6.dylib +0 -0
- passagemath_schemes/__init__.py +3 -0
- passagemath_schemes-10.6.40.dist-info/METADATA +204 -0
- passagemath_schemes-10.6.40.dist-info/METADATA.bak +205 -0
- passagemath_schemes-10.6.40.dist-info/RECORD +314 -0
- passagemath_schemes-10.6.40.dist-info/WHEEL +6 -0
- passagemath_schemes-10.6.40.dist-info/top_level.txt +3 -0
- sage/all__sagemath_schemes.py +23 -0
- sage/databases/all__sagemath_schemes.py +7 -0
- sage/databases/cremona.py +1723 -0
- sage/dynamics/all__sagemath_schemes.py +2 -0
- sage/dynamics/arithmetic_dynamics/affine_ds.py +1083 -0
- sage/dynamics/arithmetic_dynamics/all.py +14 -0
- sage/dynamics/arithmetic_dynamics/berkovich_ds.py +1101 -0
- sage/dynamics/arithmetic_dynamics/dynamical_semigroup.py +1543 -0
- sage/dynamics/arithmetic_dynamics/endPN_automorphism_group.py +2426 -0
- sage/dynamics/arithmetic_dynamics/endPN_minimal_model.py +1169 -0
- sage/dynamics/arithmetic_dynamics/generic_ds.py +663 -0
- sage/dynamics/arithmetic_dynamics/product_projective_ds.py +339 -0
- sage/dynamics/arithmetic_dynamics/projective_ds.py +9558 -0
- sage/dynamics/arithmetic_dynamics/projective_ds_helper.cpython-314-darwin.so +0 -0
- sage/dynamics/arithmetic_dynamics/projective_ds_helper.pyx +301 -0
- sage/dynamics/arithmetic_dynamics/wehlerK3.py +2576 -0
- sage/lfunctions/all.py +18 -0
- sage/lfunctions/dokchitser.py +745 -0
- sage/lfunctions/pari.py +818 -0
- sage/lfunctions/zero_sums.cpython-314-darwin.so +0 -0
- sage/lfunctions/zero_sums.pyx +1847 -0
- sage/modular/abvar/abvar.py +5135 -0
- sage/modular/abvar/abvar_ambient_jacobian.py +413 -0
- sage/modular/abvar/abvar_newform.py +244 -0
- sage/modular/abvar/all.py +8 -0
- sage/modular/abvar/constructor.py +186 -0
- sage/modular/abvar/cuspidal_subgroup.py +371 -0
- sage/modular/abvar/finite_subgroup.py +896 -0
- sage/modular/abvar/homology.py +720 -0
- sage/modular/abvar/homspace.py +998 -0
- sage/modular/abvar/lseries.py +415 -0
- sage/modular/abvar/morphism.py +935 -0
- sage/modular/abvar/torsion_point.py +274 -0
- sage/modular/abvar/torsion_subgroup.py +740 -0
- sage/modular/all.py +43 -0
- sage/modular/arithgroup/all.py +20 -0
- sage/modular/arithgroup/arithgroup_element.cpython-314-darwin.so +0 -0
- sage/modular/arithgroup/arithgroup_element.pyx +474 -0
- sage/modular/arithgroup/arithgroup_generic.py +1402 -0
- sage/modular/arithgroup/arithgroup_perm.py +2692 -0
- sage/modular/arithgroup/congroup.cpython-314-darwin.so +0 -0
- sage/modular/arithgroup/congroup.pyx +334 -0
- sage/modular/arithgroup/congroup_gamma.py +363 -0
- sage/modular/arithgroup/congroup_gamma0.py +692 -0
- sage/modular/arithgroup/congroup_gamma1.py +653 -0
- sage/modular/arithgroup/congroup_gammaH.py +1469 -0
- sage/modular/arithgroup/congroup_generic.py +628 -0
- sage/modular/arithgroup/congroup_sl2z.py +267 -0
- sage/modular/arithgroup/farey_symbol.cpython-314-darwin.so +0 -0
- sage/modular/arithgroup/farey_symbol.pyx +1066 -0
- sage/modular/arithgroup/tests.py +418 -0
- sage/modular/btquotients/all.py +4 -0
- sage/modular/btquotients/btquotient.py +3753 -0
- sage/modular/btquotients/pautomorphicform.py +2570 -0
- sage/modular/buzzard.py +100 -0
- sage/modular/congroup.py +29 -0
- sage/modular/congroup_element.py +13 -0
- sage/modular/cusps.py +1109 -0
- sage/modular/cusps_nf.py +1270 -0
- sage/modular/dims.py +569 -0
- sage/modular/dirichlet.py +3310 -0
- sage/modular/drinfeld_modform/all.py +2 -0
- sage/modular/drinfeld_modform/element.py +446 -0
- sage/modular/drinfeld_modform/ring.py +773 -0
- sage/modular/drinfeld_modform/tutorial.py +236 -0
- sage/modular/etaproducts.py +1065 -0
- sage/modular/hecke/algebra.py +746 -0
- sage/modular/hecke/all.py +20 -0
- sage/modular/hecke/ambient_module.py +1019 -0
- sage/modular/hecke/degenmap.py +119 -0
- sage/modular/hecke/element.py +325 -0
- sage/modular/hecke/hecke_operator.py +780 -0
- sage/modular/hecke/homspace.py +206 -0
- sage/modular/hecke/module.py +1767 -0
- sage/modular/hecke/morphism.py +174 -0
- sage/modular/hecke/submodule.py +989 -0
- sage/modular/hypergeometric_misc.cpython-314-darwin.so +0 -0
- sage/modular/hypergeometric_misc.pxd +4 -0
- sage/modular/hypergeometric_misc.pyx +166 -0
- sage/modular/hypergeometric_motive.py +2017 -0
- sage/modular/local_comp/all.py +2 -0
- sage/modular/local_comp/liftings.py +292 -0
- sage/modular/local_comp/local_comp.py +1071 -0
- sage/modular/local_comp/smoothchar.py +1825 -0
- sage/modular/local_comp/type_space.py +748 -0
- sage/modular/modform/all.py +30 -0
- sage/modular/modform/ambient.py +815 -0
- sage/modular/modform/ambient_R.py +177 -0
- sage/modular/modform/ambient_eps.py +306 -0
- sage/modular/modform/ambient_g0.py +124 -0
- sage/modular/modform/ambient_g1.py +204 -0
- sage/modular/modform/constructor.py +545 -0
- sage/modular/modform/cuspidal_submodule.py +708 -0
- sage/modular/modform/defaults.py +14 -0
- sage/modular/modform/eis_series.py +505 -0
- sage/modular/modform/eisenstein_submodule.py +663 -0
- sage/modular/modform/element.py +4131 -0
- sage/modular/modform/find_generators.py +59 -0
- sage/modular/modform/half_integral.py +154 -0
- sage/modular/modform/hecke_operator_on_qexp.py +247 -0
- sage/modular/modform/j_invariant.py +47 -0
- sage/modular/modform/l_series_gross_zagier.py +133 -0
- sage/modular/modform/l_series_gross_zagier_coeffs.cpython-314-darwin.so +0 -0
- sage/modular/modform/l_series_gross_zagier_coeffs.pyx +177 -0
- sage/modular/modform/notes.py +45 -0
- sage/modular/modform/numerical.py +514 -0
- sage/modular/modform/periods.py +14 -0
- sage/modular/modform/ring.py +1257 -0
- sage/modular/modform/space.py +1860 -0
- sage/modular/modform/submodule.py +118 -0
- sage/modular/modform/tests.py +64 -0
- sage/modular/modform/theta.py +110 -0
- sage/modular/modform/vm_basis.py +381 -0
- sage/modular/modform/weight1.py +220 -0
- sage/modular/modform_hecketriangle/abstract_ring.py +1932 -0
- sage/modular/modform_hecketriangle/abstract_space.py +2528 -0
- sage/modular/modform_hecketriangle/all.py +30 -0
- sage/modular/modform_hecketriangle/analytic_type.py +590 -0
- sage/modular/modform_hecketriangle/constructor.py +416 -0
- sage/modular/modform_hecketriangle/element.py +351 -0
- sage/modular/modform_hecketriangle/functors.py +752 -0
- sage/modular/modform_hecketriangle/graded_ring.py +541 -0
- sage/modular/modform_hecketriangle/graded_ring_element.py +2225 -0
- sage/modular/modform_hecketriangle/hecke_triangle_group_element.py +3352 -0
- sage/modular/modform_hecketriangle/hecke_triangle_groups.py +1432 -0
- sage/modular/modform_hecketriangle/readme.py +1214 -0
- sage/modular/modform_hecketriangle/series_constructor.py +580 -0
- sage/modular/modform_hecketriangle/space.py +1037 -0
- sage/modular/modform_hecketriangle/subspace.py +423 -0
- sage/modular/modsym/all.py +17 -0
- sage/modular/modsym/ambient.py +3846 -0
- sage/modular/modsym/boundary.py +1420 -0
- sage/modular/modsym/element.py +336 -0
- sage/modular/modsym/g1list.py +178 -0
- sage/modular/modsym/ghlist.py +182 -0
- sage/modular/modsym/hecke_operator.py +73 -0
- sage/modular/modsym/manin_symbol.cpython-314-darwin.so +0 -0
- sage/modular/modsym/manin_symbol.pxd +5 -0
- sage/modular/modsym/manin_symbol.pyx +497 -0
- sage/modular/modsym/manin_symbol_list.py +1295 -0
- sage/modular/modsym/modsym.py +400 -0
- sage/modular/modsym/modular_symbols.py +384 -0
- sage/modular/modsym/p1list.cpython-314-darwin.so +0 -0
- sage/modular/modsym/p1list.pxd +29 -0
- sage/modular/modsym/p1list.pyx +1372 -0
- sage/modular/modsym/p1list_nf.py +1241 -0
- sage/modular/modsym/relation_matrix.py +591 -0
- sage/modular/modsym/relation_matrix_pyx.cpython-314-darwin.so +0 -0
- sage/modular/modsym/relation_matrix_pyx.pyx +108 -0
- sage/modular/modsym/space.py +2468 -0
- sage/modular/modsym/subspace.py +455 -0
- sage/modular/modsym/tests.py +375 -0
- sage/modular/multiple_zeta.py +2632 -0
- sage/modular/multiple_zeta_F_algebra.py +786 -0
- sage/modular/overconvergent/all.py +6 -0
- sage/modular/overconvergent/genus0.py +1878 -0
- sage/modular/overconvergent/hecke_series.py +1187 -0
- sage/modular/overconvergent/weightspace.py +778 -0
- sage/modular/pollack_stevens/all.py +4 -0
- sage/modular/pollack_stevens/distributions.py +874 -0
- sage/modular/pollack_stevens/fund_domain.py +1572 -0
- sage/modular/pollack_stevens/manin_map.py +859 -0
- sage/modular/pollack_stevens/modsym.py +1593 -0
- sage/modular/pollack_stevens/padic_lseries.py +417 -0
- sage/modular/pollack_stevens/sigma0.py +534 -0
- sage/modular/pollack_stevens/space.py +1076 -0
- sage/modular/quasimodform/all.py +3 -0
- sage/modular/quasimodform/element.py +845 -0
- sage/modular/quasimodform/ring.py +828 -0
- sage/modular/quatalg/all.py +3 -0
- sage/modular/quatalg/brandt.py +1642 -0
- sage/modular/ssmod/all.py +8 -0
- sage/modular/ssmod/ssmod.py +827 -0
- sage/rings/all__sagemath_schemes.py +1 -0
- sage/rings/polynomial/all__sagemath_schemes.py +1 -0
- sage/rings/polynomial/binary_form_reduce.py +585 -0
- sage/schemes/all.py +41 -0
- sage/schemes/berkovich/all.py +6 -0
- sage/schemes/berkovich/berkovich_cp_element.py +2582 -0
- sage/schemes/berkovich/berkovich_space.py +748 -0
- sage/schemes/curves/affine_curve.py +2928 -0
- sage/schemes/curves/all.py +33 -0
- sage/schemes/curves/closed_point.py +434 -0
- sage/schemes/curves/constructor.py +381 -0
- sage/schemes/curves/curve.py +542 -0
- sage/schemes/curves/plane_curve_arrangement.py +1283 -0
- sage/schemes/curves/point.py +463 -0
- sage/schemes/curves/projective_curve.py +3026 -0
- sage/schemes/curves/zariski_vankampen.py +1932 -0
- sage/schemes/cyclic_covers/all.py +2 -0
- sage/schemes/cyclic_covers/charpoly_frobenius.py +320 -0
- sage/schemes/cyclic_covers/constructor.py +137 -0
- sage/schemes/cyclic_covers/cycliccover_finite_field.py +1309 -0
- sage/schemes/cyclic_covers/cycliccover_generic.py +310 -0
- sage/schemes/elliptic_curves/BSD.py +1036 -0
- sage/schemes/elliptic_curves/Qcurves.py +592 -0
- sage/schemes/elliptic_curves/addition_formulas_ring.py +94 -0
- sage/schemes/elliptic_curves/all.py +49 -0
- sage/schemes/elliptic_curves/cardinality.py +609 -0
- sage/schemes/elliptic_curves/cm.py +1102 -0
- sage/schemes/elliptic_curves/constructor.py +1552 -0
- sage/schemes/elliptic_curves/ec_database.py +175 -0
- sage/schemes/elliptic_curves/ell_curve_isogeny.py +3972 -0
- sage/schemes/elliptic_curves/ell_egros.py +459 -0
- sage/schemes/elliptic_curves/ell_field.py +2836 -0
- sage/schemes/elliptic_curves/ell_finite_field.py +3359 -0
- sage/schemes/elliptic_curves/ell_generic.py +3760 -0
- sage/schemes/elliptic_curves/ell_local_data.py +1207 -0
- sage/schemes/elliptic_curves/ell_modular_symbols.py +775 -0
- sage/schemes/elliptic_curves/ell_number_field.py +4220 -0
- sage/schemes/elliptic_curves/ell_padic_field.py +107 -0
- sage/schemes/elliptic_curves/ell_point.py +4787 -0
- sage/schemes/elliptic_curves/ell_rational_field.py +7368 -0
- sage/schemes/elliptic_curves/ell_tate_curve.py +671 -0
- sage/schemes/elliptic_curves/ell_torsion.py +436 -0
- sage/schemes/elliptic_curves/ell_wp.py +352 -0
- sage/schemes/elliptic_curves/formal_group.py +760 -0
- sage/schemes/elliptic_curves/gal_reps.py +1459 -0
- sage/schemes/elliptic_curves/gal_reps_number_field.py +1669 -0
- sage/schemes/elliptic_curves/gp_simon.py +152 -0
- sage/schemes/elliptic_curves/heegner.py +7335 -0
- sage/schemes/elliptic_curves/height.py +2109 -0
- sage/schemes/elliptic_curves/hom.py +1406 -0
- sage/schemes/elliptic_curves/hom_composite.py +934 -0
- sage/schemes/elliptic_curves/hom_frobenius.py +522 -0
- sage/schemes/elliptic_curves/hom_scalar.py +531 -0
- sage/schemes/elliptic_curves/hom_sum.py +682 -0
- sage/schemes/elliptic_curves/hom_velusqrt.py +1290 -0
- sage/schemes/elliptic_curves/homset.py +271 -0
- sage/schemes/elliptic_curves/isogeny_class.py +1521 -0
- sage/schemes/elliptic_curves/isogeny_small_degree.py +2797 -0
- sage/schemes/elliptic_curves/jacobian.py +237 -0
- sage/schemes/elliptic_curves/kodaira_symbol.py +344 -0
- sage/schemes/elliptic_curves/kraus.py +1014 -0
- sage/schemes/elliptic_curves/lseries_ell.py +943 -0
- sage/schemes/elliptic_curves/mod5family.py +105 -0
- sage/schemes/elliptic_curves/mod_poly.py +197 -0
- sage/schemes/elliptic_curves/mod_sym_num.cpython-314-darwin.so +0 -0
- sage/schemes/elliptic_curves/mod_sym_num.pyx +3796 -0
- sage/schemes/elliptic_curves/modular_parametrization.py +305 -0
- sage/schemes/elliptic_curves/padic_lseries.py +1793 -0
- sage/schemes/elliptic_curves/padics.py +1816 -0
- sage/schemes/elliptic_curves/period_lattice.py +2234 -0
- sage/schemes/elliptic_curves/period_lattice_region.cpython-314-darwin.so +0 -0
- sage/schemes/elliptic_curves/period_lattice_region.pyx +722 -0
- sage/schemes/elliptic_curves/saturation.py +715 -0
- sage/schemes/elliptic_curves/sha_tate.py +1158 -0
- sage/schemes/elliptic_curves/weierstrass_morphism.py +1117 -0
- sage/schemes/elliptic_curves/weierstrass_transform.py +200 -0
- sage/schemes/hyperelliptic_curves/all.py +6 -0
- sage/schemes/hyperelliptic_curves/constructor.py +291 -0
- sage/schemes/hyperelliptic_curves/hyperelliptic_finite_field.py +1914 -0
- sage/schemes/hyperelliptic_curves/hyperelliptic_g2.py +192 -0
- sage/schemes/hyperelliptic_curves/hyperelliptic_generic.py +954 -0
- sage/schemes/hyperelliptic_curves/hyperelliptic_padic_field.py +1332 -0
- sage/schemes/hyperelliptic_curves/hyperelliptic_rational_field.py +84 -0
- sage/schemes/hyperelliptic_curves/invariants.py +410 -0
- sage/schemes/hyperelliptic_curves/jacobian_endomorphism_utils.py +315 -0
- sage/schemes/hyperelliptic_curves/jacobian_g2.py +32 -0
- sage/schemes/hyperelliptic_curves/jacobian_generic.py +419 -0
- sage/schemes/hyperelliptic_curves/jacobian_homset.py +186 -0
- sage/schemes/hyperelliptic_curves/jacobian_morphism.py +875 -0
- sage/schemes/hyperelliptic_curves/kummer_surface.py +99 -0
- sage/schemes/hyperelliptic_curves/mestre.py +302 -0
- sage/schemes/hyperelliptic_curves/monsky_washnitzer.py +3871 -0
- sage/schemes/jacobians/abstract_jacobian.py +277 -0
- sage/schemes/jacobians/all.py +2 -0
- sage/schemes/overview.py +161 -0
- sage/schemes/plane_conics/all.py +22 -0
- sage/schemes/plane_conics/con_field.py +1296 -0
- sage/schemes/plane_conics/con_finite_field.py +158 -0
- sage/schemes/plane_conics/con_number_field.py +456 -0
- sage/schemes/plane_conics/con_rational_field.py +406 -0
- sage/schemes/plane_conics/con_rational_function_field.py +580 -0
- sage/schemes/plane_conics/constructor.py +249 -0
- sage/schemes/plane_quartics/all.py +2 -0
- sage/schemes/plane_quartics/quartic_constructor.py +71 -0
- sage/schemes/plane_quartics/quartic_generic.py +73 -0
- sage/schemes/riemann_surfaces/all.py +1 -0
- sage/schemes/riemann_surfaces/riemann_surface.py +4117 -0
- sage_wheels/share/cremona/cremona_mini.db +0 -0
- sage_wheels/share/ellcurves/rank0 +30427 -0
- sage_wheels/share/ellcurves/rank1 +31871 -0
- sage_wheels/share/ellcurves/rank10 +6 -0
- sage_wheels/share/ellcurves/rank11 +6 -0
- sage_wheels/share/ellcurves/rank12 +1 -0
- sage_wheels/share/ellcurves/rank14 +1 -0
- sage_wheels/share/ellcurves/rank15 +1 -0
- sage_wheels/share/ellcurves/rank17 +1 -0
- sage_wheels/share/ellcurves/rank19 +1 -0
- sage_wheels/share/ellcurves/rank2 +2388 -0
- sage_wheels/share/ellcurves/rank20 +1 -0
- sage_wheels/share/ellcurves/rank21 +1 -0
- sage_wheels/share/ellcurves/rank22 +1 -0
- sage_wheels/share/ellcurves/rank23 +1 -0
- sage_wheels/share/ellcurves/rank24 +1 -0
- sage_wheels/share/ellcurves/rank28 +1 -0
- sage_wheels/share/ellcurves/rank3 +836 -0
- sage_wheels/share/ellcurves/rank4 +10 -0
- sage_wheels/share/ellcurves/rank5 +5 -0
- sage_wheels/share/ellcurves/rank6 +5 -0
- sage_wheels/share/ellcurves/rank7 +5 -0
- sage_wheels/share/ellcurves/rank8 +6 -0
- sage_wheels/share/ellcurves/rank9 +7 -0
|
@@ -0,0 +1,752 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-schemes
|
|
2
|
+
# sage.doctest: needs sage.combinat sage.graphs
|
|
3
|
+
r"""
|
|
4
|
+
Functor construction for all spaces
|
|
5
|
+
|
|
6
|
+
AUTHORS:
|
|
7
|
+
|
|
8
|
+
- Jonas Jermann (2013): initial version
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
# ****************************************************************************
|
|
12
|
+
# Copyright (C) 2013-2014 Jonas Jermann <jjermann2@gmail.com>
|
|
13
|
+
#
|
|
14
|
+
# Distributed under the terms of the GNU General Public License (GPL)
|
|
15
|
+
# as published by the Free Software Foundation; either version 2 of
|
|
16
|
+
# the License, or (at your option) any later version.
|
|
17
|
+
# https://www.gnu.org/licenses/
|
|
18
|
+
# ****************************************************************************
|
|
19
|
+
|
|
20
|
+
from sage.rings.integer_ring import ZZ
|
|
21
|
+
from sage.rings.rational_field import QQ
|
|
22
|
+
from sage.rings.infinity import infinity
|
|
23
|
+
|
|
24
|
+
from sage.categories.functor import Functor
|
|
25
|
+
from sage.categories.pushout import ConstructionFunctor
|
|
26
|
+
from sage.categories.sets_cat import Sets
|
|
27
|
+
from sage.structure.parent import Parent
|
|
28
|
+
from sage.structure.unique_representation import UniqueRepresentation
|
|
29
|
+
from sage.categories.commutative_additive_groups import CommutativeAdditiveGroups
|
|
30
|
+
from sage.categories.rings import Rings
|
|
31
|
+
|
|
32
|
+
from .constructor import FormsSpace, FormsRing
|
|
33
|
+
from .abstract_space import FormsSpace_abstract
|
|
34
|
+
from .subspace import SubSpaceForms
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def _get_base_ring(ring, var_name='d'):
|
|
38
|
+
r"""
|
|
39
|
+
Return the base ring of the given ``ring``:
|
|
40
|
+
|
|
41
|
+
If ``ring`` is of the form ``FractionField(PolynomialRing(R,'d'))``:
|
|
42
|
+
Return ``R``.
|
|
43
|
+
|
|
44
|
+
If ``ring`` is of the form ``FractionField(R)``:
|
|
45
|
+
Return ``R``.
|
|
46
|
+
|
|
47
|
+
If ``ring`` is of the form ``PolynomialRing(R,'d')``:
|
|
48
|
+
Return ``R``.
|
|
49
|
+
|
|
50
|
+
Otherwise return ``ring``.
|
|
51
|
+
|
|
52
|
+
The base ring is used in the construction of the corresponding
|
|
53
|
+
``FormsRing`` or ``FormsSpace``. In particular in the construction
|
|
54
|
+
of holomorphic forms of degree (0, 1). For (binary)
|
|
55
|
+
operations a general ring element is considered (coerced to)
|
|
56
|
+
a (constant) holomorphic form of degree (0, 1)
|
|
57
|
+
whose construction should be based on the returned base ring
|
|
58
|
+
(and not on ``ring``!).
|
|
59
|
+
|
|
60
|
+
If ``var_name`` (default: ``'d'``) is specified then this variable
|
|
61
|
+
name is used for the polynomial ring.
|
|
62
|
+
|
|
63
|
+
EXAMPLES::
|
|
64
|
+
|
|
65
|
+
sage: from sage.modular.modform_hecketriangle.functors import _get_base_ring
|
|
66
|
+
sage: _get_base_ring(ZZ) == ZZ
|
|
67
|
+
True
|
|
68
|
+
sage: _get_base_ring(QQ) == ZZ
|
|
69
|
+
True
|
|
70
|
+
sage: _get_base_ring(PolynomialRing(CC, 'd')) == CC
|
|
71
|
+
True
|
|
72
|
+
sage: _get_base_ring(PolynomialRing(QQ, 'd')) == ZZ
|
|
73
|
+
True
|
|
74
|
+
sage: _get_base_ring(FractionField(PolynomialRing(CC, 'd'))) == CC
|
|
75
|
+
True
|
|
76
|
+
sage: _get_base_ring(FractionField(PolynomialRing(QQ, 'd'))) == ZZ
|
|
77
|
+
True
|
|
78
|
+
sage: _get_base_ring(PolynomialRing(QQ, 'x')) == PolynomialRing(QQ, 'x')
|
|
79
|
+
True
|
|
80
|
+
"""
|
|
81
|
+
|
|
82
|
+
# from sage.rings.fraction_field import FractionField_generic
|
|
83
|
+
from sage.rings.polynomial.polynomial_ring import PolynomialRing_generic
|
|
84
|
+
from sage.categories.pushout import FractionField as FractionFieldFunctor
|
|
85
|
+
|
|
86
|
+
base_ring = ring
|
|
87
|
+
# if (isinstance(base_ring, FractionField_generic)):
|
|
88
|
+
# base_ring = base_ring.base()
|
|
89
|
+
if (base_ring.construction() and base_ring.construction()[0] == FractionFieldFunctor()):
|
|
90
|
+
base_ring = base_ring.construction()[1]
|
|
91
|
+
if (isinstance(base_ring, PolynomialRing_generic) and base_ring.ngens() == 1 and base_ring.variable_name() == var_name):
|
|
92
|
+
base_ring = base_ring.base()
|
|
93
|
+
if (base_ring.construction() and base_ring.construction()[0] == FractionFieldFunctor()):
|
|
94
|
+
base_ring = base_ring.construction()[1]
|
|
95
|
+
|
|
96
|
+
return base_ring
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
def _common_subgroup(group1, group2):
|
|
100
|
+
r"""
|
|
101
|
+
Return a common (Hecke triangle) subgroup of both given groups
|
|
102
|
+
``group1`` and ``group2`` if it exists. Otherwise return ``None``.
|
|
103
|
+
|
|
104
|
+
EXAMPLES::
|
|
105
|
+
|
|
106
|
+
sage: from sage.modular.modform_hecketriangle.functors import _common_subgroup
|
|
107
|
+
sage: from sage.modular.modform_hecketriangle.hecke_triangle_groups import HeckeTriangleGroup
|
|
108
|
+
sage: _common_subgroup(HeckeTriangleGroup(n=3), HeckeTriangleGroup(n=infinity))
|
|
109
|
+
Hecke triangle group for n = +Infinity
|
|
110
|
+
sage: _common_subgroup(HeckeTriangleGroup(n=infinity), HeckeTriangleGroup(n=3))
|
|
111
|
+
Hecke triangle group for n = +Infinity
|
|
112
|
+
sage: _common_subgroup(HeckeTriangleGroup(n=4), HeckeTriangleGroup(n=infinity)) is None
|
|
113
|
+
True
|
|
114
|
+
sage: _common_subgroup(HeckeTriangleGroup(n=4), HeckeTriangleGroup(n=4))
|
|
115
|
+
Hecke triangle group for n = 4
|
|
116
|
+
"""
|
|
117
|
+
|
|
118
|
+
if group1 == group2:
|
|
119
|
+
return group1
|
|
120
|
+
elif (group1.n() == 3) and (group2.n() == infinity):
|
|
121
|
+
return group2
|
|
122
|
+
elif (group1.n() == infinity) and (group2.n() == 3):
|
|
123
|
+
return group1
|
|
124
|
+
else:
|
|
125
|
+
return None
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
def ConstantFormsSpaceFunctor(group):
|
|
129
|
+
r"""
|
|
130
|
+
Construction functor for the space of constant forms.
|
|
131
|
+
|
|
132
|
+
When determining a common parent between a ring
|
|
133
|
+
and a forms ring or space this functor is first
|
|
134
|
+
applied to the ring.
|
|
135
|
+
|
|
136
|
+
EXAMPLES::
|
|
137
|
+
|
|
138
|
+
sage: from sage.modular.modform_hecketriangle.functors import (ConstantFormsSpaceFunctor, FormsSpaceFunctor)
|
|
139
|
+
sage: ConstantFormsSpaceFunctor(4) == FormsSpaceFunctor("holo", 4, 0, 1)
|
|
140
|
+
True
|
|
141
|
+
sage: ConstantFormsSpaceFunctor(4)
|
|
142
|
+
ModularFormsFunctor(n=4, k=0, ep=1)
|
|
143
|
+
"""
|
|
144
|
+
return FormsSpaceFunctor("holo", group, QQ.zero(), ZZ.one())
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
class FormsSubSpaceFunctor(ConstructionFunctor):
|
|
148
|
+
r"""
|
|
149
|
+
Construction functor for forms sub spaces.
|
|
150
|
+
"""
|
|
151
|
+
|
|
152
|
+
rank = 10
|
|
153
|
+
|
|
154
|
+
def __init__(self, ambient_space_functor, generators):
|
|
155
|
+
r"""
|
|
156
|
+
Construction functor for the forms sub space
|
|
157
|
+
for the given ``generators`` inside the ambient space
|
|
158
|
+
which is constructed by the ``ambient_space_functor``.
|
|
159
|
+
|
|
160
|
+
The functor can only be applied to rings for which the generators
|
|
161
|
+
can be converted into the corresponding forms space
|
|
162
|
+
given by the ``ambient_space_functor`` applied to the ring.
|
|
163
|
+
|
|
164
|
+
See :meth:`__call__` for a description of the functor.
|
|
165
|
+
|
|
166
|
+
INPUT:
|
|
167
|
+
|
|
168
|
+
- ``ambient_space_functor`` -- a FormsSpaceFunctor
|
|
169
|
+
|
|
170
|
+
- ``generators`` -- a list of elements of some ambient space
|
|
171
|
+
over some base ring
|
|
172
|
+
|
|
173
|
+
OUTPUT: the construction functor for the corresponding forms sub space
|
|
174
|
+
|
|
175
|
+
EXAMPLES::
|
|
176
|
+
|
|
177
|
+
sage: from sage.modular.modform_hecketriangle.functors import (FormsSpaceFunctor, FormsSubSpaceFunctor)
|
|
178
|
+
sage: from sage.modular.modform_hecketriangle.space import ModularForms
|
|
179
|
+
sage: ambient_space = ModularForms(n=4, k=12, ep=1)
|
|
180
|
+
sage: ambient_space_functor = FormsSpaceFunctor("holo", group=4, k=12, ep=1)
|
|
181
|
+
sage: ambient_space_functor
|
|
182
|
+
ModularFormsFunctor(n=4, k=12, ep=1)
|
|
183
|
+
sage: el = ambient_space.gen(0).full_reduce()
|
|
184
|
+
sage: FormsSubSpaceFunctor(ambient_space_functor, [el])
|
|
185
|
+
FormsSubSpaceFunctor with 1 generator for the ModularFormsFunctor(n=4, k=12, ep=1)
|
|
186
|
+
"""
|
|
187
|
+
|
|
188
|
+
Functor.__init__(self, Rings(), CommutativeAdditiveGroups())
|
|
189
|
+
if not isinstance(ambient_space_functor, FormsSpaceFunctor):
|
|
190
|
+
raise ValueError("{} is not a FormsSpaceFunctor!".format(ambient_space_functor))
|
|
191
|
+
# TODO: canonical parameters? Some checks?
|
|
192
|
+
# The generators should have an associated base ring
|
|
193
|
+
# self._generators_ring = ...
|
|
194
|
+
# on call check if there is a coercion from self._generators_ring to R
|
|
195
|
+
|
|
196
|
+
self._ambient_space_functor = ambient_space_functor
|
|
197
|
+
self._generators = generators
|
|
198
|
+
|
|
199
|
+
def __call__(self, R):
|
|
200
|
+
r"""
|
|
201
|
+
Return the corresponding subspace of the ambient space
|
|
202
|
+
constructed by ``self._ambient_space`` with the generators ``self._generators``.
|
|
203
|
+
If the ambient space is not a forms space the ambient space is returned.
|
|
204
|
+
|
|
205
|
+
EXAMPLES::
|
|
206
|
+
|
|
207
|
+
sage: from sage.modular.modform_hecketriangle.functors import (FormsSpaceFunctor, FormsSubSpaceFunctor, BaseFacade)
|
|
208
|
+
sage: from sage.modular.modform_hecketriangle.space import CuspForms
|
|
209
|
+
sage: ambient_space = CuspForms(n=4, k=12, ep=1)
|
|
210
|
+
sage: ambient_space_functor = FormsSpaceFunctor("cusp", group=4, k=12, ep=1)
|
|
211
|
+
sage: el = ambient_space.gen(0)
|
|
212
|
+
sage: F = FormsSubSpaceFunctor(ambient_space_functor, [el])
|
|
213
|
+
sage: F
|
|
214
|
+
FormsSubSpaceFunctor with 1 generator for the CuspFormsFunctor(n=4, k=12, ep=1)
|
|
215
|
+
|
|
216
|
+
sage: F(BaseFacade(ZZ))
|
|
217
|
+
Subspace of dimension 1 of CuspForms(n=4, k=12, ep=1) over Integer Ring
|
|
218
|
+
sage: F(BaseFacade(QQ))
|
|
219
|
+
Subspace of dimension 1 of CuspForms(n=4, k=12, ep=1) over Integer Ring
|
|
220
|
+
sage: F(QQ)
|
|
221
|
+
ModularFormsRing(n=4) over Integer Ring
|
|
222
|
+
|
|
223
|
+
sage: ambient_space_functor = FormsSpaceFunctor("holo", group=4, k=0, ep=1)
|
|
224
|
+
sage: F = FormsSubSpaceFunctor(ambient_space_functor, [1])
|
|
225
|
+
sage: F
|
|
226
|
+
FormsSubSpaceFunctor with 1 generator for the ModularFormsFunctor(n=4, k=0, ep=1)
|
|
227
|
+
sage: F(BaseFacade(ZZ))
|
|
228
|
+
Subspace of dimension 1 of ModularForms(n=4, k=0, ep=1) over Integer Ring
|
|
229
|
+
"""
|
|
230
|
+
|
|
231
|
+
ambient_space = self._ambient_space_functor(R)
|
|
232
|
+
if isinstance(ambient_space, FormsSpace_abstract):
|
|
233
|
+
return SubSpaceForms(ambient_space, self._generators)
|
|
234
|
+
else:
|
|
235
|
+
return ambient_space
|
|
236
|
+
|
|
237
|
+
def _repr_(self):
|
|
238
|
+
r"""
|
|
239
|
+
Return the string representation of ``self``.
|
|
240
|
+
|
|
241
|
+
EXAMPLES::
|
|
242
|
+
|
|
243
|
+
sage: from sage.modular.modform_hecketriangle.functors import (FormsSpaceFunctor, FormsSubSpaceFunctor)
|
|
244
|
+
sage: from sage.modular.modform_hecketriangle.space import ModularForms
|
|
245
|
+
sage: ambient_space = ModularForms(n=4, k=12, ep=1)
|
|
246
|
+
sage: ambient_space_functor = FormsSpaceFunctor("holo", group=4, k=12, ep=1)
|
|
247
|
+
sage: FormsSubSpaceFunctor(ambient_space_functor, ambient_space.gens())
|
|
248
|
+
FormsSubSpaceFunctor with 2 generators for the ModularFormsFunctor(n=4, k=12, ep=1)
|
|
249
|
+
sage: FormsSubSpaceFunctor(ambient_space_functor, [ambient_space.gen(0)])
|
|
250
|
+
FormsSubSpaceFunctor with 1 generator for the ModularFormsFunctor(n=4, k=12, ep=1)
|
|
251
|
+
"""
|
|
252
|
+
|
|
253
|
+
return "FormsSubSpaceFunctor with {} generator{} for the {}".format(len(self._generators), 's' if len(self._generators) != 1 else '', self._ambient_space_functor)
|
|
254
|
+
|
|
255
|
+
def merge(self, other):
|
|
256
|
+
r"""
|
|
257
|
+
Return the merged functor of ``self`` and ``other``.
|
|
258
|
+
|
|
259
|
+
If ``other`` is a ``FormsSubSpaceFunctor`` then
|
|
260
|
+
first the common ambient space functor is constructed by
|
|
261
|
+
merging the two corresponding functors.
|
|
262
|
+
|
|
263
|
+
If that ambient space functor is a FormsSpaceFunctor
|
|
264
|
+
and the generators agree the corresponding ``FormsSubSpaceFunctor``
|
|
265
|
+
is returned.
|
|
266
|
+
|
|
267
|
+
If ``other`` is not a ``FormsSubSpaceFunctor`` then ``self``
|
|
268
|
+
is merged as if it was its ambient space functor.
|
|
269
|
+
|
|
270
|
+
EXAMPLES::
|
|
271
|
+
|
|
272
|
+
sage: from sage.modular.modform_hecketriangle.functors import (FormsSpaceFunctor, FormsSubSpaceFunctor)
|
|
273
|
+
sage: from sage.modular.modform_hecketriangle.space import ModularForms
|
|
274
|
+
sage: ambient_space = ModularForms(n=4, k=12, ep=1)
|
|
275
|
+
sage: ambient_space_functor1 = FormsSpaceFunctor("holo", group=4, k=12, ep=1)
|
|
276
|
+
sage: ambient_space_functor2 = FormsSpaceFunctor("cusp", group=4, k=12, ep=1)
|
|
277
|
+
sage: ss_functor1 = FormsSubSpaceFunctor(ambient_space_functor1, [ambient_space.gen(0)])
|
|
278
|
+
sage: ss_functor2 = FormsSubSpaceFunctor(ambient_space_functor2, [ambient_space.gen(0)])
|
|
279
|
+
sage: ss_functor3 = FormsSubSpaceFunctor(ambient_space_functor2, [2*ambient_space.gen(0)])
|
|
280
|
+
sage: merged_ambient = ambient_space_functor1.merge(ambient_space_functor2)
|
|
281
|
+
sage: merged_ambient
|
|
282
|
+
ModularFormsFunctor(n=4, k=12, ep=1)
|
|
283
|
+
sage: functor4 = FormsSpaceFunctor(["quasi", "cusp"], group=4, k=10, ep=-1)
|
|
284
|
+
|
|
285
|
+
sage: ss_functor1.merge(ss_functor1) is ss_functor1
|
|
286
|
+
True
|
|
287
|
+
sage: ss_functor1.merge(ss_functor2)
|
|
288
|
+
FormsSubSpaceFunctor with 2 generators for the ModularFormsFunctor(n=4, k=12, ep=1)
|
|
289
|
+
sage: ss_functor1.merge(ss_functor2) == FormsSubSpaceFunctor(merged_ambient, [ambient_space.gen(0), ambient_space.gen(0)])
|
|
290
|
+
True
|
|
291
|
+
sage: ss_functor1.merge(ss_functor3) == FormsSubSpaceFunctor(merged_ambient, [ambient_space.gen(0), 2*ambient_space.gen(0)])
|
|
292
|
+
True
|
|
293
|
+
sage: ss_functor1.merge(ambient_space_functor2) == merged_ambient
|
|
294
|
+
True
|
|
295
|
+
sage: ss_functor1.merge(functor4)
|
|
296
|
+
QuasiModularFormsRingFunctor(n=4, red_hom=True)
|
|
297
|
+
"""
|
|
298
|
+
|
|
299
|
+
if (self == other):
|
|
300
|
+
return self
|
|
301
|
+
elif isinstance(other, FormsSubSpaceFunctor):
|
|
302
|
+
merged_ambient_space_functor = self._ambient_space_functor.merge(other._ambient_space_functor)
|
|
303
|
+
if isinstance(merged_ambient_space_functor, FormsSpaceFunctor):
|
|
304
|
+
generators = self._generators + other._generators
|
|
305
|
+
return FormsSubSpaceFunctor(merged_ambient_space_functor, generators)
|
|
306
|
+
# This includes the case when None is returned
|
|
307
|
+
else:
|
|
308
|
+
return merged_ambient_space_functor
|
|
309
|
+
else:
|
|
310
|
+
return self._ambient_space_functor.merge(other)
|
|
311
|
+
|
|
312
|
+
def __eq__(self, other):
|
|
313
|
+
r"""
|
|
314
|
+
Compare ``self`` and ``other``.
|
|
315
|
+
|
|
316
|
+
EXAMPLES::
|
|
317
|
+
|
|
318
|
+
sage: from sage.modular.modform_hecketriangle.functors import (FormsSpaceFunctor, FormsSubSpaceFunctor)
|
|
319
|
+
sage: from sage.modular.modform_hecketriangle.space import ModularForms
|
|
320
|
+
sage: ambient_space = ModularForms(n=4, k=12, ep=1)
|
|
321
|
+
sage: ambient_space_functor1 = FormsSpaceFunctor("holo", group=4, k=12, ep=1)
|
|
322
|
+
sage: ss_functor1 = FormsSubSpaceFunctor(ambient_space_functor1, [ambient_space.gen(0)])
|
|
323
|
+
sage: ss_functor2 = FormsSubSpaceFunctor(ambient_space_functor1, [ambient_space.gen(1)])
|
|
324
|
+
sage: ss_functor1 == ss_functor2
|
|
325
|
+
False
|
|
326
|
+
"""
|
|
327
|
+
return (type(self) is type(other) and
|
|
328
|
+
self._ambient_space_functor == other._ambient_space_functor and
|
|
329
|
+
self._generators == other._generators)
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
class FormsSpaceFunctor(ConstructionFunctor):
|
|
333
|
+
r"""
|
|
334
|
+
Construction functor for forms spaces.
|
|
335
|
+
|
|
336
|
+
NOTE:
|
|
337
|
+
|
|
338
|
+
When the base ring is not a ``BaseFacade`` the functor is first
|
|
339
|
+
merged with the ConstantFormsSpaceFunctor. This case occurs in
|
|
340
|
+
the pushout constructions (when trying to find a common parent
|
|
341
|
+
between a forms space and a ring which is not a ``BaseFacade``).
|
|
342
|
+
"""
|
|
343
|
+
|
|
344
|
+
from .analytic_type import AnalyticType
|
|
345
|
+
AT = AnalyticType()
|
|
346
|
+
|
|
347
|
+
rank = 10
|
|
348
|
+
|
|
349
|
+
def __init__(self, analytic_type, group, k, ep):
|
|
350
|
+
r"""
|
|
351
|
+
Construction functor for the forms space
|
|
352
|
+
(or forms ring, see above) with
|
|
353
|
+
the given ``analytic_type``, ``group``,
|
|
354
|
+
weight ``k`` and multiplier ``ep``.
|
|
355
|
+
|
|
356
|
+
See :meth:`__call__` for a description of the functor.
|
|
357
|
+
|
|
358
|
+
INPUT:
|
|
359
|
+
|
|
360
|
+
- ``analytic_type`` -- an element of ``AnalyticType()``
|
|
361
|
+
|
|
362
|
+
- ``group`` -- the index of a Hecke Triangle group
|
|
363
|
+
|
|
364
|
+
- ``k`` -- a rational number, the weight of the space
|
|
365
|
+
|
|
366
|
+
- ``ep`` -- `1` or `-1`, the multiplier of the space
|
|
367
|
+
|
|
368
|
+
OUTPUT: the construction functor for the corresponding forms space/ring
|
|
369
|
+
|
|
370
|
+
EXAMPLES::
|
|
371
|
+
|
|
372
|
+
sage: from sage.modular.modform_hecketriangle.functors import FormsSpaceFunctor
|
|
373
|
+
sage: FormsSpaceFunctor(["holo", "weak"], group=4, k=0, ep=-1)
|
|
374
|
+
WeakModularFormsFunctor(n=4, k=0, ep=-1)
|
|
375
|
+
"""
|
|
376
|
+
|
|
377
|
+
Functor.__init__(self, Rings(), CommutativeAdditiveGroups())
|
|
378
|
+
from .space import canonical_parameters
|
|
379
|
+
(self._group, R, self._k, self._ep, n) = canonical_parameters(group, ZZ, k, ep)
|
|
380
|
+
|
|
381
|
+
self._analytic_type = self.AT(analytic_type)
|
|
382
|
+
|
|
383
|
+
def __call__(self, R):
|
|
384
|
+
r"""
|
|
385
|
+
If ``R`` is a ``BaseFacade(S)`` then return the corresponding
|
|
386
|
+
forms space with base ring ``_get_base_ring(S)``.
|
|
387
|
+
|
|
388
|
+
If not then we first merge the functor with the ConstantFormsSpaceFunctor.
|
|
389
|
+
|
|
390
|
+
EXAMPLES::
|
|
391
|
+
|
|
392
|
+
sage: from sage.modular.modform_hecketriangle.functors import (FormsSpaceFunctor, BaseFacade)
|
|
393
|
+
sage: F = FormsSpaceFunctor(["holo", "weak"], group=4, k=0, ep=-1)
|
|
394
|
+
sage: F(BaseFacade(ZZ))
|
|
395
|
+
WeakModularForms(n=4, k=0, ep=-1) over Integer Ring
|
|
396
|
+
sage: F(BaseFacade(CC))
|
|
397
|
+
WeakModularForms(n=4, k=0, ep=-1) over Complex Field with 53 bits of precision
|
|
398
|
+
sage: F(CC)
|
|
399
|
+
WeakModularFormsRing(n=4) over Complex Field with 53 bits of precision
|
|
400
|
+
sage: F(CC).has_reduce_hom()
|
|
401
|
+
True
|
|
402
|
+
"""
|
|
403
|
+
|
|
404
|
+
if (isinstance(R, BaseFacade)):
|
|
405
|
+
R = _get_base_ring(R._ring)
|
|
406
|
+
return FormsSpace(self._analytic_type, self._group, R, self._k, self._ep)
|
|
407
|
+
else:
|
|
408
|
+
R = BaseFacade(_get_base_ring(R))
|
|
409
|
+
merged_functor = self.merge(ConstantFormsSpaceFunctor(self._group))
|
|
410
|
+
return merged_functor(R)
|
|
411
|
+
|
|
412
|
+
def _repr_(self):
|
|
413
|
+
r"""
|
|
414
|
+
Return the string representation of ``self``.
|
|
415
|
+
|
|
416
|
+
EXAMPLES::
|
|
417
|
+
|
|
418
|
+
sage: from sage.modular.modform_hecketriangle.functors import FormsSpaceFunctor
|
|
419
|
+
sage: F = FormsSpaceFunctor(["cusp", "quasi"], group=5, k=10/3, ep=-1)
|
|
420
|
+
sage: str(F)
|
|
421
|
+
'QuasiCuspFormsFunctor(n=5, k=10/3, ep=-1)'
|
|
422
|
+
sage: F
|
|
423
|
+
QuasiCuspFormsFunctor(n=5, k=10/3, ep=-1)
|
|
424
|
+
"""
|
|
425
|
+
|
|
426
|
+
return "{}FormsFunctor(n={}, k={}, ep={})".format(self._analytic_type.analytic_space_name(), self._group.n(), self._k, self._ep)
|
|
427
|
+
|
|
428
|
+
def merge(self, other):
|
|
429
|
+
r"""
|
|
430
|
+
Return the merged functor of ``self`` and ``other``.
|
|
431
|
+
|
|
432
|
+
It is only possible to merge instances of ``FormsSpaceFunctor``
|
|
433
|
+
and ``FormsRingFunctor``. Also only if they share the same group.
|
|
434
|
+
An ``FormsSubSpaceFunctors`` is replaced by its ambient space functor.
|
|
435
|
+
|
|
436
|
+
The analytic type of the merged functor is the extension
|
|
437
|
+
of the two analytic types of the functors.
|
|
438
|
+
The ``red_hom`` parameter of the merged functor
|
|
439
|
+
is the logical ``and`` of the two corresponding ``red_hom``
|
|
440
|
+
parameters (where a forms space is assumed to have it
|
|
441
|
+
set to ``True``).
|
|
442
|
+
|
|
443
|
+
Two ``FormsSpaceFunctor`` with different (k,ep) are merged to a
|
|
444
|
+
corresponding ``FormsRingFunctor``. Otherwise the corresponding
|
|
445
|
+
(extended) ``FormsSpaceFunctor`` is returned.
|
|
446
|
+
|
|
447
|
+
A ``FormsSpaceFunctor`` and ``FormsRingFunctor``
|
|
448
|
+
are merged to a corresponding (extended) ``FormsRingFunctor``.
|
|
449
|
+
|
|
450
|
+
Two ``FormsRingFunctors`` are merged to the corresponding
|
|
451
|
+
(extended) ``FormsRingFunctor``.
|
|
452
|
+
|
|
453
|
+
EXAMPLES::
|
|
454
|
+
|
|
455
|
+
sage: from sage.modular.modform_hecketriangle.functors import (FormsSpaceFunctor, FormsRingFunctor)
|
|
456
|
+
sage: functor1 = FormsSpaceFunctor("holo", group=5, k=0, ep=1)
|
|
457
|
+
sage: functor2 = FormsSpaceFunctor(["quasi", "cusp"], group=5, k=10/3, ep=-1)
|
|
458
|
+
sage: functor3 = FormsSpaceFunctor(["quasi", "mero"], group=5, k=0, ep=1)
|
|
459
|
+
sage: functor4 = FormsRingFunctor("cusp", group=5, red_hom=False)
|
|
460
|
+
sage: functor5 = FormsSpaceFunctor("holo", group=4, k=0, ep=1)
|
|
461
|
+
|
|
462
|
+
sage: functor1.merge(functor1) is functor1
|
|
463
|
+
True
|
|
464
|
+
sage: functor1.merge(functor5) is None
|
|
465
|
+
True
|
|
466
|
+
sage: functor1.merge(functor2)
|
|
467
|
+
QuasiModularFormsRingFunctor(n=5, red_hom=True)
|
|
468
|
+
sage: functor1.merge(functor3)
|
|
469
|
+
QuasiMeromorphicModularFormsFunctor(n=5, k=0, ep=1)
|
|
470
|
+
sage: functor1.merge(functor4)
|
|
471
|
+
ModularFormsRingFunctor(n=5)
|
|
472
|
+
"""
|
|
473
|
+
|
|
474
|
+
if (self == other):
|
|
475
|
+
return self
|
|
476
|
+
|
|
477
|
+
if isinstance(other, FormsSubSpaceFunctor):
|
|
478
|
+
other = other._ambient_space_functor
|
|
479
|
+
|
|
480
|
+
if isinstance(other, FormsSpaceFunctor):
|
|
481
|
+
group = _common_subgroup(self._group, other._group)
|
|
482
|
+
if group is None:
|
|
483
|
+
return None
|
|
484
|
+
analytic_type = self._analytic_type + other._analytic_type
|
|
485
|
+
if (self._k == other._k) and (self._ep == other._ep):
|
|
486
|
+
return FormsSpaceFunctor(analytic_type, group, self._k, self._ep)
|
|
487
|
+
else:
|
|
488
|
+
return FormsRingFunctor(analytic_type, group, True)
|
|
489
|
+
elif isinstance(other, FormsRingFunctor):
|
|
490
|
+
group = _common_subgroup(self._group, other._group)
|
|
491
|
+
if group is None:
|
|
492
|
+
return None
|
|
493
|
+
red_hom = other._red_hom
|
|
494
|
+
analytic_type = self._analytic_type + other._analytic_type
|
|
495
|
+
return FormsRingFunctor(analytic_type, group, red_hom)
|
|
496
|
+
|
|
497
|
+
def __eq__(self, other):
|
|
498
|
+
r"""
|
|
499
|
+
Compare ``self`` and ``other``.
|
|
500
|
+
|
|
501
|
+
EXAMPLES::
|
|
502
|
+
|
|
503
|
+
sage: from sage.modular.modform_hecketriangle.functors import FormsSpaceFunctor
|
|
504
|
+
sage: functor1 = FormsSpaceFunctor("holo", group=4, k=12, ep=1)
|
|
505
|
+
sage: functor2 = FormsSpaceFunctor("holo", group=4, k=12, ep=-1)
|
|
506
|
+
sage: functor1 == functor2
|
|
507
|
+
False
|
|
508
|
+
"""
|
|
509
|
+
return (type(self) is type(other) and
|
|
510
|
+
self._group == other._group and
|
|
511
|
+
self._analytic_type == other._analytic_type and
|
|
512
|
+
self._k == other._k and
|
|
513
|
+
self._ep == other._ep)
|
|
514
|
+
|
|
515
|
+
|
|
516
|
+
class FormsRingFunctor(ConstructionFunctor):
|
|
517
|
+
r"""
|
|
518
|
+
Construction functor for forms rings.
|
|
519
|
+
|
|
520
|
+
NOTE:
|
|
521
|
+
|
|
522
|
+
When the base ring is not a ``BaseFacade`` the functor is first
|
|
523
|
+
merged with the ConstantFormsSpaceFunctor. This case occurs in
|
|
524
|
+
the pushout constructions. (when trying to find a common parent
|
|
525
|
+
between a forms ring and a ring which is not a ``BaseFacade``).
|
|
526
|
+
"""
|
|
527
|
+
|
|
528
|
+
from .analytic_type import AnalyticType
|
|
529
|
+
AT = AnalyticType()
|
|
530
|
+
|
|
531
|
+
rank = 10
|
|
532
|
+
|
|
533
|
+
def __init__(self, analytic_type, group, red_hom):
|
|
534
|
+
r"""
|
|
535
|
+
Construction functor for the forms ring
|
|
536
|
+
with the given ``analytic_type``, ``group``
|
|
537
|
+
and variable ``red_hom``
|
|
538
|
+
|
|
539
|
+
See :meth:`__call__` for a description of the functor.
|
|
540
|
+
|
|
541
|
+
INPUT:
|
|
542
|
+
|
|
543
|
+
- ``analytic_type`` -- an element of ``AnalyticType()``
|
|
544
|
+
|
|
545
|
+
- ``group`` -- the index of a Hecke Triangle group
|
|
546
|
+
|
|
547
|
+
- ``red_hom`` -- a boolean variable for the parameter ``red_hom``
|
|
548
|
+
(also see ``FormsRing_abstract``)
|
|
549
|
+
|
|
550
|
+
OUTPUT: the construction functor for the corresponding forms ring
|
|
551
|
+
|
|
552
|
+
EXAMPLES::
|
|
553
|
+
|
|
554
|
+
sage: from sage.modular.modform_hecketriangle.functors import FormsRingFunctor
|
|
555
|
+
sage: FormsRingFunctor(["quasi", "mero"], group=6, red_hom=False)
|
|
556
|
+
QuasiMeromorphicModularFormsRingFunctor(n=6)
|
|
557
|
+
sage: FormsRingFunctor(["quasi", "mero"], group=6, red_hom=True)
|
|
558
|
+
QuasiMeromorphicModularFormsRingFunctor(n=6, red_hom=True)
|
|
559
|
+
"""
|
|
560
|
+
|
|
561
|
+
Functor.__init__(self, Rings(), Rings())
|
|
562
|
+
from .graded_ring import canonical_parameters
|
|
563
|
+
(self._group, R, red_hom, n) = canonical_parameters(group, ZZ, red_hom)
|
|
564
|
+
self._red_hom = bool(red_hom)
|
|
565
|
+
self._analytic_type = self.AT(analytic_type)
|
|
566
|
+
|
|
567
|
+
def __call__(self, R):
|
|
568
|
+
r"""
|
|
569
|
+
If ``R`` is a ``BaseFacade(S)`` then return the corresponding
|
|
570
|
+
forms ring with base ring ``_get_base_ring(S)``.
|
|
571
|
+
|
|
572
|
+
If not then we first merge the functor with the ConstantFormsSpaceFunctor.
|
|
573
|
+
|
|
574
|
+
EXAMPLES::
|
|
575
|
+
|
|
576
|
+
sage: from sage.modular.modform_hecketriangle.functors import (FormsRingFunctor, BaseFacade)
|
|
577
|
+
sage: F = FormsRingFunctor(["quasi", "mero"], group=6, red_hom=False)
|
|
578
|
+
sage: F(BaseFacade(ZZ))
|
|
579
|
+
QuasiMeromorphicModularFormsRing(n=6) over Integer Ring
|
|
580
|
+
sage: F(BaseFacade(CC))
|
|
581
|
+
QuasiMeromorphicModularFormsRing(n=6) over Complex Field with 53 bits of precision
|
|
582
|
+
sage: F(CC)
|
|
583
|
+
QuasiMeromorphicModularFormsRing(n=6) over Complex Field with 53 bits of precision
|
|
584
|
+
sage: F(CC).has_reduce_hom()
|
|
585
|
+
False
|
|
586
|
+
"""
|
|
587
|
+
|
|
588
|
+
if (isinstance(R, BaseFacade)):
|
|
589
|
+
R = _get_base_ring(R._ring)
|
|
590
|
+
return FormsRing(self._analytic_type, self._group, R, self._red_hom)
|
|
591
|
+
else:
|
|
592
|
+
R = BaseFacade(_get_base_ring(R))
|
|
593
|
+
merged_functor = self.merge(ConstantFormsSpaceFunctor(self._group))
|
|
594
|
+
return merged_functor(R)
|
|
595
|
+
|
|
596
|
+
def _repr_(self):
|
|
597
|
+
r"""
|
|
598
|
+
Return the string representation of ``self``.
|
|
599
|
+
|
|
600
|
+
EXAMPLES::
|
|
601
|
+
|
|
602
|
+
sage: from sage.modular.modform_hecketriangle.functors import FormsRingFunctor
|
|
603
|
+
sage: str(FormsRingFunctor(["quasi", "mero"], group=6, red_hom=True))
|
|
604
|
+
'QuasiMeromorphicModularFormsRingFunctor(n=6, red_hom=True)'
|
|
605
|
+
sage: FormsRingFunctor(["quasi", "mero"], group=6, red_hom=False)
|
|
606
|
+
QuasiMeromorphicModularFormsRingFunctor(n=6)
|
|
607
|
+
"""
|
|
608
|
+
|
|
609
|
+
if (self._red_hom):
|
|
610
|
+
red_arg = ", red_hom=True"
|
|
611
|
+
else:
|
|
612
|
+
red_arg = ""
|
|
613
|
+
return "{}FormsRingFunctor(n={}{})".format(self._analytic_type.analytic_space_name(), self._group.n(), red_arg)
|
|
614
|
+
|
|
615
|
+
def merge(self, other):
|
|
616
|
+
r"""
|
|
617
|
+
Return the merged functor of ``self`` and ``other``.
|
|
618
|
+
|
|
619
|
+
It is only possible to merge instances of ``FormsSpaceFunctor``
|
|
620
|
+
and ``FormsRingFunctor``. Also only if they share the same group.
|
|
621
|
+
An ``FormsSubSpaceFunctors`` is replaced by its ambient space functor.
|
|
622
|
+
|
|
623
|
+
The analytic type of the merged functor is the extension
|
|
624
|
+
of the two analytic types of the functors.
|
|
625
|
+
The ``red_hom`` parameter of the merged functor
|
|
626
|
+
is the logical ``and`` of the two corresponding ``red_hom``
|
|
627
|
+
parameters (where a forms space is assumed to have it
|
|
628
|
+
set to ``True``).
|
|
629
|
+
|
|
630
|
+
Two ``FormsSpaceFunctor`` with different (k,ep) are merged to a
|
|
631
|
+
corresponding ``FormsRingFunctor``. Otherwise the corresponding
|
|
632
|
+
(extended) ``FormsSpaceFunctor`` is returned.
|
|
633
|
+
|
|
634
|
+
A ``FormsSpaceFunctor`` and ``FormsRingFunctor``
|
|
635
|
+
are merged to a corresponding (extended) ``FormsRingFunctor``.
|
|
636
|
+
|
|
637
|
+
Two ``FormsRingFunctors`` are merged to the corresponding
|
|
638
|
+
(extended) ``FormsRingFunctor``.
|
|
639
|
+
|
|
640
|
+
EXAMPLES::
|
|
641
|
+
|
|
642
|
+
sage: from sage.modular.modform_hecketriangle.functors import (FormsSpaceFunctor, FormsRingFunctor)
|
|
643
|
+
sage: functor1 = FormsRingFunctor("mero", group=6, red_hom=True)
|
|
644
|
+
sage: functor2 = FormsRingFunctor(["quasi", "cusp"], group=6, red_hom=False)
|
|
645
|
+
sage: functor3 = FormsSpaceFunctor("weak", group=6, k=0, ep=1)
|
|
646
|
+
sage: functor4 = FormsRingFunctor("mero", group=5, red_hom=True)
|
|
647
|
+
|
|
648
|
+
sage: functor1.merge(functor1) is functor1
|
|
649
|
+
True
|
|
650
|
+
sage: functor1.merge(functor4) is None
|
|
651
|
+
True
|
|
652
|
+
sage: functor1.merge(functor2)
|
|
653
|
+
QuasiMeromorphicModularFormsRingFunctor(n=6)
|
|
654
|
+
sage: functor1.merge(functor3)
|
|
655
|
+
MeromorphicModularFormsRingFunctor(n=6, red_hom=True)
|
|
656
|
+
"""
|
|
657
|
+
|
|
658
|
+
if (self == other):
|
|
659
|
+
return self
|
|
660
|
+
|
|
661
|
+
if isinstance(other, FormsSubSpaceFunctor):
|
|
662
|
+
other = other._ambient_space_functor
|
|
663
|
+
|
|
664
|
+
if isinstance(other, FormsSpaceFunctor):
|
|
665
|
+
group = _common_subgroup(self._group, other._group)
|
|
666
|
+
if group is None:
|
|
667
|
+
return None
|
|
668
|
+
red_hom = self._red_hom
|
|
669
|
+
analytic_type = self._analytic_type + other._analytic_type
|
|
670
|
+
return FormsRingFunctor(analytic_type, group, red_hom)
|
|
671
|
+
elif isinstance(other, FormsRingFunctor):
|
|
672
|
+
group = _common_subgroup(self._group, other._group)
|
|
673
|
+
if group is None:
|
|
674
|
+
return None
|
|
675
|
+
red_hom = self._red_hom & other._red_hom
|
|
676
|
+
analytic_type = self._analytic_type + other._analytic_type
|
|
677
|
+
return FormsRingFunctor(analytic_type, group, red_hom)
|
|
678
|
+
|
|
679
|
+
def __eq__(self, other):
|
|
680
|
+
r"""
|
|
681
|
+
Compare ``self`` and ``other``.
|
|
682
|
+
|
|
683
|
+
EXAMPLES::
|
|
684
|
+
|
|
685
|
+
sage: from sage.modular.modform_hecketriangle.functors import FormsRingFunctor
|
|
686
|
+
sage: functor1 = FormsRingFunctor("holo", group=4, red_hom=True)
|
|
687
|
+
sage: functor2 = FormsRingFunctor("holo", group=4, red_hom=False)
|
|
688
|
+
sage: functor1 == functor2
|
|
689
|
+
False
|
|
690
|
+
"""
|
|
691
|
+
return (type(self) is type(other) and
|
|
692
|
+
self._group == other._group and
|
|
693
|
+
self._analytic_type == other._analytic_type and
|
|
694
|
+
self._red_hom == other._red_hom)
|
|
695
|
+
|
|
696
|
+
|
|
697
|
+
class BaseFacade(Parent, UniqueRepresentation):
|
|
698
|
+
r"""
|
|
699
|
+
BaseFacade of a ring.
|
|
700
|
+
|
|
701
|
+
This class is used to distinguish the construction of
|
|
702
|
+
constant elements (modular forms of weight 0) over the given ring
|
|
703
|
+
and the construction of ``FormsRing`` or ``FormsSpace``
|
|
704
|
+
based on the BaseFacade of the given ring.
|
|
705
|
+
|
|
706
|
+
If that distinction was not made then ring elements
|
|
707
|
+
couldn't be considered as constant modular forms
|
|
708
|
+
in e.g. binary operations. Instead the coercion model would
|
|
709
|
+
assume that the ring element lies in the common parent
|
|
710
|
+
of the ring element and e.g. a ``FormsSpace`` which
|
|
711
|
+
would give the ``FormsSpace`` over the ring. However
|
|
712
|
+
this is not correct, the ``FormsSpace`` might
|
|
713
|
+
(and probably will) not even contain the (constant)
|
|
714
|
+
ring element. Hence we use the ``BaseFacade`` to
|
|
715
|
+
distinguish the two cases.
|
|
716
|
+
|
|
717
|
+
Since the ``BaseFacade`` of a ring embeds into that ring,
|
|
718
|
+
a common base (resp. a coercion) between the two (or even a
|
|
719
|
+
more general ring) can be found, namely the ring
|
|
720
|
+
(not the ``BaseFacade`` of it).
|
|
721
|
+
"""
|
|
722
|
+
|
|
723
|
+
def __init__(self, ring):
|
|
724
|
+
r"""
|
|
725
|
+
BaseFacade of ``ring`` (see above).
|
|
726
|
+
|
|
727
|
+
EXAMPLES::
|
|
728
|
+
|
|
729
|
+
sage: from sage.modular.modform_hecketriangle.functors import BaseFacade
|
|
730
|
+
sage: BaseFacade(ZZ)
|
|
731
|
+
BaseFacade(Integer Ring)
|
|
732
|
+
sage: ZZ.has_coerce_map_from(BaseFacade(ZZ))
|
|
733
|
+
True
|
|
734
|
+
sage: CC.has_coerce_map_from(BaseFacade(ZZ))
|
|
735
|
+
True
|
|
736
|
+
"""
|
|
737
|
+
Parent.__init__(self, facade=ring, category=Rings())
|
|
738
|
+
self._ring = _get_base_ring(ring)
|
|
739
|
+
# The BaseFacade(R) coerces/embeds into R, used in pushout
|
|
740
|
+
self.register_embedding(self.Hom(self._ring, Sets())(lambda x: x))
|
|
741
|
+
|
|
742
|
+
def __repr__(self):
|
|
743
|
+
r"""
|
|
744
|
+
Return the string representation of ``self``.
|
|
745
|
+
|
|
746
|
+
EXAMPLES::
|
|
747
|
+
|
|
748
|
+
sage: from sage.modular.modform_hecketriangle.functors import BaseFacade
|
|
749
|
+
sage: BaseFacade(ZZ)
|
|
750
|
+
BaseFacade(Integer Ring)
|
|
751
|
+
"""
|
|
752
|
+
return "BaseFacade({})".format(self._ring)
|