Thank you very much, Peter. It was helpful. Now I have another question: Can I construct a structure like I define the nearrings by tables, but using semigroups instead of groups??
Thanks again. Junior Assis. On Wed, Oct 7, 2009 at 9:24 AM, Peter Mayr <peter.m...@jku.at> wrote: > Dear Junior Assis > > > I would like to know how can I construct a ring by operation tables. > > Constructing a ring from tables is a bit awkward but you can use the > package SONATA for it. > Let's say we want to build the field of size 2. First construct the > additive group as a magma from the operation table A (Here i+j := > A[i][j]): > > gap> A := [[1,2],[2,1]];; > gap> G := MagmaWithInversesByMultiplicationTable( A ); > <magma-with-inverses with 2 generators> > gap> IsGroup( G ); > true > > Then we attach the multiplicative structure to obtain a near-ring. For > this you need to load SONATA. > > gap> RequirePackage( "sonata" ); > > We build a binary multiplication function mult on G from the > multiplication table M. Note that the order of the elements of G in > elmlist has to correspond to the order of rows and columns in the > tables A and in M. > > gap> M := [[1,1],[1,2]];; > gap> elmlist := List( [1..Size(G)], i -> MagmaElement( G, i ) ); > [ m1, m2 ] > gap> mult := NearRingMultiplicationByOperationTable( G, M, elmlist ); > function( x, y ) ... end > > Finally we construct a near-ring R whose additive group is isomorphic > to G and whose multiplication is given by mult. > > gap> R := ExplicitMultiplicationNearRing( G, mult ); > ExplicitMultiplicationNearRing ( <group of size 2 with > 2 generators> , multiplication ) > > R forms the field of size 2. However, because of its construction R is > not in the GAP-category of rings but in that of near-rings (A left > near-ring differs from a ring in that addition is not necessarily > commutative and only the left distributive law is required). > > gap> IsRing( R ); > false > gap> IsDistributiveNearRing( R ); > true > > Consequently not all GAP-functions for rings can be applied to R. > Please see the SONATA-manual for the methods that are available for > near-rings. > > Hope this helps, > Peter > > -- > Peter Mayr > CAUL > Lisbon, Portugal > _______________________________________________ Forum mailing list Forum@mail.gap-system.org http://mail.gap-system.org/mailman/listinfo/forum