Let $p$ be a prime and consider the following subset of $\mathbb{Q}$: $$ \mathcal{L}_p = \left\lbrace r = \frac{a}{b}\in \mathbb{Q}: a,b\in \mathbb{Z},\, p\nmid b\right\rbrace $$ Prove that it is a PID.
I have little progress. I tried to prove that it is an Euclidean domain, hence PID, but I could not come up with an Euclidean function.
In general, I do not know how to prove that a domain is a PID without using something like the Euclidean function and analyzing its minimum in the ideal which is the generator.
Here is a sketch of the calculation.
Let $I$ be an ideal of $\mathcal{L}_p$. Then consider $I \cap \mathbb{Z}$.
$I \cap \mathbb{Z} = n\mathbb{Z}$ for $n \in \mathbb{Z}$. Now I claim $I = n\mathcal{L}_p$. If $a \in I$,
so $a = n(c/b)$ for $b,c \in \mathbb{Z}$ and $b$ coprime to $p$. The converse is because $n \in I$.