1##############################################################################
2##
3#W  gp2up.gd                   GAP4 package `XMod'               Chris Wensley
4#W                                                                 & Murat Alp
5##
6##  This file contains declarations for UpMappings, Derivations and Sections
7##
8#Y  Copyright (C) 2001-2018, Chris Wensley et al,
9#Y  School of Computer Science, Bangor University, U.K.
10
11##############################################################################
12##
13#C  IsUp2DimensionalMapping( <map> )
14#R  IsUp2DimensionalMappingRep( <map> )
15##
16##  A section|derivation is determined by a cat1-group|xmod + generator images
17##
18DeclareCategory( "IsUp2DimensionalMapping", IsGeneralMapping );
19DeclareRepresentation( "IsUp2DimensionalMappingRep",
20    IsUp2DimensionalMapping and IsAttributeStoringRep,
21    [ "Object2d", "UpGeneratorImages", "UpHomomorphism", "UpImagePositions" ] );
22
23#############################################################################
24##
25#C  IsUp2DimensionalMappingCollection . . . . category of colls of up-2d-maps
26#C  IsUp2DimensionalMappingCollColl . . . . . . .  category of colls of colls
27#C  IsUp2DimensionalMappingCollCollColl . . . category of colls, colls, colls
28#V  Up2DimensionalMappingFamily . . . . . family for derivations and sections
29#T  Up2DimensionalMappingType( <map> )
30##
31DeclareCategoryCollections( "IsUp2DimensionalMapping" );
32DeclareCategoryCollections( "IsUp2DimensionalMappingCollection" );
33DeclareCategoryCollections( "IsUp2DimensionalMappingCollColl" );
34BindGlobal( "Up2DimensionalMappingFamily",
35    NewFamily( "Up2DimensionalMappingFamily", IsUp2DimensionalMapping,
36               CanEasilySortElements, CanEasilySortElements ) );
37BindGlobal( "Up2DimensionalMappingType",
38            NewType( Up2DimensionalMappingFamily,
39                     IsUp2DimensionalMappingRep ) );
40
41##############################################################################
42##
43#A  Object2d( <map> )
44#A  UpHomomorphism( <map> )
45#A  UpGeneratorImages( <map> )
46#A  UpImagePositions( <map> )
47##
48DeclareAttribute( "Object2d", IsUp2DimensionalMapping );
49DeclareAttribute( "UpHomomorphism", IsUp2DimensionalMapping );
50DeclareAttribute( "UpGeneratorImages", IsUp2DimensionalMapping );
51DeclareAttribute( "UpImagePositions", IsUp2DimensionalMapping );
52
53#############################################################################
54##
55#P  IsDerivation( <map> )
56#P  IsSection( <map> )
57##
58DeclareProperty( "IsDerivation", IsUp2DimensionalMapping );
59DeclareProperty( "IsSection", IsUp2DimensionalMapping );
60
61InstallTrueMethod( IsUp2DimensionalMapping, IsDerivation );
62InstallTrueMethod( IsUp2DimensionalMapping, IsSection );
63
64##############################################################################
65##                               Derivations                                ##
66##############################################################################
67
68##############################################################################
69##
70#O  DerivationByImages                                     sets up the mapping
71#O  DerivationByImagesNC                                   sets up the mapping
72##
73DeclareOperation( "DerivationByImages",
74    [ Is2DimensionalDomain, IsHomogeneousList ] );
75DeclareOperation( "DerivationByImagesNC",
76    [ Is2DimensionalDomain, IsHomogeneousList ] );
77##  usage: DerivationByImages( XM, im, [, true|false ] )
78
79##############################################################################
80##
81#O  DerivationImage                  image of  r \in R  by the derivation  chi
82##
83DeclareOperation( "DerivationImage", [ IsDerivation, IsObject ] );
84
85###############################################################################
86##
87#O  DerivationBySection  construct an XMod derivation from a cat1-group section
88##
89DeclareOperation( "DerivationBySection", [ IsSection ] );
90
91##############################################################################
92##
93#O  IdentityDerivation          construct the identity derivation for an  XMod
94#O  IdentitySection            construct the identity section for a cat1-group
95##
96DeclareAttribute( "IdentityDerivation", IsXMod );
97DeclareAttribute( "IdentitySection", IsCat1Group );
98
99##############################################################################
100##
101#O  PrincipalDerivation              derivation determined by choice of s in S
102#A  PrincipalDerivations                         list of principal derivations
103##
104DeclareOperation( "PrincipalDerivation", [ IsXMod, IsObject ] );
105DeclareAttribute( "PrincipalDerivations", IsXMod );
106
107##############################################################################
108##
109#O  CompositeDerivation                 Whitehead composite of two derivations
110#O  WhiteheadProduct                    Whitehead composite of two derivations
111#O  WhiteheadOrder            order of a derivation using the WhitefeadProduct
112##
113DeclareOperation( "CompositeDerivation", [ IsDerivation, IsDerivation ] );
114DeclareOperation( "WhiteheadProduct",
115    [ IsUp2DimensionalMapping, IsUp2DimensionalMapping ] );
116DeclareOperation( "WhiteheadOrder", [ IsUp2DimensionalMapping ] );
117
118##############################################################################
119##
120#P  IsRegularDerivation                   so an element of the Whitehead group
121##
122DeclareProperty( "IsRegularDerivation", IsDerivation );
123
124InstallTrueMethod( IsDerivation, IsRegularDerivation );
125
126##############################################################################
127##
128#A  SourceEndomorphism       upmapping determines endomorphism of source group
129#A  RangeEndomorphism        upmapping determines endomorphism of range group
130#A  Object2dEndomorphism     upmapping determines endomorphism of xmod or cat1
131##
132DeclareAttribute( "SourceEndomorphism", IsUp2DimensionalMapping );
133DeclareAttribute( "RangeEndomorphism", IsUp2DimensionalMapping );
134DeclareAttribute( "Object2dEndomorphism", IsUp2DimensionalMapping );
135
136#############################################################################
137##
138#O  InverseDerivations      Finds all semigroup inverses XJ for derivation Xi
139##                                                i.e.  XiXjXi=Xi & XjXiXj=Xj
140DeclareOperation( "InverseDerivations", [ IsDerivation ] );
141
142##############################################################################
143##
144#O  ListInverseDerivations               List all inverses for each derivation
145##
146DeclareAttribute( "ListInverseDerivations", IsXMod );
147
148
149##############################################################################
150##                                 Sections                                 ##
151##############################################################################
152
153##############################################################################
154##
155#O  SectionByHomomorphism                 converts a homomorphism to a section
156#O  SectionByHomomorphismNC               converts a homomorphism to a section
157##
158DeclareOperation( "SectionByHomomorphism",
159    [ IsPreCat1Group, IsGroupHomomorphism ] );
160DeclareOperation( "SectionByHomomorphismNC",
161    [ IsPreCat1Group, IsGroupHomomorphism ] );
162
163##############################################################################
164##
165#O  SectionByDerivation      the cat1-group section determined by a derivation
166##
167DeclareOperation( "SectionByDerivation", [ IsDerivation ] );
168
169##############################################################################
170##
171#O  CompositeSection                       Whitehead composite of two sections
172##
173DeclareOperation( "CompositeSection", [ IsSection, IsSection ] );
174
175
176#############################################################################
177##                      Monoids of Derivations or Sections                 ##
178#############################################################################
179
180#############################################################################
181##
182#P  IsMonoidOfUp2DimensionalMappings( <obj> )
183#R  IsMonoidOfUp2DimensionalMappingsObj( <obj> )
184##
185##  An Up2DimensionalMappings record stores images lists and composition table
186##
187DeclareProperty( "IsMonoidOfUp2DimensionalMappings", IsObject );
188DeclareRepresentation( "IsMonoidOfUp2DimensionalMappingsObj",
189    IsMonoidOfUp2DimensionalMappings and IsAttributeStoringRep,
190    [ "Object2d", "ImagesList" ] );
191
192##############################################################################
193##
194#A  ImagesList                                returns list of DerivationImages
195#A  DerivationClass                                 type of derivations record
196#A  ImagesTable                                   returns lists of image lists
197##
198DeclareAttribute( "ImagesList", IsMonoidOfUp2DimensionalMappings );
199DeclareAttribute( "DerivationClass", IsMonoidOfUp2DimensionalMappings );
200DeclareAttribute( "ImagesTable", IsMonoidOfUp2DimensionalMappings );
201
202#############################################################################
203##
204#O  MonoidOfUp2DimensionalMappingsObj( <obj>, <images>, <str> )
205#F  MonoidOfUp2DimensionalMappingsFamily . . .  family for up-mappings monoid
206#T  MonoidOfUp2DimensionalMappingsType . . . . .  type for up-mappings monoid
207#P  IsMonoidOfDerivations
208#P  IsMonoidOfSections
209##
210DeclareOperation( "MonoidOfUp2DimensionalMappingsObj",
211    [ Is2DimensionalDomain, IsHomogeneousList, IsString ] );
212MonoidOfUp2DimensionalMappingsFamily :=
213    CollectionsFamily( Up2DimensionalMappingFamily );
214BindGlobal( "MonoidOfUp2DimensionalMappingsType",
215            NewType( MonoidOfUp2DimensionalMappingsFamily,
216                     IsMonoidOfUp2DimensionalMappingsObj ) );
217DeclareProperty( "IsMonoidOfDerivations", IsMonoidOfUp2DimensionalMappings );
218DeclareProperty( "IsMonoidOfSections", IsMonoidOfUp2DimensionalMappings );
219
220##############################################################################
221##
222#A  RegularDerivations    find all invertible derivations for a crossed module
223#A  AllDerivations                   find all derivations for a crossed module
224#A  RegularSections              find all invertible sections for a cat1-group
225#A  AllSections                             find all sections for a cat1-group
226##
227DeclareAttribute( "RegularDerivations", IsXMod );
228DeclareAttribute( "AllDerivations", IsXMod );
229DeclareAttribute( "RegularSections", IsCat1Group );
230DeclareAttribute( "AllSections", IsCat1Group );
231
232##############################################################################
233##
234#O  BacktrackDerivationsJ          recursive function for BacktrackDerivations
235#O  BacktrackDerivations            recursive construction for all derivations
236#O  BacktrackSectionsJ         recursion used by RegularSections & AllSections
237##
238DeclareOperation( "BacktrackDerivationsJ",  [ IsXMod, IsHomogeneousList,
239    IsHomogeneousList, IsHomogeneousList, IsInt, IsString ] );
240DeclareOperation( "BacktrackDerivations", [ IsXMod, IsString ] );
241DeclareOperation( "BacktrackSectionsJ", [ IsRecord, IsInt, IsObject, IsInt ] );
242
243#############################################################################
244##
245#A  WhiteheadMonoidTable( XM )               Table of products of derivations
246#A  WhiteheadGroupTable( XM )        Table of products of regular derivations
247##
248##  ?? should these refer just to 2DimensionalDomains ??
249##
250DeclareAttribute( "WhiteheadMonoidTable", IsXMod );
251DeclareAttribute( "WhiteheadGroupTable", IsXMod );
252
253#############################################################################
254##
255#A  WhiteheadPermGroup( XM )                     a permutation representation
256#A  WhiteheadGroupGeneratingDerivations                   generators for W(X)
257#A  WhiteheadGroupGeneratorPositions         positions of generators for W(X)
258#A  WhiteheadTransformationMonoid( XM )                a transformation representation
259##
260DeclareAttribute( "WhiteheadPermGroup", IsXMod );
261DeclareAttribute( "WhiteheadGroupGeneratingDerivations", IsXMod );
262DeclareAttribute( "WhiteheadGroupGeneratorPositions", IsXMod );
263DeclareAttribute( "WhiteheadTransformationMonoid", IsXMod );
264