In mathematics, a well-defined expression or unambiguous expression is an expression whose definition assigns it a unique interpretation or value. Otherwise, the expression is said to be not well defined, ill defined or ambiguous.[1] A function is well defined if it gives the same result when the representation of the input is changed without changing the value of the input. For instance, if
f
f(0.5)
f(1/2)
f
A function that is not well defined is not the same as a function that is undefined. For example, if
f(x)= | 1 |
x |
f(0)
f
Let
A0,A1
A=A0\cupA1
f:A → \{0,1\}
f(a)=0
a\inA0
f(a)=1
a\inA1
Then
f
A0\capA1=\emptyset
A0:=\{2,4\}
A1:=\{3,5\}
f(a)
\operatorname{mod}(a,2)
However, if
A0\capA1 ≠ \emptyset
f
f(a)
a\inA0\capA1
A0:=\{2\}
A1:=\{2\}
f(2)
f
In order to avoid the quotation marks around "define" in the previous simple example, the "definition" of
f
f
A0\capA1=\emptyset
f
On the other hand, if
A0\capA1 ≠ \emptyset
a\inA0\capA1
(a,0)\inf
(a,1)\inf
f
f
a
Despite these subtle logical problems, it is quite common to use the term definition (without apostrophes) for "definitions" of this kind, for three reasons:
Questions regarding the well-definedness of a function often arise when the defining equation of a function refers not only to the arguments themselves, but also to elements of the arguments, serving as representatives. This is sometimes unavoidable when the arguments are cosets and when the equation refers to coset representatives. The result of a function application must then not depend on the choice of representative.
For example, consider the following function:
\begin{matrix} f:&\Z/8\Z&\to&\Z/4\Z\\ &\overline{n}8&\mapsto&\overline{n}4, \end{matrix}
n\in\Z,m\in\{4,8\}
\Z/m\Z
\overline{n}m
N.B.:
\overline{n}4
n\in\overline{n}8
\overline{n}8
f
The function
f
n\equivn'\bmod8 \Leftrightarrow 8divides(n-n') ⇒ 4divides(n-n') \Leftrightarrow n\equivn'\bmod4.
As a counter example, the converse definition:
\begin{matrix} g:&\Z/4\Z&\to&\Z/8\Z\\ &\overline{n}4&\mapsto&\overline{n}8, \end{matrix}
\overline{1}4
\overline{5}4
\Z/4\Z
g
\overline{1}8
\overline{5}8
\overline{1}8
\overline{5}8
\Z/8\Z
In particular, the term well-defined is used with respect to (binary) operations on cosets. In this case, one can view the operation as a function of two variables, and the property of being well-defined is the same as that for a function. For example, addition on the integers modulo some n can be defined naturally in terms of integer addition.
[a] ⊕ [b]=[a+b]
The fact that this is well-defined follows from the fact that we can write any representative of
[a]
a+kn
k
[a] ⊕ [b]=[a+kn] ⊕ [b]=[(a+kn)+b]=[(a+b)+kn]=[a+b];
similar holds for any representative of
[b]
[a+b]
For real numbers, the product
a x b x c
(a x b) x c=a x (b x c)
a-b-c
(a-b)-c
a/b/c
Unlike with functions, notational ambiguities can be overcome by means of additional definitions (e.g., rules of precedence, associativity of the operator). For example, in the programming language C, the operator -
for subtraction is left-to-right-associative, which means that a-b-c
is defined as (a-b)-c
, and the operator =
for assignment is right-to-left-associative, which means that a=b=c
is defined as a=(b=c)
.[3] In the programming language APL there is only one rule: from right to left – but parentheses first.
A solution to a partial differential equation is said to be well-defined if it is continuously determined by boundary conditions as those boundary conditions are changed.