Ticket #6670: trac-6670-group_algebra-7.patch

File trac-6670-group_algebra-7.patch, 4.0 KB (added by Martin Raum, 12 years ago)
  • sage/algebras/group_algebra.py

    # HG changeset patch
    # User Martin Raum <Martin.Raum@matha.rwth-aachen.de>
    # Date 1300843815 -3600
    # Node ID a6e39b4cc8e37974cfaf94542e00d1a23a6de1e3
    # Parent  5c8212195c95db9eac1e006b72741a3f9c2cd582
    #6670: Port group algebras to the current coercion system
    
    diff -r 5c8212195c95 -r a6e39b4cc8e3 sage/algebras/group_algebra.py
    a b  
    3434from sage.sets.set import Set
    3535
    3636
     37from sage.misc.misc import deprecation
     38deprecation("The module group_algebra is deprecated and will be removed in a future version of Sage. Use group_algebra_new instead.")
     39
     40
    3741class GroupAlgebra(Algebra):
    3842
    3943    def __init__(self, group, base_ring = IntegerRing()):
     
    229233            -- a GroupAlgebraElement instance whose parent is self.
    230234
    231235        EXAMPLES:
     236            sage: from sage.algebras.group_algebra import GroupAlgebra
    232237            sage: G = AbelianGroup(1)
    233238            sage: f = G.gen()
    234239            sage: ZG = GroupAlgebra(G)
     
    288293        The class of elements of self, which is GroupAlgebraElement.
    289294
    290295        EXAMPLES:
     296            sage: from sage.algebras.group_algebra import GroupAlgebra
     297            doctest:1: DeprecationWarning:...
    291298            sage: GroupAlgebra(SU(2, GF(4,'a'))).element_class()
    292299            <class 'sage.algebras.group_algebra.GroupAlgebraElement'>
    293300        """
  • sage/algebras/group_algebra_new.py

    diff -r 5c8212195c95 -r a6e39b4cc8e3 sage/algebras/group_algebra_new.py
    a b  
    6363         EXAMPLES::
    6464 
    6565
    66             sage: from sage.algebras.group_algebra import GroupAlgebraFunctor
     66            sage: from sage.algebras.group_algebra_new import GroupAlgebraFunctor
    6767            sage: F = GroupAlgebraFunctor(KleinFourGroup())
    6868            sage: loads(dumps(F)) == F
    6969            True
     
    8080
    8181        EXAMPLES::
    8282
    83             sage: from sage.algebras.group_algebra import GroupAlgebraFunctor
     83            sage: from sage.algebras.group_algebra_new import GroupAlgebraFunctor
    8484            sage: GroupAlgebraFunctor(CyclicPermutationGroup(17)).group() == CyclicPermutationGroup(17)
    8585            True
    8686         """
     
    9999
    100100        EXAMPLES::
    101101
    102             sage: from sage.algebras.group_algebra import GroupAlgebraFunctor
     102            sage: from sage.algebras.group_algebra_new import GroupAlgebraFunctor
    103103            sage: F = GroupAlgebraFunctor(CyclicPermutationGroup(17))
    104104            sage: F(QQ)
    105105            Group algebra of group "Cyclic group of order 17 as a permutation group" over base ring Rational Field
     
    181181            sage: x,y = G.gens()
    182182            sage: A = GroupAlgebra(G)
    183183            sage: A( A(x) )
     184            (1,2,3,4,5)
    184185        """
    185186        if not base_ring.is_commutative():
    186187            raise NotImplementedError, "Base ring must be commutative"
     
    442443            sage: ZG = GroupAlgebra(G)
    443444            sage: f = ZG.group().gen()
    444445            sage: ZG(FormalSum([(1,f), (2, f**2)]))
    445             f + 2*f^2
     446            2*f^2 + f
    446447            sage: G = GL(2,7)
    447448            sage: OG = GroupAlgebra(G, ZZ[sqrt(5)])
    448449            sage: OG(2)
     
    497498            False
    498499            sage: GroupAlgebra(AbelianGroup(2)) == GroupAlgebra(AbelianGroup(1))
    499500            False
    500             sage: from sage.algebras.group_algebra import GroupAlgebra_class
     501            sage: from sage.algebras.group_algebra_new import GroupAlgebra_class
    501502            sage: A = GroupAlgebra_class(KleinFourGroup(), ZZ)
    502503            sage: B = GroupAlgebra_class(KleinFourGroup(), QQ)
    503504            sage: A == B
     
    546547        EXAMPLES::
    547548
    548549            sage: GroupAlgebra(SU(2, GF(4,'a'))).element_class()
    549             <class 'sage.algebras.group_algebra.GroupAlgebraElement_class'>
     550            <class 'sage.algebras.group_algebra_new.GroupAlgebraElement_class'>
    550551        """
    551552        return GroupAlgebraElement_class
    552553