# Describing maximal orders in quaternion algebras.

In Dorman's paper, Global orders in definite quaternion algebras as endomorphism rings for reduced CM elliptic curves, he considers the following situation:

$$K = \mathbb{Q}(\sqrt{d})$$ where $$d$$ is a fundamental, negative, odd discriminant, with ring of integers $$\mathcal{O}_K;$$
Let $$D^{-1}$$ be the inverse different of $$\mathcal O_K;$$
$$l$$ is a fixed prime;
We take a prime $$q$$ to be such that for every prime divisor $$p\mid d$$, we can find a solution $$\lambda_p^2 = -lq\;(\bmod\; p)$$. (We can take $$q$$ prime by Dirichlet's theorem on prime progressions and just use CRT.).
Now, by design, $$(q) = \mathfrak q \mathfrak{\bar q}.$$

We define the quaternion algebra $$\mathbb B_{l,\infty} = \left\{[\alpha,\beta] = \begin{bmatrix} \alpha & \beta \\ -lq\bar\beta & \bar\alpha \end{bmatrix}: \alpha,\beta\in K\right\}.$$

For any $$\mathfrak a\subset \mathcal O_K,$$ let $$\lambda'_p = (-1)^{v_{\mathfrak p}(\mathfrak a)}\lambda_p$$ where $$(p) = \mathfrak p^2.$$ Then, you CRT these to get a $$\lambda'\in \mathbb Z/d\mathbb Z$$, and here comes the doozy of a definition that is giving me problems.

Now, define $$R(\mathfrak a) = \left\{[\alpha,\beta]\in \mathbb{B}_{l,\infty}: \alpha\in D^{-1}, \beta\in \mathfrak{q}^{-1} D^{-1}\mathfrak a^{-1}\mathfrak {\bar a}, \alpha\equiv \lambda'\beta \;(\bmod\; \mathcal O)\right\}.$$

The claim is that $$R(\mathfrak a)$$ is a maximal order in the quaternion algebra, but I can't even show that it's a ring! I keep having a negative or a conjugate in the wrong place.

Any guidance is thoroughly appreciated! Thanks in advance! :)

What I've done so far:

Surely sums of such matrices are still of this form; so, my problem is with products. I am going to let $$\pi = \sqrt{d}$$ and take a product of two such matrices $$A = 1/\pi[\alpha,\beta]$$ and $$B = 1/\pi[\gamma,\delta]$$. (I do this to make the final condition in $$R(\mathfrak a)$$ easier to confirm.)

$$AB = 1/d[\alpha\gamma-lq\beta\bar\delta, \alpha\delta + \beta\bar\gamma].$$ Then, the final condition says we would like $$\alpha\gamma-lq\beta\bar\delta\equiv\lambda'( \alpha\delta + \beta\bar\gamma )\;(\bmod\; d)$$ given that $$\alpha \equiv \lambda' \beta \;(\bmod\; \pi)$$ and $$\gamma\equiv \lambda'\delta \;(\bmod\; \pi).$$

Well, taking the products of the given relations, we have $$(\alpha - \lambda'\beta)(\gamma-\lambda'\delta) \equiv \alpha\gamma -lq\beta\delta -\lambda'(\alpha\delta + \beta\gamma)\equiv 0 \;(\bmod\; d).$$ So, this is a recurrent theme with showing this to be a ring-- the conjugates are missing. By fiddling around, I realized that $$\beta\lambda'((-\gamma+\lambda'\delta) +(\bar\gamma -\lambda'\bar\delta))\equiv 0\;(\bmod\; d)$$ since each of the terms inside is divisible by $$\pi$$ and the difference of conjugates adds another factor of $$\pi$$. So, we can add this onto the previously computed product to get the desired relation.

As for showing that either of the first two relations still holds for the product of $$A$$ and $$B$$, I'm at a loss.

See Remark 6.1 in Singular Moduli for Arbitrary Discriminants. I think that what you're observing is this Remark 6.1, that this is a mistake in Dorman's work and $$R(\mathfrak{a},\lambda)$$ is not closed under multiplication necessarily. It is corrected in the linked article (On Singular Moduli for Arbitrary Discriminants'' by Lauter and Viray, where they generalize the results of Dorman and Gross-Zagier). The upshot is that one needs an extra hypothesis $$\lambda \mathfrak{q}^{-1}\overline{\mathfrak{a}}\mathfrak{a}^{-1}\subset \mathcal{O}$$ so that $$R(\mathfrak{a},\lambda)$$ is closed under multiplication. See Lemma 6.3 for a proof that $$R(\mathfrak{a},\lambda)$$ is an order given this extra assumption.