How to prove that a function is well defined?

6.7k Views Asked by At

I know what "Well Defined" means, and I know how to show that something specifically isn't well defined -- that is, by presenting a case where two different but equivalent forms of $x$ have different images $f(x)$... But if I'm given a function and am asked to prove that it IS well defined, what steps do I have to do to show this?

Take for example the assertion that you can add and multiply congruence classes as such:

  • $[a]+[c]=[a+c]$, and
  • $[a]\cdot[c]=[a\cdot c]$

My textbook says that both are well defined statements because the theorem that $a\equiv b\mod{m}$ and $c\equiv d\mod{m}$ imply that $a+c\equiv b+d\mod{m}$ and $ac\equiv bd\mod{m}$ implies they are... I just can't quite follow why.

In general though, neglecting this specific example, what steps do I need to follow to show that something is well defined?

2

There are 2 best solutions below

3
On

Morally, stating that an object is "well-defined" means that it shouldn't matter what name we call it. Here, we might have issues, since $a$ and $a + m$ are two very different-looking names for the same object, since we're only considering numbers up to addition of multiples of $m$.

So in general, to check well-definition, you need to write down an object and an arbitrary name for it, and make sure that the particular name doesn't change the result of a function.

So here in particular, if we fix an integer $a$, its other names are all of the form $a + km$ with $k$ an integer. Likewise, every name for $c$ has the form $c + nm$ for some $n$. Now check that the result using $a$ and $c$ agrees with the result using $a + km$ and $c + nm$, and you're done.

0
On

It's hard to give a completely general answer, because the term "well-defined" is often misused (you might say it's not a well-defined term.) But we can generalize slightly to say that a function on tuples of equivalence classes "defined" as

\begin{align}\tag{*} f([a_1],\ldots,[a_n]) = [g(a_1,\ldots,a_n)] \end{align}

is well-defined if we have \begin{align}\tag{**} [g(a_1,\ldots,a_n)] = [g(a_1',\ldots,a_n')]\text{ whenever }[a_i] = [a_i']\text{ for all } i\in \{1,\ldots,n\}. \end{align}

The reason for this is that generally one defines an $n$-ary function $f$ by saying what $f(C_1,\ldots,C_n)$ is for all possible values of the arguments $C_1,\ldots,C_n$. Even if the arguments $C_i$ can be written as equivalence classes $[a_i]$, one is not allowed to use the values of $a_i$ when specifying the value of the function $f$; one is only allowed to use the values of the arguments $C_i$. But sometimes the most convenient "definition" appears to depend on $a_i$, in which case one must check that it really only depends on the equivalence classes $C_i = [a_i]$.

If this condition (**) fails, then colloquially one says "the function $f$ is not well-defined". But in reality there is no function $f$ at all in this case: if (**) fails then the statement (*) is not a definition of anything, it is just an absurdity.