Let $K$ be a quadratic number field. Let $\mathcal{O}_K$ be the ring of algebraic integers in $K$. Let $R$ be an order of $K$, $D$ its discriminant. I am interested in the ideal theory on $R$ because it has a deep connection with the theory of binary quadratic forms as shown in this. By this question, $1, \omega = \frac{(D + \sqrt D)}{2}$ is a basis of $R$ as a $\mathbb{Z}$-module.
Let $x_1,\cdots, x_n$ be a sequence of elements of $R$. We denote by $[x_1,\cdots,x_n]$ the $\mathbb{Z}$-submodule of $R$ generated by $x_1,\cdots, x_n$.
Let $I$ be a non-zero ideal of $R$. I am interested in a decomposition of $I$ into a product of ideals. By this question, there exist unique rational integers $a, b, c$ such that $I = [a, b + c\omega], a \gt 0, c \gt 0, 0 \le b \lt a, a \equiv 0$ (mod $c$), $b \equiv 0$ (mod $c$). If $c = 1$, we say $I$ is a primitive ideal. Let $a = ca'$, $b = cb'$. Then $I = cJ$, where $J = [a', b' + \omega]$. Clearly $J$ is a primitive ideal. So the decomposition problem can be reduced to the case when $I$ is primitive.
Let $\frak{f}$ $= \{x \in R | x\mathcal{O}_K \subset R\}$. Let $I$ be a non-zero ideal of $R$. If $I + \mathfrak{f} = R$, we call $I$ regular. For the properties of regular ideals, see this. We call a non-zero ideal $J$ totally non-regular if every prime ideal containing $J$ is non-regular. I came up with the following proposition.
Proposition Let $I = [a, r + \omega]$ be a primitive ideal of $R$, where $a \gt 0$ and $r$ are rational integers. Then $I$ can be uniquely decomposed into $I = JM$, where $J$ is a regular ideal and $M$ is a totally non-regular ideal. Moreover there exist rational integers $g \gt 0, h \gt 0$ such that $a = gh$ and $J = [g, r + \omega], M = [h, r + \omega]$.
Outline of my proof I used the results of this question and mimicked my proof of this question.
My Question How do you prove the proposition? I would like to know other proofs based on different ideas from mine. I welcome you to provide as many different proofs as possible. I wish the proofs would be detailed enough for people who have basic knowledge of introductory algebraic number theory to be able to understand.