Heisenberg Group - Groups

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

# Heisenberg Group

AUTHORS:

- Hilder Vitor Lima Pereira (2017-08): initial version

class sage.groups.matrix_gps.heisenberg.HeisenbergGroup(n=1, R=0)

  Bases: `UniqueRepresentation`, `FinitelyGeneratedMatrixGroup_gap`

  The Heisenberg group of degree \(n\).

  Let \(R\) be a ring, and let \(n\) be a positive integer. The Heisenberg group of degree \(n\) over \(R\) is a multiplicative group whose elements are matrices with the following form:

  \[\begin{split}\begin{pmatrix} 1 & x^T & z \\ 0 & I_n & y \\ 0 & 0 & 1 \end{pmatrix},\end{split}\]

  where \(x\) and \(y\) are column vectors in \(R^n\), \(z\) is a scalar in \(R\), and \(I_n\) is the identity matrix of size \(n\).

  INPUT:

  - `n` – the degree of the Heisenberg group

  - `R` – (default: \(\ZZ\)) the ring \(R\) or a positive integer as a shorthand for the ring \(\ZZ/R\ZZ\)

  EXAMPLES:

  Sage

      sage: H = groups.matrix.Heisenberg(); H
      Heisenberg group of degree 1 over Integer Ring
      sage: H.gens()
      (
      [1 1 0]  [1 0 0]  [1 0 1]
      [0 1 0]  [0 1 1]  [0 1 0]
      [0 0 1], [0 0 1], [0 0 1]
      )
      sage: X, Y, Z = H.gens()
      sage: Z * X * Y**-1
      [ 1  1  0]
      [ 0  1 -1]
      [ 0  0  1]
      sage: X * Y * X**-1 * Y**-1 == Z
      True

      sage: H = groups.matrix.Heisenberg(R=5); H
      Heisenberg group of degree 1 over Ring of integers modulo 5
      sage: H = groups.matrix.Heisenberg(n=3, R=13); H
      Heisenberg group of degree 3 over Ring of integers modulo 13

  Python

      >>> from sage.all import *
      >>> H = groups.matrix.Heisenberg(); H
      Heisenberg group of degree 1 over Integer Ring
      >>> H.gens()
      (
      [1 1 0]  [1 0 0]  [1 0 1]
      [0 1 0]  [0 1 1]  [0 1 0]
      [0 0 1], [0 0 1], [0 0 1]
      )
      >>> X, Y, Z = H.gens()
      >>> Z * X * Y**-Integer(1)
      [ 1  1  0]
      [ 0  1 -1]
      [ 0  0  1]
      >>> X * Y * X**-Integer(1) * Y**-Integer(1) == Z
      True

      >>> H = groups.matrix.Heisenberg(R=Integer(5)); H
      Heisenberg group of degree 1 over Ring of integers modulo 5
      >>> H = groups.matrix.Heisenberg(n=Integer(3), R=Integer(13)); H
      Heisenberg group of degree 3 over Ring of integers modulo 13

  REFERENCES:

  - Wikipedia article Heisenberg_group

  cardinality()

    alias of `order()`.

  center()

    Return the center of `self`.

    This is the subgroup generated by the \(z\), the matrix with a \(1\) in the upper right corner and along the diagonal.

    EXAMPLES:

    Sage

        sage: H = groups.matrix.Heisenberg(2)
        sage: H.center()
        Subgroup with 1 generators (
        [1 0 0 1]
        [0 1 0 0]
        [0 0 1 0]
        [0 0 0 1]
        ) of Heisenberg group of degree 2 over Integer Ring

        sage: H = groups.matrix.Heisenberg(3, 4)
        sage: H.center()
        Subgroup with 1 generators (
        [1 0 0 0 1]
        [0 1 0 0 0]
        [0 0 1 0 0]
        [0 0 0 1 0]
        [0 0 0 0 1]
        ) of Heisenberg group of degree 3 over Ring of integers modulo 4

    Python

        >>> from sage.all import *
        >>> H = groups.matrix.Heisenberg(Integer(2))
        >>> H.center()
        Subgroup with 1 generators (
        [1 0 0 1]
        [0 1 0 0]
        [0 0 1 0]
        [0 0 0 1]
        ) of Heisenberg group of degree 2 over Integer Ring

        >>> H = groups.matrix.Heisenberg(Integer(3), Integer(4))
        >>> H.center()
        Subgroup with 1 generators (
        [1 0 0 0 1]
        [0 1 0 0 0]
        [0 0 1 0 0]
        [0 0 0 1 0]
        [0 0 0 0 1]
        ) of Heisenberg group of degree 3 over Ring of integers modulo 4

  order()

    Return the order of `self`.

    EXAMPLES:

    Sage

        sage: H = groups.matrix.Heisenberg()
        sage: H.order()
        +Infinity
        sage: H = groups.matrix.Heisenberg(n=4)
        sage: H.order()
        +Infinity
        sage: H = groups.matrix.Heisenberg(R=3)
        sage: H.order()
        27
        sage: H = groups.matrix.Heisenberg(n=2, R=3)
        sage: H.order()
        243
        sage: H = groups.matrix.Heisenberg(n=2, R=GF(4))
        sage: H.order()
        1024

    Python

        >>> from sage.all import *
        >>> H = groups.matrix.Heisenberg()
        >>> H.order()
        +Infinity
        >>> H = groups.matrix.Heisenberg(n=Integer(4))
        >>> H.order()
        +Infinity
        >>> H = groups.matrix.Heisenberg(R=Integer(3))
        >>> H.order()
        27
        >>> H = groups.matrix.Heisenberg(n=Integer(2), R=Integer(3))
        >>> H.order()
        243
        >>> H = groups.matrix.Heisenberg(n=Integer(2), R=GF(Integer(4)))
        >>> H.order()
        1024