# Local-Global Correspondence

The Hasse–Minkowski principle for quadratic forms implies that a conic has a point over a number field if and only if it has a point over its completion at every finite and infinite prime. This provides an effective set of conditions for determining whether a conic has a point: Only the finite number of primes dividing the discriminant of the curve need to be checked, and by Hensel’s lemma it is only necessary to check this condition to finite precision. The theory holds over any global field (a number field or the function field of a curve over a finite field) but the algorithms implemented at present only treat the field ${\mathbb{Q}}$.

## Local Conditions for Conics

We say that $p$ is a ramified or bad prime for a conic $C$ if there exists no $p$-integral model for $C$ with nonsingular reduction. Every such prime is a divisor of the coefficients of the Legendre polynomial. However, in general it is not possible to have a Legendre model whose coefficients are divisible only by the ramified primes. We use the term ramified or bad prime for a conic to refer to the local properties of $C$ which are independent of the models.

### `BadPrimes(C): CrvCon -> SeqEnum`

Given a conic $C$ over the rationals, returns the sequence of the finite ramified primes of $C$: Those at which $C$ has intrinsic locally singular reduction. This uses quaternion algebras.

N.B. Although the infinite prime is not included, the data of whether or not $C/{\mathbb{Q}}$ is ramified at infinity is carried by the length of this sequence. The number of bad primes, including infinity, must be even so the parity of the sequence length specifies the ramification information at infinity.

## Local Solubility

By computing the Hilbert symbol at all bad primes, it is possible to determine whether a conic is *globally* soluble. This is an easier problem than finding a global solution.

### `IsLocallySolvable(C): CrvCon -> BoolElt`

This returns `true` if and only if the conic has points over all completions of its coefficient field. It is implemented for conics over ${\mathbb{Q}}$, number fields and function fields.

## Norm Residue Symbol

Hilbert’s norm residue symbol gives a precise condition for a quadratic form to represent zero over a local field (equivalently, for a conic to have points over that field).

An explicit treatment of the properties and theory of the norm residue symbol can be found in Cassels [[Cassels, 1978](../../references.md#cite-cassels78)]; the Hilbert symbol is treated by Lam [[Lam, 1973](../../references.md#cite-lam73)].

### `NormResidueSymbol(a, b, p): FldRatElt, FldRatElt, RngIntElt -> RngIntElt`

### `NormResidueSymbol(a, b, p): RngIntElt, RngIntElt, RngIntElt -> RngIntElt`

Given two rational numbers or integers $a$ and $b$, and a prime $p$, returns $1$ if the quadratic form $ax^2+by^2-z^2$ represents zero over ${\mathbb{Q}}_p$ and returns $-1$ otherwise.

### `HilbertSymbol(a, b, p : parameters): FldRatElt, FldRatElt, RngIntElt -> RngIntElt`

### `HilbertSymbol(a, b, p : parameters): RngIntElt, RngIntElt, RngIntElt -> RngIntElt`

### `HilbertSymbol(a, b, p): FldAlgElt, FldAlgElt, RngOrdIdl -> RngIntElt`

```magma
Al: MonStgElt                    Default: "NormResidueSymbol"
```

Computes the Hilbert symbol $(a,b)_p$, where $a$ and $b$ are elements of a number field and $p$ is either a prime number (if $a,b \in {\mathbb{Q}}$) or a prime ideal. For $a,b \in {\mathbb{Q}}$, by default Magma uses `NormResidueSymbol` to compute the Hilbert symbol; one may insist on instead using the same algorithm as for number fields by setting the optional argument `Al` to `"Evaluate"`.

### `Example: Local Global (ex-d2227e)`

In the following example we show how the norm residue symbols can be used to determine the bad primes of a conic.

```magma
> P2<x,y,z> := ProjectiveSpace(RationalField(), 2);
> a := 234;
> b := -33709;
> c := 127;
> C := Conic(P2, a*x^2 + b*y^2 + c*z^2);
> HasRationalPoint(C);
false
> fac := Factorization(Integers()!Discriminant(C));
> fac;
[ <2, 3>, <3, 2>, <13, 2>, <127, 1>, <2593, 1> ]

```

So we only need to test the primes $2$, $3$, $13$, $127$ and $2593$. By scaling the defining polynomial of the curve $ax^2+by^2+cz^2 = 0$ by $-1/c$, we obtain the quadratic form $-a/c x^2 - b/c y^2 - z^2$; this means that we want to check the Hilbert symbols for the coefficient pair $(-a/c,-b/c)$.

```magma
> [ NormResidueSymbol(-a/c, -b/c, p[1]) : p in fac ];
[ -1, 1, 1, -1, 1 ];

```

The norm residue symbol indicates that only $2$ and $127$ have no local $p$-adic solutions, which confirms the bad primes as reported by Magma:

```magma
> BadPrimes(C);
[ 2, 127 ]

```
