Skip to content
Merged
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
3 changes: 0 additions & 3 deletions src/sage/algebras/lie_algebras/quotient.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
from sage.categories.homset import Hom
from sage.categories.lie_algebras import LieAlgebras
from sage.categories.morphism import SetMorphism
from sage.structure.element import Element
from sage.structure.indexed_generators import standardize_names_index_set


Expand Down Expand Up @@ -218,7 +217,6 @@ def __classcall_private__(cls, ambient, I, names=None, index_set=None,

# extract an index set from a complementary basis to the ideal
I_supp = [X.leading_support() for X in I.leading_monomials()]
inv = ambient.basis().inverse_family()
IA = I.ambient()
B = ambient.basis()
if index_set_mapping is None:
Expand Down Expand Up @@ -264,7 +262,6 @@ def __init__(self, L, I, names, index_set, index_set_mapping, category=None):
sage: TestSuite(K).run()
"""
B = L.basis()
IA = I.ambient()
self._index_set_mapping = dict(index_set_mapping)
sm = L.module().submodule_with_basis([I.reduce(B[k]).to_vector()
for k in self._index_set_mapping.values()])
Expand Down
8 changes: 4 additions & 4 deletions src/sage/categories/coxeter_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -1924,10 +1924,10 @@ def reduced_word_graph(self):

P = self.parent()
edges = []
for i, x in enumerate(R):
x = tuple(x)
for y in R[i:]:
y = tuple(y)
for i, _x in enumerate(R):
x = tuple(_x)
for _y in R[i:]:
y = tuple(_y)
# Check that the reduced expressions differ by only
# a single braid move
j = 0
Expand Down
2 changes: 1 addition & 1 deletion src/sage/categories/crystals.py
Original file line number Diff line number Diff line change
Expand Up @@ -1248,7 +1248,7 @@ def direct_sum(self, X):
__add__ = direct_sum

@abstract_method(optional=True)
def connected_components_generators(self):
def connected_components_generators(self) -> tuple:
"""
Return a tuple of generators for each of the connected components
of ``self``.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1075,7 +1075,7 @@ def ideal(self, *gens, **kwds):
[x, y]
"""
from sage.algebras.lie_algebras.subalgebra import LieSubalgebra_finite_dimensional_with_basis
from sage.structure.element import parent, Element
from sage.structure.element import Element
if len(gens) == 1 and not isinstance(gens[0], Element):
gens = gens[0]
category = kwds.pop('category', None)
Expand Down Expand Up @@ -2720,17 +2720,17 @@ def reduce(self, X):
P = X.parent()
X = self.ambient()(X) # make sure it is in the ambient space
for Y in self.basis():
Y = self.lift(Y)
k, c = Y.leading_item(key=self._order)
lY = self.lift(Y)
k, c = lY.leading_item(key=self._order)
if not X[k]: # scalar will be 0
continue

if is_field:
X -= (X[k] / c) * Y
X -= (X[k] / c) * lY
else:
try:
q, _ = X[k].quo_rem(c)
X -= q * Y
X -= q * lY
except AttributeError:
break

Expand Down
1 change: 0 additions & 1 deletion src/sage/categories/finite_lattice_posets.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
# *****************************************************************************

from sage.categories.category_with_axiom import CategoryWithAxiom
from sage.misc.cachefunc import cached_method


class FiniteLatticePosets(CategoryWithAxiom):
Expand Down
4 changes: 2 additions & 2 deletions src/sage/categories/highest_weight_crystals.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def additional_structure(self):
class ParentMethods:

@cached_method
def highest_weight_vectors(self):
def highest_weight_vectors(self) -> tuple:
r"""
Return the highest weight vectors of ``self``.

Expand Down Expand Up @@ -672,7 +672,7 @@ class ParentMethods:
Implement operations on tensor products of crystals.
"""
@cached_method
def highest_weight_vectors(self):
def highest_weight_vectors(self) -> tuple:
r"""
Return the highest weight vectors of ``self``.

Expand Down
3 changes: 0 additions & 3 deletions src/sage/categories/ore_modules.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
from sage.misc.lazy_attribute import lazy_attribute

from sage.categories.modules import Modules
from sage.categories.category_types import Category_over_base_ring
from sage.categories.homsets import Homsets
from sage.rings.polynomial.ore_polynomial_ring import OrePolynomialRing


Expand Down
2 changes: 1 addition & 1 deletion src/sage/categories/pushout.py
Original file line number Diff line number Diff line change
Expand Up @@ -1955,7 +1955,7 @@ def _apply_functor(self, R):
return FreeModule(R, self.n, sparse=self.is_sparse, inner_product_matrix=self.inner_product_matrix,
with_basis=self.with_basis, basis_keys=self.basis_keys)
return FreeModule(R, self.n, sparse=self.is_sparse, inner_product_matrix=self.inner_product_matrix,
with_basis=self.with_basis, basis_keys=self.basis_keys, name=name, latex_name=latex_name)
with_basis=self.with_basis, basis_keys=self.basis_keys, name=name, latex_name=latex_name)

def _apply_functor_to_morphism(self, f):
"""
Expand Down
2 changes: 0 additions & 2 deletions src/sage/categories/rings.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
from sage.misc.prandom import randint
from sage.categories.category_with_axiom import CategoryWithAxiom
from sage.categories.rngs import Rngs
from sage.structure.element import Element
from sage.structure.parent import Parent


class Rings(CategoryWithAxiom):
Expand Down
12 changes: 5 additions & 7 deletions src/sage/categories/supercrystals.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def genuine_highest_weight_vectors(self):

connected_components_generators = genuine_highest_weight_vectors

def connected_components(self):
def connected_components(self) -> list:
r"""
Return the connected components of ``self`` as subcrystals.

Expand Down Expand Up @@ -174,17 +174,15 @@ def connected_components(self):
CCs = []

for mg in self.connected_components_generators():
if not isinstance(mg, tuple):
mg = (mg,)
subcrystal = self.subcrystal(generators=mg,
subcrystal = self.subcrystal(generators=(mg,),
index_set=index_set,
cartan_type=cartan_type,
category=category)
CCs.append(subcrystal)

return CCs

def genuine_lowest_weight_vectors(self):
def genuine_lowest_weight_vectors(self) -> tuple:
r"""
Return the tuple of genuine lowest weight elements of ``self``.

Expand All @@ -205,7 +203,7 @@ def genuine_lowest_weight_vectors(self):
return tuple([x[1] for x in self._genuine_highest_lowest_weight_vectors()])

@cached_method
def _genuine_highest_lowest_weight_vectors(self):
def _genuine_highest_lowest_weight_vectors(self) -> tuple:
r"""
Return the genuine lowest and highest weight elements of ``self``.

Expand Down Expand Up @@ -267,7 +265,7 @@ def character(self):
return A.sum(A(x.weight()) for x in self)

@cached_method
def highest_weight_vectors(self):
def highest_weight_vectors(self) -> tuple:
"""
Return the highest weight vectors of ``self``.

Expand Down
Loading