Jordan Algebras - Algebras

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

# Jordan Algebras

AUTHORS:

- Travis Scrimshaw (2014-04-02): initial version

- Travis Scrimshaw (2023-05-09): added the 27 dimensional exceptional Jordan algebra

class sage.algebras.jordan_algebra.ExceptionalJordanAlgebra(Octo)

  Bases: `JordanAlgebra`

  The exceptional \(27\) dimensional Jordan algebra as self-adjoint \(3 \times 3\) matrix over an octonion algebra.

  Let \(\mathbf{O}\) be the `OctonionAlgebra` over a commutative ring \(R\) of characteristic not equal to \(2\). The exceptional Jordan algebra \(\mathfrak{h}_3(\mathbf{O})\) is a \(27\) dimensional free \(R\)-module spanned by the matrices

  \[\begin{split}\begin{bmatrix} \alpha & x & y \\ x^* & \beta & z \\ y^* & z^* & \gamma \end{bmatrix}\end{split}\]

  for \(\alpha, \beta, \gamma \in R\) and \(x, y, z \in \mathbf{O}\), with multiplication given by the usual symmetrizer operation \(X \circ Y = \frac{1}{2}(XY + YX)\).

  These are also known as Albert algebras due to the work of Abraham Adrian Albert on these algebras over \(\RR\).

  EXAMPLES:

  We construct an exceptional Jordan algebra over \(\QQ\) and perform some basic computations:

  Sage

      sage: O = OctonionAlgebra(QQ)
      sage: J = JordanAlgebra(O)
      sage: gens = J.gens()
      sage: gens[1]
      [0 0 0]
      [0 1 0]
      [0 0 0]
      sage: gens[3]
      [0 1 0]
      [1 0 0]
      [0 0 0]
      sage: gens[1] * gens[3]
      [  0 1/2   0]
      [1/2   0   0]
      [  0   0   0]

  Python

      >>> from sage.all import *
      >>> O = OctonionAlgebra(QQ)
      >>> J = JordanAlgebra(O)
      >>> gens = J.gens()
      >>> gens[Integer(1)]
      [0 0 0]
      [0 1 0]
      [0 0 0]
      >>> gens[Integer(3)]
      [0 1 0]
      [1 0 0]
      [0 0 0]
      >>> gens[Integer(1)] * gens[Integer(3)]
      [  0 1/2   0]
      [1/2   0   0]
      [  0   0   0]

  The Lie algebra of derivations of the exceptional Jordan algebra is isomorphic to the simple Lie algebra of type \(F_4\). We verify that we the derivation module has the correct dimension:

  Sage

      sage: len(J.derivations_basis())  # long time
      52
      sage: LieAlgebra(QQ, cartan_type='F4').dimension()
      52

  [Python]

      >>> from sage.all import *
      >>> len(J.derivations_basis())  # long time
      52
      >>> LieAlgebra(QQ, cartan_type='F4').dimension()
      52

  REFERENCES:

  - Wikipedia article Albert_algebra

  - Wikipedia article Jordan_algebra#Examples

  - Wikipedia article Hurwitz’s_theorem_(composition_algebras)#Applications_to_Jordan_algebras

  - https://math.ucr.edu/home/baez/octonions/octonions.pdf

  class Element(parent, data)

    Bases: `AlgebraElement`

    An element of an exceptional Jordan algebra.

    monomial_coefficients(copy=True)

      Return a dictionary whose keys are indices of basis elements in the support of `self` and whose values are the corresponding coefficients.

      INPUT:

      - `copy` – ignored

      EXAMPLES:

      Sage

          sage: O = OctonionAlgebra(QQ)
          sage: J = JordanAlgebra(O)
          sage: elt = sum(~QQ(ind) * b for ind, b in enumerate(J.basis()[::6], start=1)); elt
          [              1           1/2*k  1/3*i + 1/4*lk]
          [         -1/2*k               0          1/5*li]
          [-1/3*i - 1/4*lk         -1/5*li               0]
          sage: elt.monomial_coefficients()
          {0: 1, 6: 1/2, 12: 1/3, 18: 1/4, 24: 1/5}

      Python

          >>> from sage.all import *
          >>> O = OctonionAlgebra(QQ)
          >>> J = JordanAlgebra(O)
          >>> elt = sum(~QQ(ind) * b for ind, b in enumerate(J.basis()[::Integer(6)], start=Integer(1))); elt
          [              1           1/2*k  1/3*i + 1/4*lk]
          [         -1/2*k               0          1/5*li]
          [-1/3*i - 1/4*lk         -1/5*li               0]
          >>> elt.monomial_coefficients()
          {0: 1, 6: 1/2, 12: 1/3, 18: 1/4, 24: 1/5}

  algebra_generators()

    alias of `basis()`.

  basis()

    Return a basis of `self`.

    EXAMPLES:

    Sage

        sage: O = OctonionAlgebra(QQ)
        sage: J = JordanAlgebra(O)
        sage: B = J.basis()
        sage: B[::6]
        ([1 0 0]
         [0 0 0]
         [0 0 0],
         [ 0  k  0]
         [-k  0  0]
         [ 0  0  0],
         [ 0  0  i]
         [ 0  0  0]
         [-i  0  0],
         [  0   0  lk]
         [  0   0   0]
         [-lk   0   0],
         [  0   0   0]
         [  0   0  li]
         [  0 -li   0])
        sage: len(B)
        27

    Python

        >>> from sage.all import *
        >>> O = OctonionAlgebra(QQ)
        >>> J = JordanAlgebra(O)
        >>> B = J.basis()
        >>> B[::Integer(6)]
        ([1 0 0]
         [0 0 0]
         [0 0 0],
         [ 0  k  0]
         [-k  0  0]
         [ 0  0  0],
         [ 0  0  i]
         [ 0  0  0]
         [-i  0  0],
         [  0   0  lk]
         [  0   0   0]
         [-lk   0   0],
         [  0   0   0]
         [  0   0  li]
         [  0 -li   0])
        >>> len(B)
        27

  one()

    Return multiplicative identity.

    EXAMPLES:

    Sage

        sage: O = OctonionAlgebra(QQ)
        sage: J = JordanAlgebra(O)
        sage: J.one()
        [1 0 0]
        [0 1 0]
        [0 0 1]
        sage: all(J.one() * b == b for b in J.basis())
        True

    Python

        >>> from sage.all import *
        >>> O = OctonionAlgebra(QQ)
        >>> J = JordanAlgebra(O)
        >>> J.one()
        [1 0 0]
        [0 1 0]
        [0 0 1]
        >>> all(J.one() * b == b for b in J.basis())
        True

  some_elements()

    Return some elements of `self`.

    EXAMPLES:

    Sage

        sage: O = OctonionAlgebra(QQ)
        sage: J = JordanAlgebra(O)
        sage: J.some_elements()
        [[6/5   0   0]
         [  0 6/5   0]
         [  0   0 6/5],
         [1 0 0]
         [0 1 0]
         [0 0 1],
         [0 0 0]
         [0 0 0]
         [0 0 0],
         [0 0 0]
         [0 1 0]
         [0 0 0],
         [ 0  j  0]
         [-j  0  0]
         [ 0  0  0],
         [  0   0  lj]
         [  0   0   0]
         [-lj   0   0],
         [      0       0       0]
         [      0       1  1/2*lj]
         [      0 -1/2*lj       0],
         [        1         0  j + 2*li]
         [        0         1         0]
         [-j - 2*li         0         1],
         [      1  j + lk       l]
         [-j - lk       0  i + lj]
         [     -l -i - lj       0],
         [     1  3/2*l    2*k]
         [-3/2*l      0  5/2*j]
         [  -2*k -5/2*j      0]]

        sage: O = OctonionAlgebra(GF(3))
        sage: J = JordanAlgebra(O)
        sage: J.some_elements()
        [[-1  0  0]
         [ 0 -1  0]
         [ 0  0 -1],
         [1 0 0]
         [0 1 0]
         [0 0 1],
         [0 0 0]
         [0 0 0]
         [0 0 0],
         [0 0 0]
         [0 1 0]
         [0 0 0],
         [ 0  j  0]
         [-j  0  0]
         [ 0  0  0],
         [  0   0  lj]
         [  0   0   0]
         [-lj   0   0],
         [  0   0   0]
         [  0   1 -lj]
         [  0  lj   0],
         [      1       0  j - li]
         [      0       1       0]
         [-j + li       0       1],
         [      1  j + lk       l]
         [-j - lk       0  i + lj]
         [     -l -i - lj       0],
         [ 1  0 -k]
         [ 0  0  j]
         [ k -j  0]]

    Python

        >>> from sage.all import *
        >>> O = OctonionAlgebra(QQ)
        >>> J = JordanAlgebra(O)
        >>> J.some_elements()
        [[6/5   0   0]
         [  0 6/5   0]
         [  0   0 6/5],
         [1 0 0]
         [0 1 0]
         [0 0 1],
         [0 0 0]
         [0 0 0]
         [0 0 0],
         [0 0 0]
         [0 1 0]
         [0 0 0],
         [ 0  j  0]
         [-j  0  0]
         [ 0  0  0],
         [  0   0  lj]
         [  0   0   0]
         [-lj   0   0],
         [      0       0       0]
         [      0       1  1/2*lj]
         [      0 -1/2*lj       0],
         [        1         0  j + 2*li]
         [        0         1         0]
         [-j - 2*li         0         1],
         [      1  j + lk       l]
         [-j - lk       0  i + lj]
         [     -l -i - lj       0],
         [     1  3/2*l    2*k]
         [-3/2*l      0  5/2*j]
         [  -2*k -5/2*j      0]]

        >>> O = OctonionAlgebra(GF(Integer(3)))
        >>> J = JordanAlgebra(O)
        >>> J.some_elements()
        [[-1  0  0]
         [ 0 -1  0]
         [ 0  0 -1],
         [1 0 0]
         [0 1 0]
         [0 0 1],
         [0 0 0]
         [0 0 0]
         [0 0 0],
         [0 0 0]
         [0 1 0]
         [0 0 0],
         [ 0  j  0]
         [-j  0  0]
         [ 0  0  0],
         [  0   0  lj]
         [  0   0   0]
         [-lj   0   0],
         [  0   0   0]
         [  0   1 -lj]
         [  0  lj   0],
         [      1       0  j - li]
         [      0       1       0]
         [-j + li       0       1],
         [      1  j + lk       l]
         [-j - lk       0  i + lj]
         [     -l -i - lj       0],
         [ 1  0 -k]
         [ 0  0  j]
         [ k -j  0]]

  zero()

    Return the additive identity.

    EXAMPLES:

    Sage

        sage: O = OctonionAlgebra(QQ)
        sage: J = JordanAlgebra(O)
        sage: J.zero()
        [0 0 0]
        [0 0 0]
        [0 0 0]

    Python

        >>> from sage.all import *
        >>> O = OctonionAlgebra(QQ)
        >>> J = JordanAlgebra(O)
        >>> J.zero()
        [0 0 0]
        [0 0 0]
        [0 0 0]

