有限群,阿贝尔群

Sage支持排列群,有限典型群(如$SU(n,q)$),有限矩阵群 (使用你的生成元) 和阿贝尔群(甚至是无限的)。很多是通过调用GAP实现的。

例如,要建立一个排列群,只需给定生成元的列表,像下面这样。

  1. sage: G = PermutationGroup(['(1,2,3)(4,5)', '(3,4)'])
  2. sage: G
  3. Permutation Group with generators[(3,4), (1,2,3)(4,5)]
  4. sage: G.order()
  5. 120
  6. sage: G.is_abelian()
  7. False
  8. sage: G.derived_series() # random-ish output
  9. [Permutation Group with generators[(1,2,3)(4,5), (3,4)],
  10. Permutation Group with generators[(1,5)(3,4), (1,5)(2,4), (1,3,5)]]
  11. sage: G.center()
  12. Subgroup generated by[()]of (Permutation Group with generators[(3,4), (1,2,3)(4,5)])
  13. sage: G.random_element() # random output
  14. (1,5,3)(2,4)
  15. sage: print(latex(G))
  16. \langle (3,4), (1,2,3)(4,5) \rangle

你还可以得到特征表(LaTeX格式的):

  1. sage: G = PermutationGroup([[(1,2),(3,4)],[(1,2,3)]])
  2. sage: latex(G.character_table())
  3. \left(\begin{array}{rrrr}
  4. 1 & 1 & 1 & 1 \\
  5. 1 & 1 & -\zeta_{3} - 1 & \zeta_{3} \\
  6. 1 & 1 & \zeta_{3} & -\zeta_{3} - 1 \\
  7. 3 & -1 & 0 & 0
  8. \end{array}\right)

Sage还包括在有限域上的典型群和矩阵群:

  1. sage: MS = MatrixSpace(GF(7), 2)
  2. sage: gens =[MS([[1,0],[-1,1]]),MS([[1,1],[0,1]])]
  3. sage: G = MatrixGroup(gens)
  4. sage: G.conjugacy_class_representatives()
  5. (
  6. [1 0][0 6][0 4][6 0][0 6][0 4][0 6][0 6][0 6][4 0]
  7. [0 1],[1 5],[5 5],[0 6],[1 2],[5 2],[1 0],[1 4],[1 3],[0 2],
  8. [5 0]
  9. [0 3]
  10. )
  11. sage: G = Sp(4,GF(7))
  12. sage: G
  13. Symplectic Group of rank 2 over Finite Field of size 7
  14. sage: G.random_element() # random output
  15. [5 5 5 1]
  16. [0 2 6 3]
  17. [5 0 1 0]
  18. [4 6 3 4]
  19. sage: G.order()
  20. 276595200

还可以使用阿贝尔群进行计算(无限的和有限的):

  1. sage: F = AbelianGroup(5,[5,5,7,8,9], names='abcde')
  2. sage: (a, b, c, d, e) = F.gens()
  3. sage: d * b**2 * c**3
  4. b^2*c^3*d
  5. sage: F = AbelianGroup(3,[2]*3); F
  6. Multiplicative Abelian Group isomorphic to C2 x C2 x C2
  7. sage: H = AbelianGroup([2,3], names="xy"); H
  8. Multiplicative Abelian Group isomorphic to C2 x C3
  9. sage: AbelianGroup(5)
  10. Multiplicative Abelian Group isomorphic to Z x Z x Z x Z x Z
  11. sage: AbelianGroup(5).order()
  12. +Infinity