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

Commit

Permalink
_lift_idempotent for elements of sub-algebras
Browse files Browse the repository at this point in the history
  • Loading branch information
avirmaux committed Jul 25, 2014
1 parent a203460 commit 75e4f5a
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 6 deletions.
26 changes: 26 additions & 0 deletions src/sage/categories/algebras.py
Expand Up @@ -241,3 +241,29 @@ def _mul_(self, right):
"""
p = self.parent()
return p.retract( self.lift() * right.lift())

def _lift_idempotent(self):
r"""
Lift an idempotent of parent of ``self`` into an indempotent of
parent of ``self.lift()``
EXAMPLES::
sage: A3 = SymmetricGroup(3).algebra(QQ)
sage: Z3 = A3.center()
sage: Z3._refine_category_(SemisimpleAlgebras(QQ))
sage: orth = Z3.orthogonal_idempotents()
sage: x = orth[2]._lift_idempotent()
sage: x not in Z3 and x in A3
True
TODO: better documentation.
"""
idempOld = None
idemp = self.lift()
p = idemp.parent()
while idemp <> idempOld:
tmp = idemp
idemp = (p.one() - (p.one() - idemp**2)**2)
idempOld = tmp
return idemp
4 changes: 4 additions & 0 deletions src/sage/categories/finite_dimensional_algebras_with_basis.py
Expand Up @@ -343,6 +343,10 @@ def center(self):
center.rename("Center of {}".format(self))
return center

# def orthogonal_idempotents(self):
# pass


class ElementMethods:
def to_matrix(self, base_ring=None, action=operator.mul, side='left'):
"""
Expand Down
18 changes: 12 additions & 6 deletions src/sage/categories/semisimple_algebras.py
Expand Up @@ -84,9 +84,6 @@ def _semi_simple_commutative_decomposition_generators(self, listGen=None, topLev
sage: G5 = SymmetricGroup(5)
sage: A5 = G5.algebra(QQ)
sage: Z5 = A5.center()
sage: Z5.an_element() ** 2
179*B[0] + 44*B[1] + 38*B[2] + 39*B[3] + 36*B[4] + 24*B[5]
+ 45*B[6]
sage: Z5._refine_category_(SemisimpleAlgebras(QQ))
sage: gens = Z5._semi_simple_commutative_decomposition_generators()
sage: sorted(gens, key=str)
Expand Down Expand Up @@ -143,14 +140,19 @@ def orthogonal_idempotents(self):
r"""
Return the minimal orthogonal idempotents of ``self``.
INPUT::
- ``self`` a commutative semisimple algebra
OUTPUT::
- list of idempotents of ``self``
EXAMPLES::
sage: G5 = SymmetricGroup(5)
sage: A5 = G5.algebra(QQ)
sage: Z5 = A5.center()
sage: Z5.an_element() ** 2
179*B[0] + 44*B[1] + 38*B[2] + 39*B[3] + 36*B[4] + 24*B[5] +
45*B[6]
sage: Z5._refine_category_(SemisimpleAlgebras(QQ))
sage: orth = Z5.orthogonal_idempotents()
sage: orth = Z5.orthogonal_idempotents()
Expand All @@ -164,6 +166,10 @@ def orthogonal_idempotents(self):
5/24*B[0] + 1/24*B[1] + 1/24*B[2] - 1/24*B[3] + 1/24*B[4] -
1/24*B[5], 5/24*B[0] - 1/24*B[1] + 1/24*B[2] - 1/24*B[3] -
1/24*B[4] + 1/24*B[5]]
sage: orth[2] * orth[4]
0
sage: orth[1] ** 2 == orth[1]
True
"""
return [(e.leading_coefficient()/(e*e).leading_coefficient())*e
for e in
Expand Down

0 comments on commit 75e4f5a

Please sign in to comment.