class sage.algebras.jordan_algebra.JordanAlgebra

  Bases: `UniqueRepresentation`, `Parent`

  A Jordan algebra.

  A Jordan algebra is a magmatic algebra (over a commutative ring \(R\)) whose multiplication satisfies the following axioms:

  - \(xy = yx\), and

  - \((xy)(xx) = x(y(xx))\) (the Jordan identity).

  See [Ja1971], [Ch2012], and [McC1978], for example.

  These axioms imply that a Jordan algebra is power-associative and the following generalization of Jordan’s identity holds [Al1947]: \((x^m y) x^n = x^m (y x^n)\) for all \(m, n \in \ZZ_{>0}\).

  Let \(A\) be an associative algebra over a ring \(R\) in which \(2\) is invertible. We construct a Jordan algebra \(A^+\) with ground set \(A\) by defining the multiplication as

  \[x \circ y = \frac{xy + yx}{2}.\]

  Often the multiplication is written as \(x \circ y\) to avoid confusion with the product in the associative algebra \(A\). We note that if \(A\) is commutative then this reduces to the usual multiplication in \(A\).

  Jordan algebras constructed in this fashion, or their subalgebras, are called special. All other Jordan algebras are called exceptional.

  Jordan algebras can also be constructed from a module \(M\) over \(R\) with a symmetric bilinear form \((\cdot, \cdot) : M \times M \to R\). We begin with the module \(M^* = R \oplus M\) and define multiplication in \(M^*\) by

  \[(\alpha + x) \circ (\beta + y) = \underbrace{\alpha \beta + (x,y)}_{\in R} + \underbrace{\beta x + \alpha y}_{\in M},\]

  where \(\alpha, \beta \in R\) and \(x,y \in M\).

  INPUT:

  Can be either an associative algebra \(A\) or a symmetric bilinear form given as a matrix (possibly followed by, or preceded by, a base ring argument).

  EXAMPLES:

  We let the base algebra \(A\) be the free algebra on 3 generators:

  Sage

      sage: F.<x,y,z> = FreeAlgebra(QQ)
      sage: J = JordanAlgebra(F); J
      Jordan algebra of Free Algebra on 3 generators (x, y, z) over Rational Field
      sage: a,b,c = map(J, F.gens())
      sage: a*b
      1/2*x*y + 1/2*y*x
      sage: b*a
      1/2*x*y + 1/2*y*x

  Python

      >>> from sage.all import *
      >>> F = FreeAlgebra(QQ, names=('x', 'y', 'z',)); (x, y, z,) = F._first_ngens(3)
      >>> J = JordanAlgebra(F); J
      Jordan algebra of Free Algebra on 3 generators (x, y, z) over Rational Field
      >>> a,b,c = map(J, F.gens())
      >>> a*b
      1/2*x*y + 1/2*y*x
      >>> b*a
      1/2*x*y + 1/2*y*x

  Jordan algebras are typically non-associative:

  Sage

      sage: (a*b)*c
      1/4*x*y*z + 1/4*y*x*z + 1/4*z*x*y + 1/4*z*y*x
      sage: a*(b*c)
      1/4*x*y*z + 1/4*x*z*y + 1/4*y*z*x + 1/4*z*y*x

  [Python]

      >>> from sage.all import *
      >>> (a*b)*c
      1/4*x*y*z + 1/4*y*x*z + 1/4*z*x*y + 1/4*z*y*x
      >>> a*(b*c)
      1/4*x*y*z + 1/4*x*z*y + 1/4*y*z*x + 1/4*z*y*x

  We check the Jordan identity:

  Sage

      sage: (a*b)*(a*a) == a*(b*(a*a))
      True
      sage: x = a + c
      sage: y = b - 2*a
      sage: (x*y)*(x*x) == x*(y*(x*x))
      True

  Python

      >>> from sage.all import *
      >>> (a*b)*(a*a) == a*(b*(a*a))
      True
      >>> x = a + c
      >>> y = b - Integer(2)*a
      >>> (x*y)*(x*x) == x*(y*(x*x))
      True

  Next we construct a Jordan algebra from a symmetric bilinear form:

  Sage

      sage: m = matrix([[-2,3],[3,4]])
      sage: J.<a,b,c> = JordanAlgebra(m); J
      Jordan algebra over Integer Ring given by the symmetric bilinear form:
      [-2  3]
      [ 3  4]
      sage: a
      1 + (0, 0)
      sage: b
      0 + (1, 0)
      sage: x = 3*a - 2*b + c; x
      3 + (-2, 1)

  [Python]

      >>> from sage.all import *
      >>> m = matrix([[-Integer(2),Integer(3)],[Integer(3),Integer(4)]])
      >>> J = JordanAlgebra(m, names=('a', 'b', 'c',)); (a, b, c,) = J._first_ngens(3); J
      Jordan algebra over Integer Ring given by the symmetric bilinear form:
      [-2  3]
      [ 3  4]
      >>> a
      1 + (0, 0)
      >>> b
      0 + (1, 0)
      >>> x = Integer(3)*a - Integer(2)*b + c; x
      3 + (-2, 1)

  We again show that Jordan algebras are usually non-associative:

  Sage

      sage: (x*b)*b
      -6 + (7, 0)
      sage: x*(b*b)
      -6 + (4, -2)

  Python

      >>> from sage.all import *
      >>> (x*b)*b
      -6 + (7, 0)
      >>> x*(b*b)
      -6 + (4, -2)

  We verify the Jordan identity:

  Sage

      sage: y = -a + 4*b - c
      sage: (x*y)*(x*x) == x*(y*(x*x))
      True

  [Python]

      >>> from sage.all import *
      >>> y = -a + Integer(4)*b - c
      >>> (x*y)*(x*x) == x*(y*(x*x))
      True

  The base ring, while normally inferred from the matrix, can also be explicitly specified:

  Sage

      sage: J.<a,b,c> = JordanAlgebra(m, QQ); J
      Jordan algebra over Rational Field given by the symmetric bilinear form:
      [-2  3]
      [ 3  4]
      sage: J.<a,b,c> = JordanAlgebra(QQ, m); J # either order work
      Jordan algebra over Rational Field given by the symmetric bilinear form:
      [-2  3]
      [ 3  4]

  Python

      >>> from sage.all import *
      >>> J = JordanAlgebra(m, QQ, names=('a', 'b', 'c',)); (a, b, c,) = J._first_ngens(3); J
      Jordan algebra over Rational Field given by the symmetric bilinear form:
      [-2  3]
      [ 3  4]
      >>> J = JordanAlgebra(QQ, m, names=('a', 'b', 'c',)); (a, b, c,) = J._first_ngens(3); J # either order work
      Jordan algebra over Rational Field given by the symmetric bilinear form:
      [-2  3]
      [ 3  4]

  REFERENCES:

  - Wikipedia article Jordan_algebra

  - [Ja1971]

  - [Ch2012]

  - [McC1978]

  - [Al1947]

