<Chapter><Heading> Words in free <M>ZG</M>-modules </Heading>

<Table Align="|l|" >

<Row>
<Item>
<Index> AddFreeWords</Index>
<C>
AddFreeWords(v,w)
</C>
<P/>

Inputs two words <M>v,w</M> in a free <M>ZG</M>-module and 
returns their sum <M>v+w</M>. If the characteristic of <M>Z</M> is 
greater than <M>0</M> then the next function might be more efficient.
</Item>
</Row>

<Row>
<Item>
<Index> AddFreeWordsModP</Index>
<C>
AddFreeWordsModP(v,w,p)
</C>
<P/>

Inputs two words <M>v,w</M> in a free <M>ZG</M>-module and 
the characteristic <M>p</M> of <M>Z</M>. 
It returns the sum <M>v+w</M>. If <M>p=0</M> 
the previous function might be fractionally quicker.
</Item>
</Row>

<Row>
<Item>
<Index> AlgebraicReduction</Index>
<C>
AlgebraicReduction(w)
</C>
<Br/>
<C>
AlgebraicReduction(w,p)
</C>
<P/>

Inputs a word <M>w</M> in a free <M>ZG</M>-module 
and returns a reduced version of the word in which all pairs of 
mutually inverse letters have been cancelled. The reduction is 
performed in a free abelian group unless the characteristic <M>p</M> of <M>Z</M> is entered.
</Item>
</Row>

<Row>
<Item>
<Index> MultiplyWord</Index>
<C>
Multiply
Word(n,w)
</C>
<P/>

Inputs a word <M>w</M> and integer <M>n</M>. It returns the scalar 
multiple <M>n\cdot w</M>.
</Item>
</Row>

<Row>
<Item>
<Index> Negate</Index>
<C>
Negate([i,j])
</C>
<P/>

Inputs a pair <M>[i,j]</M> of integers and returns <M>[-i,j]</M>.
</Item>
</Row>

<Row>
<Item>
<Index> NegateWord</Index>
<C>
NegateWord(w)
</C>
<P/>

Inputs a word <M>w</M> in a free <M>ZG</M>-module and 
returns the negated word <M>-w</M>.
</Item>
</Row>

<Row>
<Item>
<Index> PrintZGword</Index>
<C>
PrintZGword(w,elts)
</C>
<P/>

Inputs a word <M>w</M> in a free <M>ZG</M>-module and a 
(possibly partial but sufficient) listing elts of the elements of 
<M>G</M>. The function prints the word <M>w</M> to the screen in 
the form
<P/>
<M>r_1E_1 + \ldots + r_nE_n</M>
<P/>
where <M>r_i</M> are elements in the group ring <M>ZG</M>, and <M>E_i</M>
denotes the <M>i</M>-th free generator of the module. 
</Item>
</Row>




<Row>
<Item>
<Index> TietzeReduction</Index>
<C> 
TietzeReduction(S,w)
</C>
<P/>

Inputs a set <M>S</M> of words in a free <M>ZG</M>-module, and a word 
<M>w</M> in the module. The function returns a word <M>w'</M> such 
that {<M>S,w'</M>} generates the same abelian group as {<M>S,w</M>}. 
The word <M>w'</M> is possibly shorter (and certainly no longer) than 
<M>w</M>. This function needs to be improved!
</Item>
</Row>

</Table>
</Chapter>



