This is A1BrouwerDegrees.info, produced by Macaulay2, version 1.25.11

A1BrouwerDegrees -- a package for working with A1-Brouwer degree computations and quadratic forms
*************************************************************************************************

Description
===========

This package is intended to allow the computation of local and global A1-Brouer
degrees in both the stable and unstable settings, and for manipulations of
unstable Grothendieck-Witt classes and symmetric bilinear forms including their
invariants and decompositions.

Version history:

  * V 1.1: this version was developed by N. Borisov, T. Brazelton, F. Espino,
    T. Hagedorn, Z. Han, J. Lopez Garcia, J. Louwsma, G. Ong, and A. Tawfeek.
    This version implements computations of local and global A1-Brouwer
    degrees, as well as Grothendieck-Witt classes and their invariants.
  * V 2.0: this version was developed by S. Atherton, S. Dutta, J. Lopez
    Garcia, J. Louwsma, Y. Luo, G. Ong, and R. Sagayaraj. This version
    implements the computation of unstable local and global A1-Brouwer degrees,
    manipulations of the unstable Grothendieck-Witt group, and generalizes
    several methods in V 1.1 for Grothendieck-Witt class manipulations over
    fields to the setting of finite étale algebras over fields.

The $\mathbb{A}^{1}$-Brouwer degree and its unstable counterpart are valued in
the Grothendieck-Witt ring and unstable Grothendieck-Group of a field
$\text{GW}(k)$ and $\text{GW}^{u}(k)$, respectively. These can be computed as
follows:

+---------------------------------+
|i1 : R = QQ[x];                  |
+---------------------------------+
|i2 : f = {x^4 - 6*x^2 - 7*x - 6};|
+---------------------------------+
|i3 : alpha = getGlobalA1Degree f |
|                                 |
|o3 = | -7 -6 0 1 |               |
|     | -6 0  1 0 |               |
|     | 0  1  0 0 |               |
|     | 1  0  0 0 |               |
|                                 |
|o3 : GrothendieckWittClass       |
+---------------------------------+

+----------------------------------------+
|i4 : K = frac R;                        |
+----------------------------------------+
|i5 : q = (x^2 + x - 2)/(3*x + 5);       |
+----------------------------------------+
|i6 : beta = getGlobalUnstableA1Degree(q)|
|                                        |
|o6 = (| 11 5 |, 8)                      |
|      | 5  3 |                          |
|                                        |
|o6 : UnstableGrothendieckWittClass      |
+----------------------------------------+

Furthermore, we can compute a number of invariants associated to symmetric
bilinear forms such as their Witt indices, integral discriminants,
and Hasse-Witt invariants,
at a fixed prime:

+------------------------------------+
|i7 : getWittIndex alpha             |
|                                    |
|o7 = 2                              |
+------------------------------------+
|i8 : getIntegralDiscriminant alpha  |
|                                    |
|o8 = 1                              |
+------------------------------------+
|i9 : getHasseWittInvariant(alpha, 3)|
|                                    |
|o9 = 1                              |
+------------------------------------+

Finally, we provide methods for verifying if two symmetric bilinear forms or
unstable Grothendieck-Witt classes are isomorphic, and
for computing simplified representatives, of these
objects.

+----------------------------------------------+
|i10 : getSumDecompositionString alpha         |
|                                              |
|o10 = 2H                                      |
+----------------------------------------------+
|i11 : twoH = makeDiagonalForm(QQ, (1,-1,1,-1))|
|                                              |
|o11 = | 1 0  0 0  |                           |
|      | 0 -1 0 0  |                           |
|      | 0 0  1 0  |                           |
|      | 0 0  0 -1 |                           |
|                                              |
|o11 : GrothendieckWittClass                   |
+----------------------------------------------+
|i12 : isIsomorphicForm(alpha, twoH)           |
|                                              |
|o12 = true                                    |
+----------------------------------------------+
+-----------------------------------------------------------+
|i13 : getSumDecomposition beta                             |
|                                                           |
|o13 = (| 11 0  |, 8)                                       |
|       | 0  22 |                                           |
|                                                           |
|o13 : UnstableGrothendieckWittClass                        |
+-----------------------------------------------------------+
|i14 : gamma = makeGWuClass(matrix(QQ, {{11, 0},{0,22}}), 8)|
|                                                           |
|o14 = (| 11 0  |, 8)                                       |
|       | 0  22 |                                           |
|                                                           |
|o14 : UnstableGrothendieckWittClass                        |
+-----------------------------------------------------------+
|i15 : isIsomorphicForm(beta, gamma)                        |
|                                                           |
|o15 = true                                                 |
+-----------------------------------------------------------+