class sage.algebras.jordan_algebra.JordanAlgebraSymmetricBilinear(R, form, names=None)

  Bases: `JordanAlgebra`

  A Jordan algebra given by a symmetric bilinear form \(m\).

  class Element(parent, s, v)

    Bases: `AlgebraElement`

    An element of a Jordan algebra defined by a symmetric bilinear form.

    bar()

      Return the result of the bar involution of `self`.

      The bar involution \(\bar{\cdot}\) is the \(R\)-linear endomorphism of \(M^*\) defined by \(\bar{1} = 1\) and \(\bar{x} = -x\) for \(x \in M\).

      EXAMPLES:

      Sage

          sage: m = matrix([[0,1],[1,1]])
          sage: J.<a,b,c> = JordanAlgebra(m)
          sage: x = 4*a - b + 3*c
          sage: x.bar()
          4 + (1, -3)

      Python

          >>> from sage.all import *
          >>> m = matrix([[Integer(0),Integer(1)],[Integer(1),Integer(1)]])
          >>> J = JordanAlgebra(m, names=('a', 'b', 'c',)); (a, b, c,) = J._first_ngens(3)
          >>> x = Integer(4)*a - b + Integer(3)*c
          >>> x.bar()
          4 + (1, -3)

      We check that it is an algebra morphism:

      Sage

          sage: y = 2*a + 2*b - c
          sage: x.bar() * y.bar() == (x*y).bar()
          True

      [Python]

          >>> from sage.all import *
          >>> y = Integer(2)*a + Integer(2)*b - c
          >>> x.bar() * y.bar() == (x*y).bar()
          True

    monomial_coefficients(copy=True)

      Return a dictionary whose keys are indices of basis elements in the support of `self` and whose values are the corresponding coefficients.

      INPUT:

      - `copy` – ignored

      EXAMPLES:

      Sage

          sage: m = matrix([[0,1],[1,1]])
          sage: J.<a,b,c> = JordanAlgebra(m)
          sage: elt = a + 2*b - c
          sage: elt.monomial_coefficients()
          {0: 1, 1: 2, 2: -1}

      Python

          >>> from sage.all import *
          >>> m = matrix([[Integer(0),Integer(1)],[Integer(1),Integer(1)]])
          >>> J = JordanAlgebra(m, names=('a', 'b', 'c',)); (a, b, c,) = J._first_ngens(3)
          >>> elt = a + Integer(2)*b - c
          >>> elt.monomial_coefficients()
          {0: 1, 1: 2, 2: -1}

    norm()

      Return the norm of `self`.

      The norm of an element \(\alpha + x \in M^*\) is given by \(n(\alpha + x) = \alpha^2 - (x, x)\).

      EXAMPLES:

      Sage

          sage: m = matrix([[0,1],[1,1]])
          sage: J.<a,b,c> = JordanAlgebra(m)
          sage: x = 4*a - b + 3*c; x
          4 + (-1, 3)
          sage: x.norm()
          13

      Python

          >>> from sage.all import *
          >>> m = matrix([[Integer(0),Integer(1)],[Integer(1),Integer(1)]])
          >>> J = JordanAlgebra(m, names=('a', 'b', 'c',)); (a, b, c,) = J._first_ngens(3)
          >>> x = Integer(4)*a - b + Integer(3)*c; x
          4 + (-1, 3)
          >>> x.norm()
          13

    trace()

      Return the trace of `self`.

      The trace of an element \(\alpha + x \in M^*\) is given by \(t(\alpha + x) = 2 \alpha\).

      EXAMPLES:

      Sage

          sage: m = matrix([[0,1],[1,1]])
          sage: J.<a,b,c> = JordanAlgebra(m)
          sage: x = 4*a - b + 3*c
          sage: x.trace()
          8

      Python

          >>> from sage.all import *
          >>> m = matrix([[Integer(0),Integer(1)],[Integer(1),Integer(1)]])
          >>> J = JordanAlgebra(m, names=('a', 'b', 'c',)); (a, b, c,) = J._first_ngens(3)
          >>> x = Integer(4)*a - b + Integer(3)*c
          >>> x.trace()
          8

  algebra_generators()

    alias of `basis()`.

  basis()

    Return a basis of `self`.

    The basis returned begins with the unity of \(R\) and continues with the standard basis of \(M\).

    EXAMPLES:

    Sage

        sage: m = matrix([[0,1],[1,1]])
        sage: J = JordanAlgebra(m)
        sage: J.basis()
        Family (1 + (0, 0), 0 + (1, 0), 0 + (0, 1))

    Python

        >>> from sage.all import *
        >>> m = matrix([[Integer(0),Integer(1)],[Integer(1),Integer(1)]])
        >>> J = JordanAlgebra(m)
        >>> J.basis()
        Family (1 + (0, 0), 0 + (1, 0), 0 + (0, 1))

  one()

    Return the element 1 if it exists.

    EXAMPLES:

    Sage

        sage: m = matrix([[0,1],[1,1]])
        sage: J = JordanAlgebra(m)
        sage: J.one()
        1 + (0, 0)

    Python

        >>> from sage.all import *
        >>> m = matrix([[Integer(0),Integer(1)],[Integer(1),Integer(1)]])
        >>> J = JordanAlgebra(m)
        >>> J.one()
        1 + (0, 0)

  zero()

    Return the element 0.

    EXAMPLES:

    Sage

        sage: m = matrix([[0,1],[1,1]])
        sage: J = JordanAlgebra(m)
        sage: J.zero()
        0 + (0, 0)

    Python

        >>> from sage.all import *
        >>> m = matrix([[Integer(0),Integer(1)],[Integer(1),Integer(1)]])
        >>> J = JordanAlgebra(m)
        >>> J.zero()
        0 + (0, 0)

