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

Commit

Permalink
beginning of implemantation for general algebras
Browse files Browse the repository at this point in the history
  • Loading branch information
avirmaux committed Jul 25, 2014
1 parent 8aa7db9 commit b2bb566
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 26 deletions.
54 changes: 28 additions & 26 deletions src/sage/categories/algebras.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,34 @@ def _div_(self, y):

class Quotients(QuotientsCategory):

class ElementMethods:

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

class ParentMethods:

def algebra_generators(self):
Expand Down Expand Up @@ -241,29 +269,3 @@ 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
12 changes: 12 additions & 0 deletions src/sage/categories/finite_dimensional_algebras_with_basis.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,18 @@ def center(self):
center.rename("Center of {}".format(self))
return center

def orthogonal_idempotent(self):
r"""
Return a maximal family of orthogonal idempotents of ``self``.
INPUT:
- ``self`` -- a finite dimensional algebra
"""
Aquo = self.semisimple_quotient()
orth_quo = Aquo.orthogonal_idempotents()
return [x._lift_idempotent() for x in orth_quo]

class ElementMethods:

def to_matrix(self, base_ring=None, action=operator.mul, side='left'):
Expand Down

0 comments on commit b2bb566

Please sign in to comment.