  
  [1X5 [33X[0;0YMorphisms of forms[133X[101X
  
  [33X[0;0YIn  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].[133X
  
  [33X[0;0YIn  this  chapter  we consider an [22Xn[122X-dimensional vector space [22XV[122X over a finite
  field.  Suppose that [22Xf[122X is a sesquilinear form or a quadratic form on [22XV[122X, then
  we call the pair [22X(V,f)[122X a [13Xformed vector space[113X.[133X
  
  
  [1X5.1 [33X[0;0YMorphisms of sesquilinear forms[133X[101X
  
  [33X[0;0YConsider  two  formed  vector  spaces [22X(V,f)[122X and [22X(W,g)[122X over the same field [22XF[122X,
  where  both  [22Xf[122X  and [22Xg[122X are sesquilinear forms. Suppose that [22Xϕ[122X is a linear map
  from  [22XV[122X  to  [22XW[122X.  The map [22Xϕ[122X is an [13Xisometry[113X from the formed space [22X(V,f)[122X to the
  formed space [22X(W,g)[122X if for all [22Xv,w ∈ V[122X we have[133X
  
  
  [24X[33X[0;6Yf(v,w) = f'(\phi(v), \phi(w)).[133X
  
  [124X
  
  [33X[0;0YThe  map  [22Xϕ[122X  is a [13Xsimilarity[113X from the formed space [22X(V,f)[122X to the formed space
  [22X(W,g)[122X if for all [22Xv,w ∈ V[122X we have[133X
  
  
  [24X[33X[0;6Yf(v,w) = \lambda f'(\phi(v), \phi(w)).[133X
  
  [124X
  
  [33X[0;0Yfor  some  non-zero  [22Xλ ∈ F[122X. Finally, the map [22Xϕ[122X is a [13Xsemi-similarity[113X from the
  formed space [22X(V,f)[122X to the formed space [22X(W,g)[122X if for all [22Xv,w[122X in [22XV[122X we have[133X
  
  
  [24X[33X[0;6Yf(v,w) = \lambda f'(\phi(v), \phi(w))^\alpha[133X
  
  [124X
  
  [33X[0;0Yfor some non-zero [22Xλ ∈ F[122X and a field automorphism [22Xα[122X of [22XF[122X.[133X
  
  [33X[0;0YOne  of  the objectives of studying maps between formed vector spaces is the
  classification  of  sesquilinear  forms  on  a  vector  space [22XV[122X, where it is
  sufficient  to classify non-degenerate forms. The following results are well
  known.[133X
  
  [33X[0;0YIt can be proved that (see for example Section 6.3 of [Cam00]):[133X
  
  [30X    [33X[0;6Yall  non-degenerate  alternating  forms of a given vector space over a
        given finite field are similar,[133X
  
  [30X    [33X[0;6Yall  non-degenerate  hermitian  forms  of  a given vector space over a
        given finite field are similar, and,[133X
  
  [30X    [33X[0;6Ythe  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.[133X
  
  [33X[0;0YIn  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.[133X
  
  [33X[0;0YGiven  a  sesquilinear  form  [22Xf[122X  over  a  vector  space  [22XV[122X,  [5XForms[105X  provides
  functionality   to   compute  the  linear  map  [22Xϕ[122X  from  [22XV[122X  to  itself  (or,
  equivalently,  a matrix describing a change of basis), such that [22Xf[122X 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[105X,
  and,  when  necessary, the different isometry classes, for each of the three
  reflexive  sesquilinear  forms.  The  easiest  cases  are  the hermitian and
  alternating cases.[133X
  
  
  [1X5.1-1 [33X[0;0YHermitian forms[133X[101X
  
  [33X[0;0YWe  suppose  that  [22Xf[122X  is a non-degenerate hermitian form on a vector space [22XV[122X
  over  the  finite  field  [22XF[122X, with involutory field automorphism [22Xα[122X. It can be
  proved  (see  [KL90])  that  any vector space equipped with a non-degenerate
  hermitian  form  [22Xf[122X  contains  an orthogonal basis such that [22Xf(e_i,e_i)=1[122X for
  each  basisvector  [22Xe_i[122X  .  Hence  [22X(V,f)[122X is isometric with [22X(V,f')[122X with [22Xf'[122X the
  non-degenerate  hermitian  form  with  the  identity matrix over [22XF[122X. The Witt
  index of [22Xf[122X equals [22Xn/2[122X when [22Xn[122X is even and [22X(n-1)/2[122X when [22Xn[122X is odd.[133X
  
  
  [1X5.1-2 [33X[0;0YAlternating forms[133X[101X
  
  [33X[0;0YWe  suppose that [22Xf[122X is a non-degenerate alternating bilinear form on a vector
  space  [22XV[122X  over  a  finite  field  [22XF[122X.  As  already  mentioned in Section [14X3.1[114X,
  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 [22Xf[122X must be[133X
  
  
  [24X[33X[0;6Y\left( \begin{array}{cc}0 & r \\ -r & 0 \end{array} \right)[133X
  
  [124X
  
  [33X[0;0Yfor  some  non-zero  [22Xr  ∈  F[122X.  If  we rescale one of the basisvectors, which
  induces  an isometry, then we see that there always exists a basis such that
  [22Xr=1[122X.  We  call a two dimensional vector space equipped with a non-degenerate
  alternating form a [13Xsymplectic hyperbolic line[113X, and it is proved (see Theorem
  6.7  of [Cam00]) that the formed space [22X(V,f)[122X 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[133X
  
  
  [24X[33X[0;6Y\left( \begin{array}{ccccccc} 0 & 1 & 0 & 0 & \ldots & 0 & 0 \\ -1 & 0 & 0 &
  0  &  \ldots  &  0 & 0 \\ 0 & 0 & 0 & 1 & \ldots & 0 & 0 \\ 0 & 0 & -1 & 0 &
  \ldots  &  0  &  0  \\ \vdots & \vdots & \vdots & \vdots & \ddots & \vdots &
  \vdots  \\ 0 & 0 & 0 & 0 & \ldots & 0 & 1 \\ 0 & 0 & 0 & 0 & \ldots & -1 & 0
  \\ \end{array} \right).[133X
  
  [124X
  
  [33X[0;0YThe Witt index of [22Xf[122X equals [22Xn/2[122X .[133X
  
  
  [1X5.1-3 [33X[0;0YBilinear forms[133X[101X
  
  [33X[0;0YWe  suppose  that  [22Xf[122X is a non-degenerate symmetric bilinear form on a vector
  space  [22XV[122X  over  a  finite  field  [22XF[122X  with  odd characteristic. We call a two
  dimensional  vector space a [13Xhyperbolic line[113X if it contains a non-zero vector
  [22Xv[122X  such  that [22Xf(v,v) = 0[122X. 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[133X
  
  
  [24X[33X[0;6Y\left( \begin{array}{cc}0 & 1 \\ 1 & 0 \end{array} \right).[133X
  
  [124X
  
  [33X[0;0YIt  can  be proved (see Theorem 6.10 of [Cam00]) that the formed space [22X(V,f)[122X
  can  be  written  as  the  orthogonal direct sum of hyperbolic lines and one
  subspace  [22XU[122X  of  dimension at most two. The behaviour of [22Xf[122X on the subspace [22XU[122X
  determines the similarity class of [22Xf[122X. We describe the three occurring cases,
  to describe the chosen canonical form, we use the polynomial rather than the
  Gram matrix.[133X
  
  [30X    [33X[0;6YIf the dimension of [22XU[122X is zero, then [22X(V,f)[122X is the orthogonal direct sum
        of  hyperbolic lines, and hence [22X(V,f)[122X is isometric to the formed space
        [22X(V,f')[122X,  where  the  Gram matrix of [22Xf'[122X consists of blocks as described
        above. The chosen canonical form has polynomial[133X
  
  
  [24X      [33X[0;6Yx_1 x_2 + \ldots + x_{n-1}x_n[133X
  
  [124X
  
  
  [24X      [33X[0;6Yx_1 x_2 + \ldots + x_{n-1}x_n[133X
  
  [124X
  
        [33X[0;6YNote  that the dimension of the vector space [22XV[122X is necessarily even. We
        call [22Xf[122X [13Xhyperbolic[113X (see also Section [14X3.1[114X). It follows also that in this
        similarity  class, there is only one isometry class. The Witt index of
        [22Xf[122X equals [22Xn/2[122X .[133X
  
  [30X    [33X[0;6YIf  the  dimension  of  [22XU[122X is one, then necessarily the polynomial of [22Xf[122X
        equals[133X
  
  
  [24X      [33X[0;6Y\mu x_1^2 + x_2 x_3 + \ldots + x_{n-1}x_n[133X
  
  [124X
  
        [33X[0;6Yfor  some  [22Xμ  ∈  F[122X, and the dimension of the vector space [22XV[122X is odd. We
        call  [22Xf[122X  [13Xparabolic[113X  (see also Section [14X3.1[114X). It is clear that if [22Xμ[122X is a
        square in [22XF[122X, then rescaling the first basis vector yields a polynomial[133X
  
  
  [24X      [33X[0;6Yx_1^2 + x_2 x_3 + \ldots + x_{n-1}x_n[133X
  
  [124X
  
        [33X[0;6Ywhich  we choose as the canonical form for this similarity class. If [22Xμ[122X
        is a non-square, a rescaling of [22Xx_2,x_4,...,x_n-1[122X yields a polynomial[133X
  
  
  [24X      [33X[0;6Y\mu (x_1^2 + x_2 x_3 + \ldots + x_{n-1}x_n)[133X
  
  [124X
  
        [33X[0;6Ywhich represents now a bilinear form that is [12Xsimilar but not isometric[112X
        to  the  given one. Hence, the parabolic similarity class contains two
        isometry classes. The Witt index of [22Xf[122X equals [22X(n-1)/2[122X .[133X
  
  [30X    [33X[0;6YSuppose  at last that the dimension of [22XU[122X is two. We may suppose that [22XU[122X
        is  not  a  hyperbolic  line.  It  is  not too difficult to see that a
        suitable base change yields the polynomial[133X
  
  
  [24X      [33X[0;6Y\mu x_1^2 + x_2^2 + x_3 x_4 + \ldots + x_{n-1}x_n[133X
  
  [124X
  
        [33X[0;6Yfor  a  non-square  [22Xμ  ∈ F[122X, and the dimension of the vector space [22XV[122X is
        even. We call [22Xf[122X [13Xelliptic[113X. The Witt index of [22Xf[122X equals [22X(n-2)/2[122X .[133X
  
  
  [1X5.1-4 [33X[0;0YDegenerate forms[133X[101X
  
  [33X[0;0YSuppose that [22Xf[122X is a degenerate sesquilinear form on the vector space [22XV[122X, then
  [22XRad(f)[122X  is  a non-trivial subspace of the vector space [22XV[122X. The vector space [22XV[122X
  can  be written as the orthogonal direct sum of a subspace [22XW[122X and [22XRad(f)[122X, and
  the restriction of [22Xf[122X to [22XW[122X is a non-degenerate sesquilinear form on [22XW[122X. Hence,
  [22Xf[122X is isometric with a sesquilinear form having Gram matrix[133X
  
  
  [24X[33X[0;6Y\left( \begin{array}{cc} M & A \\ B & C \end{array} \right)[133X
  
  [124X
  
  [33X[0;0Ywhere [22XM[122X is the Gram matrix of a non-degenerate sesquilinear form and [22XA,B[122X and
  [22XC[122X  are  appropriate  zero  matrices. As explained in Section [14X3.1[114X, the form [22Xf[122X
  induces  a  non-degenerate form [22Xg[122X on the vector space [22XV/Rad(f)[122X. The computed
  matrix  [22XM[122X  can be taken as Gram matrix for the form [22Xg[122X. As defined in Section
  [14X3.1[114X,  the  Witt  index  of  the  degenerate  form [22Xf[122X is the Witt index of the
  non-degenerate  inducedform  [22Xg[122X.  The  dimension  of  the  maximal  isotropic
  subspaces  with relation to [22Xf[122X is the sum of the Witt index and the dimension
  of the radical.[133X
  
  
  [1X5.2 [33X[0;0YMorphisms of quadratic forms[133X[101X
  
  [33X[0;0YConsider  two  formed  vector  spaces [22X(V,f)[122X and [22X(W,g)[122X over the same field [22XF[122X,
  where  both [22Xf[122X and [22Xg[122X are quadratic forms. Suppose that [22Xϕ[122X is a linear map from
  [22XV[122X  to  [22XW[122X. The map [22Xϕ[122X is an [13Xisometry[113X from the formed space [22X(V,f)[122X to the formed
  space [22X(W,g)[122X if for all [22Xv,w[122X in [22XV[122X we have[133X
  
  
  [24X[33X[0;6Yf(v) = f'(\phi(v)).[133X
  
  [124X
  
  [33X[0;0YThe  map  [22Xϕ[122X  is  a  [13Xsimilarity[113X from the formed space [22X(V,f)[122X to a formed space
  [22X(W,g)[122X if for all [22Xv,w[122X in [22XV[122X we have[133X
  
  
  [24X[33X[0;6Yf(v) = \lambda f'(\phi(v)).[133X
  
  [124X
  
  [33X[0;0Yfor  some  non-zero  [22Xλ ∈ F[122X. Finally, the map [22Xϕ[122X is a [13Xsemi-similarity[113X from the
  formed space [22X(V,f)[122X to the formed space [22X(W,g)[122X if for all [22Xv,w[122X in [22XV[122X we have[133X
  
  
  [24X[33X[0;6Yf(v)=\lambda f'(\phi(v))^\alpha[133X
  
  [124X
  
  [33X[0;0Yfor some non-zero [22Xλ ∈ F[122X and a field automorphism [22Xα[122X of [22XF[122X.[133X
  
  [33X[0;0YAlso  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 [22XV[122X, where it is sufficient to classify non-singular forms.[133X
  
  [33X[0;0YSince  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 [22Xf[122X is a quadratic form in even characteristic.
  We  call  a  two dimensional vector space a [13Xhyperbolic line[113X if it contains a
  non-zero  vector  such  that  [22Xf(v) = 0[122X. 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 [22Xx_1 x_2[122X . As in
  the  case  of  the  orthogonal bilinear forms, it can be proved (see Theorem
  6.10  of  [Cam00]) that [22X(V,f)[122X can be written as the orthogonal direct sum of
  hyperbolic  lines and one subspace [22XU[122X of dimension at most two. The behaviour
  of  [22Xf[122X  on  the  subspace  [22XU[122X  determines  the  similarity  class  of  [22Xf[122X.  The
  classification of quadratic forms in even characteristic is analogous to the
  one in odd characteristic.[133X
  
  [30X    [33X[0;6YIf the dimension of [22XU[122X is zero, then [22X(V,f)[122X is the orthogonal direct sum
        of  hyperbolic lines, and hence [22X(V,f)[122X is isometric to the formed space
        [22X(V,f')[122X, with polynomial[133X
  
  
  [24X      [33X[0;6Yx_1 x_2 + \ldots + x_{n-1}x_n,[133X
  
  [124X
  
        [33X[0;6Ywhich  is chosen as the canonical form. Note that the dimension of the
        vector  space  [22XV[122X  is  necessarily even. We call [22Xf[122X [13Xhyperbolic[113X (see also
        Section  [14X3.1[114X). It follows also that in this similarity class, there is
        only one isometry class. The Witt index of [22Xf[122X equals [22Xn/2[122X .[133X
  
  [30X    [33X[0;6YIf  the  dimension  of  [22XU[122X is one, then necessarily the polynomial of [22Xf[122X
        equals[133X
  
  
  [24X      [33X[0;6Y\mu x_1^2 + x_2 x_3 + \ldots + x_{n-1}x_n[133X
  
  [124X
  
        [33X[0;6Yfor  some  [22Xμ  ∈  F[122X, and the dimension of the vector space [22XV[122X is odd. We
        call  [22Xf[122X  [13Xparabolic[113X  (see  also  Section [14X3.1[114X). Since every element is a
        square in even characteristic, rescaling the first basis vector yields
        [22Xμ=1[122X The Witt index of [22Xf[122X equals [22X(n-1)/2[122X .[133X
  
  [30X    [33X[0;6YSuppose  at last that the dimension of [22XU[122X is two. We may suppose that [22XU[122X
        is  not  a hyperbolic line. It is not difficult to see that a suitable
        base change yields the polynomial[133X
  
  
  [24X      [33X[0;6Yd x_1^2 + x_1x_2 + x_2^2 + x_3 x_4 + \ldots + x_{n-1}x_n[133X
  
  [124X
  
        [33X[0;6Yfor  an element of category 1, this is, an element [22Xd[122X such that [22XTr(d)=1[122X
        with  [22XTr[122X the trace map from [22XF[122X to [22XGF(2)[122X . Furthermore, an easy argument
        shows  that an appropriate base change allows to choose any element of
        category  1  for  [22Xd[122X.  It follows also that the dimension of the vector
        space  [22XV[122X  is even. We call [22Xf[122X [13Xelliptic[113X (see also Section [14X3.1[114X). The Witt
        index of [22Xf[122X equals [22X(n-2)/2[122X .[133X
  
  [33X[0;0YHence,  non-singular  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[133X
  
  [33X[0;0YSuppose  that  [22Xf[122X  is  a  singular quadratic form on the [22Xn[122X-dimensional vector
  space  [22XV[122X,  then  [22XRad(f)[122X is a non-trivial subspace of the vector space [22XV[122X. The
  vector  space  [22XV[122X can be written as the orthogonal direct sum of a subspace [22XW[122X
  and  [22XRad(f)[122X,  and the restriction of [22Xf[122X to [22XW[122X is a non-singular quadratic form
  on  [22XW[122X.  Hence,  [22Xf[122X  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.[133X
  
  
  [1X5.2-1 [33X[0;0YSingular forms[133X[101X
  
  [33X[0;0YSuppose  that  [22Xf[122X  is  a  singular quadratic form on the vector space [22XV[122X, then
  [22XRad(f)[122X  is  a non-trivial subspace of the vector space [22XV[122X. The vector space [22XV[122X
  can  be written as the orthogonal direct sum of a subspace [22XW[122X and [22XRad(f)[122X, and
  the restriction of [22Xf[122X to [22XW[122X is a non-singular quadratic form on [22XW[122X. Hence, [22Xf[122X is
  isometric with a quadratic form having Gram matrix[133X
  
  
  [24X[33X[0;6Y\left( \begin{array}{cc} M & A \\ B & C \end{array} \right)[133X
  
  [124X
  
  [33X[0;0Ywhere  [22XM[122X  is  the Gram matrix of a non-singular quadratic form and [22XA,B[122X and [22XC[122X
  are  appropriate  zero  matrices.  As  explained  in Section [14X3.2[114X, the form [22Xf[122X
  induces  a  non-singular  form  [22Xg[122X on the vector space [22XV/Rad(f)[122X. The computed
  matrix  [22XM[122X  can be taken as Gram matrix for the form [22Xg[122X. As defined in Section
  [14X3.2[114X,  the  Witt  index  of  the  singular  form  [22Xf[122X  is the Witt index of the
  non-singular  induced  form  [22Xg[122X.  The  dimension  of  the  maximal  isotropic
  subspaces  with relation to [22Xf[122X is the sum of the Witt index and the dimension
  of the radical.[133X
  
  
  [1X5.3 [33X[0;0YOperations based on morphisms of forms[133X[101X
  
  [1X5.3-1 BaseChangeToCanonical[101X
  
  [33X[1;0Y[29X[2XBaseChangeToCanonical[102X( [3Xf[103X ) [32X attribute[133X
  [6XReturns:[106X  [33X[0;10Ya transition matrix [22Xb[122X from one basis to another[133X
  
  [33X[0;0YThe argument [3Xf[103X is a sesquilinear or quadratic form. For every isometry class
  of  forms, there is a canonical representative, as described in Section [14X5.1[114X.
  If  [22XM[122X  is  the  Gram  matrix  of  the  form  [3Xf[103X,  then this method returns an
  invertible   matrix   [22Xb[122X   such   that   [22Xb   M[122X   [10XTransposedMat[110X[22X(b)[122X   (or  [22Xb  M[122X
  [10XTransposedFrobeniusMat[110X[22X(b, q)[122X for suitable [22Xq[122X if [3Xf[103X is a hermitian form) is the
  Gram  matrix  of  the canonical representative. That is, [22Xb[122X is the [13Xtransition
  matrix[113X from a basis of the underlying vector space of [3Xf[103X to another basis.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xgf := GF(3);[127X[104X
    [4X[28XGF(3)[128X[104X
    [4X[25Xgap>[125X [27Xgram := [[127X[104X
    [4X[25X>[125X [27X[0,0,0,1,0,0], [127X[104X
    [4X[25X>[125X [27X[0,0,0,0,1,0],[127X[104X
    [4X[25X>[125X [27X[0,0,0,0,0,1],[127X[104X
    [4X[25X>[125X [27X[-1,0,0,0,0,0],[127X[104X
    [4X[25X>[125X [27X[0,-1,0,0,0,0],[127X[104X
    [4X[25X>[125X [27X[0,0,-1,0,0,0]] * One(gf);;[127X[104X
    [4X[25Xgap>[125X [27Xform := BilinearFormByMatrix( gram, gf );[127X[104X
    [4X[28X< bilinear form >[128X[104X
    [4X[25Xgap>[125X [27Xb := BaseChangeToCanonical( form );;[127X[104X
    [4X[25Xgap>[125X [27XDisplay( b * gram * TransposedMat(b) );[127X[104X
    [4X[28X . 1 . . . .[128X[104X
    [4X[28X 2 . . . . .[128X[104X
    [4X[28X . . . 1 . .[128X[104X
    [4X[28X . . 2 . . .[128X[104X
    [4X[28X . . . . . 1[128X[104X
    [4X[28X . . . . 2 . [128X[104X
  [4X[32X[104X
  
  [1X5.3-2 BaseChangeHomomorphism[101X
  
  [33X[1;0Y[29X[2XBaseChangeHomomorphism[102X( [3Xb[103X, [3Xgf[103X ) [32X operation[133X
  [6XReturns:[106X  [33X[0;10Ythe  inner  automorphism  of  [22XGL(d,q)[122X associated to the transition
            matrix [3Xb[103X.[133X
  
  [33X[0;0YThe  argument [3Xb[103X must be an invertible matrix of size [22Xd[122X over the finite field
  [3Xgf[103X of order [22Xq[122X. This method returns the inner automorphism of [22XGL(d,q)[122X induces
  by conjugation by [22Xb[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xgl:=GL(3,3);[127X[104X
    [4X[28XGL(3,3)[128X[104X
    [4X[25Xgap>[125X [27Xgo:=GO(3,3);[127X[104X
    [4X[28XGO(0,3,3)[128X[104X
    [4X[25Xgap>[125X [27Xform := PreservedSesquilinearForms(go)[1]; [127X[104X
    [4X[28X< bilinear form >[128X[104X
    [4X[25Xgap>[125X [27Xgram := GramMatrix( form );  [127X[104X
    [4X[28X[ [ 0*Z(3), Z(3), 0*Z(3) ], [ Z(3), 0*Z(3), 0*Z(3) ], [128X[104X
    [4X[28X  [ 0*Z(3), 0*Z(3), Z(3)^0 ] ][128X[104X
    [4X[25Xgap>[125X [27Xb := BaseChangeToCanonical(form);;[127X[104X
    [4X[25Xgap>[125X [27Xhom := BaseChangeHomomorphism(b, GF(3));[127X[104X
    [4X[28X^[ [ 0*Z(3), Z(3)^0, 0*Z(3) ], [ Z(3), Z(3), Z(3)^0 ], [128X[104X
    [4X[28X  [ Z(3)^0, Z(3), 0*Z(3) ] ][128X[104X
    [4X[25Xgap>[125X [27Xnewgo := Image(hom, go); [127X[104X
    [4X[28XGroup([128X[104X
    [4X[28X[ [128X[104X
    [4X[28X  [ [ Z(3)^0, Z(3)^0, 0*Z(3) ], [ 0*Z(3), Z(3), 0*Z(3) ], [128X[104X
    [4X[28X      [ Z(3), Z(3)^0, Z(3) ] ], [128X[104X
    [4X[28X  [ [ Z(3)^0, Z(3), 0*Z(3) ], [ Z(3), Z(3), Z(3)^0 ], [128X[104X
    [4X[28X      [ 0*Z(3), Z(3)^0, 0*Z(3) ] ] ])[128X[104X
    [4X[25Xgap>[125X [27Xgens := GeneratorsOfGroup(newgo);;[127X[104X
    [4X[25Xgap>[125X [27Xcanonical := b * gram * TransposedMat(b);[127X[104X
    [4X[28X[ [ Z(3)^0, 0*Z(3), 0*Z(3) ], [ 0*Z(3), 0*Z(3), Z(3) ], [128X[104X
    [4X[28X  [ 0*Z(3), Z(3), 0*Z(3) ] ][128X[104X
    [4X[25Xgap>[125X [27XForAll(gens, y -> y * canonical * TransposedMat(y) = canonical);[127X[104X
    [4X[28Xtrue [128X[104X
  [4X[32X[104X
  
  [1X5.3-3 IsometricCanonicalForm[101X
  
  [33X[1;0Y[29X[2XIsometricCanonicalForm[102X( [3Xf[103X ) [32X attribute[133X
  [6XReturns:[106X  [33X[0;10Ythe canonical form isometric to the sesquilinear or quadratic form
            [3Xf[103X.[133X
  
  [33X[0;0YThe argument [3Xf[103X is a sesquilinear or quadratic form. For every isometry class
  of  forms, there is a canonical representative, as described in Section [14X5.1[114X,
  which is the returned form.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xmat := [ [ Z(8) , 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], [127X[104X
    [4X[25X>[125X [27X[ 0*Z(2), Z(2)^0, Z(2^3)^5, 0*Z(2), 0*Z(2) ], [127X[104X
    [4X[25X>[125X [27X[ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], [127X[104X
    [4X[25X>[125X [27X[ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0 ], [127X[104X
    [4X[25X>[125X [27X[ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ] ];;[127X[104X
    [4X[25Xgap>[125X [27Xform := QuadraticFormByMatrix(mat,GF(8));[127X[104X
    [4X[28X< quadratic form >[128X[104X
    [4X[25Xgap>[125X [27Xiso := IsometricCanonicalForm(form);[127X[104X
    [4X[28X< parabolic quadratic form >[128X[104X
    [4X[25Xgap>[125X [27XDisplay(form);[127X[104X
    [4X[28XParabolic quadratic form[128X[104X
    [4X[28XGram Matrix:[128X[104X
    [4X[28Xz = Z(8)[128X[104X
    [4X[28X z^1   .   .   .   .[128X[104X
    [4X[28X   .   1 z^5   .   .[128X[104X
    [4X[28X   .   .   .   .   .[128X[104X
    [4X[28X   .   .   .   .   1[128X[104X
    [4X[28X   .   .   .   .   .[128X[104X
    [4X[28XWitt Index: 2[128X[104X
    [4X[25Xgap>[125X [27XDisplay(iso);[127X[104X
    [4X[28XParabolic quadratic form[128X[104X
    [4X[28XGram Matrix:[128X[104X
    [4X[28X 1 . . . .[128X[104X
    [4X[28X . . 1 . .[128X[104X
    [4X[28X . . . . .[128X[104X
    [4X[28X . . . . 1[128X[104X
    [4X[28X . . . . .[128X[104X
    [4X[28XWitt Index: 2 [128X[104X
  [4X[32X[104X
  
  [1X5.3-4 ScalarOfSimilarity[101X
  
  [33X[1;0Y[29X[2XScalarOfSimilarity[102X( [3XM[103X, [3Xform[103X ) [32X operation[133X
  [6XReturns:[106X  [33X[0;10Ya finite field element[133X
  
  [33X[0;0YRecall  that  a  similarity  of  a  form  [22Xf[122X on a vector space [22XV[122X, is a linear
  transformation [22Xg[122X of [22XV[122X where there exists some nonzero scalar [22Xc[122X such that for
  all [22Xv,w[122X in [22XV[122X,[133X
  
  
  [24X[33X[0;6Yf(u^g,v^g) = c f(u,v).[133X
  
  [124X
  
  [33X[0;0YThis  operation finds for a particular matrix [3XM[103X, giving rise to a similarity
  of the sesquilinear form [3Xform[103X, the said scalar [22Xc[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xgram := [ [ 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3) ], [127X[104X
    [4X[25X>[125X [27X  [ Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3) ], [127X[104X
    [4X[25X>[125X [27X  [ 0*Z(3), 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3) ], [127X[104X
    [4X[25X>[125X [27X  [ 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3) ], [127X[104X
    [4X[25X>[125X [27X  [ 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3), Z(3)^0 ], [127X[104X
    [4X[25X>[125X [27X  [ 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3) ] ];;[127X[104X
    [4X[25Xgap>[125X [27Xform := BilinearFormByMatrix( gram, GF(3) );[127X[104X
    [4X[28X< bilinear form >[128X[104X
    [4X[25Xgap>[125X [27Xm := [ [ Z(3)^0, Z(3)^0, Z(3), 0*Z(3), Z(3)^0, Z(3) ], [127X[104X
    [4X[25X>[125X [27X  [ Z(3), Z(3), Z(3)^0, 0*Z(3), Z(3)^0, Z(3) ], [127X[104X
    [4X[25X>[125X [27X  [ 0*Z(3), Z(3), 0*Z(3), Z(3), 0*Z(3), 0*Z(3) ], [127X[104X
    [4X[25X>[125X [27X  [ 0*Z(3), Z(3), Z(3)^0, Z(3), Z(3), Z(3) ], [127X[104X
    [4X[25X>[125X [27X  [ Z(3)^0, Z(3)^0, Z(3), Z(3), Z(3)^0, Z(3)^0 ], [127X[104X
    [4X[25X>[125X [27X  [ Z(3)^0, 0*Z(3), Z(3), Z(3)^0, Z(3), Z(3) ] ];;[127X[104X
    [4X[25Xgap>[125X [27XScalarOfSimilarity( m, form );[127X[104X
    [4X[28XZ(3)[128X[104X
    [4X[28X [128X[104X
  [4X[32X[104X
  
  [1X5.3-5 WittIndex[101X
  
  [33X[1;0Y[29X[2XWittIndex[102X( [3Xf[103X ) [32X attribute[133X
  [6XReturns:[106X  [33X[0;10Ythe Witt index of the form [3Xf[103X.[133X
  
  [33X[0;0YThe  argument  [3Xf[103X  is a sesquilinear or quadratic form on the vector space [22XV[122X.
  When  [3Xf[103X  is  degenerate, respectively singular, its Witt index is defined as
  the Witt index of the induced non-degenerate, respectively non-singular form
  on the vector space [22XV/Rad(f)[122X, see Sections [14X3.1[114X and [14X3.2[114X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xmat := [[0,0,1,0,0],[0,0,0,0,0],[-1,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0]]*Z(7)^0;[127X[104X
    [4X[28X[ [ 0*Z(7), 0*Z(7), Z(7)^0, 0*Z(7), 0*Z(7) ], [128X[104X
    [4X[28X  [ 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7) ], [128X[104X
    [4X[28X  [ Z(7)^3, 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7) ], [128X[104X
    [4X[28X  [ 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7) ], [128X[104X
    [4X[28X  [ 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7) ] ][128X[104X
    [4X[25Xgap>[125X [27Xform := BilinearFormByMatrix(mat,GF(7));[127X[104X
    [4X[28X< bilinear form >[128X[104X
    [4X[25Xgap>[125X [27XWittIndex(form);[127X[104X
    [4X[28X1[128X[104X
    [4X[25Xgap>[125X [27XRadicalOfForm(form);[127X[104X
    [4X[28X<vector space over GF(7), with 3 generators>[128X[104X
    [4X[25Xgap>[125X [27XDimension(last);[127X[104X
    [4X[28X3[128X[104X
    [4X[25Xgap>[125X [27Xmat := IdentityMat(6,GF(5));[127X[104X
    [4X[28X[ [ Z(5)^0, 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5) ], [128X[104X
    [4X[28X  [ 0*Z(5), Z(5)^0, 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5) ], [128X[104X
    [4X[28X  [ 0*Z(5), 0*Z(5), Z(5)^0, 0*Z(5), 0*Z(5), 0*Z(5) ], [128X[104X
    [4X[28X  [ 0*Z(5), 0*Z(5), 0*Z(5), Z(5)^0, 0*Z(5), 0*Z(5) ], [128X[104X
    [4X[28X  [ 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5), Z(5)^0, 0*Z(5) ], [128X[104X
    [4X[28X  [ 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5), Z(5)^0 ] ][128X[104X
    [4X[25Xgap>[125X [27Xform := QuadraticFormByMatrix(mat,GF(5));[127X[104X
    [4X[28X< quadratic form >[128X[104X
    [4X[25Xgap>[125X [27XWittIndex(form);[127X[104X
    [4X[28X3[128X[104X
    [4X[25Xgap>[125X [27Xmat := IdentityMat(6,GF(7));[127X[104X
    [4X[28X[ [ Z(7)^0, 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7) ], [128X[104X
    [4X[28X  [ 0*Z(7), Z(7)^0, 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7) ], [128X[104X
    [4X[28X  [ 0*Z(7), 0*Z(7), Z(7)^0, 0*Z(7), 0*Z(7), 0*Z(7) ], [128X[104X
    [4X[28X  [ 0*Z(7), 0*Z(7), 0*Z(7), Z(7)^0, 0*Z(7), 0*Z(7) ], [128X[104X
    [4X[28X  [ 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7), Z(7)^0, 0*Z(7) ], [128X[104X
    [4X[28X  [ 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7), Z(7)^0 ] ][128X[104X
    [4X[25Xgap>[125X [27Xform := QuadraticFormByMatrix(mat,GF(7));[127X[104X
    [4X[28X< quadratic form >[128X[104X
    [4X[25Xgap>[125X [27XWittIndex(form);[127X[104X
    [4X[28X2[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X5.3-6 IsEllipticForm[101X
  
  [33X[1;0Y[29X[2XIsEllipticForm[102X( [3Xf[103X ) [32X property[133X
  [6XReturns:[106X  [33X[0;10Ytrue or false.[133X
  
  [33X[0;0YThe  argument  [3Xf[103X  is a sesquilinear or quadratic form on the vector space [22XV[122X.
  This  operation  returns  [3Xtrue[103X  is and only if [3Xf[103X 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[114X for sesquilinear forms and Section
  [14X5.2[114X  for  quadratic  forms). If [3Xf[103X is degenerate, respectively singular, then
  this   operation   refers   to   the   inuced  non-degenerate,  respectively
  non-singular form induced on the vector space [22XV/Rad(f)[122X.[133X
  
  [1X5.3-7 IsParabolicForm[101X
  
  [33X[1;0Y[29X[2XIsParabolicForm[102X( [3Xf[103X ) [32X property[133X
  [6XReturns:[106X  [33X[0;10Ytrue or false.[133X
  
  [33X[0;0YThe  argument  [3Xf[103X  is a sesquilinear or quadratic form on the vector space [22XV[122X.
  This  operation  returns  [3Xtrue[103X is and only if [3Xf[103X is parabolic; that is, it is
  orthogonal  of  neutral  type,  or in other words, it has odd dimension (see
  Section  [14X5.1-3[114X  for sesquilinear forms and Section [14X5.2[114X for quadratic forms).
  If [3Xf[103X is degenerate, respectively singular, then this operation refers to the
  inuced  non-degenerate, respectively non-singular form induced on the vector
  space [22XV/Rad(f)[122X.[133X
  
  [1X5.3-8 IsHyperbolicForm[101X
  
  [33X[1;0Y[29X[2XIsHyperbolicForm[102X( [3Xf[103X ) [32X attribute[133X
  [6XReturns:[106X  [33X[0;10Ytrue or false.[133X
  
  [33X[0;0YThe  argument  [3Xf[103X  is a sesquilinear or quadratic form on the vector space [22XV[122X.
  This  operation  returns [3Xtrue[103X is and only if [3Xf[103X 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[114X for sesquilinear forms and Section [14X5.2[114X for
  quadratic  forms).  If  [3Xf[103X  is  degenerate,  respectively singular, then this
  operation  refers  to  the  inuced non-degenerate, respectively non-singular
  form induced on the vector space [22XV/Rad(f)[122X.[133X
  
  [1X5.3-9 TypeOfForm[101X
  
  [33X[1;0Y[29X[2XTypeOfForm[102X( [3Xf[103X ) [32X operation[133X
  [6XReturns:[106X  [33X[0;10Ya number.[133X
  
  [33X[0;0YThe  argument  [3Xf[103X  is  a sesquilinear or quadratic form on the vector space [22XV[122X
  with    radical    [22XR[122X,    a   [22Xk[122X-dimensional   space.   Then   [3Xf[103X   induces   a
  non-degenerate/non-singular  form  [22Xg[122X  on  [22XV/R[122X.  When [22XR[122X is the trivial vector
  space, the form [22Xg[122X is just the given form [3Xf[103X. This operation returns[133X
  
  [30X    [33X[0;6Y0 when [22Xg[122X is symplecitc or parabolic;[133X
  
  [30X    [33X[0;6Y+1 when [22Xg[122X is hyperbolic;[133X
  
  [30X    [33X[0;6Y-1 when [22Xg[122X is elliptic;[133X
  
  [30X    [33X[0;6Y-1/2 when [22Xg[122X is hermitian in odd dimension;[133X
  
  [30X    [33X[0;6Y+1/2 when [22Xg[122X is hermitian in even dimension;[133X
  
  [30X    [33X[0;6Yan error message when [3Xf[103X is a pseudo form.[133X
  
  [33X[0;0YNote  that no method is installed for the trivial form. The methods for this
  operation  rely  on [11XIsParabolicForm[111X, [11XIsHyperbolicForm[111X and [11XIsEllipticForm[111X for
  orthogonal bilinear forms and quadratic forms.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xmat := [[0,0,0,-1],[0,0,3,0],[0,-3,0,0],[1,0,0,0]]*Z(25)^0;[127X[104X
    [4X[28X[ [ 0*Z(5), 0*Z(5), 0*Z(5), Z(5)^2 ], [ 0*Z(5), 0*Z(5), Z(5)^3, 0*Z(5) ], [128X[104X
    [4X[28X  [ 0*Z(5), Z(5), 0*Z(5), 0*Z(5) ], [ Z(5)^0, 0*Z(5), 0*Z(5), 0*Z(5) ] ][128X[104X
    [4X[25Xgap>[125X [27Xform := BilinearFormByMatrix(mat,GF(25));[127X[104X
    [4X[28X< bilinear form >[128X[104X
    [4X[25Xgap>[125X [27XIsDegenerateForm(form);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XTypeOfForm(form);[127X[104X
    [4X[28X0[128X[104X
    [4X[25Xgap>[125X [27Xmat := IdentityMat(3,GF(7));[127X[104X
    [4X[28X[ [ Z(7)^0, 0*Z(7), 0*Z(7) ], [ 0*Z(7), Z(7)^0, 0*Z(7) ], [128X[104X
    [4X[28X  [ 0*Z(7), 0*Z(7), Z(7)^0 ] ][128X[104X
    [4X[25Xgap>[125X [27Xform := QuadraticFormByMatrix(mat,GF(7));[127X[104X
    [4X[28X< quadratic form >[128X[104X
    [4X[25Xgap>[125X [27XIsSingularForm(form);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XTypeOfForm(form);[127X[104X
    [4X[28X0[128X[104X
    [4X[25Xgap>[125X [27Xmat := [[0,1,0,0],[-1,0,0,0],[0,0,0,0],[0,0,0,0]]*Z(5)^0;[127X[104X
    [4X[28X[ [ 0*Z(5), Z(5)^0, 0*Z(5), 0*Z(5) ], [ Z(5)^2, 0*Z(5), 0*Z(5), 0*Z(5) ], [128X[104X
    [4X[28X  [ 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5) ], [ 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5) ] ][128X[104X
    [4X[25Xgap>[125X [27Xform := BilinearFormByMatrix(mat,GF(5));[127X[104X
    [4X[28X< bilinear form >[128X[104X
    [4X[25Xgap>[125X [27XIsDegenerateForm(form);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XTypeOfForm(form);[127X[104X
    [4X[28X0[128X[104X
    [4X[25Xgap>[125X [27Xmat := [[1,0,0,0],[0,1,0,0],[0,0,0,1],[0,0,1,0]]*Z(7)^0;[127X[104X
    [4X[28X[ [ Z(7)^0, 0*Z(7), 0*Z(7), 0*Z(7) ], [ 0*Z(7), Z(7)^0, 0*Z(7), 0*Z(7) ], [128X[104X
    [4X[28X  [ 0*Z(7), 0*Z(7), 0*Z(7), Z(7)^0 ], [ 0*Z(7), 0*Z(7), Z(7)^0, 0*Z(7) ] ][128X[104X
    [4X[25Xgap>[125X [27Xform := BilinearFormByMatrix(mat,GF(7));[127X[104X
    [4X[28X< bilinear form >[128X[104X
    [4X[25Xgap>[125X [27XIsDegenerateForm(form);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XTypeOfForm(form);[127X[104X
    [4X[28X-1[128X[104X
    [4X[25Xgap>[125X [27Xmat := IdentityMat(3,GF(9));[127X[104X
    [4X[28X[ [ Z(3)^0, 0*Z(3), 0*Z(3) ], [ 0*Z(3), Z(3)^0, 0*Z(3) ], [128X[104X
    [4X[28X  [ 0*Z(3), 0*Z(3), Z(3)^0 ] ][128X[104X
    [4X[25Xgap>[125X [27Xform := HermitianFormByMatrix(mat,GF(9));[127X[104X
    [4X[28X< hermitian form >[128X[104X
    [4X[25Xgap>[125X [27XIsDegenerateForm(form);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XTypeOfForm(form);[127X[104X
    [4X[28X-1/2[128X[104X
    [4X[25Xgap>[125X [27Xmat := [[0,0,0,1],[0,1,0,0],[0,0,1,0],[1,0,0,0]]*Z(8)^0;[127X[104X
    [4X[28X[ [ 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0 ], [ 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2) ], [128X[104X
    [4X[28X  [ 0*Z(2), 0*Z(2), Z(2)^0, 0*Z(2) ], [ Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2) ] ][128X[104X
    [4X[25Xgap>[125X [27Xform := BilinearFormByMatrix(mat,GF(8));[127X[104X
    [4X[28X< bilinear form >[128X[104X
    [4X[25Xgap>[125X [27XIsDegenerateForm(form);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XTypeOfForm(form);[127X[104X
    [4X[28XError, <f> is a pseudo form and has no defined type called from[128X[104X
    [4X[28X<function "unknown">( <arguments> )[128X[104X
    [4X[28X called from read-eval loop at line 30 of *stdin*[128X[104X
    [4X[28Xyou can 'quit;' to quit to outer loop, or[128X[104X
    [4X[28Xyou can 'return;' to continue[128X[104X
    [4X[26Xbrk>[126X [27Xquit;[127X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
