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<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->1<!-- %% -->2<!-- %W domain.tex GAP documentation Thomas Breuer -->3<!-- %W & Frank Celler -->4<!-- %W & Martin Schönert -->5<!-- %W & Heiko Theißen -->6<!-- %% -->7<!-- %H @(#)<M>Id: domain.tex,v 4.9 2000/09/15 15:00:14 gap Exp </M> -->8<!-- %% -->9<!-- %Y Copyright 1997, Lehrstuhl D für Mathematik, RWTH Aachen, Germany -->10<!-- %% -->11<!-- %% This file contains a tutorial introduction to domains. -->12<!-- %% -->13<P/>1415<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->16<Chapter Label="Domains">17<Heading>Domains</Heading>1819<E>Domain</E> is &GAP;'s name for structured sets.20We already saw examples of domains in21Chapters <Ref Chap="Groups and Homomorphisms"/>22and <Ref Chap="Vector Spaces and Algebras"/>:23the groups <C>s8</C> and <C>a8</C> in24Section <Ref Sect="Permutation groups"/> are domains,25likewise the field <C>f</C> and the vector space <C>v</C> in26Section <Ref Sect="Vector Spaces"/> are domains.27They were constructed by functions such as28<Ref Func="Group" BookName="ref"/> and <Ref Func="GF" BookName="ref"/>,29and they could be passed as arguments to other functions such as30<Ref Func="DerivedSubgroup" BookName="ref"/> and31<Ref Func="Dimension" BookName="ref"/>.323334<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->35<Section Label="Domains as Sets">36<Heading>Domains as Sets</Heading>3738First of all, a domain <M>D</M> is a set.39If <M>D</M> is finite then a list with the elements of this set can be40computed with the functions <Ref Func="AsList" BookName="ref"/>41and <Ref Func="AsSortedList" BookName="ref"/>.42For infinite <M>D</M>, <Ref Func="Enumerator" BookName="ref"/>43and <Ref Func="EnumeratorSorted" BookName="ref"/> may work,44but it is also possible that one gets an error message.45<P/>46Domains can be used as arguments of set functions such as47<Ref Func="Intersection" BookName="ref"/>48and <Ref Func="Union" BookName="ref"/>.49&GAP; tries to return a domain in these cases,50moreover it tries to return a domain with as much structure as possible.51For example, the intersection of two groups is (either empty or) again a52group, and &GAP; will try to return it as a group.53For <Ref Func="Union" BookName="ref"/>,54the situation is different because the union of two groups55is in general not a group.56<P/>57<Example><![CDATA[58gap> g:= Group( (1,2), (3,4) );;59gap> h:= Group( (3,4), (5,6) );;60gap> Intersection( g, h );61Group([ (3,4) ])62]]></Example>63<P/>64Two domains are regarded as equal w.r.t. the operator <Q><C>=</C></Q>65if and only if they are equal <E>as sets</E>,66regardless of the additional structure of the domains.67<P/>68<Example><![CDATA[69gap> mats:= [ [ [ 0*Z(2), Z(2)^0 ], [ Z(2)^0, 0*Z(2) ] ],70> [ [ Z(2)^0, 0*Z(2) ], [ 0*Z(2), Z(2)^0 ] ] ];;71gap> Ring( mats ) = VectorSpace( GF(2), mats );72true73]]></Example>74<P/>75Additionally, a domain is regarded as equal to the sorted list76of its elements.77<P/>78<Example><![CDATA[79gap> g:= Group( (1,2) );;80gap> l:= AsSortedList( g );81[ (), (1,2) ]82gap> g = l;83true84gap> IsGroup( l ); IsList( g );85false86false87]]></Example>8889</Section>909192<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->93<Section Label="Algebraic Structure">94<Heading>Algebraic Structure</Heading>9596The additional structure of <M>D</M> is constituted by the facts that97<M>D</M> is known to be closed under certain operations such as addition or98multiplication, and that these operations have additional properties.99For example, if <M>D</M> is a group then it is closed under multiplication100(<M>D \times D \rightarrow D</M>, <M>(g,h) \mapsto g * h</M>),101under taking inverses (<M>D \rightarrow D</M>, <M>g \mapsto g^{-1}</M>)102and under taking the identity <M>g</M><C>^0</C> of each element <M>g</M>103in <M>D</M>;104additionally, the multiplication in <M>D</M> is associative.105<P/>106The same set of elements can carry different algebraic structures.107For example, a semigroup is defined as being closed under an associative108multiplication, so each group is also a semigroup.109Likewise, a monoid is defined as a semigroup <M>D</M> in which the identity110<M>g</M><C>^0</C> is defined for every element <M>g</M>,111so each group is a monoid,112and each monoid is a semigroup.113<P/>114Other examples of domains are vector spaces, which are defined as115additive groups that are closed under (left) multiplication with elements116in a certain domain of scalars.117Also conjugacy classes in a group <M>D</M> are domains,118they are closed under the conjugation action of <M>D</M>.119120</Section>121122123<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->124<Section Label="Notions of Generation">125<Heading>Notions of Generation</Heading>126127<Index Key="GeneratorsOfSomething"><C>GeneratorsOfSomething</C></Index>128We have seen that a domain is closed under certain operations.129Usually a domain is constructed as the closure of some elements under130these operations.131In this situation, we say that the elements <E>generate</E> the domain.132<P/>133For example, a list of matrices of the same shape over a common field134can be used to generate an additive group or a vector space over a135suitable field; if the matrices are square then we can also use the136matrices as generators of a semigroup, a ring, or an algebra. We137illustrate some of these possibilities:138<P/>139<Example><![CDATA[140gap> mats:= [ [ [ 0*Z(2), Z(2)^0 ],141> [ Z(2)^0, 0*Z(2) ] ],142> [ [ Z(2)^0, 0*Z(2) ],143> [ 0*Z(2), Z(2)^0 ] ] ];;144gap> Size( AdditiveMagma( mats ) );1454146gap> Size( VectorSpace( GF(8), mats ) );14764148gap> Size( Algebra( GF(2), mats ) );1494150gap> Size( Group( mats ) );1512152]]></Example>153Each combination of operations under which a domain could be closed154gives a notion of generation.155So each group has group generators, and since it is a monoid,156one can also ask for monoid generators of a group.157<P/>158Note that one cannot simply ask for <Q>the generators of a domain</Q>,159it is always necessary to specify what notion of generation is meant.160Access to the different generators is provided by functions with161names of the form <C>GeneratorsOfSomething</C>.162For example, <Ref Func="GeneratorsOfGroup" BookName="ref"/> denotes163group generators,164<Ref Func="GeneratorsOfMonoid" BookName="ref"/> denotes monoid generators,165and so on.166The result of <Ref Func="GeneratorsOfVectorSpace" BookName="ref"/> is167of course to be understood168relative to the field of scalars of the vector space in question.169<P/>170<Example><![CDATA[171gap> GeneratorsOfVectorSpace( GF(4)^2 );172[ [ Z(2)^0, 0*Z(2) ], [ 0*Z(2), Z(2)^0 ] ]173gap> v:= AsVectorSpace( GF(2), GF(4)^2 );;174gap> GeneratorsOfVectorSpace( v );175[ [ Z(2)^0, 0*Z(2) ], [ 0*Z(2), Z(2)^0 ], [ Z(2^2), 0*Z(2) ],176[ 0*Z(2), Z(2^2) ] ]177]]></Example>178179</Section>180181182<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->183<Section Label="Domain Constructors">184<Heading>Domain Constructors</Heading>185186<Index Key="Something"><C>Something</C></Index>187A group can be constructed from a list of group generators <A>gens</A> by188<C>Group( <A>gens</A> )</C>,189likewise one can construct rings and algebras with the functions190<Ref Func="Ring" BookName="ref"/>191and <Ref Func="Algebra" BookName="ref"/>.192<P/>193Note that it is not always or completely checked that <A>gens</A> is in194fact a valid list of group generators, for example whether the195elements of <A>gens</A> can be multiplied or whether they are invertible.196This means that &GAP; trusts you, at least to some extent, that the197desired domain <C>Something( <A>gens</A> )</C> does exist.198199</Section>200201202<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->203<Section Label="Forming Closures of Domains">204<Heading>Forming Closures of Domains</Heading>205206<Index Key="ClosureSomething"><C>ClosureSomething</C></Index>207Besides constructing domains from generators, one can also form the208closure of a given domain with an element or another domain.209There are different notions of closure, one has to specify one210according to the desired result and the structure of the given domain.211The functions to compute closures have names such as212<C>ClosureSomething</C>.213For example, if <A>D</A> is a group and one wants to construct the group214generated by <A>D</A> and an element <A>g</A> then one can use215<C>ClosureGroup( <A>D</A>, <A>g</A> )</C>.216217</Section>218219220<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->221<Section Label="Changing the Structure">222<Heading>Changing the Structure</Heading>223224<Index Key="AsSomething"><C>AsSomething</C></Index>225The same set of elements can have different algebraic structures.226For example, it may happen that a monoid <M>M</M> does in fact contain227the inverses of all of its elements, and thus <M>M</M> is equal to the group228formed by the elements of <M>M</M>.229<P/>230<Example><![CDATA[231gap> m:= Monoid( mats );;232gap> m = Group( mats );233true234gap> IsGroup( m );235false236]]></Example>237<P/>238The last result in the above example may be surprising.239But the monoid <C>m</C> is not regarded as a group in &GAP;,240and moreover there is no way to turn <C>m</C> into a group.241Let us formulate this as a rule:242<P/>243<E>The set of operations under which the domain is closed is fixed244in the construction of a domain, and cannot be changed later.</E>245<P/>246(Contrary to this, a domain <E>can</E> acquire knowledge about properties247such as whether the multiplication is associative or commutative.)248<P/>249If one needs a domain with a different structure than the given one,250one can construct a new domain with the required structure.251The functions that do these constructions have names such as252<C>AsSomething</C>, they return a domain that has the same elements as the253argument in question but the structure <C>Something</C>.254In the above situation, one can use <Ref Func="AsGroup" BookName="ref"/>.255<P/>256<Example><![CDATA[257gap> g:= AsGroup( m );;258gap> m = g;259true260gap> IsGroup( g );261true262]]></Example>263<P/>264If it is impossible to construct the desired domain, the <C>AsSomething</C>265functions return <K>fail</K>.266<P/>267<Example><![CDATA[268gap> AsVectorSpace( GF(4), GF(2)^2 );269fail270]]></Example>271<P/>272The functions <Ref Func="AsList" BookName="ref"/> and273<Ref Func="AsSortedList" BookName="ref"/> mentioned above do not return274domains, but they fit into the general pattern in the sense that they275forget all the structure of the argument, including the fact that it is276a domain, and return a list with the same elements as the argument has.277278</Section>279280281<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->282<Section Label="Subdomains">283<Heading>Subdomains</Heading>284285<Index Key="Subsomething"><C>Subsomething</C></Index>286<Index Key="SubsomethingNC"><C>SubsomethingNC</C></Index>287It is possible to construct a domain as a subset of an existing domain.288The respective functions have names such as <C>Subsomething</C>,289they return domains with the structure <C>Something</C>.290(Note that the second <C>s</C> in <C>Subsomething</C> is not capitalized.)291For example, if one wants to deal with the subgroup of the domain <A>D</A>292that is generated by the elements in the list <A>gens</A>,293one can use <C>Subgroup( <A>D</A>, <A>gens</A> )</C>.294It is not required that <A>D</A> is itself a group,295only that the group generated by <A>gens</A> must be a subset of <A>D</A>.296<P/>297The superset of a domain <A>S</A> that was constructed by a298<C>Subsomething</C>299function can be accessed as <C>Parent( <A>S</A> )</C>.300<P/>301<Example><![CDATA[302gap> g:= SymmetricGroup( 5 );;303gap> gens:= [ (1,2), (1,2,3,4) ];;304gap> s:= Subgroup( g, gens );;305gap> h:= Group( gens );;306gap> s = h;307true308gap> Parent( s ) = g;309true310]]></Example>311<P/>312Many functions return subdomains of their arguments, for example313the result of <C>SylowSubgroup( <A>G</A> )</C> is a group with parent group314<A>G</A>.315<P/>316If you are sure that the domain <C>Something( <A>gens</A> )</C> is contained317in the318domain <A>D</A> then you can also call319<C>SubsomethingNC( <A>D</A>, <A>gens</A> )</C> instead320of <C>Subsomething( <A>D</A>, <A>gens</A> )</C>.321The <C>NC</C> stands for <Q>no check</Q>,322and the functions whose names end with323<C>NC</C> omit the check of containment.324325</Section>326327328<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->329<Section Label="Further Information about Domains">330<Heading>Further Information about Domains</Heading>331332More information about domains can be found in333Chapter <Ref Sect="Domains" BookName="ref"/>. Many other other chapters deal with specific334types of domain such as groups, vector spaces or algebras.335336</Section>337</Chapter>338339340<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->341<!-- %% -->342<!-- %E -->343344345346