  
  [1X5 Morphisms of forms[0X
  
  In  this  chapter we give a very brief overview on morphisms of sesquilinear
  and quadratic forms. The reader can find more in the texts: Cameron [Cam00],
  Taylor [Tay92], Aschbacher [Asc00], or Kleidman and Liebeck [KL90].
  
  In  this  chapter  we consider an n-dimensional vector space V over a finite
  field.  Suppose that f is a sesquilinear form or a quadratic form on V, then
  we call the pair (V,f) a [13Xformed vector space[0m.
  
  
  [1X5.1 Morphisms of sesquilinear forms[0X
  
  Consider  two  formed  vector  spaces (V,f) and (W,g) over the same field F,
  where  both f and g are sesquilinear forms. Suppose that phi is a linear map
  from  V  to W. The map phi is an [13Xisometry[0m from the formed space (V,f) to the
  formed space (W,g) if for all v,w in V we have
  
  
       f(v,w) = f'(\phi(v), \phi(w)).
  
  
  The  map phi is a [13Xsimilarity[0m from the formed space (V,f) to the formed space
  (W,g) if for all v,w in V we have
  
  
       f(v,w) = \lambda f'(\phi(v), \phi(w)).
  
  
  for  some  non-zero  lambda in F. Finally, the map phi. is a [13Xsemi-similarity[0m
  from the formed space (V,f) to the formed space (W,g) if for all v,w in V we
  have
  
  
       f(v,w) = \lambda f'(\phi(v), \phi(w))^\alpha
  
  
  for some non-zero lambda in F and a field automorphism alpha of F.
  
  One  of  the objectives of studying maps between formed vector spaces is the
  classification  of  sesquilinear  forms  on  a  vector  space V, where it is
  sufficient  to classify non-degenerate forms. The following results are well
  known.
  
  It can be proved that (see for example Section 6.3 of [Cam00]):
  
  --    all  non-degenerate  alternating  forms of a given vector space over a
        given finite field are similar,
  
  --    all  non-degenerate  hermitian  forms  of  a given vector space over a
        given finite field are similar, and,
  
  --    the  non-degenerate  symmetric bilinear forms on a vector space over a
        field  with  odd  characteristic  come in three flavours, two of which
        occur  when  the  dimension  of the vector space is even, one of which
        occurs when the dimension of the vector space is odd.
  
  In  principle,  within each similarity class, different isometry classes can
  occur,  but  we  will see that in most cases, each similarity class contains
  exactly one isometry class.
  
  Given  a  sesquilinear  form  f  over  a  vector  space  V,  [5XForms[0m  provides
  functionality  to  compute  the  linear  map  phi  from  V  to  itself  (or,
  equivalently,  a matrix describing a change of basis), such that f is mapped
  to its canonical representative in its isometry class. In the next sections,
  we describe the representative(s) of the similarity class(es) used in [5XForms[0m,
  and,  when  necessary, the different isometry classes, for each of the three
  reflexive  sesquilinear  forms.  The  easiest  cases  are  the hermitian and
  alternating cases.
  
  
  [1X5.1-1 Hermitian forms[0X
  
  We  suppose  that  f  is a non-degenerate hermitian form on a vector space V
  over the finite field F, with involutory field automorphism alpha. It can be
  proved  (see  [KL90])  that  any vector space equipped with a non-degenerate
  hermitian  form  f  contains  an orthogonal basis such that f(e_i,e_i)=1 for
  each  basisvector  e_i.  Hence  (V,f)  is  isometric with (V,f') with f' the
  non-degenerate  hermitian  form  with  the  identity matrix over F. The Witt
  index of f equals n/2 when n is even and (n-1)/2 when n is odd.
  
  
  [1X5.1-2 Alternating forms[0X
  
  We  suppose that f is a non-degenerate alternating bilinear form on a vector
  space  V  over  a  finite  field  F.  As  already  mentioned in Section [14X3.1[0m,
  non-degenerate  alternating  forms  only  exist  on  even dimensional vector
  spaces.  Restricting  to  a  two  dimensional  vector  space,  it  is  clear
  immediately  that  the Gram matrix of f must be for some non-zero r in F. If
  we  rescale  one of the basisvectors, which induces an isometry, then we see
  that  there  always  exists a basis such that r=1. We call a two dimensional
  vector  space  equipped  with a non-degenerate alternating form a [13Xsymplectic
  hyperbolic  line[0m,  and  it  is  proved (see Theorem 6.7 of [Cam00]) that the
  formed  space (V,f) can be written as an orthogonal direct sum of symplectic
  hyperbolic  planes.  Hence, up to isometry, there is only one non-degenerate
  alternating  form  of  an  even  dimensional  vector space, and we choose as
  canonical representative the alternating form with Gram matrix
  
  The Witt index of f equals n/2.
  
  
  [1X5.1-3 Bilinear forms[0X
  
  We  suppose  that  f is a non-degenerate symmetric bilinear form on a vector
  space  V  over  a  finite  field  F  with  odd characteristic. We call a two
  dimensional  vector space a [13Xhyperbolic line[0m if it contains a non-zero vector
  such that f(v,v) = 0. It is proved (see Proposition 6.9 of [Cam00]) that any
  two   hyperbolic   lines   are   isometric,   and  we  choose  as  canonical
  representative the orthogonal form with Gram matrix
  
  It  can  be proved (see Theorem 6.10 of [Cam00]) that the formed space (V,f)
  can  be  written  as  the  orthogonal direct sum of hyperbolic lines and one
  subspace  U  of  dimension at most two. The behaviour of f on the subspace U
  determines the similarity class of f. We describe the three occurring cases,
  to describe the chosen canonical form, we use the polynomial rather than the
  Gram matrix.
  
  --    If the dimension of U is zero, then (V,f) is the orthogonal direct sum
        of  hyperbolic lines, and hence (V,f) is isometric to the formed space
        (V,f'),  where  the  Gram matrix of f' consists of blocks as described
        above. The chosen canonical form has polynomial
  
  
             x_1 x_2 + \ldots + x_{n-1}x_n
  
  
        Note  that the dimension of the vector space V is necessarily even. We
        call f [13Xhyperbolic[0m (see also Section [14X3.1[0m). It follows also that in this
        similarity  class, there is only one isometry class. The Witt index of
        f equals n/2.
  
  --    If  the  dimension  of  U is one, then necessarily the polynomial of f
        equals
  
  
             \mu x_1^2 + x_2 x_3 + \ldots + x_{n-1}x_n
  
  
        for  some  mu in F, and the dimension of the vector space V is odd. We
        call  f  [13Xparabolic[0m (see also Section [14X3.1[0m). It is clear that if mu is a
        square in F, then rescaling the first basis vector yields a polynomial
  
  
             x_1^2 + x_2 x_3 + \ldots + x_{n-1}x_n
  
  
        which we choose as the canonical form for this similarity class. If mu
        is a non-square, a rescaling of x_2,x_4,...,x_n-1 yields a polynomial
  
  
             \mu (x_1^2 + x_2 x_3 + \ldots + x_{n-1}x_n)
  
  
        which represents now a bilinear form that is [12Xsimilar but not isometric[0m
        to  the  given one. Hence, the parabolic similarity class contains two
        isometry classes. The Witt index of f equals (n-1)/2.
  
  --    Suppose  at last that the dimension of U is two. We may suppose that U
        is  not  a  hyperbolic  line.  It  is  not too difficult to see that a
        suitable base change yields the polynomial
  
  
             \mu x_1^2 + x_2^2 + x_3 x_4 + \ldots + x_{n-1}x_n
  
  
        for  a  non-square mu in F, and the dimension of the vector space V is
        even. We call f [13Xelliptic[0m. The Witt index of f equals (n-2)/2.
  
  
  [1X5.1-4 Degenerate forms[0X
  
  Suppose that f is a degenerate sesquilinear form on the vector space V, then
  Rad(f)  is  a non-trivial subspace of the vector space V. The vector space V
  can  be written as the orthogonal direct sum of a subspace W and Rad(f), and
  the restriction of f to W is a non-degenerate sesquilinear form on W. Hence,
  f is isometric with a sesquilinear form having Gram matrix
  
  where M is the Gram matrix of a non-degenerate sesquilinear form and A,B and
  C  are  appropriate  zero  matrices.  The dimension of the maximal isotropic
  subspaces is the sum of the Witt index and the dimension of the radical.
  
  
  [1X5.2 Morphisms of quadratic forms[0X
  
  Consider  two  formed  vector  spaces (V,f) and (W,g) over the same field F,
  where  both  f  and  g are quadratic forms. Suppose that phi is a linear map
  from  V  to W. The map phi is an [13Xisometry[0m from the formed space (V,f) to the
  formed space (W,g) if for all v,w in V we have
  
  
       f(v) = f'(\phi(v)).
  
  
  The  map  phi  is a [13Xsimilarity[0m from the formed space (V,f) to a formed space
  (W,g) if for all v,w in V we have
  
  
       f(v) = \lambda f'(\phi(v)).
  
  
  for  some  non-zero  lambda in F. Finally, the map phi. is a [13Xsemi-similarity[0m
  from the formed space (V,f) to the formed space (W,g) if for all v,w in V we
  have
  
  
       f(v)=\lambda f'(\phi(v))^\alpha
  
  
  for some non-zero lambda in F and a field automorphism alpha of F.
  
  Also  in  this  case,  one of the objectives of studying maps between formed
  vector  spaces  is  the classification of quadratic forms of the same vector
  space V, where it is sufficient to classify non-degenerate forms.
  
  Since  there  is  a  one-to-one  relationship between quadratic forms in odd
  characteristic  and  orthogonal  bilinear  forms  in  odd characteristic, we
  suppose  in  this section that f is a quadratic form in even characteristic.
  We  call  a  two dimensional vector space a [13Xhyperbolic line[0m if it contains a
  non-zero  vector  such  that  f(v) = 0. It is proved (see Proposition 6.9 of
  [Cam00])  that  any  two  hyperbolic  lines  are isometric, and we choose as
  canonical  representative  the quadratic form with polynomial x_1 x_2. As in
  the  case  of  the  orthogonal bilinear forms, it can be proved (see Theorem
  6.10  of  [Cam00]) that (V,f) can be written as the orthogonal direct sum of
  hyperbolic  lines and one subspace U of dimension at most two. The behaviour
  of  f  on  the  subspace  U  determines  the  similarity  class  of  f.  The
  classification of quadratic forms in even characteristic is analogous to the
  one in odd characteristic.
  
  --    If the dimension of U is zero, then (V,f) is the orthogonal direct sum
        of  hyperbolic lines, and hence (V,f) is isometric to the formed space
        (V,f'), with polynomial
  
  
             x_1 x_2 + \ldots + x_{n-1}x_n,
  
  
        which  is chosen as the canonical form. Note that the dimension of the
        vector  space  V  is  necessarily even. We call f [13Xhyperbolic[0m (see also
        Section  [14X3.1[0m). It follows also that in this similarity class, there is
        only one isometry class. The Witt index of f equals n/2.
  
  --    If  the  dimension  of  U is one, then necessarily the polynomial of f
        equals
  
  
             \mu x_1^2 + x_2 x_3 + \ldots + x_{n-1}x_n
  
  
        for  some  mu in F, and the dimension of the vector space V is odd. We
        call  f  [13Xparabolic[0m  (see  also  Section [14X3.1[0m). Since every element is a
        square in even characteristic, rescaling the first basis vector yields
        mu=1. The Witt index of f equals (n-1)/2.
  
  --    Suppose  at last that the dimension of U is two. We may suppose that U
        is  not  a hyperbolic line. It is not difficult to see that a suitable
        base change yields the polynomial
  
  
             d x_1^2 + x_1x_2 + x_2^2 + x_3 x_4 + \ldots + x_{n-1}x_n
  
  
        for  an  element of category 1, this is, an element d such that T(d)=1
        with  T  the  trace map from F to GF(2). Furthermore, an easy argument
        shows  that an appropriate base change allows to choose any element of
        category  1  for  d.  It follows also that the dimension of the vector
        space  V  is even. We call f [13Xelliptic[0m (see also Section [14X3.1[0m). The Witt
        index of f equals (n-2)/2.
  
  Hence,  non-degenerate  quadratic forms in even characteristic come in three
  similarity  classes,  which is analogous to the odd characteristic case, and
  each  similarity  class contains only one isometry class, which is different
  than in the odd characteristic case
  
  Suppose  that  f  is a degenerate quadratic form on the n-dimensional vector
  space  V,  then  Rad(f) is a non-trivial subspace of the vector space V. The
  vector  space  V can be written as the orthogonal direct sum of a subspace W
  and Rad(f), and the restriction of f to W is a non-degenerate quadratic form
  on  W.  Hence,  f  is  isometric with a quadratic form with one of the three
  above  polynomials.  The dimension of the maximal isotropic subspaces is the
  sum of the Witt index and the dimension of the radical.
  
  
  [1X5.3 Operations based on morphisms of forms[0X
  
  [1X5.3-1 BaseChangeToCanonical[0m
  
  [2X> BaseChangeToCanonical( [0X[3Xf[0X[2X ) ______________________________________[0Xattribute
  [6XReturns:[0X  a transition matrix [3Xb[0m from one basis to another
  
  The argument [3Xf[0m is a sesquilinear or quadratic form. For every isometry class
  of  forms, there is a canonical representative, as described in Section [14X5.1[0m.
  If  [3XM[0m  is  the  Gram  matrix  of  the  form  [3Xf[0m,  then this method returns an
  invertible matrix [3Xb[0m such that [3Xb * M * TransposedMat(b)[0m is the Gram matrix of
  the  canonical  representative.  That  is, [3Xb[0m is the [13Xtransition matrix[0m from a
  basis of the underlying vector space of [3Xf[0m to another basis.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> gf := GF(3);[0X
    [4XGF(3)[0X
    [4Xgap> gram := [[0X
    [4X> [0,0,0,1,0,0], [0X
    [4X> [0,0,0,0,1,0],[0X
    [4X> [0,0,0,0,0,1],[0X
    [4X> [-1,0,0,0,0,0],[0X
    [4X> [0,-1,0,0,0,0],[0X
    [4X> [0,0,-1,0,0,0]] * One(gf);;[0X
    [4Xgap> form := BilinearFormByMatrix( gram, gf );[0X
    [4X< bilinear form >[0X
    [4Xgap> b := BaseChangeToCanonical( form );;[0X
    [4Xgap> Display( b * gram * TransposedMat(b) );[0X
    [4X . 1 . . . .[0X
    [4X 2 . . . . .[0X
    [4X . . . 1 . .[0X
    [4X . . 2 . . .[0X
    [4X . . . . . 1[0X
    [4X . . . . 2 .[0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X5.3-2 BaseChangeHomomorphism[0m
  
  [2X> BaseChangeHomomorphism( [0X[3Xb, gf[0X[2X ) _________________________________[0Xoperation
  [6XReturns:[0X  the  inner  automorphism  of  GL(d,q) associated to the transition
            matrix [3Xb[0m.
  
  The  argument [3Xb[0m must be an invertible matrix of size d over the finite field
  [3Xgf[0m of order q. This method returns the inner automorphism of GL(d,q) induces
  by conjugation by b.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> gl:=GL(3,3);[0X
    [4XGL(3,3)[0X
    [4Xgap> go:=GO(3,3);[0X
    [4XGO(0,3,3)[0X
    [4Xgap> form := PreservedSesquilinearForms(go)[1]; [0X
    [4X< bilinear form >[0X
    [4Xgap> gram := GramMatrix( form );  [0X
    [4X[ [ 0*Z(3), Z(3), 0*Z(3) ], [ Z(3), 0*Z(3), 0*Z(3) ], [0X
    [4X  [ 0*Z(3), 0*Z(3), Z(3)^0 ] ][0X
    [4Xgap> b := BaseChangeToCanonical(form);;[0X
    [4Xgap> hom := BaseChangeHomomorphism(b, GF(3));[0X
    [4X^[ [ 0*Z(3), Z(3)^0, 0*Z(3) ], [ Z(3), Z(3), Z(3)^0 ], [0X
    [4X  [ Z(3)^0, Z(3), 0*Z(3) ] ][0X
    [4Xgap> newgo := Image(hom, go); [0X
    [4XGroup([0X
    [4X[ [ [ Z(3)^0, Z(3)^0, 0*Z(3) ], [ 0*Z(3), Z(3), 0*Z(3) ], [ Z(3), Z(3)^0,[0X
    [4X           Z(3) ] ], [0X
    [4X  [ [ Z(3)^0, Z(3), 0*Z(3) ], [ Z(3), Z(3), Z(3)^0 ], [ 0*Z(3), Z(3)^0,[0X
    [4X           0*Z(3) ] ] ])[0X
    [4Xgap> gens := GeneratorsOfGroup(newgo);;[0X
    [4Xgap> canonical := b * gram * TransposedMat(b);[0X
    [4X[ [ Z(3)^0, 0*Z(3), 0*Z(3) ], [ 0*Z(3), 0*Z(3), Z(3) ], [0X
    [4X  [ 0*Z(3), Z(3), 0*Z(3) ] ][0X
    [4Xgap> ForAll(gens, y -> y * canonical * TransposedMat(y) = canonical);[0X
    [4Xtrue[0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X5.3-3 IsometricCanonicalForm[0m
  
  [2X> IsometricCanonicalForm( [0X[3Xf[0X[2X ) _____________________________________[0Xattribute
  [6XReturns:[0X  the canonical form isometric to the sesquilinear or quadratic form
            [3Xf[0m.
  
  The argument [3Xf[0m is a sesquilinear or quadratic form. For every isometry class
  of  forms, there is a canonical representative, as described in Section [14X5.1[0m,
  which is the returned form.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> mat := [ [ Z(8) , 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], [0X
    [4X> [ 0*Z(2), Z(2)^0, Z(2^3)^5, 0*Z(2), 0*Z(2) ], [0X
    [4X> [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], [0X
    [4X> [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0 ], [0X
    [4X> [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ] ];;[0X
    [4Xgap> form := QuadraticFormByMatrix(mat,GF(8));[0X
    [4X< quadratic form >[0X
    [4Xgap> iso := IsometricCanonicalForm(form);[0X
    [4X< parabolic quadratic form >[0X
    [4Xgap> Display(form);[0X
    [4XParabolic quadratic form[0X
    [4XGram Matrix:[0X
    [4Xz = Z(8)[0X
    [4X z^1   .   .   .   .[0X
    [4X   .   1 z^5   .   .[0X
    [4X   .   .   .   .   .[0X
    [4X   .   .   .   .   1[0X
    [4X   .   .   .   .   .[0X
    [4XWitt Index: 2[0X
    [4Xgap> Display(iso);[0X
    [4XParabolic quadratic form[0X
    [4XGram Matrix:[0X
    [4X 1 . . . .[0X
    [4X . . 1 . .[0X
    [4X . . . . .[0X
    [4X . . . . 1[0X
    [4X . . . . .[0X
    [4XWitt Index: 2[0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X5.3-4 ScalarOfSimilarity[0m
  
  [2X> ScalarOfSimilarity( [0X[3XM, form[0X[2X ) ___________________________________[0Xoperation
  [6XReturns:[0X  a finite field element
  
  Recall  that  a  similarity  of  a  form  f on a vector space V, is a linear
  transformation g of V where there exists some nonzero scalar c such that for
  all v,w in V, f(u^g,v^g) = c f(u,v).
  
  This  operation finds for a particular matrix [3XM[0m, giving rise to a similarity
  of the sesquilinear form [3Xform[0m, the said scalar c.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> gram := [ [ 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3) ], [0X
    [4X>   [ Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3) ], [0X
    [4X>   [ 0*Z(3), 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3) ], [0X
    [4X>   [ 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3) ], [0X
    [4X>   [ 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3), Z(3)^0 ], [0X
    [4X>   [ 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3) ] ];;[0X
    [4Xgap> form := BilinearFormByMatrix( gram, GF(3) );[0X
    [4X< bilinear form >[0X
    [4Xgap> m := [ [ Z(3)^0, Z(3)^0, Z(3), 0*Z(3), Z(3)^0, Z(3) ], [0X
    [4X>   [ Z(3), Z(3), Z(3)^0, 0*Z(3), Z(3)^0, Z(3) ], [0X
    [4X>   [ 0*Z(3), Z(3), 0*Z(3), Z(3), 0*Z(3), 0*Z(3) ], [0X
    [4X>   [ 0*Z(3), Z(3), Z(3)^0, Z(3), Z(3), Z(3) ], [0X
    [4X>   [ Z(3)^0, Z(3)^0, Z(3), Z(3), Z(3)^0, Z(3)^0 ], [0X
    [4X>   [ Z(3)^0, 0*Z(3), Z(3), Z(3)^0, Z(3), Z(3) ] ];;[0X
    [4Xgap> ScalarOfSimilarity( m, form );[0X
    [4XZ(3)[0X
    [4X [0X
  [4X------------------------------------------------------------------[0X
  
  [1X5.3-5 WittIndex[0m
  
  [2X> WittIndex( [0X[3Xf[0X[2X ) __________________________________________________[0Xattribute
  [6XReturns:[0X  the Witt index of the form [3Xf[0m.
  
  The  argument  [3Xf[0m  is a sesquilinear or quadratic form. When [3Xf[0m is degenerate,
  its  Witt index is defined as the Witt index of its non-degenerate part, see
  Sections [14X3.1[0m and [14X3.2[0m.
  
  [1X5.3-6 IsEllipticForm[0m
  
  [2X> IsEllipticForm( [0X[3Xf[0X[2X ) ______________________________________________[0Xproperty
  [6XReturns:[0X  true or false.
  
  The  argument  [3Xf[0m is a sesquilinear or quadratic form. This operation returns
  [3Xtrue[0m  is and only if [3Xf[0m is elliptic; that is, it is orthogonal of minus type,
  or  in  other  words,  has  even  dimension  and non-maximal Witt index (see
  Section [14X5.1-3[0m for sesquilinear forms and Section [14X5.2[0m for quadratic forms).
  
  [1X5.3-7 IsParabolicForm[0m
  
  [2X> IsParabolicForm( [0X[3Xf[0X[2X ) _____________________________________________[0Xproperty
  [6XReturns:[0X  true or false.
  
  The  argument  [3Xf[0m is a sesquilinear or quadratic form. This operation returns
  [3Xtrue[0m  is  and  only  if [3Xf[0m is parabolic; that is, it is orthogonal of neutral
  type,  or  in  other  words,  it  has  odd  dimension (see Section [14X5.1-3[0m for
  sesquilinear forms and Section [14X5.2[0m for quadratic forms).
  
  [1X5.3-8 IsHyperbolicForm[0m
  
  [2X> IsHyperbolicForm( [0X[3Xf[0X[2X ) ___________________________________________[0Xattribute
  [6XReturns:[0X  true or false.
  
  The  argument  [3Xf[0m is a sesquilinear or quadratic form. This operation returns
  [3Xtrue[0m is and only if [3Xf[0m is hyperbolic; that is, it is orthogonal of plus type,
  or  in  other  words, has even dimension and maximal Witt index (see Section
  [14X5.1-3[0m for sesquilinear forms and Section [14X5.2[0m for quadratic forms).
  
