Arithmetic methods

The arithmetic underneath the invariants: Hilbert symbols over $\mathbb{Q}_p$ and $\mathbb{R}$, and $p$-adic valuations.

MotivicHomotopy.hilbert_symbol_padic — Method
hilbert_symbol_padic(a, b, p)

The Hilbert symbol $(a, b)_p$ of two nonzero rational numbers, viewed as elements of $\mathbb{Q}_p$:

$(a, b)_p = 1$ if $z^2 = ax^2 + by^2$ has a nonzero solution over $\mathbb{Q}_p$, and $-1$ otherwise ([S73, Chapter III]).

Products of Hilbert symbols compute the hasse_witt_invariant, a key step in classifying rational forms and certifying their (an)isotropy.

The name carries the _padic suffix because Oscar itself exports hilbert_symbol (which this function calls internally).

Examples

$z^2 = 2x^2 + y^2$ has the solution $(1, 0, 3)$ mod 7, hence a 7-adic solution by Hensel's lemma, while $z^2 = 7x^2 + 3y^2$ has no nonzero solution mod 7:

julia> hilbert_symbol_padic(2, 1, 7)
1

julia> hilbert_symbol_padic(7, 3, 7)
-1

julia> hilbert_symbol_padic(2, 2, 2)
1

julia> hilbert_symbol_padic(2, 3, 2)
-1

References

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

See also hilbert_symbol_real, hasse_witt_invariant.

source
MotivicHomotopy.hilbert_symbol_real — Method
hilbert_symbol_real(a, b)

The Hilbert symbol $(a, b)_{\mathbb{R}}$ of two nonzero rational numbers viewed as real numbers: $-1$ if $z^2 = ax^2 + by^2$ has no nonzero real solution — which happens exactly when both a and b are negative — and $1$ otherwise ([S73, Chapter III]).

Examples

julia> hilbert_symbol_real(-3, -2//3)
-1

julia> hilbert_symbol_real(3, -5)
1

References

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

See also hilbert_symbol_padic, form_signature.

source
MotivicHomotopy.padic_valuation — Method
padic_valuation(a, p)

The $p$-adic valuation of a nonzero integer or rational number a: the integer $n$ with $a = u·p^n$ for a unit $u$ of $\mathbb{Z}_p$. Errors on $a = 0$ and when $p$ is not prime.

Examples

$363/7 = 3·11^2/7$, so the 11-adic valuation is 2:

julia> padic_valuation(363//7, 11)
2
source