Suppose $G$ is a group and let $g∈G$, explain why the order of $g$ is well-defined, while the definition of the order is the following:
The smallest positive r such that $g^r=e$, if no such r is found then we say g has infinite order.
My Question: What strategy should I adopt to check the well-definedness? I know we are essentially checking if the output is unique or not.
My Attempt: Suppose the order of g is finite then consider the set $\{r>0:g^r=e\}$. We know this set is non-empty since $g^k=e$ for some $k$. Then by Well-Ordering Principle there exists smallest such $r$ and hence the order is well-defined.