有限群,阿贝尔群
Sage支持排列群,有限典型群(如$SU(n,q)$),有限矩阵群 (使用你的生成元) 和阿贝尔群(甚至是无限的)。很多是通过调用GAP实现的。
例如,要建立一个排列群,只需给定生成元的列表,像下面这样。
sage: G = PermutationGroup(['(1,2,3)(4,5)', '(3,4)'])sage: GPermutation Group with generators[(3,4), (1,2,3)(4,5)]sage: G.order()120sage: G.is_abelian()Falsesage: G.derived_series() # random-ish output[Permutation Group with generators[(1,2,3)(4,5), (3,4)],Permutation Group with generators[(1,5)(3,4), (1,5)(2,4), (1,3,5)]]sage: G.center()Subgroup generated by[()]of (Permutation Group with generators[(3,4), (1,2,3)(4,5)])sage: G.random_element() # random output(1,5,3)(2,4)sage: print(latex(G))\langle (3,4), (1,2,3)(4,5) \rangle
你还可以得到特征表(LaTeX格式的):
sage: G = PermutationGroup([[(1,2),(3,4)],[(1,2,3)]])sage: latex(G.character_table())\left(\begin{array}{rrrr}1 & 1 & 1 & 1 \\1 & 1 & -\zeta_{3} - 1 & \zeta_{3} \\1 & 1 & \zeta_{3} & -\zeta_{3} - 1 \\3 & -1 & 0 & 0\end{array}\right)
Sage还包括在有限域上的典型群和矩阵群:
sage: MS = MatrixSpace(GF(7), 2)sage: gens =[MS([[1,0],[-1,1]]),MS([[1,1],[0,1]])]sage: G = MatrixGroup(gens)sage: G.conjugacy_class_representatives()([1 0][0 6][0 4][6 0][0 6][0 4][0 6][0 6][0 6][4 0][0 1],[1 5],[5 5],[0 6],[1 2],[5 2],[1 0],[1 4],[1 3],[0 2],[5 0][0 3])sage: G = Sp(4,GF(7))sage: GSymplectic Group of rank 2 over Finite Field of size 7sage: G.random_element() # random output[5 5 5 1][0 2 6 3][5 0 1 0][4 6 3 4]sage: G.order()276595200
还可以使用阿贝尔群进行计算(无限的和有限的):
sage: F = AbelianGroup(5,[5,5,7,8,9], names='abcde')sage: (a, b, c, d, e) = F.gens()sage: d * b**2 * c**3b^2*c^3*dsage: F = AbelianGroup(3,[2]*3); FMultiplicative Abelian Group isomorphic to C2 x C2 x C2sage: H = AbelianGroup([2,3], names="xy"); HMultiplicative Abelian Group isomorphic to C2 x C3sage: AbelianGroup(5)Multiplicative Abelian Group isomorphic to Z x Z x Z x Z x Zsage: AbelianGroup(5).order()+Infinity
