<!-- 
  HAPPRIME - rings.xml.in
  Function documentation template file for HAPprime
  Paul Smith

  Copyright (C)  2008
  Paul Smith
  National University of Ireland Galway

  $Id: functions.xml.in 200 2008-02-05 14:29:47Z pas $
-->

<!-- ********************************************************** -->
<Chapter  Label="Rings">
  <Heading>Mod-&p; cohomology rings and their presentation</Heading>

  The mod &p; cohomology ring of a &p;-group &G; given a field
  <M>\mathbb{F} = GF(p)</M> is given by
  <Alt Only="LaTeX">
    <Display>
      H^*(G, \mathbb{F}) = \bigoplus_{i=0}^\infty H^i(G, \mathbb{F})
    </Display>
  </Alt>
  <Alt Not="LaTeX">
    <Display>
      H^*(G, F) = H^0(G, F)  +  H^1(G, F)  +  H^2(G, F)  +  ...
    </Display>
  </Alt>
  Since it is also a vector space, any such ring is also an algebra. This has
  a presentation as a quotient ring of:
  <Alt Only="LaTeX">
    <Display>
      H^*(G, \mathbb{F}) = \frac{\mathbb{F}[x_1, x_2, \ldots, x_n]}{\langle I_1, I_2, \ldots, I_m \rangle}
    </Display>
  </Alt>
  <Alt Not="LaTeX">
    <Display><![CDATA[
      H^*(G, F) = F[x_1, x_2, ..., x_n] / <I_1, I_2, ..., I_m>
    ]]></Display>
  </Alt>
  where the polynomial ring indeterminates <M>x_i</M> each have an associated
  degree <M>d_i</M> and the <M>I_j</M> are relations which together generate an 
  ideal in the ring.
  
  <Section>
    <Heading>Representing mod-&p; cohomology rings</Heading>

    There is no new datatype for representing cohomology rings. Instead, &HAP;
    represents rings with degree no larger than <M>n</M> as a structure constant
    algebra <Ref Sect="Algebra" BookName="tutorial"/>. To the record of the
    algebra <C>A</C>, &HAP; adds a new component, <C>A!.degree(e)</C>, a
    function which returns the degree of an algebra element <C>e</C>.
    <P/>
    &HAPprime; adds some attributes to such an algebra, providing information
    on the basis and generators of the algebra. A ring presentation
    for this algebra can also be computed, and this is also stored as an
    attribute. The ring presentation is represented simply as a polynomial ring,
    a set of relations, and a list of integers corresponding to the degrees of
    the ring indeterminates.
  </Section>
  

  <Section>
    <Heading>Construction function</Heading>
    <#Include Label="PresentationOfGradedStructureConstantAlgebra_DTmanRings_Con">
    <#Include Label="LHSSpectralSequence_DTmanRings_Con">
  </Section>

  <Section>
    <Heading>Data access functions</Heading>
    <#Include Label="ModPRingGeneratorDegrees_DTmanRings_Dat">
    <#Include Label="ModPRingNiceBasis_DTmanRings_Dat">
    <#Include Label="ModPRingNiceBasisAsPolynomials_DTmanRings_Dat">
    <#Include Label="ModPRingBasisAsPolynomials_DTmanRings_Dat">
  
  </Section>
    
  <Section Label="RingsExample">
    <Heading>Example: Mod-&p; cohomology rings</Heading>

    As an example, we use the &HAP; function
    <Ref Func="ModPCohomologyRing" BookName="HAP"/> to compute the mod-&p;
    cohomology ring for the quaternion group <M>Q_8</M> up to and including
    degree five. We can display its generators and basis and the information
    to construct a 'nice basis'
<!--
gap> A := ModPCohomologyRing(SmallGroup(8, 4), 5);
gap> Display(Basis(A));
gap> ModPRingGenerators(A);
gap> ModPRingGeneratorDegrees(A);
gap> ModPRingNiceBasis(A);
-->
<Example><![CDATA[
gap> A := ModPCohomologyRing(SmallGroup(8, 4), 5);
<algebra of dimension 9 over GF(2)>
gap> Display(Basis(A));
CanonicalBasis( Algebra( GF(2), [ v.1, v.2, v.3, v.4, v.5, v.6, v.7, v.8, v.9
 ] ) )
gap> ModPRingGenerators(A);
[ v.1, v.2, v.3, v.7 ]
gap> ModPRingGeneratorDegrees(A);
[ 0, 1, 1, 4 ]
gap> ModPRingNiceBasis(A);
[ [ [ 1, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 1, 0, 0, 0, 0, 0, 0, 0 ],
      [ 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 1, 0, 0, 0 ],
      [ 0, 0, 0, 0, 1, 1, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 1 ],
      [ 0, 0, 0, 1, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 1, 0 ],
      [ 0, 0, 0, 0, 0, 0, 1, 1, 0 ] ],
  [ [ 1, 1, 1 ], [ 1, 1, 2 ], [ 1, 1, 3 ], [ 1, 1, 7 ], [ 1, 2, 2 ],
      [ 1, 2, 3 ], [ 1, 2, 7 ], [ 1, 3, 7 ], [ 2, 2, 3 ] ] ]
]]></Example>

    A presentation for this algebra can be constructed using
    <Ref Attr="PresentationOfGradedStructureConstantAlgebra"/>, which
    (see below) returns the presentation to be
    <Alt Only="LaTeX">
      <Display>
        H^*(G, \mathbb{F}) = \frac{\mathbb{F}[x,y,z]}{\langle x^2 + xy + y^2, y^3\rangle}
      </Display>
    </Alt>
    <Alt Not="LaTeX">
      <Display><![CDATA[
        H^*(G, F) = F[x,y,z] / (x^2 + xy + y^2, y^3)
      ]]></Display>
    </Alt>
    where <M>x</M> and <M>y</M> have degree one and <M>z</M> is degree four.
    The 'nice basis' referred to above is monomials of degree up to five
    in this polynomial ring, and is not necessarily the same as the basis of
    the algebra given by <Ref Meth="Basis" BookName="ref"/>, as demonstrated
    below.
<!--
gap> A := ModPCohomologyRing(SmallGroup(8, 4), 5);;
gap> PresentationOfGradedStructureConstantAlgebra(A);
gap> ModPRingNiceBasisAsPolynomials(A);
gap> ModPRingBasisAsPolynomials(A);
-->
<Example><![CDATA[
gap> A := ModPCohomologyRing(SmallGroup(8, 4), 5);;
gap> PresentationOfGradedStructureConstantAlgebra(A);
Graded algebra GF(2)[ x_1, x_2, x_3 ] / [ x_1^2+x_1*x_2+x_2^2, x_2^3
 ] with indeterminate degrees [ 1, 1, 4 ]

gap> ModPRingNiceBasisAsPolynomials(A);
[ Z(2)^0, x_1, x_2, x_3, x_1^2, x_1*x_2, x_1*x_3, x_2*x_3, x_1^2*x_2 ]
gap> ModPRingBasisAsPolynomials(A);
[ Z(2)^0, x_1, x_2, x_1*x_2, x_1^2+x_1*x_2, x_1^2*x_2, x_3, x_2*x_3,
  x_1*x_3+x_2*x_3 ]]]></Example>
  </Section>

</Chapter>

