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

Commit

Permalink
Merge branch 'public/lie_algebras/pbw_filtered-23270' into public/alg…
Browse files Browse the repository at this point in the history
…ebras/yangians-15484
  • Loading branch information
Travis Scrimshaw committed Jun 18, 2017
2 parents 707c5f1 + 522d374 commit f26834b
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion src/sage/algebras/lie_algebras/poincare_birkhoff_witt.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def __init__(self, g, basis_key, prefix, **kwds):
CombinatorialFreeModule.__init__(self, R, monomials,
prefix='', bracket=False, latex_bracket=False,
sorting_key=self._monomial_key,
category=Algebras(R).WithBasis())
category=Algebras(R).WithBasis().Filtered())

def _basis_key(self, x):
"""
Expand Down Expand Up @@ -398,3 +398,21 @@ def product_on_basis(self, lhs, rhs):
terms += self.monomial(lead * trail)
return self.monomial(lhs // trail) * terms * self.monomial(rhs // lead)

def degree_on_basis(self, m):
"""
Return the degree of the basis element indexed by ``m``.
EXAMPLES::
sage: L = lie_algebras.sl(QQ, 2)
sage: PBW = L.pbw_basis()
sage: E,F,H = PBW.algebra_generators()
sage: PBW.degree_on_basis(E.leading_support())
1
sage: PBW.degree_on_basis(((H*F)^10).leading_support())
20
sage: ((H*F*E)^4).maximal_degree()
12
"""
return m.length()

0 comments on commit f26834b

Please sign in to comment.