Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/sage/algebras/affine_nil_temperley_lieb.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
# ****************************************************************************
from sage.categories.algebras_with_basis import AlgebrasWithBasis
from sage.combinat.root_system.cartan_type import CartanType
from sage.combinat.root_system.weyl_group import WeylGroup
from sage.rings.ring import Ring
from sage.rings.integer_ring import ZZ
from sage.combinat.free_module import CombinatorialFreeModule
Expand Down Expand Up @@ -57,6 +56,7 @@ def __init__(self, n, R=ZZ, prefix='a'):
raise TypeError("argument R must be a ring")
self._cartan_type = CartanType(['A', n - 1, 1])
self._n = n
from sage.combinat.root_system.weyl_group import WeylGroup
W = WeylGroup(self._cartan_type)
self._prefix = prefix
self._index_set = W.index_set()
Expand Down
4 changes: 3 additions & 1 deletion src/sage/algebras/iwahori_hecke_algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
from sage.rings.integer_ring import ZZ
from sage.rings.polynomial.laurent_polynomial_ring import LaurentPolynomialRing
from sage.arith.misc import is_square
from sage.combinat.root_system.coxeter_group import CoxeterGroup
from sage.sets.family import Family
from sage.combinat.free_module import CombinatorialFreeModule

Expand Down Expand Up @@ -445,6 +444,7 @@ def __classcall_private__(cls, W, q1, q2=-1, base_ring=None):
True
"""
if W not in CoxeterGroups():
from sage.combinat.root_system.coxeter_group import CoxeterGroup
W = CoxeterGroup(W)
if base_ring is None:
base_ring = q1.parent()
Expand Down Expand Up @@ -2018,6 +2018,7 @@ def __init__(self, IHAlgebra, prefix=None):
if isinstance(IHAlgebra._W, Coxeter3Group):
self._W_Coxeter3 = IHAlgebra._W
else:
from sage.combinat.root_system.coxeter_group import CoxeterGroup
self._W_Coxeter3 = CoxeterGroup(IHAlgebra._W.coxeter_type(), implementation='coxeter3')

def hash_involution_on_basis(self, w):
Expand Down Expand Up @@ -2751,6 +2752,7 @@ def __classcall_private__(cls, W):
True
"""
if W not in CoxeterGroups():
from sage.combinat.root_system.coxeter_group import CoxeterGroup
W = CoxeterGroup(W)
return super().__classcall__(cls, W)

Expand Down
10 changes: 5 additions & 5 deletions src/sage/combinat/all.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@

# Permutations
from .permutation import Permutation, Permutations, Arrangements, CyclicPermutations, CyclicPermutationsOfPartition
from .affine_permutation import AffinePermutationGroup
lazy_import('sage.combinat.affine_permutation', 'AffinePermutationGroup')
lazy_import('sage.combinat.colored_permutations', ['ColoredPermutations',
'SignedPermutation',
'SignedPermutations'])
Expand Down Expand Up @@ -203,10 +203,10 @@
['ParkingFunctions', 'ParkingFunction'])

