inductive type

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
### Context
#### Deduction and Induction
+-- {: .hide}
[[!include deduction and induction - contents]]
=--
#### Type theory
+-- {: .hide}
[[!include type theory - contents]]
=--
#### Induction
+-- {: .hide}
[[!include induction - contents]]
=--
=--
=--

#Contents#
* table of contents
{:toc}

## Idea

An _inductive type_ is...

In terms of [[categorical semantics]], an _inductive type_ is a type whose interpretation is given by an [[initial algebra of an endofunctor]].

This has the usual meaning in ordinary [[category theory]]. In applications to [[(∞,1)-category theory]], the uniqueness clause in the notion of initial object is modified to allow for a [[contractible space]] of choices (as discussed at _[[initial object in an (∞,1)-category]]_), and this difference is reflected accordingly in the type-theoretic set-up. The [[syntax]] will give back the traditional meaning whenever equality is interpreted [[extensional type theory|extensionally]].

## Definition

There are two _equivalent_ ways of defining the [[judgement]] rules for inductive types. The first describes [[term elimination|elimination]] on [[dependent types]] over the given type. This is the formalization of the notion of [[induction]], and discussed below in

* [Induction: dependent elimination, computation](#InductionRules).

The second describes [[term elimination|elimination]] on absolute types. This is the formalization of the notion of [[recursion]], and discussed below

* [Recursion: elimination, computation](#RecursionRules)

### Induction: dependent elimination, computation
 {#InductionRules}

(...)

### Recursion: elimination, computation
 {#RecursionRules}

(...)

### Categorical semantics
 {#CategoricalSemantics}

We discuss the [[categorical semantics]] of inductive types.

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

The categorical interpretation of [[induction]], hence of the _dependent elimination_ and computation rules from [above](#InductionRules) are the following.

Let $\mathcal{C}$ be the [[ambient category]].

1. **[[term introduction rule]]**

   The interpretation of inductive term introduction is by an [[endofunctor]] $F : \mathcal{C} \to \mathcal{C}$ and an [[algebra over an endofunctor]], exhibited by a [[morphism]] in $\mathcal{C}$ of the form

   $$
     F(W) \to W
     \,.
   $$

1. **[[term elimination rule]]**

   The interpretation of the dependent elimination rule says that given a [[display map]] $B \to W$, where $B$ is given an $F$-[[algebra over an endofunctor|algebra structure]] and the display map is an $F$-algebra [[homomorphism]], the dependent eliminator is interpreted as a specified [[section]] $\sigma : W \to B \in \mathcal{C}_{/W}$, hence as a [[commuting diagram]] of the form

   $$
     \array{
       W
       &&
       \overset{\sigma}{\longrightarrow}
       &&
       B
       \\
       &
       {}_{\mathllap{id}}\searrow
       &&
       \swarrow_{\mathrlap{}}
       \\
       &&
       W
     }
   $$

   in $\mathcal{C}$.

1. **[[computation rule]]**

   The interpretation of the dependent computation rules is that the section $\sigma$ from above is required to be an [[algebra for an endofunctor|algebra]] [[homomorphism]].

=--

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

The categorical interpretation of [[recursion]], hence of the absolute elimination rules from [above](#RecursionRules) in a suitable [[category]] $\mathcal{C}$ is the following

1. **[[term introduction rule]]**

   The interpretation of inductive term introduction is by an [[endofunctor]] $F : \mathcal{C} \to \mathcal{C}$ and an [[algebra over an endofunctor]], exhibited by a [[morphism]] in $\mathcal{C}$ of the form

   $$
     F(W) \to W
     \,.
   $$

1. **[[term elimination rule]]**

   The interpretation of the absolute elimination rule is that for $A$ any other $F$-[[algebra of an endofunctor|algebra]], there is a morphism $W \to A$ in $\mathcal{C}$.

1. **[[computation rule]]**

   The interpretation of the absolute computation rule says that the morphism $W \to A$ from above is an algebra [[homomorphism]] and is unique as such.

In summary this says that the recursion rules are interpreted as an [[initial algebra of an endofunctor]].

=--

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

When interpreted in a category $\mathcal{C}$ of [[homotopy type|homotopy 0-types]] = sets,
definition \ref{InterpretationOfTheRules}
and
definition \ref{InterpretationOfTheSimpleRules}
are indeed equivalent.

=--

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

First suppose that $W$ is an initial $F$-algebra as in def. \ref{InterpretationOfTheSimpleRules}. Then since [[initial object|initiality]] entails first of all the existence of a morphims to any other object it follows that with $B$ another $F$-algebra there is a homomorphism $W \to B$, and since secondly initiality entails uniqueness of this morphism, it follows that given a homomorphism $B \to W$ the composite $W \to B \to W$ has to equal the identity $id_W$, hence that $B \to W$ has a section, and uniquely so.

Conversely, assume that $W$ satisfies definition \ref{InterpretationOfTheRules}.
For $A$ any other $F$-algebra we can form the trivial display map $W \times A \to W$ by [[projection]] and a [[section]] of this is equivalently just a morphism $W \to A$,  so we have a homomorphism from $W$ to any other $F$-algebra $A$. Therefore to show that $W$ is an initial $F$-algebra it remains to show that for $f, g : W \to A$ two algebra homomorphism, they are necessarily equal.

To that end, notice that by the assumption of 0-truncation, the [[diagonal]]  $\delta \colon A \to A \times A$ is a display map / fibration.

Form its [[pullback]] $P$

$$
  \array{
    P & \to & A
    \\
    \downarrow & & \downarrow^\mathrlap{\delta}
    \\
    W & \underset{\langle f, g \rangle}{\to} & A \times A,
  }
  \,,
$$

which is also an algebra homomorphism. Therefore by the interpretation of the elimination rule it has a (specified) [[section]] $\sigma : W \to P$. But $P \to W$ is the pullback of a [[monomorphism]] and therefore itself a monomorphism, and so the section forces it to be in fact an [[isomorphism]]. This in turn means that $f$ and $g$ are equal.

=--

+-- {: .num_remark }
###### Remark

In [[intensional type theory]], where the diagonal is not a display map, we can perform the same argument using a [[path object]] $P A \to A \times A$ (represented in type theory by an [[identity type]]), showing thereby that $f$ and $g$ are homotopic.  A fancier version of this argument enables us to show that the space of algebra maps $W\to A$ is actually contractible. In other words, the axioms for an inductive type still imply that algebra maps out of $W$ are essentially unique, even though the axioms do not state this explicitly.

=--

## Properties

### Homotopy initiality

Any inductive type $W$ is a homotopy initial F-[[algebra over an endofunctor|algebra]]:
the space
of $F$-[[algebra for an endofunctor|algebra]] maps $W \to X$ is
[[contractible]].

[[Awodey, Gambino & Sojakova (2012)](#AwodeyGambinoSojakova12)]

## Examples
 {#Examples}

> In the first examples to follow, the [[computation rules]] are written with ordinary equality signs "=". At least for extensional inductive types these are [[judgemental equalities]].

\linebreak

### Empty type
 {#ExamplesEmptyType}

The inductive [[inference rules]] for the [[empty type]]:

**[[type formation rule]]:**

$$
  \frac{
  }{
    \mathclap{\phantom{\vert^{\vert}}}
    \varnothing \,\colon\, Type
  }
$$

\linebreak

**[[term introduction rule]]:**

$$
\text{--- none ---}
$$

\linebreak

**[[term elimination rule]]:**

$$
  \frac{
    x \,\colon\, \varnothing
    \;\vdash\;\;
    D(x) \,:\, Type
  }{
    \mathclap{\phantom{\vert^{\vert}}}
    ind_{(D)}
    \,\colon\,
    \underset{x \colon \varnothing}{\prod}
    D(x)
  }
$$

\linebreak

**[[computation rule]]:**

$$
\text{--- none ---}
$$

### Unit type
 {#UnitType}

The inductive [[inference rules]] for the [[unit type]]:

**[[type formation rule]]:**

$$
  \frac{
  }{
    \mathclap{\phantom{\vert^{\vert}}}
    \ast \,\colon\, Type
  }
$$

\linebreak

**[[term introduction rule]]:**

$$
  \frac{
  }{
    \mathclap{\phantom{\vert^{\vert}}}
    pt \,\colon\, \ast
  }
$$

\linebreak

**[[term elimination rule]]:**

$$
  \frac{
    x \,\colon\, \ast
    \;\vdash\;\;
    D(x) \,:\, Type
    \;;
    \;\;\;
    pt_D \,\colon\, D(pt)
    \mathclap{\phantom{\vert_{\vert}}}
  }{
    \mathclap{\phantom{\vert^{\vert}}}
    ind_{(D,\,pt_D)}
    \,\colon\,
    \underset{x \colon \ast}{\prod}
    D(x)
  }
$$

\linebreak

**[[computation rule]]:**

$$
  ind_{(D,\,pt_D)}(pt)
  \;=\;
  pt_D
$$

\linebreak

### Booleans
 {#Booleans}

The [[inference rules]] for the type of classical [[truth values]]/[[bits]] (the classical [[boolean domain]]):

\linebreak

**[[type formation rule]]:**

$$
  \frac{
  }{
    Bit \,\colon\, Type
  }
$$

\linebreak

**[[term introduction rule]]:**

$$
  \frac{
  }{
    0 \,\colon\, Bit
  }
  \;\;\;\;\;
  \frac{
  }{
    1 \,\colon\, Bit
  }
$$

\linebreak

**[[term elimination rule]]:**

$$
  \frac{
    b \,\colon\, Bit \;\vdash\; P(b)
    ;\;
    \;\;
    0_P \,\colon\, P(0)
    ;\;
    \;\;
    1_P \,\colon\, P(1)
  }{
    ind_{(P,\,0_P,\,1_P)}
      \,\colon\,
    \underset{b \colon Bit}{\prod} P(b)
  }
$$

\linebreak

**[[computation rules]]:**

$$
  \frac{
    b \,\colon\, Bit \;\vdash\; P(b)
    ;\;
    \;\;
    0_P \,\colon\, P(0)
    ;\;
    \;\;
    1_P \,\colon\, P(1)
  }{
    \begin{array}{l}
    ind_{(P,\,0_P,\,1_P)}(0) \;=\; 0_P
    ;\;
    \\
    ind_{(P,\,0_P,\,1_P)}(1) \;=\; 1_P
    \end{array}
  }
$$

See at *[Boolean domain -- In type theory](boolean+domain#InTypeTheory)*

\linebreak

### Natural numbers
 {#NaturalNumbers}

The inductive [[inference rules]] for the [[natural numbers type]]:

\linebreak

1. **[[type formation rule]]**:

   $$
     \frac{}{
       \mathclap{\phantom{\vert^{\vert}}}
       \mathbb{N} \,\colon\, Type
     }
   $$

2. **[[term introduction rules]]**:

   $$
     \frac{}{
       \mathclap{\phantom{\vert^{\vert}}}
       0 \,\colon\, \mathbb{N}
     }
     \;\;\;\;\;\;\;\;
     \frac{
       n \,\colon\, \mathbb{N}
       \mathclap{\phantom{\vert_{\vert}}}
     }{
       \mathclap{\phantom{\vert^{\vert}}}
       succ(n) \,\colon\, \mathbb{N}
     }
   $$

3. **[[term elimination rule]]**:

   $$
     \frac{
       n \,\colon\, \mathbb{N}
         \;\vdash\;
       P(n) \,\colon\, Type
       \;;
       \;\;\;\;
       \vdash\; 0_P \,\colon\, P(0)
       \;;
       \;\;\;\;
       n \,\colon\, \mathbb{N}
       \,,
       \;
       p \,\colon\, P(x)
         \;\vdash\;
       succ_P(n,\,p) \,\colon\, P\big(succ(n)\big)
       \mathclap{\phantom{\vert_{\vert}}}
     }{
       \mathclap{\phantom{\vert^{\vert}}}
       n \,\colon\, \mathbb{N}
       \;\vdash\;
       ind_{(P, 0_P, succ_P)}(n)
        \,\colon\,
       P(n)
     }
   $$

4. **[[computation rules]]**:

   $$
     \frac{
       n \,\colon\, \mathbb{N}
        \;\vdash\;
       P(n) \,\colon\, Type
       \;;
       \;\;\;\;
         \vdash\;
       0_P \,\colon\, P(0)
       \;;
       \;\;\;\;
       n \,\colon\, \mathbb{N}
       \,,
       \;
       p \,\colon\, P(x)
         \;\vdash\;
       succ_P(n,p) \,\colon\, P\big(succ(n)\big)
       \mathclap{\phantom{\vert_{\vert}}}
     }{
       \mathclap{\phantom{\vert^{\vert}}}
       ind_{(P, 0_P, succ_P)}(0)
        \,=\,
       0_P
     }
   $$

   and

   $$
     \frac{
       n \,\colon\, \mathbb{N}
         \;\vdash\;
       P(x) \,\colon\, Type
       \;;
       \;\;\;\;
       \vdash\; 0_P \,\colon\, P(0)
       \;;
       \;\;\;\;
       n \,\colon\, \mathbb{N}
       \,,
       \;
       p \,\colon\, P(x)
         \;\vdash\;
       succ_P(x,p) \,\colon\, P(s x)
       \;;
       \;\;\;\;
       \vdash\; n \,\colon\, \mathbb{N}
       \mathclap{\phantom{\vert_{\vert}}}
     }{
       \mathclap{\phantom{\vert^{\vert}}}
       ind_{(P, 0_P, succ_P)}\big(succ(n)\big)
       \,=\,
       succ_P\big(n,\, ind_{(P, 0_P, succ_P)}(n) \big)
     }
   $$

\linebreak

### Lists

If $X$ is any set, then the inductive type $L X$ of [[lists]] of elements of $X$ has $|X|+1$ constructors:

* $nil$ of arity zero, and
* $cons(x,-)$ of arity one, for each $x\in X$.

Therefore, $nil$ is a list, $cons(x,\ell)$ is a list for any list $\ell$ and $x\in X$, and all lists are generated in this way.

### Identity types
 {#IdentityTypes}

The introduction, elimination and computation rules for _[[identity types]]_ are discussed there.

In [[Coq]]-[[syntax]] the [[identity types]] are the inductive types (or more precisely, the _[[inductive family]]_) defined by

    Inductive id {A} : A -> A -> Type :=
      idpath : forall x, id x x.

#### Categorical semantics

We may [[categorical semantics|interpret]] identity types in suitable categories $\mathcal{C}$ such as a [[type-theoretic model category]].

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

The [[categorical semantics|categorical interpretation]] of identity types in a category $\mathcal{C}$ is as  the [[initial algebra of an endofunctor|initial algebra]] for the [[endofunctor]]

$$
  F : \mathcal{C}_{/A \times A} \to
  \mathcal{C}_{/A \times A}
$$

of the [[slice category]] $\mathcal{C}_{/A \times A}$ over $A\times A$ which is constant at the [[diagonal]] $A\to A\times A$:

$$
  F (\langle E \to A \times A\rangle) = \langle A \stackrel{\Delta}{\to} A \times A\rangle
  \,.
$$

=--

So an [[algebra for an endofunctor|algebra]] for this endofunctor is a morphism

$$
  \array{
    A &&\to&& E
    \\
    & {}_{\mathllap{\Delta}}\searrow && \swarrow
    \\
    && A \times A
  }
$$

and the [[initial object|initial]] such is the [[path space object]] $A^I \to A \times A$.

#### Path induction
 {#PathInduction}

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

We spell out in detail how the the [[induction principle]] def. \ref{InterpretationOfTheRules} for identity types is the [[principle of substitution of equals for equals]].

To have an $F$-algebra $\langle E \to A\times A\rangle$ over $\langle A^I \to A \times A\rangle$ means precisely to have a diagram

$$
  \array{
    && E
    \\
    & \nearrow& \downarrow
    \\
    A &\to& A^I
    \\
    &\searrow& \downarrow
    \\
    && A \times A
  }
$$

in $\mathcal{C}$.

This is the interpretation of the elimination rule: $E \to A^I$ is the interpretation of a type

$$
  a,b \in A , p : (a = b) \vdash E(a,b,p)
$$

and the lift $A \to E$ is a [[section]] of the [[pullback]] of $E$ to $A$, hence an interpretation of a [[term]] in the [[substitution]]

$$
  s : E(a,a,r_a)
  \,.
$$

The elimination rule then says that this extends to a section $A^I \to E$, hence a "proof of $E$ over all identifications" $a = b$.

=--

#### Path recursion
 {#PathRecursion}

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

We spell out how the the [[recursion principle]] def. \ref{InterpretationOfTheSimpleRules} for [[identity types]] is related to the _[[complete Segal space|Segal-completeness condition]]_ and in particular to _[[univalence]]_.

Notice that an [[algebra for an endofunctor|algebra over the endofunctor]] that defines identity types, example \ref{EndofunctorForIdentityTypes},

$$
  \array{
     X_0 &&\stackrel{\sigma_0}{\to}&& X_1
     \\
     & \searrow && \swarrow_{\mathrlap{\delta_0, \delta_1}}
     \\
     && X_0 \times X_0
  }
$$

constitutes the [[simplicial skeleton|1-skeleton]] of a [[simplicial object]]

$$
  \array{
     X_1
     \\
     {}^{\mathllap{\delta_0}}\downarrow \uparrow^{\mathrlap{\sigma_0}} \downarrow^{\mathrlap{\delta_1}}
     \\
     X_0
  }
  \,.
$$

The [[recursion principle]] says that the [[simplicial identities|degeneracy map]] $\sigma_0$ factors through the [[path space object]] of $X_0$ as a lift $\hat \sigma_0$ in the diagram

$$
  \array{
     X_0 &\stackrel{\sigma_0}{\to}& X_1
     \\
     \downarrow &\nearrow_{\hat \sigma_0}& \downarrow
     \\
     X_0^I &\to& X_0 \times X_0
  }
  \,.
$$

[[categorical semantics|Semantically]], this lift exists because $X_0 \to X_0^I$ is an [[acyclic cofibration]] by definition of [[path space object]], and $X_1 \to X_0 \times X_0$ is a [[fibration]] ([[display map]]) by the interpretation rule for [[dependent types]].

This morphism

$$
  \hat \sigma_0 : X_0^I \to X_1
$$

lifts paths/[[morphisms]] that exist in $X_0$ to the morphisms exhibited by $X_1$, if we think of the above as the 1-skeleton of a simplicial object that represents an [[internal category in an (infinity,1)-category]].

Suppose this exists, then there will be a notion of _equivalences_ in $X_1$, those morphisms that are invertible with respect to the given composition operation. In good situations this will give the [[core]] inclusion

$$
  Core(X_1) \hookrightarrow X_1
  \,.
$$

In this case the [[complete Segal space|Segal-completeness condition]] in degree 1 says that the path recursion $\hat \sigma_0$ exhibits this inclusion

$$
  \hat \sigma_0 : X_0^I \simeq Core(X_1) \to X_1
  \,.
$$

In the case that $X_\bullet$ is the classifier of the [[codomain fibration]], then this is called the _[[univalence]]-condition_.

=--

### W-types

* [[W-type]]

## Related concepts

* [[initial algebra of an endofunctor]]

* [[inductive-inductive type]]

* [[inductive family]]

* [[positive type]], [[negative type]]

* [[higher inductive type]], [[initial algebra of a presentable ∞-monad]]

* [[coinductive type]]

## References
 {#References}

[[!include history of inductive types -- references]]

### Introduction and review

Textbook accounts:

* [[Simon Thompson]], §4.10 in: *[[Type Theory and Functional Programming]]*, Addison-Wesley (1991) [ISBN:0-201-41667-0, [webpage](http://www.cs.kent.ac.uk/people/staff/sjt/TTFP), [pdf](http://www.cs.kent.ac.uk/people/staff/sjt/TTFP/ttfp.pdf)]

* [[Adam Chlipala]], §3 of: _Certified programming with dependent types_, MIT Press 2013 [[ISBN:9780262026659 ](https://mitpress.mit.edu/books/certified-programming-dependent-types), [pdf](http://adam.chlipala.net/cpdt/cpdt.pdf),  [book webpage](http://adam.chlipala.net/cpdt/)]

  > (discussion for the *[[Coq]]* [[proof assistant]])

* [[Robert Harper]], §15 in: _[[Practical Foundations for Programming Languages]]_, Cambridge University Press (2016) [[ISBN:9781107150300](http://www.cambridge.org/us/academic/subjects/computer-science/programming-languages-and-applied-logic/practical-foundations-programming-languages-2nd-edition?format=HB), [pdf](https://www.cs.cmu.edu/~rwh/pfpl/2nded.pdf)]

See also:

* Wikipedia, *[Inductive types](https://en.wikipedia.org/wiki/Inductive_type)*

Exposition with an eye towards explaining [[identity types]] in [[Martin-Löf type theory]]/[[homotopy type theory]]:

* [[Mike Shulman]], _Induction on equality_ (2011) [[pdf](http://home.sandiego.edu/~shulman/papers/induction.pdf), [[Shulman-Induction.pdf:file]]]

Formalization in [[proof assistants]]:

in [[Coq]]:

* Eduardo Giménez, Pierre Castéran, _A Tutorial on [Co-]Inductive Types in Coq_ (1998, 2005) [[pdf](http://flint.cs.yale.edu/cs428/coq/pdf/RecTutorial.pdf), [[GimenezCasteran-InductiveTypes.pdf:file]]]

in [[Lean]]:

* [Inductive types](https://leanprover.github.io/theorem_proving_in_lean/inductive_types.html), §7 in: *[Theorem Proving in Lean](https://leanprover.github.io/theorem_proving_in_lean/index.html)*

On inductive types in the context of [[linear type theory]]:

* Stéphane Gimenez, _Towards Generic Inductive Constructions in Systems of Nets_ [[pdf](https://www.imn.htwk-leipzig.de/~waldmann/WST2013/papers/paper_16.pdf)]

Expositions with an eye towards [[higher inductive types]]:

* [[Mike Shulman]], _Homotopy type theory IV_ ([web](http://golem.ph.utexas.edu/category/2011/04/homotopy_type_theory_vi.html))

* [[Peter LeFanu Lumsdaine]], _Higher inductive types, a tour of the menagerie_ ([blog post](http://homotopytypetheory.org/2011/04/24/higher-inductive-types-a-tour-of-the-menagerie/))

* [[Mike Shulman]], _Inductive and higher inductive types_, talk slides (2012) ([pdf](http://www.sandiego.edu/~shulman/hottminicourse2012/04induction.pdf))

Discussion of homotopy-initiality of inductive types in [[homotopy type theory]] (cf. also at *[[higher inductive type]]*):

* {#AwodeyGambinoSojakova12} [[Steve Awodey]], [[Nicola Gambino]], [[Kristina Sojakova]], *Inductive types in homotopy type theory*, LICS'12: (2012) 95–104 [[arXiv:1201.3898](http://arxiv.org/abs/1201.3898), [doi:10.1109/LICS.2012.21](https://doi.org/10.1109/LICS.2012.21), [Coq code](https://github.com/HoTT/HoTT/tree/master/Coq/IT)]

  \linebreak

  Exposition:

  [[Steve Awodey]], *Inductive types in HoTT* (Jan 2012) [[blog post](http://homotopytypetheory.org/2012/01/19/inductive-types-in-hott/)]

[[!include semantics of W-types -- references]]

[[!redirects inductive type]]
[[!redirects inductive types]]
[[!redirects inducive type]]


inductive-inductive type

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
### Context
#### Deduction and Induction
+-- {: .hide}
[[!include deduction and induction - contents]]
=--
#### Type theory
+-- {: .hide}
[[!include type theory - contents]]
=--
#### Induction
+-- {: .hide}
[[!include induction - contents]]
=--
=--
=--

#Contents#
* table of contents
{:toc}

## Idea ##

In [[type theory]], _induction-induction_ is a principle for mutually defining [[types]] of the form

$$
  A \colon Type\,,\;\;\; and \;\;\; B \colon A \to Type
  \,,
$$

where both $A$ and $B$ are [[inductive types|defined inductively]], such that the constructors for $A$ can refer to $B$ and vice versa. In addition, the constructor for $B$ can refer to the constructor for $A$.

Such induction-induction occurs for instance when formalising [[dependent type theory]] in [[type theory]].

## Results ##

Inductive-inductive types are related to [[inductive-recursive types]]. Importantly, inductive-inductive types have an initial algebra semantics with respect to [[dialgebras]]. In [Forsberg's thesis](#ForsbergThesis) inductive-inductive types are reduced to [[indexed inductive types]] in the setting of extensional type theory. This reduction however only provides "simple" elimination rules (not to be confused with _simply typed_). Indexed inductive types in turn can be reduced to [[W-types]] in extensional type theory. See [[inductive families]].

The consistency of the framework used for the elimination (e.g. in the [[theorem prover]] [[Agda]]) is not so clear, as it allows the definition of a universe containing a code for itself. There is an axiomatisation of the new principle in such a way that the resulting type theory is consistent, as proved by constructing a set-theoretic model; see [Forsberg-Setzer 10](#ForsbergSetzer10).

[Hugunin](#Hugunin19) provides a reduction of an inductive-inductive type to an inductive type. This construction is conjectured to generalize to all inductive-inductive types. The construction is done in [[cubical type theory]] and hence is consistent with [[homotopy type theory]].

## Higher inductive inductive types ##

Experiments with higher inductive inductive types (elaborate versions of [[higher inductive types]]) are sections 11.3 "Cauchy reals" and section 11.6 "Conway surreals"  of the [HoTT book](#HoTTBook) (cf. the *[[HoTT book real numbers]]*). As they are at the set level, these are instances of [[quotient inductive type|quotient inductive-inductive types]]; see [QIIT](#QIIT). An experimental syntax for HIITs by [Kaposi and Kovacs](#KaposiKovacs).

Another example of a higher inductive-inductive type is a [[univalent Tarski universe]], where the where a type $U$ is defined inductively together with a [[type family]] $a:U \vdash T(a) \; \mathrm{type}$ and has constructors

* an element $h(a, b, f):\mathrm{fiber}(\mathrm{transport}^T(a, b), f)$ for all $a:U$, $b:U$, $f:T(a) \simeq T(b)$
* an identity $\mathrm{ua}(a, b, f, c):c =_{\mathrm{fiber}(\mathrm{transport}^T(a, b), f} h(a, b, f)$ for all $a:U$, $b:U$, $f:T(a) \simeq T(b)$ and $c:\mathrm{fiber}(\mathrm{transport}^T(a, b), f)$

where $\mathrm{transport}^T(a, b):(a =_U b) \to (T(a) \simeq T(b))$ is the [[transport]] function for all $a:U$ and $b:U$ and
$$\mathrm{fiber}(\mathrm{transport}^T(a, b), f) \coloneqq \sum_{p:a =_U b} \mathrm{transport}^T(a, b)(p) =_{T(a) \simeq T(b)} f$$

This means that $h(a, b, f)$ is the [[center of contraction]] of the fiber of transport across $T$ at the equivalence $f:T(a) \simeq T(b)$.

## References

### Plain inductive-inductive types

* [[Andrej Bauer]], _[What is induction-induction?](http://cs.stackexchange.com/q/64139)_

* [[Fredrik Nordvall Forsberg]], [[Anton Setzer]], _A finite axiomatisation of inductive-inductive definitions_ [PDF](http://cs.swan.ac.uk/~csfnf/papers/indind_finite.pdf)

* {#ForsbergSetzer10} [[Fredrik Nordvall Forsberg]], [[Anton Setzer]], _Inductive-Inductive Definitions_, Computer Science Logic, Lecture Notes in Computer Science Volume 6247, 2010, pp 454-468 [Paper](http://link.springer.com/chapter/10.1007%2F978-3-642-15205-4_35).

* {#ForsbergThesis}[[Fredrik Nordvall Forsberg]], _Inductive-inductive definitions_, PhD thesis
Swansea University, 2013.  [PDF](http://cs.swan.ac.uk/~csfnf/thesis/thesis.pdf)

* {#cat} [[Thorsten Altenkirch]], Peter Morris, [[Fredrik Nordvall Forsberg]], [[Anton Setzer]],  _A Categorical Semantics for Inductive-Inductive Definitions_, CALCO, 2011 [link](https://link.springer.com/chapter/10.1007%2F978-3-642-22944-2_6)

* {#QIIT}  [[Thorsten Altenkirch]], [[Paolo Capriotti]], [[Gabe Dijkstra]], [[Fredrik Nordvall Forsberg]], _Quotient inductive-inductive types_ [[arXiv:1612.02346](https://arxiv.org/abs/1612.02346)]

* [[Marcelo P. Fiore]], [[Andrew M. Pitts]], [[S. C. Steenkamp]], *Quotients, inductive types, and quotient inductive types*, Logical Methods in Computer Science **18** 2 (2022) lmcs:7076  [[arXiv:2101.02994](https://arxiv.org/abs/2101.02994), doi:10.46298/lmcs-18(2:15)2022]

### Higher inductive-inductive types:

For the example of constructing the [[real numbers]] (cf. *[[HoTT book real number]]*)

* {#HoTTBook} [[Univalent Foundations Project]], section 11 of: _[[Homotopy Type Theory -- Univalent Foundations of Mathematics]]_ (2013)

Approaches to a general definition:

* {#KaposiKovacs} [[Ambrus Kaposi]], [[András Kovács]], *A Syntax for Higher Inductive-Inductive Types*, at *3rd International Conference on Formal Structures for Computation and Deduction (FSCD 2018)* (2018) 20:1-20:18 [[pdf](http://drops.dagstuhl.de/opus/volltexte/2018/9190/), [doi:10.4230/LIPIcs.FSCD.2018.20](https://doi.org/10.4230/LIPIcs.FSCD.2018.20)]

* [[Ambrus Kaposi]], [[András Kovács]], *Signatures and Induction Principles for Higher Inductive-Inductive Types*, Logical Methods in Computer Science **16** 1 (2020) lmcs:6100 [[arXiv:1902.00297](https://arxiv.org/abs/1902.00297), doi:10.23638/LMCS-16(1:10)2020]

Discussion of examples in [[cubical type theory]] ([[cubical Agda]]):

* {#Hugunin19} [[Jasper Hugunin]], _Constructing Inductive-Inductive Types in Cubical Type Theory_, in *Foundations of Software Science and Computation Structures. FoSSaCS 2019*, Lecture Notes in Computer Science **11425** (2019) [[doi:10.1007/978-3-030-17127-8_17](https://link.springer.com/chapter/10.1007/978-3-030-17127-8_17)]

[[!redirects Inductive Inductive Type]]
[[!redirects induction-induction]]
[[!redirects inductive-inductive types]]

[[!redirects higher inductive-inductive type]]
[[!redirects higher inductive-inductive types]]


inductive-recursive type

[[!redirects inductive-recursive types]]

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
### Context
#### Deduction and Induction
+-- {: .hide}
[[!include deduction and induction - contents]]
=--
#### Type theory
+-- {: .hide}
[[!include type theory - contents]]
=--
#### Induction
+-- {: .hide}
[[!include induction - contents]]
=--
=--
=--

#Contents#
* table of contents
{:toc}

## Idea ##

In [[type theory]], _induction-recursion_ is a principle for mutually defining [[types]] of the form

$$A \; \mathrm{type} \qquad a:A \vdash B(a) \; \mathrm{type}$$

where $A$ is defined as an [[inductive type]] and $B$ is defined by [[recursion]] on $A$. Crucially, the definition of $A$ may use $B$. Without this last requirement, we could first define $A$ and then separately $B$.

In type theory, **higher induction-reduction** is the principle that one could also have identity constructors and identity section constructors in addition to the element and section constructors.

## Example

A [[Tarski universe]] is an example of an inductive-recursive definition, where a type $U$ is defined inductively together with a [[type family]] $a:U \vdash T(a) \; \mathrm{type}$. The constructors for $U$ may depend negatively on $T$ applied to elements of $U$. This is the case if $U$, for example, is closed under [[dependent product types]], where it has constructors of

* a [[dependent type]] $\Pi(a, b):U$ for each $a:U$ and $b:T(a) \to U$,
* a [[function]] $E_\Pi(a, b):\left(\prod_{x:T(a)} T(b(x))\right) \to T(\Pi(a, b))$ for each $a:U$ and $b:T(a) \to U$.

If the Tarski universe is strictly closed under dependent product types, then the last condition is replaced by

* a [[judgmental equality]] $T(\Pi(a, b)) \equiv \prod_{x:T(a)} T(b(x))$ for each $a:U$ and $b:T(a) \to U$.

Here, the type family $T$ is defined recursively. Sometimes, however, one might
not want to give $T(u)$ completely as soon as $u:U$ is introduced, but instead
define $T$ inductively as well. This is the principle of [[induction-induction]].

##Related concepts

* [[inductive-inductive type]]

* [[algebraically compact category]]

## References

[[!include history of inductive types -- references]]

### Further development

(...)

[[!redirects induction-recursion]]


inelastic scattering

## References

See also:

* Wikipedia, _[Inelastic scattering](https://en.m.wikipedia.org/wiki/Inelastic_scattering)_


inequality

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
### Context
#### Relations
+-- {: .hide}
[[!include relations - contents]]
=--
#### Constructivism
+-- {: .hide}
[[!include constructivism - contents]]
=--
=--
=--

\tableofcontents

## Idea

The *common* meaning of "an inequality" in [[mathematics]] is the statement that a given [[pair]] of expressions, $x, y$, with values in some [[strictly totally ordered]] [[set]] of [[numbers]] (such as [[natural number|natural]], [[rational numbers|rational]] or [[real numbers]]) are in ordered [[relation]] to each other, such as

$$
  x \lt y
$$

or

$$
  x \gt y
  \mathrlap{\,.}
$$

This is in contrast to the statement of their *[[equality]]*, expressed by an *[[equation]]*

$$
  x = y
  \mathrlap{\,,}
$$

whence the terminology. But, of course, there are other ways in which a pair of expressions can be "in-equal"; see at *[Inequality relations](#InequalityRelations)* below.

On the other hand, in practice one also calls the non-strict [[total order]]

$$
  x \leq y
$$

an "inequality". Many famous inequalities are of this form (starting with the [[triangle inequality]]), often accompanied with statement of conditions when exactly the actual [[equality]] holds.

## Examples
 {#Examples}

* [[triangle inequality]]

* [[Minkowski's inequality]]

* [[Cauchy-Schwarz inequality]]

* [[Young's inequality]]

* [[Hölder's inequality]]

* [[Cramer-Rao inequality]]

* [[Grothendieck's inequality]]

* [[Bell's inequality]]

## Inequality relations
 {#InequalityRelations}

More generally, inequality may just be the statement that a pair of [[terms]] of any [[type]] are *[[negation|not]] [[equality|equal]]*.

In  the [[foundations of mathematics]], sometimes one talks about a particular [[relation]] called the *inequality relation*.

In [[classical mathematics]], the *inequality relation* is defined as the [[negation]] ($\not$) of [[equality]] ($=$). However, in [[constructive mathematics]], due to the lack of [[excluded middle]], there are multiple different notions of inequality relation. The two most commonly used notions are the [[denial inequality relation]] and the [[tight apartness relation]], the latter of which is used to define [[inequality spaces]]. Other relations which have been called "inequality relation" in the constructive mathematics literature are listed in [[irreflexive symmetric relation#ConstructiveMathematics]].

## See also

* [[equality]], [[equation]]

* [[denial inequality]]

* [[inequality space]]

## References

See also:

* Wikipedia, *Inequality (mathematics)*

[[!redirects inequality]]
[[!redirects inequalities]]

[[!redirects tight inequality]]
[[!redirects tight inequalities]]

[[!redirects inequality relation]]
[[!redirects inequality relations]]

[[!redirects tight inequality relation]]
[[!redirects tight inequality relations]]


inequality space

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
### Context
#### $(0,1)$-Category theory
+-- {: .hide}
[[!include (0,1)-category theory - contents]]
=--
#### Relations
+-- {: .hide}
[[!include relations - contents]]
=--
#### Foundations
+-- {: .hide}
[[!include foundations - contents]]
=--
#### Constructivism, Realizability, Computability
+-- {: .hide}
[[!include constructivism - contents]]
=--
=--
=--

\tableofcontents

## Idea

A **strict [[inequality relation]]** or **tight apartness relation** $\#$ is an [[apartness relation]] which is also a [[tight relation]]. An **inequality space** is a set with a strict inequality relation. Strict inequalities are contrasted with [[weak inequality]] or [[denial inequality]], which is the [[negation]] of [[equality]]. In the context of [[excluded middle]], every weak inequality is a strict inequality relation, so one simply talks about "inequality".

## Definition

### In set theory

In [[set theory]], an **inequality space** is a [[set]] $S$ with a [[binary relation]] $\#$ such that

* for all $a \in S$, $\neg(a \# a)$
* for all $a \in S$ and $b \in S$, $a \# b$ implies $b \# a$
* for all $a \in S$, $b \in S$, and $c \in S$, $a \# c$ implies that either $a \# b$ or $b \# c$
* for all $a \in S$ and $b \in S$, $a = b$ if and only if $\neg(a \# b)$

### In dependent type theory

In [[dependent type theory]], an **inequality space** is a type $T$ with

* a type family $a:T, b:T \vdash a \# b \; \mathrm{type}$
* a family of terms $a:T, b:T \vdash \mathrm{proptrunc}(a, b):\mathrm{isProp}(a \# b)$
* a family of terms $a:T \vdash \mathrm{irr}(a):(a \# a) \to \mathbb{0}$
* a family of terms $a:T, b:T \vdash \mathrm{sym}(a, b):(a \# b) \to (b \# a)$
* a family of terms $a:T, b:T, c:T \vdash \mathrm{com}(a, b, c):(a \# c) \to \left[(a \# b) + (b \# c)\right]$
* a family of terms $a:T, b:T \vdash \mathrm{tight}(a, b):\mathrm{isEquiv}(\mathrm{idtonotapart}(a, b))$

where $a:T, b:T \vdash \mathrm{idtonotapart}(a, b):(a =_T b) \to ((a \# b) \to \mathbb{0})$ is inductively defined by

$$a:T \vdash \beta_{\mathrm{idtonotapart}}^{\mathrm{refl}_T}(a):\mathrm{idtonotapart}(a, a)(\mathrm{refl}_T(a)) =_{(a \# a) \to \mathbb{0}} \mathrm{irr}(a)$$

The last condition ensures that the type is an [[h-set]].

## Properties

### Strongly extensional functions

Given two inequality spaces $S$ and $T$, a [[function]] $f\colon S \to T$ is __[[strongly extensional function|strongly extensional]]__ if $f(x) \# f(y)$ implies $x \# y$; that is, $f$ reflects apartness. $f$ is a [[strongly injective function|strongly injective]] if $f(x) \# f(y)$ is logically equivalent to $x \# y$. The [[contrapositive]] of the both conditions imply that $f$ preserves equality and is an [[injection]] respectively.

### Stable and decidable inequality

Strict inequality is stable if it is logical equivalent to [[denial inequality]]; i.e. for all elements $a \in S$ and $b \in S$, $a \neq b$ if and only if $a \# b$. Stable strict inequality is simply called "inequality", as there is no need to distinguish between strict inequality and [[denial inequality]] in this case.

Strict inequality is decidable if for all elements $a \in S$ and $b \in S$, $a \# b$ or $a = b$. Decidable strict inequality implies stable strict inequality, so it is usually called decidable inequality. In the context of [[excluded middle]], every strict inequality relation is decidable.

## The category of inequality spaces

In the category of inequality spaces, [[monomorphisms]] between inequality spaces are strongly extensional functions that preserve strict inequality, or strong [[injections]]. These monomorphisms are [[regular monomorphisms]]. The category of inequality spaces has all (small) [[limits]], [[created limit|created]] by the [[forgetful functor]] to [[Set]]. (For example, $(a,b) \# (x,y)$ iff $a \# x$ or $b \# y$.) Similarly, it has all finite [[coproducts]], and it has [[quotient object|quotients]] of [[equivalence relations]]. In fact, this category is a [[complete category|complete]] [[pretopos]]. It is *not*, however, a [[Grothendieck topos]] (or even a [[topos]] at all), because it doesn\'t have all infinite coproducts. (To be precise, the statement that it has all small coproducts, or even that it has a subobject classifier, seems to be equivalent to excluded middle.)

We can say, however, that it has coproducts indexed by inequality spaces, although to make this precise is a triviality. More interestingly, it has products indexed by inequality spaces; that is, it is (even [[locally cartesian closed category|locally]]) a [[cartesian closed category]]. In particular, given inequality spaces $X$ and $Y$, the set $\StrExt(X,Y)$ of strongly extensional functions from $X$ to $Y$ becomes an inequality space under the rule that $f \# g$ iff $f(x) \# g(x)$ for some $x\colon X$.

## Foundational status

### In set theory

In [[classical mathematics]], it is true that every [[set]] is an [[inequality space]]. In [[constructive mathematics]], however, not all sets are inequality spaces. Instead, one can add an axiom to the [[foundations of mathematics]] which states that every set is an inequality space.

**Axiom of inequality spaces**: Every set has a strict inequality relation.

Alternatively, one could take the strict inequality to be foundational, in which the [[axiom of extensionality]] becomes

**[[axiom of extensionality|Axiom of extensionality]]**: for any set $x$ and $y$, $\neg(x \# y)$ if and only if for all $z$, $z \in x$ if and only if $z \in y$.

### In dependent type theory

In [[dependent type theory]], one can make every type into an inequality space by adding the following set of rules to the type theory:

$$\frac{\Gamma \vdash A \; \mathrm{type}}{\Gamma, a:A, b:A \vdash a \# b \; \mathrm{type}} \quad \frac{\Gamma \vdash A \; \mathrm{type}}{\Gamma, a:A, b:A \vdash \mathrm{proptrunc}(a, b):\mathrm{isProp}(a \# b)}$$
$$\frac{\Gamma \vdash A \; \mathrm{type}}{\Gamma, a:A \vdash \mathrm{irr}(a):(a \# a) \to \mathbb{0}} \quad \frac{\Gamma \vdash A \; \mathrm{type}}{\Gamma, a:A, b:A \vdash \mathrm{sym}(a, b):(a \# b) \to (b \# a)}$$
$$\frac{\Gamma \vdash A \; \mathrm{type}}{\Gamma, a:A, b:A, c:A \vdash \mathrm{comp}(a, b, c):(a \# c) \to \left[(a \# b) + (b \# c)\right]}$$
$$\frac{\Gamma \vdash A \; \mathrm{type}}{\Gamma, a:A, b:A \vdash \mathrm{idtonotapart}(a, b):(a =_A b) \to ((a \# b) \to \mathbb{0})}$$
$$\frac{\Gamma \vdash A \; \mathrm{type}}{\Gamma, a:A \vdash \mathrm{idtonotapart}(a, a)(\mathrm{refl}_A(a)) \equiv \mathrm{irr}(a):(a \# a) \to \mathbb{0}}$$
$$\frac{\Gamma \vdash A \; \mathrm{type}}{\Gamma, a:A, b:A \vdash \mathrm{tight}(a, b):\mathrm{isEquiv}(\mathrm{idtonotapart}(a, b))}$$

This implies [[axiom K]] and [[uniqueness of identity proofs]].

## In algebra

Since inequality spaces have finite limits, the usual constructions of [[universal algebra]] apply; it\'s straightforward to define inequality [[groups]], inequality [[rings]], and so on.

The various subsets that appear in algebra (such as [[subgroups]], [[ideals]], and [[cosets]]) become less fundamental than certain subsets that are, classically, simply their complements. For example, a left ideal in a ring $R$ is a subset $I$ such that $0 \in I$, $x + y \in I$ whenever $x, y \in I$, and $x y \in I$ whenever $x \in I$. But a left _[[antiideal]]_ in an inequality ring $R$ is an $\#$-open subset $A$ such that $0 \in A$ is false, $x \in A$ or $y \in A$ whenever $x + y \in A$, and $x \in A$ whenever $x y \in A$.  (The $\#$-openness requirement is automatic if $\neg(0\in A)$ is strengthened to $p\# 0$ for all $p\in A$, using that the ring operations are strongly extensional.)  Note that the complement of an antiideal is an ideal, but not every ideal can be constructively shown to be the complement of an antiideal; so antiideals are more fundamental than ideals, in an inequality ring.

[[prime ideal|Prime ideals]] are even more interesting. A two-sided antiideal $A$ (so also satisfying that $y \in A$ whenever $x y \in A$) is _antiprime_ (or simply _prime_ if no confusion is expected) if $1 \in A$ and $x y \in A$ whenever $x, y \in A$. Now the complement of an antiprime antiideal may *not* be a prime ideal (as normally defined). But in fact, it is antiprime antiideals that are more important in constructive algebra. In particular, an [[integral domain]] in constructive algebra is an inequality ring in which the antiideal of nonzero elements is antiprime.

Any [[apartness relation]] on an inequality space $X$ is the same as the (strongly) [[closed subspace|closed]] [[equivalence relation]] on the discrete locale $X$. This localic perspective on [[apartness relations]] extends naturally to anti-algebra: an antiideal is the same as a *closed* ideal in a discrete localic ring that respects the closed equivalence relation corresponding to $\#$. Equivalently, this is a closed ideal of the $\#$-topology regarded as a (non-discrete) localic ring.  The spatial part of this closed localic ideal is then the ordinary ideal complementary to the antiideal, and so on.  Moreover, since unions of closed sublocales correspond to intersections of their open complements, an antiideal $A$ is antiprime exactly when its corresponding closed localic ideal $\mathsf{C}A$ is "prime" in an appropriate internal sense in [[Loc]], namely that $m^*(\mathsf{C}A) \subseteq (\mathsf{C}A \times R) \cup (R\times \mathsf{C}A)$, where $m:R\times R\to R$ is the multiplication.  The fact that the complement of an antiprime antiideal need not be prime in the usual sense corresponds to the fact that taking the spatial part of sublocales doesn't commute with unions.

For more about apartness algebra, see [[antisubalgebra]].

## Related concepts

* [[denial inequality]]

* [[strict total order]]

## References

* {#TvD} Anne Troelstra\'s and Dirk van Dalen\'s _Constructivism in Mathematics_ (1988) uses  "preapartness" and "apartness" instead of "apartness" and "strict inequality"/"tight apartness" respectively.

[[!redirects tight apartness]]
[[!redirects tight apartnesses]]
[[!redirects tight apartness structure]]
[[!redirects tight apartness structures]]
[[!redirects tight apartness relation]]
[[!redirects tight apartness relations]]

[[!redirects connected apartness]]
[[!redirects connected apartnesses]]
[[!redirects connected apartness structure]]
[[!redirects connected apartness structures]]
[[!redirects connected apartness relation]]
[[!redirects connected apartness relations]]

[[!redirects strict inequality]]
[[!redirects strict inequalities]]
[[!redirects strict inequality structure]]
[[!redirects strict inequality structures]]
[[!redirects strict inequality relation]]
[[!redirects strict inequality relations]]

[[!redirects stable inequality]]
[[!redirects stable inequalities]]
[[!redirects stable inequality structure]]
[[!redirects stable inequality structures]]
[[!redirects stable inequality relation]]
[[!redirects stable inequality relations]]

[[!redirects decidable inequality]]
[[!redirects decidable inequalities]]
[[!redirects decidable inequality structure]]
[[!redirects decidable inequality structures]]
[[!redirects decidable inequality relation]]
[[!redirects decidable inequality relations]]

[[!redirects inequality spaces]]

[[!redirects axiom of inequality space]]
[[!redirects axiom of inequality spaces]]


inert morphism

#Contents#
* table of contents
{:toc}

## Definition

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

A morphism in $FinSet^{*/}$ is called an
**[[inert morphism]]** if it is surjective and an [[injection]] on those elements that are not sent to the base point.

A morphism in $FinSet^{*/}$ is called an **[[active morphism]]** if only the basepoint goes to the basepoint.

=--

([Lurie, def. 2.1.1.8, def. 2.1.2.1](#Lurie)).

See at _[[(infinity,1)-operad]]_

## Properties

### Factorization system

$(Inert, Active)$ is an [[orthogonal factorization system]] on $FinSet^{*/}$.

([Lurie, remark 2.1.2.2](#Lurie))

[[!redirects inert morphisms]]

[[!redirects active morphism]]
[[!redirects active morphisms]]


inertia orbifold

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
###Context###
#### Higher Geometry
+--{: .hide}
[[!include higher geometry - contents]]
=--
#### Mapping space
+--{: .hide}
[[!include mapping space - contents]]
=--
=--
=--

#Contents#
* table of contents
{:toc}

## Idea

_Inertia orbifold_ is a particular model for the [[free loop space object]] of an [[orbifold]] $X$ (or plain [[groupoid]] or [[smooth groupoid]]/[[stack]] etc.): the [[smooth groupoid]] whose [[objects]] are [[automorphisms]] in $X$ and whose [[morphisms]] are [[conjugation]] of automorphisms by morphisms in $X$. In fact for each fibered category one can construct another fibered category, its inertia and the inertia stacks are a special case of this construction.

## Definition
 {#Definition}

### For bare groupoids

\begin{definition}\label{InertiaGroupoid}
**(inertia groupoid)** \linebreak
Given a [[groupoid]] $\mathcal{G} \coloneqq (\mathcal{G}_1 \rightrightarrows \mathcal{G}_0)$ ([[internal groupoid|internal to]] [[Sets]]) with

* set of [[objects]] $\mathcal{G}_0$

* set of [[morphisms]] $\mathcal{G}_1$,

one defines its __inertia groupoid__ $\Lambda \mathcal{G}$ as the groupoid whose

* set of objects is the set of [[automorphisms]] in $\mathcal{G}$, i.e. the [[equalizer]] of the [[source]] and [[target]] maps $s,t \colon G_1\to G_0$:

  $$
    (\Lambda \mathcal{G})_0
    \;\coloneqq\;
    \underset{x \in \mathcal{G}_0}{\coprod}
    Aut_{\mathcal{G}}(x)
  $$

* whose [[hom-set]] from $f \colon a \to a$ to $g\colon b \to b$ consists of the [[commutative squares]] with the same vertical maps of the form

$$
  \array{
    a
      &\stackrel{f}{\longrightarrow}&
    a
    \\
    {}^{\mathllap{u}}
    \big\downarrow
      &&
    \big\downarrow {}^{\mathrlap{u}}
    \\
    b
    &\stackrel{g}{\longrightarrow}&
    b
  }
$$

i.e. of the morphisms $u \colon a\to b$ in $\mathcal{G}_1$ such that $u^{-1}\circ g\circ u = f$.
\end{definition}

\begin{proposition}
The inertia groupoid (Def. \ref{InertiaGroupoid}) is [[equivalence of categories|equivalent]] (in fact [[isomorphism|isomorphic]] as [[groupoid objects]]) to the [[functor groupoid]]

$$
  \Lambda \mathcal{G}
  \;\simeq\;
  \big[
    \mathbf{B}\mathbb{Z}, \mathcal{G}
  \big]
  \,,
$$

where

$$
  \mathbf{B}\mathbb{Z}
  \;\coloneqq\;
  \big(
    \mathbb{Z} \rightrightarrows \ast
  \big)
$$

denotes the [[delooping groupoid]] of the additive group of [[integers]], i.e. the [[free construction|free]] groupoid on a single object with a single [[automorphism]].
\end{proposition}

\begin{proposition}
The inertia groupoid (Def. \ref{InertiaGroupoid}) is also [[equivalence of categories|equivalent]] to the [[free loop space object]] of $\mathcal{G}$ in the [[(2,1)-category]] of groupoids.

$$
  \Lambda \mathcal{G}
  \;\simeq\;
  \mathcal{L} \mathcal{G}
  \;\coloneqq\;
  \mathcal{G} \times^h_{\mathcal{G} \times \mathcal{G}} \mathcal{G}
  \,.
$$

\end{proposition}

### For internal groupoids

The same construction can be performed for [[groupoid objects]] [[internalization|internal]] to any [[finitely complete category]], or more generally whenever the relevant [[limits]] exist.

### For orbifolds

If a ([[differentiable stack|differential]], [[topological stack|topological]] or [[algebraic stack|algebraic]]) stack (or, in particular, an [[orbifold]]) is represented by a groupoid, then the inertia groupoid of that groupoid represents its [[inertia stack]].  In particular, an [[orbifold]] corresponds to a [[Morita equivalence]] [[equivalence class|class]] of a proper [[étale groupoid]]. The inertia groupoid $\Lambda G$ of $G$ is the Morita equivalence class of the (proper étale) [[action groupoid]] for the [[conjugation action]] of $\mathcal{G}_1$ on the subspace $S\subset G_1$ of closed loops.

\begin{remark}\label{DifferentNotionsOfLoopOrbifolds}
**(different notions of loop orbifolds)** \linebreak
For the case of [[orbifolds]], the [[cohesion]] of the loops leads to a distinction between various in-equivalent notions of "[[free loop spaces]]" of orbifolds:

Let:

* $\mathcal{X} \,\in\, SmoothGroupoids_\infty$ be an [[orbifold]], regarded as a [[smooth groupoid]], regarded as a [[differentiable stack]].

* $S^1 \,\in\, SmoothManifolds \hookrightarrow SmoothGroupoids_\infty$ be the [[circle]] with its standard [[cohesion|cohesive]] structure as a [[smooth manifold]], and hence as a [[differentiable stack]].

  Notice that the [[shape modality|shape]] of $S^1$ (in the [[cohesive (infinity,1)-topos|cohesive]]) [[(2,1)-topos]] of [[smooth ∞-groupoids]] is the [[delooping groupoid]] of the [[integers]], regarded as a [[discrete object|discrete]] smooth groupoid

  $$
    ʃS^1
    \;\simeq\;
    \mathbf{B}\mathbb{Z}
    \;\;\;
    \in
    Groupoids
    \xrightarrow{ \; Disc\; }
    SmoothGroupoids
     \;
    \,.
  $$

* $[-,-]$ denote the [[mapping stack]]-construction.

Then we have:

1. The *cohesive [[free loop orbifold]]* of $\mathcal{X}$ is

   $$
     \mathcal{L}\mathcal{X}
     \;=\;
     \big[ S^1, \, \mathcal{X} \big]
     \,.
   $$

1. The *inertia orbifold* of $\mathcal{X}$ is

   $$
     \Lambda \mathcal{X}
     \;\simeq\;
     \big[ ʃS^1, \, \mathcal{X} \big]
     \;\simeq\;
     \big[ \mathbf{B}\mathbb{Z}, \, \mathcal{X} \big]
     \;\simeq\;
     \mathcal{X} \times^h_{\mathcal{X} \times \mathcal{X}} \mathcal{X}
     \,,
   $$

   which is the actual [[free loop space object]] formed in [[smooth groupoids]].

The [[shape modality]]-[[unit of a monad|unit]] $\mathcal{A} \xrightarrow{ \eta_{\mathcal{A}}} ʃ \mathcal{A}$ induces a canonical comparison morphism between the two

$$
  \Lambda \mathcal{X}
  \;=\;
  \big[ ʃS^1, \, \mathcal{X} \big]
    \xrightarrow{ \; [\eta_{S^1},\mathcal{X}]\; }
  \big[ S^1, \, \mathcal{X} \big]
  \;=\;
  \mathcal{L} \mathcal{X}
  \,.
$$

When $\mathcal{X} \simeq X \!\sslash\! G$ is a [[global quotient orbifold]] of a [[smooth manifold]] $X$ (for instance for a [[good orbifold]], but $X$ could more generally be a [[diffeological space]] for the present discussion), then this inclusion is the [[n-truncated object of an (infinity,1)-category|faithful inclusion]] of the *cohesively constant loops*, namely those that map to points in the naive quotient space of $\mathcal{X}$.
\end{remark}

\begin{remark}
For [[quantum field theory]] on orbifolds, or rather [[string theory]] on orbifolds, the inertia orbifold is related to so called _twisted sectors_ of the corresponding QFT.  (...)
\end{remark}

## Properties

### Skeleton for global quotient orbifolds
 {#SkeletonForGlobalQuotientOrbifolds}

\begin{proposition}\label{SkeletonOfInertiaOfProperGoodOrbifolds}
**([[skeleton]] of [[inertia orbifold]] for [[proper action|proper]] [[good orbifolds]])** \linebreak
  If $\mathcal{X} \,\simeq\, X \!\sslash\! G $ is a [[good orbifold]] presented as the [[global quotient orbifold]] of a [[smooth manifold]] with [[smooth function|smooth]] [[proper action|proper]] [[group action]] by a [[discrete group]] $G$, then its inertia orbifold is equivalent to the following [[disjoint union]] of [[global quotient orbifolds]]

$$
  \Lambda
  \big(
    X \!\sslash\! G
  \big)
  \;\simeq\;
  \underset{ [g] \in ConjCl(G) }{\coprod}
  X^g \!\sslash\! C_g
  \,,
$$

where

* $ConjCl(G) \coloneqq G /_{ad} G$ is the set of [[conjugacy classes]] of $G$;

* $X^g \coloneqq X^{\langle g\rangle}$ is the [[fixed locus]] of the action of (the [[cyclic group]] generated by) $g \in G$ (which is again a [[smooth manifold]] by the discussion [here](equivariant+differential+topology#FixedSubmanifolds));

* $C_g \subset G$ is the [[centralizer]] of $\{g\} \subset G$.

\end{proposition}

## Examples

### Intertia groupoid of a delooping groupoid

For $G$ a [[finite group]] (most of the following holds more generally for [[discrete groups]]), we discuss the inertia groupoid $\Lambda \mathbf{B}G$ of the [[delooping groupoid]] $\mathbf{B}G \,=\, (G \rightrightarrows \ast)$.

\begin{remark}\label{DeloopingGroupoidAndSimplicialClassifyingSpaceOfFiniteGroup}
**([[delooping groupoid]] and [[simplicial classifying space]] of [[finite group]])** \linebreak
The [[nerve]] of the [[delooping groupoid]] of a [[discrete group]] $G$ is [[isomorphism|isomorphic]] to the [[simplicial classifying space]] of $G$ (see [this Example](simplicial+classifying+space#SimplicialClassifyingSpaceOfAnOrdinaryGroup)):
$$
  N
  \big(
    G \rightrightarrows \ast
  \big)
  \;\simeq\;
  \overline{W} G
  \;\;\;
  \in
  \;
  sSet
  \,.
$$
For notational brevity we will be referring to $\overline{W}G$ in the following, but it may be helpful to keep thinking of the nerve of the delooping groupoid.
From that perspective, an [[n-simplex]] in $\overline{W}G$, which is an [[n-tuple]] of group elements, is suggestively denoted as a sequence of composable arrows:

$$
  \big(\overline{W}G\big)_{n}
  \;\;
    =
  \;\;
  \Big\{
    \bullet
    \xrightarrow{g_{n-1}}
    \bullet
    \xrightarrow{\;}
    \cdots
    \bullet
    \xrightarrow{\;}
    \bullet
    \xrightarrow{g_1}
    \bullet
    \xrightarrow{g_0}
    \bullet
    \;\big\vert\;
    g_i \in G
  \Big\}
  \,.
$$

\end{remark}

\begin{proposition}
The inertia groupoid $\Lambda \mathbf{B} G$ is [[isomorphism|isomorphic]] to the [[action groupoid]] of the [[adjoint action]] of $G$ on itself:
$$
  \Lambda \mathbf{B}G
  \;\simeq\;
  G_{ad} \sslash G
  \;=\;
  \left(
    G \times G
    \underoverset
      {Ad_{(-)}(-)}
      {pr_2}
      {\rightrightarrows}
      G
  \right)
$$
\end{proposition}
This follows by immediate inspection. For more discussion see at *[[free loop space of a classifying space]]* the section *[Examples -- For finite groups](free+loop+space+of+classifying+space#ExampleDiscreteGroups)*.

\begin{proposition}
The [[groupoid convolution algebra]] of the inertia groupoid of the [[delooping groupoid]] $\mathbf{B}G$ is the [[Drinfeld double]] of the [[group convolution algebra]] of $G$.
\end{proposition}

\begin{definition}\label{MinimalSimplicialCircle}
**([[minimal simplicial circle]])** \linebreak
  Write
  $$
    S
    \;\coloneqq\;
    \Delta[1]/\partial\Delta[1]
    \;\;\;
    \in
    \;
    sSet
  $$
  for the [[simplicial set]] with exactly two non-degenerate cells,

* one of which in degree 0, which we denote by $[0] = [1]$,

* and one in degree 1, which we denote by $\big[ [0], [1] \big]$.

\end{definition}

The following proposition follows on abstract grounds, but the explicit component-based proof we give is necessary in order to understand the [[transgression]]-formula for [[cocycles]] in the [[group cohomology]] of $G$ to cocycles on the inertia groupoid.
\begin{proposition}\label{RelationToSimplicialHomComplexIntoClassifyingSpace}
The [[nerve]] of the inertia groupoid of a delooping groupoid of a [[finite group]] $G$ is [[isomorphism|isomorphic]] to the [[simplicial hom complex]] out of the minimal simplicial circle $S$ (Def. \ref{MinimalSimplicialCircle}) into the [[simplicial classifying space]] $\overline{W}G$ (Rem. \ref{DeloopingGroupoidAndSimplicialClassifyingSpaceOfFiniteGroup}):

$$
  N\big( \Lambda \mathbf{B}G\big)_\bullet
  \;\simeq\;
  [S,\overline{W}G]_\bullet
  \,.
$$
\end{proposition}
\begin{proof}
We claim that the isomorphism is given by sending, for each $n \in \mathbb{N}$, any [[n-simplex]] $(\gamma, g_{n-1}, \cdots, g_1, g_0)$ of $N\big( Func( \mathbf{B}\mathbb{Z}, \, \mathbf{B}G )\big)$, being a sequence of [[natural transformations]] of the form
$$
  \array{
    \bullet
    &\xrightarrow{g_{n-1}}&
    \bullet
    &\xrightarrow{g_{n-2}}&
    \cdots
    &\xrightarrow{g_{n-j-1}}&
    \bullet
    &\xrightarrow{g_{n-j-2}}&
    \bullet
    &\xrightarrow{g_{n-j-3}}&
    \cdots
    &\xrightarrow{g_{0}}&
    \bullet
    \\
    \big\downarrow
    {}^{\mathrlap{
      \gamma
    }}
    &&
    \big\downarrow
    {}^{\mathrlap{
      g_{n-1}^{-1} \cdot \gamma \cdot g_{n-1}
    }}
    &&
    &&
    \big\downarrow
    &&
    \big\downarrow
    && &&
    \big\downarrow
    {}^{\mathrlap{
      ( g_{n-1} \cdots g_{0} )^{-1}
      \cdot
      \gamma
      \cdot
      ( g_{n-1} \cdots g_{0} )
    }}
    \\
    \bullet
    &\xrightarrow{g_{n-1}}&
    \bullet
    &\xrightarrow{g_{n-2}}&
    \cdots
    &\xrightarrow{g_{n-j-1}}&
    \bullet
    &\xrightarrow{g_{n-j-2}}&
    \bullet
    &\xrightarrow{g_{n-j-3}}&
    \cdots
    &\xrightarrow{g_{0}}&
    \bullet
    \mathrlap{\,,}
  }
$$

to the homomorphism of simplicial sets

$$
  \Delta[n] \times S \xrightarrow{\;\;} \overline{W}G
  \,,
$$

which, in turn, sends a non-degenerate $(n+1)$-simplex in $\Delta[n] \times S$ of the form (in the path notation discussed at *[[product of simplices]]*)

$$
  \array{
    (0,[0])
    &\to&
    (1,[0])
    &\to&
    \cdots
    &\to&
    (j,[0])
    \\
    && && && \big\downarrow
    \\
    && && &&
    (j,[1])
    &\to&
    (j+1,[1])
    &\to&
    \cdots
    &\to&
    (n,[1])
  }
$$

to the $n+1$-simplex in $\overline{W}G$ (Rem. \ref{DeloopingGroupoidAndSimplicialClassifyingSpaceOfFiniteGroup}) of the form

$$
  \array{
    \bullet
    &\xrightarrow{g_{n-1}}&
    \bullet
    &\xrightarrow{g_{n-2}}&
    \cdots
    &\xrightarrow{g_{n-j}}&
    \bullet
    \\
    && && &&
    \big\downarrow
    {}^{\mathrlap{
      ( g_{n-1} \cdots g_{n-j} )^{-1}
      \cdot
      \gamma
      \cdot
      ( g_{n-1} \cdots g_{n-j} )
    }}
    \\
    && && &&
    \bullet
    &\xrightarrow{g_{n-j}}&
    \bullet
    &\xrightarrow{g_{n-j-1}}&
    \cdots
    &\xrightarrow{g_{0}}&
    \bullet
  }
$$

\end{proof}

{#FormOfTheSimplicialEvaluationMap} As a consequence, the [[evaluation map]] on the inertia groupoid has essentially this same expression, too, which explains the traditional formula for [[transgression in group cohomology]] (see the details [there](transgression+in+group+cohomology#FormOfTheSimplicialEvaluationMap)).

## Related concepts

* [[free loop orbifold]]

* [[Huan's inertia orbifold]]

* [[free loop space]], [[derived loop space]]

* [[transgression in group cohomology]]

## References

Original articles:

* Tetsuro Kawasaki, _The signature theorem for V-manifolds_, Topology __17__ (1978), no. 1, 75–83 (doi:10.1016/0040-9383(78)90013-7)

Review and further development:

* [[Ernesto Lupercio]], [[Bernardo Uribe]], Section 4 of: _Inertia orbifolds, configuration spaces and the ghost loop space_, Quarterly Journal of Mathematics __55__ 2 (2004) 185-201 ([arxiv:math.AT/0210222](http://arxiv.org/abs/math/0210222), [doi:10.1093/qmath/hag053](https://doi.org/10.1093/qmath/hag053))

* {#Moerdijk02} [[Ieke Moerdijk]], Section 6 in: _Orbifolds as Groupoids: an Introduction_, in: [[Alejandro Adem]], [[Jack Morava]], [[Yongbin Ruan]] (eds.) _[[Orbifolds in Mathematics and Physics]]_, Contemporary Math 310 , AMS (2002), 205–222 ([arXiv:math.DG/0203100](http://arxiv.org/abs/math.DG/0203100))

* [[Ulrich Bunke]], [[Markus Spitzweck]], [[Thomas Schick]], _Inertia and delocalized twisted cohomology_, Homotopy, Homology and Applications 10(1) 129--180 (2008)[math.KT/0609576](https://arxiv.org/abs/math/0609576)
[doi](https://doi.org/10.4310/HHA.2008.v10.n1.a6)

See also:

* [[The Stacks Project]], *[The inertia stack](https://stacks.math.columbia.edu/tag/036X)* ([more](https://stacks.math.columbia.edu/tag/034H), [more](https://stacks.math.columbia.edu/tag/034I))

In relation to [[Drinfeld doubles]]:

* [[Vladimir Hinich]], _Drinfeld double for orbifolds_, Contemporary Math. __433__, AMS Providence, 2007, 251-265,
[arXiv:math.QA/0511476](http://arxiv.org/abs/math/0511476)

In view of the [[Chern character]] for [[twisted K-theory|twisted]] [[orbifold K-theory]]:

* [[Jean-Louis Tu]], [[Ping Xu]], _Chern character for twisted K-theory of orbifolds_, Advances in Mathematics __207__ (2006) 455–483, [pdf](http://www.math.univ-metz.fr/~tu/publi/orb.pdf) (cf. sec. 2.3)

See also the references at *[[free loop orbifold]]*.

On [[transgression in group cohomology]], for [[discrete groups]], to [[groupoid cohomology]] of [[inertia groupoids]]:

* {#Willerton08} [[Simon Willerton]], Section 1 of: *The twisted Drinfeld double of a finite group via gerbes and finite groupoids*, Algebr. Geom. Topol. 8 (2008) 1419-1457 ([arXiv:math/0503266](https://arxiv.org/abs/math/0503266))

* [[Jean-Louis Tu]], [[Ping Xu]], Section 3 of: *The ring structure for equivariant twisted K-theory*, J. Reine Angew. Math. 635 (2009), 97–148 ([arXiv:math/0604160](https://arxiv.org/abs/math/0604160), [doi:10.1515/CRELLE.2009.077](https://doi.org/10.1515/CRELLE.2009.077))

* [[Alejandro Adem]], [[Yongbin Ruan]], [[Bin Zhang]], Section 4 of: _A Stringy Product on Twisted Orbifold K-theory_, Morfismos (10th Anniversary Issue), Vol. 11, No 2 (2007), 33-64.  ([arXiv:math/0605534](https://arxiv.org/abs/math/0605534), [Morfismos pdf](www.morfismos.cinvestav.mx/Portals/morfismos/SiteDocs/Articulos/Volumen11/No2/Zhang/arz.pdf))

[[!redirects inertia orbifolds]]

[[!redirects inertia stack]]
[[!redirects inertia stacks]]

[[!redirects inertia ∞-stack]]
[[!redirects inertia ∞-stacks]]

[[!redirects inertia groupoid]]
[[!redirects inertia groupoids]]

category: Lie theory


inferior limit

# Inferior and superior limits

## Idea

The _inferior and superior limits_ ($\lim\,\inf$ and $\lim\,\sup$, or _lower and upper limits_) of an [[infinite sequence]] of [[real numbers]] are two generalizations of the usual [[convergence|limit]] that exist more often (indeed always, if one allows sufficiently general answers).  This notion can be generalized far beyond its original context.

## Terminology and notation

The inferior limit is denoted $\lim\,\inf$ or $\underline{\lim}$, while the superior limit is denoted $\lim\,\sup$ or $\overline{\operatorname{li̇m}}$.  These symbols come from the Latin 'limes inferior' and 'limes superior' (with Latin plurals 'limites inferiores' and 'limites superiores'); saying 'limit inferior' or 'limit superior' in English, while common, is like saying 'logarithm natural' because the symbol for the [[natural logarithm]] is '$\ln$' (from the Latin 'logarithmus naturalis').  Another variation is to read '$\lim\,\inf$' as 'limit infimum' and '$lim\,\sup$' as 'limit supremum', although this is etymologically incorrect.  Sometimes one sees the more fully translated terms 'lower limit' and 'upper limit'.  On the other hand, in German, untranslated Latin is most common.

## Definitions

Let $L$ be a [[complete lattice]] with a [[convergence structure]], and let $F$ be a [[filter]] *on* (the [[underlying set]] of) $L$ (not a filter *in* $L$).  Then the __inferior limit__ of $F$ is the limit of the [[infima]] of the sets in $F$ (if this limit exists):
$$ \lim\,\inf F = \lim_{A \in F} \inf A .$$
Similarly, the __superior limit__ of $F$ is the limit of the [[suprema]] of the sets in $F$:
$$ \lim\,\sup F = \lim_{A \in F} \sup A .$$
(Of course, if the convergence structure is not [[Hausdorff space|Hausdorff]], then there may be multiple inferior and superior limits.)
Here we are taking $F$ to define a couple of [[nets]] in $L$, each indexed by the sets in $F$; as is usual with filters, we take $A \leq B$ iff $B \subseteq A$.  If $L$ is merely a [[poset]] and not a complete lattice, then we still use the same definitions, but they can only exist if $\inf A$ or $\sup A$ exists for sufficiently small $A \in F$.

If $F$ is merely a [[filter base]], then precisely the same formulas give the inferior and superior limits of the filter generated by $F$.  Of course, we can also start with anything else that generates a filter in some way, such as a [[sequence]] or more generally a [[net]].  In this case, we can write
$$ {\lim\,\inf}_n\, x_n = {\lim}_n\, \inf_{m \geq n} x_m $$
and
$$ {\lim\,\sup}_n\, x_n = {\lim}_n\, \sup_{m \geq n} x_m .$$

Given a set $X$, a filter $F$ on $X$, and a [[partial function]] $f$ to $L$ from $X$, the upper and lower limits of $f$ in the direction given by $F$ are the upper and lower limits of $f(F)$; that is,
$$ {\lim\,\inf}_F f = \lim_{A \in F} \inf f(A) $$
and
$$ {\lim\,\sup}_F f = \lim_{A \in F} \sup f(A) .$$
In particular, if $X$ is a [[pretopological space]] and $c$ is a [[adherent point]] of the domain of $f$ in $X$, then we can use the [[neighbourhood filter]] of $c$; similarly, if $c$ is an [[accumulation point]] of the domain of $f$ in $X$, then we can use the filter of [[punctured neighborhood|punctured neighbourhoods]] of $c$.  Then
$$ \underset{x \to c}{\lim\,\inf}\, f(x) = \lim_{c \stackrel{\circ}\in A} \inf f(A) $$
and
$$ \underset{x \to c}{\lim\,\sup}\, f(x) = \lim_{c \stackrel{\circ}\in A} \sup f(A) $$
if we use neighbourhoods (so that the limit must equal $f(c)$ if both exist, as traditionally taught in French),
or
$$ \underset{x \to c}{\lim\,\inf}\, f(x) = \lim_{c \stackrel{\circ}\in A} \inf f(A\setminus\{c\}) $$
and
$$ \underset{x \to c}{\lim\,\sup}\, f(x) = \lim_{c \stackrel{\circ}\in A} \sup f(A\setminus\{c\}) $$
if we use punctured neighbourhoods (so that $f(c)$ is irrelevant to the limit, as traditionally taught in English).  We can also use a [[neighbourhood base]] at $c$ instead of all neighbourhoods; in particular, if $X$ is a [[topological space]] with $O$ as its collection of [[open subsets]], then we may use the (possibly punctured) [[open neighbourhoods]] of $c$; then
$$ \underset{x \to c}{\lim\,\inf}\, f(x) = \lim_{c \in G \in O} \inf f(G) $$
and
$$ \underset{x \to c}{\lim\,\sup}\, f(x) = \lim_{c \in G \in O} \sup f(G) $$
for the unpunctured limit, or
$$ \underset{x \to c}{\lim\,\inf}\, f(x) = \lim_{c \in G \in O} \inf f(G\setminus\{c\}) $$
and
$$ \underset{x \to c}{\lim\,\sup}\, f(x) = \lim_{c \in G \in O} \sup f(G\setminus\{c\}) $$
for the punctured limit.

Every [[partial order]] on a set defines a convergence structure (the [[order convergence]]) under which a [[net]] $(x_n)_n$ converges to a point $x_\infty$ iff there exist a [[monotone increasing function|monotone increasing]] net $y$ and a [[monotone decreasing function|monotone decreasing]] net $z$ such that $x_\infty = \sup_n y_n = \inf_n z_n$ and, for each $y$-index $i$ and $z$-index $j$, it is $n$-eventually true that $y_i \leq x_n \leq z_j$.
In this case, we can also write
$$ \lim\,\inf F = \sup_{A \in F}\, \inf A $$
and
$$ \lim\,\sup F = \inf_{A \in F}\, \sup A .$$
The reason is that the net $(\inf A)_{A \in F}$ is monotone increasing, so that its limit in the order convergence is the same as its supremum (using itself for $y$ and a constant net for $z$); similarly, $(\sup A)_{A \in F}$ is monotone decreasing, with its limit the same as its infimum.

[[!redirects lower limit]]
[[!redirects lower limits]]
[[!redirects inferior limit]]
[[!redirects inferior limits]]
[[!redirects limit inferior]]
[[!redirects limit inferiors]]
[[!redirects limits inferior]]
[[!redirects limit infimum]]
[[!redirects limit infima]]
[[!redirects limit infimums]]
[[!redirects limits infimum]]
[[!redirects limes inferior]]
[[!redirects limes inferiors]]
[[!redirects limites inferiores]]
[[!redirects lim inf]]
[[!redirects liminf]]

[[!redirects upper limit]]
[[!redirects upper limits]]
[[!redirects superior limit]]
[[!redirects superior limits]]
[[!redirects limit superior]]
[[!redirects limit superiors]]
[[!redirects limits superior]]
[[!redirects limit supremum]]
[[!redirects limit suprema]]
[[!redirects limit supremums]]
[[!redirects limits supremum]]
[[!redirects limes superior]]
[[!redirects limes superiors]]
[[!redirects limites superiores]]
[[!redirects lim sup]]
[[!redirects limsup]]


infinitary Lawvere theory

{:myproof: .proof style="margin-left:2em;"}
{:mynumdef: .num_defn style="border:solid #cccccc;border-width:2px 1px;padding:0 1em;margin:0 1em;"}

# Infinitary Lawvere theories
* table of contents
{: toc}

## Idea

An infinitary Lawvere theory is a generalisation of a [[Lawvere theory]] to allow infinitary operations.  As a motivating example, consider the theory of [[suplattices]], where we have, for every [[cardinal number]] $\kappa$, an operation to take the [[supremum]] of $\kappa$-many elements.

Size issues can be tricky for infinitary Lawvere theories.  Naïvely, you would expect an infinitary Lawvere theory of [[complete lattices]] too, but there is none, because a smallness condition fails.  (This is connected to the nonexistence of [[free complete lattices]].)

In accordance with the [[red herring principle]], an infinitary Lawvere theory should not be thought of a special case of a [[Lawvere theory]].  To avoid this, one may call the latter a *finitary* Lawvere theory.

There are also many-sorted infinitary Lawvere theories, as well as $\kappa$-ary Lawvere theories for any [[regular cardinal]] $\kappa$.

## Definitions

A __many-sorted infinitary Lawvere theory__ is a [[locally small category]] $\mathcal{D}$ with all small [[products]] and with a small collection $\mathcal{R}$ of objects (called __sorts__) such that every object is a small product of these sorts.

Given a small [[set]] $S$, an __$S$-sorted infinitary Lawvere theory__ is a locally small category $\mathcal{D}$ with all small products and equipped with an $S$-indexed family $\mathcal{R}$ of objects (called __sorts__) such that every object is a small product of these sorts.  (Note that an $S$-indexed family of objects is precisely a [[functor]] to $\mathcal{D}$ from the [[discrete category]] on $S$.)

If $(\mathcal{D},\mathcal{R})$ is an $S$-sorted infinitary Lawvere theory, then $\mathcal{D}$ is a many-sorted infinitary Lawvere theory; conversely, any many-sorted infinitary Lawvere theory may be interpreted as an $S$-sorted infinitary Lawvere theory, where $S$ is (the set of isomoprhism classes of) an appropriate family $\mathcal{R}$ and the $S$-indexed family is given by the identity indexing.

An __unsorted infinitary Lawvere theory__ is a locally small category $\mathcal{D}$ with all small products and equipped with an object $R$ (so that $(\mathcal{D},R)$ is a [[pointed category]]) such that every object is [[isomorphic]] to $R^n$ for some small cardinal number $n$.  An __infinitary Lawvere theory__ is by default an unsorted infinitary Lawvere theory, invoking the [[red herring principle]].  Note that an unsorted infinitary Lawvery theory is the same thing as a $1$-sorted infinitary Lawvere theory.

We will give the definitions of further special cases for unsorted infinitary Lawvere theories, but these definitions may also be generalised to the many-sorted case.

Given a [[regular cardinal]] $\kappa$, a __$\kappa$-ary Lawvere theory__ is a locally small pointed category $(\mathcal{D},R)$ with all $n$-ary products for $n \lt \kappa$ such that every object is isomorphic to $R^n$ for some $n \lt \kappa$.  Every $\kappa$-ary Lawvere theory may be interpreted as an infinitary Lawvere theory by using the free category with all small products on $\mathcal{D}$.  More generally, every $\kappa$-ary Lawvere theory may be interpreted as a $\lambda$-ary Lawvere theory if $\kappa \leq \lambda$.

A __bounded infinitary Lawvere theory__ is an infinitary Lawvere theory which is (under the interpretation above) [[equivalence of categories|equivalent]] to some $\kappa$-ary Lawvere theory.

A __finitary Lawvere theory__ is a locally small pointed category $(\mathcal{D},R)$ with all finitary products such that every object is isomorphic to $R^n$ for some [[natural number]] $n$.  A __[[Lawvere theory]]__ is by default a finitary Lawvere theory, invoking the [[red herring principle]].  Note that a finitary Lawvere theory is the same thing as an $\aleph_0$-ary Lawvere theory.

## Size matters

Given a category $\mathcal{D}$ with small products, we may be interested in knowing whether it is equivalent to a many-sorted infinitary Lawvere theory (with a set of sorts). [Freyd and Street (1995)](http://tac.mta.ca/tac/volumes/1995/n9/1-09abs.html) have shown that a category $\mathcal{D}$ is [[small category|small]] if and only if both $\mathcal{D}$ and the [[functor category]] $[\mathcal{D},Set]$ are locally small.  Analogously, it seems that a category $\mathcal{D}$ with products may be given the structure of a many-sorted infinitary Lawvere theory (with a set of sorts) if and only if both $\mathcal{D}$ and $Prod[\mathcal{D},Set]$ (the category of [[product-preserving functor]]s from $\mathcal{D}$ to $Set$, a [[full subcategory]] of $[\mathcal{D},Set]$) are locally small.  In both cases, the 'only if' part is straightfoward, but we haven't yet proved the 'if' part.

See [the n-Forum](https://nforum.ncatlab.org/comments.php?DiscussionID=1673) for more preliminary results.

## Algebraic Categories

+-- {: .un_lemma}
###### Conjecture
A multi-sorted infinitary Lawvere theory $\mathcal{D}$ defines a [[monadic category]] over [[Set]] by taking the [[functor category]] consisting of all **product-preserving** covariant functors from $\mathcal{D}$ in to $Set$.
=--

Let us write this functor category as $Prod[\mathcal{D},Set]$ and start by showing that it is a [[locally small category]].

+-- {: .num_lemma #ProdLocSmall}
###### Lemma
The category $Prod[\mathcal{D},Set]$ of product-preserving functors and natural transformations is locally small.
=--

+-- {: myproof}
###### Proof
Let $V_1, V_2 \colon \mathcal{D} \to Set$ be two product-preserving covariant functors.
From the definition of a multi-sorted infinitary category we see that we may choose a set of sorts, say $S$.
Let $D_s \in \mathcal{D}$ be the image of $s \in S$.

As $S$ is a set, the product
$$
\prod_{s \in S} Set(V_1(D_s), V_2(D_s))
$$
is a set.  We define a function $[V_1,V_2] \to \prod_{s \in S} Set(V_1(D_s), V_2(D_s))$ by sending a natural transformation $\alpha \colon V_1 \to V_2$ to the product of its values at each $D_s$.  That is,
\begin{equation}
\label{natrans}
\alpha \mapsto \big(\alpha_{D_s}\big)_{s \in S}.
\end{equation}

Let $D \in \mathcal{D}$ be an arbitrary object.  From the definition of a multi-sorted infinitary Lawvere theory, there is an isomorphism
$$
d \colon D \cong \prod_{s \in S} D_s^{X_s}
$$
for some sets $X_s$.   For each $s \in S$ and $x \in X_s$, there is a projection $p_{s,x} \colon \prod_{s \in S} D_s^{X_s} \to D_s$.
As $V_1$ and $V_2$ are product-preserving, we have isomorphisms
$$
 \cong  \prod_{s \in S} V_i(D_s)^{X_s}
$$
commuting with the projections.
Thus for each $s \in S$ and $x \in X_s$, we have the following commutative diagram.

<svg width="655" height="229" xmlns="http://www.w3.org/2000/svg" xmlns:se="http://svg-edit.googlecode.com" se:nonce="37480">
 <g>
  <title>Layer 1</title>
  <foreignObject height="30" width="110.000001" font-size="16" id="svg_37480_1" y="48" x="175">
   <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML">
    <semantics>
     <mrow>
      <msub>
       <mi>V</mi>
       <mn>1</mn>
      </msub>
      <mrow>
       <mo>(</mo>
       <msub>
        <mo rspace="thinmathspace" lspace="thinmathspace">∏</mo>
        <mrow>
         <mi>s</mi>
         <mo>∈</mo>
         <mi>S</mi>
        </mrow>
       </msub>
       <msubsup>
        <mi>D</mi>
        <mi>s</mi>
        <mrow>
         <msub>
          <mi>X</mi>
          <mi>s</mi>
         </msub>
        </mrow>
       </msubsup>
       <mo>)</mo>
      </mrow>
     </mrow>
     <annotation encoding="application/x-tex">V_1\left( \prod_{s \in S} D_s^{X_s}\right)</annotation>
    </semantics>
   </math>
  </foreignObject>
  <foreignObject id="svg_37480_2" height="30" width="110" font-size="16" y="48" x="370">
   <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML">
    <semantics>
     <mrow>
      <msub>
       <mi>V</mi>
       <mn>2</mn>
      </msub>
      <mrow>
       <mo>(</mo>
       <msub>
        <mo rspace="thinmathspace" lspace="thinmathspace">∏</mo>
        <mrow>
         <mi>s</mi>
         <mo>∈</mo>
         <mi>S</mi>
        </mrow>
       </msub>
       <msubsup>
        <mi>D</mi>
        <mi>s</mi>
        <mrow>
         <msub>
          <mi>X</mi>
          <mi>s</mi>
         </msub>
        </mrow>
       </msubsup>
       <mo>)</mo>
      </mrow>
     </mrow>
     <annotation encoding="application/x-tex">V_2\left( \prod_{s \in S} D_s^{X_s}\right)</annotation>
    </semantics>
   </math>
  </foreignObject>
  <foreignObject height="30" width="110" font-size="16" id="svg_37480_26" y="198" x="175">
   <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML">
    <semantics>
     <mrow>
      <msub>
       <mi>V</mi>
       <mn>1</mn>
      </msub>
      <mrow>
       <mo>(</mo>
       <msub>
        <mi>D</mi>
        <mi>s</mi>
       </msub>
       <mo>)</mo>
      </mrow>
     </mrow>
     <annotation encoding="application/x-tex">V_1\left(D_s\right)</annotation>
    </semantics>
   </math>
  </foreignObject>
  <foreignObject id="svg_37480_27" height="30" width="110" font-size="16" y="199" x="370">
   <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML">
    <semantics>
     <mrow>
      <msub>
       <mi>V</mi>
       <mn>2</mn>
      </msub>
      <mrow>
       <mo>(</mo>
       <msub>
        <mi>D</mi>
        <mi>s</mi>
       </msub>
       <mo>)</mo>
      </mrow>
     </mrow>
     <annotation encoding="application/x-tex">V_2\left(D_s\right)</annotation>
    </semantics>
   </math>
  </foreignObject>
  <line marker-end="url(#se_marker_end_svg_37480_41)" id="svg_37480_41" y2="187" x2="232" y1="81" x1="230" stroke-width="2" stroke="#000000" fill="none"/>
  <line id="svg_37480_42" marker-end="url(#se_marker_end_svg_37480_42)" y2="188" x2="424" y1="82" x1="425" stroke-width="2" stroke="#000000" fill="none"/>
  <foreignObject height="29.000001" width="66" font-size="16" id="svg_37480_43" y="129.999998" x="164">
   <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML">
    <semantics>
     <mrow>
      <msub>
       <mi>V</mi>
       <mn>1</mn>
      </msub>
      <mo stretchy="false">(</mo>
      <msub>
       <mi>p</mi>
       <mrow>
        <mi>s</mi>
        <mo>,</mo>
        <mi>x</mi>
       </mrow>
      </msub>
      <mo stretchy="false">)</mo>
     </mrow>
     <annotation encoding="application/x-tex">V_1(p_{s,x})</annotation>
    </semantics>
   </math>
  </foreignObject>
  <foreignObject id="svg_37480_44" height="29.000001" width="66" font-size="16" y="129" x="425">
   <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML">
    <semantics>
     <mrow>
      <msub>
       <mi>V</mi>
       <mn>2</mn>
      </msub>
      <mo stretchy="false">(</mo>
      <msub>
       <mi>p</mi>
       <mrow>
        <mi>s</mi>
        <mo>,</mo>
        <mi>x</mi>
       </mrow>
      </msub>
      <mo stretchy="false">)</mo>
     </mrow>
     <annotation encoding="application/x-tex">V_2(p_{s,x})</annotation>
    </semantics>
   </math>
  </foreignObject>
  <line marker-end="url(#se_marker_end_svg_37480_60)" id="svg_37480_60" y2="211" x2="392.999996" y1="211" x1="262" stroke-width="2" stroke="#000000" fill="none"/>
  <foreignObject height="20" width="48" font-size="16" id="svg_37480_61" y="187" x="304">
   <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML">
    <semantics>
     <mrow>
      <msub>
       <mi>η</mi>
       <mrow>
        <msub>
         <mi>D</mi>
         <mi>s</mi>
        </msub>
       </mrow>
      </msub>
     </mrow>
     <annotation encoding="application/x-tex">\eta_{D_s}</annotation>
    </semantics>
   </math>
  </foreignObject>
  <line marker-end="url(#se_marker_end_svg_37480_62)" id="svg_37480_62" y2="61" x2="368.000006" y1="61" x1="287.000002" stroke-width="2" stroke="#000000" fill="none"/>
  <foreignObject height="38" width="85.000002" font-size="16" id="svg_37480_63" y="30.000002" x="284.999994">
   <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML">
    <semantics>
     <mrow>
      <msub>
       <mi>η</mi>
       <mrow>
        <msub>
         <mo rspace="thinmathspace" lspace="thinmathspace">∏</mo>
         <mrow>
          <mi>s</mi>
          <mo>∈</mo>
          <mi>S</mi>
         </mrow>
        </msub>
        <msubsup>
         <mi>D</mi>
         <mi>s</mi>
         <mrow>
          <msub>
           <mi>X</mi>
           <mi>s</mi>
          </msub>
         </mrow>
        </msubsup>
       </mrow>
      </msub>
     </mrow>
     <annotation encoding="application/x-tex">\eta_{\prod_{s \in S} D_s^{X_s}}</annotation>
    </semantics>
   </math>
  </foreignObject>
  <foreignObject id="svg_37480_64" height="30" width="110.000001" font-size="16" y="48" x="0">
   <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML">
    <semantics>
     <mrow>
      <msub>
       <mo rspace="thinmathspace" lspace="thinmathspace">∏</mo>
       <mrow>
        <mi>s</mi>
        <mo>∈</mo>
        <mi>S</mi>
       </mrow>
      </msub>
      <msub>
       <mi>V</mi>
       <mn>1</mn>
      </msub>
      <mo stretchy="false">(</mo>
      <msub>
       <mi>D</mi>
       <mi>s</mi>
      </msub>
      <msup>
       <mo stretchy="false">)</mo>
       <mrow>
        <msub>
         <mi>X</mi>
         <mi>s</mi>
        </msub>
       </mrow>
      </msup>
     </mrow>
     <annotation encoding="application/x-tex">\prod_{s \in S} V_1(D_s)^{X_s}</annotation>
    </semantics>
   </math>
  </foreignObject>
  <foreignObject id="svg_37480_88" height="30" width="110.000001" font-size="16" y="48" x="545">
   <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML">
    <semantics>
     <mrow>
      <msub>
       <mo rspace="thinmathspace" lspace="thinmathspace">∏</mo>
       <mrow>
        <mi>s</mi>
        <mo>∈</mo>
        <mi>S</mi>
       </mrow>
      </msub>
      <msub>
       <mi>V</mi>
       <mn>2</mn>
      </msub>
      <mo stretchy="false">(</mo>
      <msub>
       <mi>D</mi>
       <mi>s</mi>
      </msub>
      <msup>
       <mo stretchy="false">)</mo>
       <mrow>
        <msub>
         <mi>X</mi>
         <mi>s</mi>
        </msub>
       </mrow>
      </msup>
     </mrow>
     <annotation encoding="application/x-tex">\prod_{s \in S} V_2(D_s)^{X_s}</annotation>
    </semantics>
   </math>
  </foreignObject>
  <line marker-start="url(#se_marker_start_svg_37480_112)" marker-end="url(#se_marker_end_svg_37480_112)" id="svg_37480_112" y2="61" x2="175" y1="61" x1="113" stroke-width="2" stroke="#000000" fill="none"/>
  <line marker-start="url(#se_marker_start_svg_37480_113)" marker-end="url(#se_marker_end_svg_37480_113)" id="svg_37480_113" y2="61" x2="546" y1="61" x1="481" stroke-width="2" stroke="#000000" fill="none"/>
  <line marker-end="url(#se_marker_end_svg_37480_114)" id="svg_37480_114" y2="197" x2="458" y1="74" x1="594" stroke-width="2" stroke="#000000" fill="none"/>
  <line marker-end="url(#se_marker_end_svg_37480_115)" id="svg_37480_115" y2="201" x2="199" y1="75" x1="60" stroke-width="2" stroke="#000000" fill="none"/>
  <foreignObject height="20" width="48" font-size="16" id="svg_37480_116" y="137" x="92">
   <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML">
    <semantics>
     <mrow>
      <msub>
       <mi>p</mi>
       <mrow>
        <mi>s</mi>
        <mo>,</mo>
        <mi>x</mi>
       </mrow>
      </msub>
     </mrow>
     <annotation encoding="application/x-tex">p_{s,x}</annotation>
    </semantics>
   </math>
  </foreignObject>
  <foreignObject id="svg_37480_117" height="20" width="48" font-size="16" y="137" x="511">
   <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML">
    <semantics>
     <mrow>
      <msub>
       <mi>p</mi>
       <mrow>
        <mi>s</mi>
        <mo>,</mo>
        <mi>x</mi>
       </mrow>
      </msub>
     </mrow>
     <annotation encoding="application/x-tex">p_{s,x}</annotation>
    </semantics>
   </math>
  </foreignObject>
  <foreignObject height="20" width="48" font-size="16" id="svg_37480_128" y="41" x="491">
   <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML">
    <semantics>
     <mrow>
      <mo>≅</mo>
     </mrow>
     <annotation encoding="application/x-tex">\cong</annotation>
    </semantics>
   </math>
  </foreignObject>
  <foreignObject id="svg_37480_129" height="20" width="48" font-size="16" y="40" x="120">
   <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML">
    <semantics>
     <mrow>
      <mo>≅</mo>
     </mrow>
     <annotation encoding="application/x-tex">\cong</annotation>
    </semantics>
   </math>
  </foreignObject>
  <path marker-end="url(#se_marker_end_svg_37480_135)" id="svg_37480_135" d="m63,45c170.666672,-57.333336 353.333344,-60.666664 533,2" stroke-dasharray="5,5" stroke-width="2" stroke="#000000" fill="none"/>
 </g>
 <defs>
  <marker refY="50" refX="50" markerHeight="5" markerWidth="5" viewBox="0 0 100 100" se_type="rightarrow" orient="auto" markerUnits="strokeWidth" id="se_marker_end_svg_37480_41">
   <path stroke-width="10" stroke="#000000" fill="#000000" d="m100,50l-100,40l30,-40l-30,-40z"/>
  </marker>
  <marker refY="50" refX="50" markerHeight="5" markerWidth="5" viewBox="0 0 100 100" se_type="rightarrow" orient="auto" markerUnits="strokeWidth" id="se_marker_end_svg_37480_42">
   <path stroke-width="10" stroke="#000000" fill="#000000" d="m100,50l-100,40l30,-40l-30,-40z"/>
  </marker>
  <marker refY="50" refX="50" markerHeight="5" markerWidth="5" viewBox="0 0 100 100" se_type="rightarrow" orient="auto" markerUnits="strokeWidth" id="se_marker_end_svg_37480_60">
   <path stroke-width="10" stroke="#000000" fill="#000000" d="m100,50l-100,40l30,-40l-30,-40z"/>
  </marker>
  <marker refY="50" refX="50" markerHeight="5" markerWidth="5" viewBox="0 0 100 100" se_type="rightarrow" orient="auto" markerUnits="strokeWidth" id="se_marker_end_svg_37480_62">
   <path stroke-width="10" stroke="#000000" fill="#000000" d="m100,50l-100,40l30,-40l-30,-40z"/>
  </marker>
  <marker refY="50" refX="50" markerHeight="5" markerWidth="5" viewBox="0 0 100 100" se_type="rightarrow" orient="auto" markerUnits="strokeWidth" id="se_marker_end_svg_37480_115">
   <path stroke-width="10" stroke="#000000" fill="#000000" d="m100,50l-100,40l30,-40l-30,-40z"/>
  </marker>
  <marker refY="50" refX="50" markerHeight="5" markerWidth="5" viewBox="0 0 100 100" se_type="rightarrow" orient="auto" markerUnits="strokeWidth" id="se_marker_end_svg_37480_112">
   <path stroke-width="10" stroke="#000000" fill="#000000" d="m100,50l-100,40l30,-40l-30,-40z"/>
  </marker>
  <marker refY="50" refX="50" markerHeight="5" markerWidth="5" viewBox="0 0 100 100" se_type="leftarrow" orient="auto" markerUnits="strokeWidth" id="se_marker_start_svg_37480_112">
   <path stroke-width="10" stroke="#000000" fill="#000000" d="m0,50l100,40l-30,-40l30,-40z"/>
  </marker>
  <marker refY="50" refX="50" markerHeight="5" markerWidth="5" viewBox="0 0 100 100" se_type="rightarrow" orient="auto" markerUnits="strokeWidth" id="se_marker_end_svg_37480_113">
   <path stroke-width="10" stroke="#000000" fill="#000000" d="m100,50l-100,40l30,-40l-30,-40z"/>
  </marker>
  <marker refY="50" refX="50" markerHeight="5" markerWidth="5" viewBox="0 0 100 100" se_type="leftarrow" orient="auto" markerUnits="strokeWidth" id="se_marker_start_svg_37480_113">
   <path stroke-width="10" stroke="#000000" fill="#000000" d="m0,50l100,40l-30,-40l30,-40z"/>
  </marker>
  <marker refY="50" refX="50" markerHeight="5" markerWidth="5" viewBox="0 0 100 100" se_type="rightarrow" orient="auto" markerUnits="strokeWidth" id="se_marker_end_svg_37480_114">
   <path stroke-width="10" stroke="#000000" fill="#000000" d="m100,50l-100,40l30,-40l-30,-40z"/>
  </marker>
  <marker refY="50" refX="50" markerHeight="5" markerWidth="5" viewBox="0 0 100 100" se_type="rightarrow" orient="auto" markerUnits="strokeWidth" id="se_marker_end_svg_37480_135">
   <path stroke-width="10" stroke="#000000" fill="#000000" d="m100,50l-100,40l30,-40l-30,-40z"/>
  </marker>
 </defs>
</svg>

Since this holds for all $s \in S$ and $x \in X_s$, by the basic properties of products, there is a unique morphism $\prod_{s \in S} V_1(D_s)^{X_s} \to   \prod_{s \in S} V_2(D_s)^{X_s}$ making the diagram commute.  This morphism is normally written $\prod_{s \in S} \alpha_{D_s}^{X_s}$.  Thus under the isomorphism $d$ above, $\alpha_D$ is taken to $\prod_{s \in S} \alpha_{D_s}^{X_s}$.  As this holds for all $D \in \mathcal{D}$, $\alpha$ is completely determined by the $\alpha_{D_s}$, whence the map in \eqref{natrans} is injective.

Hence $[V_1,V_2]$ is a subset of a set and thus a set.
=--

Now that we have a locally small category, the next step is to show that the forgetful functor has a [[left adjoint]].  Firstly, we need to _define_ this forgetful functor.  As we are in the most general case, the forgetful functor does not go to $Set$ but to $S$-indexed tuples of sets (or an $S$-[[graded set]]), where $S$ is a choice of set of sorts for $\mathcal{D}$.  To make things a little simpler, we assume that the _sorting_ functor $S \to \mathcal{D}$ is injective on isomorphism classes so that if $s \ne s'$ in $S$ then $D_s \ncong D_{s'}$ in $\mathcal{D}$.  With this assumption, the forgetful functor $Prod[\mathcal{D},Set] \to Set^S$ is the evaluation functor:
$$
V \mapsto \big(s \mapsto V(D_s)\big), \qquad \alpha \mapsto \big(s \mapsto \alpha_{D_s}\big).
$$

+-- {: .num_lemma #ProdFree}
###### Lemma
The forgetful functor $Prod[\mathcal{D},Set] \to Set^S$ has a left adjoint.  The left adjoint is given on objects by:
$$
\big(s \mapsto X_s\big) \mapsto \mathcal{D}\left(\prod_{s \in S} D_s^{X_s}, -\right)
$$
=--

+-- {: myproof}
###### Proof
To ease the notation, let us write $U$ for the forgetful ("underlying set(s)") functor and $F$ for the free functor.

To show the adjunction, we define the unit and counit natural transformations:
$$
\eta \colon I \to U F, \qquad \epsilon \colon F U \to I
$$

Let us consider $\eta$.  To define this, we evaluate it at an $S$-graded set, $X$, to get a morphism of graded sets, $\eta_X$.  Such a morphism is itself a natural transformation so we evaluate again at $s_0 \in S$.  At this point, we have a function (in $Set$)
$$
\eta_{X,s_0} \colon  X_{s_0} \to \mathcal{D}\left(\prod_{s \in S} D_s^{X_s}, D_{s_0}\right).
$$
This is simple to describe: it is assignment to $x \in X_{s_0}$ of the projection onto the $x$th $D_{s_0}$-factor:
$$
\prod_{s \in S} D_s^{X_s} \to D_{s_0}^{X_{s_0}} \overset{p_x}{\to} D_{s_0}.
$$

The counit, $\epsilon$, is a little more complicated to describe.  Let $V \colon \mathcal{D} \to Set$ be a covariant product-preserving functor.  Evaluated at $V$, $\epsilon_V$ is a natural transformation
$$
\mathcal{D}\left(\prod_{s \in S} D_s^{V(D_s)}, -\right) \to V
$$
By the [[Yoneda lemma]], such natural transformations are in bijective correspondence with elements of $V\left(\prod_{s \in S} D_s^{V(D_s)}\right)$.  As $V$ is product-preserving, there is a natural isomorphism:
$$
V\left(\prod_{s \in S} D_s^{V(D_s)}\right) \cong \prod_{s \in S} V(D_s)^{V(D_s)}
$$
Now for any set $Z$, there is an obvious element in $Z^Z$: the one that has a $z$ in the $z$th place (which corresponds to the identity function $Z \to Z$).  Taking the product of these gives an element in $\prod_{s \in S} V(D_s)^{V(D_s)}$ which we use to define $\epsilon_V$.

Let us now prove that these provide the desired adjunction.  For one half, we need to consider the composition:
$$
F \overset{F \eta}{\to} F U F \overset{\epsilon F}{\to} F
$$
Let us apply this to a graded set $X = (s \mapsto X_s)$.  Then we are looking at a natural transformation from
$$
\mathcal{D}\left(\prod_{s \in S} D_s^{X_s}, -\right)
$$
to itself.  By the standard Yoneda argument, it is sufficient to look at the induced function on
$$
\mathcal{D}\left(\prod_{s \in S} D_s^{X_s}, \prod_{s \in S} D_s^{X_s}\right)
$$
and in particular at the image of the identity therein.

The first part comes from $F\eta$ at $F(X)$.  For each $s_0 \in S$, we have a function $\eta_{X,s_0} \colon X_{s_0} \to \mathcal{D}\left(\prod_{s \in S} D_s^{X_s}, D_{s_0}\right)$ and thus a morphism
\begin{equation}
\label{prod}
\prod_{s \in S} D_s^{\mathcal{D}\left(\prod_{s' \in S} D_{s'}^{X_{s'}},D_s\right)}  \to \prod_{s \in S} D_s^{X_s}
\end{equation}
What this does is the following: it sends component corresponding to the $(s,x)$th projection to the $x$th component and all other components are forgotten.
Thus we have a morphism:
$$
\mathcal{D}\left( \prod_{s \in S} D_s^{X_s},  \prod_{s \in S} D_s^{X_s}\right) \to \mathcal{D}\left(
\prod_{s \in S} D_s^{\mathcal{D}\left(\prod_{s' \in S} D_{s'}^{X_{s'}},D_s\right)}, \prod_{s \in S} D_s^{X_s}\right)
$$
Under this, the identity morphism goes to the projection morphism described just above.

Now we apply $\epsilon F$ to get a morphism:
$$
\mathcal{D}\left(
\prod_{s \in S} D_s^{\mathcal{D}\left(\prod_{s' \in S} D_{s'}^{X_{s'}},D_s\right)}, \prod_{s \in S} D_s^{X_s}\right)
\to \mathcal{D}\left( \prod_{s \in S} D_s^{X_s},  \prod_{s \in S} D_s^{X_s}\right)
$$
To find this element, we consider the diagram:
$$
\array{
\mathcal{D}\left(
\prod_{s \in S} D_s^{\mathcal{D}\left(\prod_{s' \in S} D_{s'}^{X_{s'}},D_s\right)},
\prod_{s \in S} D_s^{\mathcal{D}\left(\prod_{s' \in S} D_{s'}^{X_{s'}},D_s\right)}\right)
&\overset{\epsilon }{\to}&
\mathcal{D}\left( \prod_{s \in S} D_s^{X_s},
\prod_{s \in S} D_s^{\mathcal{D}\left(\prod_{s' \in S} D_{s'}^{X_{s'}},D_s\right)}\right)
& \cong &
\prod_{s \in S} \mathcal{D}\left( \prod_{s'' \in S} D_{s''}^{X_{s''}},
 D_s\right)^{\mathcal{D}\left(\prod_{s' \in S} D_{s'}^{X_{s'}},D_s\right)} \\
\downarrow & & \downarrow & & \downarrow \\
\mathcal{D}\left(
\prod_{s \in S} D_s^{\mathcal{D}\left(\prod_{s' \in S} D_{s'}^{X_{s'}},D_s\right)}, \prod_{s \in S} D_s^{X_s}\right)
&\overset{\epsilon }{\to}&
\mathcal{D}\left( \prod_{s \in S} D_s^{X_s},  \prod_{s \in S} D_s^{X_s}\right)
& \cong &
  \prod_{s \in S}\mathcal{D}\left( \prod_{s'' \in S} D_{s''}^{X_{s''}}, D_s\right)^{X_s}
}
$$
In this diagram, we have left off the subscript on $\epsilon$ for conciseness.  The vertical morphism is that induced by the projection from \eqref{prod}.  Since we want to have this projection itself in the lower-left, an obvious place to start is with the identity in the top-left.  The right-hand square commutes since the vertical maps are projections.  Starting with the identity in the top-left, we get the "Yoneda element" corresponding to $\epsilon$ in the top-right.  That element can be written $(f)_f$.  The vertical map selects the $p_{s,x}$th element of the list and puts it in the $(s,x)$th slot.  As this is the projection $p_{s,x}$, when moving back to the lower-middle, we obtain the identity morphism as required.

Now let us turn to the other half.  We need to consider the composition:
$$
U \overset{\eta U}{\to} U F U \overset{U \epsilon}{\to} U
$$
So we need to start with a covariant product-preserving functor $V \colon \mathcal{D} \to Set$ and apply $U$.  Then we are looking at a morphism of graded sets from
$$
\big(s \mapsto V(D_s)\big)
$$
to itself.  So we pick $s_0 \in S$ and look at the function
$$
V(D_{s_0}) \to \mathcal{D}\left(\prod_{s \in S} D_s^{V(D_s)}, D_{s_0}\right) \to V(D_{s_0}).
$$

We start with the function defined by the unit $\eta$:
$$
V(D_{s_0}) \to \mathcal{D}\left(\prod_{s \in S} D_s^{V(D_s)}, D_{s_0}\right)
$$
which sends $v \in V(D_{s_0})$ to the projection $\prod_{s \in S} D_s^{V(D_s)} \to D_{s_0}$ which corresponds to the $v$th factor of the $s_0$th factor.

Now we apply $\epsilon$.  This gives us a natural transformation
$$
 \mathcal{D}\left(\prod_{s \in S} D_s^{V(D_s)}, - \right) \to V(-)
$$
which we evaluate at $D_{s_0}$ (technically, which we evaluate at $(s \mapsto D_s)$ which we then evaluate at $s_0$).  This natural transformation is determined by an element of $V\left(\prod_{s \in S} D_s^{V(D_s)}\right)$ and the element that we want is the image of that element under the function induced by the projection:
$$
V\left(\prod_{s \in S} D_s^{V(D_s)}\right) \overset{V(p_{s_0,v})}{\to} V(D_{s_0})
$$
As $V$ is product-preserving, we can rearrange this to:
$$
\prod_{s \in S} V(D_s)^{V(D_s)} \overset{p_{s_0,v}}{\to} V(D_{s_0}).
$$
The projection selects the $(s_0,v)$th term of the element in question, and this element is, by definition, $v$.  Hence the induced function on $V(D_{s_0})$ is the identity and the adjunction is shown.
=--

## References

* [[Martin Brandenburg]], _Large limit sketches and topological space objects_ ([arXiv:2106.11115](https://arxiv.org/abs/2106.11115))


infinitary logic

#Contents#
* table of contents
{:toc}

## Idea

An **infinitary logic** is a logic that allows infinitely long statements or infinitely long proofs, for example, by allowing conjunctions, disjunctions and quantifier sequences, to be of infinite length. The price to pay for adopting many of these more expressive logics is the failure of [[completeness theorem|completeness]] or of [[compactness theorem|compactness]].

## Related entries

* [[model theory]]

* [[first-order logic]]

* [[accessible category]]

* [[geometric theory]]

* [[Skolem paradox]]

## References

An infinitary logic was introduced for the first time in

* Ernst Zermelo, _Über Stufen der Quantifikation und die Logik des Unendlichen_,  Jahresbericht der Deutschen Mathematiker-Vereinigung 41/42 (1931), pp. 568–570. ([gdz](http://gdz.sub.uni-goettingen.de/dms/load/img/?PID=PPN37721857X_0041|LOG_0038&physid=PHYS_0395))

Other early works include work of [[Pyotr Sergeyevich Novikov|Novikov]] and

* D. A. Bochvar, _Über einen Aussagenkalkül mit abzählbaren logischen Summen und Produkten_, Mathematičeskii Sbornik __17__ (1940), pp 65–100.

Infinitary logic has been recently studied extensively by [[Saharon Shelah]] and in categorical logic by [[Mihaly Makkai]].

* [[Rami Grossberg]], _Classification theory for abstract elementary classes_. Logic and Algebra, ed. Yi Zhang, Contemporary Mathematics, Vol 302, AMS, (2002), pp. 165--204, [pdf](http://www.math.cmu.edu/~rami/Rami-NBilgi.pdf)

* [[Rami Grossberg]], [[Saharon Shelah]], _On the number of non isomorphic models of an infinitary theory which has the order property_, Part A, Journal of Symbolic Logic, 51, (1986) 302--322, [jstor pdf](http://links.jstor.org/sici?sici=0022-4812%28198606%2951%3A2%3C302%3AOTNONM%3E2.0.CO%3B2-D)

[[!redirects infinitary first-order theory]]