GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
<?xml version="1.0" encoding="UTF-8"?>1<!DOCTYPE Book SYSTEM "gapdoc.dtd">23<Book Name="HAPprog">45<TitlePage>67<Title><Package>Hap Programming</Package> – An experimental framework8for objectifying the data structures of Hap</Title>910<Version>( development version of11<#Include SYSTEM "today.ver">12)13</Version>14<Author>Marc Röder15<Email>marc.roeder(at)nuigalway.ie</Email>16</Author>1718<Abstract>19This extension does not change the behaviour of Hap and is fully20backwards-compatible. It is not a part of Hap and there is no guarantee that21it will at any point be supported by Hap. Use at your own risk.22</Abstract>2324<Address>25Marc Röder, Department of Mathematics, NUI Galway, Irleland26</Address>2728<Acknowledgements>29This work was supported by Marie Curie Grant No. MTKD-CT-2006-04268530</Acknowledgements>3132<Copyright>©right; 2007 Marc Röder. <P/>3334This package is distributed under the terms of the GNU General35Public License version 2 or later (at your convenience). See the file36<File>LICENSE.txt</File> or37<URL>http://www.gnu.org/copyleft/gpl.html</URL>3839</Copyright>40</TitlePage>4142<TableOfContents/>434445<Body>46<Chapter Label="hapresolution"><Heading>Resolutions in Hap</Heading>4748This document is only concerned with the representation of resolutions in49Hap. Note that it is not a part of Hap. The framework provided here is just an50extension of Hap data types used in HAPcryst and HAPprime.51<P />52From now on, let <M>G</M> be a group and <M>\dots \to M_n\to M_{n-1}\to\dots\to M_1\to M_0\to Z</M> be a53resolution with free <M>ZG</M> modules <M>M_i</M>.5455<P/>56The elements of the modules <M>M_i</M> can be represented in different57ways. This is what makes different representations for resolutions58desirable. First, we will look at the standard representation59(<C>HapResolutionRep</C>) as it is defined in Hap. After that, we will present60another representation for infinite groups.61Note that all non-standard representations must be sub-representations of the62standard representation to ensure compatibility with Hap.6364656667<Section Label="hapresolutionrep"><Heading>The Standard Representation <K>HapResolutionRep</K></Heading>6869For every <M>M_i</M> we fix a basis and number its elements. Furthermore, it is70assumed that we have a (partial) enumeration of the group of a resolution.71In practice this is done by generating a lookup table on the fly.72<P/>7374In standard representation, the elements of the modules <M>M_k</M> are75represented by lists -"words"- of pairs of integers. A letter <C>[i,g]</C> of76such a word consists of the number of a basis element <C>i</C> or <C>-i</C> for77its additive inverse and a number78<M>g</M> representing a group element.79<P/>8081A <C>HapResolution</C> in <C>HapResolutionRep</C> representation is a component82object with the components8384<List>85<Item><C>group</C>, a group of arbitrary type.</Item>8687<Item><C>elts</C>, a (partial) list of (possibly duplicate) elements in G. This88list provides the "enumeration" of the group. Note that there are89functions in Hap which assume that <C>elts[1]</C> is the identity element of G.90</Item>9192<Item><C>appendToElts(g)</C> a function that appends the group element93<C>g</C> to <C>.elts</C>. This is not documented in Hap 1.8.6 but seems to94be required for infinite groups. This requirement might vanish in some later95version of Hap [G. Ellis, private communication].96</Item>9798<Item><C>dimension(k)</C>, a function which returns the ZG-rank of the Module99<M>M_k</M></Item>100101<Item><C>boundary(k,j)</C>, a function which returns the image in <M>M_{k-1}</M>102of the <M>j</M>th free generator of <M>M_k</M>. Note that negative <M>j</M> are103valid as input as well. In this case the additive inverse of the boundary of104the <M>j</M>th generator is returned</Item>105106<Item><C>homotopy(k,[i,g])</C> a function which returns the image in107<M>M_{k+1}</M>, under a contracting homotopy <M>M_k \to M_{k+1}</M>, of the108element <C>[[i,g]]</C> in <M>M_k</M>. The value of this might be <K>fail</K>.109However, currently (version 1.8.4) some Hap functions assume that110<C>homotopy</C> is a function without testing.</Item>111112<Item><C>properties</C>, a list of pairs <C>["name","value"]</C> "name" is a113string and value is anything (boolean, number, string...). Every114<C>HapResolution</C> (regardless of representation) has to have115<C>["type","resolution"]</C>, <C>["length",length]</C> where <C>length</C> is116the length of the resolution and <C>["characteristic",char]</C>. Currently (Hap1171.8.6), <C>length</C> must not be <K>infinity</K>.118The values of these properties can be tested using the Hap function119<C>EvaluateProperty(resolution,propertyname)</C>.</Item>120121</List>122123Note that making <C>HapResolution</C>s immutable will make the <C>.elts</C>124component immutable. As this lookup table might change during calculations,125we do not recommend using immutable resolutions (in any representation).126</Section>127128<Section Label="largegrouprep"><Heading>The <K>HapLargeGroupResolutionRep</K> Representation</Heading>129130In this sub-representation of the standard representation, the module elements131in this resolution are lists of groupring elements.132So the lookup table <C>.elts</C> is not used as long as no conversion to133standard representation takes place.134In addition to the components of a <K>HapResolution</K>, a resolution in large135group representation has the following components:136137<List>138<Item><C>boundary2(resolution,term,gen)</C>, a function that returns the139boundary of the <A>gen</A>th generator of the <A>term</A>th module.</Item>140<Item><C>groupring</C> the group ring of the resolution <A>resolution</A>.</Item>141<Item><C>dimension2(resolution,term)</C> a function that returns the dimension142of the <A>term</A>th module of the resolution <A>resolution</A>.</Item>143</List>144The effort of having two versions of <C>boundary</C> and <C>dimension</C> is145necessary to keep the structure compatible with the usual Hap resolution.146</Section>147148</Chapter>149150151152<!-- ================================================== -->153154155<Chapter><Heading>Accessing and Manipulating Resolutions</Heading>156157158<Section><Heading>Representation-Independent Access Methods</Heading>159160All methods listed below take a <C>HapResolution</C> in any representation. If161the other arguments are compatible with the representation of the resolution,162the returned value will be in the form defined by this representation. If the163other arguments are in a different representation, &GAP;s method selection is164used via <C>TryNextMethod()</C> to find an applicable method (a suitable representation).165<P/>166167The idea behind this is that the results of computations have the same form as168the input. And as all representations are sub-representations of the169<C>HapResolutionRep</C> representation, input which is compatible with the170<C>HapResolutionRep</C> representation is always valid.171<P/>172173Every new representation must support the functions of this section.174175<ManSection>176<Meth Name="StrongestValidRepresentationForLetter" Arg="resolution term177letter"/>178<Returns>filter</Returns>179<Description>180Finds the sub-representation of <C>HapResolutionRep</C> for which181<A>letter</A> is a valid letter of the <A>term</A>th module of182<A>resolution</A>. Note that <A>resolution</A> automatically is in some183sub-representation of <C>HapResolutionRep</C>.This is mainly meant for184debugging.185</Description>186</ManSection>187188189<ManSection>190<Meth Name="StrongestValidRepresentationForWord" Arg="resolution term191word"/>192<Returns>filter</Returns>193<Description>194Finds the sub-representation of <C>HapResolutionRep</C> for which195<A>word</A> is a valid word of the <A>term</A>th module of196<A>resolution</A>. Note that <A>resolution</A> automatically is in some197sub-representation of <C>HapResolutionRep</C>. This is mainly meant for198debugging.199</Description>200</ManSection>201202203<ManSection>204<Meth Name="PositionInGroupOfResolution" Arg="resolution g" />205<Meth Name="PositionInGroupOfResolutionNC" Arg="resolution g"/>206<Returns>positive integer</Returns>207<Description>208This returns the position of the group element <A>g</A> in the enumeration209of the group of <A>resolution</A>. The NC version does not check if <A>g</A>210really is an element of the group of <A>resolution</A>.211</Description>212</ManSection>213214215<ManSection>216<Meth Name="IsValidGroupInt" Arg="resolution n"/>217<Returns>boolean</Returns>218<Description>219Returns true if the <A>n</A>th element of the group of <A>resolution</A> is known.220</Description>221</ManSection>222223<ManSection>224<Meth Name="GroupElementFromPosition" Arg="resolution n"/>225<Returns>group element or <K>fail</K></Returns>226<Description>227Returns <A>n</A>th element of the group of <A>resolution</A>. If the228<A>n</A>th element is not known, <K>fail</K> is returned.229</Description>230</ManSection>231232233<ManSection>234<Meth Name="MultiplyGroupElts" Arg="resolution x y"/>235<Returns>positive integer or group element, depending on the type of <A>x</A> and <A>y</A></Returns>236<Description>237If <C>x</C> and <C>y</C> are given in standard representation (i.e. as238integers), this returns the position of the product of the group elements239represented by the positive integers <A>x</A> and <A>x</A>.240<P/>241If <C>x</C> and <C>y</C> are given in any other representation, the returned242group element will also be represented in this way.243</Description>244</ManSection>245246247<ManSection>248<Meth Name="MultiplyFreeZGLetterWithGroupElt" Arg="resolution letter g"/>249<Returns>A letter</Returns>250<Description>251Multiplies the letter <A>letter</A> with the group element <A>g</A> and252returns the result. If <A>resolution</A> is in standard representation,253<A>g</A> has to be an integer and <A>letter</A> has to be a pair of254integer. If <A>resolution</A> is in any other representation, <A>letter</A>255and <A>g</A> can be in a form compatible with that representation or in the256standard form (in the latter case, the returned value will also have257standard form).258</Description>259</ManSection>260261262<ManSection>263<Meth Name="MultiplyFreeZGWordWithGroupElt" Arg="resolution word g"/>264<Returns>A word</Returns>265<Description>266Multiplies the word <A>word</A> with the group element <A>g</A> and267returns the result. If <A>resolution</A> is in standard representation,268<A>g</A> has to be an integer and <A>word</A> has to be a list of pairs of269integers. If <A>resolution</A> is in any other representation, <A>word</A>270and <A>g</A> can be in a form compatible with that representation or in the271standard form (in the latter case, the returned value will also have272standard form).273</Description>274</ManSection>275276277<ManSection>278<Meth Name="BoundaryOfFreeZGLetter" Arg="resolution term letter"/>279<Returns>free ZG word (in the same representation as <A>letter</A>)</Returns>280<Description>281Calculates the boundary of the letter (word of length 1) <A>letter</A> of282the <A>term</A>th module of <A>resolution</A>.283<P/>284The returned value is a word of the <A>term</A>-1st module and comes in the285same representation as <A>letter</A>.286</Description>287</ManSection>288289290<ManSection>291<Meth Name="BoundaryOfFreeZGWord" Arg="resolution term word"/>292<Returns>free ZG word (in the same representation as <A>letter</A>)</Returns>293<Description>294Calculates the boundary of the word <A>word</A> of295the <A>term</A>th module of <A>resolution</A>.296<P/>297The returned value is a word of the <A>term</A>-1st module and comes in the298same representation as <A>word</A>.299</Description>300</ManSection>301302303</Section>304305306<Section><Heading>Converting Between Representations</Heading>307308Four methods are provided to convert letters and words from standard309representation to any other representation and back again.310311<ManSection>312<Meth Name="ConvertStandardLetter" Arg="resolution term letter"/>313<Meth Name="ConvertStandardLetterNC" Arg="resolution term letter"/>314<Returns>letter in the representation of <A>resolution</A></Returns>315<Description>316Converts the letter <A>letter</A> in standard representation to the317representation of <A>resolution</A>. The NC version does not check whether318<A>letter</A> really is a letter in standard representation.319</Description>320</ManSection>321322323<ManSection>324<Meth Name="ConvertStandardWord" Arg="resolution term word"/>325<Meth Name="ConvertStandardWordNC" Arg="resolution term word"/>326<Returns>word in the representation of <A>resolution</A></Returns>327<Description>328Converts the word <A>word</A> in standard representation to the329representation of <A>resolution</A>. The NC version does not check whether330<A>word</A> is a valid word in standard representation.331</Description>332</ManSection>333334335<ManSection>336<Meth Name="ConvertLetterToStandardRep" Arg="resolution term letter"/>337<Meth Name="ConvertLetterToStandardRepNC" Arg="resolution term letter"/>338<Returns>letter in standard representation</Returns>339<Description>340Converts the letter <A>letter</A> in the representation of <A>resolution</A>341to the standard representation. The NC version does not check whether342<A>letter</A> is a valid letter of <A>resolution</A>.343</Description>344</ManSection>345346<ManSection>347<Meth Name="ConvertWordToStandardRep" Arg="resolution term word"/>348<Meth Name="ConvertWordToStandardRepNC" Arg="resolution term word"/>349<Returns>word in standard representation</Returns>350<Description>351Converts the word <A>word</A> in the representation of <A>resolution</A>352to the standard representation. The NC version does not check whether353<A>word</A> is a valid word of <A>resolution</A>.354</Description>355</ManSection>356357358</Section>359360361<Section><Heading>Special Methods for <K>HapResolutionRep</K></Heading>362363Some methods explicitely require the input to be in the standard364representation (<A>HapResolutionRep</A>). Two of these test if a word/letter is365really in standard representation, the other ones are non-check versions of the366universal methods.367368<ManSection>369<Meth Name="IsFreeZGLetter" Arg="resolution term letter"/>370<Returns>boolean</Returns>371<Description>372Checks if <A>letter</A> is an valid letter (word of length 1) in standard373representation of the <A>term</A>th module of <A>resolution</A>.374</Description>375</ManSection>376377378<ManSection>379<Meth Name="IsFreeZGWord" Arg="resolution term word"/>380<Returns>boolean</Returns>381<Description>382Check if <A>word</A> is a valid word in large standard representation of the383<A>term</A>th module in <A>resolution</A>.384</Description>385</ManSection>386387388<ManSection>389<Meth Name="MultiplyGroupEltsNC" Arg="resolution x y"/>390<Returns>positive integer</Returns>391<Description>392Given positive integers <C>x</C> and <C>y</C>, this returns the position of393the product of the group elements represented by the positive integers394<A>x</A> and <A>x</A>. This assumes that all input is in standard395representation and does not check the input.396</Description>397</ManSection>398399400<ManSection>401<Meth Name="MultiplyFreeZGLetterWithGroupEltNC" Arg="resolution letter g"/>402<Returns>A letter in standard representation</Returns>403<Description>404Multiplies the letter <A>letter</A> with the group element represented by405the positive integer <A>g</A> and406returns the result. The input is assumed to be in <A>HapResolutionRep</A>407and is not checked.408</Description>409</ManSection>410411412<ManSection>413<Meth Name="MultiplyFreeZGWordWithGroupEltNC" Arg="resolution word g"/>414<Returns>A letter in standard representation</Returns>415<Description>416Multiplies the word <A>word</A> with the group element represented by417the positive integer <A>g</A> and418returns the result. The input is assumed to be in <A>HapResolutionRep</A>419and is not checked.420</Description>421</ManSection>422423424<ManSection>425<Meth Name="BoundaryOfFreeZGLetterNC" Arg="resolution term letter"/>426<Returns>free ZG word in standard representation</Returns>427<Description>428Calculates the boundary of the letter (word of length 1) <A>letter</A> of429the <A>term</A>th module of <A>resolution</A>.430The input is assumed to be in standard representation and not checked.431</Description>432</ManSection>433434435436<ManSection>437<Meth Name="BoundaryOfFreeZGWordNC" Arg="resolution term word"/>438<Returns>free ZG word in standard representation</Returns>439<Description>440Calculates the boundary of the word <A>word</A> of441the <A>term</A>th module of <A>resolution</A>.442The input is assumed to be in standard representation and not checked.443</Description>444</ManSection>445446447</Section>448449<#Include SYSTEM "./resolutionAccess_GroupRing.xml">450451</Chapter>452453<Chapter><Heading>Contracting Homotopies</Heading>454455<#Include SYSTEM "./contraction.xml">456</Chapter>457458</Body>459</Book>460461