Well-defined


In mathematics, an expression is called well-defined or unambiguous if its definition assigns it a unique interpretation or value. Otherwise, the expression is said to be not well-defined, ill-defined or ambiguous. 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 takes real numbers as input, and if f does not equal f then f is not well-defined. The term well-defined can also be used to indicate that a logical expression is unambiguous or uncontradictory.
A function that is not well-defined is not the same as a function that is undefined. For example, if f = 1/x, then the fact that f is undefined does not mean that the f is not well-defined — but that 0 is simply not in the domain of f.

Example

Let be sets, let and "define" as if and if.
Then is well-defined if. For example, if and, then would be well-defined and equal to Modulo operation|.
However, if, then would not be well-defined because is "ambiguous" for. For example, if and, then would have to be both 0 and 1, which makes it ambiguous. As a result, the latter is not well-defined and thus not a function.

"Definition" as anticipation of definition

In order to avoid the apostrophes around "define" in the previous simple example, the "definition" of could be broken down into two simple logical steps:
While the definition in step 1 is formulated with the freedom of any definition and is certainly effective, the assertion in step 2 has to be proved. That is, is a function if and only if, in which case — as a function — is well-defined.
On the other hand, if, then for an, we would have that and, which makes the binary relation not functional and thus not well-defined as a function. Colloquially, the "function" is also called ambiguous at point , and the original "definition" is pointless.
Despite these subtle logical problems, it is quite common to anticipatorily use the term definition for "definitions" of this kind — for three reasons:
  1. It provides a handy shorthand of the two-step approach.
  2. The relevant mathematical reasoning is the same in both cases.
  3. In mathematical texts, the assertion is "up to 100%" true.

    Independence of representative

The question of well-definedness of a function classically arises when the defining equation of a function does not refer to the arguments themselves, but to elements of the arguments. This is sometimes unavoidable when the arguments are cosets and the equation refers to coset representatives.

Functions with one argument

For example, consider the following function
where and are the integers modulo m and denotes the congruence class of n mod m.
N.B.: is a reference to the element, and is the argument of '.
The function
' is well-defined, because

Operations

In particular, the term well-defined is used with respect to 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.
The fact that this is well-defined follows from the fact that we can write any representative of as, where is an integer. Therefore,
and similarly for any representative of, thereby making the same irrespective of the choice of representative.

Well-defined notation

For real numbers, the product is unambiguous because . This property, also known as associativity of multiplication, guarantees that the result does not depend on the sequence of multiplications, so that a specification of the sequence can be omitted.
The subtraction operation, on the other hand, is not associative. However, there is a convention in that the operation is understood as addition of additive inverse, thus is the same as, and is thus "well-defined".
Division is also non-associative. However, in the case of the convention is not so well established, so this expression is considered ill-defined.
Unlike with functions, the notational ambiguities can be overcome more or less easily by means of additional definitions. 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 -c, and the operator = for assignment is right-to-left-associative, which means that a=b=c is defined as a=. In the programming language APL there is only one rule: from right to left — but parentheses first.

Other uses of the term

A solution to a partial differential equation is said to be well-defined if it is determined by the boundary conditions in a continuous way as the boundary conditions are changed.