群论与Sage

这本汇编收集了在群论入门课程中对学生有用的Sage命令。它的目的不是为了教授Sage或传授群论。(有许多关于群论的介绍性文本,更多关于Sage的信息可以通过 www.sagemath.org 相反,通过大致按照学生学习相应数学的顺序提供命令,可以鼓励他们进行实验,学习更多关于数学的知识,了解更多关于Sage的知识。并非巧合的是,当SAGE是SAGE的首字母缩写时,SAGE中的“E”代表“实验”。

本指南还以PDF格式分发,并作为SAGE工作表分发。工作表版本可以导入到在Web浏览器中运行的Sage笔记本环境中,然后,如果用户点击每个单元格下方的小“评估”链接,Sage就可以执行显示的代码块,以获得完全交互的体验。本教程的pdf和sage工作表版本可在http://abstract.ups.edu/sage-aata.html.上获得。

变更记录:

  • 2009/01/30版本1.0,第一个完整版本

  • 2009/03/03 1.1版,新增循环组大小交互

  • 2010/03/10 1.3版,取消了美国的许可,进行了一些编辑。

整数的基本性质

整数除法

该命令 a % b 将余数除以 a 通过 b 。换句话说,该值是唯一的整数 r 以使:

  1. 0 leq r < b

  2. a = bq + r 对于某个整数 q (商)。

然后 (a - r) / b 意志力平等 q 。例如::

sage: r = 14 % 3
sage: q = (14 - r) / 3
sage: r, q
(2, 4)

会回来的 2 for the value of r and 4 for the value of q. Note that the "/" is integer division, where any remainder is cast away and the result is always an integer. So, for example, `` 14/3``将再次相等 4 ,不是 4.66666

最大公约数

的最大公约数 ab 是通过以下命令获得的 gcd(a,b) ,在我们的第一次使用中, ab 都是整数。后来, ab 可以是具有整除和“伟大”概念的其他对象,例如多项式。例如::

sage: gcd(2776, 2452)
4

扩展的最大公约数

该命令 xgcd(a, b) (“扩展gcd”)返回一个三元组,其中第一个元素是的最大公约数 ab (与 gcd(a, b) 命令),但接下来的两个元素是 rs 以至于 ra + sb = gcd(a, b) 。例如, xgcd(633, 331) 退货 (1, 194, -371) 。可以使用以下命令提取三元组的部分内容 [ ] 要访问三元组的条目,请从第一个AS编号开始 0 。例如,以下代码应返回结果 True (即使您更改 ab )。研究这段代码将在很大程度上帮助您充分利用Sage的输出。(请注意,“=”是为变量赋值的方式,而在最后一行,“==”是我们确定两项相等的方式。)::

sage: a = 633
sage: b = 331
sage: extended = xgcd(a, b)
sage: g = extended[0]
sage: r = extended[1]
sage: s = extended[2]
sage: g == r*a + s*b
True

可分性

零的余数表示可除性。所以 (a % b) == 0 会回来的 True 如果 b 除法 a ,否则将返回 False 。例如, (9 % 3) == 0True ,但 (9 % 4) == 0False 。在Sage中执行之前,请尝试预测以下内容的输出。**

sage: answer1 = ((20 % 5) == 0)
sage: answer2 = ((17 % 4) == 0)
sage: answer1, answer2
(True, False)

保理

正如算术基本定理所承诺的那样, factor(a) 将返回一个唯一的 a 作为素数幂的产物。它将以可读性很好的形式打印,但也可以使用Python将其作为配对列表进行操作 (p_i, e_i) 包含素数作为基,以及它们的相关指数。例如::

sage: factor(2600)
2^3 * 5^2 * 13

如果您只想要整数的素除数,则使用 prime_divisors(a) 命令,该命令将返回所有素除数的列表 a 。例如::

sage: prime_divisors(2600)
[2, 5, 13]

我们可以使用两个级别的素数分解来剥离其他部分 [ ] 。这是另一个值得研究的很好的例子,可以学习如何深入到Python列表。**

sage: n = 2600
sage: decomposition = factor(n)
sage: print("{} decomposes as {}".format(n, decomposition))
2600 decomposes as 2^3 * 5^2 * 13
sage: secondterm = decomposition[1]
sage: print("Base and exponent (pair) for second prime: "+str(secondterm))
Base and exponent (pair) for second prime: (5, 2)
sage: base = secondterm[0]
sage: exponent = secondterm[1]
sage: print("Base is "+str(base))
Base is 5
sage: print("Exponent is "+str(exponent))
Exponent is 2
sage: thirdbase = decomposition[2][0]
sage: thirdexponent = decomposition[2][1]
sage: print("Base of third term is {} with exponent {}".format(thirdbase, thirdexponent))
Base of third term is 13 with exponent  1

通过更多的工作, factor() 命令可以用来分解更复杂的项,如多项式。

乘法逆、模算术

该命令 inverse_mod(a, n) 产生的乘法逆 a 国防部 n (如果它不存在,则为错误)。例如::

sage: inverse_mod(352, 917)
508

(作为检查,找到整数 m 以至于 352*508 == m*917+1 。)然后尝试::

sage: inverse_mod(4, 24)
Traceback (most recent call last):
...
ZeroDivisionError: inverse of Mod(4, 24) does not exist

并对结果进行解释。

采用模运算的幂

该命令 power_mod(a, m, n) 收益率 a^m 国防部 n 。例如::

sage: power_mod(15, 831, 23)
10

如果 m = -1 ,则此命令将复制的函数 inverse_mod()

欧拉 phi -功能

该命令 euler_phi(n) 将返回小于以下值的正整数 n 并且相对质数为 n (即具有最大公约数 n 等于1)。例如::

sage: euler_phi(345)
176

通过多次运行以下代码进行试验:

sage: m = random_prime(10000)
sage: n = random_prime(10000)
sage: euler_phi(m*n) == euler_phi(m) * euler_phi(n) or m == n
True

感觉到一种猜测即将到来吗?你能推广一下这个结果吗?

素数

该命令 is_prime(a) 退货 TrueFalse 取决于是否 a 是质数还是非质数。例如::

sage: is_prime(117371)
True

而::

sage: is_prime(14547073)
False

自那以后 14547073 = 1597 * 9109 (正如您可以使用 factor() 命令)。

该命令 random_prime(a, True) 将返回2到2之间的随机素数 a 。体验:

sage: p = random_prime(10^21, True)
sage: is_prime(p)
True

(替换 True 通过 False 将加快搜索速度,但结果不是最佳结果的可能性非常小。)

该命令 prime_range(a, b) 返回所有素数的有序列表 ab - 1 ,包括在内。例如::

sage: prime_range(500, 550)
[503, 509, 521, 523, 541, 547]

这些命令 next_prime(a)previous_prime(a) 是获得所需大小的单个质数的其他方法。让他们试一试。

置换群

塞奇对群论的很大一部分支持是基于GAP的例程(群、算法和https://www.gap-system.org.的编程群可以用许多不同的方式来描述,例如服从于一些定义关系的矩阵集合或符号集合。表示群的一种非常具体的方式是通过排列(整数1到1的函数的一对一和到函数 n ),使用函数组合作为组中的操作。Sage有许多专门为处理这种类型的小组而设计的例程,对于学习群论的人来说,它们也是获得群论基本思想经验的好方法。出于这两个原因,我们将专注于这些类型的群体。

书写排列

Sage uses "disjoint cycle notation" for permutations, see any introductory text on group theory (such as Judson, Section 4.1) for more on this. Composition occurs left to right, which is not what you might expect and is exactly the reverse of what Judson and many others use. (There are good reasons to support either direction, you just need to be certain you know which one is in play.) There are two ways to write the permutation sigma = (1,3) (2,5,4):

  1. 作为文本字符串(包括引号): "(1,3) (2,5,4)"

  2. 作为“元组”的Python列表: [(1,3), (2,5,4)]

群组

Sage知道许多流行的群体是排列的集合。下面列出了更多,但对于初学者来说,1到1的所有可能排列的完整“对称群” n 可以使用以下命令构建 SymmetricGroup(n)

Permutation elements 可以创建和组成组的元素,如下所示:

sage: G = SymmetricGroup(5)
sage: sigma = G("(1,3) (2,5,4)")
sage: rho = G([(2,4), (1,5)])
sage: rho^(-1) * sigma * rho
(1,2,4)(3,5)

置换群的元素的可用函数包括找出元素的顺序,即用于置换 sigma 这一阶数是 k 以至于 sigma^k 等于标识元素 () 。例如::

sage: G = SymmetricGroup(5)
sage: sigma = G("(1,3) (2,5,4)")
sage: sigma.order()
6

排列的符号 sigma 对于偶数排列定义为1,并且 -1 为了一种奇怪的排列。例如::

sage: G = SymmetricGroup(5)
sage: sigma = G("(1,3) (2,5,4)")
sage: sigma.sign()
-1

自那以后 sigma 是一种奇怪的排列。

可以通过“制表符补全”找到更多可应用于置换的可用函数。使用 sigma defined as an element of a permutation group, in a Sage cell, type sigma. (请注意“.”),然后按 Tab 钥匙。您将获得可用功能的列表(您可能需要向下滚动才能看到整个列表)。尝试和探索!这就是Sage的全部意义所在。你真的不能打碎任何东西。

创建组

这是一个带注释的列表,其中包含一些可以在Sage中简单创建的众所周知的小置换组。您可以在源代码文件中找到更多信息::

SAGE_ROOT/src/sage/groups/perm_gps/permgroup_named.py
  • SymmetricGroup(n) :全部 n! 排列上的 n 符号。

  • DihedralGroup(n) :A的对称性 n -阿刚。旋转和翻转, 2n 总而言之。

  • CyclicPermutationGroup(n) :旋转 n -Gon(无翻转), n 总而言之。

  • AlternatingGroup(n) :交替组启用 n 符号具有 n!/2 元素。

  • KleinFourGroup() :4阶非循环群。

群函数

置换群的单个元素很重要,但我们主要希望将群作为对象来研究。因此,对于群体来说,有各种各样的计算方法可用。定义一个组,例如::

sage: H = DihedralGroup(6)
sage: H
Dihedral group of order 12 as a permutation group

然后各种功能变得可用。

在尝试下面的示例之后,尝试使用制表符完成。已经定义了 H, type H. (请注意“.”),然后按 Tab 钥匙。您将获得可用功能的列表(您可能需要向下滚动才能看到整个列表)。和以前一样, experiment and explore -打碎任何东西真的很难。

这里有另外几种实验和探索的方法。找一个看起来有趣的函数,比如 is_abelian() 。类型 H.is_abelian? (请注意问号),后跟 Enter 钥匙。这将显示 is_abelian() 函数,描述输入和输出,可能用示例用法进行说明。

如果您想更多地了解Sage是如何工作的,或者可能扩展它的功能,那么您可以从查看完整的Python源代码开始。例如,尝试 H.is_abelian?? ,这将允许您确定 is_abelian() 功能基本上是依赖于GAP IsAbelian() 指挥部和发号施令的盖普为我们挑起重担。(要获得使用Sage的最大优势,了解一些基本的Python编程是有帮助的,但这并不是必需的。)

好的,接下来是一些流行的团体命令。如果您使用的是工作表,请确保已定义组 H 作为二面体群 D_6 ,因为我们不会在下面重复它的定义。

阿贝利安?

命令::

sage: H = DihedralGroup(6)
sage: H.is_abelian()
False

会回来的 False 自那以后 D_6 是一个非阿贝尔族。

订单

命令::

sage: H = DihedralGroup(6)
sage: H.order()
12

会回来的 12 自那以后 D_6 是一个由12个元素组成的群。

所有元素

命令::

sage: H = DihedralGroup(6)
sage: H.list()
[(),
 (1,5,3)(2,6,4),
 (1,3,5)(2,4,6),
 (1,6,5,4,3,2),
 (1,4)(2,5)(3,6),
 (1,2,3,4,5,6),
 (2,6)(3,5),
 (1,5)(2,4),
 (1,3)(4,6),
 (1,6)(2,5)(3,4),
 (1,4)(2,3)(5,6),
 (1,2)(3,6)(4,5)]

将返回的所有元素 H 以固定的顺序显示为一个Python列表。标引 ([ ] )可用于提取列表中的各个元素,请记住,对列表中的元素进行计数从零开始。**

sage: H = DihedralGroup(6)
sage: elements = H.list()
sage: elements[2]
(1,3,5)(2,4,6)

Cayley表

命令::

sage: H = DihedralGroup(6)
sage: H.cayley_table()
*  a b c d e f g h i j k l
 +------------------------
a| a b c d e f g h i j k l
b| b a d c f e h g j i l k
c| c k a e d g f i h l b j
d| d l b f c h e j g k a i
e| e j k g a i d l f b c h
f| f i l h b j c k e a d g
g| g h j i k l a b d c e f
h| h g i j l k b a c d f e
i| i f h l j b k c a e g d
j| j e g k i a l d b f h c
k| k c e a g d i f l h j b
l| l d f b h c j e k g i a

将构造的Cayley表(或“乘法表”) H 。默认情况下,该表使用小写拉丁字母来命名组中的元素。所使用的实际元素可以使用 row_keys()column_keys() 表的命令。例如,为了确定表中的第五个元素,名为 e **

sage: H = DihedralGroup(6)
sage: T = H.cayley_table()
sage: headings = T.row_keys()
sage: headings[4]
(1,3)(4,6)

中心

该命令 H.center() 将返回作为组中心的子组 H (参见《贾德森》中的练习2.46)。尝试::

sage: H = DihedralGroup(6)
sage: H.center().list()
[(), (1,4)(2,5)(3,6)]

查看哪些元素是 H 与之通勤 every 的元素 H

Cayley图

为了好玩,试试吧 show(H.cayley_graph())

子群

循环子群

如果 G 是一个团体, a 是组中的一个元素(尝试 a = G.random_element() ),然后::

a = G.random_element()
H = G.subgroup([a])

将创建 H 作为的循环子群 G 带发电机 a

例如,下面的代码将:

  1. 创建 G 作为五个符号上的对称群;

  2. 指定 sigma 作为一个元素 G

  3. 使用 sigma 作为循环子群的生成元 H

  4. 列出的所有元素 H

In more mathematical notation, we might write langle (1,2,3) (4,5) rangle = H subseteq G = S_5.

sage: G = SymmetricGroup(5)
sage: sigma = G("(1,2,3) (4,5)")
sage: H = G.subgroup([sigma])
sage: H.list()
[(), (1,2,3)(4,5), (1,3,2), (4,5), (1,2,3), (1,3,2)(4,5)]

通过尝试不同的排列来进行实验 sigma 并观察其对 H

循环群

本身是循环的基团既重要又结构丰富。该命令 CyclicPermutationGroup(n) 将创建一个与之循环的置换群 n 元素。考虑下面的例子(请注意,第三行的缩进很关键),它将列出一个阶数为20的循环组的元素,前面是每个元素的顺序。**

sage: n = 20
sage: CN = CyclicPermutationGroup(n)
sage: for g in CN:
....:     print("{}   {}".format(g.order(), g))
1   ()
20   (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20)
10   (1,3,5,7,9,11,13,15,17,19)(2,4,6,8,10,12,14,16,18,20)
20   (1,4,7,10,13,16,19,2,5,8,11,14,17,20,3,6,9,12,15,18)
5   (1,5,9,13,17)(2,6,10,14,18)(3,7,11,15,19)(4,8,12,16,20)
4   (1,6,11,16)(2,7,12,17)(3,8,13,18)(4,9,14,19)(5,10,15,20)
10   (1,7,13,19,5,11,17,3,9,15)(2,8,14,20,6,12,18,4,10,16)
20   (1,8,15,2,9,16,3,10,17,4,11,18,5,12,19,6,13,20,7,14)
5   (1,9,17,5,13)(2,10,18,6,14)(3,11,19,7,15)(4,12,20,8,16)
20   (1,10,19,8,17,6,15,4,13,2,11,20,9,18,7,16,5,14,3,12)
2   (1,11)(2,12)(3,13)(4,14)(5,15)(6,16)(7,17)(8,18)(9,19)(10,20)
20   (1,12,3,14,5,16,7,18,9,20,11,2,13,4,15,6,17,8,19,10)
5   (1,13,5,17,9)(2,14,6,18,10)(3,15,7,19,11)(4,16,8,20,12)
20   (1,14,7,20,13,6,19,12,5,18,11,4,17,10,3,16,9,2,15,8)
10   (1,15,9,3,17,11,5,19,13,7)(2,16,10,4,18,12,6,20,14,8)
4   (1,16,11,6)(2,17,12,7)(3,18,13,8)(4,19,14,9)(5,20,15,10)
5   (1,17,13,9,5)(2,18,14,10,6)(3,19,15,11,7)(4,20,16,12,8)
20   (1,18,15,12,9,6,3,20,17,14,11,8,5,2,19,16,13,10,7,4)
10   (1,19,17,15,13,11,9,7,5,3)(2,20,18,16,14,12,10,8,6,4)
20   (1,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2)

通过改变组的大小(更改 n )您可以开始说明循环群的一些结构(例如,尝试素数)。

我们可以从上面的输出中剪切/粘贴5阶的元素(在循环群有20个元素的情况下),并快速构建一个子群::

sage: C20 = CyclicPermutationGroup(20)
sage: rho = C20("(1,17,13,9,5)(2,18,14,10,6)(3,19,15,11,7)(4,20,16,12,8)")
sage: H = C20.subgroup([rho])
sage: H.list()
[(),
 (1,17,13,9,5)(2,18,14,10,6)(3,19,15,11,7)(4,20,16,12,8),
 (1,13,5,17,9)(2,14,6,18,10)(3,15,7,19,11)(4,16,8,20,12),
 (1,9,17,5,13)(2,10,18,6,14)(3,11,19,7,15)(4,12,20,8,16),
 (1,5,9,13,17)(2,6,10,14,18)(3,7,11,15,19)(4,8,12,16,20)]

对于循环组,以下命令将列出 all 亚群的成员。**

sage: C20 = CyclicPermutationGroup(20)
sage: C20.conjugacy_classes_subgroups()
[Subgroup generated by [()] of (Cyclic group of order 20 as a permutation group),
 Subgroup generated by [(1,11)(2,12)(3,13)(4,14)(5,15)(6,16)(7,17)(8,18)(9,19)(10,20)] of (Cyclic group of order 20 as a permutation group),
 Subgroup generated by [(1,6,11,16)(2,7,12,17)(3,8,13,18)(4,9,14,19)(5,10,15,20), (1,11)(2,12)(3,13)(4,14)(5,15)(6,16)(7,17)(8,18)(9,19)(10,20)] of (Cyclic group of order 20 as a permutation group),
 Subgroup generated by [(1,5,9,13,17)(2,6,10,14,18)(3,7,11,15,19)(4,8,12,16,20)] of (Cyclic group of order 20 as a permutation group),
 Subgroup generated by [(1,5,9,13,17)(2,6,10,14,18)(3,7,11,15,19)(4,8,12,16,20), (1,3,5,7,9,11,13,15,17,19)(2,4,6,8,10,12,14,16,18,20)] of (Cyclic group of order 20 as a permutation group),
 Subgroup generated by [(1,5,9,13,17)(2,6,10,14,18)(3,7,11,15,19)(4,8,12,16,20), (1,3,5,7,9,11,13,15,17,19)(2,4,6,8,10,12,14,16,18,20), (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20)] of (Cyclic group of order 20 as a permutation group)]

请注意,此命令使用了一些更高级的想法,通常不会列出 all 指一个群的子群。这里我们依赖于循环群的特殊性质(但请参阅下一节)。

如果您以PDF格式查看本文,则可以安全地跳过下一小段代码。但是,如果您将其视为Sage中的工作表,则可以在这里试验循环群的子群的结构。在输入框中,输入循环群的顺序(1到40之间的数字是较好的初始选择),Sage会将每个子群列为循环群及其生成元。底部的因式分解可能会帮助您形成一个猜想。**

%auto
@interact
def _(n = input_box(default=12, label = "Cyclic group of order:", type=Integer) ):
    cyclic = CyclicPermutationGroup(n)
    subgroups = cyclic.conjugacy_classes_subgroups()
    html( "All subgroups of a cyclic group of order $%s$\n" % latex(n) )
    table = "$\\begin{array}{ll}"
    for sg in subgroups:
      table = table + latex(sg.order()) + \
              " & \\left\\langle" + latex(sg.gens()[0]) + \
              "\\right\\rangle\\\\"
    table = table + "\\end{array}$"
    html(table)
    html("\nHint: $%s$ factors as $%s$" % ( latex(n), latex(factor(n)) ) )

所有子组

If H is a subgroup of G and g in G, then gHg^{-1} = {ghg^{-1} mid h in G} will also be a subgroup of G. If G is a group, then the command G.conjugacy_classes_subgroups() will return a list of subgroups of G, but not all of the subgroups. However, every subgroup can be constructed from one on the list by the gHg^{-1} construction with a suitable g. As an illustration, the code below:

  1. 创建 K 作为24阶的二面体群, D_{12}

  2. 存储由以下项输出的子组列表 K.conjugacy_classes_subgroups() 在变量中 sg

  3. 打印列表的元素;

  4. 选择列表中的第二个子组,并列出其元素。

sage: K = DihedralGroup(12)
sage: sg = K.conjugacy_classes_subgroups()
sage: sg
[Subgroup generated by [()] of (Dihedral group of order 24 as a permutation group),
 Subgroup generated by [(1,7)(2,8)(3,9)(4,10)(5,11)(6,12)] of (Dihedral group of order 24 as a permutation group),
 Subgroup generated by [(2,12)(3,11)(4,10)(5,9)(6,8)] of (Dihedral group of order 24 as a permutation group),
 Subgroup generated by [(1,2)(3,12)(4,11)(5,10)(6,9)(7,8)] of (Dihedral group of order 24 as a permutation group),
 Subgroup generated by [(1,5,9)(2,6,10)(3,7,11)(4,8,12)] of (Dihedral group of order 24 as a permutation group),
 Subgroup generated by [(2,12)(3,11)(4,10)(5,9)(6,8), (1,7)(2,8)(3,9)(4,10)(5,11)(6,12)] of (Dihedral group of order 24 as a permutation group),
 Subgroup generated by [(1,10,7,4)(2,11,8,5)(3,12,9,6), (1,7)(2,8)(3,9)(4,10)(5,11)(6,12)] of (Dihedral group of order 24 as a permutation group),
 Subgroup generated by [(1,2)(3,12)(4,11)(5,10)(6,9)(7,8), (1,7)(2,8)(3,9)(4,10)(5,11)(6,12)] of (Dihedral group of order 24 as a permutation group),
 Subgroup generated by [(1,5,9)(2,6,10)(3,7,11)(4,8,12), (1,3,5,7,9,11)(2,4,6,8,10,12)] of (Dihedral group of order 24 as a permutation group),
 Subgroup generated by [(1,5,9)(2,6,10)(3,7,11)(4,8,12), (2,12)(3,11)(4,10)(5,9)(6,8)] of (Dihedral group of order 24 as a permutation group),
 Subgroup generated by [(1,5,9)(2,6,10)(3,7,11)(4,8,12), (1,2)(3,12)(4,11)(5,10)(6,9)(7,8)] of (Dihedral group of order 24 as a permutation group),
 Subgroup generated by [(2,12)(3,11)(4,10)(5,9)(6,8), (1,10,7,4)(2,11,8,5)(3,12,9,6), (1,7)(2,8)(3,9)(4,10)(5,11)(6,12)] of (Dihedral group of order 24 as a permutation group),
 Subgroup generated by [(1,5,9)(2,6,10)(3,7,11)(4,8,12), (1,3,5,7,9,11)(2,4,6,8,10,12), (2,12)(3,11)(4,10)(5,9)(6,8)] of (Dihedral group of order 24 as a permutation group),
 Subgroup generated by [(1,5,9)(2,6,10)(3,7,11)(4,8,12), (1,3,5,7,9,11)(2,4,6,8,10,12), (1,2,3,4,5,6,7,8,9,10,11,12)] of (Dihedral group of order 24 as a permutation group),
 Subgroup generated by [(1,5,9)(2,6,10)(3,7,11)(4,8,12), (1,3,5,7,9,11)(2,4,6,8,10,12), (1,2)(3,12)(4,11)(5,10)(6,9)(7,8)] of (Dihedral group of order 24 as a permutation group),
 Subgroup generated by [(1,5,9)(2,6,10)(3,7,11)(4,8,12), (1,3,5,7,9,11)(2,4,6,8,10,12), (2,12)(3,11)(4,10)(5,9)(6,8), (1,2,3,4,5,6,7,8,9,10,11,12)] of (Dihedral group of order 24 as a permutation group)]

sage: print("An order two subgroup:\n{}".format(sg[1].list()))
An order two subgroup:
[(), (1,7)(2,8)(3,9)(4,10)(5,11)(6,12)]

重要的是要注意,这是一个很长的子组列表,但很少会创建 every 这样的亚群。例如,代码如下:

  1. 创建 rho 作为集团的一员 K

  2. 创建 L 作为的循环子群 K

  3. 打印的两个元素 L ;最后

  4. 测试以查看此子组是否为列表输出的一部分 sg 就在上面创建的(它不是)。

sage: K = DihedralGroup(12)
sage: sg = K.conjugacy_classes_subgroups()
sage: rho = K("(1,4) (2,3) (5,12) (6,11) (7,10) (8,9)")
sage: L = PermutationGroup([rho])
sage: L.list()
[(), (1,4)(2,3)(5,12)(6,11)(7,10)(8,9)]
sage: L in sg
False

对称群

您可以给Sage提供一个置换群元素的简短列表,Sage将找到包含这些元素的最小子群。我们说列表“生成”了子组。我们列出了几个可以用这种方式创建的有趣的子组。

等边三角形的对称性

将等边三角形的顶点标记为1、2和3。然后 any 顶点的排列将是三角形的对称性。所以要么 SymmetricGroup(3)DihedralGroup(3) 将创建完全对称群。

图的对称性 n --金刚

一个常客, n 平面中的侧面图形(AN n -gon)有 2n 对称性,包括 n 旋转(包括微不足道的旋转)和 n 绕不同的轴“翻转”。二面体群 DihedralGroup(n) 通常被定义为恰好是一个 n -阿刚。

四面体的对称性

Label the 4 vertices of a regular tetrahedron as 1, 2, 3 and 4. Fix the vertex labeled 4 and rotate the opposite face through 120 degrees. This will create the permutation/symmetry (1,2, 3). Similarly, fixing vertex 1, and rotating the opposite face will create the permutation (2,3,4). These two permutations are enough to generate the full group of the twelve symmetries of the tetrahedron. Another symmetry can be visualized by running an axis through the midpoint of an edge of the tetrahedron through to the midpoint of the opposite edge, and then rotating by 180 degrees about this axis. For example, the 1--2 edge is opposite the 3--4 edge, and the symmetry is described by the permutation (1,2) (3,4). This permutation, along with either of the above permutations will also generate the group. So here are two ways to create this group:

sage: tetra_one = PermutationGroup(["(1,2,3)", "(2,3,4)"])
sage: tetra_one
Permutation Group with generators [(2,3,4), (1,2,3)]
sage: tetra_two = PermutationGroup(["(1,2,3)", "(1,2)(3,4)"])
sage: tetra_two
Permutation Group with generators [(1,2)(3,4), (1,2,3)]

该组具有各种有趣的属性,因此值得一试。您可能也知道它是“4个符号上的交替组”,Sage将使用以下命令创建它 AlternatingGroup(4)

立方体的对称性

用1、2、3和4标记立方体一个面的顶点,在相对面上标记顶点5、6、7和8(5与1相对,6与2相对,依此类推)。考虑从面的中心到对立面的中心的三个轴,并考虑围绕每个轴旋转四分之一圈。这三个旋转将构成整个对称群。使用::

sage: cube = PermutationGroup(["(3,2,6,7)(4,1,5,8)",
....:     "(1,2,6,5)(4,3,7,8)", "(1,2,3,4)(5,6,7,8)"])
sage: cube.list()
[(),
 (1,3)(2,4)(5,7)(6,8),
 (1,6)(2,5)(3,8)(4,7),
 (1,8)(2,7)(3,6)(4,5),
 (1,4,3,2)(5,8,7,6),
 (1,2,3,4)(5,6,7,8),
 (1,5)(2,8)(3,7)(4,6),
 (1,7)(2,6)(3,5)(4,8),
 (2,5,4)(3,6,8),
 (1,3,8)(2,7,5),
 (1,6,3)(4,5,7),
 (1,8,6)(2,4,7),
 (1,4)(2,8)(3,5)(6,7),
 (1,2,6,5)(3,7,8,4),
 (1,5,6,2)(3,4,8,7),
 (1,7)(2,3)(4,6)(5,8),
 (2,4,5)(3,8,6),
 (1,3,6)(4,7,5),
 (1,6,8)(2,7,4),
 (1,8,3)(2,5,7),
 (1,4,8,5)(2,3,7,6),
 (1,2)(3,5)(4,6)(7,8),
 (1,5,8,4)(2,6,7,3),
 (1,7)(2,8)(3,4)(5,6)]

立方体有四条不同的对角线(通过立方体的中心连接相对的顶点)。立方体的每个对称性都会导致对角线排列不同。这样,我们就可以把对称群的一个元素看作是四个“符号”-对角线的排列。碰巧的是 each 对角线的24个排列中,只有一个是由立方体的8个顶点的一个对称性产生的。所以这个小组的成员 S_8 是“相同于”吗? S_4 。在Sage::

sage: cube = PermutationGroup(["(3,2,6,7)(4,1,5,8)",
....:     "(1,2,6,5)(4,3,7,8)", "(1,2,3,4)(5,6,7,8)"])
sage: cube.is_isomorphic(SymmetricGroup(4))
True

将测试以查看立方体的对称组是否与 S_4 所以会回来的 True

这是创建立方体对称性的另一种方法。给六个人编数字 faces 立方体的形状如下:顶部1个,底部2个,前面3个,右边4个,后面5个,左边6个。现在,可以使用与以前相同的旋转(通过两个相对的面的中心绕轴旋转四分之一圈)作为对称组的生成器:

sage: cubeface = PermutationGroup(["(1,3,2,5)", "(1,4,2,6)", "(3,4,5,6)"])
sage: cubeface.list()
[(),
 (3,5)(4,6),
 (1,6,5)(2,4,3),
 (1,6,3)(2,4,5),
 (1,5,6)(2,3,4),
 (1,5,4)(2,3,6),
 (1,2)(4,6),
 (1,2)(3,5),
 (1,4,5)(2,6,3),
 (1,4,3)(2,6,5),
 (1,3,4)(2,5,6),
 (1,3,6)(2,5,4),
 (1,4,2,6),
 (1,6)(2,4)(3,5),
 (1,3,2,5),
 (1,5,2,3),
 (1,2)(3,4)(5,6),
 (3,6,5,4),
 (1,6,2,4),
 (1,4)(2,6)(3,5),
 (1,5)(2,3)(4,6),
 (1,3)(2,5)(4,6),
 (3,4,5,6),
 (1,2)(3,6)(4,5)]

再说一次,这个子组 S_6 与完全对称群“相同”, S_4 **

sage: cubeface = PermutationGroup(["(1,3,2,5)", "(1,4,2,6)", "(3,4,5,6)"])
sage: cubeface.is_isomorphic(SymmetricGroup(4))
True

事实证明,在上面的每个构造中,只使用三个生成器中的两个(任意两个)就足够了。但一台发电机是不够的。试一试,用Sage说服自己,在每种情况下都可以牺牲一个发电机。

正规子群

检查正规性

代码如下:

  1. 从交替的组开始 A_4

  2. 指定组的三个元素(四面体的三个对称,即通过相对边的中点绕轴旋转180度);

  3. 使用这三个元素来生成子组;最后

  4. 说明了用于测试子组是否 H 是群的正规子群 A4

sage: A4 = AlternatingGroup(4)
sage: r1 = A4("(1,2) (3,4)")
sage: r2 = A4("(1,3) (2,4)")
sage: r3 = A4("(1,4) (2,3)")
sage: H = A4.subgroup([r1, r2, r3])
sage: H.is_normal(A4)
True

商群

扩展前面的示例,我们可以创建的商(因数)组 A_4 通过 H 。这些命令如下:

sage: A4 = AlternatingGroup(4)
sage: r1 = A4("(1,2) (3,4)")
sage: r2 = A4("(1,3) (2,4)")
sage: r3 = A4("(1,4) (2,3)")
sage: H = A4.subgroup([r1, r2, r3])
sage: A4.quotient(H)
Permutation Group with generators [(1,2,3)]

返回由生成的排列组 (1,2,3) 。正如预期的那样,这是一个3阶群。请注意,我们没有得到实际陪集的群,而是得到了一个群 isomorphic 致因素组。

简单群

很容易检查一个群是否没有任何正规子群。这些命令如下:

sage: AlternatingGroup(5).is_simple()
True
sage: AlternatingGroup(4).is_simple()
False

指纹 True 然后 False

作文系列

对于任何群体来说,都很容易获得一个作曲系列。算法中有随机性的因素,因此您可能不会总是得到相同的结果。(但根据乔丹-霍尔德定理,因子群列表是独一无二的。)此外,生成的子组有时具有比所需的生成器更多的生成器,因此您可能希望通过检查属性(如其顺序)来“研究”每个子组。

一个有趣的例子是::

DihedralGroup(105).composition_series()

输出将是由5个子组组成的列表 D_{105} ,每一个都是其前身的正规子群。

其他几个级数也是可能的,例如派生级数。使用制表符完成来查看可能性。

毗邻关系

Given a group G, we can define a relation sim on G by: for a,b in G, a sim b if and only if there exists an element g in G such that gag^{-1} = b.

由于这是一种等价关系,因此存在 G 转化为等价类。对于这种非常重要的关系,这些类被称为“共轭类”。这些等价类中的每一个的代表如下所示。假设 G 是一个置换群,那么 G.conjugacy_classes_representatives() 将返回一个$G$元素列表,每个共轭类一个。

Given an element g in G, the "centralizer" of g is the set C(g) = {h in G mid hgh^{-1} = g}, which is a subgroup of G. A theorem tells us that the size of each conjugacy class is the order of the group divided by the order of the centralizer of an element of the class. With the following code we can determine the size of the conjugacy classes of the full symmetric group on 5 symbols:

sage: G = SymmetricGroup(5)
sage: group_order = G.order()
sage: reps = G.conjugacy_classes_representatives()
sage: class_sizes = []
sage: for g in reps:
....:     class_sizes.append(group_order / G.centralizer(g).order())
...
sage: class_sizes
[1, 10, 15, 20, 20, 30, 24]

这应该会生成列表 [1, 10, 15, 20, 20, 30, 24] 你可以查一下总和是120,也就是小组的顺序。您也许可以通过计算组中的元素来生成此列表 S_5 具有相同的循环结构(这将需要一些简单的组合论证)。

Sylow子群

西洛定理断言了某些子群的存在。例如,如果 p 是素数,并且 p^r 划分组的顺序 G ,那么 G 必须有Order的子群 p^r 。这样的一个子组可以在 conjugacy_classes_subgroups() 命令,检查所产生的子组的顺序。这个 map() 命令是完成此操作的一种快捷方法。7个符号上的对称群, S_7 ,有秩序 7! = 5040 并且可以被 2^4 = 16 。让我们找出4个符号上排列的子群的一个例子,阶为16::

sage: G = SymmetricGroup(7)
sage: subgroups = G.conjugacy_classes_subgroups()
sage: list(map(order, subgroups))
[1, 2, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8, 8, 8, 8, 8, 8, 8, 9, 10, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 14, 16, 18, 18, 18, 20, 20, 20, 21, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 36, 36, 36, 36, 40, 42, 48, 48, 48, 60, 60, 72, 72, 72, 72, 120, 120, 120, 120, 144, 168, 240, 360, 720, 2520, 5040]

这个 map(order, subgroups) 命令将应用 order() 函数传递给列表中的每个子组 subgroups 。因此,输出是许多子组(准确地说是96个)的顺序的大列表。如果仔细计算,您会发现第49个子组的阶数为16。您可以检索此组以供进一步研究,方法是 subgroups[48] (请记住,计数从零开始)。

如果 p^r 是世界上最强大的 p 划分顺序划分…的顺序 G ,然后是序的子群 p^r 被称为“西洛” p 子群。“Sylow定理也说任何两个Sylow p -子群是共轭的,因此 conjugacy_classes_subgroups() 应仅包含每个Sylow p -分组一次。但有一种更简单的方法, sylow_subgroup(p) 将会退回一张。请注意,该命令的参数只是素数$p$,而不是全幂 p^r 。未使用质数将生成信息性错误消息。

作为置换群的小阶群

我们在这里列出了所有阶数小于16的群的结构,作为置换群。

---------------------------------------------------------------------------------------------
Size  Construction                                Notes
---------------------------------------------------------------------------------------------
1     SymmetricGroup(1)                           Trivial
2     SymmetricGroup(2)                           Also CyclicPermutationGroup(2)
3     CyclicPermutationGroup(3)                   Prime order
4     CyclicPermutationGroup(4)                   Cyclic
4     KleinFourGroup()                            Abelian, non-cyclic
5     CyclicPermutationGroup(5)                   Prime order
6     CyclicPermutationGroup(6)                   Cyclic
6     SymmetricGroup(3)                           Non-abelian, also DihedralGroup(3)
7     CyclicPermutationGroup(7)                   Prime order
8     CyclicPermutationGroup(8)                   Cyclic
8     D1 = CyclicPermutationGroup(4)
      D2 = CyclicPermutationGroup(2)
      G = direct_product_permgroups([D1,D2])      Abelian, non-cyclic
8     D1 = CyclicPermutationGroup(2)
      D2 = CyclicPermutationGroup(2)
      D3 = CyclicPermutationGroup(2)
      G = direct_product_permgroups([D1,D2,D3])   Abelian, non-cyclic
8     DihedralGroup(4)                            Non-abelian
8     QuaternionGroup()                           Quaternions, also DiCyclicGroup(2)
9     CyclicPermutationGroup(9)                   Cyclic
9     D1 = CyclicPermutationGroup(3)
      D2 = CyclicPermutationGroup(3)
      G = direct_product_permgroups([D1,D2])      Abelian, non-cyclic
10    CyclicPermutationGroup(10)                  Cyclic
10    DihedralGroup(5)                            Non-abelian
11    CyclicPermutationGroup(11)                  Prime order
12    CyclicPermutationGroup(12)                  Cyclic
12    D1 = CyclicPermutationGroup(6)
      D2 = CyclicPermutationGroup(2)
      G = direct_product_permgroups([D1,D2])      Abelian, non-cyclic
12    DihedralGroup(6)                            Non-abelian
12    AlternatingGroup(4)                         Non-abelian, symmetries of tetrahedron
12    DiCyclicGroup(3)                            Non-abelian
                                                  Also semi-direct  product $Z_3 \rtimes Z_4$
13    CyclicPermutationGroup(13)                  Prime order
14    CyclicPermutationGroup(14)                  Cyclic
14    DihedralGroup(7)                            Non-abelian
15    CyclicPermutationGroup(15)                  Cyclic
----------------------------------------------------------------------------------------------

确认

构建Sage是许多人的工作,而群论部分是通过GAP创建者的广泛工作而成为可能的。然而,我们将从Sage团队中挑出三个人来感谢他们为您带来Sage的群论部分的主要贡献:David Joyner,William Stein和Robert Bradshaw。谢谢!