/-
Copyright 2026 The Formal Conjectures Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-/modulepublicimportMathlib.LinearAlgebra.QuadraticForm.Radical@[expose]publicsection
Dimensions of anisotropic quadratic forms
The $u$-invariant $u(F)$ of a field $F$ is the largest dimension of an anisotropic quadratic
form over $F$, or $\infty$ if there is no largest one [Kaplansky1953, p. 201]; in characteristic $2$
the forms are required to be nondegenerate [EKM2008, §36]. This file defines
QuadraticForm.anisotropicDims F: the set of n such that there is a nondegenerate anisotropic
quadratic form on Fin n → F.
The $u$-invariant of F is n exactly when IsGreatest (QuadraticForm.anisotropicDims F) n, and
it is infinite exactly when ¬ BddAbove (QuadraticForm.anisotropicDims F). No numeric invariant
is defined, so that no convention for the infinite case is needed.
The set contains 0 and 1 for every field. In characteristic not 2 every anisotropic form is
nondegenerate (QuadraticMap.Anisotropic.nondegenerate), so the nondegeneracy condition can be
dropped (QuadraticForm.mem_anisotropicDims_iff). Over a linearly ordered field the sum of n
squares is anisotropic for every n, so the set is all of ℕ
(QuadraticForm.anisotropicDims_eq_univ).
References
[Kaplansky1953] I. Kaplansky, Quadratic forms, J. Math. Soc. Japan 5 (1953), 200–207.
[EKM2008] R. Elman, N. Karpenko, A. Merkurjev, The algebraic and geometric theory of
quadratic forms, Amer. Math. Soc. Colloq. Publ. 56, 2008.
The set of n such that there is a nondegenerate anisotropic quadratic form on Fin n → F.
Its greatest element, when it exists, is the $u$-invariant of F; the set is not bounded above
exactly when the $u$-invariant of F is infinite.