# Trees and Tamari interval posets
from .ordered_tree import (OrderedTree, OrderedTrees,
LabelledOrderedTree, LabelledOrderedTrees)
from .binary_tree import (BinaryTree, BinaryTrees,
LabelledBinaryTree, LabelledBinaryTrees)
lazy_import('sage.combinat.ordered_tree', ['OrderedTree', 'OrderedTrees',
'LabelledOrderedTree', 'LabelledOrderedTrees'])
lazy_import('sage.combinat.binary_tree', ['BinaryTree', 'BinaryTrees',
'LabelledBinaryTree', 'LabelledBinaryTrees'])
lazy_import('sage.combinat.interval_posets', ['TamariIntervalPoset', 'TamariIntervalPosets'])
lazy_import('sage.combinat.rooted_tree', ('RootedTree', 'RootedTrees',
'LabelledRootedTree', 'LabelledRootedTrees'))
Expand Down
3 changes: 2 additions & 1 deletion src/sage/combinat/k_tableau.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
from sage.misc.inherit_comparison import InheritComparisonClasscallMetaclass
from sage.combinat.skew_tableau import SkewTableau, SemistandardSkewTableaux
from sage.combinat.partition import Partition, Partitions
from sage.combinat.root_system.weyl_group import WeylGroup
from sage.combinat.core import Core
from sage.rings.integer_ring import ZZ
from sage.functions.generalized import sgn
Expand Down Expand Up @@ -1826,6 +1825,7 @@ def straighten_input(t, k):
...
ValueError: inconsistent number of rows: should be 4 but got 5
"""
from sage.combinat.root_system.weyl_group import WeylGroup
W = WeylGroup(['A', k, 1], prefix='s')
if len(t) > 0:
if isinstance(t[0], (list, tuple)):
Expand Down Expand Up @@ -1864,6 +1864,7 @@ def __classcall_private__(cls, t, k, inner_shape = []):
"""
if isinstance(t, cls):
return t
from sage.combinat.root_system.weyl_group import WeylGroup
W = WeylGroup(['A', k, 1], prefix='s')
w = cls.straighten_input(t, k)
weight = tuple(w[i].length() for i in range(len(w) - 1, -1, -1))
Expand Down
2 changes: 1 addition & 1 deletion src/sage/combinat/partition.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,6 @@
from sage.combinat.integer_lists.invlex import IntegerListsBackend_invlex
from sage.combinat.integer_vector_weighted import iterator_fast as weighted_iterator_fast
from sage.combinat.combinat_cython import conjugate
from sage.combinat.root_system.weyl_group import WeylGroup
from sage.combinat.combinatorial_map import combinatorial_map
from sage.groups.perm_gps.permgroup import PermutationGroup
from sage.graphs.dot2tex_utils import have_dot2tex
Expand Down Expand Up @@ -4633,6 +4632,7 @@ def from_kbounded_to_grassmannian(self, k):
[0 1 0]
[0 0 1]
"""
from sage.combinat.root_system.weyl_group import WeylGroup
return WeylGroup(['A', k,1 ]).from_reduced_word(self.from_kbounded_to_reduced_word(k))

def to_list(self):
Expand Down
13 changes: 7 additions & 6 deletions src/sage/combinat/root_system/all.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,13 @@

from sage.misc.lazy_import import lazy_import

from .cartan_type import CartanType
from .dynkin_diagram import DynkinDiagram
from .cartan_matrix import CartanMatrix
from .coxeter_matrix import CoxeterMatrix
from .coxeter_type import CoxeterType
from .root_system import RootSystem, WeylDim
lazy_import('sage.combinat.root_system.cartan_type', 'CartanType')
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')
lazy_import('sage.combinat.root_system.coxeter_type', 'CoxeterType')
lazy_import('sage.combinat.root_system.root_system', 'RootSystem')
lazy_import('sage.combinat.root_system.root_system', 'WeylDim')
lazy_import('sage.combinat.root_system.weyl_group', ['WeylGroup',
'WeylGroupElement'])
lazy_import('sage.combinat.root_system.reflection_group_real',
Expand Down
3 changes: 2 additions & 1 deletion src/sage/groups/perm_gps/permgroup.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@
from sage.groups.perm_gps.constructor import PermutationGroupElement as PermutationConstructor, standardize_generator
from sage.groups.abelian_gps.abelian_group import AbelianGroup
from sage.misc.cachefunc import cached_method
from sage.groups.class_function import ClassFunction_libgap
from sage.misc.lazy_import import lazy_import
lazy_import('sage.groups.class_function', 'ClassFunction_libgap')
from sage.sets.finite_enumerated_set import FiniteEnumeratedSet
from sage.categories.finite_enumerated_sets import FiniteEnumeratedSets
from sage.groups.conjugacy_classes import ConjugacyClassGAP
Expand Down
1 change: 1 addition & 0 deletions src/sage/modular/arithgroup/congroup_gamma.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ def image_mod_n(self):
[0 1]
)
"""
from sage.groups.matrix_gps.finitely_generated import MatrixGroup
return MatrixGroup([matrix(Zmod(self.level()), 2, 2, 1)])


Expand Down
2 changes: 1 addition & 1 deletion src/sage/modular/arithgroup/congroup_gammaH.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
from sage.misc.cachefunc import cached_method
from sage.rings.integer_ring import ZZ
from sage.rings.finite_rings.integer_mod_ring import Zmod
from sage.groups.matrix_gps.finitely_generated import MatrixGroup
from sage.matrix.constructor import matrix
from sage.structure.richcmp import richcmp_method, richcmp

Expand Down Expand Up @@ -1289,6 +1288,7 @@ def image_mod_n(self):
raise NotImplementedError("matrix groups over ring of integers modulo 1 not implemented")
gens = [matrix(Zmod(N), 2, 2, [x, 0, 0, Zmod(N).one() / x]) for x in self._generators_for_H()]
gens += [matrix(Zmod(N), 2, 2, [1, 1, 0, 1])]
from sage.groups.matrix_gps.finitely_generated import MatrixGroup
return MatrixGroup(gens)

def atkin_lehner_matrix(self, Q):
Expand Down
5 changes: 3 additions & 2 deletions src/sage/modular/hecke/ambient_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
import sage.matrix.matrix_space as matrix_space
from sage.matrix.constructor import matrix

from sage.modular.arithgroup.all import Gamma0 # for Sturm bound


def is_AmbientHeckeModule(x) -> bool:
r"""
Expand Down Expand Up @@ -488,6 +486,7 @@ def free_module(self):
sage: ModularForms(59, 2).free_module()
Vector space of dimension 6 over Rational Field
"""
from sage.modular.arithgroup.all import Gamma0
try:
return self.__free_module
except AttributeError:
Expand Down Expand Up @@ -518,6 +517,8 @@ def hecke_bound(self):
15
"""
from sage.misc.verbose import verbose
from sage.modular.arithgroup.all import Gamma0

try:
if self.is_cuspidal():
return Gamma0(self.level()).sturm_bound(self.weight())
Expand Down