Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
| Download
GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
Project: cocalc-sagemath-dev-slelievre
Views: 418346<Chapter Label="Funct">1<Heading>&Circle; functions</Heading>23To use the &Circle; package first you need to load it as follows:45<Log>6<![CDATA[7gap> LoadPackage("circle");8-----------------------------------------------------------------------------9Loading Circle 1.4.0 (Adjoint groups of finite rings)10by Alexander Konovalov (http://www.cs.st-andrews.ac.uk/~alexk/) and11Panagiotis Soules ([email protected]).12-----------------------------------------------------------------------------13true14gap>15]]>16</Log>1718Note that if you entered examples from the previous chapter, you need19to restart &GAP; before loading the &Circle; package.202122<Section Label="CircleObjects">23<Heading>Circle objects</Heading>2425Because for elements of the ring <M>R</M> the ordinary multiplication26is already denoted by <C>*</C>, for the implementation of the circle27multiplication in the adjoint semigroup we need to wrap up ring28elements as CircleObjects, for which <C>*</C> is defined to be the29circle multiplication.3031<ManSection>32<Attr Name="CircleObject"33Arg="x" />34<Description>35Let <A>x</A> be a ring element. Then <C>CircleObject(x)</C> returns the36corresponding circle object. If <A>x</A> lies in the family <C>fam</C>,37then <C>CircleObject(x)</C> lies in the family <Ref Fam="CircleFamily"/>,38corresponding to the family <C>fam</C>.3940<Example>41<![CDATA[42gap> a := CircleObject( 2 );43CircleObject( 2 )44]]>45</Example>4647</Description>48</ManSection>495051<ManSection>52<Attr Name="UnderlyingRingElement"53Arg="x" />54<Description>55Returns the corresponding ring element for the circle object <A>x</A>.56<Example>57<![CDATA[58gap> a := CircleObject( 2 );59CircleObject( 2 )60gap> UnderlyingRingElement( a );61262]]>63</Example>6465</Description>66</ManSection>676869<ManSection>70<Filt Name="IsCircleObject"71Arg="x"72Type="Category" />73<Filt Name="IsCircleObjectCollection"74Arg="x"75Type="Category" />76<Description>77An object <A>x</A> lies in the category <C>IsCircleObject</C> if and78only if it lies in a family constructed by <Ref Attr="CircleFamily"/>.79Since circle objects can be multiplied via <C>*</C> with elements in80their family, and we need operations <C>One</C> and <C>Inverse</C> to81deal with groups they generate, circle objects are implemented in the82category <C>IsMultiplicativeElementWithInverse</C>. A collection of83circle objects (e.g. adjoint semigroup or adjoint group) will lie in84the category <C>IsCircleObjectCollection</C>.8586<Example>87<![CDATA[88gap> IsCircleObject( 2 ); IsCircleObject( CircleObject( 2 ) );89false90true91gap> IsMultiplicativeElementWithInverse( CircleObject( 2 ) );92true93gap> IsCircleObjectCollection( [ CircleObject(0), CircleObject(2) ] );94true95]]>96</Example>9798</Description>99</ManSection>100101<ManSection>102<Filt Name="IsPositionalObjectOneSlotRep"103Arg="x"104Type="Representation" />105<Filt Name="IsDefaultCircleObject"106Arg="x"107Type="Representation" />108<Description>109To store the corresponding circle object, we need only to store the110underlying ring element. Since this is quite common situation, we111defined the representation <C>IsPositionalObjectOneSlotRep</C> for a112more general case. Then we defined <C>IsDefaultCircleObject</C> as a113synonym of <C>IsPositionalObjectOneSlotRep</C> for objects in114<Ref Filt="IsCircleObject" />.115116<Example>117<![CDATA[118gap> IsPositionalObjectOneSlotRep( CircleObject( 2 ) );119true120gap> IsDefaultCircleObject( CircleObject( 2 ) );121true122]]>123</Example>124125</Description>126</ManSection>127128<ManSection>129<Attr Name="CircleFamily"130Arg="fam" />131<Description>132<C>CircleFamily(fam)</C> is a family, elements of which are in one-to-one133correspondence with elements of the family <A>fam</A>,134but with the circle multiplication as an infix multiplication.135That is, for <M>x</M>, <M>y</M> in <A>fam</A>, the product of their images136in the <C>CircleFamily(fam)</C> will be the image of <M> x + y + x y </M>.137The relation between these families is demonstrated by the following equality:138139<Example>140<![CDATA[141gap> FamilyObj( CircleObject ( 2 ) ) = CircleFamily( FamilyObj( 2 ) );142true143]]>144</Example>145146</Description>147</ManSection>148149</Section>150151<Section Label="CircleOperations">152<Heading>Operations with circle objects</Heading>153154<ManSection>155<Oper Name="One"156Arg="x" />157<Description>158This operation returns the multiplicative neutral element159for the circle object <A>x</A>. The result is the circle160object corresponding to the additive neutral element of161the appropriate ring.162163<Example>164<![CDATA[165gap> One( CircleObject( 5 ) );166CircleObject( 0 )167gap> One( CircleObject( 5 ) ) = CircleObject( Zero( 5 ) );168true169gap> One( CircleObject( [ [ 1, 1 ],[ 0, 1 ] ] ) );170CircleObject( [ [ 0, 0 ], [ 0, 0 ] ] )171]]>172</Example>173174</Description>175</ManSection>176177178<ManSection>179<Oper Name="InverseOp"180Arg="x" />181<Description>182For a circle object <A>x</A>, returns the multiplicative183inverse of <A>x</A> with respect to the circle multiplication;184if such one does not exist then <K>fail</K> is returned.<P/>185186In our implementation we assume that the underlying ring is a187subring of the ring with one, thus, if the circle inverse for188an element <M>x</M> exists, than it can be computed as <M>-x(1+x)^{-1}</M>.189190<Example>191<![CDATA[192gap> CircleObject( -2 )^-1;193CircleObject( -2 )194gap> CircleObject( 2 )^-1;195CircleObject( -2/3 )196gap> CircleObject( -2 )*CircleObject( -2 )^-1;197CircleObject( 0 )198]]>199</Example>200201<Example>202<![CDATA[203gap> m := CircleObject( [ [ 1, 1 ], [ 0, 1 ] ] );204CircleObject( [ [ 1, 1 ], [ 0, 1 ] ] )205gap> m^-1;206CircleObject( [ [ -1/2, -1/4 ], [ 0, -1/2 ] ] )207gap> m * m^-1;208CircleObject( [ [ 0, 0 ], [ 0, 0 ] ] )209gap> CircleObject( [ [ 0, 1 ], [ 1, 0 ] ] )^-1;210fail211]]>212</Example>213214</Description>215</ManSection>216217218<ManSection>219<Oper Name="IsUnit"220Arg="[ R, ] x" />221<Description>222Let <A>x</A> be a circle object corresponding to an element of223the ring <A>R</A>. Then the operation <C>IsUnit</C> returns224<C>true</C>, if <A>x</A> is invertible in <A>R</A> with respect225to the circle multiplication, and <C>false</C> otherwise.226227<Example>228<![CDATA[229gap> IsUnit( Integers, CircleObject( -2 ) );230true231gap> IsUnit( Integers, CircleObject( 2 ) );232false233gap> IsUnit( Rationals, CircleObject( 2 ) );234true235gap> IsUnit( ZmodnZ(8), CircleObject( ZmodnZObj(2,8) ) );236true237gap> m := CircleObject( [ [ 1, 1 ],[ 0, 1 ] ] );;238gap> IsUnit( FullMatrixAlgebra( Rationals, 2 ), m );239true240]]>241</Example>242243244245If the first argument is omitted, the result will be returned with respect246to the default ring of the circle object <A>x</A>.247248<Example>249<![CDATA[250gap> IsUnit( CircleObject( -2 ) );251true252gap> IsUnit( CircleObject( 2 ) );253false254gap> IsUnit( CircleObject( ZmodnZObj(2,8) ) );255true256gap> IsUnit( CircleObject( [ [ 1, 1 ],[ 0, 1 ] ] ) );257false258]]>259</Example>260261</Description>262</ManSection>263264265<ManSection>266<Oper Name="IsCircleUnit"267Arg="[ R, ] x" />268<Description>269Let <A>x</A> be an element of the ring <A>R</A>. Then270<C>IsCircleUnit( R, x )</C> determines whether <A>x</A> is invertible271in <A>R</A> with respect to the circle multilpication. This is272equivalent to the condition that 1+<A>x</A> is a unit in <A>R</A>273with respect to the ordinary multiplication.274275<Example>276<![CDATA[277gap> IsCircleUnit( Integers, -2 );278true279gap> IsCircleUnit( Integers, 2 );280false281gap> IsCircleUnit( Rationals, 2 );282true283gap> IsCircleUnit( ZmodnZ(8), ZmodnZObj(2,8) );284true285gap> m := [ [ 1, 1 ],[ 0, 1 ] ];286[ [ 1, 1 ], [ 0, 1 ] ]287gap> IsCircleUnit( FullMatrixAlgebra(Rationals,2), m );288true289]]>290</Example>291292If the first argument is omitted, the result will be returned with respect293to the default ring of <A>x</A>.294295<Example>296<![CDATA[297gap> IsCircleUnit( -2 );298true299gap> IsCircleUnit( 2 );300false301gap> IsCircleUnit( ZmodnZObj(2,8) );302true303gap> IsCircleUnit( [ [ 1, 1 ],[ 0, 1 ] ] );304false305]]>306</Example>307308</Description>309</ManSection>310311</Section>312313314<Section Label="CircleAdjointGroups">315<Heading>Construction of the adjoint semigroup and adjoint group</Heading>316317<ManSection>318<Attr Name="AdjointSemigroup"319Arg="R" />320<Description>321If <A>R</A> is a finite ring then <C>AdjointSemigroup(<A>R</A>)</C> will322return the monoid which is formed by all elements of <A>R</A> with323respect to the circle multiplication.324<P/>325326The implementation is rather straightforward and was added to provide a327link to the &GAP; functionality for semigroups. It assumes that the328enumaration of all elements of the ring <A>R</A> is feasible.329330<Example>331<![CDATA[332gap> R:=Ring( [ ZmodnZObj(2,8) ] );333<ring with 1 generators>334gap> S:=AdjointSemigroup(R);335<monoid with 4 generators>336]]>337</Example>338339</Description>340341</ManSection>342343344<ManSection>345<Attr Name="AdjointGroup"346Arg="R" />347<Description>348If <A>R</A> is a finite radical algebra then349<C>AdjointGroup(<A>R</A>)</C> will return the adjoint group350of <A>R</A>, given as a group generated by a set of circle objects.351<P/>352353To compute the adjoint group of a finite radical algebra,354&Circle; uses the fact that all elements of a radical algebra355form a group with respect to the circle multiplication. Thus,356the adjoint group of <A>R</A> coincides with <A>R</A> elementwise,357and we can randomly select an appropriate set of generators for358the adjoint group.359<P/>360361The warning is displayed by <C>IsGeneratorsOfMagmaWithInverses</C>362method defined in <File>gap4r4/lib/grp.gi</File> and may be ignored.363<P/>364365<B>WARNINGS:</B>366<P/>3673681. The set of generators of the returned group is not required369to be a generating set of minimal possible order.370<P/>3713722. <C>AdjointGroup</C> is stored as an attribute of <A>R</A>,373so for the same copy of <A>R</A> calling it again you will get374the same result. But if you will create another copy of <A>R</A>375in the future, the output may differ because of the random376selection of generators. If you want to have the same generating377set, next time you should construct a group immediately specifying378circle objects that generate it.379<P/>3803813. In most cases, to investigate some properties of the adjoint382group, it is necessary first to convert it to an isomorphic383permutation group or to a PcGroup.384<P/>385386For example, we can create the following commutative 2-dimensional387radical algebra of order 4 over the field of two elements,388and show that its adjoint group is a cyclic group of order 4:389390<Example>391<![CDATA[392gap> x:=[ [ 0, 1, 0 ],393> [ 0, 0, 1 ],394> [ 0, 0, 0 ] ];;395gap> R := Algebra( GF(2), [ One(GF(2))*x ] );396<algebra over GF(2), with 1 generators>397gap> RadicalOfAlgebra( R ) = R;398true399gap> Dimension(R);4002401gap> G := AdjointGroup( R );;402gap> Size( R ) = Size( G );403true404gap> StructureDescription( G );405"C4"406]]>407</Example>408409In the following example we construct a non-commutative4103-dimensional radical algebra of order 8 over the field411of two elements, and demonstrate that its adjoint group412is the dihedral group of order 8:413414<Alt Only="LaTeX">\pagebreak</Alt>415416<Example>417<![CDATA[418gap> x:=[ [ 0, 1, 0 ],419> [ 0, 0, 0 ],420> [ 0, 0, 0 ] ];;421gap> y:=[ [ 0, 0, 0 ],422> [ 0, 0, 1 ],423> [ 0, 0, 0 ] ];;424gap> R := Algebra( GF(2), One(GF(2))*[x,y] );425<algebra over GF(2), with 2 generators>426gap> RadicalOfAlgebra(R) = R;427true428gap> Dimension(R);4293430gap> G := AdjointGroup( R );431<group of size 8 with 2 generators>432gap> StructureDescription( G );433"D8"434]]>435</Example>436437If the ring <A>R</A> is not a radical algebra,438then &Circle; will use another approach. We will enumerate439all elements of the ring <A>R</A> and select those that are units with440respect to the circle multiplication.441Then we will use a random approach similar to the case of the radical442algebra, to find some generating set of the adjoint group. Again, all443warnings 1-3 above refer also to this case.444<P/>445446Of course, enumeration of all elements of <A>R</A> should be feasible447for this computation.448In the following example we demonstrate how it works for rings,449generated by residue classes:450451<Example>452<![CDATA[453gap> R := Ring( [ ZmodnZObj(2,8) ] );454<ring with 1 generators>455gap> G := AdjointGroup( R );456<group of size 4 with 2 generators>457gap> StructureDescription( G );458"C2 x C2"459gap> R := Ring( [ ZmodnZObj(2,256) ] );460<ring with 1 generators>461gap> G := AdjointGroup( R );;462gap> StructureDescription( G );463"C64 x C2"464]]>465</Example>466467Due to the <Ref Attr="AdjointSemigroup" />, there is also another way to468compute the adjoint group of a ring <M>R</M> by means of the computation of its469adjoint semigroup <M>S(R)</M> and taking the Green's <M>H</M>-class of the470multiplicative neutral element of <M>S(R)</M>. Let us repeat the last example471in this way:472473<Example>474<![CDATA[475gap> R := Ring( [ ZmodnZObj(2,256) ] );476<ring with 1 generators>477gap> S := AdjointSemigroup( R );478<monoid with 128 generators>479gap> H := GreensHClassOfElement(S,One(S));480<Green's H-class: <object>>481gap> G:=AsGroup(H);482<group of size 128 with 2 generators>483gap> StructureDescription(G);484"C64 x C2"485]]>486</Example>487488However, the conversion of the Green's <M>H</M>-class to the group may take489some time which may vary dependently on the particular ring in question, and490will also display a lot of warnings about the default491<C>IsGeneratorsOfMagmaWithInverses</C> method, so we did not implemented492this as as standard method. In the following example the method based on493Green's <M>H</M>-class is much slower than an application of494earlier described random approach (20s vs 10ms):495496<Example>497<![CDATA[498gap> R := Ring( [ ZmodnZObj(2,256) ] );499<ring with 1 generators>500gap> AdjointGroup(R);;501gap> R := Ring( [ ZmodnZObj(2,256) ] );502<ring with 1 generators>503gap> S:=AdjointSemigroup(R);504<monoid with 128 generators>505gap> AsGroup(GreensHClassOfElement(S,One(S)));506<group of size 128 with 2 generators>507]]>508</Example>509510511Finally, note that if <A>R</A> has a unity <M>1</M>, then the set <M>1+R^{ad}</M>,512where <M>R^{ad}</M> is the adjoint semigroup of <A>R</A>, coincides513with the multiplicative semigroup <M>R^{mult}</M> of <M>R</M>, and the map514<M> r \mapsto (1+r) </M> for <M>r</M> in <M>R</M> is an isomorphism515from <M>R^{ad}</M> onto <M>R^{mult}</M>.516<P/>517518Similarly, the set <M>1+R^*</M>, where <M>R^{*}</M> is the adjoint519group of <A>R</A>, coincides with the unit group of <M>R</M>,520which we denote <M>U(R)</M>, and the map <M>r \mapsto (1+r)</M>521for <M>r</M> in <M>R</M> is an isomorphism from <M>R^*</M> onto522<M>U(R)</M>.523<P/>524525We demonstrate this isomorphism using the following example.526527<Example>528<![CDATA[529gap> LoadPackage( "laguna", false );530true531gap> FG := GroupRing( GF(2), DihedralGroup(8) );532<algebra-with-one over GF(2), with 3 generators>533gap> R := AugmentationIdeal( FG );;534gap> G := AdjointGroup( R );;535gap> IdGroup( G );536[ 128, 170 ]537gap> IdGroup( Units( FG ) );538#I LAGUNA package: Computing the unit group ...539[ 128, 170 ]540]]>541</Example>542543Thus, dependently on the ring <C>R</C> in question, it might be possible544that you can compute much faster its unit group using <C>Units(R)</C> than545its adjoint group using <C>AdjointGroup(R)</C>. This is why in an attempt546of computation of the adjoint group of the ring with one a warning message547will be displayed:548<P/>549550<Example>551<![CDATA[552gap> Size( AdjointGroup( GroupRing( GF(2), DihedralGroup(8) ) ) );553554WARNING: usage of AdjointGroup for associative ring <R> with one!!!555In this case the adjoint group is isomorphic to the unit group556Units(<R>), which possibly may be computed faster!!!557558128559gap> Size( AdjointGroup( Integers mod 11 ) );560561WARNING: usage of AdjointGroup for associative ring <R> with one!!!562In this case the adjoint group is isomorphic to the unit group563Units(<R>), which possibly may be computed faster!!!56456510566]]>567</Example>568569If <A>R</A> is infinite, an error message will appear,570telling that &Circle; does not provide methods to deal571with infinite rings.572573</Description>574</ManSection>575576</Section>577578579<!-- ######################################################### -->580581<Section Label="Service">582<Heading>Service functions</Heading>583584585<ManSection>586<InfoClass Name="InfoCircle" />587<Description>588<C>InfoCircle</C> is a special Info class for &Circle; algorithms.589It has 2 levels: 0 (default) and 1. To change info level to590<C>k</C>, use command <C>SetInfoLevel(InfoCircle, k)</C>.591592<Example>593<![CDATA[594gap> SetInfoLevel( InfoCircle, 1 );595gap> SetInfoLevel(InfoCircle,1);596gap> R := Ring( [ ZmodnZObj(2,8) ]);597<ring with 1 generators>598gap> G := AdjointGroup( R );599#I Circle : <R> is not a radical algebra, computing circle units ...600#I Circle : searching generators for adjoint group ...601<group of size 4 with 2 generators>602gap> SetInfoLevel( InfoCircle, 0 );603]]>604</Example>605606</Description>607</ManSection>608609</Section>610611</Chapter>612613