Short version:
Over which fields is the (appropriate version of the) "Sylvester law of inertia" valid?
Long version:
Let $V$ be a finite dimensional vector space over the field $\Bbbk$ of characteristic different from $2$ (so quadratic forms are the same as symmetric bilinear forms). Consider the "discriminant" function
$$\mathrm{discr}: \mathrm{Sym}^2(V^*)\to \Bbbk/\Bbbk^2,$$
where $\Bbbk/\Bbbk^2$ is the quotient of the multiplicative monoid $\Bbbk$ by the squares, which maps a (possibly degenerate) symmetric bilinear form $q$ to the determinant of it's matrix relative to any base, which is well defined up to multiplication by squares. Of course, this is not a complete invariant, as different degenerate quadratic forms all have discriminant $0$.
Given $q\in\mathrm{Sym}^2(V^*)$, and an orthogonal basis $B$ for $V$ in which $q$ has the form $\Sigma_i\lambda_ix_iy_i$, we have a "signature" map
$$\sigma_q^B:\Bbbk/\Bbbk^2\to\mathbb{N}$$
sending a $\lambda$ in the domain to the number of vectors in $B$ for wich the corresponding $\lambda_i$ has image $\lambda$ in $\Bbbk/\Bbbk^2$.
1) Is $\sigma_q^B$ independent from $B$ ?
-
2) If the answer to 1) is "yes", is $q\mapsto\sigma_q$ a complete invariant for quadratic forms over $\Bbbk$ ? That is, is it true that two quadratic spaces $(V,q)$ and $(V',q')$ are isomorphic if and only if $\sigma_q=\sigma_{q'}$ ?
For $\Bbbk=\mathbb{R}$ or $\mathbb{C}$ the answer to 1) and 2) is "yes": it's is the usual Sylvester law of inertia. Maybe the above general question has a well known or even elementary answer?...