diff --git a/pkgs/sagemath-categories/known-test-failures.json b/pkgs/sagemath-categories/known-test-failures.json index 80705635b7e..b421afca14f 100644 --- a/pkgs/sagemath-categories/known-test-failures.json +++ b/pkgs/sagemath-categories/known-test-failures.json @@ -38,7 +38,7 @@ }, "sage.categories.algebras": { "failed": true, - "ntests": 25 + "ntests": 20 }, "sage.categories.algebras_with_basis": { "failed": true, @@ -126,7 +126,7 @@ }, "sage.categories.commutative_rings": { "failed": true, - "ntests": 41 + "ntests": 39 }, "sage.categories.complete_discrete_valuation": { "failed": true, @@ -148,19 +148,15 @@ }, "sage.categories.coxeter_groups": { "failed": true, - "ntests": 392 + "ntests": 363 }, "sage.categories.cw_complexes": { "failed": true, "ntests": 36 }, - "sage.categories.dedekind_domains": { - "failed": true, - "ntests": 30 - }, "sage.categories.discrete_valuation": { "failed": true, - "ntests": 28 + "ntests": 23 }, "sage.categories.distributive_magmas_and_additive_magmas": { "failed": true, @@ -173,6 +169,9 @@ "failed": true, "ntests": 7 }, + "sage.categories.drinfeld_modules": { + "ntests": 2 + }, "sage.categories.dual": { "failed": true, "ntests": 1 @@ -298,18 +297,18 @@ }, "sage.categories.filtered_modules_with_basis": { "failed": true, - "ntests": 74 + "ntests": 65 }, "sage.categories.finite_complex_reflection_groups": { "failed": true, - "ntests": 189 + "ntests": 199 }, "sage.categories.finite_coxeter_groups": { "ntests": 6 }, "sage.categories.finite_dimensional_algebras_with_basis": { "failed": true, - "ntests": 91 + "ntests": 87 }, "sage.categories.finite_dimensional_bialgebras_with_basis": { "failed": true, @@ -329,11 +328,11 @@ }, "sage.categories.finite_dimensional_lie_algebras_with_basis": { "failed": true, - "ntests": 73 + "ntests": 34 }, "sage.categories.finite_dimensional_modules_with_basis": { "failed": true, - "ntests": 89 + "ntests": 55 }, "sage.categories.finite_dimensional_nilpotent_lie_algebras_with_basis": { "failed": true, @@ -527,7 +526,7 @@ }, "sage.categories.lie_algebras": { "failed": true, - "ntests": 135 + "ntests": 125 }, "sage.categories.lie_algebras_with_basis": { "ntests": 19 @@ -583,7 +582,7 @@ }, "sage.categories.modules_with_basis": { "failed": true, - "ntests": 240 + "ntests": 221 }, "sage.categories.monoid_algebras": { "failed": true, @@ -595,7 +594,7 @@ }, "sage.categories.morphism": { "failed": true, - "ntests": 126 + "ntests": 99 }, "sage.categories.noetherian_rings": { "failed": true, @@ -669,14 +668,14 @@ }, "sage.categories.rings": { "failed": true, - "ntests": 146 + "ntests": 141 }, "sage.categories.rngs": { "ntests": 6 }, "sage.categories.schemes": { "failed": true, - "ntests": 41 + "ntests": 23 }, "sage.categories.semigroups": { "failed": true, @@ -712,7 +711,7 @@ }, "sage.categories.simplicial_sets": { "failed": true, - "ntests": 98 + "ntests": 57 }, "sage.categories.subobjects": { "ntests": 2 @@ -766,7 +765,7 @@ }, "sage.categories.unital_algebras": { "failed": true, - "ntests": 37 + "ntests": 39 }, "sage.categories.vector_spaces": { "failed": true, @@ -809,28 +808,29 @@ }, "sage.doctest.control": { "failed": true, - "ntests": 230 + "ntests": 0 }, "sage.doctest.external": { "ntests": 42 }, "sage.doctest.fixtures": { + "failed": true, "ntests": 59 }, "sage.doctest.forker": { "failed": true, - "ntests": 413 + "ntests": 433 }, "sage.doctest.parsing": { "failed": true, - "ntests": 313 + "ntests": 321 }, "sage.doctest.reporting": { - "ntests": 115 + "ntests": 124 }, "sage.doctest.sources": { "failed": true, - "ntests": 343 + "ntests": 378 }, "sage.doctest.test": { "failed": true, @@ -845,7 +845,7 @@ "ntests": 41 }, "sage.features": { - "ntests": 143 + "ntests": 145 }, "sage.features.all": { "ntests": 14 @@ -864,23 +864,17 @@ }, "sage.features.databases": { "failed": true, - "ntests": 38 + "ntests": 26 }, "sage.features.dvipng": { "ntests": 4 }, - "sage.features.ecm": { - "ntests": 4 - }, "sage.features.ffmpeg": { "ntests": 4 }, "sage.features.four_ti_2": { "ntests": 6 }, - "sage.features.fricas": { - "ntests": 6 - }, "sage.features.gap": { "ntests": 6 }, @@ -906,11 +900,7 @@ "sage.features.internet": { "ntests": 5 }, - "sage.features.jmol": { - "ntests": 4 - }, "sage.features.join_feature": { - "failed": true, "ntests": 25 }, "sage.features.kenzo": { @@ -969,7 +959,7 @@ }, "sage.features.sagemath": { "failed": true, - "ntests": 151 + "ntests": 147 }, "sage.features.singular": { "ntests": 4 @@ -977,16 +967,9 @@ "sage.features.sphinx": { "ntests": 4 }, - "sage.features.symengine_py": { - "ntests": 4 - }, "sage.features.tdlib": { "ntests": 2 }, - "sage.features.threejs": { - "failed": true, - "ntests": 6 - }, "sage.misc.abstract_method": { "failed": true, "ntests": 33 @@ -1017,7 +1000,7 @@ }, "sage.misc.decorators": { "failed": true, - "ntests": 125 + "ntests": 126 }, "sage.misc.fast_methods": { "failed": true, @@ -1075,7 +1058,7 @@ }, "sage.misc.package_dir": { "failed": true, - "ntests": 35 + "ntests": 29 }, "sage.misc.persist": { "failed": true, @@ -1107,7 +1090,7 @@ }, "sage.misc.sageinspect": { "failed": true, - "ntests": 322 + "ntests": 332 }, "sage.misc.superseded": { "failed": true, @@ -1140,6 +1123,7 @@ "ntests": 128 }, "sage.repl.configuration": { + "failed": true, "ntests": 22 }, "sage.repl.display.fancy_repr": { @@ -1165,6 +1149,7 @@ "ntests": 42 }, "sage.repl.inputhook": { + "failed": true, "ntests": 7 }, "sage.repl.interface_magic": { @@ -1181,14 +1166,13 @@ }, "sage.repl.ipython_kernel.install": { "failed": true, - "ntests": 35 + "ntests": 40 }, "sage.repl.ipython_kernel.interact": { "failed": true, "ntests": 42 }, "sage.repl.ipython_kernel.kernel": { - "failed": true, "ntests": 12 }, "sage.repl.ipython_kernel.widgets": { @@ -1223,7 +1207,7 @@ }, "sage.repl.rich_output.backend_ipython": { "failed": true, - "ntests": 75 + "ntests": 78 }, "sage.repl.rich_output.buffer": { "failed": true, @@ -1231,7 +1215,7 @@ }, "sage.repl.rich_output.display_manager": { "failed": true, - "ntests": 86 + "ntests": 88 }, "sage.repl.rich_output.output_basic": { "ntests": 47 @@ -1268,7 +1252,7 @@ }, "sage.rings.ring": { "failed": true, - "ntests": 298 + "ntests": 337 }, "sage.sets.pythonclass": { "failed": true, @@ -1280,7 +1264,7 @@ }, "sage.structure.coerce": { "failed": true, - "ntests": 310 + "ntests": 314 }, "sage.structure.coerce_actions": { "failed": true, @@ -1315,7 +1299,7 @@ }, "sage.structure.factorization": { "failed": true, - "ntests": 200 + "ntests": 203 }, "sage.structure.factorization_integer": { "failed": true, @@ -1359,7 +1343,7 @@ }, "sage.structure.parent": { "failed": true, - "ntests": 303 + "ntests": 300 }, "sage.structure.parent_gens": { "failed": true, diff --git a/src/sage/algebras/all.py b/src/sage/algebras/all.py index 0e995a677ec..ebeec786100 100644 --- a/src/sage/algebras/all.py +++ b/src/sage/algebras/all.py @@ -14,56 +14,12 @@ # The full text of the GPL is available at: # # https://www.gnu.org/licenses/ -# **************************************************************************** -from sage.misc.lazy_import import lazy_import - -# old-style class for associative algebras, use Parent instead -from sage.rings.ring import Algebra +# ***************************************************************************** -import sage.algebras.catalog as algebras +from sage.algebras.all__sagemath_modules import * +from sage.algebras.all__sagemath_combinat import * from sage.algebras.quatalg.all import * -from sage.algebras.steenrod.all import * from sage.algebras.fusion_rings.all import * from sage.algebras.lie_algebras.all import * -from sage.algebras.quantum_groups.all import * from sage.algebras.lie_conformal_algebras.all import * - -# Algebra base classes -from sage.algebras.free_algebra import FreeAlgebra -from sage.algebras.free_algebra_quotient import FreeAlgebraQuotient - -from sage.algebras.finite_dimensional_algebras.all import FiniteDimensionalAlgebra - -lazy_import('sage.algebras.group_algebra', 'GroupAlgebra') - -lazy_import('sage.algebras.iwahori_hecke_algebra', 'IwahoriHeckeAlgebra') -lazy_import('sage.algebras.affine_nil_temperley_lieb', - 'AffineNilTemperleyLiebTypeA') -lazy_import('sage.algebras.nil_coxeter_algebra', 'NilCoxeterAlgebra') -lazy_import('sage.algebras.schur_algebra', ['SchurAlgebra', - 'SchurTensorModule']) - -lazy_import('sage.algebras.hall_algebra', 'HallAlgebra') - -lazy_import('sage.algebras.jordan_algebra', 'JordanAlgebra') - -lazy_import('sage.algebras.octonion_algebra', 'OctonionAlgebra') - -lazy_import('sage.algebras.shuffle_algebra', 'ShuffleAlgebra') - -from sage.algebras.clifford_algebra import CliffordAlgebra, ExteriorAlgebra -from sage.algebras.weyl_algebra import DifferentialWeylAlgebra - -lazy_import('sage.algebras.commutative_dga', 'GradedCommutativeAlgebra') - -lazy_import('sage.algebras.rational_cherednik_algebra', - 'RationalCherednikAlgebra') - -lazy_import('sage.algebras.tensor_algebra', 'TensorAlgebra') - -lazy_import('sage.algebras.q_system', 'QSystem') - -lazy_import('sage.algebras.cluster_algebra', 'ClusterAlgebra') - -lazy_import('sage.algebras.yangian', 'Yangian') diff --git a/src/sage/algebras/all__sagemath_combinat.py b/src/sage/algebras/all__sagemath_combinat.py new file mode 100644 index 00000000000..eb86573ec54 --- /dev/null +++ b/src/sage/algebras/all__sagemath_combinat.py @@ -0,0 +1,37 @@ +from sage.misc.lazy_import import lazy_import + + +# Algebra base classes +from sage.algebras.free_algebra import FreeAlgebra +from sage.algebras.free_algebra_quotient import FreeAlgebraQuotient + +from sage.algebras.steenrod.all import * +from sage.algebras.quantum_groups.all import * + +lazy_import('sage.algebras.iwahori_hecke_algebra', 'IwahoriHeckeAlgebra') +lazy_import('sage.algebras.affine_nil_temperley_lieb', + 'AffineNilTemperleyLiebTypeA') +lazy_import('sage.algebras.nil_coxeter_algebra', 'NilCoxeterAlgebra') +lazy_import('sage.algebras.schur_algebra', ['SchurAlgebra', + 'SchurTensorModule']) + +lazy_import('sage.algebras.hall_algebra', 'HallAlgebra') + +lazy_import('sage.algebras.jordan_algebra', 'JordanAlgebra') + +lazy_import('sage.algebras.shuffle_algebra', 'ShuffleAlgebra') + +lazy_import('sage.algebras.commutative_dga', 'GradedCommutativeAlgebra') + +lazy_import('sage.algebras.rational_cherednik_algebra', + 'RationalCherednikAlgebra') + +lazy_import('sage.algebras.tensor_algebra', 'TensorAlgebra') + +lazy_import('sage.algebras.q_system', 'QSystem') + +lazy_import('sage.algebras.cluster_algebra', 'ClusterAlgebra') + +lazy_import('sage.algebras.yangian', 'Yangian') + +del lazy_import diff --git a/src/sage/algebras/all__sagemath_modules.py b/src/sage/algebras/all__sagemath_modules.py new file mode 100644 index 00000000000..fc74dabe241 --- /dev/null +++ b/src/sage/algebras/all__sagemath_modules.py @@ -0,0 +1,14 @@ +from sage.misc.lazy_import import lazy_import + +lazy_import('sage.algebras.group_algebra', 'GroupAlgebra') + +# old-style class for associative algebras, use Parent instead +from sage.rings.ring import Algebra + +from sage.algebras.finite_dimensional_algebras.all import FiniteDimensionalAlgebra +from sage.algebras.clifford_algebra import CliffordAlgebra, ExteriorAlgebra +from sage.algebras.weyl_algebra import DifferentialWeylAlgebra +lazy_import('sage.algebras.octonion_algebra', 'OctonionAlgebra') + +import sage.algebras.catalog as algebras +del lazy_import diff --git a/src/sage/algebras/all__sagemath_singular.py b/src/sage/algebras/all__sagemath_singular.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/algebras/lie_algebras/all__sagemath_modules.py b/src/sage/algebras/lie_algebras/all__sagemath_modules.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/all.py b/src/sage/all.py index 916e80eef0d..a71e45797e0 100644 --- a/src/sage/all.py +++ b/src/sage/all.py @@ -57,97 +57,94 @@ import operator import math -################ end setup warnings ############################### - -from sage.all__sagemath_repl import * # includes .all__sagemath_objects, .all__sagemath_environment - -################################################################### +# includes .all__sagemath_objects, .all__sagemath_environment +from sage.all__sagemath_repl import * # This import also sets up the interrupt handler from cysignals.signals import (AlarmInterrupt, SignalError, - sig_on_reset as sig_on_count) + sig_on_reset as sig_on_count) -from time import sleep +from time import sleep from functools import reduce # in order to keep reduce in python3 import sage.misc.lazy_import -from sage.misc.all import * # takes a while -from sage.typeset.all import * +from sage.misc.all import * # takes a while +from sage.typeset.all import * from sage.misc.sh import sh -from sage.libs.all import * +from sage.libs.all import * from sage.data_structures.all import * -from sage.structure.all import * -from sage.rings.all import * -from sage.arith.all import * -from sage.matrix.all import * - -from sage.symbolic.all import * -from sage.modules.all import * -from sage.monoids.all import * -from sage.algebras.all import * -from sage.modular.all import * -from sage.sat.all import * -from sage.schemes.all import * -from sage.graphs.all import * -from sage.groups.all import * -from sage.arith.power import generic_power as power -from sage.databases.all import * +from sage.structure.all import * +from sage.rings.all import * +from sage.arith.all import * +from sage.matrix.all import * + +from sage.symbolic.all import * +from sage.modules.all import * +from sage.monoids.all import * +from sage.algebras.all import * +from sage.modular.all import * +from sage.sat.all import * +from sage.schemes.all import * +from sage.graphs.all import * +from sage.groups.all import * +from sage.arith.power import generic_power as power +from sage.databases.all import * from sage.categories.all import * -from sage.sets.all import * +from sage.sets.all import * from sage.probability.all import * from sage.interfaces.all import * -from sage.functions.all import * -from sage.calculus.all import * +from sage.functions.all import * +from sage.calculus.all import * -from sage.cpython.all import * +from sage.cpython.all import * -from sage.crypto.all import * +from sage.crypto.all import * import sage.crypto.mq as mq -from sage.plot.all import * -from sage.plot.plot3d.all import * +from sage.plot.all import * +from sage.plot.plot3d.all import * -from sage.coding.all import * -from sage.combinat.all import * +from sage.coding.all import * +from sage.combinat.all import * from sage.lfunctions.all import * -from sage.geometry.all import * -from sage.geometry.triangulation.all import * -from sage.geometry.riemannian_manifolds.all import * +from sage.geometry.all import * +from sage.geometry.triangulation.all import * +from sage.geometry.riemannian_manifolds.all import * -from sage.dynamics.all import * +from sage.dynamics.all import * -from sage.homology.all import * +from sage.homology.all import * -from sage.topology.all import * +from sage.topology.all import * from sage.quadratic_forms.all import * -from sage.games.all import * +from sage.games.all import * -from sage.logic.all import * +from sage.logic.all import * -from sage.numerical.all import * +from sage.numerical.all import * -from sage.stats.all import * +from sage.stats.all import * import sage.stats.all as stats -from sage.parallel.all import * +from sage.parallel.all import * -from sage.ext.fast_callable import fast_callable -from sage.ext.fast_eval import fast_float +from sage.ext.fast_callable import fast_callable +from sage.ext.fast_eval import fast_float from sage.sandpiles.all import * -from sage.tensor.all import * +from sage.tensor.all import * -from sage.matroids.all import * +from sage.matroids.all import * from sage.game_theory.all import * @@ -167,7 +164,7 @@ _init_qqbar() ########################################################### -#### WARNING: +# WARNING: # DO *not* import numpy / matplotlib / networkx here!! # Each takes a surprisingly long time to initialize, # and that initialization should be done more on-the-fly @@ -191,20 +188,24 @@ from sage.misc.persist import register_unpickle_override register_unpickle_override('sage.categories.category', 'Sets', Sets) -register_unpickle_override('sage.categories.category_types', 'HeckeModules', HeckeModules) +register_unpickle_override('sage.categories.category_types', + 'HeckeModules', HeckeModules) register_unpickle_override('sage.categories.category_types', 'Objects', Objects) register_unpickle_override('sage.categories.category_types', 'Rings', Rings) register_unpickle_override('sage.categories.category_types', 'Fields', Fields) -register_unpickle_override('sage.categories.category_types', 'VectorSpaces', VectorSpaces) -register_unpickle_override('sage.categories.category_types', 'Schemes_over_base', sage.categories.schemes.Schemes_over_base) -register_unpickle_override('sage.categories.category_types', 'ModularAbelianVarieties', ModularAbelianVarieties) +register_unpickle_override('sage.categories.category_types', + 'VectorSpaces', VectorSpaces) +register_unpickle_override('sage.categories.category_types', + 'Schemes_over_base', sage.categories.schemes.Schemes_over_base) +register_unpickle_override('sage.categories.category_types', + 'ModularAbelianVarieties', ModularAbelianVarieties) register_unpickle_override('sage.libs.pari.gen_py', 'pari', pari) # Cache the contents of star imports. sage.misc.lazy_import.save_cache_file() -### Debugging for Singular, see trac #10903 +# Debugging for Singular, see trac #10903 # from sage.libs.singular.ring import poison_currRing # sys.settrace(poison_currRing) @@ -226,7 +227,7 @@ sage.misc.lazy_import.finish_startup() -### Python broke large ints; see trac #34506 +# Python broke large ints; see trac #34506 if hasattr(sys, "set_int_max_str_digits"): sys.set_int_max_str_digits(0) diff --git a/src/sage/arith/all__sagemath_objects.py b/src/sage/arith/all__sagemath_objects.py index 40da49fdd73..31d80d17daa 100644 --- a/src/sage/arith/all__sagemath_objects.py +++ b/src/sage/arith/all__sagemath_objects.py @@ -1,3 +1,5 @@ # sage_setup: distribution = sagemath-objects # The presence of this file ensures that sage_setup for sagemath-objects # considers this directory as a namespace package + +from sage.arith.power import generic_power as power diff --git a/src/sage/calculus/all.py b/src/sage/calculus/all.py index fc7f54a6758..e9e26918527 100644 --- a/src/sage/calculus/all.py +++ b/src/sage/calculus/all.py @@ -1,34 +1,13 @@ +from sage.calculus.all__sagemath_modules import * -from .calculus import maxima as maxima_calculus -from .calculus import (laplace, inverse_laplace, - limit, lim) - -from .integration import numerical_integral, monte_carlo_integral -integral_numerical = numerical_integral - -from .interpolation import spline, Spline - -from .functional import (diff, derivative, - expand, - taylor, simplify) - -from .functions import (wronskian, jacobian) - -from .ode import ode_solver, ode_system - -from .desolvers import (desolve, desolve_laplace, desolve_system, - eulers_method, eulers_method_2x2, - eulers_method_2x2_plot, desolve_rk4, desolve_system_rk4, - desolve_odeint, desolve_mintides, desolve_tides_mpfr) +from sage.calculus import desolvers +from sage.calculus.calculus import maxima as maxima_calculus +from sage.calculus.calculus import (laplace, inverse_laplace, + limit, lim) +from sage.calculus.desolvers import (desolve, desolve_laplace, desolve_system, + eulers_method, eulers_method_2x2, + eulers_method_2x2_plot, desolve_rk4, desolve_system_rk4, + desolve_odeint, desolve_mintides, desolve_tides_mpfr) from sage.calculus.expr import symbolic_expression from sage.calculus.var import (var, function, clear_vars) - -from .transforms.all import * - -# We lazy_import the following modules since they import numpy which slows down sage startup -from sage.misc.lazy_import import lazy_import -lazy_import("sage.calculus.riemann", ["Riemann_Map"]) -lazy_import("sage.calculus.interpolators", ["polygon_spline", "complex_cubic_spline"]) - -from . import desolvers diff --git a/src/sage/calculus/all__sagemath_categories.py b/src/sage/calculus/all__sagemath_categories.py new file mode 100644 index 00000000000..cf9a7fbd0b2 --- /dev/null +++ b/src/sage/calculus/all__sagemath_categories.py @@ -0,0 +1 @@ +from sage.calculus.functional import diff, derivative, expand, simplify, taylor diff --git a/src/sage/calculus/all__sagemath_modules.py b/src/sage/calculus/all__sagemath_modules.py new file mode 100644 index 00000000000..f12d63a3b7f --- /dev/null +++ b/src/sage/calculus/all__sagemath_modules.py @@ -0,0 +1,18 @@ +from sage.calculus.all__sagemath_categories import * + +from sage.calculus.integration import numerical_integral, monte_carlo_integral +integral_numerical = numerical_integral + +from sage.calculus.interpolation import spline, Spline + +from sage.calculus.functions import wronskian, jacobian + +from sage.calculus.ode import ode_solver, ode_system + +# We lazy_import the following modules since they import numpy which slows down sage startup +from sage.misc.lazy_import import lazy_import +lazy_import("sage.calculus.riemann", ["Riemann_Map"]) +lazy_import("sage.calculus.interpolators", ["polygon_spline", "complex_cubic_spline"]) + +from sage.calculus.transforms.all import * +del lazy_import diff --git a/src/sage/categories/weyl_groups.py b/src/sage/categories/weyl_groups.py index a6578c4ec6a..aa2d4cd6f11 100644 --- a/src/sage/categories/weyl_groups.py +++ b/src/sage/categories/weyl_groups.py @@ -572,9 +572,10 @@ def stanley_symmetric_function(self): - [Pon2010]_ """ - import sage.combinat.sf from sage.rings.rational_field import QQ - m = sage.combinat.sf.sf.SymmetricFunctions(QQ).monomial() + from sage.combinat.sf.sf import SymmetricFunctions + + m = SymmetricFunctions(QQ).monomial() return m.from_polynomial_exp(self.stanley_symmetric_function_as_polynomial()) @cached_in_parent_method diff --git a/src/sage/coding/all__sagemath_gap.py b/src/sage/coding/all__sagemath_gap.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/coding/codecan/all__sagemath_gap.py b/src/sage/coding/codecan/all__sagemath_gap.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/combinat/all.py b/src/sage/combinat/all.py index c55f8e01c48..1a18345a404 100644 --- a/src/sage/combinat/all.py +++ b/src/sage/combinat/all.py @@ -55,243 +55,9 @@ from sage.misc.lazy_import import lazy_import -from sage.combinat.combinat import (CombinatorialObject, - bell_number, bell_polynomial, bernoulli_polynomial, - catalan_number, euler_number, - fibonacci, fibonacci_sequence, fibonacci_xrange, - lucas_number1, lucas_number2, - number_of_tuples, number_of_unordered_tuples, - polygonal_number, stirling_number1, stirling_number2, - tuples, unordered_tuples) - -from sage.combinat.expnums import expnums - -from sage.combinat.chas.all import * -from sage.combinat.crystals.all import * -from sage.combinat.rigged_configurations.all import * - -from sage.combinat.dlx import DLXMatrix, AllExactCovers, OneExactCover - -# block designs, etc -from sage.combinat.designs.all import * - -# Free modules and friends -from sage.combinat.free_module import CombinatorialFreeModule -from sage.combinat.debruijn_sequence import DeBruijnSequences - -from sage.combinat.schubert_polynomial import SchubertPolynomialRing -lazy_import('sage.combinat.key_polynomial', 'KeyPolynomialBasis', as_='KeyPolynomials') -from sage.combinat.symmetric_group_algebra import SymmetricGroupAlgebra, HeckeAlgebraSymmetricGroupT -from sage.combinat.symmetric_group_representations import SymmetricGroupRepresentation, SymmetricGroupRepresentations -from sage.combinat.yang_baxter_graph import YangBaxterGraph - -# Permutations -from sage.combinat.permutation import Permutation, Permutations, Arrangements, CyclicPermutations, CyclicPermutationsOfPartition -from sage.combinat.affine_permutation import AffinePermutationGroup -lazy_import('sage.combinat.colored_permutations', ['ColoredPermutations', - 'SignedPermutation', - 'SignedPermutations']) -from sage.combinat.derangements import Derangements -lazy_import('sage.combinat.baxter_permutations', ['BaxterPermutations']) - -# RSK -from sage.combinat.rsk import RSK, RSK_inverse, robinson_schensted_knuth, robinson_schensted_knuth_inverse, InsertionRules - -# HillmanGrassl -lazy_import("sage.combinat.hillman_grassl", ["WeakReversePlanePartition", "WeakReversePlanePartitions"]) - -# PerfectMatchings -from sage.combinat.perfect_matching import PerfectMatching, PerfectMatchings - -# Integer lists -from sage.combinat.integer_lists import IntegerListsLex - -# Compositions -from sage.combinat.composition import Composition, Compositions -from sage.combinat.composition_signed import SignedCompositions - -# Partitions -from sage.combinat.partition import (Partition, Partitions, PartitionsInBox, - OrderedPartitions, PartitionsGreatestLE, - PartitionsGreatestEQ, number_of_partitions) - -lazy_import('sage.combinat.partition_tuple', ['PartitionTuple', 'PartitionTuples']) -lazy_import('sage.combinat.partition_kleshchev', ['KleshchevPartitions']) -lazy_import('sage.combinat.skew_partition', ['SkewPartition', 'SkewPartitions']) - -# Partition algebra -from sage.combinat.partition_algebra import SetPartitionsAk, SetPartitionsPk, SetPartitionsTk, SetPartitionsIk, SetPartitionsBk, SetPartitionsSk, SetPartitionsRk, SetPartitionsPRk - -# Raising operators -lazy_import('sage.combinat.partition_shifting_algebras', 'ShiftingOperatorAlgebra') - -# Diagram algebra -from sage.combinat.diagram_algebras import PartitionAlgebra, BrauerAlgebra, TemperleyLiebAlgebra, PlanarAlgebra, PropagatingIdeal - -# Descent algebra -lazy_import('sage.combinat.descent_algebra', 'DescentAlgebra') - -# Vector Partitions -lazy_import('sage.combinat.vector_partition', - ['VectorPartition', 'VectorPartitions']) - -# Similarity class types -from sage.combinat.similarity_class_type import PrimarySimilarityClassType, PrimarySimilarityClassTypes, SimilarityClassType, SimilarityClassTypes - -# Cores -from sage.combinat.core import Core, Cores - -# Tableaux -lazy_import('sage.combinat.tableau', - ["Tableau", "SemistandardTableau", "StandardTableau", "RowStandardTableau", "IncreasingTableau", - "Tableaux", "SemistandardTableaux", "StandardTableaux", "RowStandardTableaux", "IncreasingTableaux"]) -from sage.combinat.skew_tableau import SkewTableau, SkewTableaux, StandardSkewTableaux, SemistandardSkewTableaux -from sage.combinat.ribbon_shaped_tableau import RibbonShapedTableau, RibbonShapedTableaux, StandardRibbonShapedTableaux -from sage.combinat.ribbon_tableau import RibbonTableaux, RibbonTableau, MultiSkewTableaux, MultiSkewTableau, SemistandardMultiSkewTableaux -from sage.combinat.composition_tableau import CompositionTableau, CompositionTableaux - -lazy_import('sage.combinat.tableau_tuple', - ['TableauTuple', 'StandardTableauTuple', 'RowStandardTableauTuple', - 'TableauTuples', 'StandardTableauTuples', 'RowStandardTableauTuples']) -from sage.combinat.k_tableau import WeakTableau, WeakTableaux, StrongTableau, StrongTableaux -lazy_import('sage.combinat.lr_tableau', ['LittlewoodRichardsonTableau', - 'LittlewoodRichardsonTableaux']) -lazy_import('sage.combinat.shifted_primed_tableau', ['ShiftedPrimedTableaux', - 'ShiftedPrimedTableau']) - -# SuperTableaux -lazy_import('sage.combinat.super_tableau', - ["StandardSuperTableau", "SemistandardSuperTableau", "StandardSuperTableaux", "SemistandardSuperTableaux"]) - -# Words -from sage.combinat.words.all import * - -lazy_import('sage.combinat.subword', 'Subwords') - -from sage.combinat.graph_path import GraphPaths - -# Tuples -from sage.combinat.tuple import Tuples, UnorderedTuples - -# Alternating sign matrices -lazy_import('sage.combinat.alternating_sign_matrix', ('AlternatingSignMatrix', - 'AlternatingSignMatrices', - 'MonotoneTriangles', - 'ContreTableaux', - 'TruncatedStaircases')) - -# Decorated Permutations -lazy_import('sage.combinat.decorated_permutation', ('DecoratedPermutation', - 'DecoratedPermutations')) - -# Plane Partitions -lazy_import('sage.combinat.plane_partition', ('PlanePartition', - 'PlanePartitions')) - -# Parking Functions -lazy_import('sage.combinat.non_decreasing_parking_function', - ['NonDecreasingParkingFunctions', 'NonDecreasingParkingFunction']) -lazy_import('sage.combinat.parking_functions', - ['ParkingFunctions', 'ParkingFunction']) - -# Trees and Tamari interval posets -from sage.combinat.ordered_tree import (OrderedTree, OrderedTrees, - LabelledOrderedTree, LabelledOrderedTrees) -from sage.combinat.binary_tree import (BinaryTree, BinaryTrees, - LabelledBinaryTree, LabelledBinaryTrees) -lazy_import('sage.combinat.interval_posets', ['TamariIntervalPoset', 'TamariIntervalPosets']) -lazy_import('sage.combinat.rooted_tree', ('RootedTree', 'RootedTrees', - 'LabelledRootedTree', 'LabelledRootedTrees')) - -from sage.combinat.combination import Combinations - -from sage.combinat.set_partition import SetPartition, SetPartitions -from sage.combinat.set_partition_ordered import OrderedSetPartition, OrderedSetPartitions -lazy_import('sage.combinat.multiset_partition_into_sets_ordered', - ['OrderedMultisetPartitionIntoSets', - 'OrderedMultisetPartitionsIntoSets']) -from sage.combinat.subset import Subsets, subsets, powerset, uniq -from sage.combinat.necklace import Necklaces -lazy_import('sage.combinat.dyck_word', ('DyckWords', 'DyckWord')) -lazy_import('sage.combinat.nu_dyck_word', ('NuDyckWords', 'NuDyckWord')) -from sage.combinat.sloane_functions import sloane -lazy_import('sage.combinat.superpartition', ('SuperPartition', - 'SuperPartitions')) - -lazy_import('sage.combinat.parallelogram_polyomino', - ['ParallelogramPolyomino', 'ParallelogramPolyominoes']) - -from sage.combinat.root_system.all import * -from sage.combinat.sf.all import * -from sage.combinat.ncsf_qsym.all import * -from sage.combinat.ncsym.all import * -lazy_import('sage.combinat.fqsym', 'FreeQuasisymmetricFunctions') -from sage.combinat.matrices.all import * -# Posets -from sage.combinat.posets.all import * - -# Cluster Algebras and Quivers -from sage.combinat.cluster_algebra_quiver.all import * - -from sage.combinat import ranker - -from sage.combinat.integer_vector import IntegerVectors -from sage.combinat.integer_vector_weighted import WeightedIntegerVectors -from sage.combinat.integer_vectors_mod_permgroup import IntegerVectorsModPermutationGroup - -lazy_import('sage.combinat.q_analogues', ['gaussian_binomial', 'q_binomial', 'number_of_irreducible_polynomials']) - -from sage.combinat.species.all import * - -lazy_import('sage.combinat.kazhdan_lusztig', 'KazhdanLusztigPolynomial') - -lazy_import('sage.combinat.degree_sequences', 'DegreeSequences') - -lazy_import('sage.combinat.cyclic_sieving_phenomenon', - ['CyclicSievingPolynomial', 'CyclicSievingCheck']) - -lazy_import('sage.combinat.sidon_sets', 'sidon_sets') - -# Puzzles -lazy_import('sage.combinat.knutson_tao_puzzles', 'KnutsonTaoPuzzleSolver') - -# Gelfand-Tsetlin patterns -lazy_import('sage.combinat.gelfand_tsetlin_patterns', - ['GelfandTsetlinPattern', 'GelfandTsetlinPatterns']) - -# Finite State Machines (Automaton, Transducer) -lazy_import('sage.combinat.finite_state_machine', - ['Automaton', 'Transducer', 'FiniteStateMachine']) -lazy_import('sage.combinat.finite_state_machine_generators', - ['automata', 'transducers']) - -# Sequences -lazy_import('sage.combinat.binary_recurrence_sequences', - 'BinaryRecurrenceSequence') -lazy_import('sage.combinat.recognizable_series', 'RecognizableSeriesSpace') -lazy_import('sage.combinat.regular_sequence', 'RegularSequenceRing') - -# Six Vertex Model -lazy_import('sage.combinat.six_vertex_model', 'SixVertexModel') - -# sine-Gordon Y-systems -lazy_import('sage.combinat.sine_gordon', 'SineGordonYsystem') - -# Fully Packed Loop -lazy_import('sage.combinat.fully_packed_loop', ['FullyPackedLoop', 'FullyPackedLoops']) - -# Subword complex and cluster complex -lazy_import('sage.combinat.subword_complex', 'SubwordComplex') -lazy_import("sage.combinat.cluster_complex", "ClusterComplex") - -# Constellations -lazy_import('sage.combinat.constellation', ['Constellation', 'Constellations']) - -# Growth diagrams -lazy_import('sage.combinat.growth', 'GrowthDiagram') - -# Path Tableaux -lazy_import('sage.combinat.path_tableaux', 'catalog', as_='path_tableaux') - -# Bijectionist -lazy_import('sage.combinat.bijectionist', 'Bijectionist') +from sage.combinat.all__sagemath_combinat import * +from sage.combinat.all__sagemath_modules import * +from sage.combinat.all__sagemath_graphs import * +del lazy_import +del install_dict +del install_doc diff --git a/src/sage/combinat/all__sagemath_categories.py b/src/sage/combinat/all__sagemath_categories.py new file mode 100644 index 00000000000..f7ef4460977 --- /dev/null +++ b/src/sage/combinat/all__sagemath_categories.py @@ -0,0 +1,27 @@ +from sage.combinat.matrices.all__sagemath_categories import * + +from sage.misc.lazy_import import lazy_import + +# Integer lists +from sage.combinat.integer_lists import IntegerListsLex +from sage.combinat.integer_vector import IntegerVectors + +from sage.combinat.combinat import (CombinatorialObject, + bell_number, bell_polynomial, bernoulli_polynomial, + catalan_number, euler_number, + fibonacci, fibonacci_sequence, fibonacci_xrange, + lucas_number1, lucas_number2, + number_of_tuples, number_of_unordered_tuples, + polygonal_number, stirling_number1, stirling_number2, + tuples, unordered_tuples) + +from sage.combinat.combination import Combinations +from sage.combinat.composition import Composition, Compositions +from sage.combinat.permutation import Permutation, Permutations, Arrangements, CyclicPermutations, CyclicPermutationsOfPartition +from sage.combinat.subset import Subsets, subsets, powerset, uniq +from sage.combinat.tuple import Tuples, UnorderedTuples + + +from sage.combinat.dlx import DLXMatrix, AllExactCovers, OneExactCover + +del lazy_import diff --git a/src/sage/combinat/all__sagemath_combinat.py b/src/sage/combinat/all__sagemath_combinat.py new file mode 100644 index 00000000000..7968f3fde4a --- /dev/null +++ b/src/sage/combinat/all__sagemath_combinat.py @@ -0,0 +1,201 @@ +from sage.combinat.all__sagemath_categories import * + +from sage.misc.lazy_import import lazy_import + +from sage.combinat.expnums import expnums + +from sage.combinat.chas.all import * +from sage.combinat.crystals.all import * +from sage.combinat.rigged_configurations.all import * + +# Free modules and friends +from sage.combinat.debruijn_sequence import DeBruijnSequences + +lazy_import('sage.combinat.schubert_polynomial', 'SchubertPolynomialRing') +lazy_import('sage.combinat.key_polynomial', 'KeyPolynomialBasis', as_='KeyPolynomials') +lazy_import('sage.combinat.symmetric_group_algebra', [ + 'SymmetricGroupAlgebra', 'HeckeAlgebraSymmetricGroupT']) +lazy_import('sage.combinat.symmetric_group_representations', [ + 'SymmetricGroupRepresentation', 'SymmetricGroupRepresentations']) + +# Permutations +lazy_import('sage.combinat.affine_permutation', 'AffinePermutationGroup') +lazy_import('sage.combinat.colored_permutations', ['ColoredPermutations', + 'SignedPermutation', + 'SignedPermutations']) +from sage.combinat.derangements import Derangements +lazy_import('sage.combinat.baxter_permutations', ['BaxterPermutations']) + +# RSK +from sage.combinat.rsk import RSK, RSK_inverse, robinson_schensted_knuth, robinson_schensted_knuth_inverse, InsertionRules + +# HillmanGrassl +lazy_import("sage.combinat.hillman_grassl", [ + "WeakReversePlanePartition", "WeakReversePlanePartitions"]) + +# PerfectMatchings +from sage.combinat.perfect_matching import PerfectMatching, PerfectMatchings + +# Compositions +from sage.combinat.composition_signed import SignedCompositions + +# Partitions +from sage.combinat.partition import (Partition, Partitions, PartitionsInBox, + OrderedPartitions, PartitionsGreatestLE, + PartitionsGreatestEQ, number_of_partitions) + +lazy_import('sage.combinat.partition_tuple', ['PartitionTuple', 'PartitionTuples']) +lazy_import('sage.combinat.partition_kleshchev', ['KleshchevPartitions']) +lazy_import('sage.combinat.skew_partition', ['SkewPartition', 'SkewPartitions']) + +# Partition algebra +from sage.combinat.partition_algebra import (SetPartitionsAk, SetPartitionsPk, + SetPartitionsTk, SetPartitionsIk, + SetPartitionsBk, SetPartitionsSk, + SetPartitionsRk, SetPartitionsPRk) + +# Raising operators +lazy_import('sage.combinat.partition_shifting_algebras', 'ShiftingOperatorAlgebra') + +# Diagram algebra +lazy_import('sage.combinat.diagram_algebras', ['PartitionAlgebra', 'BrauerAlgebra', 'TemperleyLiebAlgebra', + 'PlanarAlgebra', 'PropagatingIdeal']) + +# Descent algebra +lazy_import('sage.combinat.descent_algebra', 'DescentAlgebra') + +# Vector Partitions +lazy_import('sage.combinat.vector_partition', + ['VectorPartition', 'VectorPartitions']) + +# Similarity class types +lazy_import('sage.combinat.similarity_class_type', ['PrimarySimilarityClassType', 'PrimarySimilarityClassTypes', + 'SimilarityClassType', 'SimilarityClassTypes']) + +# Cores +from sage.combinat.core import Core, Cores + +# Tableaux +lazy_import('sage.combinat.tableau', + ["Tableau", "SemistandardTableau", "StandardTableau", "RowStandardTableau", "IncreasingTableau", + "Tableaux", "SemistandardTableaux", "StandardTableaux", "RowStandardTableaux", "IncreasingTableaux"]) +from sage.combinat.skew_tableau import SkewTableau, SkewTableaux, StandardSkewTableaux, SemistandardSkewTableaux +from sage.combinat.ribbon_shaped_tableau import RibbonShapedTableau, RibbonShapedTableaux, StandardRibbonShapedTableaux +from sage.combinat.ribbon_tableau import RibbonTableaux, RibbonTableau, MultiSkewTableaux, MultiSkewTableau, SemistandardMultiSkewTableaux +from sage.combinat.composition_tableau import CompositionTableau, CompositionTableaux + +lazy_import('sage.combinat.tableau_tuple', + ['TableauTuple', 'StandardTableauTuple', 'RowStandardTableauTuple', + 'TableauTuples', 'StandardTableauTuples', 'RowStandardTableauTuples']) +from sage.combinat.k_tableau import WeakTableau, WeakTableaux, StrongTableau, StrongTableaux +lazy_import('sage.combinat.lr_tableau', ['LittlewoodRichardsonTableau', + 'LittlewoodRichardsonTableaux']) +lazy_import('sage.combinat.shifted_primed_tableau', ['ShiftedPrimedTableaux', + 'ShiftedPrimedTableau']) + +# SuperTableaux +lazy_import('sage.combinat.super_tableau', + ["StandardSuperTableau", "SemistandardSuperTableau", "StandardSuperTableaux", "SemistandardSuperTableaux"]) + +# Words +from sage.combinat.words.all import * + +lazy_import('sage.combinat.subword', 'Subwords') + +# Alternating sign matrices +lazy_import('sage.combinat.alternating_sign_matrix', ('AlternatingSignMatrix', + 'AlternatingSignMatrices', + 'MonotoneTriangles', + 'ContreTableaux', + 'TruncatedStaircases')) + +# Decorated Permutations +lazy_import('sage.combinat.decorated_permutation', ('DecoratedPermutation', + 'DecoratedPermutations')) + +# Plane Partitions +lazy_import('sage.combinat.plane_partition', ('PlanePartition', + 'PlanePartitions')) + +# Parking Functions +lazy_import('sage.combinat.non_decreasing_parking_function', + ['NonDecreasingParkingFunctions', 'NonDecreasingParkingFunction']) +lazy_import('sage.combinat.parking_functions', + ['ParkingFunctions', 'ParkingFunction']) + +from sage.combinat.set_partition import SetPartition, SetPartitions +from sage.combinat.set_partition_ordered import OrderedSetPartition, OrderedSetPartitions +lazy_import('sage.combinat.multiset_partition_into_sets_ordered', + ['OrderedMultisetPartitionIntoSets', + 'OrderedMultisetPartitionsIntoSets']) +from sage.combinat.necklace import Necklaces +lazy_import('sage.combinat.dyck_word', ('DyckWords', 'DyckWord')) +lazy_import('sage.combinat.nu_dyck_word', ('NuDyckWords', 'NuDyckWord')) +from sage.combinat.sloane_functions import sloane +lazy_import('sage.combinat.superpartition', ('SuperPartition', + 'SuperPartitions')) + +lazy_import('sage.combinat.parallelogram_polyomino', + ['ParallelogramPolyomino', 'ParallelogramPolyominoes']) + +from sage.combinat.sf.all import * +from sage.combinat.ncsf_qsym.all import * +from sage.combinat.ncsym.all import * +lazy_import('sage.combinat.fqsym', 'FreeQuasisymmetricFunctions') +from sage.combinat.matrices.all import * + +lazy_import('sage.combinat.integer_vector_weighted', 'WeightedIntegerVectors') +lazy_import('sage.combinat.integer_vectors_mod_permgroup', + 'IntegerVectorsModPermutationGroup') + +lazy_import('sage.combinat.q_analogues', ['gaussian_binomial', 'q_binomial', 'number_of_irreducible_polynomials']) + +from sage.combinat.species.all import * + +lazy_import('sage.combinat.kazhdan_lusztig', 'KazhdanLusztigPolynomial') + +lazy_import('sage.combinat.degree_sequences', 'DegreeSequences') + +lazy_import('sage.combinat.cyclic_sieving_phenomenon', + ['CyclicSievingPolynomial', 'CyclicSievingCheck']) + +lazy_import('sage.combinat.sidon_sets', 'sidon_sets') + +# Puzzles +lazy_import('sage.combinat.knutson_tao_puzzles', 'KnutsonTaoPuzzleSolver') + +# Gelfand-Tsetlin patterns +lazy_import('sage.combinat.gelfand_tsetlin_patterns', + ['GelfandTsetlinPattern', 'GelfandTsetlinPatterns']) + +# Sequences +lazy_import('sage.combinat.binary_recurrence_sequences', + 'BinaryRecurrenceSequence') +lazy_import('sage.combinat.recognizable_series', 'RecognizableSeriesSpace') +lazy_import('sage.combinat.regular_sequence', 'RegularSequenceRing') + +# Six Vertex Model +lazy_import('sage.combinat.six_vertex_model', 'SixVertexModel') + +# sine-Gordon Y-systems +lazy_import('sage.combinat.sine_gordon', 'SineGordonYsystem') + +# Fully Packed Loop +lazy_import('sage.combinat.fully_packed_loop', ['FullyPackedLoop', 'FullyPackedLoops']) + +# Subword complex and cluster complex +lazy_import('sage.combinat.subword_complex', 'SubwordComplex') +lazy_import("sage.combinat.cluster_complex", "ClusterComplex") + +# Constellations +lazy_import('sage.combinat.constellation', ['Constellation', 'Constellations']) + +# Growth diagrams +lazy_import('sage.combinat.growth', 'GrowthDiagram') + +# Path Tableaux +lazy_import('sage.combinat.path_tableaux', 'catalog', as_='path_tableaux') + +# Bijectionist +lazy_import('sage.combinat.bijectionist', 'Bijectionist') +del lazy_import diff --git a/src/sage/combinat/all__sagemath_flint.py b/src/sage/combinat/all__sagemath_flint.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/combinat/all__sagemath_gap.py b/src/sage/combinat/all__sagemath_gap.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/combinat/all__sagemath_graphs.py b/src/sage/combinat/all__sagemath_graphs.py new file mode 100644 index 00000000000..d789b89078b --- /dev/null +++ b/src/sage/combinat/all__sagemath_graphs.py @@ -0,0 +1,33 @@ +from sage.combinat.all__sagemath_categories import * + +from sage.misc.lazy_import import lazy_import + +# Posets +from sage.combinat.posets.all import * + +# Trees and Tamari interval posets +from sage.combinat.ordered_tree import (OrderedTree, OrderedTrees, + LabelledOrderedTree, LabelledOrderedTrees) +from sage.combinat.binary_tree import (BinaryTree, BinaryTrees, + LabelledBinaryTree, LabelledBinaryTrees) +lazy_import('sage.combinat.rooted_tree', ('RootedTree', 'RootedTrees', + 'LabelledRootedTree', 'LabelledRootedTrees')) +lazy_import('sage.combinat.interval_posets', [ + 'TamariIntervalPoset', 'TamariIntervalPosets']) + +from sage.combinat.graph_path import GraphPaths + +from sage.combinat.yang_baxter_graph import YangBaxterGraph + +# block designs, etc +from sage.combinat.designs.all import * + +# Cluster Algebras and Quivers +from sage.combinat.cluster_algebra_quiver.all import * + +# Finite State Machines (Automaton, Transducer) +lazy_import('sage.combinat.finite_state_machine', + ['Automaton', 'Transducer', 'FiniteStateMachine']) +lazy_import('sage.combinat.finite_state_machine_generators', + ['automata', 'transducers']) +del lazy_import diff --git a/src/sage/combinat/all__sagemath_modules.py b/src/sage/combinat/all__sagemath_modules.py new file mode 100644 index 00000000000..a2459fcafc0 --- /dev/null +++ b/src/sage/combinat/all__sagemath_modules.py @@ -0,0 +1,6 @@ +from sage.combinat.all__sagemath_categories import * + +from sage.combinat.free_module import CombinatorialFreeModule +from sage.combinat import ranker + +from sage.combinat.root_system.all import * diff --git a/src/sage/combinat/matrices/all.py b/src/sage/combinat/matrices/all.py index 0f6adbb5355..92df248b91b 100644 --- a/src/sage/combinat/matrices/all.py +++ b/src/sage/combinat/matrices/all.py @@ -10,10 +10,14 @@ from sage.misc.namespace_package import install_doc install_doc(__package__, __doc__) +from sage.combinat.matrices.all__sagemath_categories import * + from sage.misc.lazy_import import lazy_import lazy_import('sage.combinat.matrices.latin', ['LatinSquare', 'LatinSquare_generator']) -lazy_import('sage.combinat.matrices.dlxcpp', 'DLXCPP') lazy_import('sage.combinat.matrices.hadamard_matrix', ['hadamard_matrix', 'hadamard_matrix_www']) + +del install_doc +del lazy_import diff --git a/src/sage/combinat/matrices/all__sagemath_categories.py b/src/sage/combinat/matrices/all__sagemath_categories.py new file mode 100644 index 00000000000..b168b0b1127 --- /dev/null +++ b/src/sage/combinat/matrices/all__sagemath_categories.py @@ -0,0 +1,4 @@ +from sage.misc.lazy_import import lazy_import + +lazy_import('sage.combinat.matrices.dlxcpp', 'DLXCPP') +del lazy_import diff --git a/src/sage/combinat/ncsf_qsym/all.py b/src/sage/combinat/ncsf_qsym/all.py index 5d61e9a9beb..9ea6d381f82 100644 --- a/src/sage/combinat/ncsf_qsym/all.py +++ b/src/sage/combinat/ncsf_qsym/all.py @@ -11,5 +11,10 @@ from sage.misc.namespace_package import install_doc install_doc(__package__, __doc__) -from sage.combinat.ncsf_qsym.qsym import QuasiSymmetricFunctions -from sage.combinat.ncsf_qsym.ncsf import NonCommutativeSymmetricFunctions +from sage.misc.lazy_import import lazy_import + +lazy_import('sage.combinat.ncsf_qsym.qsym', 'QuasiSymmetricFunctions') +lazy_import('sage.combinat.ncsf_qsym.ncsf', 'NonCommutativeSymmetricFunctions') + +del install_doc +del lazy_import diff --git a/src/sage/combinat/ncsym/all.py b/src/sage/combinat/ncsym/all.py index cdeeec1ae41..864a6ac6960 100644 --- a/src/sage/combinat/ncsym/all.py +++ b/src/sage/combinat/ncsym/all.py @@ -11,5 +11,10 @@ from sage.misc.namespace_package import install_doc install_doc(__package__, __doc__) -from sage.combinat.ncsym.ncsym import SymmetricFunctionsNonCommutingVariables -from sage.combinat.ncsym.dual import SymmetricFunctionsNonCommutingVariablesDual +from sage.misc.lazy_import import lazy_import + +lazy_import('sage.combinat.ncsym.ncsym', 'SymmetricFunctionsNonCommutingVariables') +lazy_import('sage.combinat.ncsym.dual', 'SymmetricFunctionsNonCommutingVariablesDual') + +del install_doc +del lazy_import diff --git a/src/sage/combinat/posets/all__sagemath_flint.py b/src/sage/combinat/posets/all__sagemath_flint.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/combinat/root_system/all.py b/src/sage/combinat/root_system/all.py index 9c50eb57af1..bb55e491b44 100644 --- a/src/sage/combinat/root_system/all.py +++ b/src/sage/combinat/root_system/all.py @@ -122,9 +122,9 @@ from sage.misc.lazy_import import lazy_import from sage.combinat.root_system.cartan_type import CartanType -from sage.combinat.root_system.dynkin_diagram import DynkinDiagram -from sage.combinat.root_system.cartan_matrix import CartanMatrix -from sage.combinat.root_system.coxeter_matrix import CoxeterMatrix +lazy_import('sage.combinat.root_system.dynkin_diagram', 'DynkinDiagram') +lazy_import('sage.combinat.root_system.cartan_matrix', 'CartanMatrix') +lazy_import('sage.combinat.root_system.coxeter_matrix', 'CoxeterMatrix') from sage.combinat.root_system.coxeter_type import CoxeterType from sage.combinat.root_system.root_system import RootSystem, WeylDim lazy_import('sage.combinat.root_system.weyl_group', ['WeylGroup', @@ -138,5 +138,9 @@ 'WeightRing']) from sage.combinat.root_system.branching_rules import BranchingRule, branching_rule_from_plethysm, branching_rule -lazy_import('sage.combinat.root_system.non_symmetric_macdonald_polynomials', 'NonSymmetricMacdonaldPolynomials') -lazy_import('sage.combinat.root_system.integrable_representations', 'IntegrableRepresentation') +lazy_import('sage.combinat.root_system.non_symmetric_macdonald_polynomials', + 'NonSymmetricMacdonaldPolynomials') +lazy_import('sage.combinat.root_system.integrable_representations', + 'IntegrableRepresentation') +del lazy_import +del install_doc diff --git a/src/sage/combinat/root_system/all__sagemath_gap.py b/src/sage/combinat/root_system/all__sagemath_gap.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/combinat/sf/all.py b/src/sage/combinat/sf/all.py index 00f8e4f2bdf..daa673af502 100644 --- a/src/sage/combinat/sf/all.py +++ b/src/sage/combinat/sf/all.py @@ -36,7 +36,7 @@ # In the long run, this will be the single entry point # Nothing else will be exported -lazy_import('sage.combinat.sf.sf', 'SymmetricFunctions') +from sage.combinat.sf.sf import SymmetricFunctions # Advanced stuff: @@ -45,3 +45,5 @@ lazy_import('sage.combinat.sf.ns_macdonald', ['NonattackingFillings', 'AugmentedLatticeDiagramFilling', 'LatticeDiagram']) +del lazy_import +del install_doc diff --git a/src/sage/combinat/words/all.py b/src/sage/combinat/words/all.py index 8d5798c549c..66a2fa38719 100644 --- a/src/sage/combinat/words/all.py +++ b/src/sage/combinat/words/all.py @@ -43,11 +43,16 @@ from sage.misc.namespace_package import install_doc install_doc(__package__, __doc__) +from sage.misc.lazy_import import lazy_import + from sage.combinat.words.alphabet import Alphabet, build_alphabet from sage.combinat.words.morphism import WordMorphism -from sage.combinat.words.paths import WordPaths +lazy_import('sage.combinat.words.paths', 'WordPaths') from sage.combinat.words.word import Word from sage.combinat.words.word_options import WordOptions from sage.combinat.words.word_generators import words from sage.combinat.words.words import Words, FiniteWords, InfiniteWords from sage.combinat.words.lyndon_word import LyndonWord, LyndonWords, StandardBracketedLyndonWords + +del install_doc +del lazy_import diff --git a/src/sage/data_structures/all.py b/src/sage/data_structures/all.py index eac1b4b8931..7062ccf447e 100644 --- a/src/sage/data_structures/all.py +++ b/src/sage/data_structures/all.py @@ -1,2 +1 @@ - -from sage.data_structures.bitset import Bitset, FrozenBitset +from sage.data_structures.all__sagemath_categories import * diff --git a/src/sage/data_structures/all__sagemath_categories.py b/src/sage/data_structures/all__sagemath_categories.py new file mode 100644 index 00000000000..fe98668667d --- /dev/null +++ b/src/sage/data_structures/all__sagemath_categories.py @@ -0,0 +1 @@ +from sage.data_structures.bitset import Bitset, FrozenBitset diff --git a/src/sage/data_structures/all__sagemath_combinat.py b/src/sage/data_structures/all__sagemath_combinat.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/data_structures/all__sagemath_flint.py b/src/sage/data_structures/all__sagemath_flint.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/databases/all__sagemath_graphs.py b/src/sage/databases/all__sagemath_graphs.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/dynamics/all.py b/src/sage/dynamics/all.py index e5c553a3d54..fddc4e83a98 100644 --- a/src/sage/dynamics/all.py +++ b/src/sage/dynamics/all.py @@ -20,14 +20,22 @@ from sage.misc.namespace_package import install_doc install_doc(__package__, __doc__) +from sage.dynamics.all__sagemath_schemes import * + +try: + from sage.dynamics.all__sagemath_symbolics import * +except ImportError: + pass + from sage.misc.lazy_import import lazy_import -from sage.dynamics.arithmetic_dynamics.all import * -from sage.dynamics.complex_dynamics.all import * from sage.dynamics.cellular_automata.all import * # Discrete dynamical systems lazy_import('sage.dynamics.finite_dynamical_system', ['DiscreteDynamicalSystem']) -lazy_import('sage.dynamics', 'finite_dynamical_system_catalog', 'finite_dynamical_systems') +lazy_import('sage.dynamics', 'finite_dynamical_system_catalog', + 'finite_dynamical_systems') +del lazy_import +del install_doc diff --git a/src/sage/dynamics/all__sagemath_schemes.py b/src/sage/dynamics/all__sagemath_schemes.py new file mode 100644 index 00000000000..b1eac4ead2f --- /dev/null +++ b/src/sage/dynamics/all__sagemath_schemes.py @@ -0,0 +1 @@ +from sage.dynamics.arithmetic_dynamics.all import * diff --git a/src/sage/dynamics/all__sagemath_symbolics.py b/src/sage/dynamics/all__sagemath_symbolics.py new file mode 100644 index 00000000000..1bffe1dffa6 --- /dev/null +++ b/src/sage/dynamics/all__sagemath_symbolics.py @@ -0,0 +1,5 @@ +from sage.misc.lazy_import import lazy_import + +lazy_import('sage.dynamics.complex_dynamics.mandel_julia', + ["mandelbrot_plot", "external_ray", "kneading_sequence", "julia_plot"]) +del lazy_import diff --git a/src/sage/ext/all__sagemath_categories.py b/src/sage/ext/all__sagemath_categories.py new file mode 100644 index 00000000000..ec13d6e405f --- /dev/null +++ b/src/sage/ext/all__sagemath_categories.py @@ -0,0 +1,2 @@ +from sage.ext.fast_callable import fast_callable +from sage.ext.fast_eval import fast_float diff --git a/src/sage/ext/all__sagemath_modules.py b/src/sage/ext/all__sagemath_modules.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/ext/all__sagemath_pari.py b/src/sage/ext/all__sagemath_pari.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/ext/all__sagemath_symbolics.py b/src/sage/ext/all__sagemath_symbolics.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/ext_data/all__sagemath_gap.py b/src/sage/ext_data/all__sagemath_gap.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/ext_data/all__sagemath_singular.py b/src/sage/ext_data/all__sagemath_singular.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/games/all.py b/src/sage/games/all.py index be1a1f2cbfc..d2b0648440e 100644 --- a/src/sage/games/all.py +++ b/src/sage/games/all.py @@ -1,2 +1,6 @@ -from sage.games.sudoku import Sudoku, sudoku -from sage.games.hexad import Minimog + +from sage.misc.lazy_import import lazy_import + +lazy_import('sage.games.sudoku', ['Sudoku', 'sudoku']) +lazy_import('sage.games.hexad', ['Minimog']) +del lazy_import diff --git a/src/sage/geometry/all.py b/src/sage/geometry/all.py index 0115d5b3ba8..ebf0d36f808 100644 --- a/src/sage/geometry/all.py +++ b/src/sage/geometry/all.py @@ -1,20 +1,12 @@ -from sage.geometry.polyhedron.all import * -from sage.geometry.hyperbolic_space.all import * -from sage.geometry.polyhedral_complex import PolyhedralComplex -from sage.misc.lazy_import import lazy_import +from sage.geometry.all__sagemath_polyhedra import * -lazy_import('sage.geometry.cone', ['Cone', 'random_cone']) -lazy_import('sage.geometry', 'cone_catalog', 'cones') -lazy_import('sage.geometry.fan', ['Fan', 'FaceFan', 'NormalFan', 'Fan2d']) -lazy_import('sage.geometry.fan_morphism', 'FanMorphism') -lazy_import('sage.geometry.lattice_polytope', - ['LatticePolytope', 'NefPartition', - 'ReflexivePolytope', 'ReflexivePolytopes']) -lazy_import('sage.geometry', 'lattice_polytope') -lazy_import('sage.geometry.toric_lattice', 'ToricLattice') -lazy_import('sage.geometry', 'toric_plotter') -lazy_import('sage.geometry.voronoi_diagram', 'VoronoiDiagram') -lazy_import('sage.geometry.ribbon_graph', 'RibbonGraph') -lazy_import('sage.geometry.hyperplane_arrangement.arrangement', 'HyperplaneArrangements') -lazy_import('sage.geometry.hyperplane_arrangement.ordered_arrangement', 'OrderedHyperplaneArrangements') -lazy_import('sage.geometry.hyperplane_arrangement.library', 'hyperplane_arrangements') +try: + from sage.geometry.all__sagemath_symbolics import * +except ImportError: + pass + + +try: + from sage.geometry.all__sagemath_gap import * +except ImportError: + pass diff --git a/src/sage/geometry/all__sagemath_categories.py b/src/sage/geometry/all__sagemath_categories.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/geometry/all__sagemath_gap.py b/src/sage/geometry/all__sagemath_gap.py new file mode 100644 index 00000000000..34dc2709543 --- /dev/null +++ b/src/sage/geometry/all__sagemath_gap.py @@ -0,0 +1,5 @@ + +from sage.misc.lazy_import import lazy_import + +lazy_import('sage.geometry.ribbon_graph', 'RibbonGraph') +del lazy_import diff --git a/src/sage/geometry/all__sagemath_linbox.py b/src/sage/geometry/all__sagemath_linbox.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/geometry/all__sagemath_modules.py b/src/sage/geometry/all__sagemath_modules.py new file mode 100644 index 00000000000..4ea1510f4ab --- /dev/null +++ b/src/sage/geometry/all__sagemath_modules.py @@ -0,0 +1,4 @@ +from sage.misc.lazy_import import lazy_import + +lazy_import('sage.geometry.toric_lattice', 'ToricLattice') +del lazy_import diff --git a/src/sage/geometry/all__sagemath_polyhedra.py b/src/sage/geometry/all__sagemath_polyhedra.py new file mode 100644 index 00000000000..ef2fcbc10ac --- /dev/null +++ b/src/sage/geometry/all__sagemath_polyhedra.py @@ -0,0 +1,21 @@ +from sage.geometry.all__sagemath_modules import * + +from sage.geometry.polyhedron.all import * +from sage.misc.lazy_import import lazy_import + +lazy_import('sage.geometry.polyhedral_complex', 'PolyhedralComplex') +lazy_import('sage.geometry.cone', ['Cone', 'random_cone']) +lazy_import('sage.geometry', 'cone_catalog', 'cones') +lazy_import('sage.geometry.fan', ['Fan', 'FaceFan', 'NormalFan', 'Fan2d']) +lazy_import('sage.geometry.fan_morphism', 'FanMorphism') +lazy_import('sage.geometry.lattice_polytope', + ['LatticePolytope', 'NefPartition', + 'ReflexivePolytope', 'ReflexivePolytopes']) +lazy_import('sage.geometry', 'lattice_polytope') +lazy_import('sage.geometry', 'toric_plotter') +lazy_import('sage.geometry.voronoi_diagram', 'VoronoiDiagram') +lazy_import('sage.geometry.hyperplane_arrangement.arrangement', + 'HyperplaneArrangements') +lazy_import('sage.geometry.hyperplane_arrangement.ordered_arrangement', 'OrderedHyperplaneArrangements') +lazy_import('sage.geometry.hyperplane_arrangement.library', 'hyperplane_arrangements') +del lazy_import diff --git a/src/sage/geometry/all__sagemath_symbolics.py b/src/sage/geometry/all__sagemath_symbolics.py new file mode 100644 index 00000000000..fb690c97312 --- /dev/null +++ b/src/sage/geometry/all__sagemath_symbolics.py @@ -0,0 +1,7 @@ +from sage.misc.lazy_import import lazy_import + +lazy_import('sage.geometry.hyperbolic_space.hyperbolic_interface', 'HyperbolicPlane') + +from sage.geometry.riemannian_manifolds.all import * + +del lazy_import diff --git a/src/sage/graphs/all__sagemath_flint.py b/src/sage/graphs/all__sagemath_flint.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/groups/abelian_gps/all.py b/src/sage/groups/abelian_gps/all.py index f0c228a6a90..a6c6c72899a 100644 --- a/src/sage/groups/abelian_gps/all.py +++ b/src/sage/groups/abelian_gps/all.py @@ -17,13 +17,8 @@ # # The full text of the GPL is available at: # -# http://www.gnu.org/licenses/ -#***************************************************************************** - -#from dual_abelian_group import DualAbelianGroup -from sage.groups.abelian_gps.abelian_group import AbelianGroup, word_problem -from sage.groups.abelian_gps.values import AbelianGroupWithValues +# https://www.gnu.org/licenses/ +# ***************************************************************************** -# TODO: -# Implement group homset, conversion of generator images to morphism -from sage.groups.abelian_gps.abelian_group_morphism import AbelianGroupMorphism +from sage.groups.abelian_gps.all__sagemath_modules import * +from sage.groups.abelian_gps.all__sagemath_gap import * diff --git a/src/sage/groups/abelian_gps/all__sagemath_gap.py b/src/sage/groups/abelian_gps/all__sagemath_gap.py new file mode 100644 index 00000000000..80c0bd46216 --- /dev/null +++ b/src/sage/groups/abelian_gps/all__sagemath_gap.py @@ -0,0 +1,5 @@ + +# TODO: +# Implement group homset, conversion of generator images to morphism + +from sage.groups.abelian_gps.abelian_group_morphism import AbelianGroupMorphism diff --git a/src/sage/groups/abelian_gps/all__sagemath_modules.py b/src/sage/groups/abelian_gps/all__sagemath_modules.py new file mode 100644 index 00000000000..32a1f65f720 --- /dev/null +++ b/src/sage/groups/abelian_gps/all__sagemath_modules.py @@ -0,0 +1,4 @@ + +# from dual_abelian_group import DualAbelianGroup +from sage.groups.abelian_gps.abelian_group import AbelianGroup, word_problem +from sage.groups.abelian_gps.values import AbelianGroupWithValues diff --git a/src/sage/groups/all.py b/src/sage/groups/all.py index 66f3a106e54..52a20cea495 100644 --- a/src/sage/groups/all.py +++ b/src/sage/groups/all.py @@ -1,37 +1,4 @@ -from sage.misc.lazy_import import lazy_import - -from sage.groups.pari_group import PariGroup - -from sage.groups.matrix_gps.all import * -from sage.groups.abelian_gps.all import * - -from sage.groups.perm_gps.all import * - -from sage.groups.generic import (discrete_log, discrete_log_rho, discrete_log_lambda, - linear_relation, multiple, multiples, order_from_multiple) - -lazy_import('sage.groups.class_function', 'ClassFunction') - -from sage.groups.additive_abelian.all import * - -lazy_import('sage.groups.conjugacy_classes', ['ConjugacyClass', 'ConjugacyClassGAP']) - -lazy_import('sage.groups.free_group', 'FreeGroup') -lazy_import('sage.groups.braid', 'BraidGroup') -lazy_import('sage.groups.cubic_braid', 'CubicBraidGroup') -lazy_import('sage.groups.cubic_braid', 'AssionGroupU') -lazy_import('sage.groups.cubic_braid', 'AssionGroupS') - -lazy_import('sage.groups.affine_gps.affine_group', 'AffineGroup') -lazy_import('sage.groups.affine_gps.euclidean_group', 'EuclideanGroup') - -lazy_import('sage.groups.artin', 'ArtinGroup') -lazy_import('sage.groups.raag', 'RightAngledArtinGroup') - -lazy_import('sage.groups', 'groups_catalog', 'groups') - -lazy_import('sage.groups.semimonomial_transformations.semimonomial_transformation_group', 'SemimonomialTransformationGroup') - -lazy_import('sage.groups.group_exp', ['GroupExp', 'GroupExp_Class', 'GroupExpElement']) - -lazy_import('sage.groups.group_semidirect_product', ['GroupSemidirectProduct', 'GroupSemidirectProductElement']) +from sage.groups.all__sagemath_modules import * +from sage.groups.all__sagemath_gap import * +from sage.groups.all__sagemath_pari import * +from sage.groups.all__sagemath_groups import * diff --git a/src/sage/groups/all__sagemath_categories.py b/src/sage/groups/all__sagemath_categories.py new file mode 100644 index 00000000000..cf28b7d6bff --- /dev/null +++ b/src/sage/groups/all__sagemath_categories.py @@ -0,0 +1,10 @@ +from sage.groups.all__sagemath_objects import * + +from sage.groups.generic import (discrete_log, discrete_log_rho, discrete_log_lambda, + linear_relation, multiple, multiples, order_from_multiple) + +from sage.misc.lazy_import import lazy_import + +lazy_import('sage.groups', 'groups_catalog', 'groups') + +del lazy_import diff --git a/src/sage/groups/all__sagemath_combinat.py b/src/sage/groups/all__sagemath_combinat.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/groups/all__sagemath_gap.py b/src/sage/groups/all__sagemath_gap.py new file mode 100644 index 00000000000..15278ba12aa --- /dev/null +++ b/src/sage/groups/all__sagemath_gap.py @@ -0,0 +1,3 @@ + +from sage.groups.perm_gps.all import * +from sage.groups.abelian_gps.all__sagemath_gap import * diff --git a/src/sage/groups/all__sagemath_graphs.py b/src/sage/groups/all__sagemath_graphs.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/groups/all__sagemath_groups.py b/src/sage/groups/all__sagemath_groups.py new file mode 100644 index 00000000000..c27a9ca05c5 --- /dev/null +++ b/src/sage/groups/all__sagemath_groups.py @@ -0,0 +1,32 @@ +from sage.groups.all__sagemath_modules import * + +try: + from sage.groups.all__sagemath_pari import * +except ImportError: + pass + +from sage.groups.all__sagemath_gap import * + +from sage.misc.lazy_import import lazy_import + +lazy_import('sage.groups.class_function', 'ClassFunction') + +lazy_import('sage.groups.conjugacy_classes', ['ConjugacyClass', 'ConjugacyClassGAP']) + +lazy_import('sage.groups.free_group', 'FreeGroup') +lazy_import('sage.groups.braid', 'BraidGroup') +lazy_import('sage.groups.cubic_braid', 'CubicBraidGroup') +lazy_import('sage.groups.cubic_braid', 'AssionGroupU') +lazy_import('sage.groups.cubic_braid', 'AssionGroupS') + +lazy_import('sage.groups.artin', 'ArtinGroup') +lazy_import('sage.groups.raag', 'RightAngledArtinGroup') + +lazy_import('sage.groups.semimonomial_transformations.semimonomial_transformation_group', + 'SemimonomialTransformationGroup') + +lazy_import('sage.groups.group_exp', ['GroupExp', 'GroupExp_Class', 'GroupExpElement']) + +lazy_import('sage.groups.group_semidirect_product', [ + 'GroupSemidirectProduct', 'GroupSemidirectProductElement']) +del lazy_import diff --git a/src/sage/groups/all__sagemath_modules.py b/src/sage/groups/all__sagemath_modules.py new file mode 100644 index 00000000000..6a3eb638a9b --- /dev/null +++ b/src/sage/groups/all__sagemath_modules.py @@ -0,0 +1,11 @@ +from sage.groups.all__sagemath_categories import * + +from sage.groups.additive_abelian.all import * +from sage.groups.abelian_gps.all__sagemath_modules import * +from sage.groups.matrix_gps.all__sagemath_modules import * + +from sage.misc.lazy_import import lazy_import + +lazy_import('sage.groups.affine_gps.affine_group', 'AffineGroup') +lazy_import('sage.groups.affine_gps.euclidean_group', 'EuclideanGroup') +del lazy_import diff --git a/src/sage/groups/all__sagemath_objects.py b/src/sage/groups/all__sagemath_objects.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/groups/all__sagemath_pari.py b/src/sage/groups/all__sagemath_pari.py new file mode 100644 index 00000000000..97f61bbfc2c --- /dev/null +++ b/src/sage/groups/all__sagemath_pari.py @@ -0,0 +1,2 @@ + +from sage.groups.pari_group import PariGroup diff --git a/src/sage/groups/matrix_gps/all.py b/src/sage/groups/matrix_gps/all.py index c6360cd6a03..08d8c04e6f7 100644 --- a/src/sage/groups/matrix_gps/all.py +++ b/src/sage/groups/matrix_gps/all.py @@ -1,13 +1,3 @@ -from sage.misc.lazy_import import lazy_import - -lazy_import('sage.groups.matrix_gps.linear', 'GL') -lazy_import('sage.groups.matrix_gps.linear', 'SL') -lazy_import('sage.groups.matrix_gps.symplectic', 'Sp') -lazy_import('sage.groups.matrix_gps.unitary', 'SU') -lazy_import('sage.groups.matrix_gps.unitary', 'GU') -lazy_import('sage.groups.matrix_gps.orthogonal', 'GO') -lazy_import('sage.groups.matrix_gps.orthogonal', 'SO') -lazy_import('sage.groups.matrix_gps.finitely_generated', 'MatrixGroup') -lazy_import('sage.groups.matrix_gps.finitely_generated', 'QuaternionMatrixGroupGF3') +from sage.groups.matrix_gps.all__sagemath_modules import * import sage.groups.matrix_gps.pickling_overrides diff --git a/src/sage/groups/matrix_gps/all__sagemath_gap.py b/src/sage/groups/matrix_gps/all__sagemath_gap.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/groups/matrix_gps/all__sagemath_modules.py b/src/sage/groups/matrix_gps/all__sagemath_modules.py new file mode 100644 index 00000000000..e8ff9cf4fa6 --- /dev/null +++ b/src/sage/groups/matrix_gps/all__sagemath_modules.py @@ -0,0 +1,12 @@ +from sage.misc.lazy_import import lazy_import + +lazy_import('sage.groups.matrix_gps.linear', 'GL') +lazy_import('sage.groups.matrix_gps.linear', 'SL') +lazy_import('sage.groups.matrix_gps.symplectic', 'Sp') +lazy_import('sage.groups.matrix_gps.unitary', 'SU') +lazy_import('sage.groups.matrix_gps.unitary', 'GU') +lazy_import('sage.groups.matrix_gps.orthogonal', 'GO') +lazy_import('sage.groups.matrix_gps.orthogonal', 'SO') +lazy_import('sage.groups.matrix_gps.finitely_generated', 'MatrixGroup') +lazy_import('sage.groups.matrix_gps.finitely_generated', 'QuaternionMatrixGroupGF3') +del lazy_import diff --git a/src/sage/groups/perm_gps/all__sagemath_categories.py b/src/sage/groups/perm_gps/all__sagemath_categories.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/groups/perm_gps/all__sagemath_graphs.py b/src/sage/groups/perm_gps/all__sagemath_graphs.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/groups/perm_gps/all__sagemath_modules.py b/src/sage/groups/perm_gps/all__sagemath_modules.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/groups/perm_gps/partn_ref/all__sagemath_categories.py b/src/sage/groups/perm_gps/partn_ref/all__sagemath_categories.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/groups/perm_gps/partn_ref/all__sagemath_gap.py b/src/sage/groups/perm_gps/partn_ref/all__sagemath_gap.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/groups/perm_gps/partn_ref/all__sagemath_graphs.py b/src/sage/groups/perm_gps/partn_ref/all__sagemath_graphs.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/groups/perm_gps/partn_ref/all__sagemath_modules.py b/src/sage/groups/perm_gps/partn_ref/all__sagemath_modules.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/homology/all.py b/src/sage/homology/all.py index 21a95c6c4af..707eb9fb71d 100644 --- a/src/sage/homology/all.py +++ b/src/sage/homology/all.py @@ -1,6 +1 @@ -from sage.homology.chain_complex import ChainComplex - -from sage.homology.chain_complex_morphism import ChainComplexMorphism - -from sage.misc.lazy_import import lazy_import -lazy_import('sage.homology.koszul_complex', 'KoszulComplex') +from sage.homology.all__sagemath_modules import * diff --git a/src/sage/homology/all__sagemath_modules.py b/src/sage/homology/all__sagemath_modules.py new file mode 100644 index 00000000000..5ebb7604432 --- /dev/null +++ b/src/sage/homology/all__sagemath_modules.py @@ -0,0 +1,7 @@ +from sage.homology.chain_complex import ChainComplex + +from sage.homology.chain_complex_morphism import ChainComplexMorphism + +from sage.misc.lazy_import import lazy_import +lazy_import('sage.homology.koszul_complex', 'KoszulComplex') +del lazy_import diff --git a/src/sage/interfaces/all__sagemath_categories.py b/src/sage/interfaces/all__sagemath_categories.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/interfaces/all__sagemath_gap.py b/src/sage/interfaces/all__sagemath_gap.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/interfaces/all__sagemath_libecm.py b/src/sage/interfaces/all__sagemath_libecm.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/interfaces/all__sagemath_pari.py b/src/sage/interfaces/all__sagemath_pari.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/interfaces/all__sagemath_plot.py b/src/sage/interfaces/all__sagemath_plot.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/interfaces/all__sagemath_symbolics.py b/src/sage/interfaces/all__sagemath_symbolics.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/lfunctions/all__sagemath_lcalc.py b/src/sage/lfunctions/all__sagemath_lcalc.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/libs/all.py b/src/sage/libs/all.py index f85115a4da2..7c6e14767cf 100644 --- a/src/sage/libs/all.py +++ b/src/sage/libs/all.py @@ -1,19 +1,11 @@ - -import sage.libs.ntl.all as ntl - -from sage.libs.pari.all import pari, pari_gen, PariError - -import sage.libs.symmetrica.all as symmetrica - -from sage.misc.lazy_import import lazy_import -lazy_import('sage.libs.gap.libgap', 'libgap') - -lazy_import('sage.libs.eclib.constructor', 'CremonaModularSymbols') -lazy_import('sage.libs.eclib.interface', ['mwrank_EllipticCurve', 'mwrank_MordellWeil']) -lazy_import('sage.libs.eclib.mwrank', 'get_precision', 'mwrank_get_precision') -lazy_import('sage.libs.eclib.mwrank', 'set_precision', 'mwrank_set_precision') -lazy_import('sage.libs.eclib.mwrank', 'initprimes', 'mwrank_initprimes') - -lazy_import('sage.libs.flint.qsieve_sage', 'qsieve') - -lazy_import('sage.libs.giac.giac', 'libgiac') +from sage.libs.all__sagemath_combinat import * +from sage.libs.all__sagemath_gap import * +from sage.libs.all__sagemath_flint import * +from sage.libs.all__sagemath_ntl import * +from sage.libs.all__sagemath_pari import * +from sage.libs.all__sagemath_eclib import * + +try: + from sage.libs.all__sagemath_symbolics import * +except ImportError: + pass diff --git a/src/sage/libs/all__sagemath_brial.py b/src/sage/libs/all__sagemath_brial.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/libs/all__sagemath_combinat.py b/src/sage/libs/all__sagemath_combinat.py new file mode 100644 index 00000000000..49fc95742c3 --- /dev/null +++ b/src/sage/libs/all__sagemath_combinat.py @@ -0,0 +1,5 @@ +from sage.misc.lazy_import import lazy_import + +lazy_import('sage.libs.symmetrica', 'all', as_='symmetrica') + +del lazy_import diff --git a/src/sage/libs/all__sagemath_eclib.py b/src/sage/libs/all__sagemath_eclib.py new file mode 100644 index 00000000000..23d7839846c --- /dev/null +++ b/src/sage/libs/all__sagemath_eclib.py @@ -0,0 +1,10 @@ + +from sage.misc.lazy_import import lazy_import + +lazy_import('sage.libs.eclib.constructor', 'CremonaModularSymbols') +lazy_import('sage.libs.eclib.interface', ['mwrank_EllipticCurve', 'mwrank_MordellWeil']) +lazy_import('sage.libs.eclib.mwrank', 'get_precision', 'mwrank_get_precision') +lazy_import('sage.libs.eclib.mwrank', 'set_precision', 'mwrank_set_precision') +lazy_import('sage.libs.eclib.mwrank', 'initprimes', 'mwrank_initprimes') + +del lazy_import diff --git a/src/sage/libs/all__sagemath_flint.py b/src/sage/libs/all__sagemath_flint.py new file mode 100644 index 00000000000..b5e330d8329 --- /dev/null +++ b/src/sage/libs/all__sagemath_flint.py @@ -0,0 +1,16 @@ + +try: + from sage.libs.all__sagemath_pari import * +except ImportError: + pass + +try: + from sage.libs.all__sagemath_ntl import * +except ImportError: + pass + +from sage.misc.lazy_import import lazy_import + +lazy_import('sage.libs.flint.qsieve_sage', 'qsieve') + +del lazy_import diff --git a/src/sage/libs/all__sagemath_gap.py b/src/sage/libs/all__sagemath_gap.py new file mode 100644 index 00000000000..e4b82d9deb5 --- /dev/null +++ b/src/sage/libs/all__sagemath_gap.py @@ -0,0 +1,3 @@ +from sage.misc.lazy_import import lazy_import +lazy_import('sage.libs.gap.libgap', 'libgap') +del lazy_import diff --git a/src/sage/libs/all__sagemath_giac.py b/src/sage/libs/all__sagemath_giac.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/libs/all__sagemath_glpk.py b/src/sage/libs/all__sagemath_glpk.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/libs/all__sagemath_homfly.py b/src/sage/libs/all__sagemath_homfly.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/libs/all__sagemath_lcalc.py b/src/sage/libs/all__sagemath_lcalc.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/libs/all__sagemath_libbraiding.py b/src/sage/libs/all__sagemath_libbraiding.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/libs/all__sagemath_libecm.py b/src/sage/libs/all__sagemath_libecm.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/libs/all__sagemath_linbox.py b/src/sage/libs/all__sagemath_linbox.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/libs/all__sagemath_modules.py b/src/sage/libs/all__sagemath_modules.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/libs/all__sagemath_mpmath.py b/src/sage/libs/all__sagemath_mpmath.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/libs/all__sagemath_ntl.py b/src/sage/libs/all__sagemath_ntl.py new file mode 100644 index 00000000000..ad98922f701 --- /dev/null +++ b/src/sage/libs/all__sagemath_ntl.py @@ -0,0 +1,2 @@ + +import sage.libs.ntl.all as ntl diff --git a/src/sage/libs/all__sagemath_pari.py b/src/sage/libs/all__sagemath_pari.py new file mode 100644 index 00000000000..3babb25ee71 --- /dev/null +++ b/src/sage/libs/all__sagemath_pari.py @@ -0,0 +1 @@ +from sage.libs.pari.all import pari, pari_gen, PariError diff --git a/src/sage/libs/all__sagemath_singular.py b/src/sage/libs/all__sagemath_singular.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/libs/all__sagemath_symbolics.py b/src/sage/libs/all__sagemath_symbolics.py new file mode 100644 index 00000000000..9c096062eb5 --- /dev/null +++ b/src/sage/libs/all__sagemath_symbolics.py @@ -0,0 +1,4 @@ +from sage.misc.lazy_import import lazy_import + +lazy_import('sage.libs.giac.giac', 'libgiac') +del lazy_import diff --git a/src/sage/libs/pari/all__sagemath_flint.py b/src/sage/libs/pari/all__sagemath_flint.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/matrix/all__sagemath_flint.py b/src/sage/matrix/all__sagemath_flint.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/matrix/all__sagemath_gap.py b/src/sage/matrix/all__sagemath_gap.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/matrix/all__sagemath_linbox.py b/src/sage/matrix/all__sagemath_linbox.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/matrix/all__sagemath_ntl.py b/src/sage/matrix/all__sagemath_ntl.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/matrix/all__sagemath_singular.py b/src/sage/matrix/all__sagemath_singular.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/matrix/all__sagemath_symbolics.py b/src/sage/matrix/all__sagemath_symbolics.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/matrix/args.pyx b/src/sage/matrix/args.pyx index 4f578440df6..242fd3938ef 100644 --- a/src/sage/matrix/args.pyx +++ b/src/sage/matrix/args.pyx @@ -750,6 +750,9 @@ cdef class MatrixArgs: break else: space = self.space + global MatrixSpace + if MatrixSpace is None: + from sage.matrix.matrix_space import MatrixSpace if not isinstance(space, MatrixSpace): space = space.zero().matrix(side='left').parent() M = space(self, coerce=convert) @@ -806,6 +809,9 @@ cdef class MatrixArgs: cdef Matrix M = self.matrix(convert=True) if immutable: M.set_immutable() + global MatrixSpace + if MatrixSpace is None: + from sage.matrix.matrix_space import MatrixSpace if isinstance(self.space, MatrixSpace): return M return self.space(matrix=M, side='left') diff --git a/src/sage/misc/all.py b/src/sage/misc/all.py index fa14ec98696..5aaaae5dd38 100644 --- a/src/sage/misc/all.py +++ b/src/sage/misc/all.py @@ -1,127 +1,33 @@ -from sage.misc.lazy_attribute import lazy_attribute, lazy_class_attribute -from sage.misc.lazy_import import lazy_import - -from sage.misc.all__sagemath_objects import * +# from sage.misc.all__sagemath_objects import * from sage.misc.all__sagemath_environment import * +from sage.misc.all__sagemath_modules import * from sage.misc.all__sagemath_repl import * from sage.misc.misc import (BackslashOperator, - exists, forall, is_iterator, - random_sublist, - pad_zeros, - SAGE_DB, - newton_method_sizes, compose, - nest) - -from sage.misc.banner import version + exists, forall, is_iterator, + random_sublist, + pad_zeros, + SAGE_DB, + newton_method_sizes, compose, + nest) from sage.misc.dev_tools import import_statements -from sage.misc.html import html, pretty_print_default - -from sage.misc.table import table - -from sage.misc.sage_timeit_class import timeit - from sage.misc.edit_module import edit -from sage.misc.map_threaded import map_threaded - -from sage.misc.session import load_session, save_session, show_identifiers - from sage.misc.remote_file import get_remote_file -from sage.misc.mrange import xmrange, mrange, xmrange_iter, mrange_iter, cartesian_product_iterator - -from sage.misc.fpickle import pickle_function, unpickle_function - lazy_import('sage.misc.pager', 'pager') -lazy_import('sage.misc.sagedoc', ['browse_sage_doc', - 'search_src', 'search_def', 'search_doc', - 'tutorial', 'reference', 'manual', 'developer', - 'constructions', 'help']) -lazy_import('pydoc', 'help', 'python_help') - from sage.misc.classgraph import class_graph -from sage.misc.reset import reset, restore - -from sage.misc.mathml import mathml - -from sage.misc.defaults import (set_default_variable_name, - series_precision, set_series_precision) - lazy_import("sage.misc.cython", "cython_lambda") lazy_import("sage.misc.cython", "cython_compile", "cython") -from sage.misc.func_persist import func_persist - -from sage.misc.functional import (additive_order, - base_ring, - base_field, - basis, - category, - charpoly, - characteristic_polynomial, - coerce, - cyclotomic_polynomial, - decomposition, - denominator, - det, - dimension, - dim, - discriminant, - disc, - eta, - fcp, - gen, - gens, - hecke_operator, - image, - integral, integrate, - integral_closure, - interval, - xinterval, - is_even, - is_odd, - kernel, - krull_dimension, - lift, - log as log_b, - minimal_polynomial, - minpoly, - multiplicative_order, - ngens, - norm, - numerator, - numerical_approx, - n, N, - objgens, - objgen, - order, - rank, - regulator, - round, - quotient, - quo, - isqrt, - squarefree_part, - sqrt, - symbolic_sum as sum, - symbolic_prod as product, - transpose) - - -from sage.misc.latex import LatexExpr, latex, view - -from sage.misc.randstate import seed, set_random_seed, initial_seed, current_randstate - -from sage.misc.prandom import * - -from sage.misc.timing import walltime, cputime - -from sage.misc.explain_pickle import explain_pickle, unpickle_newobj, unpickle_global, unpickle_build, unpickle_instantiate, unpickle_persistent, unpickle_extension, unpickle_appends +# Following will go to all__sagemath_repl.py in #36566 +from sage.misc.explain_pickle import (explain_pickle, unpickle_newobj, unpickle_build, + unpickle_instantiate, unpickle_persistent, + unpickle_extension, unpickle_appends) lazy_import('sage.misc.inline_fortran', 'fortran') @@ -135,3 +41,10 @@ deprecation=34259) lazy_import('sage.misc.benchmark', 'benchmark', deprecation=34259) lazy_import('sage.repl.interpreter', 'logstr', deprecation=34259) + +# Following will go to all__sagemath_objects.py in #36566 +from sage.misc.randstate import seed, set_random_seed, initial_seed, current_randstate +from sage.misc.prandom import * +from sage.misc.sage_timeit_class import timeit +from sage.misc.session import load_session, save_session, show_identifiers +from sage.misc.reset import reset, restore diff --git a/src/sage/misc/all__sagemath_categories.py b/src/sage/misc/all__sagemath_categories.py new file mode 100644 index 00000000000..0806bdf7aec --- /dev/null +++ b/src/sage/misc/all__sagemath_categories.py @@ -0,0 +1,77 @@ + +from sage.misc.all__sagemath_objects import * + +from sage.misc.html import html, pretty_print_default + +from sage.misc.mathml import mathml + +from sage.misc.table import table + +from sage.misc.map_threaded import map_threaded + +from sage.misc.mrange import xmrange, mrange, xmrange_iter, mrange_iter, cartesian_product_iterator + +from sage.misc.defaults import (set_default_variable_name, + series_precision, set_series_precision) + + +from sage.misc.functional import (additive_order, + base_ring, + base_field, + basis, + category, + charpoly, + characteristic_polynomial, + coerce, + cyclotomic_polynomial, + decomposition, + denominator, + det, + dimension, + dim, + discriminant, + disc, + eta, + fcp, + gen, + gens, + hecke_operator, + image, + integral, integrate, + integral_closure, + interval, + xinterval, + is_even, + is_odd, + kernel, + krull_dimension, + lift, + log as log_b, + minimal_polynomial, + minpoly, + multiplicative_order, + ngens, + norm, + numerator, + numerical_approx, + n, N, + objgens, + objgen, + order, + rank, + regulator, + round, + quotient, + quo, + isqrt, + squarefree_part, + sqrt, + symbolic_sum as sum, + symbolic_prod as product, + transpose) + +from sage.misc.latex import LatexExpr, latex, view + +from sage.misc.fpickle import pickle_function, unpickle_function + +from sage.misc.persist import unpickle_global diff --git a/src/sage/misc/all__sagemath_modules.py b/src/sage/misc/all__sagemath_modules.py new file mode 100644 index 00000000000..8111aee2a29 --- /dev/null +++ b/src/sage/misc/all__sagemath_modules.py @@ -0,0 +1,20 @@ +# All of sage.misc.all except for development tools, session management, +# and deprecated functionality + +from sage.misc.lazy_attribute import lazy_attribute, lazy_class_attribute + +from sage.misc.all__sagemath_categories import * + +from sage.misc.misc import (BackslashOperator, # Depends on sage.env -- can lower to sagemath-objects after splitting this module + exists, forall, is_iterator, + random_sublist, + pad_zeros, + SAGE_DB, + newton_method_sizes, compose, + nest) + +from sage.misc.temporary_file import tmp_dir, tmp_filename # Depends on sage.env + +from sage.misc.mathml import mathml + +from sage.misc.func_persist import func_persist diff --git a/src/sage/misc/all__sagemath_ntl.py b/src/sage/misc/all__sagemath_ntl.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/misc/all__sagemath_repl.py b/src/sage/misc/all__sagemath_repl.py index 9631c49d0bd..9c29d75ac03 100644 --- a/src/sage/misc/all__sagemath_repl.py +++ b/src/sage/misc/all__sagemath_repl.py @@ -1,4 +1,16 @@ # sage_setup: distribution = sagemath-repl + +from sage.misc.all__sagemath_objects import * + from sage.misc.sage_eval import sage_eval, sageobj from sage.misc.sage_input import sage_input + +from sage.misc.banner import version + +lazy_import('sage.misc.sagedoc', ['browse_sage_doc', + 'search_src', 'search_def', 'search_doc', + 'tutorial', 'reference', 'manual', 'developer', + 'constructions', 'help']) + +lazy_import('pydoc', 'help', 'python_help') diff --git a/src/sage/misc/dev_tools.py b/src/sage/misc/dev_tools.py index da0a996424b..6916ef0819c 100644 --- a/src/sage/misc/dev_tools.py +++ b/src/sage/misc/dev_tools.py @@ -148,6 +148,7 @@ def load_submodules(module=None, exclude_pattern=None): EXAMPLES:: sage: sage.misc.dev_tools.load_submodules(sage.combinat) + load sage.combinat.affine_permutation... succeeded load sage.combinat.algebraic_combinatorics... succeeded ... load sage.combinat.words.suffix_trees... succeeded diff --git a/src/sage/misc/sageinspect.py b/src/sage/misc/sageinspect.py index 4582d0bfb6d..5651aafb14c 100644 --- a/src/sage/misc/sageinspect.py +++ b/src/sage/misc/sageinspect.py @@ -2246,6 +2246,7 @@ def sage_getsourcelines(obj): sage: from sage.misc.sageinspect import sage_getsourcelines sage: # needs sage.modules + sage: from sage.matrix.constructor import matrix sage: sage_getsourcelines(matrix)[1] 21 sage: sage_getsourcelines(matrix)[0][0] diff --git a/src/sage/modules/all__sagemath_linbox.py b/src/sage/modules/all__sagemath_linbox.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/modules/all__sagemath_objects.py b/src/sage/modules/all__sagemath_objects.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/modules/all__sagemath_symbolics.py b/src/sage/modules/all__sagemath_symbolics.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/monoids/all__sagemath_categories.py b/src/sage/monoids/all__sagemath_categories.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/numerical/all.py b/src/sage/numerical/all.py index 8b69da18652..751ec929b7c 100644 --- a/src/sage/numerical/all.py +++ b/src/sage/numerical/all.py @@ -1,7 +1,7 @@ +from sage.numerical.all__sagemath_modules import * + from sage.misc.lazy_import import lazy_import -lazy_import("sage.numerical.optimize", - ["find_fit", "find_local_maximum", "find_local_minimum", - "find_root", "minimize", "minimize_constrained"]) + lazy_import("sage.numerical.mip", ["MixedIntegerLinearProgram"]) lazy_import("sage.numerical.sdp", ["SemidefiniteProgram"]) lazy_import("sage.numerical.backends.generic_backend", ["default_mip_solver"]) @@ -9,3 +9,4 @@ lazy_import("sage.numerical.interactive_simplex_method", ["InteractiveLPProblem", "InteractiveLPProblemStandardForm"]) +del lazy_import diff --git a/src/sage/numerical/all__sagemath_categories.py b/src/sage/numerical/all__sagemath_categories.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/numerical/all__sagemath_glpk.py b/src/sage/numerical/all__sagemath_glpk.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/numerical/all__sagemath_modules.py b/src/sage/numerical/all__sagemath_modules.py new file mode 100644 index 00000000000..7a2c2778373 --- /dev/null +++ b/src/sage/numerical/all__sagemath_modules.py @@ -0,0 +1,5 @@ +from sage.misc.lazy_import import lazy_import +lazy_import("sage.numerical.optimize", + ["find_fit", "find_local_maximum", "find_local_minimum", + "find_root", "minimize", "minimize_constrained"]) +del lazy_import diff --git a/src/sage/numerical/all__sagemath_polyhedra.py b/src/sage/numerical/all__sagemath_polyhedra.py index 6de2a9af502..df27ac0d1ec 100644 --- a/src/sage/numerical/all__sagemath_polyhedra.py +++ b/src/sage/numerical/all__sagemath_polyhedra.py @@ -7,3 +7,4 @@ lazy_import("sage.numerical.interactive_simplex_method", ["InteractiveLPProblem", "InteractiveLPProblemStandardForm"]) +del lazy_import diff --git a/src/sage/numerical/backends/all__sagemath_categories.py b/src/sage/numerical/backends/all__sagemath_categories.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/numerical/backends/all__sagemath_glpk.py b/src/sage/numerical/backends/all__sagemath_glpk.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/plot/all.py b/src/sage/plot/all.py index 565aa748be4..4d7d65ecf62 100644 --- a/src/sage/plot/all.py +++ b/src/sage/plot/all.py @@ -34,6 +34,8 @@ from sage.plot.step import plot_step_function -from sage.plot.hyperbolic_arc import hyperbolic_arc -from sage.plot.hyperbolic_polygon import hyperbolic_triangle, hyperbolic_polygon +lazy_import("sage.plot.hyperbolic_arc", "hyperbolic_arc") +lazy_import("sage.plot.hyperbolic_polygon", [ + "hyperbolic_triangle", "hyperbolic_polygon"]) lazy_import("sage.plot.hyperbolic_regular_polygon", "hyperbolic_regular_polygon") +del lazy_import diff --git a/src/sage/quadratic_forms/all.py b/src/sage/quadratic_forms/all.py index 5982c6b8a5a..e9e818af865 100644 --- a/src/sage/quadratic_forms/all.py +++ b/src/sage/quadratic_forms/all.py @@ -1,19 +1,3 @@ -from sage.quadratic_forms.binary_qf import BinaryQF, BinaryQF_reduced_representatives -from sage.quadratic_forms.bqf_class_group import BQFClassGroup - -from sage.quadratic_forms.ternary_qf import TernaryQF, find_all_ternary_qf_by_level_disc, find_a_ternary_qf_by_level_disc - -from sage.quadratic_forms.quadratic_form import QuadraticForm, DiagonalQuadraticForm, quadratic_form_from_invariants - -from sage.quadratic_forms.random_quadraticform import (random_quadraticform, random_quadraticform_with_conditions, - random_ternaryqf, random_ternaryqf_with_conditions) - -from sage.quadratic_forms.extras import least_quadratic_nonresidue, extend_to_primitive, is_triangular_number - -from sage.quadratic_forms.special_values import (gamma__exact, zeta__exact, QuadraticBernoulliNumber, - quadratic_L_function__exact, quadratic_L_function__numerical) - -from sage.quadratic_forms.genera.genus import Genus - -from sage.quadratic_forms.constructions import BezoutianQuadraticForm, HyperbolicPlane_quadratic_form +from sage.quadratic_forms.all__sagemath_modules import * +from sage.quadratic_forms.all__sagemath_pari import * diff --git a/src/sage/quadratic_forms/all__sagemath_modules.py b/src/sage/quadratic_forms/all__sagemath_modules.py new file mode 100644 index 00000000000..62516aead2a --- /dev/null +++ b/src/sage/quadratic_forms/all__sagemath_modules.py @@ -0,0 +1,12 @@ +from sage.quadratic_forms.binary_qf import BinaryQF, BinaryQF_reduced_representatives + +from sage.quadratic_forms.ternary_qf import TernaryQF, find_all_ternary_qf_by_level_disc, find_a_ternary_qf_by_level_disc + +from sage.quadratic_forms.quadratic_form import QuadraticForm, DiagonalQuadraticForm, quadratic_form_from_invariants + +from sage.quadratic_forms.random_quadraticform import (random_quadraticform, random_quadraticform_with_conditions, + random_ternaryqf, random_ternaryqf_with_conditions) + +from sage.quadratic_forms.extras import least_quadratic_nonresidue, extend_to_primitive, is_triangular_number + +from sage.quadratic_forms.constructions import BezoutianQuadraticForm, HyperbolicPlane_quadratic_form diff --git a/src/sage/quadratic_forms/all__sagemath_pari.py b/src/sage/quadratic_forms/all__sagemath_pari.py new file mode 100644 index 00000000000..f6235960f54 --- /dev/null +++ b/src/sage/quadratic_forms/all__sagemath_pari.py @@ -0,0 +1,6 @@ +from sage.quadratic_forms.bqf_class_group import BQFClassGroup + +from sage.quadratic_forms.special_values import (gamma__exact, zeta__exact, QuadraticBernoulliNumber, + quadratic_L_function__exact, quadratic_L_function__numerical) + +from sage.quadratic_forms.genera.genus import Genus diff --git a/src/sage/rings/all.py b/src/sage/rings/all.py index e3c7167fe12..965f83d02f6 100644 --- a/src/sage/rings/all.py +++ b/src/sage/rings/all.py @@ -14,35 +14,22 @@ from sage.rings.all__sagemath_categories import * -# Ring base classes -from sage.rings.ring import (Ring, Field, CommutativeRing, IntegralDomain, - PrincipalIdealDomain) - -lazy_import("sage.rings.ring", "DedekindDomain") - -# Ring element base classes -from sage.structure.element import (CommutativeAlgebraElement, - RingElement, CommutativeRingElement, IntegralDomainElement, - DedekindDomainElement, PrincipalIdealDomainElement, - EuclideanDomainElement, FieldElement) - -# Ideals -from sage.rings.ideal import Ideal -ideal = Ideal +# Following will go to all__sagemath_categories.py in #36566 # Quotient from sage.rings.quotient_ring import QuotientRing # Infinities from sage.rings.infinity import infinity, Infinity, InfinityRing, unsigned_infinity, UnsignedInfinityRing +oo = infinity # Rational integers. from sage.rings.integer_ring import IntegerRing, ZZ, crt_basis from sage.rings.integer import Integer # Rational numbers -from sage.rings.rational_field import RationalField, QQ from sage.rings.rational import Rational +from sage.rings.rational_field import RationalField, QQ Rationals = RationalField # Integers modulo n. @@ -50,70 +37,41 @@ from sage.rings.finite_rings.integer_mod import IntegerMod, Mod, mod Integers = IntegerModRing +# up to here (#36566) + # Finite fields from sage.rings.finite_rings.all import * -# Number field -from sage.rings.number_field.all import * +from sage.rings.all__sagemath_combinat import * +from sage.rings.all__sagemath_flint import * +from sage.rings.all__sagemath_gap import * +from sage.rings.all__sagemath_modules import * + +try: + from sage.rings.all__sagemath_symbolics import * +except ImportError: + pass # Function field from sage.rings.function_field.all import * -# Finite residue fields -from sage.rings.finite_rings.residue_field import ResidueField - -# p-adic field -from sage.rings.padics.all import * -from sage.rings.padics.padic_printing import _printer_defaults as padic_printing - -# valuations -from sage.rings.valuation.all import * +# Following will go to all__sagemath_categories.py in #36566 # Semirings from sage.rings.semirings.all import * -# Real numbers -from sage.rings.real_mpfr import (RealField, RR, - create_RealNumber as RealNumber) # this is used by the preparser to wrap real literals -- very important. -Reals = RealField - +# Double precision floating point numbers from sage.rings.real_double import RealDoubleField, RDF, RealDoubleElement +# Lazy reals from sage.rings.real_lazy import RealLazyField, RLF, ComplexLazyField, CLF -from sage.rings.real_arb import RealBallField, RBF +# up to here (#36566) # Polynomial Rings and Polynomial Quotient Rings from sage.rings.polynomial.all import * - -# Algebraic numbers -from sage.rings.qqbar import (AlgebraicRealField, AA, - AlgebraicReal, - AlgebraicField, QQbar, - AlgebraicNumber, - number_field_elements_from_algebraics) -from sage.rings.universal_cyclotomic_field import UniversalCyclotomicField, E - -# Intervals -from sage.rings.real_mpfi import (RealIntervalField, - RIF, - RealInterval) - -# Complex numbers -from sage.rings.complex_mpfr import ComplexField -from sage.rings.complex_mpfr import create_ComplexNumber as ComplexNumber -Complexes = ComplexField -from sage.rings.complex_interval_field import ComplexIntervalField -from sage.rings.complex_interval import (create_ComplexIntervalFieldElement as ComplexIntervalFieldElement) - -from sage.rings.complex_double import ComplexDoubleField, ComplexDoubleElement, CDF - -from sage.rings.complex_mpc import MPComplexField - -from sage.rings.complex_arb import ComplexBallField, CBF - -lazy_import("sage.rings.imaginary_unit", "I") +# Following will go to all__sagemath_categories.py in #36566 # Power series rings from sage.rings.power_series_ring import PowerSeriesRing @@ -121,19 +79,9 @@ # Laurent series ring in one variable from sage.rings.laurent_series_ring import LaurentSeriesRing -# Lazy Laurent series ring -lazy_import('sage.rings.lazy_series_ring', ['LazyLaurentSeriesRing', 'LazyPowerSeriesRing', - 'LazySymmetricFunctions', 'LazyDirichletSeriesRing']) - -# Tate algebras -from sage.rings.tate_algebra import TateAlgebra - # Puiseux series ring from sage.rings.puiseux_series_ring import PuiseuxSeriesRing -# Pseudo-ring of PARI objects. -from sage.rings.pari_ring import PariRing, Pari - # Big-oh notation from sage.rings.big_oh import O @@ -144,27 +92,27 @@ # Localization from sage.rings.localization import Localization +# up to here (#36566) + # c-finite sequences from sage.rings.cfinite_sequence import CFiniteSequence, CFiniteSequences -from sage.rings.bernoulli_mod_p import bernoulli_mod_p, bernoulli_mod_p_single - -from sage.rings.monomials import monomials - -from sage.rings.cc import CC -from sage.rings.cif import CIF - -# invariant theory -from sage.rings.invariants.all import * - from sage.rings.fast_arith import prime_range +# Following will go to all__sagemath_categories.py in #36566 + # continued fractions from sage.rings.continued_fraction import (continued_fraction, continued_fraction_list) +# up to here (#36566) + # asymptotic ring -from sage.rings.asymptotic.all import * +# from sage.rings.asymptotic.all import * +lazy_import('sage.rings.asymptotic.asymptotic_ring', 'AsymptoticRing') +lazy_import('sage.rings.asymptotic.asymptotic_expansion_generators', + 'asymptotic_expansions') # Register classes in numbers abc from sage.rings import numbers_abc +del lazy_import diff --git a/src/sage/rings/all__sagemath_brial.py b/src/sage/rings/all__sagemath_brial.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/rings/all__sagemath_categories.py b/src/sage/rings/all__sagemath_categories.py index 4c0efe7b507..99a78aac8df 100644 --- a/src/sage/rings/all__sagemath_categories.py +++ b/src/sage/rings/all__sagemath_categories.py @@ -1,7 +1,29 @@ # sage_setup: distribution = sagemath-categories + +from sage.misc.lazy_import import lazy_import + # Ring base classes -from sage.rings.ring import Ring +from sage.rings.ring import (Ring, Field, CommutativeRing, IntegralDomain, + PrincipalIdealDomain) + +lazy_import("sage.rings.ring", "DedekindDomain") + +# Ring element base classes +from sage.structure.element import (CommutativeAlgebraElement, + RingElement, CommutativeRingElement, IntegralDomainElement, + DedekindDomainElement, PrincipalIdealDomainElement, + EuclideanDomainElement, FieldElement) + # Ideals from sage.rings.ideal import Ideal - ideal = Ideal + +# To be added in #36566: + +# from sage.rings.finite_rings.all__sagemath_categories import * +# from sage.rings.function_field.all__sagemath_categories import * +# from sage.rings.number_field.all__sagemath_categories import * +# from sage.rings.padics.all__sagemath_categories import * +# from sage.rings.polynomial.all__sagemath_categories import * + +del lazy_import diff --git a/src/sage/rings/all__sagemath_combinat.py b/src/sage/rings/all__sagemath_combinat.py new file mode 100644 index 00000000000..3e054b1da0b --- /dev/null +++ b/src/sage/rings/all__sagemath_combinat.py @@ -0,0 +1,9 @@ +from sage.rings.all__sagemath_categories import * + +from sage.misc.lazy_import import lazy_import + +# Lazy Laurent series ring +lazy_import('sage.rings.lazy_series_ring', ['LazyLaurentSeriesRing', 'LazyPowerSeriesRing', + 'LazySymmetricFunctions', 'LazyDirichletSeriesRing']) + +del lazy_import diff --git a/src/sage/rings/all__sagemath_flint.py b/src/sage/rings/all__sagemath_flint.py new file mode 100644 index 00000000000..098426b0e9b --- /dev/null +++ b/src/sage/rings/all__sagemath_flint.py @@ -0,0 +1,36 @@ + +from sage.rings.all__sagemath_ntl import * + +# Real numbers +from sage.rings.real_arb import RealBallField, RBF + +from sage.rings.complex_arb import ComplexBallField, CBF + +# Number field +from sage.rings.number_field.all import * + +from sage.rings.monomials import monomials + +# Algebraic numbers +from sage.rings.qqbar import (AlgebraicRealField, AA, + AlgebraicReal, + AlgebraicField, QQbar, + AlgebraicNumber, + number_field_elements_from_algebraics) + +# Intervals +from sage.rings.real_mpfi import (RealIntervalField, + RIF, + RealInterval) + +# Complex numbers +from sage.rings.complex_interval_field import ComplexIntervalField +from sage.rings.complex_interval import ( + create_ComplexIntervalFieldElement as ComplexIntervalFieldElement) + +from sage.misc.lazy_import import lazy_import + +lazy_import("sage.rings.imaginary_unit", "I") + +from sage.rings.cif import CIF +del lazy_import diff --git a/src/sage/rings/all__sagemath_gap.py b/src/sage/rings/all__sagemath_gap.py new file mode 100644 index 00000000000..82933d8cb54 --- /dev/null +++ b/src/sage/rings/all__sagemath_gap.py @@ -0,0 +1,6 @@ + +from sage.misc.lazy_import import lazy_import + +lazy_import('sage.rings.universal_cyclotomic_field', ['UniversalCyclotomicField', 'E']) + +del lazy_import diff --git a/src/sage/rings/all__sagemath_linbox.py b/src/sage/rings/all__sagemath_linbox.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/rings/all__sagemath_modules.py b/src/sage/rings/all__sagemath_modules.py new file mode 100644 index 00000000000..c82909b5984 --- /dev/null +++ b/src/sage/rings/all__sagemath_modules.py @@ -0,0 +1,24 @@ +from sage.rings.all__sagemath_categories import * + +from sage.rings.function_field.all__sagemath_modules import * +from sage.rings.polynomial.all__sagemath_modules import * + +# Real numbers +from sage.rings.real_mpfr import (RealField, RR, + create_RealNumber as RealNumber) # this is used by the preparser to wrap real literals -- very important. +Reals = RealField + +# Complex numbers + +from sage.rings.complex_mpfr import ComplexField +from sage.rings.complex_mpfr import create_ComplexNumber as ComplexNumber +Complexes = ComplexField + +from sage.rings.complex_double import ComplexDoubleField, ComplexDoubleElement, CDF + +from sage.rings.cc import CC + +from sage.rings.complex_mpc import MPComplexField + +# invariant theory +from sage.rings.invariants.all import * diff --git a/src/sage/rings/all__sagemath_ntl.py b/src/sage/rings/all__sagemath_ntl.py new file mode 100644 index 00000000000..c64b779350c --- /dev/null +++ b/src/sage/rings/all__sagemath_ntl.py @@ -0,0 +1,6 @@ + +from sage.rings.all__sagemath_pari import * + +from sage.rings.padics.all__sagemath_ntl import * + +from sage.rings.bernoulli_mod_p import bernoulli_mod_p, bernoulli_mod_p_single diff --git a/src/sage/rings/all__sagemath_pari.py b/src/sage/rings/all__sagemath_pari.py new file mode 100644 index 00000000000..73f3230790e --- /dev/null +++ b/src/sage/rings/all__sagemath_pari.py @@ -0,0 +1,12 @@ + +# Pseudo-ring of PARI objects. +from sage.rings.pari_ring import PariRing, Pari + +# p-adic field +from sage.rings.padics.all__sagemath_pari import * + +# valuations +from sage.rings.valuation.all import * + +# Tate algebras +from sage.rings.tate_algebra import TateAlgebra diff --git a/src/sage/rings/all__sagemath_singular.py b/src/sage/rings/all__sagemath_singular.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/rings/all__sagemath_symbolics.py b/src/sage/rings/all__sagemath_symbolics.py new file mode 100644 index 00000000000..be07e478a77 --- /dev/null +++ b/src/sage/rings/all__sagemath_symbolics.py @@ -0,0 +1 @@ +from sage.rings.all__sagemath_modules import * diff --git a/src/sage/rings/finite_rings/all.py b/src/sage/rings/finite_rings/all.py index 6d8699c7b25..a3dbfe5764f 100644 --- a/src/sage/rings/finite_rings/all.py +++ b/src/sage/rings/finite_rings/all.py @@ -18,6 +18,4 @@ # https://www.gnu.org/licenses/ # ***************************************************************************** -from sage.rings.finite_rings.finite_field_constructor import FiniteField -from sage.rings.finite_rings.conway_polynomials import conway_polynomial, exists_conway_polynomial -GF = FiniteField +from sage.rings.finite_rings.all__sagemath_categories import * diff --git a/src/sage/rings/finite_rings/all__sagemath_categories.py b/src/sage/rings/finite_rings/all__sagemath_categories.py new file mode 100644 index 00000000000..a2330a07fe4 --- /dev/null +++ b/src/sage/rings/finite_rings/all__sagemath_categories.py @@ -0,0 +1,8 @@ +from sage.rings.finite_rings.finite_field_constructor import FiniteField + +GF = FiniteField + +from sage.rings.finite_rings.conway_polynomials import conway_polynomial, exists_conway_polynomial + +# Finite residue fields +from sage.rings.finite_rings.residue_field import ResidueField diff --git a/src/sage/rings/finite_rings/all__sagemath_linbox.py b/src/sage/rings/finite_rings/all__sagemath_linbox.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/rings/finite_rings/all__sagemath_modules.py b/src/sage/rings/finite_rings/all__sagemath_modules.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/rings/finite_rings/all__sagemath_ntl.py b/src/sage/rings/finite_rings/all__sagemath_ntl.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/rings/finite_rings/all__sagemath_pari.py b/src/sage/rings/finite_rings/all__sagemath_pari.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/rings/function_field/all.py b/src/sage/rings/function_field/all.py index b423a0d58f5..e74571b211d 100644 --- a/src/sage/rings/function_field/all.py +++ b/src/sage/rings/function_field/all.py @@ -1,5 +1,11 @@ -from sage.rings.function_field.constructor import FunctionField +from sage.rings.function_field.all__sagemath_modules import * + +try: + from sage.rings.function_field.all__sagemath_symbolics import * +except ImportError: + pass from sage.misc.lazy_import import lazy_import lazy_import("sage.rings.function_field.drinfeld_modules.drinfeld_module", "DrinfeldModule") +del lazy_import diff --git a/src/sage/rings/function_field/all__sagemath_categories.py b/src/sage/rings/function_field/all__sagemath_categories.py new file mode 100644 index 00000000000..1cc1f1b8b2f --- /dev/null +++ b/src/sage/rings/function_field/all__sagemath_categories.py @@ -0,0 +1 @@ +from sage.rings.function_field.constructor import FunctionField diff --git a/src/sage/rings/function_field/all__sagemath_modules.py b/src/sage/rings/function_field/all__sagemath_modules.py new file mode 100644 index 00000000000..f1bd876653e --- /dev/null +++ b/src/sage/rings/function_field/all__sagemath_modules.py @@ -0,0 +1 @@ +from sage.rings.function_field.all__sagemath_categories import * diff --git a/src/sage/rings/function_field/all__sagemath_pari.py b/src/sage/rings/function_field/all__sagemath_pari.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/rings/function_field/all__sagemath_singular.py b/src/sage/rings/function_field/all__sagemath_singular.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/rings/function_field/all__sagemath_symbolics.py b/src/sage/rings/function_field/all__sagemath_symbolics.py new file mode 100644 index 00000000000..7c97e664309 --- /dev/null +++ b/src/sage/rings/function_field/all__sagemath_symbolics.py @@ -0,0 +1 @@ +from sage.rings.function_field.all__sagemath_modules import * diff --git a/src/sage/rings/invariants/all.py b/src/sage/rings/invariants/all.py index eb0cce3175f..d852ae19f3b 100644 --- a/src/sage/rings/invariants/all.py +++ b/src/sage/rings/invariants/all.py @@ -1,2 +1,3 @@ from sage.misc.lazy_import import lazy_import lazy_import('sage.rings.invariants.invariant_theory', 'invariant_theory') +del lazy_import diff --git a/src/sage/rings/number_field/all__sagemath_categories.py b/src/sage/rings/number_field/all__sagemath_categories.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/rings/number_field/all__sagemath_flint.py b/src/sage/rings/number_field/all__sagemath_flint.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/rings/number_field/all__sagemath_pari.py b/src/sage/rings/number_field/all__sagemath_pari.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/rings/padics/all.py b/src/sage/rings/padics/all.py index 7ece4e00493..457e8611c55 100644 --- a/src/sage/rings/padics/all.py +++ b/src/sage/rings/padics/all.py @@ -1,6 +1,2 @@ -from sage.rings.padics.factory import Zp, Zq, Zp as pAdicRing, ZpCR, ZpCA, ZpFM, ZpFP, ZpLC, ZpLF, ZqCR, ZqCA, ZqFM, ZqFP, ZpER -from sage.rings.padics.factory import Qp, Qq, Qp as pAdicField, QpCR, QpFP, QpLC, QpLF, QqCR, QqFP, QpER -from sage.rings.padics.factory import pAdicExtension -from sage.rings.padics.padic_generic import local_print_mode -from sage.rings.padics.pow_computer import PowComputer -from sage.rings.padics.pow_computer_ext import PowComputer_ext_maker + +from sage.rings.padics.all__sagemath_flint import * diff --git a/src/sage/rings/padics/all__sagemath_categories.py b/src/sage/rings/padics/all__sagemath_categories.py new file mode 100644 index 00000000000..fec72979f02 --- /dev/null +++ b/src/sage/rings/padics/all__sagemath_categories.py @@ -0,0 +1 @@ +from sage.rings.padics.padic_generic import local_print_mode diff --git a/src/sage/rings/padics/all__sagemath_flint.py b/src/sage/rings/padics/all__sagemath_flint.py new file mode 100644 index 00000000000..6362a8551f0 --- /dev/null +++ b/src/sage/rings/padics/all__sagemath_flint.py @@ -0,0 +1,2 @@ + +from sage.rings.padics.all__sagemath_ntl import * diff --git a/src/sage/rings/padics/all__sagemath_ntl.py b/src/sage/rings/padics/all__sagemath_ntl.py new file mode 100644 index 00000000000..dfa31e55f90 --- /dev/null +++ b/src/sage/rings/padics/all__sagemath_ntl.py @@ -0,0 +1,4 @@ + +from sage.rings.padics.all__sagemath_pari import * + +from sage.rings.padics.pow_computer_ext import PowComputer_ext_maker diff --git a/src/sage/rings/padics/all__sagemath_pari.py b/src/sage/rings/padics/all__sagemath_pari.py new file mode 100644 index 00000000000..5072418e856 --- /dev/null +++ b/src/sage/rings/padics/all__sagemath_pari.py @@ -0,0 +1,10 @@ + +from sage.rings.padics.all__sagemath_categories import * + +from sage.rings.padics.factory import Zp, Zq, Zp as pAdicRing, ZpCR, ZpCA, ZpFM, ZpFP, ZpLC, ZpLF, ZqCR, ZqCA, ZqFM, ZqFP, ZpER +from sage.rings.padics.factory import Qp, Qq, Qp as pAdicField, QpCR, QpFP, QpLC, QpLF, QqCR, QqFP, QpER +from sage.rings.padics.factory import pAdicExtension + +from sage.rings.padics.padic_printing import _printer_defaults as padic_printing + +from sage.rings.padics.pow_computer import PowComputer diff --git a/src/sage/rings/polynomial/all.py b/src/sage/rings/polynomial/all.py index 853f422bdc7..78e29ac0bb9 100644 --- a/src/sage/rings/polynomial/all.py +++ b/src/sage/rings/polynomial/all.py @@ -18,18 +18,8 @@ from sage.misc.lazy_import import lazy_import -# Quotient of polynomial ring -from sage.rings.polynomial.polynomial_quotient_ring import PolynomialQuotientRing -from sage.rings.polynomial.polynomial_quotient_ring_element import PolynomialQuotientRingElement - -# Univariate Polynomial Rings -from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing -from sage.rings.polynomial.polynomial_ring import polygen, polygens -from sage.rings.polynomial.polynomial_element import Polynomial - -# Multivariate Polynomial Rings -from sage.rings.polynomial.term_order import TermOrder -from sage.rings.polynomial.multi_polynomial_element import degree_lowest_rational_function +from sage.rings.polynomial.all__sagemath_categories import * +from sage.rings.polynomial.all__sagemath_modules import * # Generic convolution from sage.rings.polynomial.convolution import convolution @@ -38,19 +28,9 @@ from sage.rings.polynomial.polynomial_ring_constructor import BooleanPolynomialRing_constructor as BooleanPolynomialRing # Laurent Polynomial Rings -from sage.rings.polynomial.laurent_polynomial_ring import LaurentPolynomialRing lazy_import('sage.rings.polynomial.omega', 'MacMahonOmega') -# Infinite Polynomial Rings -from sage.rings.polynomial.infinite_polynomial_ring import InfinitePolynomialRing - -# Ore Polynomial Rings -lazy_import('sage.rings.polynomial.ore_polynomial_ring', 'OrePolynomialRing') -SkewPolynomialRing = OrePolynomialRing - -# Evaluation of cyclotomic polynomials -from sage.rings.polynomial.cyclotomic import cyclotomic_value - # Integer-valued Univariate Polynomial Ring lazy_import('sage.rings.polynomial.integer_valued_polynomials', 'IntegerValuedPolynomialRing') +del lazy_import diff --git a/src/sage/rings/polynomial/all__sagemath_brial.py b/src/sage/rings/polynomial/all__sagemath_brial.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/rings/polynomial/all__sagemath_categories.py b/src/sage/rings/polynomial/all__sagemath_categories.py new file mode 100644 index 00000000000..2b79da92a4c --- /dev/null +++ b/src/sage/rings/polynomial/all__sagemath_categories.py @@ -0,0 +1,21 @@ +# Quotient of polynomial ring +from sage.rings.polynomial.polynomial_quotient_ring import PolynomialQuotientRing +from sage.rings.polynomial.polynomial_quotient_ring_element import PolynomialQuotientRingElement + +# Univariate Polynomial Rings +from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing +from sage.rings.polynomial.polynomial_ring import polygen, polygens +from sage.rings.polynomial.polynomial_element import Polynomial + +# Multivariate Polynomial Rings +from sage.rings.polynomial.term_order import TermOrder +from sage.rings.polynomial.multi_polynomial_element import degree_lowest_rational_function + +# Infinite Polynomial Rings +from sage.rings.polynomial.infinite_polynomial_ring import InfinitePolynomialRing + +# Laurent Polynomial Rings +from sage.rings.polynomial.laurent_polynomial_ring import LaurentPolynomialRing + +# Evaluation of cyclotomic polynomials +from sage.rings.polynomial.cyclotomic import cyclotomic_value diff --git a/src/sage/rings/polynomial/all__sagemath_flint.py b/src/sage/rings/polynomial/all__sagemath_flint.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/rings/polynomial/all__sagemath_linbox.py b/src/sage/rings/polynomial/all__sagemath_linbox.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/rings/polynomial/all__sagemath_modules.py b/src/sage/rings/polynomial/all__sagemath_modules.py new file mode 100644 index 00000000000..647d682eb84 --- /dev/null +++ b/src/sage/rings/polynomial/all__sagemath_modules.py @@ -0,0 +1,7 @@ + +from sage.misc.lazy_import import lazy_import + +# Ore Polynomial Rings +lazy_import('sage.rings.polynomial.ore_polynomial_ring', 'OrePolynomialRing') +SkewPolynomialRing = OrePolynomialRing +del lazy_import diff --git a/src/sage/rings/polynomial/all__sagemath_ntl.py b/src/sage/rings/polynomial/all__sagemath_ntl.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/rings/polynomial/all__sagemath_pari.py b/src/sage/rings/polynomial/all__sagemath_pari.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/rings/polynomial/all__sagemath_singular.py b/src/sage/rings/polynomial/all__sagemath_singular.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/rings/polynomial/all__sagemath_symbolics.py b/src/sage/rings/polynomial/all__sagemath_symbolics.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/schemes/all.py b/src/sage/schemes/all.py index f5126a0dee1..2aa1a51d1ab 100644 --- a/src/sage/schemes/all.py +++ b/src/sage/schemes/all.py @@ -20,6 +20,9 @@ # https://www.gnu.org/licenses/ # ***************************************************************************** +from sage.schemes.all__sagemath_categories import * +from sage.schemes.all__sagemath_polyhedra import * + from sage.schemes.jacobians.all import * from sage.schemes.hyperelliptic_curves.all import * @@ -32,16 +35,6 @@ from sage.schemes.plane_quartics.all import * -from sage.schemes.generic.all import * - -from sage.schemes.toric.all import * - -from sage.schemes.affine.all import * - -from sage.schemes.projective.all import * - -from sage.schemes.product_projective.all import * - from sage.schemes.cyclic_covers.all import * from sage.schemes.berkovich.all import * diff --git a/src/sage/schemes/all__sagemath_categories.py b/src/sage/schemes/all__sagemath_categories.py new file mode 100644 index 00000000000..02c6722874e --- /dev/null +++ b/src/sage/schemes/all__sagemath_categories.py @@ -0,0 +1,4 @@ +from sage.schemes.generic.all import * +from sage.schemes.affine.all import * +from sage.schemes.projective.all import * +from sage.schemes.product_projective.all import * diff --git a/src/sage/schemes/all__sagemath_ntl.py b/src/sage/schemes/all__sagemath_ntl.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/schemes/all__sagemath_polyhedra.py b/src/sage/schemes/all__sagemath_polyhedra.py new file mode 100644 index 00000000000..2dc39d42014 --- /dev/null +++ b/src/sage/schemes/all__sagemath_polyhedra.py @@ -0,0 +1 @@ +from sage.schemes.toric.all import * diff --git a/src/sage/schemes/hyperelliptic_curves/all__sagemath_ntl.py b/src/sage/schemes/hyperelliptic_curves/all__sagemath_ntl.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/schemes/jacobians/all.py b/src/sage/schemes/jacobians/all.py index ec769450947..f087d853e90 100644 --- a/src/sage/schemes/jacobians/all.py +++ b/src/sage/schemes/jacobians/all.py @@ -1 +1 @@ -#from abstract_jacobian import is_Jacobian, Jacobian +# from abstract_jacobian import is_Jacobian, Jacobian diff --git a/src/sage/stats/all.py b/src/sage/stats/all.py index 34b229fa8ac..56d9f2eb1e8 100644 --- a/src/sage/stats/all.py +++ b/src/sage/stats/all.py @@ -1,11 +1,14 @@ -import sage.stats.distributions.catalog as distributions - -from sage.stats.r import ttest from sage.stats.basic_stats import (mean, mode, std, variance, median, moving_average) from sage.stats.hmm import all as hmm +import sage.stats.distributions.catalog as distributions + +from sage.misc.lazy_import import lazy_import + +lazy_import("sage.stats.r", "ttest") # We lazy_import the following modules since they import numpy which # slows down sage startup -from sage.misc.lazy_import import lazy_import + lazy_import("sage.stats.time_series", ["TimeSeries", "autoregressive_fit"]) lazy_import("sage.stats.intlist", ["IntList"]) +del lazy_import diff --git a/src/sage/structure/parent.pyx b/src/sage/structure/parent.pyx index 0d667075ff6..dd57aa02787 100644 --- a/src/sage/structure/parent.pyx +++ b/src/sage/structure/parent.pyx @@ -2143,7 +2143,7 @@ cdef class Parent(sage.structure.category_object.CategoryObject): sage: # needs sage.combinat sage.modules sage: R = QQ['q,t'].fraction_field() - sage: Sym = sage.combinat.sf.sf.SymmetricFunctions(R) + sage: Sym = SymmetricFunctions(R) sage: H = Sym.macdonald().H() sage: P = Sym.macdonald().P() sage: m = Sym.monomial() @@ -2180,7 +2180,7 @@ cdef class Parent(sage.structure.category_object.CategoryObject): sage: # needs sage.combinat sage.modules sage: R = QQ['q,t'].fraction_field() - sage: Sym = sage.combinat.sf.sf.SymmetricFunctions(R) + sage: Sym = SymmetricFunctions(R) sage: P = Sym.macdonald().P() sage: Ht = Sym.macdonald().Ht() sage: Ht._internal_coerce_map_from(P) diff --git a/src/sage/symbolic/all__sagemath_categories.py b/src/sage/symbolic/all__sagemath_categories.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/symbolic/all__sagemath_standard_no_symbolics.py b/src/sage/symbolic/all__sagemath_standard_no_symbolics.py new file mode 100644 index 00000000000..e69de29bb2d