# Restriction (mathematics)

{{#invoke:Hatnote|hatnote}} Template:Functions

In mathematics, the **restriction of a function** *f* is a new function *f*|_{A} obtained by choosing a smaller domain *A* for the original function *f*. The notation is also used.

## Formal definition

Let *f* : *E* → *F* be a function from a set Template:Mvar to a set Template:Mvar, so that the domain of Template:Mvar is in Template:Mvar (). If a set Template:Mvar is a subset of Template:Mvar, then the **restriction of Template:Mvar to Template:Mvar ** is the function^{[1]}

Informally, the restriction of Template:Mvar to Template:Mvar is the same function as Template:Mvar, but is only defined on .

If the function Template:Mvar is thought of as a relation on the Cartesian product , then the restriction of Template:Mvar to Template:Mvar can be represented by the graph , where the pairs represent edges in the graph Template:Mvar.

## Examples

- The restriction of the non-injective function to is the injection .
- The factorial function is the restriction of the gamma function to the integers.

## Properties of restrictions

- Restricting a function to its entire domain gives back the original function; i.e., .
- Restricting a function twice is the same as restricting it once; i.e. if , then .
- The restriction of the identity function on a space
**X**to a subset**A**of**X**is just the inclusion map of**A**into**X**.^{[2]} - The restriction of a continuous function is continuous.
^{[3]}^{[4]}

## Applications

### Inverse functions

{{#invoke:main|main}}
For a function to have an inverse, it must be one-to-one. If a function Template:Mvar is not one-to-one, it may be possible to define a **partial inverse** of Template:Mvar by restricting the domain. For example, the function

is not one-to-one, since *x*^{2} = (−*x*)^{2}. However, the function becomes one-to-one if we restrict to the domain *x* ≥ 0, in which case

(If we instead restrict to the domain *x* ≤ 0, then the inverse is the negative of the square root of Template:Mvar.) Alternatively, there is no need to restrict the domain if we are content with the inverse being a multivalued function:

### Selection operators

{{#invoke:main|main}} In relational algebra, a selection (sometimes called a restriction to avoid confusion with SQL's use of SELECT) is a unary operation written as or where:

- and are attribute names
- is a binary operation in the set
- is a value constant
- is a relation

The selection selects all those tuples in for which holds between the and the attribute.

The selection selects all those tuples in for which holds between the attribute and the value .

Thus, the selection operator restricts to a subset of the entire database.

### The Pasting Lemma

{{#invoke:main|main}} The pasting lemma is a result in topology that relates the continuity of a function with the continuity of its restrictions to subsets.

Let be both closed (or both open) subsets of a topological space *A* such that , and let *B* also be a topological space. If 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

{{#invoke:main|main}} Sheaves provide a way of generalizing restrictions to objects besides functions.

In sheaf theory, one assigns an object 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 , 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
*W*⊆*V*⊆*U*, then the composite res_{W,V}o res_{V,U}= res_{W,U}. - (Locality) If (
*U*_{i}) is an open covering of an open set*U*, and if*s*,*t*∈*F*(*U*) are such that*s*|_{Ui}=*t*|_{Ui}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*s*_{i}∈*F*(*U*_{i}) 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}|_{Ui∩Uj}=*s*_{j}|_{Ui∩Uj}, then there is a section*s*∈*F*(*U*) such that*s*|_{Ui}=*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**) *A* ◁ *R* of a binary relation Template:Mvar between Template:Mvar and Template:Mvar may be defined as a relation having domain Template:Mvar, codomain Template:Mvar and graph G(*A* ◁ *R*) = {(*x*, *y*) ∈ G(*R*) | *x* ∈ *A*} . Similarly, one can define a **right-restriction** or **range restriction** *R* ▷ *B*. Indeed, one could define a restriction to [[arity|Template:Mvar-ary]] relations, as well as to subsets understood as relations, such as ones of *E* × *F* for binary relations.
These cases do not fit into the scheme of sheaves.Template:Clarification needed

## Anti-restriction

The **domain anti-restriction** (or **domain subtraction**) of a function or binary relation Template:Mvar (with domain Template:Mvar and codomain Template:Mvar) by a set Template:Mvar may be defined as (*E* \ *A*) ◁ *R*; it removes all elements of Template:Mvar from the domain Template:Mvar. It is sometimes denoted Template:Mvar ⩤ Template:Mvar.^{[5]} Similarly, the **range anti-restriction** (or **range subtraction**) of a function or binary relation Template:Mvar by a set Template:Mvar is defined as *R* ▷ (*F* \ *B*); it removes all elements of Template:Mvar from the codomain Template:Mvar. It is sometimes denoted Template:Mvar ⩥ Template:Mvar.

## See also

- Deformation retract
- Function (mathematics) #Restrictions and extensions
- Binary relation #Restriction
- Relational algebra#Selection (σ)

## References

- ↑ {{#invoke:citation/CS1|citation |CitationClass=book }}
- ↑ Halmos, Paul,
*Naive Set Theory*. Princeton, NJ: D. Van Nostrand Company, 1960. Reprinted by Springer-Verlag, New York, 1974. ISBN 0-387-90092-6 (Springer-Verlag edition). Reprinted by Martino Fine Books, 2011. ISBN 978-1-61427-131-4 (Paperback edition). - ↑ Munkres, James R. Topology. Vol. 2. Upper Saddle River: Prentice Hall, 2000.
- ↑ Adams, Colin Conrad, and Robert David Franzosa. Introduction to topology: pure and applied. Pearson Prentice Hall, 2008.
- ↑ 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)