In

_{''A''}(''x'') = ''f''(''x'') for ''x'' in ''A''. Informally, the restriction of to is the same function as , but is only defined on $A\backslash cap\; \backslash operatorname\; f$.
If the function is thought of as a relation $(x,f(x))$ on the

^{2} = (−''x'')^{2} for any ''x'' in $\backslash R$. However, the function becomes one-to-one if we restrict to the domain in which case
:$f^(y)\; =\; \backslash 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

_{''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 _{''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.

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\backslash 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\; \backslash to\; F$ be a function from a set to a set . If a set is asubset
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\; \backslash colon\; A\; \backslash to\; F$
given by ''f'', 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\; \backslash 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 $(x,f(x))$ 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:\; \backslash mathbb\; R\; \backslash to\; \backslash mathbb\; R,\; \backslash \; x\; \backslash mapsto\; x^2$ to the domain $\backslash mathbb\; R\_\; =;\; href="/html/ALL/s/,\backslash infty)\_$ is the injection$f:\backslash mathbb\; R\_+\; \backslash to\; \backslash mathbb\; R,\; \backslash \; x\; \backslash mapsto\; x^2$. # The factorial function is the restriction of the gamma function to the positive integers, with the argument shifted by one: $\_\backslash !(n)\; =\; (n-1)!$Properties of restrictions

* Restricting a function $f:X\backslash 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\backslash subseteq\; B\; \backslash subseteq\; \backslash operatorname\; f$, then $(f,\; \_B),\; \_A=f,\; \_A$. *The restriction of theidentity 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 beone-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(x)\; =\; x^2$
defined on the whole of $\backslash R$ is not one-to-one since ''x''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

Inrelational 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
$\backslash sigma\_(\; R\; )$ or $\backslash sigma\_(\; R\; )$ where:
* $a$ and $b$ are attribute names,
* $\backslash 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 $\backslash $,
* $v$ is a value constant,
* $R$ is a relation.
The selection $\backslash sigma\_(\; R\; )$ 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 $\backslash theta$ holds between the $a$ and the $b$ attribute.
The selection $\backslash sigma\_(\; R\; )$ selects all those tuples in $R$ for which $\backslash 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 intopology
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\; \backslash cup\; Y$, and let $B$ also be a topological space. If $f:\; A\; \backslash 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. Insheaf 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(U)$ 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\backslash subseteq\; U$, then there is a morphism rescomposite
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''Left- and right-restriction

More generally, the restriction (or domain restriction or left-restriction) of abinary 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 ⩥ .See also

* Constraint *Deformation retract
In topology
s, which have only one surface and one edge, are a kind of object studied in topology.
In mathematics, topology (from the Greek language, Greek words , and ) is concerned with the properties of a mathematical object, geometric objec ...

*
*
*
References

{{DEFAULTSORT:Restriction (Mathematics) Sheaf theory