Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
trac #15333 remove import of is_* in modules/all.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Frederic Chapoton authored and Frédéric Chapoton committed Jan 4, 2014
1 parent 075c388 commit 865ce70
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 22 deletions.
2 changes: 1 addition & 1 deletion src/sage/modular/abvar/abvar.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
from sage.rings.all import (ZZ, QQ, QQbar, LCM,
divisors, Integer, prime_range)
from sage.rings.ring import is_Ring
from sage.modules.all import is_FreeModule
from sage.modules.free_module import is_FreeModule
from sage.modular.arithgroup.all import is_CongruenceSubgroup, is_Gamma0, is_Gamma1, is_GammaH
from sage.modular.modsym.all import ModularSymbols
from sage.modular.modsym.space import ModularSymbolsSpace
Expand Down
4 changes: 2 additions & 2 deletions src/sage/modular/hecke/ambient_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -929,14 +929,14 @@ def submodule(self, M, Mdual=None, check=True):
Modular Forms subspace of dimension 2 of Modular Forms space of dimension 3 for Congruence Subgroup Gamma0(37) of weight 2 over Rational Field
"""
if check:
if not sage.modules.all.is_FreeModule(M):
if not sage.modules.free_module.is_FreeModule(M):
V = self.free_module()
if isinstance(M, (list,tuple)):
M = V.span([V(x.element()) for x in M])
else:
M = V.span(M)
if not M.is_submodule(self.free_module()):
raise TypeError, "M must be a submodule of the free module associated to this module."
raise TypeError("M must be a submodule of the free module associated to this module.")
if M == self.free_module():
return self
return self._submodule_class()(self, M, Mdual, check=check)
Expand Down
8 changes: 4 additions & 4 deletions src/sage/modular/hecke/submodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def __init__(self, ambient, submodule, dual_free_module=None, check=True):
"""
if not isinstance(ambient, ambient_module.AmbientHeckeModule):
raise TypeError, "ambient must be an ambient Hecke module"
if not sage.modules.all.is_FreeModule(submodule):
if not sage.modules.free_module.is_FreeModule(submodule):
raise TypeError, "submodule must be a free module"
if not submodule.is_submodule(ambient.free_module()):
raise ValueError, "submodule must be a submodule of the ambient free module"
Expand All @@ -93,7 +93,7 @@ def __init__(self, ambient, submodule, dual_free_module=None, check=True):
module.HeckeModule_free_module.__init__(self,
ambient.base_ring(), ambient.level(), ambient.weight())
if not (dual_free_module is None):
if not sage.modules.all.is_FreeModule(dual_free_module):
if not sage.modules.free_module.is_FreeModule(dual_free_module):
raise TypeError, "dual_free_module must be a free module"
if dual_free_module.rank () != submodule.rank():
raise ArithmeticError, "dual_free_module must have the same rank as submodule"
Expand Down Expand Up @@ -896,7 +896,7 @@ def submodule(self, M, Mdual=None, check=True):
sage: S.submodule(S[0].free_module())
Modular Symbols subspace of dimension 2 of Modular Symbols space of dimension 18 for Gamma_0(18) of weight 4 with sign 0 over Rational Field
"""
if not sage.modules.all.is_FreeModule(M):
if not sage.modules.free_module.is_FreeModule(M):
V = self.ambient_module().free_module()
if isinstance(M, (list,tuple)):
M = V.span([V(x.element()) for x in M])
Expand Down Expand Up @@ -970,4 +970,4 @@ def hecke_bound(self):
if self.is_cuspidal():
return self.sturm_bound()
else:
return self.ambient_hecke_module().hecke_bound()
return self.ambient_hecke_module().hecke_bound()
2 changes: 1 addition & 1 deletion src/sage/modular/modsym/boundary.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
from sage.misc.misc import repr_lincomb

import sage.modules.free_module as free_module
from sage.modules.all import is_FreeModuleElement
from sage.modules.free_module_element import is_FreeModuleElement

import sage.modular.arithgroup.all as arithgroup
import sage.modular.cusps as cusps
Expand Down
20 changes: 7 additions & 13 deletions src/sage/modules/all.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,18 @@
# http://www.gnu.org/licenses/
#*****************************************************************************

from free_module import FreeModule, VectorSpace, span, is_FreeModule
from free_module import FreeModule, VectorSpace, span

from free_quadratic_module import FreeQuadraticModule, QuadraticSpace, InnerProductSpace, is_FreeQuadraticModule
from free_quadratic_module import (FreeQuadraticModule, QuadraticSpace,
InnerProductSpace)

from free_module_element import is_FreeModuleElement, vector, free_module_element, zero_vector, random_vector
from free_module_element import (vector, free_module_element, zero_vector,
random_vector)

from free_module_homspace import is_FreeModuleHomspace

from free_module_morphism import is_FreeModuleMorphism

from module import is_Module, is_VectorSpace

from module_element import ModuleElement, is_ModuleElement
from module_element import ModuleElement

import vector_callable_symbolic_dense

from vector_space_homspace import is_VectorSpaceHomspace

from vector_space_morphism import is_VectorSpaceMorphism, linear_transformation
from vector_space_morphism import linear_transformation

import vector_symbolic_dense
3 changes: 2 additions & 1 deletion src/sage/schemes/elliptic_curves/monsky_washnitzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1737,7 +1737,8 @@ def matrix_of_frobenius(Q, p, M, trace=None, compute_exact_forms=False):
from sage.rings.laurent_series_ring import is_LaurentSeriesRing
from sage.rings.integral_domain import is_IntegralDomain

from sage.modules.all import FreeModule, is_FreeModuleElement
from sage.modules.free_module import FreeModule
from sage.modules.free_module_element import is_FreeModuleElement

from sage.misc.profiler import Profiler
from sage.misc.misc import repr_lincomb
Expand Down

0 comments on commit 865ce70

Please sign in to comment.