Explicit description of a quaternion algebra with a prescribed set of ramified places

I wrote something that makes this process algorithmic (and tries to simplifying the resulting algebra as much as possible) in Magma.

Copy and paste the following code into Magma (e.g. the calculator at http://magma.maths.usyd.edu.au/calc/)

_<x> := PolynomialRing(Rationals());  
F<s> := NumberField(x^2-2);  // s = sqrt(2)  
_<xF> := PolynomialRing(F);  
K<w> := ext<F | xF^2 - s>;  // w = 2^(1/4) = sqrt(s)  
ZK := Integers(K);  
// find small primes that are not split in K  
pps := [pp : pp in PrimesUpTo(20,F) | #Factorization(ZK!!pp) eq 1];  
// Compute a quaternion algebra (over F) ramified at 2 finite primes 
// and no infinite places  
B := QuaternionAlgebra(&*pps[1..2]);   
B;  
// Verify ramification  
RamifiedPlaces(B);  
RamifiedPlaces(ChangeRing(B, AbsoluteField(K)));  

The algorithm it uses is probabilistic, since there is no clear "best" quaternion algebra with specified ramification set (and anyway may be expensive to compute). Anyway, on this run it tells me

Quaternion Algebra with base ring F, defined by i^2 = -s - 1, j^2 = 8*s + 11

So you can take $i^2 = a = -\sqrt{2}-1$ and $j^2 = b = 8\sqrt{2}+11$; these are elements of smaller norm than you could get from $\mathbb{Q}$.


To have zero-divisors, the norm of an an element must be $0$. The norm of an element is a three-variable quadratic form. You need a quadratic form that has zeroes at the split primes but not at the non-split primes.

Wikipedia provides an explicit description of all quaternion algebras, which gives quadratic forms ore of type $ax^2+by^2-abz^2$. So the problem is to find a quadratic form of type $ax^2+by^2-abz^2$ which fails to have roots at some specified set of primes. I'm not sure exactly how to do this.

It's much easier if the requirements are not exact. For simplicity, I'm going to find a quaternion algebra defined over $\mathbb Q$ and tensor up to $\mathbb Q(\sqrt[4]{2})$. Take a split prime, say $73$. Then a quaternion algebra ramified at $73$ will remain ramified in the extension. To ensure that it is split at $\infty$, the only thing we need to check is that the form is not definite, ensuring a solution in $\mathbb R$. Take $a=73$, $b=5$.

The form has two positive eigenvalues and one negative eigenvalue, clearly not definite. For $73x^2+5y^2=365z^2$ to have a solution in $\mathbb Z_{73}$, $y$ must be a multiple of $73$. Without loss of generality, then, $x$ and $z$ are not multiples of $73$ (otherwise we divide all three by $73$) so we have $x^2-5z^2=0$ mod $73$. But $5$ is not a quadratic residue mod $73$ so this is impossible.

This form, in $\mathbb Q(\sqrt[4]{2})$, remains ramified in the four primes lying over $73$ but is still split at the infinite primes.