class sage.algebras.jordan_algebra.SpecialJordanAlgebra(A, names=None)

  Bases: `JordanAlgebra`

  A (special) Jordan algebra \(A^+\) from an associative algebra \(A\).

  class Element(parent, x)

    Bases: `AlgebraElement`

    An element of a special Jordan algebra.

    monomial_coefficients(copy=True)

      Return a dictionary whose keys are indices of basis elements in the support of `self` and whose values are the corresponding coefficients.

      INPUT:

      - `copy` – boolean (default: `True`); if `self` is internally represented by a dictionary `d`, then make a copy of `d`; if `False`, then this can cause undesired behavior by mutating `d`

      EXAMPLES:

      Sage

          sage: F.<x,y,z> = FreeAlgebra(QQ)
          sage: J = JordanAlgebra(F)
          sage: a,b,c = map(J, F.gens())
          sage: elt = a + 2*b - c
          sage: elt.monomial_coefficients()
          {x: 1, y: 2, z: -1}

      Python

          >>> from sage.all import *
          >>> F = FreeAlgebra(QQ, names=('x', 'y', 'z',)); (x, y, z,) = F._first_ngens(3)
          >>> J = JordanAlgebra(F)
          >>> a,b,c = map(J, F.gens())
          >>> elt = a + Integer(2)*b - c
          >>> elt.monomial_coefficients()
          {x: 1, y: 2, z: -1}

  algebra_generators()

    alias of `basis()`.

  basis()

    Return the basis of `self`.

    EXAMPLES:

    Sage

        sage: F.<x,y,z> = FreeAlgebra(QQ)
        sage: J = JordanAlgebra(F)
        sage: J.basis()
        Lazy family (Term map(i))_{i in Free monoid on 3 generators (x, y, z)}

    Python

        >>> from sage.all import *
        >>> F = FreeAlgebra(QQ, names=('x', 'y', 'z',)); (x, y, z,) = F._first_ngens(3)
        >>> J = JordanAlgebra(F)
        >>> J.basis()
        Lazy family (Term map(i))_{i in Free monoid on 3 generators (x, y, z)}

  gens()

    Return the generators of `self` as a tuple.

    This fails with `NotImplementedError` when there are infinitely many.

    EXAMPLES:

    Sage

        sage: cat = Algebras(QQ).WithBasis().FiniteDimensional()
        sage: C = CombinatorialFreeModule(QQ, ['x','y','z'], category=cat)
        sage: J = JordanAlgebra(C)
        sage: tuple(map(J, C.gens()))
        (B['x'], B['y'], B['z'])

        sage: F.<x,y,z> = FreeAlgebra(QQ)
        sage: J = JordanAlgebra(F)
        sage: J.gens()
        Traceback (most recent call last):
        ...
        NotImplementedError: infinite set

    Python

        >>> from sage.all import *
        >>> cat = Algebras(QQ).WithBasis().FiniteDimensional()
        >>> C = CombinatorialFreeModule(QQ, ['x','y','z'], category=cat)
        >>> J = JordanAlgebra(C)
        >>> tuple(map(J, C.gens()))
        (B['x'], B['y'], B['z'])

        >>> F = FreeAlgebra(QQ, names=('x', 'y', 'z',)); (x, y, z,) = F._first_ngens(3)
        >>> J = JordanAlgebra(F)
        >>> J.gens()
        Traceback (most recent call last):
        ...
        NotImplementedError: infinite set

  one()

    Return the element \(1\) if it exists.

    EXAMPLES:

    Sage

        sage: F.<x,y,z> = FreeAlgebra(QQ)
        sage: J = JordanAlgebra(F)
        sage: J.one()
        1

    Python

        >>> from sage.all import *
        >>> F = FreeAlgebra(QQ, names=('x', 'y', 'z',)); (x, y, z,) = F._first_ngens(3)
        >>> J = JordanAlgebra(F)
        >>> J.one()
        1

  zero()

    Return the element \(0\).

    EXAMPLES:

    Sage

        sage: F.<x,y,z> = FreeAlgebra(QQ)
        sage: J = JordanAlgebra(F)
        sage: J.zero()
        0

    Python

        >>> from sage.all import *
        >>> F = FreeAlgebra(QQ, names=('x', 'y', 'z',)); (x, y, z,) = F._first_ngens(3)
        >>> J = JordanAlgebra(F)
        >>> J.zero()
        0