Finding ideal generator in real quadratic fields

216 Views Asked by At

Every non-zero ideal in the number ring of $\mathbb{Q}(\sqrt{d})$ is a $\mathbb{Z}$-module of rank $2$. Suppose we know an ideal is generated by the algebraic integers $\alpha$ and $\beta$ as $\mathbb{Z}$-module, and that it is principal. If $d < 0$ then it can be seen as a lattice in $\mathbb{C}$ and the generator is a minimal-length vector with respect to the Euclidean metric, so we can use Gauss' reduction algorithm.

If $d > 0$ we can realize the ideal as a sublattice of $\mathbb{R}^2$ by plotting the pairs $(\delta, \overline{\delta})$ where $\overline{\delta}$ denotes the Galois conjugate of $\delta$, but now the generator is one of infinitely-many minimal-length vectors with respect to the singular "metric" $(x, y) \mapsto \sqrt{|xy|}$. Is there an algorithmic way to find any such point of the lattice? Would Gauss' reduction algorithm also give the correct answer in this case?