There is another post that addresses this but quickly fix the problem to be something in arthmetics, and in turn what it means for that arithematics problem to be well defined.
I have never encontered the definition of "well defined" in a textbook, only in questions where I am asked to show something is well defined
For example
Given a functional
$$L(f) = \int\limits_0^1 [f^2 - f] dx$$
where $f\in [0,1] \to \mathbb{R}$, $f(0) = 0$ and Lipschitz, show $L(f)$ is well defined
Example 2:
Let $d$ be a metric on $X$, and define the point to set distance
$$d(x,C) = \inf\{d(x,y): y \in C\}$$
where $C \subset X$ is a nonempty set
Show $d(x,C)$ is well defined
In general, given object $\phi = f$, whatever $\phi, f$ is, what does it mean to show that $\phi$ is well defined?
There is no universal definition for "well defined." Here are three common uses of the term.
When someone says that $\overline{f}$ is well defined, they mean that $f(x) = f(y)$ whenever $x \sim y$. Otherwise, $\overline{f}$ makes no sense as a function.
Example: $f: R \rightarrow S$ is a homomorphism of rings, $I$ is an ideal of $R$, and $\overline{f}: R/I \rightarrow S$ is given by the formula $\overline{f}(x+I) = f(x)$. Then $\overline{f}$ is well defined if and only if $I$ is contained in the kernel of $f$.
When someone says that $f$ is well defined, they mean that the formula gives a valid output.
Example: $f: (-1,1) \rightarrow \mathbb{R}$, $$f(x) = 1 + x + x^2 + \cdots $$ Here $f$ is defined in terms of a limit, and to say that $f$ is well defined is to say that the limit exists.
Example: $f: (0,\infty) \rightarrow \mathbb{R}, x \mapsto \ln x$. This function is not well defined, because no one has given $\ln 0$ a definition as a real number.
When someone says that $f$ is well defined, what they mean that if $x \in X,$ then $f(x)$ by its formula is actually an element of the set $Y$.
Example: let $f: (-1,1) \cap \mathbb{Q} \rightarrow \mathbb{Q}$ be given by $$f(x) = 1 + x + x^2 + \cdots$$
Suppose we have already established that $f(x)$ is an element of $\mathbb{R}$. To say that $f$ is well defined, we would have to argue that $f(x)$ is actually in $\mathbb{Q}$.