limit

> This entry is about the notion of "limit" in [[category theory]]. For the notion of the same name in [[analysis]] and [[topology]] see _[[limit of a sequence]]_ and _[[limit of a function]]_.

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
### Context
#### Category theory
+-- {: .hide}
[[!include category theory - contents]]
=--
#### Limits and colimits
+-- {: .hide}
[[!include infinity-limits - contents]]
=--
=--
=--

# Contents
* table of contents
{: toc}

## Idea

In [[category theory]] a limit of a [[diagram]] $F : D \to C$ in a [[category]] $C$ is an [[object]] $lim F$ of $C$ equipped with morphisms to the objects $F(d)$ for all $d \in D$, such that everything in sight commutes. Moreover, the limit $lim F$ is the _universal_ object with this property, i.e. the "most optimized solution" to the problem of finding such an object.

The limit construction has a wealth of applications throughout category theory and mathematics in general.  In practice, it is possibly best thought of in the context of [[representable functor]]s as a [[classifying space]] for maps into a diagram. So in some sense the limit object $lim F$ "subsumes" the entire diagram $F(D)$ into a single object, as far as morphisms _into_ it are concerned.
The corresponding universal object for morphisms _out_ of the diagram is the [[colimit]].

An intuitive general idea is that a limit of a diagram is the locus or solution set of a bunch of equations, where each of the coordinates is parametrized by one of the objects of the diagram, and where the equations are prescribed by the morphisms of the diagram. This idea is explained more formally [here](http://ncatlab.org/nlab/show/limits+and+colimits+by+example#limitsintermsofotherops).

Often, the general theory of limits (but not colimits!) works better if the source of $F$ is taken to be the [[opposite category]] $D^op$ (or equivalently, if $F$ is taken to be a [[contravariant functor]]).  This is what we do below.  In any given situation, of course, you use whatever categories and functors you\'re interested in.

In some cases the category-theoretic notion of limit does reproduce notions of limit as known from analysis. See the examples below.

### Global versus local

In correspondence to the _local_ definition of [[adjoint functor]]s (as discussed there), there is a _local_ definition of limits (in terms of cones), that defines a limit (if it exists) for each individual diagram, and there is a _global_ definition, which defines the limit for _all_ diagrams (in terms of an [[adjoint functor|adjoint]]).

If all limits over the given shape of diagrams exist in a category, then both definitions are equivalent.

See also the analogous discussion at [[homotopy limit]].

## Terminology and notation

A limit is taken over a [[functor]] $F : D^{op} \to C$ and since the functor comes equipped with the information about what its domain is, one can just write $\lim F$ for its limit. But often it is helpful to indicate how the functor is evaluated on objects, in which case the limit is written $\lim_{d \in D} F(d)$; this is used particularly when $F$ is given by a formula (as with other notation with bound variables.)

In some schools of mathematics, limits are called _projective limits_, while colimits are called _inductive limits_.  Also seen are (respectively) _inverse limits_ and _direct limits_.  Both these systems of terminology are alternatives to using 'co-' when distinguishing limits and colimits.  The first system also appears in [[pro-object]] and [[ind-object]].

Correspondingly, the symbols $\underset{\leftarrow}lim$ and $\underset{\rightarrow}\lim$ are used instead of $\lim$ and $\colim$.

Confusingly, many authors restrict the meanings of these alternative terms to (co)limits whose sources are [[direction|directed set]]s; see [[directed limit]].  In fact, this is the original meaning; projective and inductive limits in this sense were studied in algebra before the general category-theoretic notion of (co)limit.

## Definition

### Local definition in terms of representable functors

There is a general abstract definition of limits
in terms of representable functors, which we
describe now. This reproduces the more concrete
and maybe more familiar description in terms of
universal cones, which is described further below.

Let in the following $D$ be a [[small category]] and [[Set]] the category of sets (possibly realized as the category $U Set$ of $U$-small sets with respect to a given [[Grothendieck universe]].)

#### Limit of a Set-valued functor

The **limit of a Set-valued functor** $F : D^{op} \to Set$ is the [[hom-set]]
$$
  lim F \coloneqq Hom_{[D^{op}, Set]}(pt, F)
  \in Set
$$
in the [[functor category]] $[D^{op}, Set]$ (the [[presheaf]] category), where

$$
  pt : D^{op} \to Set
$$
$$
  pt : d \mapsto \{*\}
$$
is the functor constant on the [[point]], i.e. the [[terminal object|terminal]] diagram.

The set $lim F$ is equivalently called

* the set of _global sections_ of $F$;

* the set of [[generalized element]]s of $F$.

The set $lim F$ can be equivalently expressed as an [[equalizer]] of a [[product]], explicitly:

$$
  lim F \simeq
  \left\lbrace
    (x_d)_{d \in D}
    \in
    \prod_{d \in D}
    F(d)
    |
    \forall (d_i \stackrel{\alpha}{\to} d_j) \in D :
    F(\alpha)(x_{d_j}) = x_{d_i}
  \right\rbrace
$$

In particular, the limit of a set-valued functor always exists.

Notice the important triviality that the covariant [[hom-functor]] commutes with set-valued limits: for every set $S$ we have a bijection of sets

$$
  Hom_{Set}(S, lim F)
  \simeq
  \lim Hom_{Set}(S, F(-))
  \,,
$$

where $Hom(S, F(-)) : D^{op} \to Set$.

#### Limit of a functor with values in an arbitrary category

The above formula generalizes straightforwardly to
a notion of limit for
functors $F : D^{op} \to C$ for $C$
an arbitrary category if we construct a certain [[presheaf]] on $C$ which we will call $\hat \lim F$. The actual limit $lim F$ is then, if it exists, the object of $C$ [[representable functor|representing]] this presheaf.

More precisely, using the [[Yoneda embedding]] $y: C \to [C^{op}, Set]$ define for $F : D^{op} \to C$ the [[presheaf]] $\hat \lim F \in [C^{op}, Set]$ by

$$
  (\hat \lim F)(c)\coloneqq Hom_{Set^{D^{op}}}(pt,Hom_C(c,F(-)))
$$

for all $c \in C$, or suppressing the subscripts for readability:

$$
  (\hat lim F)(c) =
  Hom(pt , Hom(c,F(-)))
  \,.
$$

The [[presheaf]]-valued limit always exists; iff this presheaf is [[representable functor|representable]] by an object $\lim F$ of $C$, then this is the **limit** of $F$:

$$
  Hom(c, \lim F)
  \simeq
  Hom(pt, Hom(c,F(-)))
  \,.
$$

#### Generalization to weighted limits

In the above formulation, there is an evident
generalization to [[weighted limit]]s:

replace in the above the constant terminal functor
$pt : D^{op} \to Set$ with _any_ functor
$W : D^{op} \to Set$ -- then called the _weight_ --,
then the $W$-weighted limit of $F$

$$
  \lim_W F
$$

often written

$$
  \{W,F\}
$$

is, if it exists, the
object representing the presheaf
$$
 c \mapsto
    Hom_{[D^{op}, Set]}(W , Hom_C(c,F(-)))
  \,,
$$

i.e. such that

$$
  Hom(c, \lim_W F)
  \simeq
  Hom(W, Hom(c,F(-)))
  \,
$$

naturally in $c \in C$.

#### Relation to continuous functors

The very definition of limit as above asserts
that the covariant [[hom-functor]]
$Hom(c,-) : C \to Set$
commutes with
forming limits. Indeed, the definition is equivalent
to saying that the [[hom-functor]] is a
[[continuous functor]].

### Definition in terms of universal cones

Unwrapping the above abstract definition of limits
yields the following more hands-on description  in terms
of universal cones.

#### Unwrapping

Let $F : D^{op} \to C$ be a functor.

Notice that for every object $c \in C$ an element
$$
  * \to Hom(pt, Hom(c, F(-)))
$$
is to be identified with a collection of morphisms
$$
  c \to F(d)
$$
for all $d \in D$, such that all triangles
$$
  \array{
     && c
     \\
     & \swarrow && \searrow
     \\
     F(d_i)
     && \stackrel{F(f)}{\to}
     &&
     F(d_j)
  }
$$
commute. Such a collection of morphisms is called a **cone** over $F$, for the obvious reason.

If the limit
$\lim F \in C$ of $F$ exist, then it
singles out a special cone given by
the composite morphism
$$
  *
  \stackrel{* \mapsto Id_{\lim F}}{\to}
  Hom_C(\lim F, \lim F)
  \stackrel{\simeq}{\to}
  Hom(pt, Hom(\lim F, F(-)))
  \,,
$$
where the first morphism picks the [[identity morphism]]
on $\lim F$ and the second one is the defining
bijection of a limit as above.

The cone
$$
  \array{
     && \lim F
     \\
     & \swarrow && \searrow
     \\
     F(d_i)
     && \stackrel{F(f)}{\to}
     &&
     F(d_j)
  }
$$
is called the **universal cone** over $F$, because,
again by the defining property of limit as above,
every other cone $\{c \to F(d)\}_{d \in D}$ as
above is bijectively related to a morphism
$c \to  \lim F$

$$
  *
  \stackrel{\{c \to F(d)\}_{d \in D}}{\to}
  Hom(pt, Hom(c, F(-)))
  \stackrel{\simeq}{\to}
  Hom(c, \lim F)
  \,.
$$

By inspection one finds that, indeed, the morphism
$c \to \lim F$ is the morphism which exhibits the
factorization of the cone $\{c \to F(d)\}_{d \in D}$
through the universal limit cone

$$
  \array{
     && c
     \\
     & \swarrow && \searrow
     \\
     F(d_i)
     && \stackrel{F(f)}{\to}
     &&
     F(d_j)
  }
  =
  \array{
     && c
     \\
     && \downarrow
     \\
     && \lim F
     \\
     & \swarrow && \searrow
     \\
     F(d_i)
     && \stackrel{F(f)}{\to}
     &&
     F(d_j)
  }
  \,.
$$
An illustrative example is the following: a limit of the [[identity functor]] $Id_c:C\to C$ is, if it exists, an [[initial object]] of $C$.

### Global definition in terms of adjoint of the constant diagram functor

Given categories $D$ and $C$, limits over functors $D^{op} \to C$ may exist for some functors, but not for all. If it does exist for all functors, then the above _local definition_ of limits is equivalent to the following _global definition_.

For $D$ a [[small category]] and $C$ any category, the [[functor category]] $[D^{op},C]$ is the category of $D$-[[diagram]]s in $C$.  Pullback along the functor $D^{op} \to pt$ to the [[terminal object|terminal]] category $pt = \{\bullet\}$ induces a functor
$$
  const :  C \to [D^{op},C]
$$
which sends every object of $C$ to the diagram functor constant on this object.

The [[adjoint functor|left adjoint]]
$$
  colim_D : [D^{op},C] \to C
$$
of this functor is, if it exists, the functor
which sends every diagram to its [[colimit]] and the [[adjoint functor|right adjoint]] is, if it exists, the functor
$$
  lim_D : [D^{op},C] \to C
$$
which sends every diagram to its [[limit]]. The Hom-isomorphisms of these [[adjunction]]s state precisely the universal property of [[limit]] and [[colimit]] given above.

Concretely this means that for all $c \in C$ we have a bijection
$$
  Hom_C(c, \lim F)
  \simeq
  Hom_{[D^{op},C]}(const_c, F)
  \,.
$$

From this perspective, a limit is a special case of a [[Kan extension]], as described there, namely a Kan extension to the [[point]].

### Generalizations

The notion of limit, being fundamental to
[[category theory]], generalizes to many other situations.  Examples include the following.

* In [[enriched category theory]] one has the notion of [[weighted limit]].  This makes sense in ordinary category theory as well, but it turns out that in that case all weighted limits reduce to ordinary "conical" ones.
* Weighted limits generalize further to the notion of limit in a [[2-category equipped with proarrows]], or to a [[Yoneda structure]].
* In [[2-category theory]] one has the notion of a [[2-limit]].
* Similarly, in [[(infinity,1)-category]] theory there is a notion of a limit.  Using quasicategories as a model for $(\infty,1)$-categories, the definition is a straightforward extension of the one as a terminal cone: it is simply a [[terminal object in a quasi-category|quasi-categorical terminal object]] in the quasicategory of cones.  See [[limit in quasi-categories]].
* One expects that similarly, all sorts of [[higher categories]] have their own appropriate notions of limit and colimit.

## Examples

The central point about examples of limits is:

_Categorical limits are ubiquitous_.

To a fair extent, [[category theory]] is all about limits and the other [[universal construction]]s: [[Kan extension]]s, [[adjoint functor]]s, [[representable functor]]s, which are all special cases of limits -- and limits are special cases of these.

Listing examples of limits in [[category theory]] is much like listing examples of [[integral]]s in [[analysis]]: one can and does fill books with these. (In fact, that analogy has more to it than meets the casual eye: see [[coend]] for more).

Keeping that in mind, we do list some special cases and special classes of examples that are useful to know. But any list is necessarily wildly incomplete.

### General

* For a pedagogical list of examples see [[limits and colimits by example]].

Here are some important examples of limits, classified by the shape of the [[diagram]]:

* A limit of the [[empty set|empty diagram]] is a [[terminal object]].
* A limit of a diagram consisting of two (or more) objects and no nontrivial morphisms is their [[product]].
* A limit of a [[cospan]] is a [[pullback]].
* A limit of a pair (or more) of [[parallel morphisms]] is an [[equalizer]].
* A limit over a [[finite category]] is a [[finite limit]].
* Another important "shape" of limits are those that give rise to [[end]]s.
* A limit of a diagram $F : D \to C$ for which $D$  admits an [[initial object]] $I$, is simply $F(I)$.

### Limits in analysis

The concept of [[limit of a sequence]] in [[topological spaces]] is a special case of category theoretic limits, see [there](limit+of+a+sequence#RelationToLimitsInCategoryTheory).

## Properties

### Existence: construction from products and equalizers
 {#ConstructionFromProductsAndEqualizers}

Frequently some limits can be computed in terms of other limits.  This makes things easier since we only have to assume that categories have, or functors preserve, some easier-to-verify class of limits in order to obtain results about a larger one.

The most common example of this is the computation of limits in terms of products and equalizers.  Specifically, if the limit of $F : D^{op} \to C$ and the [[products]] $\prod_{d\in Obj(D)} F(d)$ and $\prod_{f\in Mor{d}} F(s(f))$ all exist, then $lim F$ is a [[subobject]] of $\prod_{d\in Obj(D)} F(d)$, namely the [[equalizer]] of

$$
  \prod_{d \in Obj(D)}
  F(d)
  \stackrel{\prod_{f \in Mor(d)} (F(f) \circ p_{s(f)}) }{\to}
  \prod_{f \in Mor(D)}
  F(s(f))
$$

and

$$
  \prod_{d \in Obj(D)}
  F(d)
  \stackrel{\prod_{f \in Mor(d)} (p_{t(f)}) }{\to}
  \prod_{f \in Mor(D)}
  F(s(f))
  \,.
$$

Conversely, if both of these products exist and so does the equalizer of this pair of maps, then that equalizer is a limit of $F$.  In particular, therefore, a category has all limits as soon as it has all products and equalizers, and a functor defined on such a category [[preserved limit|preserves]] all limits as soon as it preserves products and equalizers.

(More precisely, it suffices only to consider equalizers of [[reflexive pairs]].)

Another example is that all [[finite limits]] can be computed in terms of [[pullbacks]] and a [[terminal object]].

### Interaction with $Hom$-functor

+-- {: .num_prop}
###### Proposition
**([[hom-functor preserves limits]])**

For $C$ a [[locally small]] category,
for $F : D^{op} \to C$ a functor and writing $C(c, F(-)) : D^{op} \to Set$, we have
$$
  C(c, lim F) \simeq lim C(c, F(-))
  \,.
$$
=--

Depending on how one introduces limits this holds by definition or is an easy consequence.

### In $Set$

+-- {: .num_prop}
###### Limits in Set are hom-sets

For $F : D^{op} \to Set$ any functor and $const_{*} : D^{op} \to Set$ the functor constant on the [[point]], the limit of $F$ is the [[hom-set]]
$$
  lim F \simeq [D^{op}, Set](const_{*}, F)
$$
in the [[functor category]], i.e. the set of [[natural transformation]]s from the constant functor into $F$.
=--

### In functor categories

+-- {: .un_prop}
###### Proposition
**(limits in functor categories are computed pointwise)

Let $D$ be a small category and let $D'$ be any category. Let $C$ be a category which admits limits of shape $D$. Write $[D',C]$ for the [[functor category]]. Then

* $[D',C]$ admits $D$-shaped limits;
* these limits are computed objectwise ("pointwise") in $C$: for $F : D^{op} \to [D',C]$ a functor we have for all $d' \in D'$ that $(lim F)(d') \simeq lim (F(-)(d'))$. Here the limit on the right is in $C$.
=--

### Compatibility with universal constructions
 {#CompatibilityAmongUniversalConstructions}

+-- {: .num_prop #RightAdjointsPreserveLimits}
###### Proposition
**([[right adjoints preserve limits]])

Let $R \;\colon\; C \to C'$ be a [[functor]] that is [[right adjoint]] to some functor $L : C' \to C$. Let $D$ be a [[small category]] such that $C$ admits [[limits]] of shape $D$. Then $R$ [[preserved limit|commutes with]] $D$-shaped limits in $C$ in that

for $F : D^{op} \to C$ some diagram, we have

$$
  R(lim F) \simeq lim (R \circ F)
  \,.
$$
=--

+-- {: .proof}
######Proof

Using the adjunction isomorphism and the above fact that [[hom-functor preserves limits]], one obtains for every $c' \in C'$

$$
\begin{aligned}
  C'(c', R (lim F)) & \simeq C(L(c'), lim F)
  \\
  & \simeq lim C(L(c'), F)
  \\
  & \simeq lim C'(c', R\circ F)
  \\
  & \simeq C'(c', lim (R \circ F))
  \,.
\end{aligned}
  \,.
$$

Since this holds naturally for every $c'$, the [[Yoneda lemma|Yoneda lemma, corollary II]] on uniqueness of representing objects implies that $R (lim F) \simeq lim (R \circ F)$.

=--

+-- {: .num_prop #LimitsCommuteWithLimits}
###### Proposition
**([[limits commute with limits]])**

Let $D$ and $D'$ be [[small categories]] and let $C$ be
a category which admits [[limits]] of shape $D$ as well as
[[limits]] of shape $D'$. Then these limits commute with each other, in that
for $F : D^{op} \times {D'}^{op} \to C$ a [[functor]] , with corresponding induced functors $F_D : {D'}^{op} \to [D^{op},C]$ and $F_{D'} : {D}^{op} \to [{D'}^{op},C]$, then the canonical comparison morphism

\[
  \label{ComparisonMorphismForCommutingLimits}
  lim F \simeq lim_{D}  (lim_{D'} F_D )
  \simeq
   lim_{D'}  (lim_{D} F_{D'} )
\]

is an [[isomorphism]].

=--

+-- {: .proof}
######Proof

Since the [[limit]]-construction is the [[right adjoint]] functor to the [[constant functor|constant]] [[diagram]]-functor, this is a special case of _[[right adjoints preserve limits]]_ (Prop. \ref{RightAdjointsPreserveLimits}).

=--

See [[limits and colimits by example]] for what formula (eq:ComparisonMorphismForCommutingLimits) says for instance for the special case $C =$ [[Set]].

+-- {: .num_remark}
###### Remark
**(general non-commutativity of limits with colimits)**

In general limits do _not_ commute with [[colimits]]. But under a number of special conditions of interest they do. Special cases and concrete examples are discussed at _[[commutativity of limits and colimits]]_.

=--

## Related concepts

* **limit**

  * [[internal limit]]

  * [[colimit]], [[universal construction]], [[Kan extension]], [[end]], [[coend]]

* [[2-limit]]

* [[(∞,1)-limit]]

  * [[homotopy limit]]

  * [[lim^1 and Milnor sequences]]

## References

Limits and [[colimits]] were defined in [[Daniel M. Kan]] in Chapter II of the paper that also defined [[adjoint functors]] and [[Kan extensions]]:

* [[Daniel M. Kan]], _Adjoint functors_, Transactions of the American Mathematical Society 87:2 (1958), 294–294 ([doi:10.1090/s0002-9947-1958-0131451-0](https://doi.org/10.1090/s0002-9947-1958-0131451-0))

This paper refers to limits as _inverse limits_.

The observation that limits can be constructed from [[products]] and [[equalisers]] is due to:

* [[J.-M. Maranda]], *Some remarks on limits in categories*. Canadian Mathematical Bulletin **5** 2 (1962) 133-146 [[doi:10.4153/CMB-1962-015-0](https://doi.org/10.4153/CMB-1962-015-0)]

That, more generally, it suffices to consider only equalisers of [[reflexive pairs]] is due to:

* [[Ernest Manes]], *A triple miscellany: Some aspects of the theory of algebra over a triple*, PhD thesis, Wesleyan University, 1967. [[pdf](https://github.com/CategoryTheoryArchive/archive/blob/main/resources/1967_manes_triple-miscellany.pdf)]

* S. A. Huq and R. Cornu. _A remark on the existence of limits in categories_. Mathematische Nachrichten 55.1‐6 (1973): 223-224. [ [doi:10.1002/mana.19730550111](https://doi.org/10.1002/mana.19730550111)]

Textbook accounts:

* [[Saunders MacLane]], §III.4 of: *[[Categories for the Working Mathematician]]*, Graduate Texts in Mathematics **5** Springer (second ed. 1997) [[doi:10.1007/978-1-4757-4721-8](https://link.springer.com/book/10.1007/978-1-4757-4721-8)]

[[!redirects limits]]
[[!redirects limit functor]]
[[!redirects limit functors]]

[[!redirects limit of a functor]]
[[!redirects limits of a functor]]
[[!redirects limits of functors]]

[[!redirects limit of a cofunctor]]
[[!redirects limits of a cofunctor]]
[[!redirects limits of cofunctors]]

[[!redirects limit of a diagram]]
[[!redirects limits of a diagram]]
[[!redirects limits of diagrams]]


+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
### Context
#### Analysis
+-- {: .hide}
[[!include analysis - contents]]
=--
=--
=--

#Contents#
* table of contents
{:toc}

## Definition ##

Let $F$ be an [[Archimedean field]] and let $I \subseteq F$ be an [[open interval]] in $F$. Let us define the subset $\Delta_{\#}(I) \subseteq I \times I$ of pairs of elements apart from the [[diagonal]] as

$$\Delta_{\#}(I) \coloneqq \{(x,y):I \times I \vert 0 \lt \vert x - y \vert \}$$

Let $U$ be a set such that $\Delta_{\#}(I) \subseteq U$ and $U \subseteq I \times I$. As a result, for every element $x \in I$, there is an indexed set

$U(x) \coloneqq \{y \in I \vert (x, y)\}$

Given a [[partial function|partial]] binary function $q:U \to F$, the currying of $q$ results in the indexed function

$$q(x): \{y \in U(x) \vert (x,y)\} \to F$$

for every element $x \in I$

A function $g:I \to F$ is a __limit of $q$ approaching the diagonal__ if for all $x \in S$ the limit of the dependent function $q(x)$ approaching $x$ is $g(x)$. We can define a predicate that the $q$ has a limit approaching the diagonal as

$$hasLimitApproachingDiagonal(q) \coloneqq \forall g \colon I \to F. \forall x \in I \lim_{y \to x} q(x)(y) = g(x)$$

The type of all functions in $U \to F$ that have a limit approaching the diagonal is defined as

$$DiagLimFunc(I, F) \coloneqq \{q \in U \to F \vert hasLimitApproachingDiagonal(q)\}$$

As a result, there exists a function

$$\lim_{(x, y) \to (x, x)} (-)(x, y): DiagLimFunc(I, F) \to (I \to F)$$

which returns the limit of a partial binary function $q:DiagLimFunc(I, F)$ approaching the diagonal and thus satisfies the equation

$$\lim_{y \to x} q(x)(y) = \lim_{(x, y) \to (x, x)} q(x, y)$$

for all $x \in I$

## Properties ##

In an [[Archimedean field]] $F$, the [[algebraic limit theorem]]s are satisfied:

+-- {: .num_prop}
###### Proposition
**(Limits preserve the zero function)

The limit of a binary function approaching a diagonal preserves the zero function.

=--

+-- {: .proof}
###### Proof

For all $x \in I$, the following is true:

$$\lim_{(x, y) \to (x, x)} 0(x, y) = \lim_{y \to x} 0(x)(y)$$

$$\lim_{(x, y) \to (x, x)} 0(x, y) = 0$$

$$\lim_{(x, y) \to (x, x)} 0(x, y) = 0(x, x)$$

Thus, the limit of a binary function approaching a diagonal preserves the zero function.

=--

+-- {: .num_prop}
###### Proposition
**(Limits preserve addition of functions)

The limit of a binary function approaching a diagonal preserves addition of functions .

=--

+-- {: .proof}
###### Proof

For all elements $c \in I$ and functions $f:I \to F$ and $g:I \to F$ such that
$$\lim_{x \to c} f(x) = c \qquad \lim_{x \to c} g(x) = c$$
the following is true:

$$\lim_{(x, y) \to (x, x)} f(x, y) + g(x, y) = \lim_{(x, y) \to (x, x)} (f + g)(x, y)$$

$$\lim_{(x, y) \to (x, x)} f(x, y) + g(x, y) = \lim_{y \to x} (f + g)(x)(y)$$

$$\lim_{(x, y) \to (x, x)} f(x, y) + g(x, y) = \lim_{y \to x} f(x)(y) + g(x)(y)$$

$$\lim_{(x, y) \to (x, x)} f(x, y) + g(x, y) = \lim_{y \to x} f(x)(y) + \lim_{y \to x} g(x)(y)$$

$$\lim_{(x, y) \to (x, x)} f(x, y) + g(x, y) = \lim_{(x, y) \to (x, x)} f(x, y) + \lim_{(x, y) \to (x, x)} g(x, y)$$

Thus, the limit of a binary function approaching a diagonal preserves addition of functions .

=--

+-- {: .num_prop}
###### Proposition
**(Limits preserve negation of functions)

The limit of a binary function approaching a diagonal preserves negation of functions.

=--

+-- {: .proof}
###### Proof

For all elements $c \in I$ and functions $f:I \to F$ such that
$$\lim_{x \to c} f(x) = c$$
the following is true:

$$\lim_{(x, y) \to (x, x)} -f(x, y) = \lim_{y \to x} -f(x)(y)$$

$$\lim_{(x, y) \to (x, x)} -f(x, y) = -\lim_{y \to x} f(x)(y)$$

$$\lim_{(x, y) \to (x, x)} -f(x, y) = -\lim_{(x, y) \to (x, x)} f(x, y)$$

Thus, the limit of a binary function approaching a diagonal preserves negation of functions.

=--

+-- {: .num_prop}
###### Proposition
**(Limits preserve subtraction of functions)

The limit of a binary function approaching a diagonal preserves subtraction of functions .

=--

+-- {: .proof}
###### Proof

For all elements $c \in I$ and functions $f:I \to F$ and $g:I \to F$ such that
$$\lim_{x \to c} f(x) = c \qquad \lim_{x \to c} g(x) = c$$
the following is true:

$$\lim_{(x, y) \to (x, x)} f(x, y) - g(x, y) = \lim_{(x, y) \to (x, x)} (f - g)(x, y)$$

$$\lim_{(x, y) \to (x, x)} f(x, y) - g(x, y) = \lim_{y \to x} (f - g)(x)(y)$$

$$\lim_{(x, y) \to (x, x)} f(x, y) - g(x, y) = \lim_{y \to x} f(x)(y) - g(x)(y)$$

$$\lim_{(x, y) \to (x, x)} f(x, y) - g(x, y) = \lim_{y \to x} f(x)(y) - \lim_{y \to x} g(x)(y)$$

$$\lim_{(x, y) \to (x, x)} f(x, y) - g(x, y) = \lim_{(x, y) \to (x, x)} f(x, y) - \lim_{(x, y) \to (x, x)} g(x, y)$$

Thus, the limit of a binary function approaching a diagonal preserves addition of functions .

=--

+-- {: .num_prop}
###### Proposition
**(Limits preserve the left multiplicative $\mathbb{Z}$-action of functions)

The limit of a binary function approaching a diagonal preserves the left multiplicative $\mathbb{Z}$-action of functions.

=--

+-- {: .proof}
###### Proof

For all elements $c \in I$ and functions $f:I \to F$ such that
$$\lim_{x \to c} f(x) = c$$
and integers $n \in \mathbb{Z}$, the following is true:

$$\lim_{(x, y) \to (x, x)} n f(x, y) = \lim_{(x, y) \to (x, x)} (n f)(x, y)$$

$$\lim_{(x, y) \to (x, x)} n f(x, y) = \lim_{y \to x} (n f)(x)(y)$$

$$\lim_{(x, y) \to (x, x)} n f(x, y) = \lim_{y \to x} n f(x)(y)$$

$$\lim_{(x, y) \to (x, x)} n f(x, y) = n \lim_{y \to x} f(x)(y)$$

$$\lim_{(x, y) \to (x, x)} n f(x, y) = n \lim_{(x, y) \to (x, x)} f(x, y)$$

Thus, the limit of a binary function approaching a diagonal preserves the left multiplicative $\mathbb{Z}$-action of functions.

=--

+-- {: .num_prop}
###### Proposition
**(Limits preserve left multiplication by scalars)

The limit of a binary function approaching a diagonal preserves left multiplication by scalars.

=--

+-- {: .proof}
###### Proof

For all elements $c \in I$ and functions $f:I \to F$ such that
$$\lim_{x \to c} f(x) = c$$
and elements $a \in F$, the following is true:

$$\lim_{(x, y) \to (x, x)} a f(x, y) = \lim_{(x, y) \to (x, x)} (a f)(x, y)$$

$$\lim_{(x, y) \to (x, x)} a f(x, y) = \lim_{y \to x} (a f)(x)(y)$$

$$\lim_{(x, y) \to (x, x)} a f(x, y) = \lim_{y \to x} a f(x)(y)$$

$$\lim_{(x, y) \to (x, x)} a f(x, y) = a \lim_{y \to x} f(x)(y)$$

$$\lim_{(x, y) \to (x, x)} a f(x, y) = a \lim_{(x, y) \to (x, x)} f(x, y)$$

Thus, the limit of a binary function approaching a diagonal preserves left multiplication by scalars.

=--

+-- {: .num_prop}
###### Proposition
**(Limits preserve the constant one function)

The limit of a binary function approaching a diagonal preserves the constant one function.

=--

+-- {: .proof}
###### Proof

For all $x \in I$, the following is true:

$$\lim_{(x, y) \to (x, x)} 1(x, y) = \lim_{y \to x} 1(x)(y)$$

$$\lim_{(x, y) \to (x, x)} 1(x, y) = 1$$

$$\lim_{(x, y) \to (x, x)} 1(x, y) = 1(x, x)$$

Thus, the limit of a binary function approaching a diagonal preserves the constant one function.

=--

+-- {: .num_prop}
###### Proposition
**(Limits preserve multiplication of functions)

The limit of a binary function approaching a diagonal preserves multiplication of functions .

=--

+-- {: .proof}
###### Proof

For all elements $c \in I$ and functions $f:I \to F$ and $g:I \to F$ such that
$$\lim_{x \to c} f(x) = c \qquad \lim_{x \to c} g(x) = c$$
the following is true:

$$\lim_{(x, y) \to (x, x)} f(x, y) \cdot g(x, y) = \lim_{(x, y) \to (x, x)} (f \cdot g)(x, y)$$

$$\lim_{(x, y) \to (x, x)} f(x, y) \cdot g(x, y) = \lim_{y \to x} (f \cdot g)(x)(y)$$

$$\lim_{(x, y) \to (x, x)} f(x, y) \cdot g(x, y) = \lim_{y \to x} f(x)(y) \cdot g(x)(y)$$

$$\lim_{(x, y) \to (x, x)} f(x, y) \cdot g(x, y) = \lim_{y \to x} f(x)(y) \cdot \lim_{y \to x} g(x)(y)$$

$$\lim_{(x, y) \to (x, x)} f(x, y) \cdot g(x, y) = \lim_{(x, y) \to (x, x)} f(x, y) \cdot \lim_{(x, y) \to (x, x)} g(x, y)$$

Thus, the limit of a binary function approaching a diagonal preserves multiplication of functions .

=--

+-- {: .num_prop}
###### Proposition
**(Limits preserve the powers of functions)

The limit of a binary function approaching a diagonal preserves powers of functions.

=--

+-- {: .proof}
###### Proof

For all elements $c \in I$ and functions $f:I \to F$ such that
$$\lim_{x \to c} f(x) = c$$
and natural number $n \in \mathbb{N}$, the following is true:

$$\lim_{(x, y) \to (x, x)} f(x, y)^n = \lim_{(x, y) \to (x, x)} (f^n)(x, y)$$

$$\lim_{(x, y) \to (x, x)} f(x, y)^n = \lim_{y \to x} (f^n)(x)(y)$$

$$\lim_{(x, y) \to (x, x)} f(x, y)^n = \lim_{y \to x} (f(x)(y))^n$$

$$\lim_{(x, y) \to (x, x)} f(x, y)^n = \left(\lim_{y \to x} f(x)(y)\right)^n$$

$$\lim_{(x, y) \to (x, x)} f(x, y)^n = \left(\lim_{(x, y) \to (x, x)} f(x, y)\right)^n$$

Thus, the limit of a binary function approaching a diagonal preserves powers of functions.

=--

### Limits preserve reciprocals of functions ###

+-- {: .num_prop}
###### Proposition
**(Limits preserve reciprocals of functions)

The limit of a binary function approaching a diagonal preserves reciprocals of functions.

=--

+-- {: .proof}
###### Proof

Let $x^{-1}$ be another notation for $\frac{1}{x}$. For all elements $c \in I$ and functions $f:I \to F$ such that
$$\lim_{x \to c} f(x) = c \qquad \lim_{(x, y) \to (x, x)} f(x, y) \# 0$$
the following is true:

$$\lim_{(x, y) \to (x, x)} f(x, y)^{-1} = \lim_{(x, y) \to (x, x)} (f^{-1})(x, y)$$

$$\lim_{(x, y) \to (x, x)} f(x, y)^{-1} = \lim_{y \to x} (f^{-1})(x)(y)$$

$$\lim_{(x, y) \to (x, x)} f(x, y)^{-1} = \lim_{y \to x} (f(x)(y))^{-1}$$

$$\lim_{(x, y) \to (x, x)} f(x, y)^{-1} = \left(\lim_{y \to x} f(x)(y)\right)^{-1}$$

$$\lim_{(x, y) \to (x, x)} f(x, y)^{-1} = \left(\lim_{(x, y) \to (x, x)} f(x, y)\right)^{-1}$$

Thus, the limit of a binary function approaching a diagonal preserves reciprocals of functions.

=--

+-- {: .num_prop}
###### Proposition
**(Limits preserve that the reciprocals of functions are multiplicative inverses)

The limit of a binary function approaching a diagonal preserves that the reciprocals of functions are multiplicative inverses.

=--

+-- {: .proof}
###### Proof

Let $x^{-1}$ be another notation for $\frac{1}{x}$. For all elements $c \in I$ and functions $f:I \to F$ such that
$$\lim_{x \to c} f(x) = c \qquad \left| \lim_{(x, y) \to (x, x)} f(x, y) \right| \gt 0$$
the following is true:

Where $x^{-1}$ is another notation for $\frac{1}{x}$

$$\lim_{(x, y) \to (x, x)} f(x, y) \cdot {f(x, y)}^{-1} = \lim_{(x, y) \to (x, x)} (f \cdot f^{-1})(x, y)$$

$$\lim_{(x, y) \to (x, x)} f(x, y) \cdot {f(x, y)}^{-1} = \lim_{y \to x} (f \cdot f^{-1})(x)(y)$$

$$\lim_{(x, y) \to (x, x)} f(x, y) \cdot {f(x, y)}^{-1} = \lim_{y \to x} f(x)(y) \cdot {f(x)(y)}^{-1}$$

$$\lim_{(x, y) \to (x, x)} f(x, y) \cdot {f(x, y)}^{-1} = 1$$

Thus, limit of a binary function approaching a diagonal preserves that the reciprocals of functions are multiplicative inverses.

=--

## See also ##

* [[limit of a function]]

* [[differentiable function]]

* [[difference quotient]]

* [[Newton-Leibniz operator]]


limit of a function

# Limits of functions
* table of contents
{: toc}

## Idea

Although it has less emphasis in advanced mathematics, and although its definition is more complicated than that of the [[limit of a sequence]], the first concept of limit seen by most students is that of a limit of a [[function]].  This is the idea that
$$ \lim_{x \to c} f(x) = L $$
means that $f(x)$ is close to $L$ if $x$ is sufficiently close to $c$.  Of course, $x$ here is just a dummy variable, so this is really a [[ternary relation]] between $f$, $c$, and $L$.

## Definitions {#definitions}

Limits of functions could be defined for functions between various mathematical structures, such as subsets of the [[real numbers]], [[metric spaces]] and [[topological spaces]]. In all cases, there are two different definitions of limit of a function, depending on whether one uses the definition by [[Nicolas Bourbaki]] or the historical definition, first defined by [[Karl Weierstrass]] in the context of partial functions on the real numbers and later generalized to metric spaces and topological spaces. Bourbaki's definition is commonly used in the French language, while Weierstrass's definition is commonly used in the English language. Weierstrass's definition is also referred to as the *punctured limit* of a function ("limite épointée" in French), because it uses [[accumulation points]] and [[punctured neighborhoods]] instead of [[adherent points]] and [[neighborhoods]].

### In metric spaces

Let $(X, d_X)$ and $(Y, d_Y)$ be [[metric spaces]], and let $f$ be a [[function]] from $X$ to $Y$, let $c$ be an [[adherent point]] of $X$, and let $L$ be an element in $Y$. Then

> the **limit of $f$ approaching $c$** is $L$ if for all positive real numbers $\epsilon$ there exists a positive real number $\delta$ such that for all elements $x \in X$, $d_X(x, c) \lt \delta$ implies that $d_Y(f(x), L) \lt \epsilon$.

Alternatively, let $c$ be an [[accumulation point]] of $X$. Then

> the **(punctured) limit of $f$ approaching $c$** is $L$ if for all positive real numbers $\epsilon$ there exists a positive real number $\delta$ such that for all elements $x \in X$, $0 \lt d_X(x, c)$ and $d_X(x, c) \lt \delta$ implies that $d_Y(f(x), L) \lt \epsilon$.

In [[dependent type theory]], "there exists" can be represented either by the [[existential quantifier]] or the [[dependent sum type]]. In the latter case, one has an element of the following type for limits as defined by Bourbaki

$$\prod_{\epsilon:\mathbb{R}_+} \sum_{\delta:\mathbb{R}_+} \prod_{x:X} (d_X(x, c) \lt \delta) \to (d_Y(f(x), L) \lt \epsilon)$$

and similarly for punctured limits

$$\prod_{\epsilon:\mathbb{R}_+} \sum_{\delta:\mathbb{R}_+} \prod_{x:X} (0 \lt d_X(x, c)) \times (d_X(x, c) \lt \delta) \to (d_Y(f(x), L) \lt \epsilon)$$

By the [[type theoretic axiom of choice]], which is simply the distributivity of [[dependent function types]] over [[dependent sum types]], this is the same as saying, respectively

> the **limit (as defined by Bourbaki) of $f$ approaching $c$** is $L$ if there exists as structure a function $\omega:\mathbb{R}_+ \to \mathbb{R}_+$ such that for all positive real numbers $\epsilon$ and for all elements $x \in X$, $d_X(x, c) \lt \omega(\epsilon)$ implies that $d_Y(f(x), L) \lt \epsilon$.

$$\sum_{\omega:\mathbb{R}_+ \to \mathbb{R}_+}\prod_{\epsilon:\mathbb{R}_+} \prod_{x:X} (d_X(x, c) \lt \omega(\epsilon)) \to (d_Y(f(x), L) \lt \epsilon)$$

> the **(punctured) limit of $f$ approaching $c$** is $L$ if there exists as structure a function $\omega:\mathbb{R}_+ \to \mathbb{R}_+$ such that for all positive real numbers $\epsilon$ and for all elements $x \in X$, $0 \lt d_X(x, c)$ and $d_X(x, c) \lt \omega(\epsilon)$ implies that $d_Y(f(x), L) \lt \epsilon$.

$$\sum_{\omega:\mathbb{R}_+ \to \mathbb{R}_+}\prod_{\epsilon:\mathbb{R}_+} \prod_{x:X} (0 \lt d_X(x, c)) \times (d_X(x, c) \lt \omega(\epsilon)) \to (d_Y(f(x), L) \lt \epsilon)$$

### In uniform spaces

The definition of a limit of a function as defined by Bourbaki can be generalized from [[metric spaces]] to [[uniform spaces]]:

Let $(X, \mathcal{U}(X), \approx)$ and $(Y, \mathcal{U}(Y), \approx)$ be [[uniform spaces]], and let $f$ be a [[function]] from $X$ to $Y$, let $c$ be an [[adherent point]] of $X$, and let $L$ be an element in $Y$.  Then,

> the **limit of $f$ approaching $c$** is $L$ if for all [[entourages]] $E \in \mathcal{U}(Y)$ there exists an entourage $D \in \mathcal{U}(X)$ such that for all elements $x \in X$, $x \approx_D c$ implies that $f(x) \approx_E L$.

And similarly, in [[dependent type theory]], if one were using the [[dependent sum type]] to represent "there exists", one has an element of the following type

$$\prod_{E:\mathcal{U}(Y)} \sum_{D:\mathcal{U}(X)} \prod_{x:X} (x \approx_D c) \to (f(x) \approx_E L)$$

which, by the [[type theoretic axiom of choice]], which is simply the distributivity of [[dependent function types]] over [[dependent sum types]], is the same as saying

> the **limit of $f$ approaching $c$** is $L$ if there exists as structure a function $\omega:\mathcal{U}(Y) \to \mathcal{U}(X)$ such that for all entourages $E$ and for all elements $x \in X$, $x \approx_{\omega(E)} c$ implies that $f(x) \approx_E L$.

$$\sum_{\omega:\mathcal{U}(Y) \to \mathcal{U}(X) }\prod_{E:\mathcal{U}(Y)} \prod_{x:X} (x \approx_{\omega(E)} c) \to (f(x) \approx_E L)$$

### In topological spaces

Let $X$ and $Y$ be [[topological spaces]], let $f$ be a [[partial function]] from $X$ to $Y$ (*not* assumed continuous or anything else), let $c$ be a [[limit point]] of the domain $D$ of $f$ in $X$, and let $L$ be a point in $Y$.

There are actually two definitions of 'limit point' in the literature: an [[adherent point]] and an [[accumulation point]].  And there are two definitions of 'limit' in this context: the usual French-language one (following [[Bourbaki]]) and the usual English-language one.  These definitions correspond respectively.  In both cases, the first definition is simpler, while the second is more common.

+-- {: .num_defn #French}
###### Definition
**(French)**

$L$ is a __limit__ of $f$ approaching $c$ (assumed to be an adherent point of the domain $D$) if, for each [[neighbourhood]] $V$ of $L$, for some neighbourhood $U$ of $c$, for each point $x \in U \cap D$, we have $f(x) \in V$.
=--

+-- {: .num_defn #English}
###### Definition
**(English)**

$L$ is a __limit__ of $f$ approaching $c$ (assumed to be an accumulation point of the domain $D$) if, for each [[neighbourhood]] $V$ of $L$, for some [[punctured neighborhood|punctured neighbourhood]] $U$ of $c$, for each point $x \in U \cap D$, we have $f(x) \in V$.  Equivalently, for each neighbourhood $V$ of $L$, for some neighbourhood $U'$ of $c$, for each point $x \in U' \cap D$, if $x \ne c$, then $f(x) \in V$.
=--

Note that in each case, $U \cap D$ is [[inhabited subset|inhabited]] precisely because $c$ is a limit point of $D$.  That is, in the French definition, $U \cap D$ must be inhabited because an adherent point of $D$ is precisely a point $c$ such that each neighbourhood of $c$ meets $D$; while in the English definition, $U \cap D$ must be inhabited because an accumulation point of $D$ is precisely a point $c$ such that each punctured neighbourhood of $c$ meets $D$.  If we did not require $c$ to be such a limit point (in other words, if we allowed $c$ to have a [punctured] neighbourhood $U$ that was disjoint from $D$), then every value $L$ would satisfy the definition vacuously.

The two notions of limit can each be defined in terms of the other:
+-- {: .num_prop #translation}
###### Proposition

$L$ is a limit of $f$ approaching $c$ by the English definition if and only if $L$ is a limit of $f|_{\hat{c}}$ approaching $c$ by the French definition, where $f|_{\hat{c}}$ is the [[restriction]] of $f$ to the [[relative complement]] $D \setminus \{c\}$ of $c$ in the original domain $D$.  Conversely, $L$ is a limit of $f$ approaching $c$ by the French definition if and only if $c$ is an adherent point of the domain $D$ and these two hypothetical conditions are met: if $f$ is defined at $c$ (in other words, if $c$ belongs to $D$), then $f(c)$ belongs to every neighbourhood of $L$; and if $c$ is an accumulation point of $D$, then $L$ is a limit of $f$ approaching $c$ by the English definition.
=--

The basic difference is that the English definition doesn\'t care about $f(c)$ itself, while the French definition does.  For the French, $f$ must be continuous at $c$ if it is defined there, or equivalently (in the Hausdorff case), $f(c)$ must equal the limit $L$ if it exists at all.  This makes the French definition more strict when both make sense, but it also allows the French definition to make sense at isolated points of the domain $D$, since we know what the value must be there.  For $c \notin D$, then the two definitions are equivalent.

These limits can be defined as [[limits of a filter]]:
+-- {: .num_prop #filter}
###### Proposition

Let $\mathcal{N}_c$ be the [[neighbourhood filter]] of $c$, and let $\dot{\mathcal{N}}_c$ be the filter of punctured neighbourhoods of $c$.  Then the filter $f(\mathcal{N}_c)$ is [[proper filter|proper]] iff $c$ is an adherent point of the domain $D$, and $f(\dot{\mathcal{N}}_c)$ is proper iff $c$ is an accumulation point of $D$.  Futhermore, $L$ is a limit of $f$ approaching $c$ by the French definition iff $L$ is a limit of $f(\mathcal{N}_c)$, and $L$ is a limit of $f$ approaching $c$ by the English definition iff $L$ is a limit of $f(\dot{\mathcal{N}}_c)$.
=--

Here, $f(\mathcal{F})$ is the filter generated by the [[filterbase]] of sets $f(A)$ for $A \in \mathcal{F}$, where $f(A)$ is the image $\{ f(x) \;|\; x \in A \}$.  As an immediate corollary, if $Y$ is [[Hausdorff space|Hausdorff]], then $L$ must be the *only* limit of $f$ approaching $c$.

We can generalize from functions to [[multivalued functions]]; since we\'re already using partial functions, this means that we are dealing with an arbitrary [[binary relation]].  That is, let $X$ and $Y$ be topological spaces, let $R$ be a relation from $X$ to $Y$, let $c$ be a limit (adherent or accumulation) point of the domain $D$ of $R$ in $X$, and let $L$ be a point in $Y$.

+-- {: .num_defn #relations}
###### Definition

$L$ is a __limit__ of $R$ approaching $c$ if, for each neighbourhood $V$ of $L$, for some [punctured] neighbourhood $U$ of $c$, for each point $x \in U \cap D$, we have $R(x) \subseteq V$.
=--

Here, $R(x)$ is the set $\{ y \in Y \;|\; (x,y) \in R \}$ of values of $R$ at $x$.  Again, there are both French-style and English-style versions of the definition.  This can also be defined as the limit of a filter $R(\mathcal{N}_c)$ or $R(\dot{\mathcal{N}}_c)$, where $R(\mathcal{F})$ is generated by the sets $R(A) = \bigcup_{x \in A} R(x)$ for $A \in \mathcal{F}$.  In particular, limits of multivalued functions are still unique, so long as the [[target]] $Y$ is Hausdorff.

We may generalize further from relations to [[spans]].  Let $X$ and $Y$ be topological spaces, let $\Gamma$ be any [[set]], let $g\colon \Gamma \to X$ and $f\colon \Gamma \to Y$ be (total) functions, let $c$ be a limit (adherent or accumulation) point of the [[range]] $D$ of $g$ in $X$, and let $L$ be a point in $Y$.

+-- {: .num_defn #spans}
###### Definition

$L$ is a __limit__ of the span $(g,f)$ approaching $c$ if, for each neighbourhood $V$ of $L$, for some [punctured] neighbourhood $U$ of $c$, for each element $\gamma$ of the [[preimage]] $g^*(U \cap D)$, we have $f(\gamma) \in V$.
=--

Once again, there are both French-style and English-style versions of the definition.  And this too can be defined as the limit of a filter $f(g^*(\mathcal{N}_c))$ or $f(g^*(\dot{\mathcal{N}}_c))$, where $g^*(\mathcal{F})$ consists of the [[preimages]] $g^*(A)$ for $A \in \mathcal{F}$.  In particular, limits of spans to a Hausdorff space are unique.

Limits of spans are no more general than limits of relations:
+-- {: .num_prop #spansrelations}
###### Proposition

$L$ is a limit of the span $(g,f)$ approaching $c$ if and only if $L$ is a limit of the [[range]] $\ran(g,f) = \{ g(\gamma), f(\gamma) \;|\; \gamma \in \Gamma \}$ approaching $c$.
=--
(But often the span is more convenient to refer to than its range.)

Finally, we may impose restrictions on the limit:
+-- {: .num_defn #restricted}
###### Definition

Let $C$ be a [[subset]] of $X$, and suppose that $c$ is a limit (adherent or accumulation) point of $C$.  Then $L$ is a __limit__ of the function $f$ (or the relation $R$, or the span $(g,f)$) approaching $c$ in $C$ if $L$ is a limit of the [[restriction]] $f|_C$ of $f$ to $D \cap C$ (or the restriction $R \cap (C \times Y)$ of $R$, or the restriction $(g|_{g^*(C)},f|_{g^*(C)})$ of $(g,f)$).  In the case of the limit of a span, we can also let $C$ be a subset of $\Gamma$; then the limit in question is the limit of $(g|_C,f|_C)$.
=--

Yet again, there are both French-style and English-style versions, although these are equivalent when $c \notin C$.  And once more, this is the limit of a filter, since it reduces to a previous definition.

This concept allows us to define the English version of limit directly as a French limit:
+-- {: .num_prop}
###### Proposition

$L$ is a limit (in the English sense) of $f$ (or $R$, or $(g,f)$) approaching $c$ in $C$ if and only if $L$ is a limit (in the French sense) of $f$ (or $R$, or $(g,f)$) approaching $c$ in $C \setminus \{c\}$.
=--

To go more general than this would seem to require referring directly to a [[net]] $\nu$ or [[filter]] $\mathcal{F}$ on $X$, at which point we may as well just talk about the [[limit of the net]] $f \circ \nu$ or the [[limit of the filter]] $f(\mathcal{F})$ (or of the filter $R(\mathcal{F})$ or of the filter $f(g^*(\mathcal{F}))$).

## Notation

In the Hausdorff case, we usually write
$$ L = \lim_{x \to c} f(x) $$
to say that $L$ is a limit, or rather *the* limit, of $f$ approaching $c$.  Or indeed, just write
$$ \lim_{x \to c} f(x) $$
for the limit, if it exists (so, like $1/x$ when $x$ is an arbitrary real number, this is a symbol for a thing that might not be defined).  Since $x$ is just a dummy variable here, one can try a notation that does not refer to it, such as $ \lim_c f$ or $f(c^\pm)$.

The last notation is not very common, but some variations of it are when $X$ is a topological [[poset]]: $f(c^-)$ is the limit of $f$ approaching $c$ in $C = \{ x \in X \;|\; x \lt c \}$, while $f(c^+)$ is the limit of $f$ approaching $c$ in $C = \{ x \in X \;|\; x \gt c \}$.  Similarly, $f(\infty)$ is the limit of $f$ approaching $\infty$, where the domain $X$ is taken to be the [[disjoint union]] (as a set) of the original topological poset and a point $\infty$ that is greater than every original element and whose neighbourhoods are the [[upper sets]] of $X$; while $f(-\infty)$ is the limit of $f$ approaching $-\infty$, where the domain $X$ is taken to be the disjoint union of the original topological poset and a point $-\infty$ that is less than every original element and whose neighbourhoods are the [[lower sets]] of $X$.  (In all of these, the French and English definitions agree.)

For the general restricted case, write
$$ \lim_{x \to c \atop x \in C} f(x) $$
for the limit of $f$ approaching $c$ in $C$.  The dummy variable is quite useful here, since neither $f$ nor $C$ have to be given names but can be given by formulas instead.  (For example, $f(c^+)$ is $\lim_{x \to c \atop x \gt c} f(x)$.)

In the non-Hausdorff case, we can use the same notation but interpret it as referring to a [[subset]] of $Y$ instead of an element of $Y$.  Then this subset always exists; it just might be [[empty subset|empty]].  Sometimes a capitalized $Lim$ is used to emphasize that this is now a set.  This set can also be taken to be all of $Y$ whenever $c$ is not a limit point of the appropriate kind, but this is likely to lead to confusion if not explicitly warned about.

Another notation, especially useful when $Y$ is non-Hausdorff, but common even in the Hausdorff case, is
$$ f(x) \underset{x \to c}{\to} L $$
to mean that $L$ is a limit of $f$ approaching $c$.  Again, we can add $x \in C$ if we wish to take the limit in $C$.  And again, the dummy variable means that we don\'t need a name for $f$ (or $C$), just a formula.  Often one writes only $f(x) \to L$ and puts $x \to c$ (and $x \in C$ if appropriate) off to the side somewhere:

* $f(x) \to L$ as $x \to c$ while $x \in C$,

or with more words: $f(x)$ approaches $L$ as $x$ approaches $c$ while $x \in C$.

Most of this notation can also be used for limits of spans:
$$ \array { L = \lim_{g(\gamma) \to c \atop \gamma \in C} f(\gamma) ,\\
L \in \underset{g(\gamma) \to c \atop \gamma \in C}{Lim} f(\gamma) ,\\
f(\gamma) \underset{g(\gamma) \to c \atop \gamma \in C}{\to} L } $$
all mean that $L$ is a limit of $(g,f)$ approaching $c$ in $C$.  Thus the most general notion of limit appearing here is to say that $f(\gamma)$ approaches $L$ as $g(\gamma)$ approaches $c$ while $\gamma \in C$.

It would be nice to have notation to distinguish the French and English versions of limit.  One way would be to adopt the French definition by default and add the restriction $x \ne c$ to produce the English version.  Unfortunately, the English definition is the default in most of the world, and then there is no slick way to denote the French version.

## Examples

A function $f$ is [[continuous function|continuous]] at a point $c$ in its domain $D$, if and only if $f(c)$ is a limit of $f$ approaching $c$ by the French definition; $f$ is continuous at $c$ if and only if, if $c$ is an accumulation point of $D$, then $f(c)$ is a limit of $f$ approaching $c$ by the English definition.  (If $c$ is an [[isolated point]] of $D$, then of course $f$ is continuous there.)

Given a [[real number|real]]-valued function $F$ defined on a real [[interval]] $[a,b]$, we can speak of tagged partitions of $[a,b]$ and consider the [[Riemann sum|Riemann sums]] of $F$ on these tagged partitions.  Let $X$ and $Y$ each be the [[real line]], let $\Gamma$ be the set of tagged partitions of $[a,b]$, let $g\colon \Gamma \to X$ map a partition to the maximum length of its parts (often called the norm or mesh of the partition), and let $f\colon \Gamma \to Y$ map a tagged partition to the Riemann sum of $F$ on it.  Then the [[Riemann integral]] of $F$ on $[a,b]$ is defined to be the limit of the span $(f,g)$ approaching $0$.  That is, the Riemann integral of a function on an interval is the limit of the Riemann sum of the function on a tagged partition of the interval as the mesh of the partition approaches zero.

Let $A$ be a [[directed set]] and let $\nu\colon A \to Y$ be a [[net]] in $Y$.  Give $A$ the [[discrete topology]], and let $X$ be the [[disjoint union]] (as a set) of $A$ and $\{\infty\}$, made into a [[proset]] with $x \lt \infty$ for $x \in A$, and made into a topological space with the neighbourhoods of $\infty$ being the [[upper sets]] of $X$.  Interpret $\nu$ as a partial function from $X$ to $Y$.  Then the limits of $\nu$ approaching $\infty$ are precisely the [[limit of a net|limits]] of $\nu$ as a net.  That is, $\lim \nu = \lim_{x \to \infty} \nu_x$.

## Properties

Some basic relationships between the definitions are in the [definitions](#definitions) section.

As stated in the examples, $f$ is [[continuous function|continuous]] at a point $c$ in its domain $D$ if and only if $f(c)$ is a limit of $f$ approaching $c$ by the French definition, while $f$ is continuous at $c$ if and only if, if $c$ is an accumulation point of $D$, then $f(c)$ is a limit of $f$ approaching $c$ by the English definition.  In this way, pointwise continuity may be defined using limits.

Conversely, limits can be defined using pointwise continuity; the basic idea is that $L$ is a limit of $f$ at $c$ if setting $f(c)$ to $L$ makes $f$ continuous.  For once, this is easier to describe using the English definition: $L$ is the limit of $f$ at an accumulation point $c$ of the domain $D$ if and only if $f_{c \mapsto L}$ is continuous at $c$, where
$$ f_{c \mapsto L}(x) \coloneqq \left\{ \array{ f(x) & x \ne c,\; x \in D ,\\ L & x = c .}\right. $$
For the French definition, in addition to allowing $c$ to be any adherent point of $D$, we use
$$ f_{c \mapsto L}(x) \coloneqq \left\{ \array{ f(x) & x \in D ,\\ L & x = c ,}\right. $$
where the definition by cases is interpreted to mean that the value of the function is undefined if the two cases overlap and give different results.  Except that even this is only correct when the target $Y$ of $f$ is Hausdorff (or at least $\mathrm{T}_1$); in general, we have to allow the value to be defined if the two cases overlap and give different results as long as one result is in the closure of the other (and then we use the other).

There is a Chain Rule for limits.  Using the French definition, the limit of a [[composite]] function $f \circ g$ approaching $c$ is equal to the limit of $f$ approaching the limit of $g$ approaching $c$, if the latter exists:
$$ \lim_{x \to c} f(g(x)) \risingdotseq \lim_{u \to \lim_{x \to c} g(x)} f(u) ,$$
or equivalently $(f \circ g)(c^\pm) \risingdotseq f(g(c^\pm)^\pm)$, where $A \risingdotseq B$ means that $A$ and $B$ are equal if $B$ exists (and $A \fallingdotseq B$ means that $A$ and $B$ are equal if $A$ exists).  Using the English definition, this holds if we impose the requirement that if $g$ takes the value $\lim_c g$ arbitrarily close to $c$ (regardless of its value at $c$) and $f$ is defined there, then $f$ is continuous there.  Either way, we can write
$$ \lim_{x \to c} f(g(x)) = f\Big(\lim_{x \to c} g(x)\Big) $$
if $f$ is continuous at $\lim_c g$.

## See also ##

* [[function limit space]]

## References

* Claude Deschamps, François Moulin, André Warusfel et al., Mathématiques tout-en-un MPSI - 4e éd.: conforme au nouveau programme, Concours Ecoles d'ingénieurs, Dunod, 2015. ISBN:9782100730438

* Wikipédia, <a href="https://fr.wikipedia.org/wiki/Limite_(mathématiques)">Limite (mathématiques)</a>

* Wikipedia, [Limit of a function](https://en.wikipedia.org/wiki/Limit_of_a_function)

[[!redirects limit of a function]]
[[!redirects limits of a function]]
[[!redirects limit of functions]]
[[!redirects limits of functions]]
[[!redirects limit of the function]]
[[!redirects limit of the functions]]
[[!redirects limits of the function]]
[[!redirects limits of the functions]]

[[!redirects limit of a relation]]
[[!redirects limits of a relation]]
[[!redirects limit of relations]]
[[!redirects limits of relations]]
[[!redirects limit of the relation]]
[[!redirects limits of the relation]]
[[!redirects limit of the relations]]
[[!redirects limits of the relations]]


limit point

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
### Context
#### Analysis
+-- {: .hide}
[[!include analysis - contents]]
=--
#### Topology
+-- {: .hide}
[[!include topology - contents]]
=--
=--
=--

# Limit points
* table of contents
{: toc}

## Idea

Given a [[space]] $S$, a [[subspace]] $A$ of $S$, and a [[concrete point]] $x$ in $S$, $x$ is a _limit point_ of $A$ if $x$ can be approximated by the contents of $A$.

There are several variations on this idea, and the term 'limit point' itself is ambiguous (sometimes meaning Definition \ref{adherent}, sometimes Definition \ref{accumulation}.

## Definitions

The classical definitions apply when $S$ is a [[topological space]].  Then $A$ may be thought of as a [[subset]] of (the [[underlying set]] of) $S$, and $x$ as an [[element]].  In order to apply the definitions in [[constructive mathematics]], there needs to be an [[inequality relation]] $\ne$ on the points of $S$; in [[classical mathematics]], this is taken to be the [[denial inequality]], as usual.  (We need not assume that $\ne$ is an [[apartness relation]] nor any compatibility between $\ne$ and the topology, at least for the definitions; although it\'s quite possible that some classical theorems will require such assumptions.)

For the most general definitions, let $\kappa$ be a collection of [[cardinal numbers]].  (We might want $\kappa$ to have some closure properties akin to those of an [[arity class]], but the definition there is not quite what we want.)  Recall that a _$\kappa$-[[arity|ary]] [[indexed subset]]_ of $S$ is a [[function]] $B\colon I \to S$ such that the [[cardinality]] of $I$ belongs to the class $\kappa$; a point $y$ is _in_ $B$ (as an indexed subset) if $y$ belongs to the [[range]] of $B$ (as a function), and $y$ is _out_ of $B$ if $y$ is inequal ($\ne$) to every point in $B$.

+-- {: .num_defn #general}
###### Definitions

The point $x$ is a __$\kappa$-adherent point__ of the subspace $A$ if, for each [[neighbourhood]] $U$ of $x$, for each $\kappa$-ary indexed subset $B$ of the [[intersection]] $U \cap A$, there is an element $y$ of $U \cap A$ that is out of $B$.  Slightly more strongly, $x$ is a __$\kappa$-accumulation point__ (or __$\kappa$-cluster point__)  of $A$ if, for each neighbourhood $U$ of $x$, for each $\kappa$-ary indexed subset $B$ of $U \cap A$, there is an element $y \ne x$ of $U \cap A$ that is out of $B$.  (Alternatively, take $U$ to be a [[punctured neighborhood]], but that won\'t work constructively in general.)
=--

Every $\kappa$-accumulation point is a $\kappa$-adherent point; the converse holds if every $k \in \kappa$ satisfies $k + 1 \in \kappa$ (and then one usually says 'accumulation' rather than 'adherent').  Also, if $\kappa \subseteq \lambda$, then every $\lambda$-(adherent/accumulation) point is a $\kappa$-(adherent/accumulation) point.

It immediately follows that the following classical special cases are in order of increasing strength:

*  Using $\kappa = 1 = \{0\}$:

   +-- {: .num_defn #adherent}
   ###### Definition

   The point $x$ is an __adherent point__ of the subspace $A$ if, for every neighbourhood $U$ of $x$, the intersection $U \cap A$ is [[inhabited subset|inhabited]] (nonempty).
   =--

*  Using $\kappa = 1$ again:

   +-- {: .num_defn #accumulation}
   ###### Definition

   The point $x$ is an __accumulation point__ of the subspace $A$ if, for every punctured neighbourhood $U$ of $x$, the intersection $U \cap A$ is inhabited.
   =--

*  Using $\kappa = \omega = \{0, 1, 2, \ldots\}$:

   +-- {: .num_defn #omega}
   ###### Definition

   The point $x$ is an __$\omega$-accumulation point__ (or __$\infty$-accumulation point__) of the subspace $A$ if, for every neighbourhood $U$ of $x$, the intersection $U \cap A$ is [[infinite set|infinite]].
   =--

*  Using $\kappa = \omega_1 = \{0, 1, 2, \ldots, \aleph_0\}$:

   +-- {: .num_defn #condensation}
   ###### Definition

   The point $x$ is a __condensation point__ of the subspace $A$ if, for every neighbourhood $U$ of $x$, the intersection $U \cap A$ is [[uncountable set|uncountable]].
   =--

## Properties

The subspace $A$ is [[closed subspace|closed]] iff every adherent point of $A$ belongs to $A$ and iff every accumulation point of $A$ belongs to $A$.  (Thus one may say that $A$ is closed iff every limit point of $A$ belongs to $A$ without ambiguity.)

More generally, the [[topological closure|closure]] of $A$ is the set of all adherent points of $A$.  This justifies using 'limit point' to mean an adherent point: the adherent points of $A$ are precisely those that are limits of [[nets]] of points in $A$.  Classically (using [[excluded middle]], or more generally if $S$ has [[decidable equality]]), the closure of $A$ is the [[union]] of $A$ and its set of accumulation points.

The set of accumulation points of $A$ is also called the _[[derived set]]_ of $A$, denoted $A'$.  The study of derived sets is of great historical importance in [[Georg Cantor]]\'s development of [[set theory]], even though closure sets are more important in modern mathematics.  Note that while $Cl(Cl(A)) = Cl(A)$, no similar relationship holds between $A'$ and $A''$, $A'''$, etc; one can even continue this into transfinite [[ordinal numbers]] (possibly their earliest application).

Classically, a point in $A$ that is not an accumulation point of $A$ is precisely an [[isolated point]] of $A$.  (Constructively, each of these is stronger than the negation of the other, but the two conditions may be taken to be [[antithesis interpretation|antitheses]].)

A justification for the terminology 'limit point' for an accumulation point is that the concept of [[limit of a function]] approaching a point really only makes sense approaching an accumulation point.  (This is for essentially the same reason that every function is continuous at an isolated point.)  Indeed, every answer whatsoever satisfies the naive definition of $\lim_c f$ if $c$ is an isolated point of $dom f$ (because the [[improper filter]] converges everywhere).

## Related concepts

* [[limit of a sequence]]

## References

* Wikipedia, _[Limit point](https://en.wikipedia.org/wiki/Limit_point)_

[[!redirects limit point]]
[[!redirects limit points]]

[[!redirects adherent point]]
[[!redirects adherent points]]

[[!redirects accumulation point]]
[[!redirects accumulation points]]

[[!redirects cluster point]]
[[!redirects cluster points]]

[[!redirects ∞-accumulation point]]
[[!redirects ∞-accumulation points]]
[[!redirects infinity-accumulation point]]
[[!redirects infinity-accumulation points]]
[[!redirects ω-accumulation point]]
[[!redirects ω-accumulation points]]
[[!redirects omega-accumulation point]]
[[!redirects omega-accumulation points]]

[[!redirects condensation point]]
[[!redirects condensation points]]


limit point compact space

[[!redirects limit compact space]]

# Contents
* table of contents
{:toc}

## Definitions

A [[topological space]] is *limit point compact* if every [[infinite set|infinite]] [[subset]] has a [[limit point]] (in the sense of Definition 2.3 there, i.e., an accumulation point).

Under [[classical logic]], there are several tautologously equivalent ways of formulating the definition. Let us first recall that points $x$ of a [[closed subset]] $A$ of a space $X$ are either *isolated* (meaning that for some neighborhood $U$ of $x$ we have $U \cap A = \{x\}$) or not; in the latter case we say $x$ is a *limit point* or *accumulation point* of $A$. More generally, for any subset $A$, a limit point of $A$ is defined to be a limit point of its closure $\bar{A}$.

Thus, a subset $A$ has no limit point iff every point of $\bar{A}$ is isolated, in other words iff $\bar{A}$ equipped with the [[subspace topology]] is a [[discrete space]]. In view of this, an equivalent definition of limit point compactness is:

* Every closed discrete subspace is [[finite set|finite]].

Another characterization focuses in on [[countable set|countability]]: if there are no infinite closed discrete spaces, then obviously there are no countably infinite closed discrete spaces. Conversely, if there is an infinite closed discrete subspace $A$ of $X$, then because any countably infinite subset of $A$ is also closed and discrete in $X$, we can say that $X$ is *not* limit point compact iff there exists an infinite closed discrete subspace iff there exists a countably infinite closed discrete subspace. It follows that another characterization of limit point compactness is

* Every countably infinite set has a limit point, or

* Every countable closed discrete subspace is finite.

Limit point compactness is closely related to [[countably compact space|countable compactness]]. Indeed, every countably compact space is limit point compact; in the converse direction, every limit point compact space satisfying the $T_1$ [[separation axiom]] (namely, that points are closed) is also countably compact. For this reason, limit point compact spaces are also known as "weakly countably compact spaces". See [[countably compact space]] for further details.

+-- {: .num_remark}
###### Remark
For a [[metrizable space]] $X$, the following are equivalent:

* $X$ is a limit point compact space
* $X$ is a [[countably compact space]]
* $X$ is a [[sequentially compact space]]
* $X$ is a [[compact space]]
=--

## Terminology

The term "limit point compact" was invented by James Munkres as he was writing his famous text on [[point-set topology]]. He writes that other terms that have appeared in the literature are "Bolzano-Weierstrass compactness" and "Fréchet compactness".

## References

* [[James Munkres]], *Topology*, 2nd edition, Prentice-Hall 1999. ISBN 0-13-181629-2.


limits and colimits by example

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
###Context###
#### Limits and colimits
+--{: .hide}
[[!include infinity-limits - contents]]
=--
=--
=--

This entry lists and discusses examples and special types of the [[universal constructions]] called  _[[limits]]_ and _[[colimits]]_.

It starts with very elementary and simple examples and eventually passes to more sophisticated ones.

For examples of the other kinds of [[universal constructions]] see

* _[[examples of adjoint functors]]_

* _[[examples of Kan extensions]]_

# Contents
* table of contents
{: toc}

## Limits and colimits of sets
  {#limcoliminset}

In the [[category]] [[Set]] of [[sets]], the concepts of [[limits]] and [[colimits]] reduce to the familiar operations of

* [[cartesian product]] of sets;
* [[disjoint union]] of sets;
* [[subsets]] defined by [[equations]]
* [[quotient sets]] of [[equivalence relations]].

### Limits

#### Terminal object

The [[terminal object]] is the limit of the empty functor $F: \emptyset \to Set$. So a [[terminal object]] of $Set$ is a set $X$ such that there is a unique function from any set to $X$. This is given by any [[singleton]] set $\{a\}$, where the unique function $Y \to \{a\}$ from any set $Y$ is the function that sends every element in $Y$ to $a$.

#### Product

Given two sets $A, B$, the categorical [[product]] is the limit of the diagram (with no non-trivial maps)
$$
\array{
  A & B
}.
$$
This is given by the usual product of sets, which can be constructed as the set of [[Kuratowski pairs]]
$$
  A \times B = \{ \{\{a\}, \{a, b\}\}: a \in A, b \in B\}.
$$
We tend to write $(a, b)$ instead of $\{\{a\}, \{a, b\}\}$.

The projection maps $\pi_1: A \times B \to A$ and $\pi_2: A \times B \to B$ are given by
$$
  \pi_1(a, b) = a, \pi_2(a, b) = b.
$$

To see this satisfies the universal property of products, given any pair of maps $f: X \to A$ and $g: X \to B$, we obtain a map $(f, g): X \to A \times B$ given by
$$
  (f, g)(x) = (f(x), g(x)).
$$

More generally, given a (possibility infinite) collection of sets $\{A_\alpha\}_{\alpha \in I}$, the product of the discrete diagram consisting of these sets is the usual product $\prod_{\alpha \in I} A_\alpha$. This can be constructed as
$$
  \prod_{\alpha \in I} A_\alpha = \left\{f: I \to \bigcup_{\alpha \in I} A_\alpha \mid f(\alpha) \in A_\alpha\;\text{ for all }\;\alpha \in I\right\}.
$$
#### Equalizer
Given a pair of functions $f, g: X \to Y$, the [[equalizer]] is the limit of the diagram
$$
\array{
X & \underset{g}{\overset{f}{\rightrightarrows}} & Y
}.
$$
The limit is given by a map $e: A \to X$ such that given any $a: B \to X$, it factors through $e$ if and only if $f \circ a = g \circ a$. In other words, $a$ factors through $e$ if and only if $\im a \subseteq \{x \in X: f(x) = g(x)\}$. Thus the limit of the diagram is given by
$$
  A = \{x \in X: f(x) = g(x)\},
$$
and the map $e: A \to X$ is given by the inclusion.

#### Pullback
Given two maps $f: A \to C$ and $g: B \to C$, the [[pullback]] is the limit of the diagram
$$
\array{
  & & A\\
  & & \downarrow^\mathrlap{f}\\
  B & \underset{g}{\to} & C
}.
$$
This limit is given by
$$
  \{(a, b) \in A \times B: f(a) = g(b)\},
$$
with the maps to $A$ and $B$ given by the projections.

While the definition of a pullback is symmetric in $f$ and $g$, it is usually convenient to think of this as pulling back $f$ along $g$ (or the other way round). This has more natural interpretations in certain special cases.

If $g: B \to C$ is the inclusion of a subset (ie. is a [[monomorphism]]), then the pullback of $f$ along $g$ is given by
$$
  \{a \in A: f(a) \in B\}.
$$
So this is given by restricting $f$ to the elements that are mapped into $B$.

Further, if $f: A \to C$ is *also* the inclusion fo a subset, so that $A$ and $B$ are both subobjects of $C$, then the above formula tells us that the pullback is simply the intersection of the two subsets.

Alternatively, we can view the map $f: A \to C$ as a collection of sets indexed by elements of $C$, where the set indexed by $c \in C$ is given by $A_c = f^{-1}(c)$. Under this interpretation, pulling $f$ back along $g$ gives a collection of sets indexed by elements of $B$, where the set indexed by $b \in B$ is given b $A_{g(b)}$.

#### General limits
Given a general [[Set]]-valued functor $F : D \to Set$, if the limit $lim F$ exists, then by definition, for any set $A$, a function $f: A \to lim F$ is equivalent to a compatible family of maps $f_d: A \to F(d)$ for each $d \in Obj(D)$.

In particular, since an element of a set $X$ bijects with maps $1 \to X$ from the singleton $1 = \{\emptyset\}$, we have
$$
  lim F \cong Set (1, lim F) \cong [D, Set](const_1, F),
$$
where $const_1$ is the functor that constantly takes the value $1$. Thus the limit is given by the set of [[natural transformations]] from $const_1$ to $F$.

More concretely, a compatible family of maps $1 \to F(d)$ is given by an element $s_d \in F(d)$ for each $d \in Obj(d)$, satisfying the appropriate compatibility conditions. Thus, the limit can be realized as a subset of the product $\prod_{d \in Obj(d)} F(d)$ of all objects:
$$
  lim F = \left\{ (s_d)_d \in \prod_d F(d) | \forall (d \stackrel{f}{\to} d') : F(f)(s_{d}) = s_{d'}  \right\}.
$$

### Colimits
#### Initial object
The [[initial object]] in $Set$ is a set $X$ such that there is a unique map from $X$ to any other set. This is given by the empty set $\emptyset$.

#### Coproduct
(...)

#### Coequalizer
(...)

#### Pushout
(...)

#### General colimits
The colimit over a [[nLab:Set|Set]]-valued functor $F : D \to Set$ is a quotient set of the disjoint union $\coprod_{d \in Obj(D)} F(d)$:
  $$
    colim F \simeq \left(\coprod_{d\in D} F(d)\right)/_\sim \,,
  $$
  where the equivalence relation $\sim$ is that which is _generated_ by
  $$
    ((x \in F(d)) \sim (x' \in F(d')))\quad if \quad (\exists (f : d \to d') \quad with F(f)(x) = x')
  \,.
  $$
  If $D$ is a [[filtered category]] then the resulting equivalence relation can be described as follows:
  $$
    ((x \in F(d)) \sim (x' \in F(d')))\quad iff \quad (\exists d'', (f : d \to d''), (g: d' \to d'') \quad with F(f)(x) = F(g)(x'))
  \,.
  $$
  (If $D$ is not filtered, then this description doesn't yield an equivalence relation.)

## Limits and colimits of topological spaces
 {#OfTopologicalSpaces}

We discuss limits and colimits in the category [[Top]] of [[topological spaces]].

$\,$

[[!include universal constructions of topological spaces -- table]]

$\,$

+-- {: .num_defn #InitialAndFinalTopologies}
###### Definition

Let $\{X_i = (S_i,\tau_i) \in Top\}_{i \in I}$ be a [[class]] of [[topological spaces]], and let $S \in Set$ be a bare [[set]]. Then

* For $\{S \stackrel{f_i}{\to} S_i \}_{i \in I}$ a set of [[functions]] out of $S$, the _[[initial topology]]_ $\tau_{initial}(\{f_i\}_{i \in I})$ is the topology on $S$ with the [[minimum]] collection of [[open subsets]] such that all $f_i \colon (S,\tau_{initial}(\{f_i\}_{i \in I}))\to X_i$ are [[continuous function|continuous]].

* For $\{S_i \stackrel{f_i}{\to} S\}_{i \in I}$ a set of [[functions]] into $S$, the _[[final topology]]_ $\tau_{final}(\{f_i\}_{i \in I})$ is the topology on $S$ with the [[maximum]] collection of [[open subsets]] such that all $f_i \colon X_i \to (S,\tau_{final}(\{f_i\}_{i \in I}))$ are [[continuous function|continuous]].

=--

+-- {: .num_example #TopologicalSubspace}
###### Example

For $X$ a single topological space, and $\iota_S \colon S \hookrightarrow U(X)$ a subset of its underlying set, then the initial topology $\tau_{intial}(\iota_S)$, def. \ref{InitialAndFinalTopologies}, is the [[subspace topology]], making

$$
  \iota_S
  \;\colon\;
  (S, \tau_{initial}(\iota_S))
  \hookrightarrow
  X
$$

a [[topological subspace]] inclusion.

=--

+-- {: .num_example #QuotientTopology}
###### Example

Conversely, for $p_S \colon U(X) \longrightarrow S$ an [[epimorphism]], then the final topology $\tau_{final}(p_S)$ on $S$ is the _[[quotient topology]]_.

=--

+-- {: .num_prop #DescriptionOfLimitsAndColimitsInTop}
###### Proposition

Let $I$ be a [[small category]] and let $X_\bullet \colon I \longrightarrow Top$ be an $I$-[[diagram]] in [[Top]] (a [[functor]] from $I$ to $Top$), with components denoted $X_i = (S_i, \tau_i)$, where $S_i \in Set$ and $\tau_i$ a topology on $S_i$. Then:

1. The [[limit]] of $X_\bullet$ exists and is given by [[generalized the|the]] topological space whose underlying set is [[generalized the|the]] limit in [[Set]] of the underlying sets in the diagram, and whose topology is the [[initial topology]], def. \ref{InitialAndFinalTopologies}, for the functions $p_i$ which are the limiting [[cone]] components:

   $$
     \array{
       && \underset{\longleftarrow}{\lim}_{i \in I} S_i
       \\
       & {}^{\mathllap{p_i}}\swarrow && \searrow^{\mathrlap{p_j}}
       \\
       S_i && \underset{}{\longrightarrow} && S_j
     }
     \,.
   $$

   Hence

   $$
     \underset{\longleftarrow}{\lim}_{i \in I} X_i
     \simeq
     \left(\underset{\longleftarrow}{\lim}_{i \in I} S_i,\; \tau_{initial}(\{p_i\}_{i \in I})\right)
   $$

1. The [[colimit]] of $X_\bullet$ exists and is the topological space whose underlying set is the colimit in [[Set]] of the underlying diagram of sets, and whose topology is the [[final topology]], def. \ref{InitialAndFinalTopologies} for the component maps $\iota_i$ of the colimiting [[cocone]]

   $$
     \array{
       S_i && \longrightarrow && S_j
       \\
       & {}_{\mathllap{\iota_i}}\searrow && \swarrow_{\mathrlap{\iota_j}}
       \\
       && \underset{\longrightarrow}{\lim}_{i \in I} S_i
     }
     \,.
   $$

   Hence

   $$
     \underset{\longrightarrow}{\lim}_{i \in I} X_i
     \simeq
     \left(\underset{\longrightarrow}{\lim}_{i \in I} S_i,\; \tau_{final}(\{\iota_i\}_{i \in I})\right)
   $$

=--

(e.g. [Bourbaki 71, section I.4](#Bourbaki71))

+-- {: .proof}
###### Proof

The required [[universal property]] of $\left(\underset{\longleftarrow}{\lim}_{i \in I} S_i,\; \tau_{initial}(\{p_i\}_{i \in I})\right)$ is immediate: for

$$
  \array{
    && (S,\tau)
    \\
    & {}^{\mathllap{f_i}}\swarrow && \searrow^{\mathrlap{f_j}}
    \\
    X_i && \underset{}{\longrightarrow} && X_i
  }
$$

any [[cone]] over the diagram, then by construction there is a unique function of underlying sets $S \longrightarrow \underset{\longleftarrow}{\lim}_{i \in I} S_i$ making the required diagrams commute, and so all that is required is that this unique function is always [[continuous function|continuous]]. But this is precisely what the initial topology ensures.

The case of the colimit is [[formal dual|formally dual]].

=--

+-- {: .num_example #PointTopologicalSpaceAsEmptyLimit}
###### Example

The limit over the empty diagram in $Top$ is the [[point]] $\ast$ with its unique topology.

=--

+-- {: .num_example #DisjointUnionOfTopologicalSpacesIsCoproduct}
###### Example

For $\{X_i\}_{i \in I}$ a set of topological spaces, their [[coproduct]] $\underset{i \in I}{\sqcup} X_i \in Top$ is their _[[disjoint union]]_.

=--

In particular:

+-- {: .num_example #DiscreteTopologicalSpaceAsCoproduct}
###### Example

For $S \in Set$, the $S$-indexed [[coproduct]] of the point, $\underset{s \in S}{\coprod}\ast $,  is the set $S$ itself equipped with the [[final topology]], hence is the [[discrete topological space]] on $S$.

=--

+-- {: .num_example #ProductTopologicalSpace}
###### Example

For $\{X_i\}_{i \in I}$ a set of topological spaces, their [[product]] $\underset{i \in I}{\prod} X_i \in Top$ is the [[Cartesian product]] of the underlying sets equipped with the _[[product topology]]_, also called the _[[Tychonoff product]]_.

In the case that $S$ is a [[finite set]], such as for binary product spaces $X \times Y$, then a [[basis for a topology|sub-basis]] for the product topology is given by the [[Cartesian products]] of the open subsets of (a basis for) each factor space.

=--

+-- {: .num_example #EqualizerInTop}
###### Example

The [[equalizer]] of two [[continuous functions]] $f, g \colon X \stackrel{\longrightarrow}{\longrightarrow} Y$ in $Top$ is the equalizer of the underlying functions of sets

$$
  eq(f,g)
   \hookrightarrow
  S_X
    \stackrel{\overset{f}{\longrightarrow}}{\underset{g}{\longrightarrow}}
  S_Y
$$

(hence the largets subset of $S_X$ on which both functions coincide) and equipped with the [[subspace topology]], example \ref{TopologicalSubspace}.

=--

+-- {: .num_example #CoequalizerInTop}
###### Example

The [[coequalizer]] of two [[continuous functions]] $f, g \colon X \stackrel{\longrightarrow}{\longrightarrow} Y$ in $Top$ is the coequalizer of the underlying functions of sets

$$
  S_X
    \stackrel{\overset{f}{\longrightarrow}}{\underset{g}{\longrightarrow}}
  S_Y
    \longrightarrow
  coeq(f,g)
$$

(hence the [[quotient set]] by the [[equivalence relation]] generated by $f(x) \sim g(x)$ for all $x \in X$)  and equipped with the [[quotient topology]], example \ref{QuotientTopology}.

=--

+-- {: .num_example #PushoutInTop}
###### Example

For

$$
  \array{
     A &\overset{g}{\longrightarrow}& Y
     \\
     {}^{\mathllap{f}}\downarrow
     \\
     X
  }
$$

two [[continuous functions]] out of the same [[domain]], then the [[colimit]] under this diagram is also called the _[[pushout]]_, denoted

$$
  \array{
     A &\overset{g}{\longrightarrow}& Y
     \\
     {}^{\mathllap{f}}\downarrow && \downarrow^{\mathrlap{g_\ast f}}
     \\
     X &\longrightarrow& X \sqcup_A Y
     \,.
  }
  \,.
$$

(Here $g_\ast f$ is also called the pushout of $f$, or the _[[base change|cobase change]]_ of $f$ along $g$.) If $g$ is an inclusion, one also write $X \cup_f Y$ and calls this the _[[attaching space]]_.

By example \ref{CoequalizerInTop} the [[pushout]]/[[attaching space]] is the [[quotient topological space]]

$$
  X \sqcup_A Y \simeq (X\sqcup Y)/\sim
$$

of the [[disjoint union]] of $X$ and $Y$ subject to the [[equivalence relation]] which identifies a point in $X$ with a point in $Y$ if they have the same pre-image in $A$.

(graphics from [Aguilar-Gitler-Prieto 02](#AguilarGitlerPrieto02))

=--

+-- {: .num_example #TopologicalnSphereIsPushoutOfBoundaryOfnBallInclusionAlongItself}
###### Example

As an important special case of example \ref{PushoutInTop},  let

$$
  i_n \colon S^{n-1}\longrightarrow D^n
$$

be the canonical inclusion of the standard [[n-sphere|(n-1)-sphere]] as the [[boundary]] of the standard [[n-disk]] (both regarded as [[topological spaces]] with their [[subspace topology]] as subspaces of the [[Cartesian space]] $\mathbb{R}^n$).

Then the colimit in [[Top]] under the diagram, i.e. the [[pushout]] of $i_n$ along itself,

$$
  \left\{
     D^n \overset{i_n}{\longleftarrow} S^{n-1} \overset{i_n}{\longrightarrow}
     D^n
  \right\}
  \,,
$$

is the [[n-sphere]] $S^n$:

$$
  \array{
    S^{n-1} &\overset{i_n}{\longrightarrow}& D^n
    \\
    {}^{\mathllap{i_n}}\downarrow &(po)& \downarrow
    \\
    D^n &\longrightarrow& S^n
  }
  \,.
$$

(graphics from Ueno-Shiga-Morita 95)

=--

W

## Limits and colimits in a preordered set
(..)

## Limits and colimits in functor categories
 {#InFunctorCategories}

The main point is that *[[limits of functors are computed objectwise]]*. See there for more

## Colimit of a representable functor
 {#ColimitOfARepresentablefunctor}

The [[colimit]] of a [[representable functor]] (with values in [[Set]]) is the [[point]], i.e. the [[terminal object]] in [[Set]].

One can readily see this from a [[universal element]]-style argument, by direct inspection of [[cocones]].

$$
  \array{
     \mathcal{C}(D,C) &&
       \overset{
         (D \overset{f}{\to}C)^\ast
       }{\longleftarrow}
     && \mathcal{C}(C,C)
     \\
     & \searrow && \swarrow
     \\
     &&
     \left\{
       C \overset{id}{\to}C
     \right\}
  }
$$

However, this style of reasoning does not easily generalize to [[higher category theory]]. The following gives a more abstract argument that is short and generalizes. We state it in [[(∞,1)-category theory]] just for definiteness of notation:

+-- {: .num_prop #HodgeStarFollowedByHodgeStar}
###### Proposition
**([[homotopy colimit]] over a [[representable functor]] is [[n-truncated object in an (∞,1)-category|contractible]])**

Let $\mathcal{C}$ be a [[small (∞,1)-category]] and consider an [[∞Groupoids|∞-groupoid]]-valued [[(∞,1)-functor]] $F \colon \mathcal{C}^{op} \to Groupoids_\infty$ which is [[representable functor|representable]], i.e. in the [[essential image|image]] of the [[(∞,1)-Yoneda embedding]] $F \simeq y C$:

$$
  \array{
    \mathcal{C}
    &
    \overset{
      \phantom{AA}
      y
      \phantom{AA}
    }{\longrightarrow}
    &
    Func
    \big(
      \mathcal{C}^{op},
      Groupoids_\infty
    \big)
    \\
    C &\mapsto&
    y C
    \coloneqq
    \mathcal{C}(-,C)
  }
$$

Then the [[(∞,1)-colimit]] over this [[(∞,1)-functor]] is contractible, i.e. is the point, the [[terminal object in an (∞,1)-category|terminal object]] in [[∞Groupoids]]:

$$
  \underset{
    \underset{\mathcal{C}}{\longrightarrow}
  }{\lim}
   (y C)
   \;\simeq\;
   \ast
$$

=--

+-- {: .proof}
###### Proof

The terminal $\infty$-groupoid $\ast$ is characterized by the fact that for each $S \in Groupoids_\infty$ we have $Groupoids_\infty(\ast, S) \simeq S$.
Therefore it is sufficient to show that $\underset{\longrightarrow}{\lim}\big(y C\big)$ has the same property:

$$
  \begin{aligned}
  Groupoids_\infty
  \left(
    \underset{\longrightarrow}{\lim}
    \big(
      y C
    \big)
    ,
    S
  \right)
  & \simeq\;
  Func(
    \mathcal{C}^{op}
    ,\,
    Groupoids_\infty
  )
  \left(
    y C
    ,
    const S
  \right)
  \\
  & \simeq\;
  (const S)(C)
  \\
  & \simeq\;
  S
  \end{aligned}
$$

Here the first step is the [[(∞,1)-adjunction]]

$$
  Func
  \big(
    \mathcal{C}^{op},
    Groupoids_\infty
  \big)
  \underoverset
    {
      \underset{const}{\longleftarrow}
    }
    {
      \overset{ \underset{\longrightarrow}{\lim} }{\longrightarrow}
    }
    {\phantom{AA}\bot\phantom{AA}}
  \Groupoids_\infty
$$

and the second step is the [[(∞,1)-Yoneda lemma]]

=--

## Examples of limits {#examplesoflimits}

In the following examples, $D$ is a [[small category]], $C$ is any category and the limit is taken over a functor $F : D^{op} \to C$.

### Simple diagrams {#limitssimplediagrams}

* the limit of the empty diagram $D = \emptyset$ in $C$ is, if it exists [[nLab:generalized the|the]] [[nLab:terminal object|terminal object]];

* if $D$ is a [[nLab:discrete category|discrete category]], i.e. a category with only identity morphisms, then a diagram $F : D \to C$ is just a collection $c_i$ of objects of $C$. Its limit is the [[nLab:product|product]] $\prod_i c_i$  of these.

* if $D = \{a \stackrel{\to}{\to} b\}$ then $lim F$ is the [[nLab:equalizer|equalizer]] of the two morphisms $F(b) \to F(a)$.

* if $D$ has an [[nLab:terminal object|terminal object]] $I$ (so that $I$ is an [[nLab:initial object|initial object]] in $D^{op}$), then the limit of any $F : D^{op} \to C$ is $F(I)$.

### Filtered limits {#filteredlimits}

* if $D$ is a [[nLab:poset|poset]], then the limit over $D^{op}$ is the supremum over the $F(d)$ with respect to $(F(d) \leq F(d')) \Leftrightarrow (F(d) \stackrel{F(\leq)}{\leftarrow} F(d'))$;

* the generalization of this is where the term "limit" for categorical limit (probably) originates from: for $D$ a [[nLab:filtered category|filtered category]], hence $D^{op}$ a cofiltered category, one may think of $(d \stackrel{f}{\to} d') \mapsto (F(d) \stackrel{F(f)}{\leftarrow} F(d')$ as witnessing that $F(d')$ is "larger than" $F(d)$ in some sense, and $lim F$ is then the "largest" of all these objects, the limiting object. This interpretation is perhaps more evident for filtered [[nLab:colimit|colimits]], where the codomain category $C$ is thought of as being the [[nLab:opposite category|opposite]] $C = E^{op}$. See the motivation at [[nLab:ind-object|ind-object]].

### In terms of other operations {#limitsintermsofotherops}

If products and equalizers exist in $C$, then limit of $F : D^{op} \to C$ can be exhibited as a [[nLab:subobject|subobject]] of the [[nLab:product|product]] of the $F(d)$, namely the [[nLab:equalizer|equalizer]] of

$$
  \prod_{d \in Obj(D)}
  F(d)
  \stackrel{\langle F(f) \circ p_{F(t(f))} \rangle_{f \in Mor(D)} }{\to}
  \prod_{f \in Mor(D)}
  F(s(f))
$$

and

$$
  \prod_{d \in Obj(D)}
  F(d)
  \stackrel{\langle p_{F(s(f))} \rangle_{f \in Mor(D)} }{\to}
  \prod_{f \in Mor(D)}
  F(s(f))
  \,.
$$

See the explicit formula for the limit in [[nLab:Set|Set]]
in terms of a subset of a product set.

In particular therefore, a category has all limits already if it has all products and equalizers.

### Limits in presheaf categories {#limitsinpresheafcat}

Consider limits of functors $F : D^{op} \to PSh(C)$
with values in the [[category of presheaves]] over a [[category]] $C$.

+-- {: .num_prop #LimitsOfPresheaves}
###### Proposition
**([[limits of presheaves are computed objectwise]])**

Limits of presheaves are computed objectwise:

$$
  lim F : c \mapsto lim F(-)(c)
$$
Here on the right the limit is over the functor
$F(-)(c) : D^{op} \to Set$.

Similarly for colimits

=--

Similarly [[colimit]]s of presheaves are computed objectwise.

+-- {: .num_prop}
###### Proposition

The [[Yoneda embedding]]
$Y : C \to PSh(C)$ commutes with small limits:

Let $F : D^{op} \to C$, then we have
$$
  Y(lim F) \simeq lim (Y\circ F)
$$
if $lim F$ exists.

=--

**Warning** The Yoneda embedding does _not_ in general preserve colimits.

### Limits in under-categories {#limitsinundercat}

Limits in [[under category|under categories]] are a special case of limits in [[comma category|comma categories]]. These are explained elsewhere. It may still be useful to spell out some details for the special case of under-categories. This is what the following does.

+-- {: .num_prop}
###### Proposition

Limits in an [[under category]] are computed as limits in the underlying category.

Precisely: let $C$ be a [[category]], $t \in C$ an [[object]], and $t/C$ the corresponding [[under category]], and $p : t/C \to C$ the obvious projection.

Let $F : D \to t/C$ be any [[functor]]. Then, if it exists, the [[limit]] over $p \circ F$ in $C$ is the image under $p$ of the limit over $F$:

$$
  p(\lim F)  \simeq \lim (p F)
$$

and $\lim F$ is uniquely characterized by $\lim (p F)$.

=--

+-- {: .proof}
###### Proof

Over a morphism $\gamma : d \to d'$ in $D$ the limiting cone over $p F$  (which exists by assumption) looks like

$$
  \array{
    && \lim p F
    \\
    & \swarrow && \searrow
    \\
    p F(d) &&\stackrel{p F(\gamma)}{\to}&& p F(d')
  }
$$

By the universal property of the limit this has a unique
lift to a cone in the [[under category]] $t/C$ over $F$:

$$
  \array{
    && t
    \\
    & \swarrow &\downarrow & \searrow
    \\
    && \lim p F
    \\
    \downarrow & \swarrow && \searrow & \downarrow
    \\
    p F(d) &&\stackrel{p F(\gamma)}{\to}&& p F(d')
  }
$$

It therefore remains to show that this is indeed a limiting cone over $F$. Again, this is immediate from the universal property of the limit in $C$. For let $t \to Q$ be another cone over $F$ in $t/C$, then $Q$ is another cone over $p F$ in $C$ and we get in $C$ a universal morphism $Q \to \lim p F$

$$
  \array{
    && t
    \\
    & \swarrow & \downarrow & \searrow
    \\
    && Q
    \\
    \downarrow & \swarrow &\downarrow & \searrow & \downarrow
    \\
    && \lim p F
    \\
    \downarrow & \swarrow && \searrow & \downarrow
    \\
    p F(d) &&\stackrel{p F(\gamma)}{\to}&& p F(d')
  }
$$

A glance at the diagram above shows that
the composite $t \to Q \to \lim p F$ constitutes a morphism
of cones in $C$ into the limiting cone over $p F$. Hence it must equal our morphism $t \to \lim p F$, by the universal property of $\lim p F$, and hence the above diagram does commute as indicated.

This shows that the morphism $Q \to \lim p F$
which was the unique one giving a cone morphism on $C$ does lift to a
cone morphism in $t/C$, which is then necessarily unique, too.  This demonstrates the required universal property of $t \to \lim p F$ and
thus identifies it with $\lim F$.

=--

* Remark: One often says "$p$ reflects limits" to express the conclusion of this proposition. A conceptual way to consider this result is by appeal to a more general one: if $U: A \to C$ is [[monadic functor|monadic]] (i.e., has a left adjoint $F$ such that the canonical [[comparison functor]] $A \to (U F)\text{-}Alg$ is an [[equivalence of categories|equivalence]]), then $U$ both reflects and preserves limits. In the present case, the projection $p: A = t/C \to C$ is monadic, is essentially the category of algebras for the monad $T(-) = t + (-)$, at least if $C$ admits binary coproducts. (Added later: the proof is even simpler: if $U: A \to C$ is the underlying functor for the category of algebras of an _endofunctor_ on $C$ (as opposed to algebras of a monad), then $U$ reflects and preserves limits; then apply this to the endofunctor $T$ above.)

## Further resources

Pedagogical vidoes that explain limits and colimits are at

* [[The Catsters]], [General Limits and Colimits](http://www.youtube.com/watch?v=g47V6qxKQNU)


limits commute with limits

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
### Context
#### Limits and colimits
+--{: .hide}
[[!include infinity-limits - contents]]
=--
#### Category theory
+-- {: .hide}
[[!include category theory - contents]]
=--
=--
=--

#Contents#
* table of contents
{:toc}

## Idea

One of the basic facts of [[category theory]] is that the order of two [[limits]] (a kind of [[universal construction]]) does not matter, up to [[isomorphism]].

## Statement

+-- {: .num_prop #LimitsCommuteWithLimits}
###### Proposition
**(limits commute with limits)**

Let $\mathcal{D}$ and $\mathcal{D}'$ be [[small categories]] and let $\mathcal{C}$ be a [[category]] which admits [[limits]] of shape $\mathcal{D}$ as well as [[limits]] of shape $\mathcal{D}'$. Then these limits "commute" with each other, in that
for $F \;\colon\; \mathcal{D} \times {\mathcal{D}'} \to \mathcal{C}$ a [[functor]] (hence a [[diagram]] of shape the [[product category]]), with corresponding [[adjunct]] functors

$$
  {\mathcal{D}'}
    \overset{F_{\mathcal{D}}}{\longrightarrow}
  [\mathcal{D},\mathcal{C}]
  \phantom{AAA}
  {\mathcal{D}}
    \overset{F_{\mathcal{D}'}}{\longrightarrow}
  [{\mathcal{D}'},   \mathcal{C}]
$$

we have that the canonical comparison morphism

\[
  \label{ComparisonMorphismForCommutingLimits}
  lim F \simeq lim_{\mathcal{D}}  (lim_{\mathcal{D}'} F_{\mathcal{D}} )
  \simeq
   lim_{\mathcal{D}'}  (lim_{\mathcal{D}} F_{\mathcal{D}'} )
\]

is an [[isomorphism]].

=--

+-- {: .proof}
######Proof

Since the [[limit]]-construction is the [[right adjoint]] functor to the [[constant functor|constant]] [[diagram]]-functor, this is a special case of _[[right adjoints preserve limits]]_.

=--

See _[[limits and colimits by example]]_ for what formula (eq:ComparisonMorphismForCommutingLimits) says for instance for the special case $\mathcal{C} =$ [[Set]].

+-- {: .num_remark}
###### Remark
**(general non-commutativity of limits with colimits)**

In general limits do _not_ commute with [[colimits]]. But under a number of special conditions of interest they do. Special cases and concrete examples are discussed at _[[commutativity of limits and colimits]]_.

=--

## Related statements

* [[preserved limit]]

* [[adjoints preserve (co-)limits]]

* [[hom-functor preserves limits]]

* [[commutativity of limits and colimits]]

## References

e.g.

* [[Saunders MacLane]], §IX.2 in: *[[Categories for the Working Mathematician]]*, Graduate texts in mathematics, Springer (1971) [[doi:10.1007/978-1-4757-4721-8](https://link.springer.com/book/10.1007/978-1-4757-4721-8)]

[[!redirects limits preserve limits]]

[[!redirects colimits commute with colimits]]


limits in quasi-categories > history

< [[limits in quasi-categories]]
[[!redirects limits in quasi-categories -- history]]


+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
###Context###
#### Category theory
+-- {: .hide}
[[!include category theory - contents]]
=--
#### Limits and colimits
+--{: .hide}
[[!include infinity-limits - contents]]
=--
=--
=--

#Contents#
* table of contents
{:toc}

## Idea

A basic fact of [[category theory]] says that the [[limit]] or [[colimit]] of a [[diagram]] in a  [[category of presheaves]] is the [[presheaf]] whose value at any [[object]] is the [[limit]] or [[colimit]], respectively, in the [[category of sets]], of the values of the presheaves in the diagram, at that object.

## Statement

+-- {: .num_prop}
###### Proposition
**(limits of presheaves are computed objectwise)**

Let $\mathcal{C}$ be a [[category]] and write $[\mathcal{C}^{op}, Set]$ for its [[category of presheaves]]. Let moreover $\mathcal{D}$ be a [[small category]] and consider any [[functor]]

$$
  F \;\colon\; \mathcal{D} \longrightarrow [\mathcal{C}^{op}, Set]
  \,,
$$

hence a $\mathcal{D}$-shaped [[diagram]] in the [[category of presheaves]].

Then

1. The [[limit]] of $F$ exists, and is the [[presheaf]] which over any [[object]] $c \in \mathcal{C}$ is given by the [[limit]] in [[Set]] of the values of the presheaves at $c$:

   $$
     \left(
       \underset{\underset{d \in \mathcal{D}}{\longleftarrow}}{\lim}
       F(d)
     \right)(c)
     \;\simeq\;
     \underset{\underset{d \in \mathcal{D}}{\longleftarrow}}{\lim}
      F(d)(c)
   $$

1. The [[colimit]] of $F$ exists, and is the [[presheaf]] which over any [[object]] $c \in \mathcal{C}$ is given by the [[colimit]] in [[Set]] of the values of the presheaves at $c$:

   $$
     \left(
       \underset{\underset{d \in \mathcal{D}}{\longrightarrow}}{\lim}
       F(d)
     \right)(c)
     \;\simeq\;
     \underset{\underset{d \in \mathcal{D}}{\longrightarrow}}{\lim}
      F(d)(c)
   $$

=--

+-- {: .proof}
###### Proof

This is elementary, but we spell it out in detail.

We discuss the case of limits, the other case is [[formal duality|formally dual]].

Observe that there is a canonical [[equivalence of categories|equivalence]]

$$
  [\mathcal{D}, [\mathcal{C}^{op}, \Set]]
  \simeq
  [\mathcal{D} \times \mathcal{C}^{op}, Set]
$$

where $\mathcal{D} \times \mathcal{C}^{op}$ is the [[product category]].

This makes manifest that a [[functor]] $F \;\colon\; \mathcal{D} \to [\mathcal{C}^{op}, Set]$ is equivalently a [[diagram]] of the form

$$
  \array{
    &&
    \vdots && && \vdots
    \\
    && \big\downarrow && &&  \big\downarrow
    \\
    \cdots &\longrightarrow&
    F(d_1)(c_2)
      && \overset{\phantom{AA}}{\longrightarrow} &&
    F(d_2)(c_2)
      &\longrightarrow&
      \cdots
    \\
    &&
    \big\downarrow && &&  \big\downarrow
    \\
    \cdots
    &\longrightarrow&
    F(d_1)(c_1)
      && \overset{\phantom{AA}}{\longrightarrow} &&
    F(d_2)(c_1)
      &\longrightarrow&
      \cdots
    \\
    &&
    \big\downarrow && && \big\downarrow
    \\
    && \vdots && &&  \vdots
  }
$$

Then observe that taking the limit of each "horizontal row" in such a diagram indead does yield a presheaf on $\mathcal{C}$, in that the construction extends from objects to morphisms, and uniquely so:
This is because for any [[morphism]] $c_1 \overset{g}{\to} c_2$ in $\mathcal{C}$, a [[cone]] over $F(-)(c_2)$ induces a cone over $F(-)(c_1)$, by vertical composition with $F(-)(g)$

$$
  \array{
    &&
    \underset{\underset{d \in \mathcal{D}}{\longleftarrow}}{lim}
    F(d)(c_2)
    \\
    & {}^{ }\swarrow && \searrow
    \\
    F(d_1)(c_2)
      && \overset{\phantom{AA}}{\longrightarrow} &&
    F(d_2)(c_2)
    \\
    {}^{\mathllap{F(d_1)(g)}}\big\downarrow
      && &&
    \big\downarrow^{\mathrlap{F(d_2)(g)}}
    \\
    F(d_1)(c_1)
      && \overset{\phantom{AA}}{\longrightarrow} &&
    F(d_2)(c_1)
  }
$$

From this, the universal property of limits of sets implies that there is a _unique_ morphism between the pointwise limits which constitutes a presheaf over $\mathcal{C}$

$$
  \array{
    \underset{\underset{d \in \mathcal{D}}{\longleftarrow}}{lim}
    F(d)(c_2)
    \\
    \big\downarrow^{\mathrlap{
      \underset{\underset{d \in \mathcal{D}}{\longleftarrow}}{lim}
      F(d)(g)
    }}
    \\
    \underset{\underset{d \in \mathcal{D}}{\longleftarrow}}{lim}
    F(d)(c_1)
  }
$$

and that is the tip of a cone over the diagram $F(-)$ in presheaves.

Hence it remains to see that this cone of presheaves is indeed universal.

Now if $I$ is any other cone over $F$ in the category of presheaves, then by the universal property of the pointswise limits, there is for each $c \in \mathcal{C}$ a unique morphism of cones in sets

$$
  I(c)
    \longrightarrow
    \underset{\underset{d \in \mathcal{D}}{\longleftarrow}}{lim}
   F(d)(c)
   \,.
$$

Hence there is at most one morphisms of cones of presheaves, namely if these components make all their naturality squares commute.

$$
  \array{
    I(c_2)
      &\longrightarrow&
      \underset{\underset{d \in \mathcal{D}}{\longleftarrow}}{lim}
     F(d)(c_2)
     \\
     \big\downarrow && \big\downarrow
     \\
    I(c_1)
      &\longrightarrow&
      \underset{\underset{d \in \mathcal{D}}{\longleftarrow}}{lim}
     F(d)(c_1)
   }
   \,.
$$

But since everything else commutes, the two ways of going around this diagram constitute two morphisms from a cone over $F(-)(c_1)$ to the limit cone over $F(-)(c_1)$, and hence they must be equal, by the universal property of limits.

=--

## Related statements

* [[limits and colimits by example]]

* [[limits preserve limits]]

* [[hom-functor preserves limits]]

* [[adjoints preserve (co-)limits]]

[[!redirects colimits of presheaves are computed objectwise]]

[[!redirects limits of functors are computed objectwise]]


Linas Vepstas

That guy at [linas.org](https://linas.org). Edited math as [User:Linas](https://en.wikipedia.org/wiki/User:Linas) and [anonymous coward](https://en.wikipedia.org/wiki/User_talk:67.198.37.16) in Wikipedia.

category: people

[[!redirects Linas]]