TheInfoList

In
mathematics Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities and their changes (cal ...
, the restriction of a
function Function or functionality may refer to: Computing * Function key A function key is a key on a computer A computer is a machine that can be programmed to carry out sequences of arithmetic or logical operations automatically. Modern comp ...
$f$ is a new function, denoted $f\vert_A$ or $f$, obtained by choosing a smaller
domain Domain may refer to: Mathematics *Domain of a function In mathematics, the domain of a Function (mathematics), function is the Set (mathematics), set of inputs accepted by the function. It is sometimes denoted by \operatorname(f), where is th ...
''A'' for the original function $f$.

# Formal definition

Let $f: E \to F$ be a function from a set to a set . If a set is a
subset In mathematics Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities a ...

of , then the restriction of $f$ to $A$ is the function :$_A \colon A \to F$ 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 $A\cap \operatorname f$. If the function is thought of as a relation $\left(x,f\left(x\right)\right)$ on the
Cartesian product In mathematics Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities and ...
$E \times F$, then the restriction of to can be represented by its
graph Graph may refer to: Mathematics *Graph (discrete mathematics), a structure made of vertices and edges **Graph theory, the study of such graphs and their properties *Graph (topology), a topological space resembling a graph in the sense of discret ...

where the pairs $\left(x,f\left(x\right)\right)$ represent
ordered pair In mathematics Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities and th ...

s in the graph .

# Examples

# The restriction of the function$f: \mathbb R \to \mathbb R, \ x \mapsto x^2$ to the domain is the injection$f:\mathbb R_+ \to \mathbb R, \ x \mapsto x^2$. # The factorial function is the restriction of the gamma function to the positive integers, with the argument shifted by one: $_\!\left(n\right) = \left(n-1\right)!$

# Properties of restrictions

* Restricting a function $f:X\rightarrow Y$ to its entire domain $X$ gives back the original function, i.e., $f, _=f$. *Restricting a function twice is the same as restricting it once, i.e. if $A\subseteq B \subseteq \operatorname f$, then $\left(f, _B\right), _A=f, _A$. *The restriction of the
identity function Graph of the identity function on the real numbers In mathematics, an identity function, also called an identity relation, identity map or identity transformation, is a function (mathematics), function that always returns the same value that was ...

on a set ''X'' to a subset ''A'' of ''X'' is just the
inclusion map In mathematics Mathematics (from Ancient Greek, Greek: ) includes the study of such topics as quantity (number theory), mathematical structure, structure (algebra), space (geometry), and calculus, change (mathematical analysis, analysis). It h ...
from ''A'' into ''X''. *The restriction of a
continuous function In mathematics Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities and ...
is continuous.

# Applications

## Inverse functions

For a function to have an inverse, it must be
one-to-one One-to-one or one to one may refer to: Mathematics and communication *One-to-one function, also called an injective function *One-to-one correspondence, also called a bijective function *One-to-one (communication), the act of an individual commun ...
. 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 :$f\left(x\right) = x^2$ defined on the whole of $\R$ is not one-to-one since ''x''2 = (−''x'')2 for any ''x'' in $\R$. However, the function becomes one-to-one if we restrict to the domain in which case :$f^\left(y\right) = \sqrt .$ (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 In mathematics Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities an ...

.

## Selection operators

In
relational algebra In database theory, relational algebra is a theory that uses algebraic structures with a well-founded semantics for modeling data, and defining queries on it. The theory has been introduced by Edgar F. Codd. The main application of relational ...
, a
selection Selection may refer to: In science: * Selection (biology) Natural selection is the differential survival and reproduction of individuals due to differences in phenotype right , Here the relation between genotype and phenotype is ill ...
(sometimes called a restriction to avoid confusion with
SQL SQL ( ''S-Q-L'', "sequel"; Structured Query Language) is a domain-specific languageA domain-specific language (DSL) is a computer languageA computer language is a method of communication with a computer A computer is a machine that can b ...

's use of SELECT) is a
unary operation In mathematics Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities and ...
written as $\sigma_\left( R \right)$ or $\sigma_\left( R \right)$ where: * $a$ and $b$ are attribute names, * $\theta$ is a
binary operation In mathematics Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities and ...
in the set $\$, * $v$ is a value constant, * $R$ is a relation. The selection $\sigma_\left( R \right)$ selects all those
tuple In mathematics Mathematics (from Ancient Greek, Greek: ) includes the study of such topics as quantity (number theory), mathematical structure, structure (algebra), space (geometry), and calculus, change (mathematical analysis, analysis). ...
s in $R$ for which $\theta$ holds between the $a$ and the $b$ attribute. The selection $\sigma_\left( R \right)$ selects all those tuples in $R$ for which $\theta$ holds between the $a$ attribute and the value $v$. Thus, the selection operator restricts to a subset of the entire database.

## The pasting lemma

The pasting lemma is a result in
topology In mathematics Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities ...

that relates the continuity of a function with the continuity of its restrictions to subsets. Let $X,Y$ be two closed subsets (or two open subsets) of a topological space $A$ such that $A = X \cup Y$, and let $B$ also be a topological space. If $f: A \to B$ is continuous when restricted to both $X$ and $Y$, then $f$ 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 In mathematics Mathematics (from Ancient Greek, Greek: ) includes the study of such topics as quantity (number theory), mathematical structure, structure (algebra), space (geometry), and calculus, change (mathematical analysis, analysis). It ...
, one assigns an object $F\left(U\right)$ in a
category Category, plural categories, may refer to: Philosophy and general uses *Categorization Categorization is the ability and activity to recognize shared features or similarities between the elements of the experience of the world (such as O ...
to each
open set In mathematics Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities and ...
of a
topological space In mathematics Mathematics (from Greek: ) includes the study of such topics as numbers ( and ), formulas and related structures (), shapes and spaces in which they are contained (), and quantities and their changes ( and ). There is no gener ...
, and requires that the objects satisfy certain conditions. The most important condition is that there are ''restriction
morphism In mathematics Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities and th ...

s'' between every pair of objects associated to nested open sets; i.e., if $V\subseteq U$, 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: * For every open set ''U'' of ''X'', the restriction morphism res''U'',''U'' : ''F''(''U'') → ''F''(''U'') is the identity morphism on ''F''(''U''). * If we have three open sets , then the
composite Composite or compositing may refer to: Materials * Composite material, a material that is made from several different substances ** Metal matrix composite, composed of metal and other parts ** Cermet, a composite of ceramic and metallic materials * ...
. * (Locality) If (''U''''i'') is an open covering of an open set ''U'', and if ''s'',''t'' ∈ ''F''(''U'') are such that ''s'', ''U''''i'' = ''t'', ''U''''i'' for each set ''U''''i'' of the covering, then ''s'' = ''t''; and * (Gluing) If (''U''''i'') is an open covering of an open set ''U'', and if for each ''i'' a section is given such that for each pair ''U''''i'',''U''''j'' of the covering sets the restrictions of ''s''''i'' and ''s''''j'' agree on the overlaps: ''s''''i'', ''U''''i''∩''U''''j'' = ''s''''j'', ''U''''i''∩''U''''j'', then there is a section such that ''s'', ''U''''i'' = ''s''''i'' for each ''i''. 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 Binary may refer to: Science and technology Mathematics * Binary number In mathematics and digital electronics Digital electronics is a field of electronics The field of electronics is a branch of physics and electrical engineeri ...
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
subset In mathematics Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities a ...

s 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  ⩤ .Dunne, S. and Stoddart, Bill ''Unifying Theories of Programming: First International Symposium, UTP 2006, Walworth Castle, County Durham, UK, February 5–7, 2006, Revised Selected ... Computer Science and General Issues)''. Springer (2006) 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  ⩥ .