本文主要是介绍GAP软件的使用(20150514、20151002、20151004、20151012),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
20151118:删除11种4阶环的内容。
20151026添加:
20151026添加:
gap> LoadPackage("guava");
true
gap> q:=5;F:=GF(q);R:=PolynomialRing(F,2);;
5
GF(5)
gap> vars:=IndeterminatesOfPolynomialRing(R);x:=vars[1];y:=vars[2];
[ x_1, x_2 ]
x_1
x_2
gap> crv:=AffineCurve(y^3-x^3-x-1,R);
rec( polynomial := -x_1^3+x_2^3-x_1-Z(5)^0, ring := GF(5)[x_1,x_2] )
gap> g:=GenusCurve(crv);
1
gap> crv:=AffineCurve(y^2-x^3,R);
rec( polynomial := -x_1^3+x_2^2, ring := GF(5)[x_1,x_2] )
gap> g:=GenusCurve(crv);
1
定义在域F上的仿射代数曲线可以看作是F_n中由若干个n-元多项式定义的公共零点,使得其维数为一。
1.亏格为0的曲线:这种曲线至少有一个有理点在上面,在仿射或射影空间中,有理点是明显的或容易找到的。
2.亏格为1的曲线:这种曲线至少有一个可见的有理点和一个可见的有理对。
定理:设两三次曲线交9个点,如果第三条三次曲线过其中8个点,那么它一定过第九个点。
定理(2000):设两曲线Cm和Cn交mn个点,如果第三条曲线Cm+n-k过其中mn-(k-2)个点,那么它一定过剩下的k-2个点。
三次曲线的分类早在Newton那里就已经开始了,最后划分为72类。牛顿1707年证明在坐标变换下三次曲线有标准方程:y^2=x^3+ax^2+bx+c
椭圆曲线可以由Weierstrass的P-函数参数化:x=P(u), y=P´(u)
椭圆曲线上的群结构(点之间可定义加法):P+0=P;P+V=0;P+Q=Q+P;(P+Q)+R=P+(Q+R).
高观点下的初等数学3.(德国)克莱因
chap27从精确理论观点讨论平面几何
若一条曲线可以通过直尺机械产生,它就是代数曲线。
比代数曲线更为特殊的是有理曲线。
一般,我们把能嵌入到复射影空间的光滑复流形都称为代数流形。
L(D)-L(K-D)=degD-g+1
dim ker@-dim coker@=1-g
弄明白什么叫“除子”,才可以真正明白Riemann-Roch定理。Riemann-Roch定理的前身是Riemann不等式:dimF>=1+n-g,dimF是紧Riemann曲面M上的亚纯函数(由极点控制)集合F构成的向量空间的维数,g是M的亏格。1864年,Riemann的学生Roch在不等式的左边添加一项而使之成为如今的Riemann-Roch定理:dimF-dimD=1+n-g,dimD表示在每个极点处有不小于一阶零点的全纯微 分构成的向量空间的维数。
true
gap> q:=5;F:=GF(q);R:=PolynomialRing(F,2);;
5
GF(5)
gap> vars:=IndeterminatesOfPolynomialRing(R);x:=vars[1];y:=vars[2];
[ x_1, x_2 ]
x_1
x_2
gap> crv:=AffineCurve(y^3-x^3-x-1,R);
rec( polynomial := -x_1^3+x_2^3-x_1-Z(5)^0, ring := GF(5)[x_1,x_2] )
gap> g:=GenusCurve(crv);
1
gap> crv:=AffineCurve(y^2-x^3,R);
rec( polynomial := -x_1^3+x_2^2, ring := GF(5)[x_1,x_2] )
gap> g:=GenusCurve(crv);
1
定义在域F上的仿射代数曲线可以看作是F_n中由若干个n-元多项式定义的公共零点,使得其维数为一。
1.亏格为0的曲线:这种曲线至少有一个有理点在上面,在仿射或射影空间中,有理点是明显的或容易找到的。
2.亏格为1的曲线:这种曲线至少有一个可见的有理点和一个可见的有理对。
定理:设两三次曲线交9个点,如果第三条三次曲线过其中8个点,那么它一定过第九个点。
定理(2000):设两曲线Cm和Cn交mn个点,如果第三条曲线Cm+n-k过其中mn-(k-2)个点,那么它一定过剩下的k-2个点。
三次曲线的分类早在Newton那里就已经开始了,最后划分为72类。牛顿1707年证明在坐标变换下三次曲线有标准方程:y^2=x^3+ax^2+bx+c
椭圆曲线可以由Weierstrass的P-函数参数化:x=P(u), y=P´(u)
椭圆曲线上的群结构(点之间可定义加法):P+0=P;P+V=0;P+Q=Q+P;(P+Q)+R=P+(Q+R).
高观点下的初等数学3.(德国)克莱因
chap27从精确理论观点讨论平面几何
若一条曲线可以通过直尺机械产生,它就是代数曲线。
比代数曲线更为特殊的是有理曲线。
一般,我们把能嵌入到复射影空间的光滑复流形都称为代数流形。
L(D)-L(K-D)=degD-g+1
dim ker@-dim coker@=1-g
弄明白什么叫“除子”,才可以真正明白Riemann-Roch定理。Riemann-Roch定理的前身是Riemann不等式:dimF>=1+n-g,dimF是紧Riemann曲面M上的亚纯函数(由极点控制)集合F构成的向量空间的维数,g是M的亏格。1864年,Riemann的学生Roch在不等式的左边添加一项而使之成为如今的Riemann-Roch定理:dimF-dimD=1+n-g,dimD表示在每个极点处有不小于一阶零点的全纯微 分构成的向量空间的维数。
20151119添加:
Gauss超几何函数
For scalar a, b, and c, hypergeom([a,b],c,z) is the Gauss hypergeometric function 2F1(a,b;c;z).
>> doc hypergeom
>> y=hypergeom(1,1,1)
For scalar a, b, and c, hypergeom([a,b],c,z) is the Gauss hypergeometric function 2F1(a,b;c;z).
>> doc hypergeom
>> y=hypergeom(1,1,1)
y =
2.7183
>> y=hypergeom([1,1],1,1)
y =
NaN + Infi
chap4重要的组合数
4.1二项式系数
对于正整数n及非负整数k,n>=k,称二项式定理中的系数(n,k)=[n]_k/k!为二项式系数。
? binomial(5,2)
%3 = 10
4.3高斯二项式系数
对指定常数q及非负整数n,r,定义高斯二项式系数为
命题:Gauss二项式系数的组合意义是:q为素数幂时[n,r]是GF(q)上n维向量空间的r维子空间个数。
命题:[n,r]_q是q的r(n-r)次多项式,且lim[q->1][n,r]_q=(n,r)。此时称[n,r]_q是(n,r)的q模拟。
gap> LoadPackage("quagroup");
|
| QuaGroup
|
----------- A package for dealing with quantized enveloping algebras
|
| Willem de Graaf
| degraaf@science.unitn.it
chap4重要的组合数
4.1二项式系数
对于正整数n及非负整数k,n>=k,称二项式定理中的系数(n,k)=[n]_k/k!为二项式系数。
? binomial(5,2)
%3 = 10
4.3高斯二项式系数
对指定常数q及非负整数n,r,定义高斯二项式系数为
命题:Gauss二项式系数的组合意义是:q为素数幂时[n,r]是GF(q)上n维向量空间的r维子空间个数。
命题:[n,r]_q是q的r(n-r)次多项式,且lim[q->1][n,r]_q=(n,r)。此时称[n,r]_q是(n,r)的q模拟。
gap> LoadPackage("quagroup");
|
| QuaGroup
|
----------- A package for dealing with quantized enveloping algebras
|
| Willem de Graaf
| degraaf@science.unitn.it
true
gap> GaussianBinomial( 5, 2, _q^2 );
q^12+q^8+2*q^4+2+2*q^-4+q^-8+q^-12
gap> GaussianBinomial( 5, 2, _q);
q^6+q^4+2*q^2+2+2*q^-2+q^-4+q^-6
gap> GaussianBinomial( 5, 0, _q);
1
gap> GaussianBinomial( 5, 6, _q);
0
gap> GaussianBinomial( 5, 3, _q);
q^6+q^4+2*q^2+2+2*q^-2+q^-4+q^-6
chap9波利亚计数理论
1937年,(匈牙利-美)波利亚(G.Polya,1887-1985)提出波利亚计数定理。
9.1作用在集合上的群
对群G的两个子群H1和H2,若存在g∈G使得gH1g^-1=H2,则称这两个子群是彼此共轭的。
对于x∈X,称X的子集θ(x)为x所在的轨(orbit)。X中的两元同轨关系是一种等价关系。轨θ(x)即是X在G作用下所划分成的等价类(或称传递集、可迁集、可迁类)。对于x∈X,称G_x为x的稳定核(stabilizer)。
称|G|为G的阶,|X|为G的度。
命题9.1.1:稳定核是G的子群,而同一轨中各元的稳定核是彼此共轭的。
命题9.1.2:对于x∈X,有|G|=|θ(x)|•|G_x|。
六面体群(阶为24)分别作用于立方体的顶点集(度为8)、棱集合(度为12)与面集合(度为6)时
X90表示绕X轴顺时针旋转90°,对应P1X90=P2;
y90表示绕Y轴逆时针旋转90°,对应y90P1=P2。
http://www.doc88.com/p-692153995466.html
gap> X90:=[[1,0,0],[0,0,1],[0,-1,0]];;y90:=[[0,0,-1],[0,1,0],[1,0,0]];;C4:=GroupWithGenerators([X90]);;IdGroup(C4);G:=GroupWithGenerators([X90,y90]);;IdGroup(G);
[ 4, 1 ]
[ 24, 12 ]
gap> G:=SymmetricGroup(4);;IdGroup(G);cl:=ConjugacyClasses(G);
[ 24, 12 ]
[ ()^G, (1,2)^G, (1,2)(3,4)^G, (1,2,3)^G, (1,2,3,4)^G ]
gap> len:=Size(cl);for i in [1..len] do Print(Size(cl[i]),","); od;Print("\n");for i in [1..len] do Print(IdGroup(Centralizer(cl[i])),","); od;
5
1,6,3,8,6,
[ 24, 12 ],[ 4, 2 ],[ 8, 3 ],[ 3, 1 ],[ 4, 1 ],
gap> for i in [1..len] do Print(Representative(cl[i]),",",Size(cl[i]),",",Size(Centralizer(cl[i])),",",Elements(Centralizer(cl[i])),"\n");od;
(),1,24,[ (), (3,4), (2,3), (2,3,4), (2,4,3), (2,4), (1,2), (1,2)(3,4), (1,2,3), (1,2,3,4), (1,2,4,3), (1,2,4),
(1,3,2), (1,3,4,2), (1,3), (1,3,4), (1,3)(2,4), (1,3,2,4), (1,4,3,2), (1,4,2), (1,4,3), (1,4), (1,4,2,3),
(1,4)(2,3) ]
(1,2),6,4,[ (), (3,4), (1,2), (1,2)(3,4) ]
(1,2)(3,4),3,8,[ (), (3,4), (1,2), (1,2)(3,4), (1,3)(2,4), (1,3,2,4), (1,4,2,3), (1,4)(2,3) ]
(1,2,3),8,3,[ (), (1,2,3), (1,3,2) ]
(1,2,3,4),6,4,[ (), (1,2,3,4), (1,3)(2,4), (1,4,3,2) ]
9.2有关的群的运算
9.3置换群的轮换指标
9.4伯恩赛德引理
作用在X上的置换群G称为可迁的(transitive),若G在X上作用的轨道仅一个。对于正整数k,作用在X上的置换群G称为k可迁 的,若对X上的任两个k排列,存在某g∈G,可使其一个变为另一个。k>=2时的可迁亦可统称为重可迁。对¥t<=k,若G是k可迁的,则G亦是t可迁的。故一般所称的k可迁,常指最大可迁值。若G是k可迁的,而单位元是G中唯一固定k个点的置换,则G称为恰k可迁的。恰1可迁群称为在X上正则。
命题9.4.3:当n>=3时,对称群S_n是n可迁的,而交代群A_n是(n-2)可迁的。
9.5波利亚计数定理
9.6圈形排列问题
9.7图的计数多项式
9.8波利亚定理的推广
9.9波利亚定理的应用
gap> GaussianBinomial( 5, 2, _q^2 );
q^12+q^8+2*q^4+2+2*q^-4+q^-8+q^-12
gap> GaussianBinomial( 5, 2, _q);
q^6+q^4+2*q^2+2+2*q^-2+q^-4+q^-6
gap> GaussianBinomial( 5, 0, _q);
1
gap> GaussianBinomial( 5, 6, _q);
0
gap> GaussianBinomial( 5, 3, _q);
q^6+q^4+2*q^2+2+2*q^-2+q^-4+q^-6
chap9波利亚计数理论
1937年,(匈牙利-美)波利亚(G.Polya,1887-1985)提出波利亚计数定理。
9.1作用在集合上的群
对群G的两个子群H1和H2,若存在g∈G使得gH1g^-1=H2,则称这两个子群是彼此共轭的。
对于x∈X,称X的子集θ(x)为x所在的轨(orbit)。X中的两元同轨关系是一种等价关系。轨θ(x)即是X在G作用下所划分成的等价类(或称传递集、可迁集、可迁类)。对于x∈X,称G_x为x的稳定核(stabilizer)。
称|G|为G的阶,|X|为G的度。
命题9.1.1:稳定核是G的子群,而同一轨中各元的稳定核是彼此共轭的。
命题9.1.2:对于x∈X,有|G|=|θ(x)|•|G_x|。
六面体群(阶为24)分别作用于立方体的顶点集(度为8)、棱集合(度为12)与面集合(度为6)时
X90表示绕X轴顺时针旋转90°,对应P1X90=P2;
y90表示绕Y轴逆时针旋转90°,对应y90P1=P2。
http://www.doc88.com/p-692153995466.html
gap> X90:=[[1,0,0],[0,0,1],[0,-1,0]];;y90:=[[0,0,-1],[0,1,0],[1,0,0]];;C4:=GroupWithGenerators([X90]);;IdGroup(C4);G:=GroupWithGenerators([X90,y90]);;IdGroup(G);
[ 4, 1 ]
[ 24, 12 ]
gap> G:=SymmetricGroup(4);;IdGroup(G);cl:=ConjugacyClasses(G);
[ 24, 12 ]
[ ()^G, (1,2)^G, (1,2)(3,4)^G, (1,2,3)^G, (1,2,3,4)^G ]
gap> len:=Size(cl);for i in [1..len] do Print(Size(cl[i]),","); od;Print("\n");for i in [1..len] do Print(IdGroup(Centralizer(cl[i])),","); od;
5
1,6,3,8,6,
[ 24, 12 ],[ 4, 2 ],[ 8, 3 ],[ 3, 1 ],[ 4, 1 ],
gap> for i in [1..len] do Print(Representative(cl[i]),",",Size(cl[i]),",",Size(Centralizer(cl[i])),",",Elements(Centralizer(cl[i])),"\n");od;
(),1,24,[ (), (3,4), (2,3), (2,3,4), (2,4,3), (2,4), (1,2), (1,2)(3,4), (1,2,3), (1,2,3,4), (1,2,4,3), (1,2,4),
(1,3,2), (1,3,4,2), (1,3), (1,3,4), (1,3)(2,4), (1,3,2,4), (1,4,3,2), (1,4,2), (1,4,3), (1,4), (1,4,2,3),
(1,4)(2,3) ]
(1,2),6,4,[ (), (3,4), (1,2), (1,2)(3,4) ]
(1,2)(3,4),3,8,[ (), (3,4), (1,2), (1,2)(3,4), (1,3)(2,4), (1,3,2,4), (1,4,2,3), (1,4)(2,3) ]
(1,2,3),8,3,[ (), (1,2,3), (1,3,2) ]
(1,2,3,4),6,4,[ (), (1,2,3,4), (1,3)(2,4), (1,4,3,2) ]
9.2有关的群的运算
9.3置换群的轮换指标
9.4伯恩赛德引理
作用在X上的置换群G称为可迁的(transitive),若G在X上作用的轨道仅一个。对于正整数k,作用在X上的置换群G称为k可迁 的,若对X上的任两个k排列,存在某g∈G,可使其一个变为另一个。k>=2时的可迁亦可统称为重可迁。对¥t<=k,若G是k可迁的,则G亦是t可迁的。故一般所称的k可迁,常指最大可迁值。若G是k可迁的,而单位元是G中唯一固定k个点的置换,则G称为恰k可迁的。恰1可迁群称为在X上正则。
命题9.4.3:当n>=3时,对称群S_n是n可迁的,而交代群A_n是(n-2)可迁的。
9.5波利亚计数定理
9.6圈形排列问题
9.7图的计数多项式
9.8波利亚定理的推广
9.9波利亚定理的应用
gap> for q in [2..6] do l5:=q^6*(q^6-1)*(q^2-1);L5:=SmallSimpleGroup(l5);Print(l5,",",L5,"\n");od;
12096,fail
4245696,G(2, 3)
251596800,G(2, 4)
5859000000,G2(5)
76185748800,fail
gap> for q in [2..2] do l6:=q^24*(q^12-1)*(q^8-1)*(q^6-1)*(q^2-1);L6:=SmallSimpleGroup(l6);Print(l6,",",L6,"\n");od;
3311126603366400,F4(2)
gap> LoadPackage("sonata");
#I You may wish to install the xgap package
#I and enjoy the graphic capabilities of SONATA.
12096,fail
4245696,G(2, 3)
251596800,G(2, 4)
5859000000,G2(5)
76185748800,fail
gap> for q in [2..2] do l6:=q^24*(q^12-1)*(q^8-1)*(q^6-1)*(q^2-1);L6:=SmallSimpleGroup(l6);Print(l6,",",L6,"\n");od;
3311126603366400,F4(2)
gap> LoadPackage("sonata");
#I You may wish to install the xgap package
#I and enjoy the graphic capabilities of SONATA.
___________________________________________________________________________
/ ___
|| / \ /\ Version 2.6
|| || || |\ | / \ /\ Erhard Aichinger
\___ || || |\\ | /____\_____________/__\ Franz Binder
\ || || | \\ | / \ || / \ Juergen Ecker
|| \___/ | \\ | / \ || / \ Peter Mayr
|| | \\| / \ || Christof Noebauer
\___/ | \| ||
/ ___
|| / \ /\ Version 2.6
|| || || |\ | / \ /\ Erhard Aichinger
\___ || || |\\ | /____\_____________/__\ Franz Binder
\ || || | \\ | / \ || / \ Juergen Ecker
|| \___/ | \\ | / \ || / \ Peter Mayr
|| | \\| / \ || Christof Noebauer
\___/ | \| ||
System Of Nearrings And Their Applications
Info: http://www.algebra.uni-linz.ac.at/Sonata/
Info: http://www.algebra.uni-linz.ac.at/Sonata/
true
gap> A4:=AlternatingGroup(4);;IdGroup(A4);InnA4:=InnerAutomorphisms(A4);;IdGroup(Group(InnA4));
[ 12, 3 ]
[ 12, 3 ]
1955年,谢瓦莱找出了一类单群——被称为谢瓦莱群;
http://brauer.maths.qmul.ac.uk/Atlas/v3/exc/G24/
gap> g:=SmallSimpleGroup(6048);Order(g);IsSimpleGroup(g);Order(SU(3,3));Order(GU(3,3));
PSU(3,3)
6048
true
6048
24192
gap> g:=SmallSimpleGroup(4245696);Order(g);IsSimpleGroup(g);
G(2, 3)
4245696
true
gap> g:=SmallSimpleGroup(251596800);Order(g);IsSimpleGroup(g);
G(2, 4)
251596800
true
gap> g:=SmallSimpleGroup(5859000000);Order(g);IsSimpleGroup(g);
G2(5)
5859000000
true
gap> g:=SmallSimpleGroup(3311126603366400);Order(g);IsSimpleGroup(g);
F4(2)
3311126603366400
true
gap> LoadPackage("unipot");
/======================================================\
! !
! GAP Package UNIPOT 1.2 !
! (Computations with elements of unipotent !
! subgroups of Chevalley Groups) !
! !
! by Sergei Haller <Sergei.Haller@math.uni-giessen.de> !
! !
! see ??unipot !
\======================================================/
true
E_7(3)的幺幂子群是3^63阶群
gap> g:= UnipotChevSubGr("E",7,GF(3));Order(g);
<Unipotent subgroup of a Chevalley group of type E7 over GF(3)>
1144561273430837494885949696427
gap> G:=CyclicGroup(3^63);
<pc group of size 1144561273430837494885949696427 with 63 generators>
E_6(2)的幺幂子群是2^36阶群
gap> g:= UnipotChevSubGr("E",6,GF(2));Order(g);
<Unipotent subgroup of a Chevalley group of type E6 over GF(2)>
68719476736
gap> G:=CyclicGroup(214841575522005575270400);
<pc group of size 214841575522005575270400 with 51 generators>
gap> L:= SimpleLieAlgebra( "E", 6, GF(2) );
<Lie algebra of dimension 78 over GF(2)>
gap> Size(L);
302231454903657293676544
E_8(7)的幺幂子群是7^120阶群
gap> g:= UnipotChevSubGr("E",8,GF(7));Order(g);
<Unipotent subgroup of a Chevalley group of type E8 over GF(7)>
258086210989349276047917817413172383631691140276099547911280598425927853437317437263620645695945672001
gap> A4:=AlternatingGroup(4);;IdGroup(A4);InnA4:=InnerAutomorphisms(A4);;IdGroup(Group(InnA4));
[ 12, 3 ]
[ 12, 3 ]
1955年,谢瓦莱找出了一类单群——被称为谢瓦莱群;
http://brauer.maths.qmul.ac.uk/Atlas/v3/exc/G24/
gap> g:=SmallSimpleGroup(6048);Order(g);IsSimpleGroup(g);Order(SU(3,3));Order(GU(3,3));
PSU(3,3)
6048
true
6048
24192
gap> g:=SmallSimpleGroup(4245696);Order(g);IsSimpleGroup(g);
G(2, 3)
4245696
true
gap> g:=SmallSimpleGroup(251596800);Order(g);IsSimpleGroup(g);
G(2, 4)
251596800
true
gap> g:=SmallSimpleGroup(5859000000);Order(g);IsSimpleGroup(g);
G2(5)
5859000000
true
gap> g:=SmallSimpleGroup(3311126603366400);Order(g);IsSimpleGroup(g);
F4(2)
3311126603366400
true
gap> LoadPackage("unipot");
/======================================================\
! !
! GAP Package UNIPOT 1.2 !
! (Computations with elements of unipotent !
! subgroups of Chevalley Groups) !
! !
! by Sergei Haller <Sergei.Haller@math.uni-giessen.de> !
! !
! see ??unipot !
\======================================================/
true
E_7(3)的幺幂子群是3^63阶群
gap> g:= UnipotChevSubGr("E",7,GF(3));Order(g);
<Unipotent subgroup of a Chevalley group of type E7 over GF(3)>
1144561273430837494885949696427
gap> G:=CyclicGroup(3^63);
<pc group of size 1144561273430837494885949696427 with 63 generators>
E_6(2)的幺幂子群是2^36阶群
gap> g:= UnipotChevSubGr("E",6,GF(2));Order(g);
<Unipotent subgroup of a Chevalley group of type E6 over GF(2)>
68719476736
gap> G:=CyclicGroup(214841575522005575270400);
<pc group of size 214841575522005575270400 with 51 generators>
gap> L:= SimpleLieAlgebra( "E", 6, GF(2) );
<Lie algebra of dimension 78 over GF(2)>
gap> Size(L);
302231454903657293676544
E_8(7)的幺幂子群是7^120阶群
gap> g:= UnipotChevSubGr("E",8,GF(7));Order(g);
<Unipotent subgroup of a Chevalley group of type E8 over GF(7)>
258086210989349276047917817413172383631691140276099547911280598425927853437317437263620645695945672001
20151012添加:
矩阵A的特征多项式为|xE-A|
gap> A:=[ [ 1, 0,0], [ 1,0, 1 ], [ 0,1, 0] ];y:=CharacteristicPolynomial(A);Factors(y);A1:=TransposedMat(A);y1:=CharacteristicPolynomial(A1);Factors(y1);
[ [ 1, 0, 0 ], [ 1, 0, 1 ], [ 0, 1, 0 ] ]
x_1^3-x_1^2-x_1+1
[ x_1-1, x_1-1, x_1+1 ]
[ [ 1, 1, 0 ], [ 0, 0, 1 ], [ 0, 1, 0 ] ]
x_1^3-x_1^2-x_1+1
[ x_1-1, x_1-1, x_1+1 ]
gap> A100:=A^100;
[ [ 1, 0, 0 ], [ 50, 1, 0 ], [ 50, 0, 1 ] ]
向量内积
gap> theta:=[2,0,-1];;t:=ScalarProduct(theta,theta);
5
gap> theta1:=[2,0,0,0,-1,-1];;t1:=ScalarProduct(theta1,theta1);
6
gap> theta1:=[2,0,0,0,-1,-1];;theta2:=[1,-1,-1,-1,1,1];;theta3:=[1,1,1,1,1,1];;t12:=ScalarProduct(theta1,theta2);t13:=ScalarProduct(theta1,theta3);t23:=ScalarProduct(theta2,theta3);
0
0
0
gap> theta:=[1,E(3),E(3)^2];;t:=ScalarProduct(theta,theta);
0
//线性卷积conv
//1.000000 6.000000 16.000000 26.000000 31.000000 20.000000
gap> a:=[1,2,3,4];;b:=[1,4,5];;ProductCoeffs(a,b);
[ 1, 6, 16, 26, 31, 20 ]
gap> lo:= LieObject( [ [ 1, 0 ], [ 0, 1 ] ] );m:=UnderlyingRingElement(lo);lo*lo;m*m;
LieObject( [ [ 1, 0 ], [ 0, 1 ] ] )
[ [ 1, 0 ], [ 0, 1 ] ]
LieObject( [ [ 0, 0 ], [ 0, 0 ] ] )
[ [ 1, 0 ], [ 0, 1 ] ]
三维叉积对加法的分配律,线性性和雅可比恒等式表明:具有向量加法和叉积的R^3构成了一个Lie代数。
a × (b × c) + b × (c × a) + c × (a × b) = 0
雅可比恒等式就是下列等式:[X,[Y,Z]]+[Y,[Z,X]]+[Z,[X,Y]]=0
Lie代数是满足雅可比恒等式的代数结构的一个主要例子。
注意,满足雅可比恒等式的代数结构不一定满足反交换律。
x^3/6+x^2/2+x+1无有理根
2x^3-5x^2+5x-3的有理根为3/2
x^3-6x^2+15x-14的有理根为2
x^3/6+x^2/2+x+1无重根
x^3-3*x-2有重根
gap> x:=Indeterminate(Rationals);RootsOfUPol(x^3/6+x^2/2+x+1);
x_1
[ ]
gap> x:=Indeterminate(Rationals);RootsOfUPol(2*x^3-5*x^2+5*x-3);
x_1
[ 3/2 ]
gap> x:=Indeterminate(Rationals);RootsOfUPol(x^3-6*x^2+15*x-14);
x_1
[ 2 ]
gap> x:=Indeterminate(Rationals,"x");;y:=x^3/6+x^2/2+x+1;y1:=Derivative(y);Gcd(y,y1);GcdOp(y,y1);RootsOfUPol(y);
1/6*x^3+1/2*x^2+x+1
1/2*x^2+x+1
1
1
[ ]
gap> x:=Indeterminate(Rationals,"x");;y:=x^3-3*x-2;y1:=Derivative(y);Gcd(y,y1);GcdOp(y,y1);RootsOfUPol(y);
x^3-3*x-2
3*x^2-3
x+1
x+1
[ 2, -1, -1 ]
有理数域上的一元多项式环模不可约多项式生成的理想得到的无限域
gap> R:=PolynomialRing(Rationals,1);x:=Indeterminate(Rationals);poly:=x^2+x+1;IsIrreducibleRingElement(R,poly);Degree(poly);Factors(poly);F:=FieldByPolynomial(poly);Size(F);IsField(F);IsPrimeField(F);IsFinite(F);IsRationalsPolynomialRing(F);
Rationals[x_1]
x
x^2+x+1
true
2
[ x^2+x+1 ]
<algebraic extension over the Rationals of degree 2>
infinity
true
false
false
false
问题:GAP求基域为有理数域的可约多项式(例如f(x)=x^4-5*x^2+6=0)的伽罗瓦群?
注意:GAP软件中多项式环的功能尚不完善
R:=PolynomialRing(Rationals,1);IsUniqueFactorizationRing(R);IsIntegralRing(R);IsEuclideanRing(R);IsIrreducibleRingElement(R,x^2-2);IsIrreducibleRingElement(R,x^4-10*x^2+1);IsIrreducibleRingElement(R,50-45*x-6*x^2+x^3);IsIrreducibleRingElement(R,x^4-5*x^2+6);
R:=PolynomialRing(Rationals,2);IsUniqueFactorizationRing(R);IsEuclideanRing(R);
R:=PolynomialRing(Integers,1);IsUniqueFactorizationRing(R);IsEuclideanRing(R);
R:=PolynomialRing(Integers,2);IsUniqueFactorizationRing(R);IsEuclideanRing(R);
R:=PolynomialRing(GaussianIntegers,1);IsUniqueFactorizationRing(R);
R:=PolynomialRing(GaussianIntegers,2);IsUniqueFactorizationRing(R);
R:=PolynomialRing(GaussianRationals,1);IsUniqueFactorizationRing(R);IsIntegralRing(R);IsEuclideanRing(R);IsIrreducibleRingElement(R,x^2-2);
R:=PolynomialRing(GaussianRationals,2);IsUniqueFactorizationRing(R);IsEuclideanRing(R);
R:=UnivariatePolynomialRing(Rationals,"x");IsUniqueFactorizationRing(R);IsIntegralRing(R);IsIrreducibleRingElement(R,x^2-2);
R:=UnivariatePolynomialRing(Integers,"x");IsUniqueFactorizationRing(R);
R:=UnivariatePolynomialRing(GaussianRationals,"x");IsUniqueFactorizationRing(R);IsIntegralRing(R);IsIrreducibleRingElement(R,x^2-2);
R:=UnivariatePolynomialRing(GaussianIntegers,"x");IsUniqueFactorizationRing(R);
求方程x^3-2x-5=0的根。
gap> x:=Indeterminate(Rationals);RootsOfUPol(x^3-2*x-5);
x_1
[ ]
求方程x^3+2
gap> A:=[ [ 1, 0,0], [ 1,0, 1 ], [ 0,1, 0] ];y:=CharacteristicPolynomial(A);Factors(y);A1:=TransposedMat(A);y1:=CharacteristicPolynomial(A1);Factors(y1);
[ [ 1, 0, 0 ], [ 1, 0, 1 ], [ 0, 1, 0 ] ]
x_1^3-x_1^2-x_1+1
[ x_1-1, x_1-1, x_1+1 ]
[ [ 1, 1, 0 ], [ 0, 0, 1 ], [ 0, 1, 0 ] ]
x_1^3-x_1^2-x_1+1
[ x_1-1, x_1-1, x_1+1 ]
gap> A100:=A^100;
[ [ 1, 0, 0 ], [ 50, 1, 0 ], [ 50, 0, 1 ] ]
向量内积
gap> theta:=[2,0,-1];;t:=ScalarProduct(theta,theta);
5
gap> theta1:=[2,0,0,0,-1,-1];;t1:=ScalarProduct(theta1,theta1);
6
gap> theta1:=[2,0,0,0,-1,-1];;theta2:=[1,-1,-1,-1,1,1];;theta3:=[1,1,1,1,1,1];;t12:=ScalarProduct(theta1,theta2);t13:=ScalarProduct(theta1,theta3);t23:=ScalarProduct(theta2,theta3);
0
0
0
gap> theta:=[1,E(3),E(3)^2];;t:=ScalarProduct(theta,theta);
0
//线性卷积conv
//1.000000 6.000000 16.000000 26.000000 31.000000 20.000000
gap> a:=[1,2,3,4];;b:=[1,4,5];;ProductCoeffs(a,b);
[ 1, 6, 16, 26, 31, 20 ]
gap> lo:= LieObject( [ [ 1, 0 ], [ 0, 1 ] ] );m:=UnderlyingRingElement(lo);lo*lo;m*m;
LieObject( [ [ 1, 0 ], [ 0, 1 ] ] )
[ [ 1, 0 ], [ 0, 1 ] ]
LieObject( [ [ 0, 0 ], [ 0, 0 ] ] )
[ [ 1, 0 ], [ 0, 1 ] ]
三维叉积对加法的分配律,线性性和雅可比恒等式表明:具有向量加法和叉积的R^3构成了一个Lie代数。
a × (b × c) + b × (c × a) + c × (a × b) = 0
雅可比恒等式就是下列等式:[X,[Y,Z]]+[Y,[Z,X]]+[Z,[X,Y]]=0
Lie代数是满足雅可比恒等式的代数结构的一个主要例子。
注意,满足雅可比恒等式的代数结构不一定满足反交换律。
x^3/6+x^2/2+x+1无有理根
2x^3-5x^2+5x-3的有理根为3/2
x^3-6x^2+15x-14的有理根为2
x^3/6+x^2/2+x+1无重根
x^3-3*x-2有重根
gap> x:=Indeterminate(Rationals);RootsOfUPol(x^3/6+x^2/2+x+1);
x_1
[ ]
gap> x:=Indeterminate(Rationals);RootsOfUPol(2*x^3-5*x^2+5*x-3);
x_1
[ 3/2 ]
gap> x:=Indeterminate(Rationals);RootsOfUPol(x^3-6*x^2+15*x-14);
x_1
[ 2 ]
gap> x:=Indeterminate(Rationals,"x");;y:=x^3/6+x^2/2+x+1;y1:=Derivative(y);Gcd(y,y1);GcdOp(y,y1);RootsOfUPol(y);
1/6*x^3+1/2*x^2+x+1
1/2*x^2+x+1
1
1
[ ]
gap> x:=Indeterminate(Rationals,"x");;y:=x^3-3*x-2;y1:=Derivative(y);Gcd(y,y1);GcdOp(y,y1);RootsOfUPol(y);
x^3-3*x-2
3*x^2-3
x+1
x+1
[ 2, -1, -1 ]
有理数域上的一元多项式环模不可约多项式生成的理想得到的无限域
gap> R:=PolynomialRing(Rationals,1);x:=Indeterminate(Rationals);poly:=x^2+x+1;IsIrreducibleRingElement(R,poly);Degree(poly);Factors(poly);F:=FieldByPolynomial(poly);Size(F);IsField(F);IsPrimeField(F);IsFinite(F);IsRationalsPolynomialRing(F);
Rationals[x_1]
x
x^2+x+1
true
2
[ x^2+x+1 ]
<algebraic extension over the Rationals of degree 2>
infinity
true
false
false
false
问题:GAP求基域为有理数域的可约多项式(例如f(x)=x^4-5*x^2+6=0)的伽罗瓦群?
注意:GAP软件中多项式环的功能尚不完善
R:=PolynomialRing(Rationals,1);IsUniqueFactorizationRing(R);IsIntegralRing(R);IsEuclideanRing(R);IsIrreducibleRingElement(R,x^2-2);IsIrreducibleRingElement(R,x^4-10*x^2+1);IsIrreducibleRingElement(R,50-45*x-6*x^2+x^3);IsIrreducibleRingElement(R,x^4-5*x^2+6);
R:=PolynomialRing(Rationals,2);IsUniqueFactorizationRing(R);IsEuclideanRing(R);
R:=PolynomialRing(Integers,1);IsUniqueFactorizationRing(R);IsEuclideanRing(R);
R:=PolynomialRing(Integers,2);IsUniqueFactorizationRing(R);IsEuclideanRing(R);
R:=PolynomialRing(GaussianIntegers,1);IsUniqueFactorizationRing(R);
R:=PolynomialRing(GaussianIntegers,2);IsUniqueFactorizationRing(R);
R:=PolynomialRing(GaussianRationals,1);IsUniqueFactorizationRing(R);IsIntegralRing(R);IsEuclideanRing(R);IsIrreducibleRingElement(R,x^2-2);
R:=PolynomialRing(GaussianRationals,2);IsUniqueFactorizationRing(R);IsEuclideanRing(R);
R:=UnivariatePolynomialRing(Rationals,"x");IsUniqueFactorizationRing(R);IsIntegralRing(R);IsIrreducibleRingElement(R,x^2-2);
R:=UnivariatePolynomialRing(Integers,"x");IsUniqueFactorizationRing(R);
R:=UnivariatePolynomialRing(GaussianRationals,"x");IsUniqueFactorizationRing(R);IsIntegralRing(R);IsIrreducibleRingElement(R,x^2-2);
R:=UnivariatePolynomialRing(GaussianIntegers,"x");IsUniqueFactorizationRing(R);
求方程x^3-2x-5=0的根。
gap> x:=Indeterminate(Rationals);RootsOfUPol(x^3-2*x-5);
x_1
[ ]
求方程x^3+2
这篇关于GAP软件的使用(20150514、20151002、20151004、20151012)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!