充分性证明
因为H是G的子群,得 H ≠ H \neq H= ∅,对任意 a , b ∈ H a,b \in \mathbb{H} a,b∈H,因为H是群,满足群的性质, b − 1 ∈ H b^{-1} \in \mathbb{H} b−1∈H,由群的封闭性 a b − 1 ∈ H ab^{-1} \in \mathbb{H} ab−1∈H,充分性得证。
必要性证明
因为 H ≠ H \neq H= ∅,并对 a , b ∈ H a,b \in \mathbb{H} a,b∈H,有 a b − 1 ∈ H ab^{-1} \in \mathbb{H} ab−1∈H
任取 a ∈ H a \in \mathbb{H} a∈H,由条件得 e = a a − 1 ∈ H e=aa^{-1} \in \mathbb{H} e=aa−1∈H,故单位元存在。对任意 b ∈ H b \in \mathbb{H} b∈H,由条件得 b − 1 = e b − 1 ∈ H b^{-1}=eb^{-1} \in \mathbb{H} b−1=eb−1∈H。逆元存在。
因此,对任意 a , b ∈ H a,b \in \mathbb{H} a,b∈H,有 b − 1 ∈ H b^{-1} \in \mathbb{H} b−1∈H,进而有 a b = a ( b − 1 ) − 1 ∈ H ab=a(b^{-1})^{-1} \in \mathbb{H} ab=a(b−1)−1∈H,满足封闭性。H满足群公理(结合律满足),必要性得证明。
因为群 G \mathbb{G} G没有非平凡子群,所以群 G \mathbb{G} G只有平凡子群。设a是G中的非单位元,则H=(a)是G的子群且H≠{e},所以G=H=(a) ,H为循环群,所以G是循环群。
设群G是以g为生成元生成的循环群,阶为n,群中任意元素 h = g k h=g^k h=gk,k为任意整数,又命题7.5,得h的阶为n/d,且 d = g c d ( k , n ) d=gcd(k,n) d=gcd(k,n),证明得群G中任意元素的阶都整除群G的阶。
(8) Z p ∗ Z^{*}_{p} Zp∗的最小生成元
import math def is_prime(n): Sqrtn=int(math.sqrt(n))+1 if n<=1: return False for i in range (2,Sqrtn): if n%i == 0: return False return True def prime_fators_list(p): list= [] for i in range(2,p): if(p%i == 0 and is_prime(i)): list.append(i) return list def is_primitive_root(a,p): flist =prime_fators_list(p-1) for f in flist: if pow(a, int((p-1)/f), p) == 1: return False return True def the_smallest_root(p): for i in range (2, p): if is_primitive_root(i, p): return i return -1 def the_msmallset_root(p): Mroot= -1 for i in range(2, p): if not is_prime(i): continue elif the_smallest_root(i) > Mroot: Mroot = the_smallest_root(i) return Mroot k = the_smallest_root(11) print(k) g=the_msmallset_root(10000) print(g)丑陋的代码… 得最大的最小生成元是31
(9)
(a) 群g的阶为 ϕ ( p ) \phi({p}) ϕ(p)/2=(p-1)/2=q。原因** Z p ∗ Z^*_{p} Zp∗的元素为{1,2,3,…p-1},因为 g = h 2 g=h^2 g=h2,又 i 2 i^2 i2 mod p = ( p − i ) 2 (p-i)^2 (p−i)2 mod p,所以群g的阶为 Z p ∗ Z^*_{p} Zp∗阶的二分之一。
(b) 群g中的生成元的个数为 ϕ ( q ) \phi(q) ϕ(q)
©
def construct_group(h,p): group = [] g=h**2%p group.append(g) while g!=1: g=(g*(h**2))%p group.append(g) return group n2 = int(input()) for i in range(2, n2-1): group = construct_group(i, n2) print(group)