Restriction (mathematics)

In mathematics, the restriction of a function formula_1 is a new function, denoted formula_2 or formula_3, obtained by choosing a smaller domain "A" for the original function formula_1.
Formal definition.
Let formula_5 be a function from a set to a set . If a set is a subset of , then the restriction of formula_1 to formula_7 is the function
given by "f"|"A"("x") = "f"("x") for "x" in "A". Informally, the restriction of to is the same function as , but is only defined on formula_9.
If the function is thought of as a relation formula_10 on the Cartesian product formula_11, then the restriction of to can be represented by its graph where the pairs formula_10 represent ordered pairs in the graph .
Applications.
Inverse functions.
For a function to have an inverse, it must be one-to-one. If a function is not one-to-one, it may be possible to define a partial inverse of by restricting the domain. For example, the function
defined on the whole of formula_23 is not one-to-one since "x"2 = (−"x")2 for any "x" in formula_23. However, the function becomes one-to-one if we restrict to the domain in which case
(If we instead restrict to the domain then the inverse is the negative of the square root of .) Alternatively, there is no need to restrict the domain if we allow the inverse to be a multivalued function.
Selection operators.
In relational algebra, a selection (sometimes called a restriction to avoid confusion with SQL's use of SELECT) is a unary operation written as
formula_26 or formula_27 where:
The selection formula_26 selects all those tuples in formula_33 for which formula_30 holds between the formula_28 and the formula_29 attribute.
The selection formula_27 selects all those tuples in formula_33 for which formula_30 holds between the formula_28 attribute and the value formula_32.
Thus, the selection operator restricts to a subset of the entire database.
The pasting lemma.
The pasting lemma is a result in topology that relates the continuity of a function with the continuity of its restrictions to subsets.
Let formula_44 be two closed subsets (or two open subsets) of a topological space formula_7 such that formula_46, and let formula_47 also be a topological space. If formula_48 is continuous when restricted to both formula_18 and formula_50, then formula_1 is continuous.
This result allows one to take two continuous functions defined on closed (or open) subsets of a topological space and create a new one.
Sheaves.
Sheaves provide a way of generalizing restrictions to objects besides functions.
In sheaf theory, one assigns an object formula_52 in a category to each open set of a topological space, and requires that the objects satisfy certain conditions. The most important condition is that there are "restriction morphisms" between every pair of objects associated to nested open sets; i.e., if formula_53, then there is a morphism res"V","U" : "F"("U") → "F"("V") satisfying the following properties, which are designed to mimic the restriction of a function:
The collection of all such objects is called a sheaf. If only the first two properties are satisfied, it is a pre-sheaf.
Left- and right-restriction.
More generally, the restriction (or domain restriction or left-restriction) of a binary relation between and may be defined as a relation having domain , codomain and graph . Similarly, one can define a right-restriction or range restriction . Indeed, one could define a restriction to -ary relations, as well as to subsets understood as relations, such as ones of for binary relations.
These cases do not fit into the scheme of sheaves.
Anti-restriction.
The domain anti-restriction (or domain subtraction) of a function or binary relation (with domain and codomain ) by a set may be defined as ; it removes all elements of from the domain . It is sometimes denoted  ⩤ . Similarly, the range anti-restriction (or range subtraction) of a function or binary relation by a set is defined as ; it removes all elements of from the codomain . It is sometimes denoted  ⩥ .