Super modules with basis - Category Framework

Skip to content
Back to top
View this page
Edit this page

# Super modules with basis

class sage.categories.super_modules_with_basis.SuperModulesWithBasis(base_category)

  Bases: `SuperModulesCategory`

  The category of super modules with a distinguished basis.

  An \(R\)-super module with a distinguished basis is an \(R\)-super module equipped with an \(R\)-module basis whose elements are homogeneous.

  EXAMPLES:

  Sage

      sage: C = GradedModulesWithBasis(QQ); C
      Category of graded vector spaces with basis over Rational Field
      sage: sorted(C.super_categories(), key=str)
      [Category of filtered vector spaces with basis over Rational Field,
       Category of graded modules with basis over Rational Field,
       Category of graded vector spaces over Rational Field]
      sage: C is ModulesWithBasis(QQ).Graded()
      True

  Python

      >>> from sage.all import *
      >>> C = GradedModulesWithBasis(QQ); C
      Category of graded vector spaces with basis over Rational Field
      >>> sorted(C.super_categories(), key=str)
      [Category of filtered vector spaces with basis over Rational Field,
       Category of graded modules with basis over Rational Field,
       Category of graded vector spaces over Rational Field]
      >>> C is ModulesWithBasis(QQ).Graded()
      True

  class ElementMethods

    Bases: `object`

    even_component()

      Return the even component of `self`.

      EXAMPLES:

      Sage

          sage: # needs sage.modules
          sage: Q = QuadraticForm(QQ, 2, [1,2,3])
          sage: C.<x,y> = CliffordAlgebra(Q)
          sage: a = x*y + x - 3*y + 4
          sage: a.even_component()
          x*y + 4

      Python

          >>> from sage.all import *
          >>> # needs sage.modules
          >>> Q = QuadraticForm(QQ, Integer(2), [Integer(1),Integer(2),Integer(3)])
          >>> C = CliffordAlgebra(Q, names=('x', 'y',)); (x, y,) = C._first_ngens(2)
          >>> a = x*y + x - Integer(3)*y + Integer(4)
          >>> a.even_component()
          x*y + 4

    is_even_odd()

      Return `0` if `self` is an even element and `1` if `self` is an odd element.

      EXAMPLES:

      Sage

          sage: # needs sage.modules
          sage: Q = QuadraticForm(QQ, 2, [1,2,3])
          sage: C.<x,y> = CliffordAlgebra(Q)
          sage: a = x + y
          sage: a.is_even_odd()
          1
          sage: a = x*y + 4
          sage: a.is_even_odd()
          0
          sage: a = x + 4
          sage: a.is_even_odd()
          Traceback (most recent call last):
          ...
          ValueError: element is not homogeneous

          sage: E.<x,y> = ExteriorAlgebra(QQ)                                     # needs sage.modules
          sage: (x*y).is_even_odd()                                               # needs sage.modules
          0

      Python

          >>> from sage.all import *
          >>> # needs sage.modules
          >>> Q = QuadraticForm(QQ, Integer(2), [Integer(1),Integer(2),Integer(3)])
          >>> C = CliffordAlgebra(Q, names=('x', 'y',)); (x, y,) = C._first_ngens(2)
          >>> a = x + y
          >>> a.is_even_odd()
          1
          >>> a = x*y + Integer(4)
          >>> a.is_even_odd()
          0
          >>> a = x + Integer(4)
          >>> a.is_even_odd()
          Traceback (most recent call last):
          ...
          ValueError: element is not homogeneous

          >>> E = ExteriorAlgebra(QQ, names=('x', 'y',)); (x, y,) = E._first_ngens(2)# needs sage.modules
          >>> (x*y).is_even_odd()                                               # needs sage.modules
          0

    is_super_homogeneous()

      Return whether this element is homogeneous, in the sense of a super module (i.e., is even or odd).

      EXAMPLES:

      Sage

          sage: # needs sage.modules
          sage: Q = QuadraticForm(QQ, 2, [1,2,3])
          sage: C.<x,y> = CliffordAlgebra(Q)
          sage: a = x + y
          sage: a.is_super_homogeneous()
          True
          sage: a = x*y + 4
          sage: a.is_super_homogeneous()
          True
          sage: a = x*y + x - 3*y + 4
          sage: a.is_super_homogeneous()
          False

      Python

          >>> from sage.all import *
          >>> # needs sage.modules
          >>> Q = QuadraticForm(QQ, Integer(2), [Integer(1),Integer(2),Integer(3)])
          >>> C = CliffordAlgebra(Q, names=('x', 'y',)); (x, y,) = C._first_ngens(2)
          >>> a = x + y
          >>> a.is_super_homogeneous()
          True
          >>> a = x*y + Integer(4)
          >>> a.is_super_homogeneous()
          True
          >>> a = x*y + x - Integer(3)*y + Integer(4)
          >>> a.is_super_homogeneous()
          False

      The exterior algebra has a \(\ZZ\) grading, which induces the \(\ZZ / 2\ZZ\) grading. However the definition of homogeneous elements differs because of the different gradings:

      Sage

          sage: # needs sage.combinat sage.modules
          sage: E.<x,y> = ExteriorAlgebra(QQ)
          sage: a = x*y + 4
          sage: a.is_super_homogeneous()
          True
          sage: a.is_homogeneous()
          False

      [Python]

          >>> from sage.all import *
          >>> # needs sage.combinat sage.modules
          >>> E = ExteriorAlgebra(QQ, names=('x', 'y',)); (x, y,) = E._first_ngens(2)
          >>> a = x*y + Integer(4)
          >>> a.is_super_homogeneous()
          True
          >>> a.is_homogeneous()
          False

    odd_component()

      Return the odd component of `self`.

      EXAMPLES:

      Sage

          sage: # needs sage.modules
          sage: Q = QuadraticForm(QQ, 2, [1,2,3])
          sage: C.<x,y> = CliffordAlgebra(Q)
          sage: a = x*y + x - 3*y + 4
          sage: a.odd_component()
          x - 3*y

      Python

          >>> from sage.all import *
          >>> # needs sage.modules
          >>> Q = QuadraticForm(QQ, Integer(2), [Integer(1),Integer(2),Integer(3)])
          >>> C = CliffordAlgebra(Q, names=('x', 'y',)); (x, y,) = C._first_ngens(2)
          >>> a = x*y + x - Integer(3)*y + Integer(4)
          >>> a.odd_component()
          x - 3*y

  class ParentMethods

    Bases: `object`