Authors
=======

  * Stephanie Atherton <satherton@student.otis.edu>
  * Nikita Borisov (see https://www.math.upenn.edu/people/nikita-borisov )
    <nborisov@sas.upenn.edu>
  * Thomas Brazelton (see https://tbrazel.github.io/ )
    <brazelton@math.harvard.edu>
  * Somak Dutta <somakdutta@tamu.edu>
  * Frenly Espino (see https://www.math.upenn.edu/people/frenly-espino )
    <frenly@sas.upenn.edu>
  * Tom Hagedorn (see https://hagedorn.pages.tcnj.edu/ ) <hagedorn@tcnj.edu>
  * Zhaobo Han (see https://www.linkedin.com/in/zhaobo-han-77b1301a2/ )
    <zbtomhan@sas.upenn.edu>
  * Jordy Lopez Garcia (see https://jordylopez27.github.io/ )
    <jordy.lopez@tamu.edu>
  * Joel Louwsma (see https://www.joellouwsma.com/ ) <jlouwsma@niagara.edu>
  * Yuyuan Luo (see https://web.math.princeton.edu/~yl4428/ )
    <luo.yuyuan@princeton.edu>
  * Wern Juin Gabriel Ong (see https://wgabrielong.github.io/ )
    <wgabrielong@uni-bonn.de>
  * Ruzho Sagayaraj (see https://github.com/Ruzho-S ) <ruzhomath@tamu.edu>
  * Andrew Tawfeek (see https://www.atawfeek.com/ ) <atawfeek@uw.edu>

Certification a gold star
=========================

Version 1.1 of this package was accepted for publication in volume 14 (see
https://msp.org/jsag/2024/14-1/ ) of Journal of Software for Algebra and
Geometry (see https://msp.org/jsag/ ) on 2024-08-07, in the article
$\mathbb{A}^1$-Brouwer degrees in Macaulay2 (see
https://msp.org/jsag/2024/14-1/p15.xhtml ) (DOI: 10.2140/jsag.2024.14.175 (see
https://doi.org/10.2140/jsag.2024.14.175 )). That version can be obtained from
the journal (see https://msp.org/jsag/2024/14-1/jsag-v14-n1-x15-
A1BrouwerDegrees.zip ).

Version
=======

This documentation describes version 2.0 of A1BrouwerDegrees, released October
13, 2025.

Citation
========

If you have used this package in your research, please cite it as follows:

+-----------------------------------------------------------------------------+
|@misc{A1BrouwerDegreesSource,                                                |
|  title = {{A1BrouwerDegrees: for working with A1-Brouwer degree computations|
|  author = {Stephanie Atherton and Nikita Borisov and Thomas Brazelton and So|
|  howpublished = {A \emph{Macaulay2} package available at                    |
|    \url{https://github.com/Macaulay2/M2/tree/stable/M2/Macaulay2/packages}} |
|}                                                                            |
|                                                                             |
|@article{A1BrouwerDegreesArticle,                                            |
|  title = {{$\mathbb{A}^1$-Brouwer degrees in \emph{Macaulay2}}},            |
|  author = {Stephanie Atherton and Nikita Borisov and Thomas Brazelton and So|
|  journal = {Journal of Software for Algebra and Geometry},                  |
|  volume = {14},                                                             |
|  year = {2024},                                                             |
|}                                                                            |
|-----------------------------------------------------------------------------|
| and quadratic forms. Version~2.0}},                                         |
|mak Dutta and Frenly Espino and Tom Hagedorn and Zhaobo Han and Jordy Lopez  |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|mak Dutta and Frenly Espino and Tom Hagedorn and Zhaobo Han and Jordy Lopez  |
|-----------------------------------------------------------------------------|
|Garcia and Joel Louwsma and Yuyuan Luo and Wern Juin Gabriel Ong and Ruzho   |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|Garcia and Joel Louwsma and Yuyuan Luo and Wern Juin Gabriel Ong and Ruzho   |
|-----------------------------------------------------------------------------|
|Sagayaraj and Andrew Tawfeek},                                               |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|Sagayaraj and Andrew Tawfeek},                                               |
+-----------------------------------------------------------------------------+

Exports
=======

  * Types
      * GrothendieckWittClass -- a new type
        intended to capture the isomorphism class of an element of the
        Grothendieck-Witt ring of a field or finite étale algebras over a field
      * UnstableGrothendieckWittClass, --
        a new type intended to capture an element of the unstable
        Grothendieck-Witt group of a field or finite étale algebras over a
        field
  * Functions and commands
      * addGW -- the direct sum of two Grothendieck-Witt classes
      * addGWu -- the direct sum for  two unstable
        Grothendieck-Witt Classes
      * addGWuDivisorial -- the divisorial sum of
        local degrees of a rational function
      * diagonalizeViaCongruence, --
        diagonalizes a symmetric matrix via congruence
      * getAlgebra -- returns the algebra over which a
        stable or unstable Grothendieck-Witt class is defined
      * getAnisotropicDimension -- returns the
        anisotropic dimension of a symmetric bilinear form
      * getAnisotropicDimensionQQp, --
        returns the anisotropic dimension of a rational symmetric bilinear form
        over the p-adic rational numbers
      * getAnisotropicPart -- produces the
        anisotropic part of a Grothendieck-Witt class
      * getBaseField -- returns the base field of a stable
        or unstable Grothendieck-Witt class
      * getDiagonalClass -- produces a diagonalized
        form for any (unstable) Grothendieck-Witt class, with simplified terms
        on the diagonal
      * getDiagonalEntries -- extracts a list of
        diagonal entries for a GrothendieckWittClass
      * getGlobalA1Degree -- computes the global
        $\mathbb{A}^{1}$-Brouwer degree of a list of $n$ polynomials in $n$
        variables over a field $k$
      * getGlobalUnstableA1Degree -- computes
        the global unstable $\mathbb{A}^{1}$-Brouwer degree of a pointed
        rational function $f/g:\mathbb{P}^{1}_{k}\to\mathbb{P}^{1}_{k}$
      * getGWClass -- returns the Grothendieck-Witt class of
        the stable part of an unstable Grothendieck-Witt class
      * getHasseWittInvariant -- computes the
        Hasse-Witt invariant at a prime $p$ for the quadratic form of the
        Grothendieck-Witt class
      * getHilbertSymbol -- computes the Hilbert
        symbol of two rational numbers at a prime
      * getHilbertSymbolReal -- computes the
        Hilbert symbol of two rational numbers over the real numbers
      * getIntegralDiscriminant -- computes the
        integral discriminant for a rational symmetric bilinear form
      * getLocalA1Degree -- computes a local
        $\mathbb{A}^{1}$-Brouwer degree of a list of $n$ polynomials in $n$
        variables over a field $k$ at a prime ideal in the zero locus
      * getLocalAlgebraBasis -- produces a basis
        for a local finitely generated algebra over a field or finite étale
        algebra
      * getLocalUnstableA1Degree -- computes a
        local unstable $\mathbb{A}^{1}$-Brouwer degree of a pointed rational
        function $f/g:\mathbb{P}^{1}_{k}\to\mathbb{P}^{1}_{k}$ at a root
        $p\in\mathbb{P}^{1}_{k}$
      * getMatrix -- returns the Gram matrix of a stable or
        unstable Grothendieck-Witt class
      * getMultiplicationMatrix -- Computes the
        matrix over a $k$-basis for multiplication by an element in a finite
        dimensional $k$-algebra
      * getNorm -- Computes the norm over $k$ for an element in
        a finite dimensional $k$-algebra
      * getPadicValuation -- p-adic valuation of a
        rational number
      * getRank -- calculates the rank of a symmetric bilinear
        form
      * getRelevantPrimes -- outputs a list
        containing all primes $p$ where the Hasse-Witt invariant of a symmetric
        bilinear form is nontrivial
      * getScalar -- returns the non-zero scalar of an
        unstable Grothendieck-Witt class
      * getSignature -- computes the signature of a
        symmetric bilinear form over the real numbers or rational numbers
      * getSumDecomposition -- produces a
        simplified diagonal representative of a Grothendieck-Witt class or
        unstable Grothendieck-Witt class
      * getSumDecompositionString -- produces
        a simplified string representation of a Grothendieck-Witt class or
        unstable Grothendieck-Witt class
      * getTrace -- Computes the trace over $k$ for an element
        in a finite dimensional $k$ -algebra
      * getWittIndex -- returns the Witt index of a
        symmetric bilinear form
      * isAnisotropic -- determines whether a
        Grothendieck-Witt class is anisotropic
      * isIsomorphicForm -- determines whether two
        (unstable) Grothendieck-Witt classes over
        $\mathbb{C},\mathbb{R},\mathbb{Q}$ or a finite field of characteristic
        not 2 are isomorphic.
      * isIsotropic -- determines whether a
        Grothendieck-Witt class is isotropic
      * makeDiagonalForm -- the Grothendieck-Witt
        class of a diagonal form
      * makeDiagonalUnstableForm -- the
        unstable Grothendieck-Witt class of a diagonal matrix
      * makeGWClass -- the Grothendieck-Witt class of a
        symmetric matrix
      * makeGWuClass -- constructor for unstable
        Grothendieck-Witt classes
      * makeHyperbolicForm -- the Grothendieck-Witt
        class of a hyperbolic form
      * makeHyperbolicUnstableForm -- the
        unstable Grothendieck-Witt class of a hyperbolic form
      * makePfisterForm -- the Grothendieck-Witt class
        of a Pfister form
      * multiplyGW -- the tensor product of two
        Grothendieck-Witt classes
      * transferGW -- the transfer of Grothendieck-Witt from
        an étale algebras to a base field
  * Methods
      * "addGW(GrothendieckWittClass,GrothendieckWittClass)" -- see
        addGW, -- the direct sum of two Grothendieck-Witt classes
      * "addGWu(UnstableGrothendieckWittClass,UnstableGrothendieckWittClass)"
        -- see addGWu, -- the direct sum for  two unstable
        Grothendieck-Witt Classes
      * "addGWuDivisorial(List,List)" -- see addGWuDivisorial,
        -- the divisorial sum of local degrees of a rational
        function
      * "diagonalizeViaCongruence(Matrix)" -- see
        diagonalizeViaCongruence, -- diagonalizes a
        symmetric matrix via congruence
      * "getAlgebra(GrothendieckWittClass)" -- see getAlgebra,
        -- returns the algebra over which a stable or unstable
        Grothendieck-Witt class is defined
      * "getAlgebra(UnstableGrothendieckWittClass)" -- see getAlgebra,
        -- returns the algebra over which a stable or unstable
        Grothendieck-Witt class is defined
      * "getAnisotropicDimension(GrothendieckWittClass)" -- see
        getAnisotropicDimension, -- returns the
        anisotropic dimension of a symmetric bilinear form
      * "getAnisotropicDimension(Matrix)" -- see getAnisotropicDimension,
        -- returns the anisotropic dimension of a
        symmetric bilinear form
      * "getAnisotropicDimensionQQp(GrothendieckWittClass,ZZ)" -- see
        getAnisotropicDimensionQQp, -- returns the
        anisotropic dimension of a rational symmetric bilinear form over the
        p-adic rational numbers
      * "getAnisotropicPart(GrothendieckWittClass)" -- see
        getAnisotropicPart, -- produces the anisotropic
        part of a Grothendieck-Witt class
      * "getAnisotropicPart(Matrix)" -- see getAnisotropicPart,
        -- produces the anisotropic part of a
        Grothendieck-Witt class
      * "getBaseField(GrothendieckWittClass)" -- see getBaseField,
        -- returns the base field of a stable or unstable
        Grothendieck-Witt class
      * "getBaseField(UnstableGrothendieckWittClass)" -- see
        getBaseField, -- returns the base field of a stable or
        unstable Grothendieck-Witt class
      * "getDiagonalClass(GrothendieckWittClass)" -- see
        getDiagonalClass, -- produces a diagonalized form for
        any (unstable) Grothendieck-Witt class, with simplified terms on the
        diagonal
      * "getDiagonalClass(UnstableGrothendieckWittClass)" -- see
        getDiagonalClass, -- produces a diagonalized form for
        any (unstable) Grothendieck-Witt class, with simplified terms on the
        diagonal
      * "getDiagonalEntries(GrothendieckWittClass)" -- see
        getDiagonalEntries, -- extracts a list of diagonal
        entries for a GrothendieckWittClass
      * "getGlobalA1Degree(List)" -- see getGlobalA1Degree,
        -- computes the global $\mathbb{A}^{1}$-Brouwer
        degree of a list of $n$ polynomials in $n$ variables over a field $k$
      * "getGlobalUnstableA1Degree(RingElement)" -- see
        getGlobalUnstableA1Degree, -- computes the
        global unstable $\mathbb{A}^{1}$-Brouwer degree of a pointed rational
        function $f/g:\mathbb{P}^{1}_{k}\to\mathbb{P}^{1}_{k}$
      * "getGlobalUnstableA1Degree(RingElement,RingElement)" -- see
        getGlobalUnstableA1Degree, -- computes the
        global unstable $\mathbb{A}^{1}$-Brouwer degree of a pointed rational
        function $f/g:\mathbb{P}^{1}_{k}\to\mathbb{P}^{1}_{k}$
      * "getGWClass(UnstableGrothendieckWittClass)" -- see getGWClass,
        -- returns the Grothendieck-Witt class of the stable part
        of an unstable Grothendieck-Witt class
      * "getHasseWittInvariant(GrothendieckWittClass,ZZ)" -- see
        getHasseWittInvariant, -- computes the
        Hasse-Witt invariant at a prime $p$ for the quadratic form of the
        Grothendieck-Witt class
      * "getHasseWittInvariant(List,ZZ)" -- see getHasseWittInvariant,
        -- computes the Hasse-Witt invariant at a prime
        $p$ for the quadratic form of the Grothendieck-Witt class
      * "getHilbertSymbol(QQ,QQ,ZZ)" -- see getHilbertSymbol,
        -- computes the Hilbert symbol of two rational
        numbers at a prime
      * "getHilbertSymbol(QQ,ZZ,ZZ)" -- see getHilbertSymbol,
        -- computes the Hilbert symbol of two rational
        numbers at a prime
      * "getHilbertSymbol(ZZ,QQ,ZZ)" -- see getHilbertSymbol,
        -- computes the Hilbert symbol of two rational
        numbers at a prime
      * "getHilbertSymbol(ZZ,ZZ,ZZ)" -- see getHilbertSymbol,
        -- computes the Hilbert symbol of two rational
        numbers at a prime
      * "getHilbertSymbolReal(QQ,QQ)" -- see getHilbertSymbolReal,
        -- computes the Hilbert symbol of two rational
        numbers over the real numbers
      * "getHilbertSymbolReal(QQ,ZZ)" -- see getHilbertSymbolReal,
        -- computes the Hilbert symbol of two rational
        numbers over the real numbers
      * "getHilbertSymbolReal(ZZ,QQ)" -- see getHilbertSymbolReal,
        -- computes the Hilbert symbol of two rational
        numbers over the real numbers
      * "getHilbertSymbolReal(ZZ,ZZ)" -- see getHilbertSymbolReal,
        -- computes the Hilbert symbol of two rational
        numbers over the real numbers
      * "getIntegralDiscriminant(GrothendieckWittClass)" -- see
        getIntegralDiscriminant, -- computes the
        integral discriminant for a rational symmetric bilinear form
      * "getLocalA1Degree(List,Ideal)" -- see getLocalA1Degree,
        -- computes a local $\mathbb{A}^{1}$-Brouwer degree
        of a list of $n$ polynomials in $n$ variables over a field $k$ at a
        prime ideal in the zero locus
      * "getLocalAlgebraBasis(List,Ideal)" -- see getLocalAlgebraBasis,
        -- produces a basis for a local finitely
        generated algebra over a field or finite étale algebra
      * "getLocalUnstableA1Degree(RingElement,Number)" -- see
        getLocalUnstableA1Degree, -- computes a local
        unstable $\mathbb{A}^{1}$-Brouwer degree of a pointed rational function
        $f/g:\mathbb{P}^{1}_{k}\to\mathbb{P}^{1}_{k}$ at a root
        $p\in\mathbb{P}^{1}_{k}$
      * "getLocalUnstableA1Degree(RingElement,RingElement)" -- see
        getLocalUnstableA1Degree, -- computes a local
        unstable $\mathbb{A}^{1}$-Brouwer degree of a pointed rational function
        $f/g:\mathbb{P}^{1}_{k}\to\mathbb{P}^{1}_{k}$ at a root
        $p\in\mathbb{P}^{1}_{k}$
      * "getLocalUnstableA1Degree(RingElement,RingElement,Number)" -- see
        getLocalUnstableA1Degree, -- computes a local
        unstable $\mathbb{A}^{1}$-Brouwer degree of a pointed rational function
        $f/g:\mathbb{P}^{1}_{k}\to\mathbb{P}^{1}_{k}$ at a root
        $p\in\mathbb{P}^{1}_{k}$
      * "getLocalUnstableA1Degree(RingElement,RingElement,RingElement)" -- see
        getLocalUnstableA1Degree, -- computes a
        local unstable $\mathbb{A}^{1}$-Brouwer degree of a pointed rational
        function $f/g:\mathbb{P}^{1}_{k}\to\mathbb{P}^{1}_{k}$ at a root
        $p\in\mathbb{P}^{1}_{k}$
      * "getMatrix(GrothendieckWittClass)" -- see getMatrix,
        -- returns the Gram matrix of a stable or unstable Grothendieck-Witt
        class
      * "getMatrix(UnstableGrothendieckWittClass)" -- see getMatrix,
        -- returns the Gram matrix of a stable or unstable
        Grothendieck-Witt class
      * "getMultiplicationMatrix(Ring,Ideal,Thing)" -- see
        getMultiplicationMatrix, -- Computes the
        matrix over a $k$-basis for multiplication by an element in a finite
        dimensional $k$-algebra
      * "getMultiplicationMatrix(Ring,Thing)" -- see
        getMultiplicationMatrix, -- Computes the
        matrix over a $k$-basis for multiplication by an element in a finite
        dimensional $k$-algebra
      * "getNorm(Ring,Ideal,Thing)" -- see getNorm, -- Computes
        the norm over $k$ for an element in a finite dimensional $k$-algebra
      * "getNorm(Ring,Thing)" -- see getNorm, -- Computes the
        norm over $k$ for an element in a finite dimensional $k$-algebra
      * "getPadicValuation(QQ,ZZ)" -- see getPadicValuation,
        -- p-adic valuation of a rational number
      * "getPadicValuation(ZZ,ZZ)" -- see getPadicValuation,
        -- p-adic valuation of a rational number
      * "getRank(GrothendieckWittClass)" -- see getRank, --
        calculates the rank of a symmetric bilinear form
      * "getRank(Matrix)" -- see getRank, -- calculates the rank
        of a symmetric bilinear form
      * "getRelevantPrimes(GrothendieckWittClass)" -- see
        getRelevantPrimes, -- outputs a list containing all
        primes $p$ where the Hasse-Witt invariant of a symmetric bilinear form
        is nontrivial
      * "getScalar(UnstableGrothendieckWittClass)" -- see getScalar,
        -- returns the non-zero scalar of an unstable
        Grothendieck-Witt class
      * "getSignature(GrothendieckWittClass)" -- see getSignature,
        -- computes the signature of a symmetric bilinear form
        over the real numbers or rational numbers
      * "getSumDecomposition(GrothendieckWittClass)" -- see
        getSumDecomposition, -- produces a simplified
        diagonal representative of a Grothendieck-Witt class or unstable
        Grothendieck-Witt class
      * "getSumDecomposition(UnstableGrothendieckWittClass)" -- see
        getSumDecomposition, -- produces a simplified
        diagonal representative of a Grothendieck-Witt class or unstable
        Grothendieck-Witt class
      * "getSumDecompositionString(GrothendieckWittClass)" -- see
        getSumDecompositionString, -- produces a
        simplified string representation of a Grothendieck-Witt class or
        unstable Grothendieck-Witt class
      * "getSumDecompositionString(UnstableGrothendieckWittClass)" -- see
        getSumDecompositionString, -- produces a
        simplified string representation of a Grothendieck-Witt class or
        unstable Grothendieck-Witt class
      * "getTrace(Ring,Ideal,Thing)" -- see getTrace, --
        Computes the trace over $k$ for an element in a finite dimensional $k$
        -algebra
      * "getTrace(Ring,Thing)" -- see getTrace, -- Computes the
        trace over $k$ for an element in a finite dimensional $k$ -algebra
      * "getWittIndex(GrothendieckWittClass)" -- see getWittIndex,
        -- returns the Witt index of a symmetric bilinear form
      * "net(GrothendieckWittClass)" -- see GrothendieckWittClass,
        -- a new type intended to capture the
        isomorphism class of an element of the Grothendieck-Witt ring of a
        field or finite étale algebras over a field
      * "texMath(GrothendieckWittClass)" -- see GrothendieckWittClass,
        -- a new type intended to capture the
        isomorphism class of an element of the Grothendieck-Witt ring of a
        field or finite étale algebras over a field
      * "isAnisotropic(GrothendieckWittClass)" -- see isAnisotropic,
        -- determines whether a Grothendieck-Witt class is
        anisotropic
      * "isAnisotropic(Matrix)" -- see isAnisotropic, --
        determines whether a Grothendieck-Witt class is anisotropic
      * "isIsomorphicForm(GrothendieckWittClass,GrothendieckWittClass)" -- see
        isIsomorphicForm, -- determines whether two
        (unstable) Grothendieck-Witt classes over
        $\mathbb{C},\mathbb{R},\mathbb{Q}$ or a finite field of characteristic
        not 2 are isomorphic.
      * "isIsomorphicForm(Matrix,Matrix)" -- see isIsomorphicForm,
        -- determines whether two (unstable)
        Grothendieck-Witt classes over $\mathbb{C},\mathbb{R},\mathbb{Q}$ or a
        finite field of characteristic not 2 are isomorphic.
      * "isIsomorphicForm(UnstableGrothendieckWittClass,
        UnstableGrothendieckWittClass)" -- see isIsomorphicForm,
        -- determines whether two (unstable)
        Grothendieck-Witt classes over $\mathbb{C},\mathbb{R},\mathbb{Q}$ or a
        finite field of characteristic not 2 are isomorphic.
      * "isIsotropic(GrothendieckWittClass)" -- see isIsotropic,
        -- determines whether a Grothendieck-Witt class is
        isotropic
      * "isIsotropic(Matrix)" -- see isIsotropic, --
        determines whether a Grothendieck-Witt class is isotropic
      * "makeDiagonalForm(InexactFieldFamily,Number)" -- see
        makeDiagonalForm, -- the Grothendieck-Witt class of a
        diagonal form
      * "makeDiagonalForm(InexactFieldFamily,RingElement)" -- see
        makeDiagonalForm, -- the Grothendieck-Witt class of a
        diagonal form
      * "makeDiagonalForm(InexactFieldFamily,Sequence)" -- see
        makeDiagonalForm, -- the Grothendieck-Witt class of a
        diagonal form
      * "makeDiagonalForm(Ring,Number)" -- see makeDiagonalForm,
        -- the Grothendieck-Witt class of a diagonal form
      * "makeDiagonalForm(Ring,RingElement)" -- see makeDiagonalForm,
        -- the Grothendieck-Witt class of a diagonal form
      * "makeDiagonalForm(Ring,Sequence)" -- see makeDiagonalForm,
        -- the Grothendieck-Witt class of a diagonal form
      * "makeDiagonalUnstableForm(InexactFieldFamily,Number)" -- see
        makeDiagonalUnstableForm, -- the unstable
        Grothendieck-Witt class of a diagonal matrix
      * "makeDiagonalUnstableForm(InexactFieldFamily,RingElement)" -- see
        makeDiagonalUnstableForm, -- the unstable
        Grothendieck-Witt class of a diagonal matrix
      * "makeDiagonalUnstableForm(InexactFieldFamily,Sequence)" -- see
        makeDiagonalUnstableForm, -- the unstable
        Grothendieck-Witt class of a diagonal matrix
      * "makeDiagonalUnstableForm(Ring,Number)" -- see
        makeDiagonalUnstableForm, -- the unstable
        Grothendieck-Witt class of a diagonal matrix
      * "makeDiagonalUnstableForm(Ring,RingElement)" -- see
        makeDiagonalUnstableForm, -- the unstable
        Grothendieck-Witt class of a diagonal matrix
      * "makeDiagonalUnstableForm(Ring,Sequence)" -- see
        makeDiagonalUnstableForm, -- the unstable
        Grothendieck-Witt class of a diagonal matrix
      * "makeGWClass(Matrix)" -- see makeGWClass, -- the
        Grothendieck-Witt class of a symmetric matrix
      * "makeGWuClass(GrothendieckWittClass)" -- see makeGWuClass,
        -- constructor for unstable Grothendieck-Witt classes
      * "makeGWuClass(GrothendieckWittClass,Number)" -- see makeGWuClass,
        -- constructor for unstable Grothendieck-Witt classes
      * "makeGWuClass(GrothendieckWittClass,RingElement)" -- see
        makeGWuClass, -- constructor for unstable
        Grothendieck-Witt classes
      * "makeGWuClass(Matrix)" -- see makeGWuClass, --
        constructor for unstable Grothendieck-Witt classes
      * "makeGWuClass(Matrix,Number)" -- see makeGWuClass,
        -- constructor for unstable Grothendieck-Witt classes
      * "makeGWuClass(Matrix,RingElement)" -- see makeGWuClass,
        -- constructor for unstable Grothendieck-Witt classes
      * "makeHyperbolicForm(InexactFieldFamily)" -- see
        makeHyperbolicForm, -- the Grothendieck-Witt class
        of a hyperbolic form
      * "makeHyperbolicForm(InexactFieldFamily,ZZ)" -- see
        makeHyperbolicForm, -- the Grothendieck-Witt class
        of a hyperbolic form
      * "makeHyperbolicForm(Ring)" -- see makeHyperbolicForm,
        -- the Grothendieck-Witt class of a hyperbolic form
      * "makeHyperbolicForm(Ring,ZZ)" -- see makeHyperbolicForm,
        -- the Grothendieck-Witt class of a hyperbolic form
      * "makeHyperbolicUnstableForm(InexactFieldFamily)" -- see
        makeHyperbolicUnstableForm, -- the unstable
        Grothendieck-Witt class of a hyperbolic form
      * "makeHyperbolicUnstableForm(InexactFieldFamily,ZZ)" -- see
        makeHyperbolicUnstableForm, -- the unstable
        Grothendieck-Witt class of a hyperbolic form
      * "makeHyperbolicUnstableForm(Ring)" -- see
        makeHyperbolicUnstableForm, -- the unstable
        Grothendieck-Witt class of a hyperbolic form
      * "makeHyperbolicUnstableForm(Ring,ZZ)" -- see
        makeHyperbolicUnstableForm, -- the unstable
        Grothendieck-Witt class of a hyperbolic form
      * "makePfisterForm(InexactFieldFamily,Number)" -- see
        makePfisterForm, -- the Grothendieck-Witt class of a
        Pfister form
      * "makePfisterForm(InexactFieldFamily,RingElement)" -- see
        makePfisterForm, -- the Grothendieck-Witt class of a
        Pfister form
      * "makePfisterForm(InexactFieldFamily,Sequence)" -- see
        makePfisterForm, -- the Grothendieck-Witt class of a
        Pfister form
      * "makePfisterForm(Ring,Number)" -- see makePfisterForm,
        -- the Grothendieck-Witt class of a Pfister form
      * "makePfisterForm(Ring,RingElement)" -- see makePfisterForm,
        -- the Grothendieck-Witt class of a Pfister form
      * "makePfisterForm(Ring,Sequence)" -- see makePfisterForm,
        -- the Grothendieck-Witt class of a Pfister form
      * "multiplyGW(GrothendieckWittClass,GrothendieckWittClass)" -- see
        multiplyGW, -- the tensor product of two Grothendieck-Witt
        classes
      * "transferGW(GrothendieckWittClass)" -- see transferGW,
        -- the transfer of Grothendieck-Witt from an étale algebras
        to a base field
      * "net(UnstableGrothendieckWittClass)" -- see
        UnstableGrothendieckWittClass, -- a new
        type intended to capture an element of the unstable Grothendieck-Witt
        group of a field or finite étale algebras over a field
      * "texMath(UnstableGrothendieckWittClass)" -- see
        UnstableGrothendieckWittClass, -- a new
        type intended to capture an element of the unstable Grothendieck-Witt
        group of a field or finite étale algebras over a field
  * Symbols
      * linearTolerance (missing documentation)

For the programmer
==================

The object A1BrouwerDegrees, is a package (Macaulay2Doc),
defined in A1BrouwerDegrees.m2, with auxiliary files in
A1BrouwerDegrees/.

-------------------------------------------------------------------------------

The source of this document is in A1BrouwerDegrees.m2:260:0.

addGW -- the direct sum of two Grothendieck-Witt classes
********************************************************

  * Usage:
        addGW(beta1, beta2)
  * Inputs:
      * beta1, a Grothendieck-Witt Class, a
        Grothendieck-Witt class
      * beta2, a Grothendieck-Witt Class, a
        Grothendieck-Witt class
  * Outputs:
      * gamma, a Grothendieck-Witt Class, a
        Grothendieck-Witt class representing the direct sum of the two input
        classes

Description
===========

Given two GrothendieckWittClass objects beta1 and beta2, this method computes
the direct sum of the two classes, which is a new GrothendieckWittClass object
representing the isomorphism class of the direct sum of the two symmetric
bilinear forms represented by the input classes. The resulting class has a Gram
matrix which is the direct sum of the Gram matrices of the two input classes.

+--------------------------------------------------+
|i1 : R = QQ[x]/(x^2 + 1);                         |
+--------------------------------------------------+
|i2 : beta1 = makeGWClass matrix(R, {{1,2},{2,x}});|
+--------------------------------------------------+
|i3 : beta2 = makeGWClass matrix(R, {{3,4},{4,5}});|
+--------------------------------------------------+
|i4 : addGW(beta1, beta2)                          |
|                                                  |
|o4 = | 1 2 0 0 |                                  |
|     | 2 x 0 0 |                                  |
|     | 0 0 3 4 |                                  |
|     | 0 0 4 5 |                                  |
|                                                  |
|o4 : GrothendieckWittClass                        |
+--------------------------------------------------+

See also
========

  * GrothendieckWittClass -- a new type intended
    to capture the isomorphism class of an element of the Grothendieck-Witt
    ring of a field or finite étale algebras over a field
  * makeGWClass -- the Grothendieck-Witt class of a
    symmetric matrix
  * multiplyGW -- the tensor product of two
    Grothendieck-Witt classes

Ways to use addGW:
==================

  * "addGW(GrothendieckWittClass,GrothendieckWittClass)"

For the programmer
==================

The object addGW, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in
A1BrouwerDegrees/Documentation/GrothendieckWittClassesDoc.m2:117:0.

addGWu -- the direct sum for  two unstable Grothendieck-Witt Classes
********************************************************************

  * Usage:
        addGWu(beta, gamma)
  * Inputs:
      * beta, an Unstable Grothendieck-Witt Class,
        the isomorphism class of a
        non-degenerate symmetric bilinear form represented by a matrix M
        together with a scalar s
      * gamma, an Unstable Grothendieck-Witt Class,
        the isomorphism class of a
        non-degenerate symmetric bilinear form represented by a matrix N
        together with a scalar t
  * Outputs:
      * an Unstable Grothendieck-Witt Class,
        the isomorphism class of the direct sum
        of the bilinear forms represented by the matrices M  and N, and the
        scalar is the product st

Description
===========

This computes the direct sum of the Grothendieck-Witt classes beta and gamma.

+----------------------------------+
|i1 : M = matrix(QQ, {{2,1},{1,2}})|
|                                  |
|o1 = | 2 1 |                      |
|     | 1 2 |                      |
|                                  |
|              2       2           |
|o1 : Matrix QQ  <-- QQ            |
+----------------------------------+
|i2 : N = matrix(QQ, {{1,2},{2,6}})|
|                                  |
|o2 = | 1 2 |                      |
|     | 2 6 |                      |
|                                  |
|              2       2           |
|o2 : Matrix QQ  <-- QQ            |
+----------------------------------+
|i3 : beta = makeGWuClass M        |
|                                  |
|o3 = (| 2 1 |, 3)                 |
|      | 1 2 |                     |
|                                  |
|o3 : UnstableGrothendieckWittClass|
+----------------------------------+
|i4 : gamma = makeGWuClass N       |
|                                  |
|o4 = (| 1 2 |, 2)                 |
|      | 2 6 |                     |
|                                  |
|o4 : UnstableGrothendieckWittClass|
+----------------------------------+
|i5 : addGWu(beta, gamma)          |
|                                  |
|o5 = (| 2 1 0 0 |, 6)             |
|      | 1 2 0 0 |                 |
|      | 0 0 1 2 |                 |
|      | 0 0 2 6 |                 |
|                                  |
|o5 : UnstableGrothendieckWittClass|
+----------------------------------+

Ways to use addGWu:
===================

  * "addGWu(UnstableGrothendieckWittClass,UnstableGrothendieckWittClass)"

For the programmer
==================

The object addGWu, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in
A1BrouwerDegrees/Documentation/UnstableGrothendieckWittClassesDoc.m2:278:0.

addGWuDivisorial -- the divisorial sum of local degrees of a rational function
******************************************************************************

  * Usage:
        addGWuDivisorial(L1, L2)
  * Inputs:
      * L1, a list (Macaulay2Doc), a list of unstable
        Grothendieck-Witt classes representing unstable local degrees
      * L2, a list (Macaulay2Doc), a list of elements of the base
        field corresponding to the roots at which the unstable local degrees of
        L1 are computed
  * Outputs:
      * an Unstable Grothendieck-Witt Class,
        the unstable Grothendieck-Witt class
        representing the divisorial sum of the local degrees with respect to
        the divisor determined by L2

Description
===========

Let $f/g:\mathbb{P}^{1}_{k}\to\mathbb{P}^{1}_{k}$ be a pointed rational
function with zeroes $\{r_{1},\dots,r_{n}\}$ and
$\{\beta_{1},\dots,\beta_{n}\}$ the unstable local $\mathbb{A}^{1}$-degrees at
the $r_{i}$. The unstable global $\mathbb{A}^{1}$-degree of the rational
function is not computed as the addGWu, of the local unstable
degrees, but as the divisorial sum [I+24].

The following example computes the divisorial sum of the rational function
$\frac{x^{2}+x-2}{3x+5}$ over $\mathbb{Q}$ where the lists of unstable
Grothendieck-Witt classes are given by $\{(\langle \frac{1}{3}\rangle,
\frac{1}{3}), (\langle \frac{8}{3}\rangle, \frac{8}{3})\}$ and $\{-2, 1\}$.

+---------------------------------------------+
|i1 : M1 = matrix(QQ, {{1/3}})                |
|                                             |
|o1 = | 1/3 |                                 |
|                                             |
|              1       1                      |
|o1 : Matrix QQ  <-- QQ                       |
+---------------------------------------------+
|i2 : alpha = makeGWuClass(M1)                |
|                                             |
|               1                             |
|o2 = (| 1/3 |, -)                            |
|               3                             |
|                                             |
|o2 : UnstableGrothendieckWittClass           |
+---------------------------------------------+
|i3 : M2 = matrix(QQ, {{8/3}})                |
|                                             |
|o3 = | 8/3 |                                 |
|                                             |
|              1       1                      |
|o3 : Matrix QQ  <-- QQ                       |
+---------------------------------------------+
|i4 : beta = makeGWuClass(M2)                 |
|                                             |
|               8                             |
|o4 = (| 8/3 |, -)                            |
|               3                             |
|                                             |
|o4 : UnstableGrothendieckWittClass           |
+---------------------------------------------+
|i5 : addGWuDivisorial({alpha, beta}, {-2, 1})|
|                                             |
|o5 = (| 1/3 0   |, 8)                        |
|      | 0   8/3 |                            |
|                                             |
|o5 : UnstableGrothendieckWittClass           |
+---------------------------------------------+

References
==========

[I+24] J. Igieobo, et. al., "Motivic configurations on the line," arXiv:
2411.15347, 2024.

See also
========

  * UnstableGrothendieckWittClass -- a
    new type intended to capture an element of the unstable Grothendieck-Witt
    group of a field or finite étale algebras over a field
  * getGlobalUnstableA1Degree -- computes the
    global unstable $\mathbb{A}^{1}$-Brouwer degree of a pointed rational
    function $f/g:\mathbb{P}^{1}_{k}\to\mathbb{P}^{1}_{k}$
  * getLocalUnstableA1Degree -- computes a
    local unstable $\mathbb{A}^{1}$-Brouwer degree of a pointed rational
    function $f/g:\mathbb{P}^{1}_{k}\to\mathbb{P}^{1}_{k}$ at a root
    $p\in\mathbb{P}^{1}_{k}$

Ways to use addGWuDivisorial:
=============================

  * "addGWuDivisorial(List,List)"

For the programmer
==================

The object addGWuDivisorial, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in
A1BrouwerDegrees/Documentation/UnstableGrothendieckWittClassesDoc.m2:313:0.

diagonalizeViaCongruence -- diagonalizes a symmetric matrix via congruence
**************************************************************************

  * Usage:
        diagonalizeViaCongruence M
  * Inputs:
      * M, a matrix (Macaulay2Doc), a symmetric matrix over any
        field or finite étale algebras over a field
  * Outputs:
      * a matrix (Macaulay2Doc), a diagonal matrix congruent to M

Description
===========

Given a symmetric matrix M over any field or finite étale algebra over a field,
this command gives a diagonal matrix congruent to M. Note that the order in
which the diagonal terms appear is not specified.

+----------------------------------+
|i1 : R = QQ[x]/(x^2 - 1)          |
|                                  |
|o1 = R                            |
|                                  |
|o1 : QuotientRing                 |
+----------------------------------+
|i2 : M = matrix(R, {{1,2},{2,x}});|
|                                  |
|             2      2             |
|o2 : Matrix R  <-- R              |
+----------------------------------+
|i3 : diagonalizeViaCongruence M   |
|                                  |
|o3 = | 1 0   |                    |
|     | 0 x-4 |                    |
|                                  |
|             2      2             |
|o3 : Matrix R  <-- R              |
+----------------------------------+

See also
========

  * getDiagonalClass -- produces a diagonalized form
    for any (unstable) Grothendieck-Witt class, with simplified terms on the
    diagonal
  * getDiagonalEntries -- extracts a list of
    diagonal entries for a GrothendieckWittClass

Ways to use diagonalizeViaCongruence:
=====================================

  * "diagonalizeViaCongruence(Matrix)"

For the programmer
==================

The object diagonalizeViaCongruence, is a
method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in
A1BrouwerDegrees/Documentation/MatrixMethodsDoc.m2:25:0.

getAlgebra -- returns the algebra over which a stable or unstable Grothendieck-Witt class is defined
****************************************************************************************************

  * Usage:
        getAlgebra(beta)
  * Inputs:
      * beta, a Grothendieck-Witt Class, a
        Grothendieck-Witt class
      * beta, an Unstable Grothendieck-Witt Class,
        an unstable Grothendieck-Witt class
  * Outputs:
      * a ring (Macaulay2Doc), the algebra over which the
        Grothendieck-Witt class is defined

Description
===========

Given a GrothendieckWittClass or UnstableGrothendieckWittClass object beta,
this method returns the algebra over which the Grothendieck-Witt class is
defined. This algebra is either a field or a finite étale algebra over a field.

+-------------------------------------------------+
|i1 : R = QQ[x]/(x^2 + 1);                        |
+-------------------------------------------------+
|i2 : beta = makeGWClass matrix(R, {{1,2},{2,x}});|
+-------------------------------------------------+
|i3 : getAlgebra beta                             |
|                                                 |
|o3 = R                                           |
|                                                 |
|o3 : QuotientRing                                |
+-------------------------------------------------+

See also
========

  * GrothendieckWittClass -- a new type intended
    to capture the isomorphism class of an element of the Grothendieck-Witt
    ring of a field or finite étale algebras over a field
  * UnstableGrothendieckWittClass -- a
    new type intended to capture an element of the unstable Grothendieck-Witt
    group of a field or finite étale algebras over a field
  * getBaseField -- returns the base field of a stable or
    unstable Grothendieck-Witt class
  * getMatrix -- returns the Gram matrix of a stable or
    unstable Grothendieck-Witt class
  * getScalar -- returns the non-zero scalar of an unstable
    Grothendieck-Witt class

Ways to use getAlgebra:
=======================

  * "getAlgebra(GrothendieckWittClass)"
  * "getAlgebra(UnstableGrothendieckWittClass)"

For the programmer
==================

The object getAlgebra, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in
A1BrouwerDegrees/Documentation/UnstableGrothendieckWittClassesDoc.m2:153:0.

getAnisotropicDimension -- returns the anisotropic dimension of a symmetric bilinear form
*****************************************************************************************

  * Usage:
        getAnisotropicDimension beta
  * Inputs:
      * beta, a Grothendieck-Witt Class, a
        GrothendieckWittClass over a field $k$, where $k$ is $\mathbb{Q}$,
        $\mathbb{R}$, $\mathbb{C}$, or a finite field of characteristic not 2
  * Outputs:
      * an integer (Macaulay2Doc), the rank of the anisotropic part
        of $\beta$

Description
===========

By the Witt Decomposition Theorem, any non-degenerate form decomposes uniquely
as $\beta \cong n \mathbb{H} \oplus \beta_a$ where the form $\beta_a$ is
anisotropic. The rank of $\beta_a$ is called the anisotropic dimension of
$\beta$.

The anisotropic dimension of a form defined over the rational numbers is the
maximum of the getAnisotropicDimensionQQp,
anistropic dimension at each of the completions of $\mathbb{Q}$ at the
relevant primes.

References
==========

[KC18] P. Koprowski, A. Czogala, "Computing with quadratic forms over number
fields," Journal of Symbolic Computation, 2018.

See also
========

  * getWittIndex -- returns the Witt index of a symmetric
    bilinear form
  * getAnisotropicDimensionQQp -- returns
    the anisotropic dimension of a rational symmetric bilinear form over the
    p-adic rational numbers
  * getAnisotropicPart -- produces the anisotropic
    part of a Grothendieck-Witt class

Ways to use getAnisotropicDimension:
====================================

  * "getAnisotropicDimension(GrothendieckWittClass)"
  * "getAnisotropicDimension(Matrix)"

For the programmer
==================

The object getAnisotropicDimension, is a
method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in
A1BrouwerDegrees/Documentation/AnisotropicDimensionDoc.m2:53:0.

getAnisotropicDimensionQQp -- returns the anisotropic dimension of a rational symmetric bilinear form over the p-adic rational numbers
**************************************************************************************************************************************

  * Usage:
        getAnisotropicDimensionQQp(beta, p)
  * Inputs:
      * beta, a Grothendieck-Witt Class, over
        $\mathbb{Q}$
      * p, an integer (Macaulay2Doc), a prime number
  * Outputs:
      * an integer (Macaulay2Doc), the rank of the anisotropic part
        of $\beta$ over $\mathbb{Q}_{p}$

Description
===========

This is an implementation of [KC18, Algorithm 8], which computes the
anisotropic dimension of rational forms over the $p$-adic rational numbers. Any
form of rank $\ge 5$ is isotropic, so this method will always return 0, 1, 2,
3, or 4.

References
==========

[KC18] P. Koprowski, A. Czogala, "Computing with quadratic forms over number
fields," Journal of Symbolic Computation, 2018.

See also
========

  * getAnisotropicDimension -- returns the
    anisotropic dimension of a symmetric bilinear form

Ways to use getAnisotropicDimensionQQp:
=======================================

  * "getAnisotropicDimensionQQp(GrothendieckWittClass,ZZ)"

For the programmer
==================

The object getAnisotropicDimensionQQp, is a
method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in
A1BrouwerDegrees/Documentation/AnisotropicDimensionDoc.m2:25:0.

getAnisotropicPart -- produces the anisotropic part of a Grothendieck-Witt class
********************************************************************************

  * Usage:
        getAnisotropicPart(beta)
  * Inputs:
      * beta, a Grothendieck-Witt Class, over
        $\mathbb{C},\mathbb{Q},\mathbb{R}$, or a finite field of characteristic
        not two
  * Outputs:
      * a Grothendieck-Witt Class, the
        anisotropic part of the Grothendieck-Witt class

Description
===========

By the Witt Decomposition theorem, any Grothendieck-Witt class can be
decomposed uniquely into a sum of hyperbolic forms and an anisotropic part
$\beta\cong\beta_{a}\oplus n\mathbb{H}$ where the form $\beta_{a}$ is
anisotropic. This method returns the anisotropic part $\beta_{a}$ of the
Grothendieck-Witt class $\beta$.

Over the complex and real numbers, this is straightforward, and over finite
fields it is a fairly routine computation. Over the rational number, some more
sophisticated algorithms are needed from the literature. For this, we implement
algorithms developed for number fields by Koprowski and Rothkegel [KR23].

+---------------------------------------------------+
|i1 : alpha = makeDiagonalForm(QQ, (3,-3,2,5,1,-9));|
+---------------------------------------------------+
|i2 : getAnisotropicPart alpha                      |
|                                                   |
|o2 = | 2 0 |                                       |
|     | 0 5 |                                       |
|                                                   |
|o2 : GrothendieckWittClass                         |
+---------------------------------------------------+

References
==========

[KR23] P. Koprowski and B. Rothkegel, "The anisotropic part of a quadratic form
over a number field," J. Symbolic Computation, 2023.

See also
========

  * getAnisotropicDimension -- returns the
    anisotropic dimension of a symmetric bilinear form
  * getWittIndex -- returns the Witt index of a symmetric
    bilinear form
  * getSumDecomposition -- produces a simplified
    diagonal representative of a Grothendieck-Witt class or unstable
    Grothendieck-Witt class
  * getSumDecompositionString -- produces a
    simplified string representation of a Grothendieck-Witt class or unstable
    Grothendieck-Witt class

Ways to use getAnisotropicPart:
===============================

  * "getAnisotropicPart(GrothendieckWittClass)"
  * "getAnisotropicPart(Matrix)"

For the programmer
==================

The object getAnisotropicPart, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in
A1BrouwerDegrees/Documentation/DecompositionDoc.m2:128:0.

getBaseField -- returns the base field of a stable or unstable Grothendieck-Witt class
**************************************************************************************

  * Usage:
        getBaseField(beta)
  * Inputs:
      * beta, a Grothendieck-Witt Class, a
        Grothendieck-Witt class
      * beta, an Unstable Grothendieck-Witt Class,
        an unstable Grothendieck-Witt class
  * Outputs:
      * a ring (Macaulay2Doc), the base field of the
        Grothendieck-Witt class

Description
===========

Given a GrothendieckWittClass or UnstableGrothendieckWittClass object beta,
this method returns the base field of the Grothendieck-Witt class if the
Grothendieck-Witt class is defined over a field.

+-------------------------------------------------+
|i1 : R = QQ[x]/(x^2 + 1);                        |
+-------------------------------------------------+
|i2 : beta = makeGWClass matrix(R, {{1,2},{2,x}});|
+-------------------------------------------------+
|i3 : getBaseField beta                           |
|                                                 |
|o3 = R[]                                         |
|                                                 |
|o3 : PolynomialRing                              |
+-------------------------------------------------+

Caveat
======

This method will return the base field of the (unstable) Grothendieck-Witt
class if it is defined over a finite separable extension of either the rational
numbers or a finite field of characteristic not 2. The method verifies that the
zero ideal of the getAlgebra, of the (unstable)
Grothendieck-Witt class is prime using isPrime (Macaulay2Doc),
which only works for ideals in polynomial rings or quotients of polynomial
rings over a prime field. In particular, this method may fail even when the
(unstable) Grothendieck-Witt class is indeed defined over a field. In these
cases, the user can apply toField (Macaulay2Doc), to
the algebra of the (unstable) Grothendieck-Witt class to obtain the base field.

See also
========

  * GrothendieckWittClass -- a new type intended
    to capture the isomorphism class of an element of the Grothendieck-Witt
    ring of a field or finite étale algebras over a field
  * UnstableGrothendieckWittClass -- a
    new type intended to capture an element of the unstable Grothendieck-Witt
    group of a field or finite étale algebras over a field
  * getAlgebra -- returns the algebra over which a stable or
    unstable Grothendieck-Witt class is defined
  * getMatrix -- returns the Gram matrix of a stable or
    unstable Grothendieck-Witt class
  * getScalar -- returns the non-zero scalar of an unstable
    Grothendieck-Witt class
  * toField (Macaulay2Doc) -- declare that a ring is a
    field

Ways to use getBaseField:
=========================

  * "getBaseField(GrothendieckWittClass)"
  * "getBaseField(UnstableGrothendieckWittClass)"

For the programmer
==================

The object getBaseField, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in
A1BrouwerDegrees/Documentation/UnstableGrothendieckWittClassesDoc.m2:188:0.

getDiagonalClass -- produces a diagonalized form for any (unstable) Grothendieck-Witt class, with simplified terms on the diagonal
**********************************************************************************************************************************

  * Usage:
        getDiagonalClass beta
  * Inputs:
      * beta, a Grothendieck-Witt Class, over a
        field or finite étale algebra over a field
      * beta, an Unstable Grothendieck-Witt Class,
        over a field or finite étale algebra
        over a field
  * Outputs:
      * a Grothendieck-Witt Class, a form
        isomorphic to $\beta$ with a diagonal Gram matrix
      * an Unstable Grothendieck-Witt Class,
        a class isomorphic to $\beta$ with a
        diagonal Gram matrix

Description
===========

Given a symmetric bilinear form, this method uses the
diagonalizeViaCongruence, command in order to produce
a diagonal symmetric bilinear form isomorphic to $\beta$, with reduced square
classes appearing as the diagonal entries when $\beta$ is defined over
$\mathbb{C}$, $\mathbb{R}$, $\mathbb{Q}$, or finite field of characteristic not
2. In the case of an UnstableGrothendieckWittClass the function applies
diagonalizeViaCongruence, to the stable part.

+----------------------------------------------------------------+
|i1 : M = matrix(QQ, {{9,1,7,4},{1,10,3,2},{7,3,6,7},{4,2,7,5}});|
|                                                                |
|              4       4                                         |
|o1 : Matrix QQ  <-- QQ                                          |
+----------------------------------------------------------------+
|i2 : beta = makeGWuClass M;                                     |
+----------------------------------------------------------------+
|i3 : getDiagonalClass beta                                      |
|                                                                |
|o3 = (| 1 0  0   0   |, -1100)                                  |
|      | 0 89 0   0   |                                          |
|      | 0 0  445 0   |                                          |
|      | 0 0  0   -55 |                                          |
|                                                                |
|o3 : UnstableGrothendieckWittClass                              |
+----------------------------------------------------------------+
|i4 : getDiagonalClass makeGWClass M                             |
|                                                                |
|o4 = | 1 0  0   0   |                                           |
|     | 0 89 0   0   |                                           |
|     | 0 0  445 0   |                                           |
|     | 0 0  0   -55 |                                           |
|                                                                |
|o4 : GrothendieckWittClass                                      |
+----------------------------------------------------------------+

Note that the GrothendieckWittClass, and
UnstableGrothendieckWittClass, type caches
diagonal versions of a form once they have been computed. We can recover this
quickly in the following way.

+----------------------------------+
|i5 : beta.cache.getDiagonalClass  |
|                                  |
|o5 = (| 1 0  0   0   |, -1100)    |
|      | 0 89 0   0   |            |
|      | 0 0  445 0   |            |
|      | 0 0  0   -55 |            |
|                                  |
|o5 : UnstableGrothendieckWittClass|
+----------------------------------+

See also
========

  * diagonalizeViaCongruence -- diagonalizes a
    symmetric matrix via congruence
  * getDiagonalEntries -- extracts a list of
    diagonal entries for a GrothendieckWittClass

Ways to use getDiagonalClass:
=============================

  * "getDiagonalClass(GrothendieckWittClass)"
  * "getDiagonalClass(UnstableGrothendieckWittClass)"

For the programmer
==================

The object getDiagonalClass, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in
A1BrouwerDegrees/Documentation/SimplifiedRepresentativesDoc.m2:36:0.

getDiagonalEntries -- extracts a list of diagonal entries for a GrothendieckWittClass
*************************************************************************************

  * Usage:
        getDiagonalEntries beta
  * Inputs:
      * beta, a Grothendieck-Witt Class, over a
        field or finite étale algebra over a field
  * Outputs:
      * L, a list (Macaulay2Doc), of elements $a_i$ of the field or
        finite étale algebra over a field, where $i = 1,\dots,n $, such that
        $\beta \cong \langle a_1,\ldots,a_n\rangle$

Description
===========

Given a diagonal form, getDiagonalEntries will extract the elements along the
diagonal.

+--------------------------------------------------------------+
|i1 : beta = makeGWClass matrix(QQ, {{3,0,0},{0,2,0},{0,0,7}});|
+--------------------------------------------------------------+
|i2 : getDiagonalEntries beta                                  |
|                                                              |
|o2 = {3, 2, 7}                                                |
|                                                              |
|o2 : List                                                     |
+--------------------------------------------------------------+

If the form is not given with a diagonal representative, this method will first
diagonalize it.

+---------------------------------------------------------------+
|i3 : gamma = makeGWClass matrix(RR, {{0,0,1},{0,1,0},{1,0,0}});|
+---------------------------------------------------------------+
|i4 : getDiagonalEntries gamma                                  |
|                                                               |
|o4 = {2, 1, -.5}                                               |
|                                                               |
|o4 : List                                                      |
+---------------------------------------------------------------+

See also
========

  * getDiagonalClass -- produces a diagonalized form
    for any (unstable) Grothendieck-Witt class, with simplified terms on the
    diagonal
  * diagonalizeViaCongruence -- diagonalizes a
    symmetric matrix via congruence

Ways to use getDiagonalEntries:
===============================

  * "getDiagonalEntries(GrothendieckWittClass)"

For the programmer
==================

The object getDiagonalEntries, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in
A1BrouwerDegrees/Documentation/SimplifiedRepresentativesDoc.m2:66:0.

getGlobalA1Degree -- computes the global $\mathbb{A}^{1}$-Brouwer degree of a list of $n$ polynomials in $n$ variables over a field $k$
***************************************************************************************************************************************

  * Usage:
        getGlobalA1Degree L
  * Inputs:
      * L, a list (Macaulay2Doc), of polynomials $f=(f_{1}, \ldots,
        f_{n})$ in the polynomial ring $k[x_{1},\dots,x_{n}]$ where $k$ is
        $\mathbb{C}$, $\mathbb{Q}$, or a finite field of characteristic not 2.
        Over $\mathbb{R}$, the user is prompted to instead do the computation
        over $\mathbb{Q}$ and then base change to $\mathbb{R}$.
  * Outputs:
      * a Grothendieck-Witt Class, the class
        $\text{deg}^{\mathbb{A}^{1}}(f)$ in the Grothendieck-Witt ring
        $\text{GW}(k)$

Description
===========

Given an endomorphism of affine space
$f=(f_{1},\ldots,f_{n}):\mathbb{A}^{n}_{k}\to\mathbb{A}^{n}_{k}$ with isolated
zeroes, we may compute its $\mathbb{A}^{1}$-Brouwer degree valued in the
Grothendieck-Witt ring $\text{GW}(k)$.

The $\mathbb{A}^{1}$-Brouwer degree first defined by Morel [M12] is an
algebro-geometric enrichment of the classical topological Brouwer degree. Using
the tools of motivic homotopy theory, one may associate to an endomorphism of
affine space the isomorphism class of a symmetric bilinear form whose
invariants encode geometric data about how the morphism transforms space.

Such an association appears in the work of Eisenbud-Levine [EL77] and
Khimshiashvili [K77], wherein the authors develop a symmetric bilinear form
whose signature computes the local degree of a smooth map of real manifolds in
the case where the Jacobian may vanish on an affine chart. This was proven to
agree with Morel's $\mathbb{A}^{1}$-Brouwer degree in work of Kass and
Wickelgren [KW19]. A similar production of a symmetric bilinear form is given
by work of Scheja and Storch [SS76], which develops a symmetric bilinear form
attached to a complete intersection. This was also shown to align with the
$\mathbb{A}^{1}$-Brouwer degree in [BW23].

Following recent work [BMP23], the $\mathbb{A}^{1}$-Brouwer degree can be
computed as a multivariate Bézoutian bilinear form. The algorithms for
producing such a form are developed here.

+--------------------------+
|i1 : QQ[x];               |
+--------------------------+
|i2 : f = {x^2 + 1};       |
+--------------------------+
|i3 : getGlobalA1Degree f  |
|                          |
|o3 = | 0 1 |              |
|     | 1 0 |              |
|                          |
|o3 : GrothendieckWittClass|
+--------------------------+

The previous example produces a rank two form with signature zero. This
corresponds to the fact that the degree of the complex map
$\mathbb{C}\to\mathbb{C}, z\mapsto z^{2}$ has degree two, while the associated
real map $\mathbb{R}\to\mathbb{R}, x\mapsto x^{2}$ has global degree zero.

Following [M21] we may think of the $\mathbb{A}^{1}$-Brouwer degree
$\text{deg}^{\mathbb{A}^1}(f)$ as a quadratically enriched intersection
multiplicity of the hyperplanes $V(f_1)\cap \cdots \cap V(f_n)$. As a toy
example, consider the curve $y=x(x-1)(x+1)$ intersecting the $x$-axis.

+----------------------------+
|i4 : QQ[x,y];               |
+----------------------------+
|i5 : f = {x^3 - x^2 - y, y};|
+----------------------------+
|i6 : getGlobalA1Degree f    |
|                            |
|o6 = | 0  -1 1 |            |
|     | -1 1  0 |            |
|     | 1  0  0 |            |
|                            |
|o6 : GrothendieckWittClass  |
+----------------------------+

The rank of this form is three, as cubics over the complex numbers have three
roots counted with multiplicity. This form has signature one, which indicates
that when the cubic intersects the $x$-axis, when the three points of
intersection are counted with a sign corresponding to a right hand rule, the
sum equals one.

The global $\mathbb{A}^{1}$-Brouwer degree can be computed as a sum over the
local degrees, at the points in the zero locus of the
morphism. In the previous example, we see that $V(f)$ consists of three points
on the affine line. We can compute local degrees at all of these and verify
that the local degrees sum to the global degree.

+-----------------------------------------------------------------------------+
|i7 : point1 = ideal(x - 1, y);                                               |
|                                                                             |
|o7 : Ideal of QQ[x..y]                                                       |
+-----------------------------------------------------------------------------+
|i8 : point2 = ideal(x, y);                                                   |
|                                                                             |
|o8 : Ideal of QQ[x..y]                                                       |
+-----------------------------------------------------------------------------+
|i9 : getGlobalA1Degree f                                                     |
|                                                                             |
|o9 = | 0  -1 1 |                                                             |
|     | -1 1  0 |                                                             |
|     | 1  0  0 |                                                             |
|                                                                             |
|o9 : GrothendieckWittClass                                                   |
+-----------------------------------------------------------------------------+
|i10 : getLocalA1Degree(f, point1)                                            |
|                                                                             |
|o10 = | 1 |                                                                  |
|                                                                             |
|o10 : GrothendieckWittClass                                                  |
+-----------------------------------------------------------------------------+
|i11 : getLocalA1Degree(f, point2)                                            |
|                                                                             |
|o11 = | 0  -1 |                                                              |
|      | -1 1  |                                                              |
|                                                                             |
|o11 : GrothendieckWittClass                                                  |
+-----------------------------------------------------------------------------+
|i12 : isIsomorphicForm(getGlobalA1Degree f, addGW(getLocalA1Degree(f,        |
|                                                                             |
|o12 = true                                                                   |
|-----------------------------------------------------------------------------|
|point1), getLocalA1Degree(f, point2)))                                       |
+-----------------------------------------------------------------------------+

References
==========

[BW23] T. Bachmann, K. Wickelgren, "Euler classes: six-functors formalism,
dualities, integrality and linear subspaces of complete intersections," J.
Inst. Math. Jussieu, 2023.

[BMP23] T. Brazelton, S. McKean, S. Pauli, "Bézoutians and the
$\mathbb{A}^{1}$-Degree," Algebra & Number Theory, 2023.

[EL77] D. Eisenbud, H. Levine, "An algebraic formula for the degree of a
$C^{\infty}$ map germ," Annals of Mathematics, 1977.

[KW19] J. Kass, K. Wickelgren, "The class of Eisenbud-Khimshashvili-Levine is
the local $\mathbb{A}^{1}$-Brouwer degree," Duke Math J., 2019.

[K77] G. Khimshiashvili, "The local degree of a smooth mapping," Sakharth. SSR
Mcn. Akad. Moambe, 1977.

[M21] S. McKean, "An arithmetic enrichment of Bézout's Theorem," Math. Ann.,
2021.

[M12] F. Morel, "$\mathbb{A}^{1}$-Algebraic topology over a field," Springer
Lecture Notes in Mathematics, 2012.

[SS76] S. Scheja, S. Storch, "Uber Spurfunktionen bei vollstandigen
Durchschnitten," J. Reine Angew. Math., 1975.

See also
========

  * getGlobalUnstableA1Degree -- computes the
    global unstable $\mathbb{A}^{1}$-Brouwer degree of a pointed rational
    function $f/g:\mathbb{P}^{1}_{k}\to\mathbb{P}^{1}_{k}$
  * getLocalA1Degree -- computes a local
    $\mathbb{A}^{1}$-Brouwer degree of a list of $n$ polynomials in $n$
    variables over a field $k$ at a prime ideal in the zero locus
  * getLocalUnstableA1Degree -- computes a
    local unstable $\mathbb{A}^{1}$-Brouwer degree of a pointed rational
    function $f/g:\mathbb{P}^{1}_{k}\to\mathbb{P}^{1}_{k}$ at a root
    $p\in\mathbb{P}^{1}_{k}$
  * getSumDecomposition -- produces a simplified
    diagonal representative of a Grothendieck-Witt class or unstable
    Grothendieck-Witt class
  * getSumDecompositionString -- produces a
    simplified string representation of a Grothendieck-Witt class or unstable
    Grothendieck-Witt class

Ways to use getGlobalA1Degree:
==============================

  * "getGlobalA1Degree(List)"

For the programmer
==================

The object getGlobalA1Degree, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in
A1BrouwerDegrees/Documentation/LocalGlobalDegreesDoc.m2:70:0.

getGlobalUnstableA1Degree -- computes the global unstable $\mathbb{A}^{1}$-Brouwer degree of a pointed rational function $f/g:\mathbb{P}^{1}_{k}\to\mathbb{P}^{1}_{k}$
**********************************************************************************************************************************************************************

  * Usage:
        getGlobalUnstableA1Degree(q)
        getGlobalUnstableA1Degree(f, g)
  * Inputs:
      * q, a ring element (Macaulay2Doc), a pointed rational
        function $f/g$ where $f,g\in k[x]$ are coprime polynomials over a field
        $k$ of characteristic not 2 and $g$ not identically zero. Over
        $\mathbb{C}$, the two-input variant is to be used as fraction fields
        are not supported over $\mathbb{C}$. Over $\mathbb{R}$, the user is
        prompted to instead do the computation over $\mathbb{Q}$ and then base
        change to $\mathbb{R}$.
      * f, a ring element (Macaulay2Doc), a polynomial $f\in
        k[x]$ where $k$ is a field of characteristic not 2
      * g, a ring element (Macaulay2Doc), a polynomial $g\in
        k[x]$ where $k$ is a field of characteristic not 2 and $g$ is not
        identically zero, such that $f/g$ is a pointed rational function
  * Optional inputs (Macaulay2Doc),:
      * linearTolerance => a real number (Macaulay2Doc), default
        value .000001, a positive real number used to determine whether roots
        of f and g are considered equal when working over the inexact field
        $\mathbb{C}$, used to put rational functions over $\mathbb{C}$ in
        reduced form by cancelling roots that agree up to the tolerance
  * Outputs:
      * an Unstable Grothendieck-Witt Class,
        the class
        $\text{deg}^{\mathbb{A}^{1}}(f/g)$ in the unstable Grothendieck-Witt
        group $\text{GW}^{u}(k)$

Description
===========

Given a pointed rational function $f/g:\mathbb{P}^{1}_{k}\to\mathbb{P}^{1}_{k}$
(where $(f/g)(\infty)=\infty$), we may compute its global unstable
$\mathbb{A}^{1}$-Brouwer degree valued in the unstable Grothendieck-Witt group
$\text{GW}^{u}(k):=\text{GW}(k)\times_{k^{\times}/(k^{\times})^{2}}k^{\times}$.

Morel's $\mathbb{A}^{1}$-Brouwer degree generalizes the classical Brouwer
degree by associating to an endomorphism of the sphere a class in the
Grothendieck-Witt ring of non-degenerate symmetric bilinear forms. While this
morphism is an isomorphism in dimensions two and above, it is only surjective
in dimension one [M12]. In this case, a computation of Morel [M12] and Cazanave
[C12] furnish an isomorphism
$[\mathbb{P}^{1}_{k},\mathbb{P}^{1}_{k}]\cong\text{GW}^{u}(k)$.

Building on Cazanave's work, Kass and Wickelgren [KW20] and later Igieobo and
coauthors [I+24] prove that there is an explicit bilinear form associated to
the rational function $f/g$ in both the local and global cases, and provide a
local-to-global formula for the degree dependent on the configuration of the
zeroes of the rational function.

For additional historical and mathematical background about
$\mathbb{A}^{1}$-degrees and its relationship to $\mathbb{A}^{1}$-algebraic
topology more generally, see global A1-degrees.

In the case of the global unstable $\mathbb{A}^{1}$-Brouwer degree, the class
is represented by a variant of the Bézoutian bilinear form [C12, Theorem 3.6].

+---------------------------------------------------------------------------+
|i1 : frac QQ[x];                                                           |
+---------------------------------------------------------------------------+
|i2 : q = (x^5 - 6*x^4 + 11*x^3 - 2*x^2 - 12*x + 8)/(x^4 - 5*x^2 + 7*x + 1);|
+---------------------------------------------------------------------------+
|i3 : getGlobalUnstableA1Degree q                                           |
|                                                                           |
|o3 = (| -68 38  11  -14 1  |, -53240)                                      |
|      | 38  -63 63  -29 7  |                                               |
|      | 11  63  -84 39  -5 |                                               |
|      | -14 -29 39  -16 0  |                                               |
|      | 1   7   -5  0   1  |                                               |
|                                                                           |
|o3 : UnstableGrothendieckWittClass                                         |
+---------------------------------------------------------------------------+

The rank of this form is of rank five, which agrees with the number of zeroes
of the rational function counted with multiplicity over the complex numbers.

In the unstable setting, however, the global unstable $\mathbb{A}^{1}$-Brouwer
degree is not computed as the sum of local $\mathbb{A}^{1}$-Brouwer degrees at
the zeroes of the rational function in the unstable Grothendieck-Witt ring
$\text{GW}^{u}(k)$. Instead, it is computed as the divisorial sum,
which depends on the divisor of points given by the zeroes of
the rational function [I+24].

+--------------------------------------------------------------+
|i4 : deg1 = getLocalUnstableA1Degree(q, -1)                   |
|                                                              |
|                    5                                         |
|o4 = (| -5/27 |, - --)                                        |
|                   27                                         |
|                                                              |
|o4 : UnstableGrothendieckWittClass                            |
+--------------------------------------------------------------+
|i5 : deg2 = getLocalUnstableA1Degree(q, 1)                    |
|                                                              |
|o5 = (| -2 |, -2)                                             |
|                                                              |
|o5 : UnstableGrothendieckWittClass                            |
+--------------------------------------------------------------+
|i6 : deg3 = getLocalUnstableA1Degree(q, 2)                    |
|                                                              |
|                            1331                              |
|o6 = (| 0    0    11/3 |, - ----)                             |
|      | 0    11/3 0    |     27                               |
|      | 11/3 0    0    |                                      |
|                                                              |
|o6 : UnstableGrothendieckWittClass                            |
+--------------------------------------------------------------+
|i7 : degSum = addGWuDivisorial({deg1, deg2, deg3}, {-1, 1, 2})|
|                                                              |
|o7 = (| -5/27 0  0    0    0    |, -53240)                    |
|      | 0     -2 0    0    0    |                             |
|      | 0     0  0    0    11/3 |                             |
|      | 0     0  0    11/3 0    |                             |
|      | 0     0  11/3 0    0    |                             |
|                                                              |
|o7 : UnstableGrothendieckWittClass                            |
+--------------------------------------------------------------+
|i8 : isIsomorphicForm(degSum, getGlobalUnstableA1Degree q)    |
|                                                              |
|o8 = true                                                     |
+--------------------------------------------------------------+

Since $f/g$ is assumed to be reduced, $f$ and $g$ do not share a common factor.
If the user chooses functions $f$ and $g$ with a common factor, the reduction
is computed, checked for pointedness, and the degree computation run on the
reduction. Over $\mathbb{Q}$ and $\mathbb{F}_{q}$, rational functions are
automatically reduced, and computing getGlobalUnstableA1Degree(f/g) agrees with
computing getGlobalUnstableA1Degree(f,g) as the computation is done on the
underlying rational function. Over $\mathbb{C}$, we consider roots of $f$ and
$g$ to be equal if the absolute value of their difference is less than that of
the  linearTolerance. The user may specify a tolerance for this cancellation
via the option linearTolerance, with the default being 1e-6.

+------------------------------------------------------------+
|i9 : R = CC[x];                                             |
+------------------------------------------------------------+
|i10 : f = (x-1)*(x-2)*(x-3);                                |
+------------------------------------------------------------+
|i11 : g = (x-1)*(x-4);                                      |
+------------------------------------------------------------+
|i12 : getGlobalUnstableA1Degree(f,g,linearTolerance => 1e-6)|
|                                                            |
|o12 = (| 1 0 |, -2)                                         |
|       | 0 1 |                                              |
|                                                            |
|o12 : UnstableGrothendieckWittClass                         |
+------------------------------------------------------------+

References
==========

[C12] C. Cazanave, "Algebraic homotopy classes of rational functions," Ann.
Scient. Ec. Norm. Sup., 2012.

[I+24] J. Igieobo, et. al., "Motivic configurations on the line," arXiv:
2411.15347, 2024.

[KW20] J. Kass, K. Wickelgren, "A Classical Proof that the Algebraic Homotopy
Class of a Rational Function is the Residue Pairing," Linear Algebra Appl.,
2020.

[M12] F. Morel, "$\mathbb{A}^{1}$-Algebraic topology over a field," Springer
Lecture Notes in Mathematics, 2012.

See also
========

  * getLocalUnstableA1Degree -- computes a
    local unstable $\mathbb{A}^{1}$-Brouwer degree of a pointed rational
    function $f/g:\mathbb{P}^{1}_{k}\to\mathbb{P}^{1}_{k}$ at a root
    $p\in\mathbb{P}^{1}_{k}$
  * getLocalA1Degree -- computes a local
    $\mathbb{A}^{1}$-Brouwer degree of a list of $n$ polynomials in $n$
    variables over a field $k$ at a prime ideal in the zero locus
  * getGlobalA1Degree -- computes the global
    $\mathbb{A}^{1}$-Brouwer degree of a list of $n$ polynomials in $n$
    variables over a field $k$
  * getSumDecomposition -- produces a simplified
    diagonal representative of a Grothendieck-Witt class or unstable
    Grothendieck-Witt class
  * getSumDecompositionString -- produces a
    simplified string representation of a Grothendieck-Witt class or unstable
    Grothendieck-Witt class

Ways to use getGlobalUnstableA1Degree:
======================================

  * "getGlobalUnstableA1Degree(RingElement)"
  * "getGlobalUnstableA1Degree(RingElement,RingElement)"

For the programmer
==================

The object getGlobalUnstableA1Degree, is a
method function with options (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in
A1BrouwerDegrees/Documentation/UnstableLocalGlobalDegreesDoc.m2:71:0.

getGWClass -- returns the Grothendieck-Witt class of the stable part of an unstable Grothendieck-Witt class
***********************************************************************************************************

  * Usage:
        getGWClass(beta)
  * Inputs:
      * beta, an Unstable Grothendieck-Witt Class,
        an unstable Grothendieck-Witt class
  * Outputs:
      * a Grothendieck-Witt Class, the
        Grothendieck-Witt class of the stable part of the unstable
        Grothendieck-Witt class

Description
===========

Given an UnstableGrothendieckWittClass object beta, this method returns the
Grothendieck-Witt class of the stable part of the unstable Grothendieck-Witt
class.

+----------------------------------+
|i1 : M = matrix(QQ, {{0,1},{1,0}})|
|                                  |
|o1 = | 0 1 |                      |
|     | 1 0 |                      |
|                                  |
|              2       2           |
|o1 : Matrix QQ  <-- QQ            |
+----------------------------------+
|i2 : alpha = makeGWuClass(M, -9)  |
|                                  |
|o2 = (| 0 1 |, -9)                |
|      | 1 0 |                     |
|                                  |
|o2 : UnstableGrothendieckWittClass|
+----------------------------------+
|i3 : getGWClass alpha             |
|                                  |
|o3 = | 0 1 |                      |
|     | 1 0 |                      |
|                                  |
|o3 : GrothendieckWittClass        |
+----------------------------------+

See also
========

  * UnstableGrothendieckWittClass -- a
    new type intended to capture an element of the unstable Grothendieck-Witt
    group of a field or finite étale algebras over a field
  * makeGWuClass -- constructor for unstable
    Grothendieck-Witt classes
  * getMatrix -- returns the Gram matrix of a stable or
    unstable Grothendieck-Witt class

Ways to use getGWClass:
=======================

  * "getGWClass(UnstableGrothendieckWittClass)"

For the programmer
==================

The object getGWClass, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in
A1BrouwerDegrees/Documentation/UnstableGrothendieckWittClassesDoc.m2:340:0.

getHasseWittInvariant -- computes the Hasse-Witt invariant at a prime $p$ for the quadratic form of the Grothendieck-Witt class
*******************************************************************************************************************************

  * Usage:
        getHasseWittInvariant(beta, p)
  * Inputs:
      * beta, a Grothendieck-Witt Class, denoted
        by $\beta \in \text{GW}(\mathbb{Q})$
      * p, an integer (Macaulay2Doc), a prime number
  * Outputs:
      * an integer (Macaulay2Doc), the Hasse-Witt invariant of
        $\beta$ at the prime $p$

Description
===========

The Hasse-Witt invariant of a diagonal form $\langle a_1,\ldots,a_n\rangle$
over a field $K$ is defined to be the product $\prod_{i<j}
\left(a_i,a_j\right)_p$ where $(-,-)_p$ is the Hilbert symbol.

The Hasse-Witt invariant of a form will be equal to 1 for almost all primes.
In particular, after diagonalizing a form $\beta \cong \left\langle
a_1,\ldots,a_n\right\rangle$, the Hasse-Witt invariant at a prime $p$ will be 1
automatically if $p\nmid a_i$ for all $i$. Thus we only have to compute the
Hasse-Witt invariant at primes dividing diagonal entries.

+----------------------------------------------------------------+
|i1 : beta = makeGWClass matrix(QQ, {{1,4,7},{4,3,-1},{7,-1,5}});|
+----------------------------------------------------------------+
|i2 : getHasseWittInvariant(beta, 7)                             |
|                                                                |
|o2 = 1                                                          |
+----------------------------------------------------------------+

See also
========

  * isIsomorphicForm -- determines whether two
    (unstable) Grothendieck-Witt classes over
    $\mathbb{C},\mathbb{R},\mathbb{Q}$ or a finite field of characteristic not
    2 are isomorphic.
  * getRelevantPrimes -- outputs a list containing
    all primes $p$ where the Hasse-Witt invariant of a symmetric bilinear form
    is nontrivial

Ways to use getHasseWittInvariant:
==================================

  * "getHasseWittInvariant(GrothendieckWittClass,ZZ)"
  * "getHasseWittInvariant(List,ZZ)"

For the programmer
==================

The object getHasseWittInvariant, is a
method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in
A1BrouwerDegrees/Documentation/GWInvariantsDoc.m2:84:0.

getHilbertSymbol -- computes the Hilbert symbol of two rational numbers at a prime
**********************************************************************************

  * Usage:
        getHilbertSymbol(a, b, p)
  * Inputs:
      * a, a rational number (Macaulay2Doc), a nonzero integer or
        rational number, considered as an element of $\mathbb{Q}_p$
      * b, a rational number (Macaulay2Doc), a nonzero integer or
        rational number, considered as an element of $\mathbb{Q}_p$
      * p, an integer (Macaulay2Doc), a prime number
  * Outputs:
      * an integer (Macaulay2Doc), the Hilbert symbol $(a,b)_p$

Description
===========

The Hasse-Witt invariant of a diagonal form $\langle a_1,\ldots,a_n\rangle$
over a field $k$ is defined to be the product $\prod_{i<j}  \left( a_i,a_j
\right)_p$ where $(-,-)_p$, which is the Hilbert symbol ([S73, Chapter III])
computed as follows: $$(a,b)_p = \begin{cases} 1 & \text{if }z^2 = ax^2 + by^2
\text{ has a nonzero solution in } K^3 \\ -1 & \text{otherwise.} \end{cases}$$
Consider the following example, where we observe that $z^2 = 2x^2 + y^2$ does
admit nonzero solutions mod 7, in particular $(x,y,z) = (1,0,3),$ and then by
Hensel's lemma, has a solution over $\mathbb{Q}_7$.

+----------------------------+
|i1 : getHilbertSymbol(2,1,7)|
|                            |
|o1 = 1                      |
+----------------------------+

In contrast, since $z^2 = 7x^2 + 3y^2$ does not have a  nonzero solution mod 7,
the Hilbert symbol will be -1.

+----------------------------+
|i2 : getHilbertSymbol(7,3,7)|
|                            |
|o2 = -1                     |
+----------------------------+

Over $\mathbb{Q}_2$, the equation $z^2 = 2x^2 + 2y^2$ has a non-trivial
solution, whereas the equation $z^2=2x^2+3y^2$ does not. Hence, their Hilbert
symbols are 1 and -1, respectively.

+----------------------------+
|i3 : getHilbertSymbol(2,2,2)|
|                            |
|o3 = 1                      |
+----------------------------+
|i4 : getHilbertSymbol(2,3,2)|
|                            |
|o4 = -1                     |
+----------------------------+

Computing Hasse-Witt invariants is a key step in classifying symmetric bilinear
forms over the rational numbers, and in particular certifying their
(an)isotropy.

References
==========

[S73] J.P. Serre, "A course in arithmetic,"" Springer-Verlag, 1973.

See also
========

  * getHilbertSymbolReal -- computes the Hilbert
    symbol of two rational numbers over the real numbers
  * getHasseWittInvariant -- computes the
    Hasse-Witt invariant at a prime $p$ for the quadratic form of the
    Grothendieck-Witt class

Ways to use getHilbertSymbol:
=============================

  * "getHilbertSymbol(QQ,QQ,ZZ)"
  * "getHilbertSymbol(QQ,ZZ,ZZ)"
  * "getHilbertSymbol(ZZ,QQ,ZZ)"
  * "getHilbertSymbol(ZZ,ZZ,ZZ)"

For the programmer
==================

The object getHilbertSymbol, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in
A1BrouwerDegrees/Documentation/HilbertSymbolsDoc.m2:47:0.

getHilbertSymbolReal -- computes the Hilbert symbol of two rational numbers over the real numbers
*************************************************************************************************

  * Usage:
        getHilbertSymbolReal(a, b)
  * Inputs:
      * a, a rational number (Macaulay2Doc), a nonzero integer or
        rational number, considered as an element of $\mathbb{R}$
      * b, a rational number (Macaulay2Doc), a nonzero integer or
        rational number, considered as an element of $\mathbb{R}$
  * Outputs:
      * an integer (Macaulay2Doc), the Hilbert symbol
        $(a,b)_{\mathbb{R}}$

Description
===========

The Hasse-Witt invariant of a diagonal form $\langle a_1,\ldots,a_n\rangle$
over a field $k$ is defined to be the product $\prod_{i<j}  \left( a_i,a_j
\right)_{\mathbb{R}}$ where $(-,-)_{\mathbb{R}}$, which is the Hilbert symbol
([S73, Chapter III]) computed as follows: $$(a,b)_{\mathbb{R}} = \begin{cases}
1 & \text{if }z^2 = ax^2 + by^2 \text{ has a nonzero solution in } \mathbb{R}^3
\\ -1 & \text{otherwise.} \end{cases}$$ $(a,b)_{\mathbb{R}}$ will equal 1
unless both $a,\,b$ are negative.

Consider the example, that $z^2=-3x^2-2y^2/3$ does not admit a non-zero
solution. Thus:

+-----------------------------------------+
|i1 : getHilbertSymbolReal(-3, -2/3) == -1|
|                                         |
|o1 = true                                |
+-----------------------------------------+

Computing Hasse-Witt invariants is a key step in classifying symmetric bilinear
forms over the rational numbers, and in particular certifying their
(an)isotropy.

References
==========

[S73] J.P. Serre, "A course in arithmetic,"" Springer-Verlag, 1973.

See also
========

  * getHilbertSymbol -- computes the Hilbert symbol of
    two rational numbers at a prime
  * getSignature -- computes the signature of a symmetric
    bilinear form over the real numbers or rational numbers

Ways to use getHilbertSymbolReal:
=================================

  * "getHilbertSymbolReal(QQ,QQ)"
  * "getHilbertSymbolReal(QQ,ZZ)"
  * "getHilbertSymbolReal(ZZ,QQ)"
  * "getHilbertSymbolReal(ZZ,ZZ)"

For the programmer
==================

The object getHilbertSymbolReal, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in
A1BrouwerDegrees/Documentation/HilbertSymbolsDoc.m2:83:0.

getIntegralDiscriminant -- computes the integral discriminant for a rational symmetric bilinear form
****************************************************************************************************

  * Usage:
        getIntegralDiscriminant(beta)
  * Inputs:
      * beta, a Grothendieck-Witt Class, denoted
        by $\beta \in \text{GW}(\mathbb{Q})$
  * Outputs:
      * an integer (Macaulay2Doc), an integral square class
        representative of $\text{disc}(\beta)$

Description
===========

The integral discriminant of a symmetric bilinear form $\beta$ is defined to be
the square class of the determinant of the matrix representing $\beta$. This is
an invariant of the form, and is used in the classification of forms.

+----------------------------------------------------------------+
|i1 : beta = makeGWClass matrix(QQ, {{1,4,7},{4,3,-1},{7,-1,5}});|
+----------------------------------------------------------------+
|i2 : getIntegralDiscriminant beta                               |
|                                                                |
|o2 = -269                                                       |
+----------------------------------------------------------------+
|i3 : getDiagonalClass beta                                      |
|                                                                |
|o3 = | 1 0   0    |                                             |
|     | 0 -13 0    |                                             |
|     | 0 0   3497 |                                             |
|                                                                |
|o3 : GrothendieckWittClass                                      |
+----------------------------------------------------------------+

See also
========

  * isIsomorphicForm -- determines whether two
    (unstable) Grothendieck-Witt classes over
    $\mathbb{C},\mathbb{R},\mathbb{Q}$ or a finite field of characteristic not
    2 are isomorphic.

Ways to use getIntegralDiscriminant:
====================================

  * "getIntegralDiscriminant(GrothendieckWittClass)"

For the programmer
==================

The object getIntegralDiscriminant, is a
method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in
A1BrouwerDegrees/Documentation/GWInvariantsDoc.m2:53:0.

getLocalA1Degree -- computes a local $\mathbb{A}^{1}$-Brouwer degree of a list of $n$ polynomials in $n$ variables over a field $k$ at a prime ideal in the zero locus
**********************************************************************************************************************************************************************

  * Usage:
        getLocallA1Degree(L, p)
  * Inputs:
      * L, a list (Macaulay2Doc), of polynomials $f=(f_{1}, \ldots,
        f_{n})$ in the polynomial ring $k[x_{1},\dots,x_{n}]$ where $k$ is
        $\mathbb{C}$, $\mathbb{Q}$, or a finite field of characteristic not 2.
        Over $\mathbb{R}$, the user is prompted to instead do the computation
        over $\mathbb{Q}$ and then base change to $\mathbb{R}$.
      * p, an ideal (Macaulay2Doc), a prime ideal $p\subset
        k[x_{1},\dots,x_{n}]$ corresponding to a point in the zero locus $V(f)$
  * Outputs:
      * a Grothendieck-Witt Class, the class
        $\text{deg}_{p}^{\mathbb{A}^{1}}(f)$ in the Grothendieck-Witt ring
        $\text{GW}(k)$

Description
===========

Given an endomorphism of affine space
$f=(f_{1},\ldots,f_{n}):\mathbb{A}^{n}_{k}\to\mathbb{A}^{n}_{k}$ and an
isolated zero $p\in V(f)$, we may compute its local $\mathbb{A}^{1}$-Brouwer
degree valued in the Grothendieck-Witt ring $\text{GW}(k)$.

For historical and mathematical background, see global A1-degrees.

+----------------------------------------------------------+
|i1 : T1 = QQ[z_1..z_2];                                   |
+----------------------------------------------------------+
|i2 : f1 = {(z_1 - 1)*z_1*z_2, (3/5)*z_1^2 - (17/3)*z_2^2};|
+----------------------------------------------------------+
|i3 : q = ideal(z_1, z_2);                                 |
|                                                          |
|o3 : Ideal of T1                                          |
+----------------------------------------------------------+
|i4 : r = ideal(z_1-1, z_2^2 - 9/85);                      |
|                                                          |
|o4 : Ideal of T1                                          |
+----------------------------------------------------------+
|i5 : f1LDq = getLocalA1Degree(f1, q)                      |
|                                                          |
|o5 = | 0    0     0    17/3  |                            |
|     | 0    3/5   0    -17/3 |                            |
|     | 0    0     17/3 0     |                            |
|     | 17/3 -17/3 0    0     |                            |
|                                                          |
|o5 : GrothendieckWittClass                                |
+----------------------------------------------------------+
|i6 : f1LDr = getLocalA1Degree(f1, r)                      |
|                                                          |
|o6 = | -3/5 0     |                                       |
|     | 0    -17/3 |                                       |
|                                                          |
|o6 : GrothendieckWittClass                                |
+----------------------------------------------------------+

The sum of the local A1-degrees is equal to the global A1-degree:

+-----------------------------------+
|i7 : f1LDsum = addGW(f1LDq,f1LDr); |
+-----------------------------------+
|i8 : f1GD = getGlobalA1Degree f1;  |
+-----------------------------------+
|i9 : isIsomorphicForm(f1GD,f1LDsum)|
|                                   |
|o9 = true                          |
+-----------------------------------+

See also
========

  * getLocalUnstableA1Degree -- computes a
    local unstable $\mathbb{A}^{1}$-Brouwer degree of a pointed rational
    function $f/g:\mathbb{P}^{1}_{k}\to\mathbb{P}^{1}_{k}$ at a root
    $p\in\mathbb{P}^{1}_{k}$
  * getGlobalA1Degree -- computes the global
    $\mathbb{A}^{1}$-Brouwer degree of a list of $n$ polynomials in $n$
    variables over a field $k$
  * getGlobalUnstableA1Degree -- computes the
    global unstable $\mathbb{A}^{1}$-Brouwer degree of a pointed rational
    function $f/g:\mathbb{P}^{1}_{k}\to\mathbb{P}^{1}_{k}$
  * getSumDecomposition -- produces a simplified
    diagonal representative of a Grothendieck-Witt class or unstable
    Grothendieck-Witt class
  * getSumDecompositionString -- produces a
    simplified string representation of a Grothendieck-Witt class or unstable
    Grothendieck-Witt class

Ways to use getLocalA1Degree:
=============================

  * "getLocalA1Degree(List,Ideal)"

For the programmer
==================

The object getLocalA1Degree, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in
A1BrouwerDegrees/Documentation/LocalGlobalDegreesDoc.m2:113:0.

getLocalAlgebraBasis -- produces a basis for a local finitely generated algebra over a field or finite étale algebra
********************************************************************************************************************

  * Usage:
        getLocalAlgebraBasis(L, p)
  * Inputs:
      * L, a list (Macaulay2Doc), of polynomials $f=(f_1, \dots
        ,f_n)$ over the same ring
      * p, an ideal (Macaulay2Doc), a prime ideal of an isolated
        zero
  * Outputs:
      * a list (Macaulay2Doc), of basis elements of the local
        algebra $Q_p(f)$

Description
===========

Given an endomorphism of affine space, $f=(f_1,\dots ,f_n)$, given as a list of
polynomials called $L$ and the prime ideal of an isolated zero, this command
returns a list of basis elements of the local algebra
$Q_p(f):=k[x_{1},\dots,x_{n}]_{\mathfrak{m}_{p}}/(f_{1},\dots,f_{n})$ where
$\mathfrak{m}_{p}$ is the maximal ideal corresponding to the closed point $p$
by computing a normal basis for $(I:(I:p^{\infty}))$ (see [S02, Proposition
2.5]).

+-------------------------------+
|i1 : QQ[x,y];                  |
+-------------------------------+
|i2 : f = {x^2 + 1 - y, y};     |
+-------------------------------+
|i3 : p = ideal(x^2 + 1, y);    |
|                               |
|o3 : Ideal of QQ[x..y]         |
+-------------------------------+
|i4 : getLocalAlgebraBasis(f, p)|
|                               |
|o4 = {1, x}                    |
|                               |
|o4 : List                      |
+-------------------------------+

References
==========

[S02] B. Sturmfels, "Solving Systems of Polynomial Equations," American
Mathematical Society, 2002.

See also
========

  * getLocalA1Degree -- computes a local
    $\mathbb{A}^{1}$-Brouwer degree of a list of $n$ polynomials in $n$
    variables over a field $k$ at a prime ideal in the zero locus

Ways to use getLocalAlgebraBasis:
=================================

  * "getLocalAlgebraBasis(List,Ideal)"

For the programmer
==================

The object getLocalAlgebraBasis, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in
A1BrouwerDegrees/Documentation/ArithmeticMethodsDoc.m2:57:0.

getLocalUnstableA1Degree -- computes a local unstable $\mathbb{A}^{1}$-Brouwer degree of a pointed rational function $f/g:\mathbb{P}^{1}_{k}\to\mathbb{P}^{1}_{k}$ at a root $p\in\mathbb{P}^{1}_{k}$
*****************************************************************************************************************************************************************************************************

  * Usage:
        getLocalUnstableA1Degree(q, p)
        getLocalUnstableA1Degree(f, g, p)
  * Inputs:
      * q, a ring element (Macaulay2Doc), a pointed rational
        function $f/g$ where $f,g\in k[x]$ are coprime polynomials over a field
        $k$ of characteristic not 2 and $g$ not identically zero. Over
        $\mathbb{C}$ the two-input variant is to be used as fraction fields are
        not supported over $\mathbb{C}$. Over $\mathbb{R}$, the user is
        prompted to instead do the computation over $\mathbb{Q}$ and then base
        change to $\mathbb{R}$.
      * f, a ring element (Macaulay2Doc), a polynomial $f\in
        k[x]$ where $k$ is a field of characteristic not 2
      * g, a ring element (Macaulay2Doc), a polynomial $g\in
        k[x]$ where $k$ is a field of characteristic not 2 and $g$ is not
        identically zero, such that $f/g$ is a pointed rational function
      * p, a ring element (Macaulay2Doc), a point
        $p\in\mathbb{P}^{1}_{k}$ corresponding to a root of the rational
        function $f/g$ in the field $k$
      * p, a number (Macaulay2Doc), a point
        $p\in\mathbb{P}^{1}_{k}$ corresponding to a root of the rational
        function $f/g$ in the field $k$
  * Optional inputs (Macaulay2Doc),:
      * linearTolerance => a real number (Macaulay2Doc), default
        value .000001, a positive real number used to determine whether roots
        of f and g are considered equal when working over the inexact field
        $\mathbb{C}$, used to put rational functions over $\mathbb{C}$ in
        reduced form by cancelling roots that agree up to the tolerance
  * Outputs:
      * an Unstable Grothendieck-Witt Class,
        the class
        $\text{deg}_{p}^{\mathbb{A}^{1}}(f/g)$ in the unstable
        Grothendieck-Witt group $\text{GW}^{u}(k)$

Description
===========

Given a pointed rational function $f/g:\mathbb{P}^{1}_{k}\to\mathbb{P}^{1}_{k}$
(where $(f/g)(\infty)=\infty$) and a zero $p\in\mathbb{A}^{1}_{k}$ (as $f/g$ is
pointed), we may compute its local unstable $\mathbb{A}^{1}$-Brouwer degree
valued in the unstable Grothendieck-Witt group $\text{GW}^{u}(k)$.

For mathematical background on the local unstable $\mathbb{A}^{1}$-Brouwer
degree, see global unstable A1-degrees.

If the rational function is non-reduced, then the reduction is computed,
checked for pointedness, and the local degree computation run on the reduction.
See global unstable A1-degrees, for more
details.

+------------------------------------+
|i1 : frac QQ[x];                    |
+------------------------------------+
|i2 : q = (x^2 + x - 2)/(3*x + 5);   |
+------------------------------------+
|i3 : getLocalUnstableA1Degree(q, -2)|
|                                    |
|               1                    |
|o3 = (| 1/3 |, -)                   |
|               3                    |
|                                    |
|o3 : UnstableGrothendieckWittClass  |
+------------------------------------+

See also
========

  * getGlobalUnstableA1Degree -- computes the
    global unstable $\mathbb{A}^{1}$-Brouwer degree of a pointed rational
    function $f/g:\mathbb{P}^{1}_{k}\to\mathbb{P}^{1}_{k}$
  * getLocalA1Degree -- computes a local
    $\mathbb{A}^{1}$-Brouwer degree of a list of $n$ polynomials in $n$
    variables over a field $k$ at a prime ideal in the zero locus
  * getGlobalA1Degree -- computes the global
    $\mathbb{A}^{1}$-Brouwer degree of a list of $n$ polynomials in $n$
    variables over a field $k$
  * getSumDecomposition -- produces a simplified
    diagonal representative of a Grothendieck-Witt class or unstable
    Grothendieck-Witt class
  * getSumDecompositionString -- produces a
    simplified string representation of a Grothendieck-Witt class or unstable
    Grothendieck-Witt class

Ways to use getLocalUnstableA1Degree:
=====================================

  * "getLocalUnstableA1Degree(RingElement,Number)"
  * "getLocalUnstableA1Degree(RingElement,RingElement)"
  * "getLocalUnstableA1Degree(RingElement,RingElement,Number)"
  * "getLocalUnstableA1Degree(RingElement,RingElement,RingElement)"

For the programmer
==================

The object getLocalUnstableA1Degree, is a
method function with options (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in
A1BrouwerDegrees/Documentation/UnstableLocalGlobalDegreesDoc.m2:119:0.

getMatrix -- returns the Gram matrix of a stable or unstable Grothendieck-Witt class
************************************************************************************

  * Usage:
        getMatrix(beta)
  * Inputs:
      * beta, a Grothendieck-Witt Class, a
        Grothendieck-Witt class
      * beta, an Unstable Grothendieck-Witt Class,
        an unstable Grothendieck-Witt class
  * Outputs:
      * a matrix (Macaulay2Doc), the Gram matrix of the
        Grothendieck-Witt class or unstable Grothendieck-Witt class

Description
===========

Given a GrothendieckWittClass or UnstableGrothendieckWittClass object beta,
this method returns the Gram matrix of the Grothendieck-Witt class or unstable
Grothendieck-Witt class. The Gram matrix is a symmetric matrix over the algebra
of the Grothendieck-Witt class or unstable Grothendieck-Witt class.

+----------------------------------+
|i1 : M = matrix(QQ, {{0,1},{1,0}})|
|                                  |
|o1 = | 0 1 |                      |
|     | 1 0 |                      |
|                                  |
|              2       2           |
|o1 : Matrix QQ  <-- QQ            |
+----------------------------------+
|i2 : getMatrix makeGWClass M      |
|                                  |
|o2 = | 0 1 |                      |
|     | 1 0 |                      |
|                                  |
|              2       2           |
|o2 : Matrix QQ  <-- QQ            |
+----------------------------------+
|i3 : getMatrix makeGWuClass(M, -4)|
|                                  |
|o3 = | 0 1 |                      |
|     | 1 0 |                      |
|                                  |
|              2       2           |
|o3 : Matrix QQ  <-- QQ            |
+----------------------------------+

See also
========

  * GrothendieckWittClass -- a new type intended
    to capture the isomorphism class of an element of the Grothendieck-Witt
    ring of a field or finite étale algebras over a field
  * UnstableGrothendieckWittClass -- a
    new type intended to capture an element of the unstable Grothendieck-Witt
    group of a field or finite étale algebras over a field
  * getAlgebra -- returns the algebra over which a stable or
    unstable Grothendieck-Witt class is defined
  * getBaseField -- returns the base field of a stable or
    unstable Grothendieck-Witt class
  * getScalar -- returns the non-zero scalar of an unstable
    Grothendieck-Witt class
  * makeGWClass -- the Grothendieck-Witt class of a
    symmetric matrix
  * makeGWuClass -- constructor for unstable
    Grothendieck-Witt classes

Ways to use getMatrix:
======================

  * "getMatrix(GrothendieckWittClass)"
  * "getMatrix(UnstableGrothendieckWittClass)"

For the programmer
==================

The object getMatrix, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in
A1BrouwerDegrees/Documentation/UnstableGrothendieckWittClassesDoc.m2:222:0.

getMultiplicationMatrix -- Computes the matrix over a $k$-basis for multiplication by an element in a finite dimensional $k$-algebra
************************************************************************************************************************************

  * Usage:
        getMultiplicationMatrix(C,a)
        getMultiplicationMatrix(S,I,b)
  * Inputs:
      * C, a ring (Macaulay2Doc), a finite dimensional $k$-algebra
      * a, a thing (Macaulay2Doc), an element in C
      * S, a ring (Macaulay2Doc), a polynomial ring
      * I, an ideal (Macaulay2Doc), an ideal in the polynomial
        ring S
      * b, a thing (Macaulay2Doc), an element in S
  * Outputs:
      * a matrix (Macaulay2Doc), the matrix representation over a
        basis for multiplication by the given element

Description
===========

For an algebra C over a field $k$ or a polynomial ring S and an ideal I, this
function generates a matrix with entries in $k$ representing multiplication by
the user-prescribed element in C or S/I respectively.

We compute the multiplication matrix of the element 1+a*b+b*c+c*a in the
algebra L[a,b,c]/(a^2,b^2,c^2), where L is the cyclotomic extension
$\mathbb{Q}(\zeta_{7})$ represented as the quotient of the polynomial ring
$\mathbb{Q}[x]$ by the ideal generated by the polynomial
$x^6+x^5+x^4+x^3+x^2+x+1$. The multiplication matrix is computed over L with
respect to the basis $\{1,a,b,c\}$.

+------------------------------------------------------------------------+
|i1 : L = QQ[x]/(x^6+x^5+x^4+x^3+x^2+x+1);                               |
+------------------------------------------------------------------------+
|i2 : F = toField L;                                                     |
+------------------------------------------------------------------------+
|i3 : getMultiplicationMatrix(F[a,b,c], ideal(a^2,b^2,c^2),1+a*b+b*c+c*a)|
|                                                                        |
|o3 = | 1 0 0 0 0 0 0 0 |                                                |
|     | 0 1 0 0 0 0 0 0 |                                                |
|     | 1 0 1 0 0 0 0 0 |                                                |
|     | 0 1 0 1 0 1 0 1 |                                                |
|     | 1 0 0 0 1 0 0 0 |                                                |
|     | 0 0 0 0 0 1 0 0 |                                                |
|     | 1 0 0 0 0 0 1 0 |                                                |
|     | 0 0 0 0 0 0 0 1 |                                                |
|                                                                        |
|             8      8                                                   |
|o3 : Matrix F  <-- F                                                    |
+------------------------------------------------------------------------+

Alternatively for a $k$-algebra C, we can compute the multiplication matrix of
an element b with respect to a basis of C.

+----------------------------------------+
|i4 : R = QQ[x,y]/(x^2+y^2+1, 3*x+2);    |
+----------------------------------------+
|i5 : getMultiplicationMatrix(R, 1+y*x^2)|
|                                        |
|o5 = | 1   -52/81 |                     |
|     | 4/9 1      |                     |
|                                        |
|              2       2                 |
|o5 : Matrix QQ  <-- QQ                  |
+----------------------------------------+

See also
========

  * getTrace -- Computes the trace over $k$ for an element in
    a finite dimensional $k$ -algebra
  * getNorm -- Computes the norm over $k$ for an element in a
    finite dimensional $k$-algebra

Ways to use getMultiplicationMatrix:
====================================

  * "getMultiplicationMatrix(Ring,Ideal,Thing)"
  * "getMultiplicationMatrix(Ring,Thing)"

For the programmer
==================

The object getMultiplicationMatrix, is a
method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in
A1BrouwerDegrees/Documentation/TraceAndNormDoc.m2:43:0.

getNorm -- Computes the norm over $k$ for an element in a finite dimensional $k$-algebra
****************************************************************************************

  * Usage:
        getNorm(C,a)
        getNorm(S,I,b)
  * Inputs:
      * C, a ring (Macaulay2Doc), a finite dimensional $k$-algebra
      * a, a thing (Macaulay2Doc), an element in C
      * S, a ring (Macaulay2Doc), a polynomial ring
      * I, an ideal (Macaulay2Doc), an ideal in the polynomial
        ring S
      * b, a thing (Macaulay2Doc), an element in S
  * Outputs:
      * a ring element (Macaulay2Doc), the norm over $k$ for
        an element in the algebra

Description
===========

For an element in an algebra C over a field $k$ or a polynomial ring S and an
ideal I, this function computes the norm over $k$ as the determinant of the
getMultiplicationMatrix, of the element.

+--------------------------------------------------------+
|i1 : L = QQ[x]/(x^6+x^5+x^4+x^3+x^2+x+1);               |
+--------------------------------------------------------+
|i2 : F = toField L;                                     |
+--------------------------------------------------------+
|i3 : getNorm(F[a,b,c], ideal(a^2,b^2,c^2),1+a*b+b*c+c*a)|
|                                                        |
|o3 = 1                                                  |
|                                                        |
|o3 : F                                                  |
+--------------------------------------------------------+
|i4 : R = QQ[x,y]/(x^2+y^2+1, 3*x+2);                    |
+--------------------------------------------------------+
|i5 : getNorm(R, 1+y*x^2)                                |
|                                                        |
|     937                                                |
|o5 = ---                                                |
|     729                                                |
|                                                        |
|o5 : QQ                                                 |
+--------------------------------------------------------+

See also
========

  * getMultiplicationMatrix -- Computes the
    matrix over a $k$-basis for multiplication by an element in a finite
    dimensional $k$-algebra
  * getTrace -- Computes the trace over $k$ for an element in
    a finite dimensional $k$ -algebra

Ways to use getNorm:
====================

  * "getNorm(Ring,Ideal,Thing)"
  * "getNorm(Ring,Thing)"

For the programmer
==================

The object getNorm, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in
A1BrouwerDegrees/Documentation/TraceAndNormDoc.m2:122:0.

getPadicValuation -- p-adic valuation of a rational number
**********************************************************

  * Usage:
        getPadicValuation(a, p)
  * Inputs:
      * a, a rational number (Macaulay2Doc), a non-zero rational
        number in $\mathbb{Q}_p$
      * p, an integer (Macaulay2Doc), a prime number
  * Outputs:
      * an integer (Macaulay2Doc), $n$ where $a=up^n$ and $u$ is a
        unit in $\mathbb{Z}_p$

Description
===========

This function computes the $p$-adic valuation of a rational number $a$, which
is the exponent of the prime $p$ in the factorization of $a$ in $\mathbb{Q}_p$.
It returns the integer $n$ such that $a=up^{n}$, where $u$ is a unit in
$\mathbb{Z}_p$.

+-----------------------------+
|i1 : a = 363/7;              |
+-----------------------------+
|i2 : getPadicValuation(a, 11)|
|                             |
|o2 = 2                       |
+-----------------------------+

We have that $363/7 = \frac{3\cdot 11^{2}}{7}$, so the $11$-adic valuation is
$2$.

Ways to use getPadicValuation:
==============================

  * "getPadicValuation(QQ,ZZ)"
  * "getPadicValuation(ZZ,ZZ)"

For the programmer
==================

The object getPadicValuation, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in
A1BrouwerDegrees/Documentation/ArithmeticMethodsDoc.m2:27:0.

getRank -- calculates the rank of a symmetric bilinear form
***********************************************************

  * Usage:
        getRank(beta)
  * Inputs:
      * beta, a Grothendieck-Witt Class, a
        symmetric bilinear form defined over $\mathbb{Q}$
  * Outputs:
      * an integer (Macaulay2Doc), the rank of the symmetric bilinear
        form $\beta$

Description
===========

The rank of a symmetric bilinear form is the dimension of the vector space
spanned by the vectors that are orthogonal to all other vectors in the space.
This is equivalent to the number of non-zero entries on the diagonal of a
diagonalized form.

+--------------------------------------------+
|i1 : beta = makeDiagonalForm(QQ, (3,5,7,11))|
|                                            |
|o1 = | 3 0 0 0  |                           |
|     | 0 5 0 0  |                           |
|     | 0 0 7 0  |                           |
|     | 0 0 0 11 |                           |
|                                            |
|o1 : GrothendieckWittClass                  |
+--------------------------------------------+
|i2 : getRank beta                           |
|                                            |
|o2 = 4                                      |
+--------------------------------------------+

See also
========

  * isIsomorphicForm -- determines whether two
    (unstable) Grothendieck-Witt classes over
    $\mathbb{C},\mathbb{R},\mathbb{Q}$ or a finite field of characteristic not
    2 are isomorphic.
  * getSignature -- computes the signature of a symmetric
    bilinear form over the real numbers or rational numbers

Ways to use getRank:
====================

  * "getRank(GrothendieckWittClass)"
  * "getRank(Matrix)"

For the programmer
==================

The object getRank, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in
A1BrouwerDegrees/Documentation/GWInvariantsDoc.m2:136:0.

getRelevantPrimes -- outputs a list containing all primes $p$ where the Hasse-Witt invariant of a symmetric bilinear form is nontrivial
***************************************************************************************************************************************

  * Usage:
        getRelevantPrimes(beta)
  * Inputs:
      * beta, a Grothendieck-Witt Class, denoted
        by $\beta \in \text{GW}(\mathbb{Q})$
  * Outputs:
      * a list (Macaulay2Doc), a finite list of primes
        $(p_1,\ldots,p_r)$ containing all primes $p$ where the Hasse-Witt
        invariant $\phi_p(\beta)$ is nontrivial

Description
===========

It is a classical result that the Hasse-Witt invariants of a quadratic form are
equal to 1 for all but finitely many primes (see e.g. [S73, IV Section 3.3]).
As the Hasse-Witt invariants are computed as a product of Hilbert symbols of
the pairwise entries appearing on a diagonalization of the symbol, it suffices
to consider primes dividing diagonal entries.

+-------------------------------------------+
|i1 : beta = makeDiagonalForm(QQ, (6,7,22));|
+-------------------------------------------+
|i2 : getRelevantPrimes(beta)               |
|                                           |
|o2 = {2, 3, 7, 11}                         |
|                                           |
|o2 : List                                  |
+-------------------------------------------+

References
==========

[S73] J.P. Serre, "A course in arithmetic," Springer-Verlag, 1973.

See also
========

  * getHasseWittInvariant -- computes the
    Hasse-Witt invariant at a prime $p$ for the quadratic form of the
    Grothendieck-Witt class

Ways to use getRelevantPrimes:
==============================

  * "getRelevantPrimes(GrothendieckWittClass)"

For the programmer
==================

The object getRelevantPrimes, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in
A1BrouwerDegrees/Documentation/GWInvariantsDoc.m2:111:0.

getScalar -- returns the non-zero scalar of an unstable Grothendieck-Witt class
*******************************************************************************

  * Usage:
        getScalar(beta)
  * Inputs:
      * beta, an Unstable Grothendieck-Witt Class,
        an unstable Grothendieck-Witt class
  * Outputs:
      * a ring element (Macaulay2Doc), the non-zero scalar
        of the unstable Grothendieck-Witt class

Description
===========

Given an UnstableGrothendieckWittClass object beta, this method returns the
non-zero scalar of the unstable Grothendieck-Witt class. This scalar is an
element of the base field or finite étale algebra of the unstable
Grothendieck-Witt class.

+----------------------------------+
|i1 : M = matrix(QQ, {{0,1},{1,0}})|
|                                  |
|o1 = | 0 1 |                      |
|     | 1 0 |                      |
|                                  |
|              2       2           |
|o1 : Matrix QQ  <-- QQ            |
+----------------------------------+
|i2 : getScalar makeGWuClass(M, -4)|
|                                  |
|o2 = -4                           |
|                                  |
|o2 : QQ                           |
+----------------------------------+

See also
========

  * UnstableGrothendieckWittClass -- a
    new type intended to capture an element of the unstable Grothendieck-Witt
    group of a field or finite étale algebras over a field
  * getAlgebra -- returns the algebra over which a stable or
    unstable Grothendieck-Witt class is defined
  * getBaseField -- returns the base field of a stable or
    unstable Grothendieck-Witt class
  * getMatrix -- returns the Gram matrix of a stable or
    unstable Grothendieck-Witt class
  * makeGWuClass -- constructor for unstable
    Grothendieck-Witt classes

Ways to use getScalar:
======================

  * "getScalar(UnstableGrothendieckWittClass)"

For the programmer
==================

The object getScalar, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in
A1BrouwerDegrees/Documentation/UnstableGrothendieckWittClassesDoc.m2:250:0.

getSignature -- computes the signature of a symmetric bilinear form over the real numbers or rational numbers
*************************************************************************************************************

  * Usage:
        getSignature(beta)
  * Inputs:
      * beta, a Grothendieck-Witt Class, a
        symmetric bilinear form defined over $\mathbb{Q}$ or $\mathbb{R}$
  * Outputs:
      * an integer (Macaulay2Doc), the signature of the symmetric
        bilinear form $\beta$

Description
===========

Given a symmetric bilinear form, after diagonalizing it, we can consider the
number of positive entries minus the number of negative entries appearing along
the diagonal. This is the signature of a symmetric bilinear form, and is one of
the primary invariants used to classify forms. For more information, see
isIsomorphicForm.

+-----------------------------------------------+
|i1 : M = matrix(RR, {{0,0,1},{0,1,0},{1,0,0}});|
|                                               |
|                3         3                    |
|o1 : Matrix RR    <-- RR                       |
|              53        53                     |
+-----------------------------------------------+
|i2 : beta = makeGWClass M;                     |
+-----------------------------------------------+
|i3 : getSignature beta                         |
|                                               |
|o3 = 1                                         |
+-----------------------------------------------+

See also
========

  * isIsomorphicForm -- determines whether two
    (unstable) Grothendieck-Witt classes over
    $\mathbb{C},\mathbb{R},\mathbb{Q}$ or a finite field of characteristic not
    2 are isomorphic.
  * getHilbertSymbol -- computes the Hilbert symbol of
    two rational numbers at a prime
  * getSumDecomposition -- produces a simplified
    diagonal representative of a Grothendieck-Witt class or unstable
    Grothendieck-Witt class
  * getSumDecompositionString -- produces a
    simplified string representation of a Grothendieck-Witt class or unstable
    Grothendieck-Witt class

Ways to use getSignature:
=========================

  * "getSignature(GrothendieckWittClass)"

For the programmer
==================

The object getSignature, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in
A1BrouwerDegrees/Documentation/GWInvariantsDoc.m2:28:0.

getSumDecomposition -- produces a simplified diagonal representative of a Grothendieck-Witt class or unstable Grothendieck-Witt class
*************************************************************************************************************************************

  * Usage:
        getSumDecomposition(beta)
  * Inputs:
      * beta, a Grothendieck-Witt Class, over
        $\mathbb{C},\mathbb{Q},\mathbb{R}$, or a finite field of characteristic
        not two
      * beta, an Unstable Grothendieck-Witt Class,
        over
        $\mathbb{C},\mathbb{Q},\mathbb{R}$, or a finite field of characteristic
        not two
  * Outputs:
      * a Grothendieck-Witt Class, a
        Grothendieck-Witt class which is a simplified diagonal representative
        of the input class
      * an Unstable Grothendieck-Witt Class,
        an unstable Grothendieck-Witt class
        with a simplified diagonal representative of the Grothendieck-Witt
        class factor

Description
===========

Given a Grothendieck-Witt class or unstable Grothendieck-Witt class over
$\mathbb{C},\mathbb{Q},\mathbb{R}$, or a finite field of characteristic not
two, this method produces a simplified diagonal representative of the class.
The result is a Grothendieck-Witt class or unstable Grothendieck-Witt class
decomposed as a sum of some number of hyperbolic and rank one forms. In the
unstable case, the result is the unstable Grothendieck-Witt class obtained by
applying the method to the Grothendieck-Witt class factor of the unstable
Grothendieck-Witt class.

We now describe the procedure for decomposing a Grothendieck-Witt class.

Over $\mathbb{C}$, symmetric bilinear forms are uniquely determined by their
rank. Thus the decomposition of a form of rank $n$ is a sum of
$\lfloor\frac{n}{2}\rfloor$ hyperbolic forms and a rank one form if $n$ is odd,
or $\frac{n}{2}$ hyperbolic forms if $n$ is even.

+-----------------------------------------------+
|i1 : M = matrix(CC, {{1,2,3},{2,4,5},{3,5,6}});|
|                                               |
|                3         3                    |
|o1 : Matrix CC    <-- CC                       |
|              53        53                     |
+-----------------------------------------------+
|i2 : alpha = makeGWClass M;                    |
+-----------------------------------------------+
|i3 : getSumDecomposition alpha                 |
|                                               |
|o3 = | 1 0 0  |                                |
|     | 0 1 0  |                                |
|     | 0 0 -1 |                                |
|                                               |
|o3 : GrothendieckWittClass                     |
+-----------------------------------------------+

Over $\mathbb{R}$, there are two square classes and a form is determined
uniquely by its rank and signature [L05, II Proposition 3.5]. The form below is
isomorphic to the form $\langle 1,-1,1\rangle$.

+-----------------------------------------------------------------------------+
|i4 : N = matrix(RR, {{2.091,2.728,6.747},{2.728,7.329,6.257},{6.747,6.257,   |
|                                                                             |
|                3         3                                                  |
|o4 : Matrix RR    <-- RR                                                     |
|              53        53                                                   |
|-----------------------------------------------------------------------------|
|0.294}});                                                                    |
+-----------------------------------------------------------------------------+
|i5 : beta = makeGWClass N;                                                   |
+-----------------------------------------------------------------------------+
|i6 : getSumDecomposition beta                                                |
|                                                                             |
|o6 = | 1 0 0  |                                                              |
|     | 0 1 0  |                                                              |
|     | 0 0 -1 |                                                              |
|                                                                             |
|o6 : GrothendieckWittClass                                                   |
+-----------------------------------------------------------------------------+

Over $\mathbb{Q}$, symmetric bilinear forms decompose into a sum of hyperbolic
forms and its anisotropic part.

+-----------------------------------------------+
|i7 : P = matrix(QQ, {{1,2,3},{2,4,5},{3,5,6}});|
|                                               |
|              3       3                        |
|o7 : Matrix QQ  <-- QQ                         |
+-----------------------------------------------+
|i8 : gamma = makeGWClass P;                    |
+-----------------------------------------------+
|i9 : getSumDecomposition gamma                 |
|                                               |
|o9 = | 1 0 0  |                                |
|     | 0 1 0  |                                |
|     | 0 0 -1 |                                |
|                                               |
|o9 : GrothendieckWittClass                     |
+-----------------------------------------------+

Over a finite field of characteristic not two, Grothendieck-Witt classes can
similarly be diagonalized and decomposed.

+---------------------------------------------------------------------+
|i10 : Q = matrix(GF(13), {{9,1,7,4},{1,10,3,2},{7,3,6,7},{4,2,7,5}});|
|                                                                     |
|                    4            4                                   |
|o10 : Matrix (GF 13)  <-- (GF 13)                                    |
+---------------------------------------------------------------------+
|i11 : delta = makeGWClass Q;                                         |
+---------------------------------------------------------------------+
|i12 : getSumDecomposition delta                                      |
|                                                                     |
|o12 = | 1 0  0 0  |                                                  |
|      | 0 -5 0 0  |                                                  |
|      | 0 0  1 0  |                                                  |
|      | 0 0  0 -1 |                                                  |
|                                                                     |
|o12 : GrothendieckWittClass                                          |
+---------------------------------------------------------------------+

References
==========

[L05] Lam, T. Y., Introduction to Quadratic Forms over Fields, American
Mathematical Society, 2005.

See also
========

  * getSumDecompositionString -- produces a
    simplified string representation of a Grothendieck-Witt class or unstable
    Grothendieck-Witt class
  * getAnisotropicPart -- produces the anisotropic
    part of a Grothendieck-Witt class
  * getWittIndex -- returns the Witt index of a symmetric
    bilinear form

Ways to use getSumDecomposition:
================================

  * "getSumDecomposition(GrothendieckWittClass)"
  * "getSumDecomposition(UnstableGrothendieckWittClass)"

For the programmer
==================

The object getSumDecomposition, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in
A1BrouwerDegrees/Documentation/DecompositionDoc.m2:56:0.

getSumDecompositionString -- produces a simplified string representation of a Grothendieck-Witt class or unstable Grothendieck-Witt class
*****************************************************************************************************************************************

  * Usage:
        getSumDecompositionString(beta)
  * Inputs:
      * beta, a Grothendieck-Witt Class, over
        $\mathbb{C},\mathbb{Q},\mathbb{R}$, or a finite field of characteristic
        not two
      * beta, an Unstable Grothendieck-Witt Class,
        over
        $\mathbb{C},\mathbb{Q},\mathbb{R}$, or a finite field of characteristic
        not two
  * Outputs:
      * a string (Macaulay2Doc), a string representing a
        simplified diagonal representative of the class

Description
===========

Given a Grothendieck-Witt class or unstable Grothendieck-Witt class over
$\mathbb{C},\mathbb{Q},\mathbb{R}$, or a finite field of characteristic not
two, this method produces a string representing a simplified diagonal
representative of the class.

See getSumDecomposition, for more details on the
decomposition procedure.

+-----------------------------------------------------------------------------+
|i1 : M = matrix(CC, {{1,2,3},{2,4,5},{3,5,6}});                              |
|                                                                             |
|                3         3                                                  |
|o1 : Matrix CC    <-- CC                                                     |
|              53        53                                                   |
+-----------------------------------------------------------------------------+
|i2 : alpha = makeGWClass M;                                                  |
+-----------------------------------------------------------------------------+
|i3 : getSumDecompositionString alpha                                         |
|                                                                             |
|o3 = H + <1>                                                                 |
+-----------------------------------------------------------------------------+
|i4 : N = matrix(RR, {{2.091,2.728,6.747},{2.728,7.329,6.257},{6.747,6.257,   |
|                                                                             |
|                3         3                                                  |
|o4 : Matrix RR    <-- RR                                                     |
|              53        53                                                   |
|-----------------------------------------------------------------------------|
|0.294}});                                                                    |
+-----------------------------------------------------------------------------+
|i5 : beta = makeGWClass N;                                                   |
+-----------------------------------------------------------------------------+
|i6 : getSumDecompositionString beta                                          |
|                                                                             |
|o6 = H + <1>                                                                 |
+-----------------------------------------------------------------------------+
|i7 : P = matrix(QQ, {{1,2,3},{2,4,5},{3,5,6}});                              |
|                                                                             |
|              3       3                                                      |
|o7 : Matrix QQ  <-- QQ                                                       |
+-----------------------------------------------------------------------------+
|i8 : gamma = makeGWClass P;                                                  |
+-----------------------------------------------------------------------------+
|i9 : getSumDecompositionString gamma                                         |
|                                                                             |
|o9 = H + <1>                                                                 |
+-----------------------------------------------------------------------------+
|i10 : Q = matrix(GF(13), {{9,1,7,4},{1,10,3,2},{7,3,6,7},{4,2,7,5}});        |
|                                                                             |
|                    4            4                                           |
|o10 : Matrix (GF 13)  <-- (GF 13)                                            |
+-----------------------------------------------------------------------------+
|i11 : delta = makeGWClass Q;                                                 |
+-----------------------------------------------------------------------------+
|i12 : getSumDecompositionString delta                                        |
|                                                                             |
|o12 = H + <1> + <-5>                                                         |
+-----------------------------------------------------------------------------+

See also
========

  * getSumDecomposition -- produces a simplified
    diagonal representative of a Grothendieck-Witt class or unstable
    Grothendieck-Witt class
  * getAnisotropicPart -- produces the anisotropic
    part of a Grothendieck-Witt class
  * getWittIndex -- returns the Witt index of a symmetric
    bilinear form

Ways to use getSumDecompositionString:
======================================

  * "getSumDecompositionString(GrothendieckWittClass)"
  * "getSumDecompositionString(UnstableGrothendieckWittClass)"

For the programmer
==================

The object getSumDecompositionString, is a
method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in
A1BrouwerDegrees/Documentation/DecompositionDoc.m2:97:0.

getTrace -- Computes the trace over $k$ for an element in a finite dimensional $k$ -algebra
*******************************************************************************************

  * Usage:
        getTrace(C,a)
        getTrace(S,I,b)
  * Inputs:
      * C, a ring (Macaulay2Doc), a finite dimensional $k$-algebra
      * a, a thing (Macaulay2Doc), an element in C
      * S, a ring (Macaulay2Doc), a polynomial ring
      * I, an ideal (Macaulay2Doc), an ideal in the polynomial
        ring S
      * b, a thing (Macaulay2Doc), an element in S
  * Outputs:
      * a ring element (Macaulay2Doc), the trace over $k$
        for an element in the algebra

Description
===========

For an element in an algebra C over a field $k$ or a polynomial ring S and an
ideal I, this function computes the trace over $k$ as the trace of the
getMultiplicationMatrix, of the element.

+---------------------------------------------------------+
|i1 : L = QQ[x]/(x^6+x^5+x^4+x^3+x^2+x+1);                |
+---------------------------------------------------------+
|i2 : F = toField L;                                      |
+---------------------------------------------------------+
|i3 : getTrace(F[a,b,c], ideal(a^2,b^2,c^2),1+a*b+b*c+c*a)|
|                                                         |
|o3 = 8                                                   |
|                                                         |
|o3 : F                                                   |
+---------------------------------------------------------+
|i4 : R = QQ[x,y]/(x^2+y^2+1, 3*x+2);                     |
+---------------------------------------------------------+
|i5 : getTrace(R, 1+y*x^2)                                |
|                                                         |
|o5 = 2                                                   |
|                                                         |
|o5 : QQ                                                  |
+---------------------------------------------------------+

See also
========

  * getMultiplicationMatrix -- Computes the
    matrix over a $k$-basis for multiplication by an element in a finite
    dimensional $k$-algebra
  * getNorm -- Computes the norm over $k$ for an element in a
    finite dimensional $k$-algebra
  * transferGW -- the transfer of Grothendieck-Witt from an
    étale algebras to a base field

Ways to use getTrace:
=====================

  * "getTrace(Ring,Ideal,Thing)"
  * "getTrace(Ring,Thing)"

For the programmer
==================

The object getTrace, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in
A1BrouwerDegrees/Documentation/TraceAndNormDoc.m2:82:0.

getWittIndex -- returns the Witt index of a symmetric bilinear form
*******************************************************************

  * Usage:
        getWittIndex beta
  * Inputs:
      * beta, a Grothendieck-Witt Class, a
        GrothendieckWittClass denoted by $\beta\in\text{GW}(k)$, where $k$ is
        $\mathbb{Q}$, $\mathbb{R}$, $\mathbb{C}$, or a finite field of
        characteristic not 2
  * Outputs:
      * an integer (Macaulay2Doc), the rank of the totally isotropic
        part of $\beta$

Description
===========

By the Witt Decomposition Theorem, any non-degenerate form decomposes uniquely
as $\beta \cong n \mathbb{H} \oplus \beta_a$ where the form $\beta_a$ is
anisotropic. The integer $n$ is called the Witt index of $\beta$. See for
instance [L05, I.4.3].

References
==========

[L05] T.Y. Lam, "Introduction to quadratic forms over fields," American
Mathematical Society, 2005.

See also
========

  * getAnisotropicDimension -- returns the
    anisotropic dimension of a symmetric bilinear form

Ways to use getWittIndex:
=========================

  * "getWittIndex(GrothendieckWittClass)"

For the programmer
==================

The object getWittIndex, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in
A1BrouwerDegrees/Documentation/AnisotropicDimensionDoc.m2:76:0.

GrothendieckWittClass -- a new type intended to capture the isomorphism class of an element of the Grothendieck-Witt ring of a field or finite étale algebras over a field
**************************************************************************************************************************************************************************

Description
===========

A GrothendieckWittClass object is a type of HashTable (Macaulay2Doc),
encoding the isomorphism class of a non-degenerate
symmetric bilinear form $V\times V\to k$ over a field or finite étale algebra
over a field.

Given any basis $e_1,\ldots,e_n$ for $V$ as a $k$-vector space, we can encode
the symmetric bilinear form $\beta$ by how it acts on basis elements. That is,
we can produce a matrix $\left(\beta(e_i,e_j)\right)_{i,j}$. This is called a
Gram matrix for the symmetric bilinear form. A change of basis produces a
congruent Gram matrix, so thus a matrix represents a symmetric bilinear form
uniquely up to matrix congruence.

A GrothendieckWittClass object can be built from a symmetric matrix (Macaulay2Doc),
over a field using the makeGWClass,
method.

+-------------------------------------------------+
|i1 : R = QQ[x]/(x^2 + 1);                        |
+-------------------------------------------------+
|i2 : beta = makeGWClass matrix(R, {{1,2},{2,x}});|
+-------------------------------------------------+
|i3 : class beta                                  |
|                                                 |
|o3 = GrothendieckWittClass                       |
|                                                 |
|o3 : Type                                        |
+-------------------------------------------------+

The underlying matrix of a GrothendieckWittClass object can be accessed using
the getMatrix, method which is the Gram matrix of the
symmetric bilinear form represented by the GrothendieckWittClass object. This
matrix is a symmetric matrix over the base algebra of the GrothendieckWittClass
object which can be retrieved using the getAlgebra, method.
If further the GrothendieckWittClass object is over a field, then the field can
be retrieved using the getBaseField, method.

+----------------------+
|i4 : getMatrix beta   |
|                      |
|o4 = | 1 2 |          |
|     | 2 x |          |
|                      |
|             2      2 |
|o4 : Matrix R  <-- R  |
+----------------------+
|i5 : getAlgebra beta  |
|                      |
|o5 = R                |
|                      |
|o5 : QuotientRing     |
+----------------------+
|i6 : getBaseField beta|
|                      |
|o6 = R[]              |
|                      |
|o6 : PolynomialRing   |
+----------------------+

For computational purposes, it is often useful to have a GrothendieckWittClass
diagonalize the Gram-matrix representative of the symmetric bilinear form. This
can be done using the getDiagonalClass, method. The
diagonalization is done over the base algebra of the GrothendieckWittClass
object, and the result is a new GrothendieckWittClass object with a diagonal
Gram matrix which is stored in the cache for quick recovery later on.

+-------------------------------------------+
|i7 : diagonalClass = getDiagonalClass beta;|
+-------------------------------------------+
|i8 : beta.cache.getDiagonalClass           |
|                                           |
|o8 = | 1 0   |                             |
|     | 0 x-4 |                             |
|                                           |
|o8 : GrothendieckWittClass                 |
+-------------------------------------------+

We additionally have the following methods which can be applied to
Grothendieck-Witt classes:

  * getRank,: returns the rank of a form,
  * getSignature,: returns the signature of a form over the
    real numbers or rational numbers,
  * getIntegralDiscriminant,: returns an
    integral representative for the discriminant of a form over the rational
    numbers,
  * getHasseWittInvariant,: returns the Hasse-Witt
    invariant for a form over the rational numbers at a particular prime,
  * getAnisotropicDimension,: returns the
    anisotropic dimension of a form,
  * getAnisotropicPart,: returns the anisotropic part
    of a form,
  * getSumDecomposition,: returns a simplified
    diagonal representative of a form,
  * getSumDecompositionString,: returns a
    string to quickly read a form,

and Boolean methods for Grothendieck-Witt classes:

  * isIsotropic,: returns whether the form is isotropic,
  * isAnisotropic,: returns whether the form is
    anisotropic.

See also
========

  * makeGWClass -- the Grothendieck-Witt class of a
    symmetric matrix
  * getAlgebra -- returns the algebra over which a stable or
    unstable Grothendieck-Witt class is defined
  * getBaseField -- returns the base field of a stable or
    unstable Grothendieck-Witt class
  * getMatrix -- returns the Gram matrix of a stable or
    unstable Grothendieck-Witt class
  * getDiagonalClass -- produces a diagonalized form
    for any (unstable) Grothendieck-Witt class, with simplified terms on the
    diagonal

Functions and methods returning a Grothendieck-Witt Class:
==========================================================

  * "addGW(GrothendieckWittClass,GrothendieckWittClass)" -- see addGW,
    -- the direct sum of two Grothendieck-Witt classes
  * "getAnisotropicPart(GrothendieckWittClass)" -- see
    getAnisotropicPart, -- produces the anisotropic part of
    a Grothendieck-Witt class
  * "getDiagonalClass(GrothendieckWittClass)" -- see getDiagonalClass,
    -- produces a diagonalized form for any (unstable)
    Grothendieck-Witt class, with simplified terms on the diagonal
  * "getGlobalA1Degree(List)" -- see getGlobalA1Degree,
    -- computes the global $\mathbb{A}^{1}$-Brouwer degree
    of a list of $n$ polynomials in $n$ variables over a field $k$
  * "getGWClass(UnstableGrothendieckWittClass)" -- see getGWClass,
    -- returns the Grothendieck-Witt class of the stable part of an
    unstable Grothendieck-Witt class
  * "getLocalA1Degree(List,Ideal)" -- see getLocalA1Degree,
    -- computes a local $\mathbb{A}^{1}$-Brouwer degree of a
    list of $n$ polynomials in $n$ variables over a field $k$ at a prime ideal
    in the zero locus
  * "getSumDecomposition(GrothendieckWittClass)" -- see
    getSumDecomposition, -- produces a simplified diagonal
    representative of a Grothendieck-Witt class or unstable Grothendieck-Witt
    class
  * "makeDiagonalForm(InexactFieldFamily,Number)" -- see
    makeDiagonalForm, -- the Grothendieck-Witt class of a
    diagonal form
  * "makeDiagonalForm(InexactFieldFamily,RingElement)" -- see
    makeDiagonalForm, -- the Grothendieck-Witt class of a
    diagonal form
  * "makeDiagonalForm(InexactFieldFamily,Sequence)" -- see
    makeDiagonalForm, -- the Grothendieck-Witt class of a
    diagonal form
  * "makeDiagonalForm(Ring,Number)" -- see makeDiagonalForm,
    -- the Grothendieck-Witt class of a diagonal form
  * "makeDiagonalForm(Ring,RingElement)" -- see makeDiagonalForm,
    -- the Grothendieck-Witt class of a diagonal form
  * "makeDiagonalForm(Ring,Sequence)" -- see makeDiagonalForm,
    -- the Grothendieck-Witt class of a diagonal form
  * "makeGWClass(Matrix)" -- see makeGWClass, -- the
    Grothendieck-Witt class of a symmetric matrix
  * "makeHyperbolicForm(InexactFieldFamily)" -- see makeHyperbolicForm,
    -- the Grothendieck-Witt class of a hyperbolic form
  * "makeHyperbolicForm(InexactFieldFamily,ZZ)" -- see
    makeHyperbolicForm, -- the Grothendieck-Witt class of a
    hyperbolic form
  * "makeHyperbolicForm(Ring)" -- see makeHyperbolicForm,
    -- the Grothendieck-Witt class of a hyperbolic form
  * "makeHyperbolicForm(Ring,ZZ)" -- see makeHyperbolicForm,
    -- the Grothendieck-Witt class of a hyperbolic form
  * "makePfisterForm(InexactFieldFamily,Number)" -- see makePfisterForm,
    -- the Grothendieck-Witt class of a Pfister form
  * "makePfisterForm(InexactFieldFamily,RingElement)" -- see
    makePfisterForm, -- the Grothendieck-Witt class of a
    Pfister form
  * "makePfisterForm(InexactFieldFamily,Sequence)" -- see
    makePfisterForm, -- the Grothendieck-Witt class of a
    Pfister form
  * "makePfisterForm(Ring,Number)" -- see makePfisterForm,
    -- the Grothendieck-Witt class of a Pfister form
  * "makePfisterForm(Ring,RingElement)" -- see makePfisterForm,
    -- the Grothendieck-Witt class of a Pfister form
  * "makePfisterForm(Ring,Sequence)" -- see makePfisterForm,
    -- the Grothendieck-Witt class of a Pfister form
  * "multiplyGW(GrothendieckWittClass,GrothendieckWittClass)" -- see
    multiplyGW, -- the tensor product of two Grothendieck-Witt
    classes
  * "transferGW(GrothendieckWittClass)" -- see transferGW, --
    the transfer of Grothendieck-Witt from an étale algebras to a base field

Methods that use a Grothendieck-Witt Class:
===========================================

  * "getAlgebra(GrothendieckWittClass)" -- see getAlgebra, --
    returns the algebra over which a stable or unstable Grothendieck-Witt class
    is defined
  * "getAnisotropicDimension(GrothendieckWittClass)" -- see
    getAnisotropicDimension, -- returns the
    anisotropic dimension of a symmetric bilinear form
  * "getAnisotropicDimensionQQp(GrothendieckWittClass,ZZ)" -- see
    getAnisotropicDimensionQQp, -- returns the
    anisotropic dimension of a rational symmetric bilinear form over the p-adic
    rational numbers
  * "getBaseField(GrothendieckWittClass)" -- see getBaseField,
    -- returns the base field of a stable or unstable
    Grothendieck-Witt class
  * "getDiagonalEntries(GrothendieckWittClass)" -- see
    getDiagonalEntries, -- extracts a list of diagonal
    entries for a GrothendieckWittClass
  * "getHasseWittInvariant(GrothendieckWittClass,ZZ)" -- see
    getHasseWittInvariant, -- computes the Hasse-Witt
    invariant at a prime $p$ for the quadratic form of the Grothendieck-Witt
    class
  * "getIntegralDiscriminant(GrothendieckWittClass)" -- see
    getIntegralDiscriminant, -- computes the integral
    discriminant for a rational symmetric bilinear form
  * "getMatrix(GrothendieckWittClass)" -- see getMatrix, --
    returns the Gram matrix of a stable or unstable Grothendieck-Witt class
  * "getRank(GrothendieckWittClass)" -- see getRank, --
    calculates the rank of a symmetric bilinear form
  * "getRelevantPrimes(GrothendieckWittClass)" -- see getRelevantPrimes,
    -- outputs a list containing all primes $p$ where the
    Hasse-Witt invariant of a symmetric bilinear form is nontrivial
  * "getSignature(GrothendieckWittClass)" -- see getSignature,
    -- computes the signature of a symmetric bilinear form over
    the real numbers or rational numbers
  * "getSumDecompositionString(GrothendieckWittClass)" -- see
    getSumDecompositionString, -- produces a
    simplified string representation of a Grothendieck-Witt class or unstable
    Grothendieck-Witt class
  * "getWittIndex(GrothendieckWittClass)" -- see getWittIndex,
    -- returns the Witt index of a symmetric bilinear form
  * "net(GrothendieckWittClass)"
  * "texMath(GrothendieckWittClass)"
  * "isAnisotropic(GrothendieckWittClass)" -- see isAnisotropic,
    -- determines whether a Grothendieck-Witt class is
    anisotropic
  * "isIsomorphicForm(GrothendieckWittClass,GrothendieckWittClass)" -- see
    isIsomorphicForm, -- determines whether two
    (unstable) Grothendieck-Witt classes over
    $\mathbb{C},\mathbb{R},\mathbb{Q}$ or a finite field of characteristic not
    2 are isomorphic.
  * "isIsotropic(GrothendieckWittClass)" -- see isIsotropic,
    -- determines whether a Grothendieck-Witt class is isotropic
  * "makeGWuClass(GrothendieckWittClass)" -- see makeGWuClass,
    -- constructor for unstable Grothendieck-Witt classes
  * "makeGWuClass(GrothendieckWittClass,Number)" -- see makeGWuClass,
    -- constructor for unstable Grothendieck-Witt classes
  * "makeGWuClass(GrothendieckWittClass,RingElement)" -- see
    makeGWuClass, -- constructor for unstable Grothendieck-Witt
    classes

For the programmer
==================

The object GrothendieckWittClass, is a type (Macaulay2Doc),
with ancestor classes HashTable (Macaulay2Doc),
< Thing (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in
A1BrouwerDegrees/Documentation/GrothendieckWittClassesDoc.m2:57:0.

isAnisotropic -- determines whether a Grothendieck-Witt class is anisotropic
****************************************************************************

  * Usage:
        isAnisotropic beta
  * Inputs:
      * beta, a Grothendieck-Witt Class, denoted
        by $\beta\in\text{GW}(k)$, where $k$ is $\mathbb{C}$, $\mathbb{R}$,
        $\mathbb{Q}$, or a finite field of characteristic not 2
  * Outputs:
      * a Boolean value (Macaulay2Doc), whether $\beta$ is
        anisotropic

Description
===========

Recall a symmetric bilinear form $\beta$ is said to be isotropic if there
exists a nonzero vector $v$ for which $\beta(v,v) = 0$. Witt's decomposition
theorem implies that a non-degenerate symmetric bilinear form decomposes
uniquely into an isotropic and an anisotropic part. Certifying (an)isotropy is
then an important computational problem when working with the Grothendieck-Witt
ring.

Over $\mathbb{C}$, any form of rank two or higher contains a copy of the
hyperbolic form, and hence is isotropic. Thus we can determine anisotropy
simply by a consideration of rank.

+--------------------------------------------------------+
|i1 : isAnisotropic makeGWClass matrix(CC, {{3}})        |
|                                                        |
|o1 = true                                               |
+--------------------------------------------------------+
|i2 : isAnisotropic makeGWClass matrix(CC, {{2,0},{0,5}})|
|                                                        |
|o2 = false                                              |
+--------------------------------------------------------+

Forms over $\mathbb{R}$ are anisotropic if and only if all its diagonal entries
are positive or are negative.

+--------------------------------------------------------------------+
|i3 : isAnisotropic makeGWClass matrix(RR, {{3,0,0},{0,5,0},{0,0,7}})|
|                                                                    |
|o3 = true                                                           |
+--------------------------------------------------------------------+
|i4 : isAnisotropic makeGWClass matrix(RR, {{0,2},{2,0}})            |
|                                                                    |
|o4 = false                                                          |
+--------------------------------------------------------------------+

Over $\mathbb{Q}$, things become a bit more complicated. We can exploit the
local-to-global principle for isotropy (the Hasse-Minkowski principle), which
states that a form is isotropic over $\mathbb{Q}$ if and only if it is
isotropic over all its completions, meaning all the $p$-adic numbers and
$\mathbb{R}$ [L05, VI.3.1]. We note, however, the classical result that all
forms of rank $\ge 5$ in $\mathbb{Q}_p$ are isotropic [S73, IV Theorem 6]. Thus
isotropy in this range of ranks is equivalent to checking it over the real
numbers.

+-----------------------------------------------------------------------------+
|i5 : beta = makeGWClass matrix(QQ,                                           |
|-----------------------------------------------------------------------------|
|{{1,0,2,0,3},{0,6,1,1,-1},{2,1,5,2,0},{0,1,2,4,-1},{3,-1,0,-1,1}});          |
+-----------------------------------------------------------------------------+
|i6 : isAnisotropic beta                                                      |
|                                                                             |
|o6 = false                                                                   |
+-----------------------------------------------------------------------------+
|i7 : getDiagonalClass beta                                                   |
|                                                                             |
|o7 = | 1 0 0  0  0   |                                                       |
|     | 0 6 0  0  0   |                                                       |
|     | 0 0 30 0  0   |                                                       |
|     | 0 0 0  -5 0   |                                                       |
|     | 0 0 0  0  671 |                                                       |
|                                                                             |
|o7 : GrothendieckWittClass                                                   |
+-----------------------------------------------------------------------------+

For forms of rank $\le 4$, the problem reduces to computing the maximum
anisotropic dimension of the form over local fields. Ternary forms are
isotropic away from primes dividing the coefficients of the form in a diagonal
basis by e.g. [L05, VI.2.5(2)], so there are only finitely many places to
check. Over these relevant primes, isotropy of a form
$\beta \in \text{GW}(\mathbb{Q})$ over $\mathbb{Q}_p$ is equivalent to the
statement that $(-1,-\text{disc}(\beta))_p = H(\beta)$, where $H(\beta)$
denotes the Hasse-Witt invariant, attached to
$\beta$ and $(-,-)_p$ is the Hilbert Symbol.

Over finite fields, a form is anisotropic so long as it is nondegenerate, of
rank $\le 2$ and not isomorphic to the hyperbolic form.

+-----------------------------------------------------------------------+
|i8 : isAnisotropic makeGWClass matrix(GF(7), {{1,0,0},{0,1,0},{0,0,1}})|
|                                                                       |
|o8 = false                                                             |
+-----------------------------------------------------------------------+
|i9 : isAnisotropic makeGWClass matrix(GF(7), {{3,0},{0,3}})            |
|                                                                       |
|o9 = true                                                              |
+-----------------------------------------------------------------------+

A binary form $q$ is isotropic if and only if it is isomorphic to the
hyperbolic form, which implies in particular that the rank, see signature,
and discriminant, of $q$ agree
with that of $\mathbb{H}=\langle 1,-1\rangle$.

References
==========

[L05] T.Y. Lam, "Introduction to quadratic forms over fields," American
Mathematical Society, 2005.

[S73] J.P. Serre, "A course in arithmetic," Springer-Verlag, 1973.

See also
========

  * isIsotropic -- determines whether a Grothendieck-Witt
    class is isotropic
  * getAnisotropicDimension -- returns the
    anisotropic dimension of a symmetric bilinear form
  * getAnisotropicPart -- produces the anisotropic
    part of a Grothendieck-Witt class
  * getWittIndex -- returns the Witt index of a symmetric
    bilinear form

Ways to use isAnisotropic:
==========================

  * "isAnisotropic(GrothendieckWittClass)"
  * "isAnisotropic(Matrix)"

For the programmer
==================

The object isAnisotropic, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in
A1BrouwerDegrees/Documentation/IsotropyDoc.m2:77:0.

isIsomorphicForm -- determines whether two (unstable) Grothendieck-Witt classes over $\mathbb{C},\mathbb{R},\mathbb{Q}$ or a finite field of characteristic not 2 are isomorphic.
*********************************************************************************************************************************************************************************

  * Usage:
        isIsomorphicForm(alpha, beta)
        isIsomorphicForm(M, N)
  * Inputs:
      * alpha, a Grothendieck-Witt Class, denoted
        by $\alpha$ over $\mathbb{C},\mathbb{R},\mathbb{Q}$ or a finite field
        of characteristic not 2
      * beta, a Grothendieck-Witt Class, denoted
        by $\beta$ over $\mathbb{C},\mathbb{R},\mathbb{Q}$ or a finite field of
        characteristic not 2
      * alpha, an Unstable Grothendieck-Witt Class,
        denoted by $\alpha$ over
        $\mathbb{C},\mathbb{R},\mathbb{Q}$ or a finite field of characteristic
        not 2
      * beta, an Unstable Grothendieck-Witt Class,
        denoted by $\beta$ over
        $\mathbb{C},\mathbb{R},\mathbb{Q}$ or a finite field of characteristic
        not 2
      * M, a matrix (Macaulay2Doc), a symmetric matrix of full
        rank denoted by M over $\mathbb{C},\mathbb{R},\mathbb{Q}$ or a finite
        field of characteristic not 2
      * N, a matrix (Macaulay2Doc), a symmetric matrix of full
        rank denoted by N over $\mathbb{C},\mathbb{R},\mathbb{Q}$ or a finite
        field of characteristic not 2
  * Optional inputs (Macaulay2Doc),:
      * linearTolerance => a real number (Macaulay2Doc), default
        value .000001, a positive number specifying the tolerance to which the
        $k^{\times}$-factors of unstable Grothendieck-Witt classes over
        $\mathbb{R}$ or $\mathbb{C}$ are considered equal
  * Outputs:
      * a Boolean value (Macaulay2Doc), whether the two
        Grothendieck-Witt classes (resp. unstable Grothendieck-Witt classes)
        are equal as elements of the Grothendieck-Witt ring (resp. unstable
        Grothendieck-Witt group)

Description
===========

Determining if Grothendieck-Witt classes (resp. unstable Grothendieck-Witt
classes) $\alpha$ and $\beta$ over a field $k$ are isomorphic is to verify when
forms are isomorphic in the Grothendieck-Witt ring (resp. in the unstable
Grothendieck-Witt group). In the case of the unstable Grothendieck-Witt group,
the structure of the group $\text{GW}^{u}(k)$ as a fibered product
$\text{GW}(k)\times_{k^{\times}/(k^{\times})^{2}}k^{\times}$ implies that it
suffices to verify that their $\text{GW}(k)$-factors are isomorphic and their
$k^{\times}$-factors are equal.

Sylvester's Law of Inertia proves that any symmetric bilinear form can be
diagonalized into a block sum of rank one symmetric bilinear forms. Since the
rank one forms $\langle a\rangle:k\times k\to k, (x,y)\mapsto axy$ and $\langle
ab^{2}\rangle:k\times k\to k, (x,y)\mapsto ab^{2}xy$ differ by a change of
basis in the ground field, it follows that they are isomorphic (provided that
$a,b\neq0$). Thus after diagonalizing a form, it suffices to consider the
square class of each entry appearing along the diagonal.

+---------------------------------------------------------------+
|i1 : alpha = makeGWClass matrix(CC, {{2,3,1},{3,-1,0},{1,0,0}})|
|                                                               |
|o1 = | 2 3  1 |                                                |
|     | 3 -1 0 |                                                |
|     | 1 0  0 |                                                |
|                                                               |
|o1 : GrothendieckWittClass                                     |
+---------------------------------------------------------------+
|i2 : beta = makeGWClass matrix(CC, {{2,4,-1},{4,5,7},{-1,7,9}})|
|                                                               |
|o2 = | 2  4 -1 |                                               |
|     | 4  5 7  |                                               |
|     | -1 7 9  |                                               |
|                                                               |
|o2 : GrothendieckWittClass                                     |
+---------------------------------------------------------------+
|i3 : isIsomorphicForm(alpha,beta)                              |
|                                                               |
|o3 = true                                                      |
+---------------------------------------------------------------+

The two forms are isomorphic since they can be diagonalized, after which they
can be written as the identity matrix after a change of basis, since every
nonzero element is a square over $\mathbb{C}$ (the same is true over any
quadratically closed field). Thus we have that the rank of a form completely
determines it over the complex numbers. That is, it provides an isomorphism
$\text{GW}(\mathbb{C})\to\mathbb{Z}$.

Over the real numbers, the story is a bit different. Since there are two square
classes of nonzero real numbers,
$\mathbb{R}^\times/\left(\mathbb{R}^\times\right)^2 \cong \left\{\pm
1\right\}$, we have a further invariant which classifies symmetric bilinear
forms, called the signature. This is computed as first
diagonalizing, then taking the number of positive entries appearing on the
diagonal minus the number of negative entries appearing on the diagonal.

+----------------------------------------------------------------+
|i4 : gamma = makeGWClass matrix(RR, {{1,0,0},{0,-1,0},{0,0,1}});|
+----------------------------------------------------------------+
|i5 : getSignature gamma                                         |
|                                                                |
|o5 = 1                                                          |
+----------------------------------------------------------------+

Rank and signature completely classify symmetric bilinear forms over the real
numbers.

+---------------------------------------------------------------+
|i6 : delta = makeGWClass matrix(RR, {{0,0,1},{0,1,0},{1,0,0}});|
+---------------------------------------------------------------+
|i7 : isIsomorphicForm(gamma, delta)                            |
|                                                               |
|o7 = true                                                      |
+---------------------------------------------------------------+

Over the rational numbers, further invariants must be considered. We first
check if the rank and signature (when considered as a real form) all agree. We
must then check that their discriminants agree, which is the determinant of any
Gram matrix representing the form. This is well defined once we consider its
target as landing in square classes of the field, in this case
$\mathbb{Q}^{\times}/(\mathbb{Q}^{\times})^{2}$.

If the abovementioned invariants agree, we must further check whether the
Hasse-Witt invariants agree at all primes. This is an instance of the
Hasse-Minkowski principle which states that quadratic forms are isomorphic over
a global field if and only if they are isomorphic over all of its completions
(see [S73, IV Theorem 7] or [L05, VI.3.3]).

The Hasse-Witt invariant of a diagonal form $\langle a_1,\ldots,a_n\rangle$
over a field $K$ is defined to be the product $\prod_{i<j} \left( \phi(a_i,a_j)
\right)$ where $\phi \colon K \times K \to \left\{\pm 1\right\}$ is any symbol
(see e.g. [MH73, III.5.4] for a definition). It is a classical result of
Hilbert that over a local field of characteristic not equal to two, there is a
unique symbol, $(-,-)_{p}$ called the Hilbert symbol,
([S73, Chapter III]) computed as follows: $$(a,b)_p = \begin{cases} 1 & z^2 =
ax^2 + by^2 \text{ has a nonzero solution in } K^3 \\ -1 & \text{otherwise.}
\end{cases}$$

Consider the following example, where we observe that $z^2 = 2x^2 + y^2$ does
admit nonzero solutions mod 7, in particular $(x,y,z)=(1,0,3)$.

+----------------------------+
|i8 : getHilbertSymbol(2,1,7)|
|                            |
|o8 = 1                      |
+----------------------------+

The Hasse-Witt invariant will be 1 for almost all primes. In particular, after
diagonalizing a form $\beta \cong \left\langle a_1,\ldots,a_n\right\rangle$
then the Hasse invariant at a prime $p$ will automatically be 1 if $p\nmid
a_{i}$ for all $i$. Thus we only have finitely many Hasse invariants to compare
for any pair of symmetric bilinear forms.

+----------------------------------------------------------------+
|i9 : alphaQ = makeGWClass matrix(QQ, {{1,4,7},{4,3,2},{7,2,-1}})|
|                                                                |
|o9 = | 1 4 7  |                                                 |
|     | 4 3 2  |                                                 |
|     | 7 2 -1 |                                                 |
|                                                                |
|o9 : GrothendieckWittClass                                      |
+----------------------------------------------------------------+
|i10 : betaQ = makeGWClass matrix(QQ, {{0,0,1},{0,2,7},{1,7,3}}) |
|                                                                |
|o10 = | 0 0 1 |                                                 |
|      | 0 2 7 |                                                 |
|      | 1 7 3 |                                                 |
|                                                                |
|o10 : GrothendieckWittClass                                     |
+----------------------------------------------------------------+
|i11 : isIsomorphicForm(alphaQ,betaQ)                            |
|                                                                |
|o11 = false                                                     |
+----------------------------------------------------------------+

Over finite fields, the signature no longer makes sense as the field fails to
be totally ordered. In this case, the rank and discriminant completely
determine the form up to isomorphism.

+-------------------------------------------------------------------+
|i12 : alphaF = makeGWClass matrix(GF(7), {{1,2,2},{2,0,1},{2,1,5}})|
|                                                                   |
|o12 = | 1 2 2  |                                                   |
|      | 2 0 1  |                                                   |
|      | 2 1 -2 |                                                   |
|                                                                   |
|o12 : GrothendieckWittClass                                        |
+-------------------------------------------------------------------+
|i13 : betaF = makeGWClass matrix(GF(7), {{2,5,1},{5,6,1},{1,1,3}}) |
|                                                                   |
|o13 = | 2  -2 1 |                                                  |
|      | -2 -1 1 |                                                  |
|      | 1  1  3 |                                                  |
|                                                                   |
|o13 : GrothendieckWittClass                                        |
+-------------------------------------------------------------------+
|i14 : gammaF = makeGWClass matrix(GF(7), {{0,2,4},{2,3,3},{4,3,1}})|
|                                                                   |
|o14 = | 0  2 -3 |                                                  |
|      | 2  3 3  |                                                  |
|      | -3 3 1  |                                                  |
|                                                                   |
|o14 : GrothendieckWittClass                                        |
+-------------------------------------------------------------------+
|i15 : det getMatrix alphaF                                         |
|                                                                   |
|o15 = 1                                                            |
|                                                                   |
|o15 : GF 7                                                         |
+-------------------------------------------------------------------+
|i16 : det getMatrix betaF                                          |
|                                                                   |
|o16 = -2                                                           |
|                                                                   |
|o16 : GF 7                                                         |
+-------------------------------------------------------------------+
|i17 : det getMatrix gammaF                                         |
|                                                                   |
|o17 = 3                                                            |
|                                                                   |
|o17 : GF 7                                                         |
+-------------------------------------------------------------------+

As previously indicated, determining if unstable Grothendieck-Witt classes
$\alpha$ and $\beta$ over a field $k$ are isomorphic entails checking whether
their underlying $\text{GW}(k)$-factors are isomorphic in the Grothendieck-Witt
ring and whether their $k^{\times}$-factors agree.

+---------------------------------------------------------------------+
|i18 : alpha = makeGWuClass(matrix(QQ, {{2,3,1},{3,-1,0},{1,0,0}}), 1)|
|                                                                     |
|o18 = (| 2 3  1 |, 1)                                                |
|       | 3 -1 0 |                                                    |
|       | 1 0  0 |                                                    |
|                                                                     |
|o18 : UnstableGrothendieckWittClass                                  |
+---------------------------------------------------------------------+
|i19 : beta = makeGWuClass(matrix(QQ, {{2,3,1},{3,-1,0},{1,0,0}}), 4) |
|                                                                     |
|o19 = (| 2 3  1 |, 4)                                                |
|       | 3 -1 0 |                                                    |
|       | 1 0  0 |                                                    |
|                                                                     |
|o19 : UnstableGrothendieckWittClass                                  |
+---------------------------------------------------------------------+
|i20 : isIsomorphicForm(alpha,beta)                                   |
|                                                                     |
|o20 = false                                                          |
+---------------------------------------------------------------------+
|i21 : alpha = makeGWuClass(matrix(CC, {{2,3,1},{3,-1,0},{1,0,0}}), 1)|
|                                                                     |
|o21 = (| 2 3  1 |, 1)                                                |
|       | 3 -1 0 |                                                    |
|       | 1 0  0 |                                                    |
|                                                                     |
|o21 : UnstableGrothendieckWittClass                                  |
+---------------------------------------------------------------------+
|i22 : beta = makeGWuClass(matrix(CC, {{2,4,-1},{4,5,7},{-1,7,9}}), 1)|
|                                                                     |
|o22 = (| 2  4 -1 |, 1)                                               |
|       | 4  5 7  |                                                   |
|       | -1 7 9  |                                                   |
|                                                                     |
|o22 : UnstableGrothendieckWittClass                                  |
+---------------------------------------------------------------------+
|i23 : isIsomorphicForm(alpha,beta)                                   |
|                                                                     |
|o23 = true                                                           |
+---------------------------------------------------------------------+

References
==========

[S73] J. P. Serre, A course in arithmetic, Springer-Verlag, 1973.

[L05] T. Y. Lam, Introduction to quadratic forms over fields, American
Mathematical Society, 2005.

[MH73] J. Milnor and D. Husemoller, Symmetric bilinear forms, Springer-Verlag,
1973.

Caveat
======

Over $\mathbb{C}$ and $\mathbb{R}$, the $k^{\times}$-factors of unstable
Grothendieck-Witt classes are considered equal if the absolute value of their
difference is less than the linearTolerance, which is a positive number
specifying the tolerance to which the $k^{\times}$-factors are considered
equal. The default tolerance is $10^{-6}$. Over $\mathbb{Q}$ and finite fields,
the $k^{\times}$-factors of unstable Grothendieck-Witt classes must agree
exactly.

See also
========

  * getRank -- calculates the rank of a symmetric bilinear form
  * getSignature -- computes the signature of a symmetric
    bilinear form over the real numbers or rational numbers
  * getIntegralDiscriminant -- computes the
    integral discriminant for a rational symmetric bilinear form
  * getRelevantPrimes -- outputs a list containing
    all primes $p$ where the Hasse-Witt invariant of a symmetric bilinear form
    is nontrivial
  * getHasseWittInvariant -- computes the
    Hasse-Witt invariant at a prime $p$ for the quadratic form of the
    Grothendieck-Witt class
  * getSumDecomposition -- produces a simplified
    diagonal representative of a Grothendieck-Witt class or unstable
    Grothendieck-Witt class
  * getSumDecompositionString -- produces a
    simplified string representation of a Grothendieck-Witt class or unstable
    Grothendieck-Witt class

Ways to use isIsomorphicForm:
=============================

  * "isIsomorphicForm(GrothendieckWittClass,GrothendieckWittClass)"
  * "isIsomorphicForm(Matrix,Matrix)"
  * "isIsomorphicForm(UnstableGrothendieckWittClass,
    UnstableGrothendieckWittClass)"

For the programmer
==================

The object isIsomorphicForm, is a method function with options (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in
A1BrouwerDegrees/Documentation/IsomorphismOfFormsDoc.m2:104:0.

isIsotropic -- determines whether a Grothendieck-Witt class is isotropic
************************************************************************

  * Usage:
        isIsotropic beta
  * Inputs:
      * beta, a Grothendieck-Witt Class, denoted
        by $\beta\in\text{GW}(k)$, where $k$ is $\mathbb{C}$, $\mathbb{R}$,
        $\mathbb{Q}$, or a finite field of characteristic not 2
  * Outputs:
      * a Boolean value (Macaulay2Doc), whether $\beta$ is
        isotropic

Description
===========

This is the negation of the boolean-valued isAnisotropic.
See documentation there.

See also
========

  * isAnisotropic -- determines whether a
    Grothendieck-Witt class is anisotropic
  * getWittIndex -- returns the Witt index of a symmetric
    bilinear form
  * getAnisotropicDimension -- returns the
    anisotropic dimension of a symmetric bilinear form

Ways to use isIsotropic:
========================

  * "isIsotropic(GrothendieckWittClass)"
  * "isIsotropic(Matrix)"

For the programmer
==================

The object isIsotropic, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in
A1BrouwerDegrees/Documentation/IsotropyDoc.m2:24:0.

linearTolerance
***************

Functions with optional argument named linearTolerance:
=======================================================

  * "getGlobalUnstableA1Degree(...,linearTolerance=>...)" -- see
    getGlobalUnstableA1Degree, -- computes the
    global unstable $\mathbb{A}^{1}$-Brouwer degree of a pointed rational
    function $f/g:\mathbb{P}^{1}_{k}\to\mathbb{P}^{1}_{k}$
  * "getLocalUnstableA1Degree(...,linearTolerance=>...)" -- see
    getLocalUnstableA1Degree, -- computes a local
    unstable $\mathbb{A}^{1}$-Brouwer degree of a pointed rational function
    $f/g:\mathbb{P}^{1}_{k}\to\mathbb{P}^{1}_{k}$ at a root
    $p\in\mathbb{P}^{1}_{k}$
  * "isIsomorphicForm(...,linearTolerance=>...)" -- see isIsomorphicForm,
    -- determines whether two (unstable) Grothendieck-Witt
    classes over $\mathbb{C},\mathbb{R},\mathbb{Q}$ or a finite field of
    characteristic not 2 are isomorphic.

For the programmer
==================

The object linearTolerance (missing documentation) is a symbol (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in currentString:1:394.

makeDiagonalForm -- the Grothendieck-Witt class of a diagonal form
******************************************************************

  * Usage:
        makeDiagonalForm(k, a)
        makeDiagonalForm(k, L)
  * Inputs:
      * k, a ring (Macaulay2Doc), a field or finite étale algebra
        over a field
      * a, a ring element (Macaulay2Doc), any element in the
        field or finite étale algebra over a field
      * L, a sequence (Macaulay2Doc), of elements in the field
        or finite étale algebra $a_{i}$ where $i = 1,\dots, n$
  * Outputs:
      * a Grothendieck-Witt Class, the diagonal
        form $\langle a_{1},\ldots,a_{n}\rangle$ in the Grothendieck-Witt ring
        of the field or finite étale algebra

Description
===========

Given a sequence of elements $a_{1},\ldots,a_{n}$, we can form the diagonal
form $\langle a_{1},\ldots,a_{n}\rangle$ defined to be the block sum of each of
the rank one forms $\langle a_{i} \rangle \colon k \times k \to k,$ $(x,y)
\mapsto a_{i} xy$.

+----------------------------------+
|i1 : makeDiagonalForm(QQ, (3,5,7))|
|                                  |
|o1 = | 3 0 0 |                    |
|     | 0 5 0 |                    |
|     | 0 0 7 |                    |
|                                  |
|o1 : GrothendieckWittClass        |
+----------------------------------+

Inputting a ring element, an integer, or a rational number instead of a
sequence will produce a rank one form instead. For instance:

+-----------------------------------+
|i2 : makeDiagonalForm(GF(29), 5/13)|
|                                   |
|o2 = | -13 |                       |
|                                   |
|o2 : GrothendieckWittClass         |
+-----------------------------------+
|i3 : makeDiagonalForm(RR, 2)       |
|                                   |
|o3 = | 2 |                         |
|                                   |
|o3 : GrothendieckWittClass         |
+-----------------------------------+

See also
========

  * getDiagonalClass -- produces a diagonalized form
    for any (unstable) Grothendieck-Witt class, with simplified terms on the
    diagonal
  * diagonalizeViaCongruence -- diagonalizes a
    symmetric matrix via congruence
  * getDiagonalEntries -- extracts a list of
    diagonal entries for a GrothendieckWittClass

Ways to use makeDiagonalForm:
=============================

  * "makeDiagonalForm(InexactFieldFamily,Number)"
  * "makeDiagonalForm(InexactFieldFamily,RingElement)"
  * "makeDiagonalForm(InexactFieldFamily,Sequence)"
  * "makeDiagonalForm(Ring,Number)"
  * "makeDiagonalForm(Ring,RingElement)"
  * "makeDiagonalForm(Ring,Sequence)"

For the programmer
==================

The object makeDiagonalForm, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in
A1BrouwerDegrees/Documentation/BuildingFormsDoc.m2:40:0.

makeDiagonalUnstableForm -- the unstable Grothendieck-Witt class of a diagonal matrix
*************************************************************************************

  * Usage:
        makeDiagonalUnstableForm(k, a)
        makeDiagonalUnstableForm(k, L)
  * Inputs:
      * k, a ring (Macaulay2Doc), a field or finite étale algebra
        over a field
      * a, a ring element (Macaulay2Doc), any element in the
        field or finite étale algebra over a field
      * L, a sequence (Macaulay2Doc), of elements in the field
        or finite étale algebra $a_{i}$ where $i = 1,\dots, n$
  * Outputs:
      * an Unstable Grothendieck-Witt Class,
        the unstable Grothendieck-Witt class
        represented by the diagonal form $\langle a_{1},\ldots,a_{n}\rangle$ in
        the unstable Grothendieck-Witt group of the field or finite étale
        algebra

Description
===========

Given a sequence of elements $a_{1},\ldots,a_{n}$, we can form the diagonal
form $\langle a_{1},\ldots,a_{n}\rangle$ defined to be the block sum of each of
the rank one forms $\langle a_{i} \rangle \colon k \times k \to k,$ $(x,y)
\mapsto a_{i} xy$.

+------------------------------------------+
|i1 : makeDiagonalUnstableForm(QQ, (3,5,7))|
|                                          |
|o1 = (| 3 0 0 |, 105)                     |
|      | 0 5 0 |                           |
|      | 0 0 7 |                           |
|                                          |
|o1 : UnstableGrothendieckWittClass        |
+------------------------------------------+

Inputting a ring element, an integer, or a rational number instead of a
sequence will produce a rank one form instead. For instance:

+-------------------------------------------+
|i2 : makeDiagonalUnstableForm(GF(29), 5/13)|
|                                           |
|o2 = (| -13 |, -13)                        |
|                                           |
|o2 : UnstableGrothendieckWittClass         |
+-------------------------------------------+
|i3 : makeDiagonalUnstableForm(RR, 2)       |
|                                           |
|o3 = (| 2 |, 2)                            |
|                                           |
|o3 : UnstableGrothendieckWittClass         |
+-------------------------------------------+

See also
========

  * getDiagonalClass -- produces a diagonalized form
    for any (unstable) Grothendieck-Witt class, with simplified terms on the
    diagonal
  * diagonalizeViaCongruence -- diagonalizes a
    symmetric matrix via congruence

Ways to use makeDiagonalUnstableForm:
=====================================

  * "makeDiagonalUnstableForm(InexactFieldFamily,Number)"
  * "makeDiagonalUnstableForm(InexactFieldFamily,RingElement)"
  * "makeDiagonalUnstableForm(InexactFieldFamily,Sequence)"
  * "makeDiagonalUnstableForm(Ring,Number)"
  * "makeDiagonalUnstableForm(Ring,RingElement)"
  * "makeDiagonalUnstableForm(Ring,Sequence)"

For the programmer
==================

The object makeDiagonalUnstableForm, is a
method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in
A1BrouwerDegrees/Documentation/BuildingFormsDoc.m2:151:0.

makeGWClass -- the Grothendieck-Witt class of a symmetric matrix
****************************************************************

  * Usage:
        makeGWClass M
  * Inputs:
      * M, a matrix (Macaulay2Doc), a non-singular symmetric
        matrix defined over a field or finite étale algebra of characteristic
        not 2
  * Outputs:
      * a Grothendieck-Witt Class, the
        isomorphism class of the non-degenerate symmetric bilinear form
        represented by M

Description
===========

Given a symmetric matrix M, this command outputs an object of type
GrothendieckWittClass. This output has the representing matrix M and the base
field of the matrix stored in its CacheTable (Macaulay2Doc).

+----------------------------------+
|i1 : R = QQ[x]/(x^2 + 1);         |
+----------------------------------+
|i2 : M = matrix(R, {{1,2},{2,x}});|
|                                  |
|             2      2             |
|o2 : Matrix R  <-- R              |
+----------------------------------+
|i3 : beta = makeGWClass M         |
|                                  |
|o3 = | 1 2 |                      |
|     | 2 x |                      |
|                                  |
|o3 : GrothendieckWittClass        |
+----------------------------------+

See also
========

  * GrothendieckWittClass -- a new type intended
    to capture the isomorphism class of an element of the Grothendieck-Witt
    ring of a field or finite étale algebras over a field
  * getMatrix -- returns the Gram matrix of a stable or
    unstable Grothendieck-Witt class
  * getBaseField -- returns the base field of a stable or
    unstable Grothendieck-Witt class
  * getAlgebra -- returns the algebra over which a stable or
    unstable Grothendieck-Witt class is defined

Ways to use makeGWClass:
========================

  * "makeGWClass(Matrix)"

For the programmer
==================

The object makeGWClass, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in
A1BrouwerDegrees/Documentation/GrothendieckWittClassesDoc.m2:86:0.

makeGWuClass -- constructor for unstable Grothendieck-Witt classes
******************************************************************

  * Usage:
        makeGWuClass(M)
        makeGWuClass(beta)
        makeGWuClass(M, a)
        makeGWuClass(beta, a)
  * Inputs:
      * M, a matrix (Macaulay2Doc), a symmetric matrix over a
        field or finite étale algebra
      * beta, a Grothendieck-Witt Class, a
        Grothendieck-Witt class over a field or finite étale algebra
      * a, a number (Macaulay2Doc), a non-zero element of the
        base field or finite étale algebra of the matrix or Grothendieck-Witt
        class
      * a, a ring element (Macaulay2Doc), a non-zero element
        of the base field or finite étale algebra of the matrix or
        Grothendieck-Witt class
  * Outputs:
      * an Unstable Grothendieck-Witt Class,
        an unstable Grothendieck-Witt class
        with the Gram matrix of the input matrix or Grothendieck-Witt class and
        the non-zero element of the base field or finite étale algebra

Description
===========

The unstable Grothendieck-Witt class is represented by the data of a
Grothendieck-Witt class and a non-zero element of the base field or finite
étale algebra such that the determinant of the Gram matrix of the
Grothendieck-Witt class must agree with the square of the non-zero element of
the base field or finite étale algebra up to multiplication by a square.

The method makeGWuClass can be applied to a symmetric matrix or a
Grothendieck-Witt class together with the data of a scalar, and it will
automatically use the determinant of the matrix or Grothendieck-Witt class as
the non-zero element of the base field or finite étale algebra if no such
element is provided.

+----------------------------------+
|i1 : M = matrix(QQ, {{0,1},{1,0}})|
|                                  |
|o1 = | 0 1 |                      |
|     | 1 0 |                      |
|                                  |
|              2       2           |
|o1 : Matrix QQ  <-- QQ            |
+----------------------------------+
|i2 : alpha = makeGWuClass(M, -9)  |
|                                  |
|o2 = (| 0 1 |, -9)                |
|      | 1 0 |                     |
|                                  |
|o2 : UnstableGrothendieckWittClass|
+----------------------------------+
|i3 : class alpha                  |
|                                  |
|o3 = UnstableGrothendieckWittClass|
|                                  |
|o3 : Type                         |
+----------------------------------+
+-----------------------------------+
|i4 : beta0 = makeGWClass M         |
|                                   |
|o4 = | 0 1 |                       |
|     | 1 0 |                       |
|                                   |
|o4 : GrothendieckWittClass         |
+-----------------------------------+
|i5 : beta = makeGWuClass(beta0, -9)|
|                                   |
|o5 = (| 0 1 |, -9)                 |
|      | 1 0 |                      |
|                                   |
|o5 : UnstableGrothendieckWittClass |
+-----------------------------------+
|i6 : class beta                    |
|                                   |
|o6 = UnstableGrothendieckWittClass |
|                                   |
|o6 : Type                          |
+-----------------------------------+
+----------------------------------+
|i7 : gamma = makeGWuClass M       |
|                                  |
|o7 = (| 0 1 |, -1)                |
|      | 1 0 |                     |
|                                  |
|o7 : UnstableGrothendieckWittClass|
+----------------------------------+
|i8 : class gamma                  |
|                                  |
|o8 = UnstableGrothendieckWittClass|
|                                  |
|o8 : Type                         |
+----------------------------------+
+-----------------------------------+
|i9 : delta = makeGWuClass beta0    |
|                                   |
|o9 = (| 0 1 |, -1)                 |
|      | 1 0 |                      |
|                                   |
|o9 : UnstableGrothendieckWittClass |
+-----------------------------------+
|i10 : class delta                  |
|                                   |
|o10 = UnstableGrothendieckWittClass|
|                                   |
|o10 : Type                         |
+-----------------------------------+

Over the complex numbers, real numbers, rational numbers, or finite fields of
characteristic not 2, the constructor makeGWuClass verifies that the scalar, if
provided, agrees with the determinant of the Gram matrix of the
Grothendieck-Witt class or matrix up to multiplication by a square. Over
arbitrary finite étale algebras over fields, the constructor will permit the
construction of an unstable Grothendieck-Witt class with any nonzero scalar and
warn the user to verify that the scalar agrees with the determinant of the
matrix representative of the stable part up to squares.

+-----------------------------------------------------------------------------+
|i11 : R = QQ[x]/(x^2 + 1);                                                   |
+-----------------------------------------------------------------------------+
|i12 : P = matrix(R, {{1,0}, {0,x}});                                         |
|                                                                             |
|              2      2                                                       |
|o12 : Matrix R  <-- R                                                        |
+-----------------------------------------------------------------------------+
|i13 : makeGWuClass(P, x^3)                                                   |
|Warning, unable to verify whether the determinant of M and b agree up to     |
|                                                                             |
|o13 = (| 1 0 |, -x)                                                          |
|       | 0 x |                                                               |
|                                                                             |
|o13 : UnstableGrothendieckWittClass                                          |
|-----------------------------------------------------------------------------|
|squares.                                                                     |
+-----------------------------------------------------------------------------+

Caveat
======

Over an arbitrary finite étale algebra over a field, any nonzero algebra
element can be used as the scalar in the construction of an unstable
Grothendieck-Witt class. In cases when the user provides a scalar different
from the determinant of the Gram matrix of the Grothendieck-Witt class or
matrix, the user must manually verify that the scalar agrees with the
determinant of the Gram matrix of the Grothendieck-Witt class or matrix up to
multiplication by a square. In this case, a warning is printed: Warning, the
function is not able to verify if the determinant of M and a agree up to
squares..

See also
========

  * UnstableGrothendieckWittClass -- a
    new type intended to capture an element of the unstable Grothendieck-Witt
    group of a field or finite étale algebras over a field
  * GrothendieckWittClass -- a new type intended
    to capture the isomorphism class of an element of the Grothendieck-Witt
    ring of a field or finite étale algebras over a field
  * getMatrix -- returns the Gram matrix of a stable or
    unstable Grothendieck-Witt class
  * getScalar -- returns the non-zero scalar of an unstable
    Grothendieck-Witt class
  * getAlgebra -- returns the algebra over which a stable or
    unstable Grothendieck-Witt class is defined
  * getBaseField -- returns the base field of a stable or
    unstable Grothendieck-Witt class

Ways to use makeGWuClass:
=========================

  * "makeGWuClass(GrothendieckWittClass)"
  * "makeGWuClass(GrothendieckWittClass,Number)"
  * "makeGWuClass(GrothendieckWittClass,RingElement)"
  * "makeGWuClass(Matrix)"
  * "makeGWuClass(Matrix,Number)"
  * "makeGWuClass(Matrix,RingElement)"

For the programmer
==================

The object makeGWuClass, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in
A1BrouwerDegrees/Documentation/UnstableGrothendieckWittClassesDoc.m2:121:0.

makeHyperbolicForm -- the Grothendieck-Witt class of a hyperbolic form
**********************************************************************

  * Usage:
        makeHyperbolicForm(k)
        makeHyperbolicForm(k, n)
  * Inputs:
      * k, a ring (Macaulay2Doc), a field or finite étale algebra
        over a field
      * n, an integer (Macaulay2Doc), an even number, giving an
        optional rank $n$ for a totally hyperbolic form
  * Outputs:
      * a Grothendieck-Witt Class, the hyperbolic
        form $\mathbb{H} = \langle 1, -1\rangle$ in the Grothendieck-Witt ring
        or the totally hyperbolic form $\left(\frac{n}{2}\right)\mathbb{H}$ if
        an optional rank $n$ is specified

Description
===========

By default outputs the rank two hyperbolic form over the input algebra.

+------------------------------+
|i1 : makeHyperbolicForm(GF(7))|
|                              |
|o1 = | 1 0  |                 |
|     | 0 -1 |                 |
|                              |
|o1 : GrothendieckWittClass    |
+------------------------------+

Specifying a rank yields a copy of sums of the rank two hyperbolic form. Only
even rank inputs are accepted.

+------------------------------+
|i2 : makeHyperbolicForm(RR, 4)|
|                              |
|o2 = | 1 0  0 0  |            |
|     | 0 -1 0 0  |            |
|     | 0 0  1 0  |            |
|     | 0 0  0 -1 |            |
|                              |
|o2 : GrothendieckWittClass    |
+------------------------------+

See also
========

  * isAnisotropic -- determines whether a
    Grothendieck-Witt class is anisotropic
  * getSumDecomposition -- produces a simplified
    diagonal representative of a Grothendieck-Witt class or unstable
    Grothendieck-Witt class
  * getSumDecompositionString -- produces a
    simplified string representation of a Grothendieck-Witt class or unstable
    Grothendieck-Witt class

Ways to use makeHyperbolicForm:
===============================

  * "makeHyperbolicForm(InexactFieldFamily)"
  * "makeHyperbolicForm(InexactFieldFamily,ZZ)"
  * "makeHyperbolicForm(Ring)"
  * "makeHyperbolicForm(Ring,ZZ)"

For the programmer
==================

The object makeHyperbolicForm, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in
A1BrouwerDegrees/Documentation/BuildingFormsDoc.m2:112:0.

makeHyperbolicUnstableForm -- the unstable Grothendieck-Witt class of a hyperbolic form
***************************************************************************************

  * Usage:
        makeHyperbolicUnstableForm(k)
        makeHyperbolicUnstableForm(k, n)
  * Inputs:
      * k, a ring (Macaulay2Doc), a field or finite étale algebra
        over a field
      * n, an integer (Macaulay2Doc), an even number, giving an
        optional rank $n$ for a totally hyperbolic form
  * Outputs:
      * an Unstable Grothendieck-Witt Class,
        the unstable Grothendieck-Witt class
        represented by the hyperbolic form $\mathbb{H} = \langle 1, -1\rangle$
        in the unstable Grothendieck-Witt group or the totally hyperbolic form
        $\left(\frac{n}{2}\right)\mathbb{H}$ if an optional rank $n$ is
        specified

Description
===========

By default outputs the rank two hyperbolic form over the input algebra.

+--------------------------------------+
|i1 : makeHyperbolicUnstableForm(GF(7))|
|                                      |
|o1 = (| 1 0  |, -1)                   |
|      | 0 -1 |                        |
|                                      |
|o1 : UnstableGrothendieckWittClass    |
+--------------------------------------+

Specifying a rank yields a copy of sums of the rank two hyperbolic form. Only
even rank inputs are accepted.

+--------------------------------------+
|i2 : makeHyperbolicUnstableForm(RR, 4)|
|                                      |
|o2 = (| 1 0  0 0  |, 1)               |
|      | 0 -1 0 0  |                   |
|      | 0 0  1 0  |                   |
|      | 0 0  0 -1 |                   |
|                                      |
|o2 : UnstableGrothendieckWittClass    |
+--------------------------------------+

See also
========

  * getSumDecomposition -- produces a simplified
    diagonal representative of a Grothendieck-Witt class or unstable
    Grothendieck-Witt class
  * getSumDecompositionString -- produces a
    simplified string representation of a Grothendieck-Witt class or unstable
    Grothendieck-Witt class

Ways to use makeHyperbolicUnstableForm:
=======================================

  * "makeHyperbolicUnstableForm(InexactFieldFamily)"
  * "makeHyperbolicUnstableForm(InexactFieldFamily,ZZ)"
  * "makeHyperbolicUnstableForm(Ring)"
  * "makeHyperbolicUnstableForm(Ring,ZZ)"

For the programmer
==================

The object makeHyperbolicUnstableForm, is a
method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in
A1BrouwerDegrees/Documentation/BuildingFormsDoc.m2:184:0.

makePfisterForm -- the Grothendieck-Witt class of a Pfister form
****************************************************************

  * Usage:
        makePfisterForm(k, a)
        makePfisterForm(k, L)
  * Inputs:
      * k, a ring (Macaulay2Doc), a field of characteristic not 2
      * a, a ring element (Macaulay2Doc), any element in the
        field
      * L, a sequence (Macaulay2Doc), of elements in the field
        $a_{i}$ where $i = 1,\dots, n$
  * Outputs:
      * a Grothendieck-Witt Class, the Pfister
        form $\langle\langle a_{1},\ldots,a_{n}\rangle\rangle$ in the
        Grothendieck-Witt ring of the field

Description
===========

Given a sequence of elements $a_{1},\ldots,a_{n} \in k$, we can form the
Pfister form $\langle\langle a_{1},\ldots,a_{n}\rangle\rangle$ defined to be
the rank $2^{n}$ form defined as the product $\langle 1, -a_{1}\rangle \otimes
\cdots \otimes \langle 1, -a_{n}\rangle$.

+-------------------------------+
|i1 : makePfisterForm(QQ, (2,6))|
|                               |
|o1 = | 1 0  0  0  |            |
|     | 0 -6 0  0  |            |
|     | 0 0  -2 0  |            |
|     | 0 0  0  12 |            |
|                               |
|o1 : GrothendieckWittClass     |
+-------------------------------+

Inputting a ring element, an integer, or a rational number instead of a
sequence will produce a one-fold Pfister form instead. For instance:

+----------------------------------+
|i2 : makePfisterForm(GF(13), -2/3)|
|                                  |
|o2 = | 1 0 |                      |
|     | 0 5 |                      |
|                                  |
|o2 : GrothendieckWittClass        |
+----------------------------------+
|i3 : makePfisterForm(CC, 3)       |
|                                  |
|o3 = | 1 0  |                     |
|     | 0 -3 |                     |
|                                  |
|o3 : GrothendieckWittClass        |
+----------------------------------+

Ways to use makePfisterForm:
============================

  * "makePfisterForm(InexactFieldFamily,Number)"
  * "makePfisterForm(InexactFieldFamily,RingElement)"
  * "makePfisterForm(InexactFieldFamily,Sequence)"
  * "makePfisterForm(Ring,Number)"
  * "makePfisterForm(Ring,RingElement)"
  * "makePfisterForm(Ring,Sequence)"

For the programmer
==================

The object makePfisterForm, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in
A1BrouwerDegrees/Documentation/BuildingFormsDoc.m2:77:0.

multiplyGW -- the tensor product of two Grothendieck-Witt classes
*****************************************************************

  * Usage:
        multiplyGW(beta1, beta2)
  * Inputs:
      * beta1, a Grothendieck-Witt Class, a
        Grothendieck-Witt class
      * beta2, a Grothendieck-Witt Class, a
        Grothendieck-Witt class
  * Outputs:
      * gamma, a Grothendieck-Witt Class, a
        Grothendieck-Witt class representing the tensor product of the two
        input classes

Description
===========

Given two GrothendieckWittClass objects beta1 and beta2, this method computes
the tensor product of the two classes, which is a new GrothendieckWittClass
object representing the isomorphism class of the tensor product of the two
symmetric bilinear forms represented by the input classes. The resulting class
has a Gram matrix which is the tensor product of the Gram matrices of the two
input classes.

+--------------------------------------------------+
|i1 : R = QQ[x]/(x^2 + 1);                         |
+--------------------------------------------------+
|i2 : beta1 = makeGWClass matrix(R, {{1,2},{2,x}});|
+--------------------------------------------------+
|i3 : beta2 = makeGWClass matrix(R, {{3,4},{4,5}});|
+--------------------------------------------------+
|i4 : multiplyGW(beta1, beta2)                     |
|                                                  |
|o4 = | 3 4  6  8  |                               |
|     | 4 5  8  10 |                               |
|     | 6 8  3x 4x |                               |
|     | 8 10 4x 5x |                               |
|                                                  |
|o4 : GrothendieckWittClass                        |
+--------------------------------------------------+

See also
========

  * GrothendieckWittClass -- a new type intended
    to capture the isomorphism class of an element of the Grothendieck-Witt
    ring of a field or finite étale algebras over a field
  * makeGWClass -- the Grothendieck-Witt class of a
    symmetric matrix
  * addGW -- the direct sum of two Grothendieck-Witt classes

Ways to use multiplyGW:
=======================

  * "multiplyGW(GrothendieckWittClass,GrothendieckWittClass)"

For the programmer
==================

The object multiplyGW, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in
A1BrouwerDegrees/Documentation/GrothendieckWittClassesDoc.m2:148:0.

transferGW -- the transfer of Grothendieck-Witt from an étale algebras to a base field
**************************************************************************************

  * Usage:
        transferGW(beta)
  * Inputs:
      * beta, a Grothendieck-Witt Class,
        Grothendieck-Witt class over an étale algebra over field of
        characteristic not 2
  * Outputs:
      * a Grothendieck-Witt Class, the image of
        the Grothendieck-Witt class beta in $\text{GW}(k)$ under the canonical
        transfer map.

Description
===========

Given a finite étale algebra $L/k$ and a Grothendieck-Witt class, $\beta$ in
$\text{GW}(L)$, computes the image of $\beta$ under the canonical map
$\text{GW}(L)\to\text{GW}(k)$ for a finite étale algebra $L/k$.

+-------------------------------------------------+
|i1 : R = QQ[x]/(x^2 - 1);                        |
+-------------------------------------------------+
|i2 : beta = makeGWClass matrix(R, {{1,2},{2,x}});|
+-------------------------------------------------+
|i3 : transferGW(beta)                            |
|                                                 |
|o3 = | 2 0  |                                    |
|     | 0 -8 |                                    |
|                                                 |
|o3 : GrothendieckWittClass                       |
+-------------------------------------------------+

See also
========

  * GrothendieckWittClass -- a new type intended
    to capture the isomorphism class of an element of the Grothendieck-Witt
    ring of a field or finite étale algebras over a field
  * getTrace -- Computes the trace over $k$ for an element in
    a finite dimensional $k$ -algebra

Ways to use transferGW:
=======================

  * "transferGW(GrothendieckWittClass)"

For the programmer
==================

The object transferGW, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in
A1BrouwerDegrees/Documentation/GWTransferDoc.m2:25:0.

UnstableGrothendieckWittClass -- a new type intended to capture an element of the unstable Grothendieck-Witt group of a field or finite étale algebras over a field
*******************************************************************************************************************************************************************

Description
===========

An UnstableGrothendieckWittClass object is a type of HashTable (Macaulay2Doc),
intended to capture an element of the unstable
Grothendieck-Witt group of a field or finite étale algebras over a field. The
unstable Grothendieck-Witt group is defined to be
$\text{GW}^{u}(k)=\text{GW}(k)\times_{k^{\times}/(k^{\times})^{2}}k^{\times}/$,
where $\text{GW}(k)$ is the Grothendieck-Witt ring considered as an Abelian
group under addition and multiplication in the respective factors. Objects of
type UnstableGrothendieckWittClass encode the data of a matrix and nonzero
scalar defined over the same field or finite étale algebra, corresponding to
the Gram matrix of the $\text{GW}(k)$ factor and the $k^{\times}$ factor,
respectively, subject to the condition that the determinant of the Gram matrix
agrees the non-zero element of the field or finite étale algebra up to
multiplication by a square.

An UnstableGrothendieckWittClass object can be built from a symmetric
matrix (Macaulay2Doc), and a non-zero element of the base field or
finite étale algebra using the makeGWuClass, method.

+----------------------------------+
|i1 : M = matrix(QQ, {{0,1},{1,0}})|
|                                  |
|o1 = | 0 1 |                      |
|     | 1 0 |                      |
|                                  |
|              2       2           |
|o1 : Matrix QQ  <-- QQ            |
+----------------------------------+
|i2 : alpha = makeGWuClass(M, -4)  |
|                                  |
|o2 = (| 0 1 |, -4)                |
|      | 1 0 |                     |
|                                  |
|o2 : UnstableGrothendieckWittClass|
+----------------------------------+
|i3 : class alpha                  |
|                                  |
|o3 = UnstableGrothendieckWittClass|
|                                  |
|o3 : Type                         |
+----------------------------------+

+--------------------------------------------------+
|i4 : beta0 = makeGWClass matrix(QQ, {{0,1},{1,0}})|
|                                                  |
|o4 = | 0 1 |                                      |
|     | 1 0 |                                      |
|                                                  |
|o4 : GrothendieckWittClass                        |
+--------------------------------------------------+
|i5 : beta = makeGWuClass(beta0, -4)               |
|                                                  |
|o5 = (| 0 1 |, -4)                                |
|      | 1 0 |                                     |
|                                                  |
|o5 : UnstableGrothendieckWittClass                |
+--------------------------------------------------+
|i6 : class beta                                   |
|                                                  |
|o6 = UnstableGrothendieckWittClass                |
|                                                  |
|o6 : Type                                         |
+--------------------------------------------------+

Alternatively, we can construct a UnstableGrothendieckWittClass object by
applying makeGWuClass to M or beta0, which will automatically use the
determinant of the matrix as the non-zero element of the base field or finite
étale algebra.

+----------------------------------+
|i7 : gamma = makeGWuClass(M)      |
|                                  |
|o7 = (| 0 1 |, -1)                |
|      | 1 0 |                     |
|                                  |
|o7 : UnstableGrothendieckWittClass|
+----------------------------------+
|i8 : class gamma                  |
|                                  |
|o8 = UnstableGrothendieckWittClass|
|                                  |
|o8 : Type                         |
+----------------------------------+

+-----------------------------------+
|i9 : delta = makeGWuClass(beta0)   |
|                                   |
|o9 = (| 0 1 |, -1)                 |
|      | 1 0 |                      |
|                                   |
|o9 : UnstableGrothendieckWittClass |
+-----------------------------------+
|i10 : class delta                  |
|                                   |
|o10 = UnstableGrothendieckWittClass|
|                                   |
|o10 : Type                         |
+-----------------------------------+

The underlying matrix of an UnstableGrothendieckWittClass object can be
accessed using the getMatrix, method which is the Gram matrix
of the symmetric bilinear form represented by the UnstableGrothendieckWittClass
object. This matrix is a symmetric matrix over the base algebra of the
GrothendieckWittClass object. The underlying scalar of an
UnstableGrothendieckWittClass object can similarly be accessed using the
getScalar, method.

+------------------------+
|i11 : getMatrix delta   |
|                        |
|o11 = | 0 1 |           |
|      | 1 0 |           |
|                        |
|               2       2|
|o11 : Matrix QQ  <-- QQ |
+------------------------+
|i12 : getScalar delta   |
|                        |
|o12 = -1                |
|                        |
|o12 : QQ                |
+------------------------+

The algebra over which can be retrieved using the getAlgebra,
method. If further the GrothendieckWittClass object is over a field, then the
field can be retrieved using the getBaseField, method.

+------------------------+
|i13 : getAlgebra delta  |
|                        |
|o13 = QQ                |
|                        |
|o13 : Ring              |
+------------------------+
|i14 : getBaseField delta|
|                        |
|o14 = QQ                |
|                        |
|o14 : Ring              |
+------------------------+

As in the case of Grothendieck-Witt classes, it is often useful to have a
diagonal representative of the $\text{GW}(k)$ factor of an
UnstableGrothendieckWittClass. The method getDiagonalClass,
diagonalizes the underlying matrix of the class over the base
algebra of the UnstableGrothendieckWittClass object. The result is a new
UnstableGrothendieckWittClass with $\text{GW}(k)$ factor a diagonal Gram
matrix. The entire class is stored in the cache for quick recovery later on.

+--------------------------------------------+
|i15 : diagonalClass = getDiagonalClass beta;|
+--------------------------------------------+
|i16 : beta.cache.getDiagonalClass           |
|                                            |
|o16 = (| 2 0  |, -4)                        |
|       | 0 -2 |                             |
|                                            |
|o16 : UnstableGrothendieckWittClass         |
+--------------------------------------------+

See also
========

  * makeGWuClass -- constructor for unstable
    Grothendieck-Witt classes
  * getAlgebra -- returns the algebra over which a stable or
    unstable Grothendieck-Witt class is defined
  * getBaseField -- returns the base field of a stable or
    unstable Grothendieck-Witt class
  * getMatrix -- returns the Gram matrix of a stable or
    unstable Grothendieck-Witt class
  * getScalar -- returns the non-zero scalar of an unstable
    Grothendieck-Witt class
  * getDiagonalClass -- produces a diagonalized form
    for any (unstable) Grothendieck-Witt class, with simplified terms on the
    diagonal

Functions and methods returning an Unstable Grothendieck-Witt Class:
====================================================================

  * "addGWu(UnstableGrothendieckWittClass,UnstableGrothendieckWittClass)" --
    see addGWu, -- the direct sum for  two unstable
    Grothendieck-Witt Classes
  * "addGWuDivisorial(List,List)" -- see addGWuDivisorial,
    -- the divisorial sum of local degrees of a rational
    function
  * "getDiagonalClass(UnstableGrothendieckWittClass)" -- see
    getDiagonalClass, -- produces a diagonalized form for any
    (unstable) Grothendieck-Witt class, with simplified terms on the diagonal
  * "getGlobalUnstableA1Degree(RingElement)" -- see
    getGlobalUnstableA1Degree, -- computes the
    global unstable $\mathbb{A}^{1}$-Brouwer degree of a pointed rational
    function $f/g:\mathbb{P}^{1}_{k}\to\mathbb{P}^{1}_{k}$
  * "getGlobalUnstableA1Degree(RingElement,RingElement)" -- see
    getGlobalUnstableA1Degree, -- computes the
    global unstable $\mathbb{A}^{1}$-Brouwer degree of a pointed rational
    function $f/g:\mathbb{P}^{1}_{k}\to\mathbb{P}^{1}_{k}$
  * "getLocalUnstableA1Degree(RingElement,Number)" -- see
    getLocalUnstableA1Degree, -- computes a local
    unstable $\mathbb{A}^{1}$-Brouwer degree of a pointed rational function
    $f/g:\mathbb{P}^{1}_{k}\to\mathbb{P}^{1}_{k}$ at a root
    $p\in\mathbb{P}^{1}_{k}$
  * "getLocalUnstableA1Degree(RingElement,RingElement)" -- see
    getLocalUnstableA1Degree, -- computes a local
    unstable $\mathbb{A}^{1}$-Brouwer degree of a pointed rational function
    $f/g:\mathbb{P}^{1}_{k}\to\mathbb{P}^{1}_{k}$ at a root
    $p\in\mathbb{P}^{1}_{k}$
  * "getLocalUnstableA1Degree(RingElement,RingElement,Number)" -- see
    getLocalUnstableA1Degree, -- computes a local
    unstable $\mathbb{A}^{1}$-Brouwer degree of a pointed rational function
    $f/g:\mathbb{P}^{1}_{k}\to\mathbb{P}^{1}_{k}$ at a root
    $p\in\mathbb{P}^{1}_{k}$
  * "getLocalUnstableA1Degree(RingElement,RingElement,RingElement)" -- see
    getLocalUnstableA1Degree, -- computes a
    local unstable $\mathbb{A}^{1}$-Brouwer degree of a pointed rational
    function $f/g:\mathbb{P}^{1}_{k}\to\mathbb{P}^{1}_{k}$ at a root
    $p\in\mathbb{P}^{1}_{k}$
  * "getSumDecomposition(UnstableGrothendieckWittClass)" -- see
    getSumDecomposition, -- produces a simplified diagonal
    representative of a Grothendieck-Witt class or unstable Grothendieck-Witt
    class
  * "makeGWuClass(GrothendieckWittClass)" -- see makeGWuClass,
    -- constructor for unstable Grothendieck-Witt classes
  * "makeGWuClass(GrothendieckWittClass,Number)" -- see makeGWuClass,
    -- constructor for unstable Grothendieck-Witt classes
  * "makeGWuClass(GrothendieckWittClass,RingElement)" -- see
    makeGWuClass, -- constructor for unstable Grothendieck-Witt
    classes
  * "makeGWuClass(Matrix)" -- see makeGWuClass, --
    constructor for unstable Grothendieck-Witt classes
  * "makeGWuClass(Matrix,Number)" -- see makeGWuClass, --
    constructor for unstable Grothendieck-Witt classes
  * "makeGWuClass(Matrix,RingElement)" -- see makeGWuClass,
    -- constructor for unstable Grothendieck-Witt classes

Methods that use an Unstable Grothendieck-Witt Class:
=====================================================

  * "getAlgebra(UnstableGrothendieckWittClass)" -- see getAlgebra,
    -- returns the algebra over which a stable or unstable
    Grothendieck-Witt class is defined
  * "getBaseField(UnstableGrothendieckWittClass)" -- see getBaseField,
    -- returns the base field of a stable or unstable
    Grothendieck-Witt class
  * "getGWClass(UnstableGrothendieckWittClass)" -- see getGWClass,
    -- returns the Grothendieck-Witt class of the stable part of an
    unstable Grothendieck-Witt class
  * "getMatrix(UnstableGrothendieckWittClass)" -- see getMatrix,
    -- returns the Gram matrix of a stable or unstable
    Grothendieck-Witt class
  * "getScalar(UnstableGrothendieckWittClass)" -- see getScalar,
    -- returns the non-zero scalar of an unstable Grothendieck-Witt
    class
  * "getSumDecompositionString(UnstableGrothendieckWittClass)" -- see
    getSumDecompositionString, -- produces a
    simplified string representation of a Grothendieck-Witt class or unstable
    Grothendieck-Witt class
  * "isIsomorphicForm(UnstableGrothendieckWittClass,
    UnstableGrothendieckWittClass)" -- see isIsomorphicForm,
    -- determines whether two (unstable) Grothendieck-Witt
    classes over $\mathbb{C},\mathbb{R},\mathbb{Q}$ or a finite field of
    characteristic not 2 are isomorphic.
  * "net(UnstableGrothendieckWittClass)"
  * "texMath(UnstableGrothendieckWittClass)"

For the programmer
==================

The object UnstableGrothendieckWittClass,
is a type (Macaulay2Doc), with ancestor classes HashTable (Macaulay2Doc),
< Thing (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in
A1BrouwerDegrees/Documentation/UnstableGrothendieckWittClassesDoc.m2:57:0.