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

Commit

Permalink
Fix the counit in sp/o bases.
Browse files Browse the repository at this point in the history
  • Loading branch information
Travis Scrimshaw committed Dec 27, 2013
1 parent 4933218 commit 223b11b
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/sage/combinat/sf/orthogonal.py
Expand Up @@ -183,6 +183,21 @@ def _multiply(self, r, l):
s = self.realization_of().schur()
return self(s(r) * s(l))

def counit(self, x):
"""
Return the counit of ``x`` in ``self``.
EXAMPLES::
sage: o = SymmetricFunctions(QQ).o()
sage: o.an_element()
2*o[] + 2*o[1] + 3*o[2]
sage: o.counit(o.an_element())
-1
"""
s = self.realization_of().schur()
return s.counit(s(x))

@cached_method
def _s_to_o_on_basis(self, lam):
r"""
Expand Down
15 changes: 15 additions & 0 deletions src/sage/combinat/sf/symplectic.py
Expand Up @@ -185,6 +185,21 @@ def _multiply(self, r, l):
s = self.realization_of().schur()
return self(s(r) * s(l))

def counit(self, x):
"""
Return the counit of ``x`` in ``self``.
EXAMPLES::
sage: sp = SymmetricFunctions(QQ).sp()
sage: sp.an_element()
2*sp[] + 2*sp[1] + 3*sp[2]
sage: sp.counit(sp.an_element())
2
"""
s = self.realization_of().schur()
return s.counit(s(x))

@cached_method
def _s_to_sp_on_basis(self, lam):
r"""
Expand Down

0 comments on commit 223b11b

Please sign in to comment.