# Well-defined

Last updated

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. [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 takes real numbers as input, and if f(0.5) does not equal f(1/2) then f is not well-defined (and thus not a function). [2] The term well-defined can also be used to indicate that a logical expression is unambiguous or uncontradictory. [3]

## Contents

A function that is not well-defined is not the same as a function that is undefined. For example, if f(x) = 1/x, then the fact that f(0) 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 ${\displaystyle A_{0},A_{1}}$ be sets, let ${\displaystyle A=A_{0}\cup A_{1}}$ and "define" ${\displaystyle f:A\rightarrow \{0,1\}}$ as ${\displaystyle f(a)=0}$ if ${\displaystyle a\in A_{0}}$ and ${\displaystyle f(a)=1}$ if ${\displaystyle a\in A_{1}}$.

Then ${\displaystyle f}$ is well-defined if ${\displaystyle A_{0}\cap A_{1}=\emptyset \!}$. For example, if ${\displaystyle A_{0}:=\{2,4\}}$and ${\displaystyle A_{1}:=\{3,5\}}$, then ${\displaystyle f(a)}$would be well-defined and equal to ${\displaystyle \operatorname {mod} (a,2)}$.

However, if ${\displaystyle A_{0}\cap A_{1}\neq \emptyset }$, then ${\displaystyle f}$ would not be well-defined because ${\displaystyle f(a)}$ is "ambiguous" for ${\displaystyle a\in A_{0}\cap A_{1}}$. For example, if ${\displaystyle A_{0}:=\{2\}}$ and ${\displaystyle A_{1}:=\{2\}}$, then ${\displaystyle f(2)}$ would have to be both 0 and 1, which makes it ambiguous. As a result, the latter ${\displaystyle f}$ 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 ${\displaystyle f}$ could be broken down into two simple logical steps:

1. The definition of the binary relation: In the example
${\displaystyle f:={\bigl \{}(a,i)\mid i\in \{0,1\}\wedge a\in A_{i}{\bigr \}}}$,
(which so far is nothing but a certain subset of the Cartesian product ${\displaystyle A\times \{0,1\}}$.)
2. The assertion: The binary relation ${\displaystyle f}$ is a function; in the example
${\displaystyle f:A\rightarrow \{0,1\}}$.

While the definition in step 1 is formulated with the freedom of any definition and is certainly effective (without the need to classify it as "well-defined"), the assertion in step 2 has to be proved. That is, ${\displaystyle f}$ is a function if and only if ${\displaystyle A_{0}\cap A_{1}=\emptyset }$, in which case ${\displaystyle f}$— as a function — is well-defined.

On the other hand, if ${\displaystyle A_{0}\cap A_{1}\neq \emptyset }$, then for an ${\displaystyle a\in A_{0}\cap A_{1}}$, we would have that ${\displaystyle (a,0)\in f}$and${\displaystyle (a,1)\in f}$, which makes the binary relation ${\displaystyle f}$ not functional (as defined in Binary relation#Special types of binary relations) and thus not well-defined as a function. Colloquially, the "function" ${\displaystyle f}$ is also called ambiguous at point ${\displaystyle a}$ (although there is per definitionem never an "ambiguous function"), and the original "definition" is pointless.

Despite these subtle logical problems, it is quite common to anticipatorily use the term definition (without apostrophes) for "definitions" of this kind — for three reasons:

1. It provides a handy shorthand of the two-step approach.
2. The relevant mathematical reasoning (i.e., step 2) 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 (only) refer to the arguments themselves, but (also) to elements of the arguments, serving as representatives. This is sometimes unavoidable when the arguments are cosets and the equation refers to coset representatives. The result of a function application must then not depend on the choice of reprentative.

### Functions with one argument

For example, consider the following function

${\displaystyle {\begin{matrix}f:&\mathbb {Z} /8\mathbb {Z} &\to &\mathbb {Z} /4\mathbb {Z} \\&{\overline {n}}_{8}&\mapsto &{\overline {n}}_{4},\end{matrix}}}$

where ${\displaystyle n\in \mathbb {Z} ,m\in \{4,8\}}$ and ${\displaystyle \mathbb {Z} /m\mathbb {Z} }$ are the integers modulo m and ${\displaystyle {\overline {n}}_{m}}$ denotes the congruence class of n mod m.

N.B.: ${\displaystyle {\overline {n}}_{4}}$ is a reference to the element ${\displaystyle n\in {\overline {n}}_{8}}$, and ${\displaystyle {\overline {n}}_{8}}$ is the argument of ${\displaystyle f}$.

The function ${\displaystyle f}$ is well-defined, because

${\displaystyle n\equiv n'{\bmod {8}}\;\Leftrightarrow \;8{\text{ divides }}(n-n')\Rightarrow \;4{\text{ divides }}(n-n')\;\Leftrightarrow \;n\equiv n'{\bmod {4}}.}$

As a counter example, the converse definition

${\displaystyle {\begin{matrix}g:&\mathbb {Z} /4\mathbb {Z} &\to &\mathbb {Z} /8\mathbb {Z} \\&{\overline {n}}_{4}&\mapsto &{\overline {n}}_{8},\end{matrix}}}$

does not lead to a well-defined function, since e.g. ${\displaystyle {\overline {1}}_{4}}$ equals ${\displaystyle {\overline {5}}_{4}}$ in ${\displaystyle \mathbb {Z} /4\mathbb {Z} }$, but the first would be mapped by ${\displaystyle g}$ to ${\displaystyle {\overline {1}}_{8}}$, while the second would be mapped to ${\displaystyle {\overline {5}}_{8}}$, and ${\displaystyle {\overline {1}}_{8}}$ and ${\displaystyle {\overline {5}}_{8}}$ are unequal in ${\displaystyle \mathbb {Z} /8\mathbb {Z} }$.

### Operations

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.

${\displaystyle [a]\oplus [b]=[a+b]}$

The fact that this is well-defined follows from the fact that we can write any representative of ${\displaystyle [a]}$ as ${\displaystyle a+kn}$, where ${\displaystyle k}$ is an integer. Therefore,

${\displaystyle [a]\oplus [b]=[a+kn]\oplus [b]=[(a+kn)+b]=[(a+b)+kn]=[a+b];}$

and similarly for any representative of ${\displaystyle [b]}$, thereby making ${\displaystyle [a+b]}$ the same irrespective of the choice of representative. [3]

## Well-defined notation

For real numbers, the product ${\displaystyle a\times b\times c}$ is unambiguous because ${\displaystyle (a\times b)\times c=a\times (b\times c)}$ (and hence the notation is said to be well-defined). [1] 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 that ${\displaystyle a-b-c}$ is shorthand for ${\displaystyle (a-b)-c}$, thus it is "well-defined".

Division is also non-associative. However, in the case of ${\displaystyle a/b/c}$, parenthezation conventions are not so well established, so this expression is often considered ill-defined.

Unlike with functions, the notational ambiguities can be overcome more or less easily 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). [4] 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. [1]

## Related Research Articles

In mathematics, a binary relation over sets X and Y is a subset of the Cartesian product ; that is, it is a set of ordered pairs (x, y) consisting of elements x in X and y in Y. It encodes the common concept of relation: an element x is related to an element y, if and only if the pair (x, y) belongs to the set of ordered pairs that defines the binary relation. A binary relation is the most studied special case n = 2 of an n-ary relation over sets X1, ..., Xn, which is a subset of the Cartesian product

In mathematics, when the elements of some set have a notion of equivalence defined on them, then one may naturally split the set into equivalence classes. These equivalence classes are constructed so that elements and belong to the same equivalence class if, and only if, they are equivalent.

A quotient group or factor group is a mathematical group obtained by aggregating similar elements of a larger group using an equivalence relation that preserves some of the group structure. For example, the cyclic group of addition modulo n can be obtained from the group of integers under addition by identifying elements that differ by a multiple of n and defining a group structure that operates on each such class as a single entity. It is part of the mathematical field known as group theory.

An integer is colloquially defined as a number that can be written without a fractional component. For example, 21, 4, 0, and −2048 are integers, while 9.75, 5+1/2, and 2 are not.

In mathematics, specifically abstract algebra, an integral domain is a nonzero commutative ring in which the product of any two nonzero elements is nonzero. Integral domains are generalizations of the ring of integers and provide a natural setting for studying divisibility. In an integral domain, every nonzero element a has the cancellation property, that is, if a ≠ 0, an equality ab = ac implies b = c.

In mathematics, a group is a set equipped with an operation that combines any two elements to form a third element while being associative as well as having an identity element and inverse elements. These three conditions, called group axioms, hold for number systems and many other mathematical structures. For example, the integers together with the addition operation form a group. The formulation of the axioms is, however, detached from the concrete nature of the group and its operation. This allows one to handle entities of very different mathematical origins in a flexible way, while retaining essential structural aspects of many objects in abstract algebra and beyond. The ubiquity of groups in numerous areas—both within and outside mathematics—makes them a central organizing principle of contemporary mathematics.

In mathematics, modular arithmetic is a system of arithmetic for integers, where numbers "wrap around" when reaching a certain value, called the modulus. The modern approach to modular arithmetic was developed by Carl Friedrich Gauss in his book Disquisitiones Arithmeticae, published in 1801.

In mathematics, a sequence is an enumerated collection of objects in which repetitions are allowed and order matters. Like a set, it contains members. The number of elements is called the length of the sequence. Unlike a set, the same elements can appear multiple times at different positions in a sequence, and unlike a set, the order does matter. Formally, a sequence can be defined as a function from natural numbers to the elements at each position. The notion of a sequence can be generalized to an indexed family, defined as a function from an index set that may not be numbers to another set of elements.

In Euclidean geometry, an affine transformation, or an affinity, is a geometric transformation that preserves lines and parallelism.

In set theory, the complement of a set A, often denoted by Ac, are the elements not in A.

A mathematical symbol is a figure or a combination of figures that is used to represent a mathematical object, an action on mathematical objects, a relation between mathematical objects, or for structuring the other symbols that occur in a formula. As formulas are entirely constituted with symbols of various types, many symbols are needed for expressing all mathematics.

In mathematics, specifically group theory, a subgroup H of a group G may be used to decompose the underlying set of G into disjoint equal-size subsets called cosets. There are left cosets and right cosets. Cosets have the same number of elements (cardinality) as does H. Furthermore, H itself is both a left coset and a right coset. The number of left cosets of H in G is equal to the number of right cosets of H in G. This common value is called the index of H in G and is usually denoted by [G : H].

An exact sequence is a sequence of morphisms between objects such that the image of one morphism equals the kernel of the next.

In mathematics, a function is a binary relation between two sets that associates each element of the first set to exactly one element of the second set. Typical examples are functions from integers to integers, or from the real numbers to real numbers.

In mathematics, a foliation is an equivalence relation on an n-manifold, the equivalence classes being connected, injectively immersed submanifolds, all of the same dimension p, modeled on the decomposition of the real coordinate space Rn into the cosets x + Rp of the standardly embedded subspace Rp. The equivalence classes are called the leaves of the foliation. If the manifold and/or the submanifolds are required to have a piecewise-linear, differentiable, or analytic structure then one defines piecewise-linear, differentiable, or analytic foliations, respectively. In the most important case of differentiable foliation of class Cr it is usually understood that r ≥ 1. The number p is called the dimension of the foliation and q = np is called its codimension.

In mathematics, a congruence subgroup of a matrix group with integer entries is a subgroup defined by congruence conditions on the entries. A very simple example would be invertible 2 × 2 integer matrices of determinant 1, in which the off-diagonal entries are even. More generally, the notion of congruence subgroup can be defined for arithmetic subgroups of algebraic groups; that is, those for which we have a notion of 'integral structure' and can define reduction maps modulo an integer.

In mathematics, the Grothendieck group construction constructs an abelian group from a commutative monoid M in the most universal way, in the sense that any abelian group containing a homomorphic image of M will also contain a homomorphic image of the Grothendieck group of M. The Grothendieck group construction takes its name from a specific case in category theory, introduced by Alexander Grothendieck in his proof of the Grothendieck–Riemann–Roch theorem, which resulted in the development of K-theory. This specific case is the monoid of isomorphism classes of objects of an abelian category, with the direct sum as its operation.

In mathematics, a CR manifold, or Cauchy–Riemann manifold, is a differentiable manifold together with a geometric structure modeled on that of a real hypersurface in a complex vector space, or more generally modeled on an edge of a wedge.

In mathematics, particularly in the area of number theory, a modular multiplicative inverse of an integer a is an integer x such that the product ax is congruent to 1 with respect to the modulus m. In the standard notation of modular arithmetic this congruence is written as

In computer science and mathematics, more precisely in automata theory, model theory and formal language, a regular numerical predicate is a kind of relation over integers. Regular numerical predicates can also be considered as a subset of for some arity . One of the main interests of this class of predicates is that it can be defined in plenty of different ways, using different logical formalisms. Furthermore, most of the definitions use only basic notions, and thus allows to relate foundations of various fields of fundamental computer science such as automata theory, syntactic semigroup, model theory and semigroup theory.

## References

### Notes

1. Weisstein, Eric W. "Well-Defined". From MathWorld--A Wolfram Web Resource. Retrieved 2 January 2013.
2. Joseph J. Rotman, The Theory of Groups: an Introduction, p. 287 "... a function is "single-valued," or, as we prefer to say ... a function is well defined.", Allyn and Bacon, 1965.
3. "The Definitive Glossary of Higher Mathematical Jargon". Math Vault. 2019-08-01. Retrieved 2019-10-18.
4. "Operator Precedence and Associativity in C". GeeksforGeeks. 2014-02-07. Retrieved 2019-10-18.