Skip to content

Commit

Permalink
Fixing up some things from the rebase and caught from running the all…
Browse files Browse the repository at this point in the history
… tests.
  • Loading branch information
tscrim committed Apr 4, 2024
1 parent 063c83e commit ee96177
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 43 deletions.
9 changes: 5 additions & 4 deletions src/sage/algebras/lie_algebras/nilpotent_lie_algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,10 @@ def __classcall_private__(cls, R, s_coeff, names=None, index_set=None,
names.append(k)

from sage.structure.indexed_generators import standardize_names_index_set
from sage.algebras.lie_algebras.superliealgebra import _standardize_s_coeff

names, index_set = standardize_names_index_set(names, index_set)
s_coeff = LieAlgebraWithStructureCoefficients._standardize_s_coeff(
s_coeff, index_set)
s_coeff = _standardize_s_coeff(s_coeff, index_set, (0,)*len(index_set))

cat = LieAlgebras(R).FiniteDimensional().WithBasis().Nilpotent()
category = cat.or_subcategory(category)
Expand Down Expand Up @@ -415,8 +416,8 @@ def __init__(self, R, r, s, names, naming, category, **kwds):
for W_ind, W in basis_by_deg[dx + dy]}

names, index_set = standardize_names_index_set(names, index_set)
s_coeff = LieAlgebraWithStructureCoefficients._standardize_s_coeff(
s_coeff, index_set)
from sage.algebras.lie_algebras.superliealgebra import _standardize_s_coeff
s_coeff = _standardize_s_coeff(s_coeff, index_set, (0,)*len(index_set))

NilpotentLieAlgebra_dense.__init__(self, R, s_coeff, names,
index_set, s,
Expand Down
18 changes: 10 additions & 8 deletions src/sage/algebras/lie_algebras/superliealgebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ def __getitem__(self, x):
sage: L.<x,y,z> = SuperLieAlgebra(QQ, {('x','y'):{'z':1}}, (1,1,2))
sage: L[x, y]
z
"""
if isinstance(x, tuple) and len(x) == 2:
# Check if we need to construct an ideal
Expand Down Expand Up @@ -205,13 +206,14 @@ def degree_on_basis(self, x):
# Morphisms of graded Lie algebras:

def graded_morphism(self, on_generators, domain, codomain, argument):
"""
r"""
Return a graded morphim of super Lie algebras.
EXAMPLES::
sage: L.<x,y,z> = SuperLieAlgebra(QQ, {('x','y'):{'z':1}}, (1,1,2))
sage: L.graded_morphism({x:x, y:y, z:z}, L, L, x.bracket(y))
(0, 0, 1)
"""
from itertools import combinations
from sage.matrix.constructor import matrix
Expand Down Expand Up @@ -272,9 +274,9 @@ def _bracket_(self, rt):
sage: L.<x,y,z> = SuperLieAlgebra(QQ, {('x','y'):{'z':1}}, (1,1,2))
sage: x.bracket(y)
B['z']
z
sage: y.bracket(x)
B['z']
z
"""
P = self.parent()

Expand Down Expand Up @@ -317,15 +319,15 @@ def _standardize_s_coeff(s_coeff, index_set, degrees):
EXAMPLES::
sage: from sage.algebras.lie_algebras.structure_coefficients import LieAlgebraWithStructureCoefficients
sage: from sage.algebras.lie_algebras.superliealgebra import _standardize_s_coeff
sage: d = {('y', 'x'): {'x': -1}}
sage: LieAlgebraWithStructureCoefficients._standardize_s_coeff(d, ('x', 'y'), (0, 0))
sage: _standardize_s_coeff(d, ('x', 'y'), (0, 0))
Finite family {('x', 'y'): (('x', 1),)}
sage: LieAlgebraWithStructureCoefficients._standardize_s_coeff(d, ('x', 'y'), (1, 0))
sage: _standardize_s_coeff(d, ('x', 'y'), (1, 0))
Finite family {('x', 'y'): (('x', 1),)}
sage: LieAlgebraWithStructureCoefficients._standardize_s_coeff(d, ('x', 'y'), (0, 1))
sage: _standardize_s_coeff(d, ('x', 'y'), (0, 1))
Finite family {('x', 'y'): (('x', 1),)}
sage: LieAlgebraWithStructureCoefficients._standardize_s_coeff(d, ('x', 'y'), (1, 1))
sage: _standardize_s_coeff(d, ('x', 'y'), (1, 1))
Finite family {('x', 'y'): (('x', -1),)}
"""
# Try to handle infinite basis (once/if supported)
Expand Down
31 changes: 0 additions & 31 deletions src/sage/categories/finite_dimensional_lie_algebras_with_basis.py
Original file line number Diff line number Diff line change
Expand Up @@ -1630,37 +1630,6 @@ def morphism(self, on_generators, codomain=None, base_map=None, check=True):
return LieAlgebraMorphism_from_generators(on_generators, domain=self,
codomain=codomain, base_map=base_map, check=check)

def representation(self, f=None):
"""
Return a representation of ``self``.
Currently the only implementated method of constructing a
representation is by explicitly specifying the action of
the basis elements of ``self`` by matrices using a ``dict``.
If no arguments are given, then this returns the trivial
representation.
.. SEEALSO::
:class:`~sage.algebras.lie_algebras.representation.RepresentationByMorphism`
EXAMPLES::
sage: L.<x,y> = LieAlgebra(QQ, {('x','y'): {'y':1}})
sage: f = {x: Matrix([[1,0],[0,0]]), y: Matrix([[0,1],[0,0]])}
sage: L.representation(f)
Representation of Lie algebra on 2 generators (x, y) over Rational Field defined by:
[1 0]
x |--> [0 0]
[0 1]
y |--> [0 0]
"""
if f is None:
return self.trivial_representation()
from sage.algebras.lie_algebras.representation import RepresentationByMorphism
return RepresentationByMorphism(self, f)

@cached_method
def universal_polynomials(self):
r"""
Expand Down

0 comments on commit ee96177

Please sign in to comment.