dense functor

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
### Context
#### Category theory
+-- {: .hide}
[[!include category theory - contents]]
=--
=--
=--
# Contents
* table of contents
{:toc}

## Idea

In [[topology]], a not necessarily [[continuous function|continuous]] [[function]] $f \colon X \to Y$ between [[Hausdorff space|Hausdorff spaces]] is _dominant_, or _dense_, in the sense that the [[image]] of $f$ is a [[dense subspace]] of $Y$, precisely if every [[continuous function]]  $g \colon Y \to Z$ to any  [[Hausdorff space]] $Z$ is uniquely determined by the [[composition]] $g \circ f$.

In [[category theory]], the concept of a **dense functor** is a generalization of this concept to [[functors]].

An important special case that was also historically the source of the concept, is the case of a [[dense subcategory]] [[fully faithful functor|inclusion]]: a [[subcategory]] $S$ of category $C$ is _dense_ if every [[object]] $c$ of $C$ is a [[colimit]] of a [[diagram]] of objects in $S$, in a canonical way.

## Definition

\begin{definition}\label{DenseFunctor}
**(dense functor)**\linebreak
A [[functor]] $i \colon S \to C$ is __dense__ if it satisfies the following equivalent conditions:

1. every [[object]] $c$ of $C$ is the [[colimit]]

   $
     \underset{\longrightarrow}{\lim}
     \Big(
       (i/c)
       \overset{\mathrm{pr}_S}{
         \longrightarrow
       }
       S
       \overset{i}{\longrightarrow}
       C
     \Big)
   $

   over the [[comma category]] $(i/c)$:

1. every [[object]] $c$ of $C$ is the $C(i-,c)$-[[weighted colimit]] of $i$.

   (This version generalizes readily to the [[enriched category theory]]).

1. the corresponding [[restricted Yoneda embedding]] $C \to [S^{op},Set]$ is [[full and faithful functor|fully faithful]].

1. the [[left Kan extension]] $lan_i i$ exists, is [[pointwise Kan extension|pointwise]], and is isomorphic to the identity.

1. $C$ is the closure of $S$ under [[colimits]] of a family of [[diagrams]], by which is meant a class of pairs $(F \colon L^{op} \to \mathcal{V}, P \colon L \to C)$ consisting of a [[weight]] and a diagram for that weight, and these colimits are $i$-absolute (i.e. preserved by the [[nerve]] $N_i$ of $i$). See [(Theorem 5.19 of Kelly)](#Kelly), for instance.

1. For every category $B$, precomposition by $i$ induces a [[full and faithful functor]]
$$[i, 1] : S\text{-Cocts}[C, B] \to [S, B]$$
where $S\text{-Cocts}[C, B]$ is the category of functors preserving [[weighted colimits]] whose weights are presheaves $S^{op} \to V$.

\end{definition}

## Properties
  {#Properties}

\begin{remark}\label{DenseFunctorsNotClosedUnderComposition}
**(dense functors not closed under composition)** \linebreak
Beware that the [[class]] of dense functors (Def. \ref{DenseFunctor}) is *not* closed under [[composition]] of functors.

For a counter-example see Example \ref{DenseSubcategoriesOfSimplexCategory} below.

\end{remark}

## Examples
 {#Examples}

\begin{example}
The inclusion of the [[discrete category]] on the [[singleton set]] into all of [[Sets]] is a [[dense subcategory]] inclusion.

More generally, if $C$ is an essentially small category, then the [[Yoneda embedding]] $C \to [C^{op},Set]$ is dense.
\end{example}

\begin{example}
Let $V$ be a category of [[algebras]] and $n \in \mathbb{N}$ such that $V$ has a presentation with operations of at most arity $n$.  Let $v$ be the free $V$-algebra on $n$ generators.  Then the [[full subcategory]] with object $v$ is dense in $V$.

More generally, if $V$ is a $\kappa$-[[accessible category]], then the [[full subcategory]] inclusion $V_\kappa \subseteq V$ of $\kappa$-[[presentable objects]] is dense. This means in particular that if $C$ is a [[small category]], then the canonical inclusion $C \to Ind(C)$ into its [[Ind category]] is dense, and that [[categories of sheaves]] have small [[dense subcategories]].
\end{example}

\begin{example}\label{DenseSubcategoriesOfSimplexCategory}
  Consider the [[simplex category]] $\Delta$, regarded in the usual way as a [[subcategory]] of [[Cat]]. Let $\Delta_{\leq [1]} \subset \Delta$ be the full subcategory with object set $\{[0],[1]\}$ -- i.e. comprising the 0-dimensional simplex and the 1-dimensional simplex.

Then

1. $\Delta_{\leq [1]} \hookrightarrow \Delta$ is a [[dense subcategory]] inclusion;

1. $\Delta \hookrightarrow \mathbf{Cat}$ is a [[dense subcategory]] inclusion,

1. but the composite $\Delta_{\leq [1]} \hookrightarrow \Delta \hookrightarrow Cat$ is *not* dense in $\mathbf{Cat}$ (see Remark \ref{DenseFunctorsNotClosedUnderComposition}).

\end{example}

\begin{example}
The category $Top$ of [[topological spaces]] does not have any small full subcategory which is dense. Indeed, $Top$ is not generated under colimits by any small subcategory.

The category $Set^{op}$ has a small full subcategory which is dense if and only if there is not a proper class of [[measurable cardinals]], a result due to Isbell.
\end{example}

\begin{example}
Let $V$ be a [[Bénabou cosmos]]. Then the inclusion of the 2-category of small $V$-categories into the 2-category of large $V$-categories is dense as a 2-functor (Lemma 2.16 of [Przybyłek (2014)](#Przybyłek2014)).
\end{example}

## Related entries

* [[dense]]

* [[codense functor]]

* [[absolutely dense functor]]

* [[dense subcategory]]

* [[codensity monad]]

* [[space and quantity]]

* [[dominant geometric morphism]]

## Terminology and History ##

[[John Isbell]] introduced [[dense subcategory|dense subcategories]] in a seminal paper [(Isbell 1960)](#MR0175954) under the name *left adequate*.  The dual notion of *right adequate* was also introduced and subcategories satisfying both were called *adequate*. It was also shown that while the relation of being left (or right) adequate is not transitive, being adequate is transitive. He also brought out interesting connections with [[set theory]] and [[measurable cardinals]].

Later in the mid 60s, [[Friedrich Ulmer]] considered the concept for more general functors $F:C\to D$, not only inclusions $I:C\hookrightarrow D$, and introduced the name _dense_ for them.

Independently, [[Pierre Gabriel]] worked on this concept and their work coalesced to what was to become the concept of a [[locally presentable category]] of their [1971 monograph](#GabrielUlmer71). It is also good to keep in mind the '_Abelian_' subcontext in the background, in particular the developments in module theory e.g. Lazard's (1964) characterization of flat modules as filtered colimits of finitely generated free modules.

More recently, [[Jacob Lurie]] has referred to the analogue notion for [[(∞,1)-categories]] as *strongly generating* in a version (arXiv v4) of his [[Higher Topos Theory|HTT]], but that term normally means [[strong generator|something different]].

## References

* Tom Avery, [[Tom Leinster]], _Isbell conjugacy and the reflexive completion_, arXiv:2102.08290 (2021). ([abstract](https://arxiv.org/abs/2102.08290))

* {#GabrielUlmer71} [[Pierre Gabriel|Peter Gabriel]], [[Friedrich Ulmer]], _Lokal präsentierbare Kategorien_ , LNM **221** Springer Heidelberg 1971. (§ 3, pp.38-44)

* {: #MR0175954 } [[John Isbell]], _Adequate subcategories_ , Illinois J. Math. **4** (1960) pp.541-552. [MR0175954](http://www.ams.org/mathscinet-getitem?mr=0175954). ([euclid](https://projecteuclid.org/euclid.ijm/1255456274))

* [[John Isbell]], _Subobjects, adequacy, completeness and categories of algebras_ , Rozprawy Mat. **36** (1964) pp.1-32. ([toc](http://pldml.icm.edu.pl/pldml/element/bwmeta1.element.desklight-0dbcb276-0b92-49eb-b504-a9963119ea3e), [pdf](http://pldml.icm.edu.pl/pldml/element/bwmeta1.element.desklight-0dbcb276-0b92-49eb-b504-a9963119ea3e/c/rm36_01.pdf))

* {#Kelly} [[Max Kelly]], _Basic Concepts of Enriched Category Theory_ , Cambridge UP 1982. (Reprinted as [TAC reprint no.10](http://www.tac.mta.ca/tac/reprints/articles/10/tr10abs.html) (2005); chapter 5, pp.85-112)

* [[William Lawvere]], _John Isbell's Adequate Subcategories_, TopCom **11** no.1 2006. ([link](http://at.yorku.ca/t/o/p/d/65.htm))

* [[Saunders Mac Lane]], _Categories for the Working Mathematician_ , Springer Heidelberg 1998². (section X.6, pp.245ff, 250)

* [[Horst Schubert]], _Kategorien II_ , Springer Heidelberg 1970. (section 17.2, pp.29ff)

* [[Friedrich Ulmer]], _Properties of dense and relative adjoint functors_ , J. of Algebra **8** (1968) pp.77-95.

* [[Giacomo Tendas]], *Dense functors and density presentations*, unpublished notes ([pdf](https://gtendas.github.io/pdfs/day.pdf))

* {#Przybyłek2014} [[Michał Przybyłek]], _Analysis and construction of logical systems: a category-theoretic approach_ (2014), PhD thesis ([pdf](https://www.mimuw.edu.pl/~mrp/phd_mrp.pdf)).

[[!redirects adequate subcategory]]
[[!redirects left adequate subcategory]]


dense monomorphism

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
### Context
#### Topos Theory
+-- {: .hide}
[[!include topos theory - contents]]
=--
=--
=--

#Contents#
* table of contents
{:toc}

## Idea

A [[Lawvere-Tierney topology]] on a [[topos]] defines naturally a certain closure operation on [[subobjects]]. A subobject inclusion is called _dense_ (a _dense monomorphism_) if its closure is an [[isomorphism]].  In other words, a _dense subobject_ of an object $B$ is a subobject whose closure is all of $B$.

## Definition

Let $E$ be a [[topos]] equipped with a [[Lawvere-Tierney topology]] $j : \Omega \to \Omega$.

For every [[subobject]] $A \hookrightarrow B$ in the [[topos]] classified by $char A : B \to \Omega$, let its **closure**

$$
  \bar A \hookrightarrow B
$$

be the subobject classified by $char \bar A := B \stackrel{char A}{\to} \Omega \stackrel{j}{\to} \Omega$.

The monomorphism $A \hookrightarrow B$ is called a **dense monomorphism** if $\bar A = B$, that is if $\bar A \hookrightarrow B$ is an [[isomorphism]].

## Relation to other concepts

### To local isomorphisms

Recall that when $E$ is a [[presheaf]] [[Grothendieck topos]] $E = PSh(S) = [S^{op}, Set]$ then [[Lawvere-Tierney topology|Lawvere-Tierney topologies]] on $E$ are in bijection with [[Grothendieck topology|Grothendieck topologies]] on $S$ (making $S$ a [[site]]).
In this case there is the notion of [[local epimorphism]] and [[local isomorphism]] in $PSh(S)$ with respect to this topology.

We have in this case:

the dense monomorphisms in $PSh(S)$ are precisely the [[local isomorphisms]] that are at the same time ordinary [[monomorphisms]].

###  To sheafification ##

A [[presheaf]] $F \in PSh(S)$ is a [[sheaf]] with respect to the given topology if $Hom_{PSh(S)}(-, F)$ sends all dense monomorphisms to [[isomorphisms]].

Since Lawvere-Tierney topologies make sense for every [[topos]] (not necessarily a [[presheaf]]  [[Grothendieck topos]]) this provides a general notion of [[Lawvere-Tierney topology|sheafification in a Lawvere-Tierney topology]].

## Related concepts

* [[dense]]

## References

Dense monomorphisms appear around p. 223 of

* [[Saunders MacLane]], [[Ieke Moerdijk]], _[[Sheaves in Geometry and Logic]]_

[[!redirects dense monomorphisms]]

[[!redirects dense subobject]]
[[!redirects dense subobjects]]


dense relation

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

# Contents
* table of contents
{: toc}

## Definition

A [[binary endorelation]] $R$ on a set $A$ is **dense** if for all $x \in A$ and $y \in A$ such that $R(x, y)$ there exists an element $z \in A$ such that $R(x, z)$ and $R(z, y)$. Equivalently, a binary relation $R$ on $A$ is dense if $R$ is a [[subset]] of the composite $R \circ R$ in [[Rel]], $R \subseteq R \circ R$.

In the [[graph theory|graph theoretic]] representation of relations as (directed loop) [[graphs]], a graph is **dense** if for every [[pair]] of [[vertices]] $a:V$ and $b:V$ with an [[edge]] $a \to b$, there exists a vertex $c:V$ with edges $a \to c$ and $c \to b$.

## Examples

* Every [[reflexive relation]] is a dense relation

* Every (left or right) [[Euclidean relation]] is a dense relation

* An [[idempotent relation]] is a dense transitive relation

## Generalizations

The notion of dense relation in [[Rel]] can in theory be generalized to the notion of a *dense* [[morphism]] of an arbitrary [[2-poset]]: Given a 2-poset $C$ and an object $A \in \mathrm{Ob}(C)$, a morphism $R \in \mathrm{Hom}(A, A)$ is dense if $R \leq R \circ R$.

## Dense relation structures

In [[dependent type theory]], the usual definition of a dense relation above use the phrase "there exists...". This existence in the definitions is mere existence; i.e. using the [[existential quantifier]] rather than the [[dependent sum type]].

The untruncated version of the dense relation using dependent sum types can be called **dense relation structure**, and fields states that

* for all $x:A$ and $y:A$ such that $R(x, y)$, there exists as structure an element $z:A$ such that $R(x, z)$ and $R(z, y)$.

$$\prod_{x:A} \prod_{y:A} R(x, y) \to \sum_{z:A} R(x, z) \times R(z, y)$$

## Related concepts

* [[DLO]]

* [[dense]]

* [[transitive relation]]

## References

See also:

* Wikipedia, *[Dense order -- Generalizations](https://en.wikipedia.org/wiki/Dense_order#Generalizations)*

[[!redirects dense relation]]
[[!redirects dense relations]]
[[!redirects dense binary relation]]
[[!redirects dense binary relations]]
[[!redirects dense binary endorelation]]
[[!redirects dense binary endorelations]]

[[!redirects dense directed loop graph]]
[[!redirects dense directed loop graphs]]


dense sub-site

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
### Context###
#### Topos Theory
+-- {: .hide}
[[!include topos theory - contents]]
=--
#### Notions of subcategory
+-- {: .hide}
[[!include notions of subcategory]]
=--
=--
=--

# Contents
* table of contents
{:toc}

## Idea

A _dense sub-site_ is a [[subcategory]] of a [[site]] such that a natural [[functor]] between the corresponding [[categories of sheaves]] is an [[equivalence|equivalence of categories]].

## Definition

+-- {: .num_prop #InducedCoverage}
###### Definition

For $(C,J)$ a [[site]] with [[coverage]] $J$ and $D \to C$ any [[subcategory]], the **induced coverage** $J_D$ on $D$ has as [[covering]] [[sieve|sieves]] the intersections of the covering sieves of $C$ with the morphisms in $D$.

=--

+-- {: .num_prop #DenseSubSite}
###### Definition

Let $(C,J)$ be a [[site]] (possibly [[large site|large]]). A [[subcategory]] $D \to C$ (not necessarily [[full subcategory|full]]) is called a **dense sub-site** with the [induced coverage](#InducedCoverage) $J_D$ if

1. every object $U \in C$ has a [[covering]] [[sieve]] generated by maps $U_i \to U$ with $U_i \in D$.

2. for every morphism $f : U \to V$ in $C$ with $U, V \in D$ there is a [[covering]] [[sieve]] $\{f_i : U_i \to U\}$ of $U$ in $D$ such that the composites $f \circ f_i$ are in $D$.

=--

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

If $D$ is a [[full subcategory]] then the second condition is automatic.

=--

The following theorem is known as the **[[comparison lemma]]**.

+-- {: .num_theorem}
###### Theorem

Let $(C,J)$ be a (possibly [[large site|large]]) [[site]] with $C$ a [[locally small category]] and let $f : D \to C$ be a [[small category|small]] [dense sub-site](#DenseSubSite). Then the pair of [[adjoint functor]]s

$$
  (f^* \dashv f_*)
    :
  PSh(D)
    \stackrel{\overset{f^*}{\leftarrow}}{\underset{f_*}{\to}}
   PSh(C)
$$

with $f^*$ given by precomposition with $f$ and $f_*$ given by right [[Kan extension]] induces an [[equivalence of categories]] between the categories of sheaves

$$
  (f_* \dashv f^*) :
  Sh_{J_D}(D)
  \underoverset
    {\underset{f_*}{\to}}{\overset{f^*}
    {\leftarrow}}
    {\simeq}
  Sh_J{C}
  \,.
$$
=--

This appears as ([Johnstone, theorem C2.2.3](#JTT02)).

## Problems with another definition

The nLab following Johnstone ([2002](#JTT02), p.546) had initially the following form of condition 2 in definition \ref{DenseSubSite}:

2'. For every morphism $f : U \to V$ in $C$ with  $V \in D$ there is a cover $S\in J(U)$ in $C$ generated by a family of morphisms $\{f_i : U_i \to U\}$ in $C$ such that the composites $f \circ f_i$ are in $D$.

But this is too weak to prove the comparison lemma as the following example shows:

Let $C$ be any groupoid, with the trivial topology (only maximal sieves cover), and let $D$ be the discrete category on the same objects.  Then for any morphism $f:U\to V$, its inverse $f^{-1}:V\to U$ generates the maximal sieve on $U$, and the composite $f f^{-1} = 1_V$ is in $D$, so the conditions 1 and 2' of the definition are satisfied.  But the restriction $Set^{C^{op}} \to Set^{D^{op}}$ is not generally an equivalence.

See the dicussion [here](https://nforum.ncatlab.org/discussion/7220/dense-subsite/#Item_0).

## Examples

* Let $X$ be a [[locale]] with [[frame]] $Op(X)$ regarded as a site with the canonical coverage ($\{U_i \to U\}$ covers if the [[join]] of the $U_i$ is $U$). Let $bOp(X)$ be a [[basis for the topology]] of $X$: a complete join-[[semilattice]] such that every object of $Op(X)$ is the [[join]] of objects of $bOp(X)$. Then $bOp(X)$ is a dense sub-site.

  * For $X$ a [[locally contractible space]], $Op(X)$ its [[category of open subsets]] and $cOp(X)$ the full subcategory of [[contractible]] open subsets, we have that $cOp(X)$ is a dense sub-site.

* For $C = TopManifold$  the category of all [[topological manifold]]s equipped with the [[open cover]] coverage, the category [[CartSp]]${}_{top}$ is a dense sub-site: every [[topological manifold]] has an [[open cover]] by [[open balls]] [[homeomorphic]] to a [[Cartesian space]].

  * For $C = PCompTopManifold$  the category of all [[paracompact topological space|paracompact]] [[topological manifold]]s equipped with the [[good open cover]] coverage, the category [[CartSp]]${}_{top}$ is a dense sub-site: every paracompact [[topological manifold]] has an [[good open cover]] by [[open balls]] [[homeomorphic]] to a [[Cartesian space]].

  * Similarly for $C = $ [[Diff]] the category of [[paracompact topological space|paracompact]] [[smooth manifold]]s equipped with the [[good open cover]] [[coverage]], the full subcategory [[CartSp]]${}_{smooth}$ is a dense sub-site: every such smooth manifold has a _differentiably_ [[good open cover]] (see there): a good cover by open balls each of which are [[diffeomorphic]] to a [[Cartesian space]].

## Warning

Replacing [[sheaves]] by [[(∞,1)-sheaves]] of [[spaces]] produces a strictly stronger notion.
See [[(∞,1)-comparison lemma]] for a sufficient criterion for a dense inclusion of [[(∞,1)-sites]].

## Remark

There is also the notion of _[[dense subcategory]]_, which is however only remotly related to the concept of a _dense sub-site_ by both vaguely invoking the topological concept of a [[dense subspace]].

## Related entries

* [[dense]]

* [[comparison lemma]]

* [[(∞,1)-comparison lemma]]

* [[covering lifting property]]

## References

The comparison lemma originates with the exposé III by [[J. L. Verdier|Verdier]] in

* {#SGA4}[[M. Artin]], [[A. Grothendieck]], [[J. L. Verdier]], _Théorie des Topos et Cohomologie Etale des Schémas ([[SGA4]])_, LNM **269** Springer Heidelberg 1972.  (p.288)

A more general form is used to give a site characterization for [[étendue|étendue toposes]] in

* [[A. Kock]], [[I. Moerdijk]], _Presentations of Etendues_ , Cah. Top. Géom. Diff. Cat. **XXXII** 2 (1991) pp.145-164. ([numdam](http://www.numdam.org/numdam-bin/item?id=CTGDC_1991__32_2_145_0), pp.151f)

A proof of the comparison lemma together with a nice list of examples is in

* [[Saunders Mac Lane|S. Mac Lane]], [[I. Moerdijk]], _Sheaves in Geometry and Logic_ , Springer Heidelberg 1994. (Appendix 4, pp.590ff)

See also

* {#Caramello19}[[Olivia Caramello]], _Denseness conditions, morphisms and equivalences of toposes_ , arXiv:1906.08737 (2019).  ([abstract](https://arxiv.org/abs/1906.08737))

* {#JTT02}[[Peter Johnstone]], _[[Elephant|Sketches of an Elephant]] vol 2_ , Oxford UP 2002. (Section C2.2, p.546)

* {#Shulman12}[[Mike Shulman]], _Exact Completions and Small Sheaves_ , TAC **27** no.7 (2012) pp.97-173. ([abstract](http://www.tac.mta.ca/tac/volumes/27/7/27-07abs.html); Section 11)

[[!redirects induced coverage]]
[[!redirects dense sub-site]]
[[!redirects dense sub-sites]]
[[!redirects dense subsite]]
[[!redirects dense subsites]]


dense subalgebra

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
### Context
#### Topology
+-- {: .hide}
[[!include topology - contents]]
=--
#### Algebra
+-- {: .hide}
[[!include higher algebra - contents]]
=--
#### Noncommutative geometry
+--{: .hide}
[[!include noncommutative geometry - contents]]
=--
=--
=--

# Contents
* table of contents
{: toc}

## Idea

A _dense subalgebra_ of a [[topological algebra]] is a [[subalgebra]] which is also a [[dense subspace]].

For instance, the algebra of [[smooth functions]] on a given [[smooth manifold]] $M$ is a dense subalgebra of the [[C-star-algebra]] of [[continuous functions]] on $X$.  Conversely, if we start with a [[commutative C-star-algebra]] $A$ and view it as the algebra of continuous maps on its [[spectrum]] $S$, then picking a dense subalgebra of $A$ may specify a [[smooth structure]] on $S$ (which may be any [[compactum|compact Hausdorff space]]).  For [[noncommutative geometry]], we can let $A$ be an arbitrary $C^*$-algebra. One also speaks of **smooth C-star algebras** if a $C^\ast$-algebra is equipped with an inverse system of inclusions of dense subalgebra (a noncommutative version of [[Frechet spaces]]).

Hence equipping a [[C-star-algebra]] with a choice of dense subalgebra serves may be thought of as refining from [[noncommutative topology]] to [[noncommutative geometry]]. This is for instance what happens in the definition of [[spectral triples]] and in smooth refinements of [[KK-theory]].

## Related concepts

* [[dense]]

* [[F-star-algebra]]

## References

* E. Kissin, V. S. Shulman, _Differential properties of some dense subalgebras of $C^\ast$-algebras_,  Proceedings of The Edinburgh Mathematical Society, vol. 37, no. 03 (1994)

* Larry Schweitzer, _Dense nuclear Fréchet ideals in $C^\ast$-algebras_ ([arXiv:1205.0089](http://arxiv.org/abs/1205.0089))

[[!redirects dense subalgebra]]
[[!redirects dense subalgebras]]

[[!redirects smooth C-star-algebra]]
[[!redirects smooth C-star-algebras]]

[[!redirects smooth C*-algebra]]
[[!redirects smooth C*-algebras]]


dense subcategory

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
### Context
#### Category theory
+-- {: .hide}
[[!include category theory - contents]]
=--
#### Notions of subcategory
+-- {: .hide}
[[!include notions of subcategory]]
=--
=--
=--

#Contents#
* table of contents
{:toc}

## Idea

The concept of a **dense subcategory** generalizes the concept of a [[dense subspace]] from [[topology]] to [[categories]]. Roughly speaking, a dense subcategory 'sees' enough of the ambient category to control the behavior and properties of the latter.

The concept forms part of a related family of concepts concerned with 'generating objects' and has some interesting interaction with [[set theory]] and [[measurable cardinals]].

## Definition

### In category theory

There are actually two different notions of _dense [[subcategory]]_ $D$ of a given [[category]] $C$:

1. A subcategory $D\subset C$ is __dense__ if every [[object]] in $C$ is canonically a [[colimit]] of objects in $D$.

This is equivalent to saying that the inclusion [[functor]] $D\hookrightarrow C$ is a [[dense functor]].

An older name for a dense subcategory in this sense is an **adequate subcategory**.

2. A subcategory $D\subset C$ is __dense__ if every object $c$ of $C$ has a $D$-expansion, that is a [[morphism]] $c\to\bar{c}$ of [[pro-objects]] in $D$ which is [[universal property|universal]] ([[initial object|initial]]) among all morphisms of pro-objects in $D$ with [[domain]] $c$.

   This second notion is used in [[shape theory]]. An alternative name for this is a **pro-reflective subcategory**, that is a subcategory for which the inclusion has a [[proadjoint]].

### In shape theory
 {#InShapeTheory}

Beware that in [[shape theory]] a different notion of a "dense subcategory" is in use:

\begin{definition}\label{DExpansion}
**(D-expansion)** \linebreak
A _$D$-expansion_ of an [[object]] $X$ in a [[category]] $C$ is a [[morphism]] $X\to \mathbf{X}$ in the category $\mathrm{pro}C$ of [[pro-objects]] such that $\mathbf{X}$ is in $\mathrm{pro}D$ and $X$ is the rudimentary system (constant inverse system) corresponding to $X$; moreover one asks that the morphism is universal among all such morphisms $X\to\mathbf{Y}$.

\end{definition}

\begin{definition}\label{ShapeDenseSubcategory}
**(shape-dense subcategory)** \linebreak
A [[full subcategory]] $D\subset C$ is __dense__ in the sense of shape theory, if every [[object]] in $C$ admits a $D$-expansion (Def. \ref{DExpansion})

\end{definition}

\begin{remark}
**(abstract shape category)**
Given a shape-dense subcategory $D\subset C$ (Def. \ref{ShapeDenseSubcategory}) one defines an **abstract shape category** $\mathrm{Sh}(C,D)$ which has the same objects as $C$, but the morphisms are the equivalence classes of morphisms in $\mathrm{pro}D$ of $D$-expansions (Def. \ref{DExpansion}).

\end{remark}

## Applications

* A [[dense functor]] $S \hookrightarrow C$ into a [[locally small category]] $C$ induces a good notion of [[nerve]] $N : C \to [S^{op}, Set]$ of objects in $C$ with values in the [[presheaves]] on $S$. See [[nerve]] and [[nerve and realization]] for more on this.

## Related concepts

* [[dense]]

There is also the notion of "[[dense subsite]]", but this is _not_ a special case of a dense subcategory.

## Related entries

* [[dense functor]]

* [[codensity monad]]

* [[space and quantity]]

* [[measurable cardinal]]

* [[dense subtopos]]

## Related pages

* [[William Lawvere]], _John Isbell's Adequate Subcategories_ , TopCom **11** no.1 (2006). ([link](http://at.yorku.ca/t/o/p/d/65.htm))

## References

* {: #MR0175954 } [[John Isbell]], _Adequate subcategories_ , Illinois J. Math. **4** (1960) pp.541-552. [MR0175954](http://www.ams.org/mathscinet-getitem?mr=0175954) ([euclid](https://projecteuclid.org/euclid.ijm/1255456274)).

* [[John Isbell]], _Subobjects, adequacy, completeness and categories of algebras_ , Rozprawy Mat. **36** (1964) pp.1-32. ([toc](http://pldml.icm.edu.pl/pldml/element/bwmeta1.element.desklight-0dbcb276-0b92-49eb-b504-a9963119ea3e))([full text as pdf](http://pldml.icm.edu.pl/pldml/element/bwmeta1.element.desklight-0dbcb276-0b92-49eb-b504-a9963119ea3e/c/rm36_01.pdf))

* [[John Isbell]], _Small adequate subcategories_ , J. London Math. Soc. **43** (1968) pp.242-246.

* [[John Isbell]], _Locally finite small adequate subcategories_ , JPAA **36** (1985) pp.219-220.

* [[Max Kelly]], _Basic Concepts of Enriched Category Theory_ , Cambridge UP 1982. (Reprinted as [TAC reprint no.10](http://www.tac.mta.ca/tac/reprints/articles/10/tr10abs.html) (2005); chapter 5, pp.85-112)

* [[Saunders Mac Lane]], _Categories for the Working Mathematician_ , Springer Heidelberg 1998². (section X.6, pp.245ff, 250)

* Horst Schubert, _Kategorien II_ , Springer Heidelberg 1970. (section 17.2, pp.29ff)

* [[Friedrich Ulmer]], _Properties of dense and relative adjoint functors_ , J. of Algebra **8** (1968) pp.77-95.

[[!redirects dense subcategories]]

[[!redirects pro-reflective subcategory]]
[[!redirects pro-reflective subcategories]]


dense subspace

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

#Contents#
* table of contents
{:toc}

## Definition

Given a [[topological space]] (or [[locale]]) $X$, a [[subspace]] $A$ of $X$ is __dense__ if its [[closed subspace|closure]] is all of $X$: $cl(A)=X$.

Since $cl(A)$ is the set of all points $x$ such that every [[open neighborhood]] of $x$ [[intersection|intersects]] $A$, this can equivalently be written as "every open neighborhood of every point intersects $A$", or equivalently "every [[inhabited set|inhabited]] open set intersects $A$", i.e. $A\cap U$ is [[inhabited]] for all inhabited open sets $U$.

Contraposing this, we obtain another equivalent definition "the only open subset not intersecting $A$ is the empty set", or "if $A\cap U=\emptyset$ for some open set $U$, then $U=\emptyset$".  This is the definition usually given when $X$ is a [[locale]]: a [[nucleus]] $j$ is dense if $j(0)=0$ (since $j(0)$ is the union of all opens whose "intersection with $j$" is $0$).

## Properties

* If $A \subseteq X$ is a dense subset of a topological space $X$ and $f: X \to Y$ is an [[epimorphism]], then the [[image]] $f(A)$ is dense in $Y$.

* If i: $A \hookrightarrow X$ and $j: X \hookrightarrow B$ are dense subspace inclusions, then so is the composite $j \circ i: A \to B$.

* If $A\subseteq X$ is a dense subset of topological space $X$ and $A$ is [[connected topological space|connected]], so is $X$.

* In point-set topology, a space is [[separable space|separable]] if and only if it has a dense subspace with [[countable set|countably]] many points.

* In [[locale]] theory, we have the curious property that any [[intersection]] of dense subspaces is still dense.  (This of course fails rather badly for [[topological spaces]], where the intersection of all dense topological subspaces is the space of [[isolated point]]s.)  One consequence is that every locale has a smallest dense sublocale, the [[double negation sublocale]].

\begin{proposition}

In the [[category]] of [[Hausdorff topological spaces]] (with [[continuous functions]] between them), the inclusion of a [[dense subspace]]

$$
  A \overset{\;\;i\;\;}{\hookrightarrow} X
$$

is an [[epimorphism]].

\end{proposition}

\begin{proof}

We have to show that for $(f,g)$ any [[pair]] of [[parallel morphisms]] out of $X$

$$
  A
  \overset{\;\;i\;\;}{\hookrightarrow}
  X
  \underoverset
  {\;\;g\;\;}
  {\;\;f\;\;}
  {\rightrightarrows}
  Y
$$

into a [[Hausdorff space]] $Y$, the [[equality]] $f \circ i = g \circ i$ implies $f = g$. With [[classical logic]] we may equivalently show the [[contrapositive]]: That $f \neq g$ implies $f \circ i \neq  g \circ i$.

So assume that $f \neq g$. This means that there exists $y \in Y$ with $f(y) \neq g(y)$. But since $Y$ is Hausdorff, there exist [[disjoint subset|disjoint]] [[open neighbourhoods]] $O_{f(y)},\;O_{g(y)} \subset Y$, i.e. $f(x) \in O_{f(x)}$ and $g(x) \in O_{g(x)}$ with $O_{f(x)} \cap O_{g(x)} = \varnothing$.

But their [[preimages]] must intersect at least in $x \in f^{-1}\big( O_{f(x)} \big) \cap g^{-1}\big(  O_{g(x)} \big)$. Since this intersection is an [[open subset]] (as preimages of open subsets are open by definition of [[continuous functions]], and since finite [[intersections]] of open subsets are open by the definition of [[topological spaces]]) there exists a point $a \in A$ with $i(a) \in f^{-1}\big( O_{f(x)} \big) \cap g^{-1}\big(  O_{g(x)} \big)$ (by definition of [[dense subset]]). But since then $f(i(a)) \in O_{f(x)}$ and $g(i(a)) \in O_{g(x)}$ while $O_{f(x)}$ is [[disjoint subset|disjoint]] from $O_{g(x)}$, it follows that $f(i(a)) \neq g(i(a))$. This means that $f \circ i \neq g \circ i$.

\end{proof}

## In constructive mathematics

In [[constructive mathematics]], the law of contraposition is not an equivalence, so we obtain two inequivalent notions of density:

* $A\subseteq X$ is **strongly dense** if $A\cap U$ is inhabited for all inhabited open sets $U\subseteq X$.
* $A\subseteq X$ is **weakly dense** if $A\cap U = \emptyset$ for some open $U\subseteq X$ implies $U=\emptyset$.

Of course, strong density implies weak density, since emptiness is non-inhabitation (whereas inhabitation is stronger than non-emptiness).  The two notions of density are related dually to the corresponding notions of [[closed subspace]]: $A$ is strongly dense iff its weak closure is all of $X$, and weakly dense iff its strong closure is all of $X$.

Note that the usual notion of density for [[sublocales]] $j(0)=0$ is an analogue of *weak* density, and could be called such.  There is also a notion of *strong* density for sublocales.  Since strong density refers to inhabited sets, one might expect strong density for sublocales to refer to [[positive elements]], and thus only be sensible for [[overt locales]]; but in fact it can be reformulated to make sense in all cases.

+--{: .un_defn}
###### Definition
A [[nucleus]] $j$ on a locale $X$ is **strongly dense** if $j(\hat{P})=\hat{P}$ for any [[truth value]] $P$, where $\hat{P} = \bigvee \{ X \mid P \}$.
=--

With classical logic, every truth value is either $\top$ or $\bot$, and we have $\hat{\top}=X$ (and any nucleus satisfies $j(X)=X$) while $\hat{\bot}=0$.  Thus classically strong and weak density coincide.  To see that this is really a notion of strong density, we prove:

+--{: .un_theorem}
###### Theorem
If $i:A\subseteq X$ is a sublocale such that $A$ and $X$ are both [[overt]], then $A$ is strongly dense if and only if for any positive open $U\in O(X)$, the intersection $A\cap U = i^*U \in O(A)$ is also positive.
=--
+--{: .proof}
###### Proof
First suppose $A$ is strongly dense, and let $U\in O(X)$ be positive.  Let $P$ be the truth value of the statement "$i^*U \in O(A)$ is positive".  We want to show that $P$ is true, for which it suffices to show that $\hat{P} = \bigvee \{ X \mid P \}$ is positive, since then its covering $\{ X \mid P \}$ would be inhabited and thus $P$ would be true.  And since $U$ is positive, it suffices to show $U \subseteq \hat{P}$.

Now since $A$ is strongly dense, $j_A(\hat{P}) = \hat{P}$, which is to say that $\hat{P} = i_*(i^*\hat{P})$.  By adjointness, therefore, to show $U \subseteq \hat{P}$ it suffices to show $i^*U \subseteq i^*\hat{P} = \bigvee \{ A \mid P\}$.  Now since $A$ is overt, $i^*U$ can be covered by positive opens, so it suffices to show that for any positive $V\subseteq i^*U$ we have $V\subseteq \bigvee \{ A \mid P\}$.  But if $V\subseteq i^*U$ is positive, then $i^*U$ is also positive, i.e. $P$ is true, and thus $\bigvee \{ A \mid P\} = A$, which contains $V$.

Now suppose conversely that for any positive $U\in O(X)$, $i^*U$ is also positive, and let $P$ be any truth value; we must show $i_* i^*\hat{P} \subseteq \hat{P}$.  Since $X$ is overt, $i_* i^*\hat{P}$ can be covered by positive opens, so it suffices to show that for any positive $U\subseteq i_* i^*\hat{P}$ we have $U\subseteq \hat{P}$.  But by adjointness, $U\subseteq i_* i^*\hat{P}$ is equivalent to $i^*U \subseteq i^*\hat{P}$, and by assumption $i^*U$ is also positive.  Thus, $i^*\hat{P} = \bigvee \{ A \mid P\}$ is positive, which means that $P$ is true, and hence $\hat{P} = X$ and so $U\subseteq \hat{P}$.
=--

Since spatial locales are overt, and their positivity predicate coincides with inhabitedness, we have in particular:

+--{: .un_cor}
###### Corollary
If $i:A\subseteq X$ is a subspace of a topological space, then $A$ is strongly dense as a topological subspace if and only if it is strongly dense as a sublocale.
=--

Strong density for sublocales gives rise to a corresponding notion of [[weakly closed sublocale]].  It is also the specialization of the notion of [[fiberwise dense sublocale]] to the case of locale maps $X\to 1$.

## Related concepts

* [[dense]]

* [[dense subalgebra]]

* [[dense subtopos]]

* [[closed subspace]]

* [[nowhere dense set]]

## References

Strongly dense sublocales are discussed in

* [[Sketches of an Elephant]], C1.1 and C1.2

* [[Peter Johnstone]], *A constructive 'closed subgroup theorem' for localic groups and groupoids*, Cahiers de Topologie et Géométrie Différentielle Catégoriques (1989),  Volume: 30, Issue: 1, page 3-23 [link](https://eudml.org/doc/91430)

* [[Mamuka Jibladze]], [[Peter Johnstone]], *The frame of fibrewise closed nuclei*, Cahiers de Topologie et Géométrie Différentielle Catégoriques (1991), Volume: 32, Issue: 2, page 99-112, [link](https://eudml.org/doc/91478)

* [[Peter Johnstone]], *Fiberwise separation axioms for locales*

[[!redirects dense subspace]]
[[!redirects dense subspaces]]
[[!redirects dense subset]]
[[!redirects dense subsets]]
[[!redirects dense set]]
[[!redirects dense sets]]
[[!redirects dense topological subspace]]
[[!redirects dense topological subspaces]]

[[!redirects everywhere dense]]
[[!redirects everywhere dense subspace]]
[[!redirects everywhere dense subspaces]]
[[!redirects everywhere dense subset]]
[[!redirects everywhere dense subsets]]
[[!redirects everywhere dense set]]
[[!redirects everywhere dense sets]]
[[!redirects everywhere dense topological subspace]]
[[!redirects everywhere dense topological subspaces]]

[[!redirects strongly dense subspace]]
[[!redirects strongly dense subspaces]]
[[!redirects strongly dense subset]]
[[!redirects strongly dense subsets]]
[[!redirects strongly dense set]]
[[!redirects strongly dense sets]]
[[!redirects strongly dense topological subspace]]
[[!redirects strongly dense topological subspaces]]

[[!redirects weakly dense subspace]]
[[!redirects weakly dense subspaces]]
[[!redirects weakly dense subset]]
[[!redirects weakly dense subsets]]
[[!redirects weakly dense set]]
[[!redirects weakly dense sets]]
[[!redirects weakly dense topological subspace]]
[[!redirects weakly dense topological subspaces]]

[[!redirects dense sublocale]]
[[!redirects dense sublocales]]
[[!redirects dense nucleus]]
[[!redirects dense nuclei]]

[[!redirects strongly dense sublocale]]
[[!redirects strongly dense sublocales]]
[[!redirects strongly dense nucleus]]
[[!redirects strongly dense nuclei]]

[[!redirects weakly dense sublocale]]
[[!redirects weakly dense sublocales]]
[[!redirects weakly dense nucleus]]
[[!redirects weakly dense nuclei]]


dense subtopos

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
###Context###
#### Topos Theory
+--{: .hide}
[[!include topos theory - contents]]
=--
=--
=--

#Contents#
* table of contents
{:toc}

## Idea

The concept of **dense subtopos** generalizes the concept of a [[dense subspace]] from topology to toposes. A _[[subtopos]]_ is _dense_ if it contains the [[initial object]] $\varnothing$ of the ambient [[topos]].

## Definition

Let $i:\mathcal{E}_j\hookrightarrow \mathcal{E}$ be a [[subtopos]] with corresponding [[Lawvere-Tierney topology]] $j$. $\mathcal{E}_j$ is called _dense_ if the following equivalent conditions hold:

* $j\circ\bot=\bot$ (with $\bot: 1\to\Omega$ the classifying map of $\emptyset\rightarrowtail 1$).

* $\emptyset\rightarrowtail 1$ is $j$-closed.

* $\emptyset$ is a $j$-sheaf.

* the [[direct image]] satisfies $i_\ast (\emptyset)\simeq\emptyset$.

* the [[inverse image]] satisfies: from $i^\ast (Z)\simeq\emptyset$ follows $Z\simeq\emptyset$.

A topology $j$ satisfying these conditions is also called _dense_.

### Remark

$j\circ\bot$ classifies the $j$-closure $\bar{\emptyset}$ of $\emptyset$ whence $j\circ\bot = \bot$ iff $\bar{\emptyset}=\emptyset$ i.e. $\emptyset\rightarrowtail 1$ is $j$-closed. Since $1$ is a $j$-sheaf for any topology $j$ and subobjects of $j$-sheaves in general are $j$-closed precisely when they are $j$-sheaves, this is equivalent to $\emptyset$ being a $j$-sheaf. Another way to say this is that $\emptyset$ is preserved by $i_\ast$.

The equivalence between the last two formulations follows from the adjunction $i^\ast\dashv i_\ast$ and the [[strict initial object|strictness]] of $\emptyset$ in a topos: $id_{i_\ast(\emptyset)}$ corresponds under the adjunction to a map $i^\ast( i_\ast (\emptyset))\to \emptyset$ showing that $i^\ast (i_\ast(\emptyset))\simeq\emptyset$ in general. Conversely, $id_{i^\ast (Z)}$ corresponds to a map $Z\to i_\ast(i^\ast(Z))$ showing that $Z\simeq\emptyset$ provided $i^\ast(Z)\simeq\emptyset$ and $i_\ast(\emptyset)\simeq\emptyset$.

In [[SGA4]] (p.430) another equivalent formulation is on offer, namely it suffices to check the last condition on [[subterminal object|subterminal objects]] $Z$ (because $i_\ast(\emptyset)$ is a subterminal in general since $i_\ast$ as a right adjoint preserves monos hence subterminals). An even more comprehensive list can be found in ([Caramello 2012](#Caramello12), p.9).

The last two conditions make sense not only for embeddings: general [[geometric morphisms]] fulfilling them are called [[dominant geometric morphism|dominant]]. So another way to express that $i:\mathcal{E}_j\hookrightarrow\mathcal{E}$ is a dense subtopos is to say that the inclusion $i$ is **dominant**.

Notice that there is also a certain [[Grothendieck topology]] on small categories $\mathcal{C}$ called the [[dense topology]] whose corresponding [[Lawvere-Tierney topology]] on $Set^{\mathcal{C}^{op}}$ is dense in the above sense, and coincides with the [[double negation|double-negation topology]] $\neg\neg$ on $Set^{\mathcal{C}^{op}}$.

## Properties

### Some basic observations

Of course, the composition $k\circ j$ of dense inclusions $j,k$ is again dense. Conversely, we have

+-- {: .num_prop #dense_factors}
###### Proposition
Given the following commutative diagram
$$
  \array{
    \mathcal{E}_i &\overset{j}{\to}& \mathcal{E}
    \\
     &{i}{\searrow}& \uparrow k
    \\
     & & \mathcal{E}_k
  }
$$
where $i,j,k$ are subtopos inclusions. When $j$ is dense, then $i$ and $k$ are dense as well.
=--

**Proof**: Suppose $\emptyset =i^\ast (Z)$. Since $k$ is an inclusion we have that the counit $\epsilon:k^\ast k_\ast\to id_{\mathcal{E}_k}$ is a natural isomorphism whence $Z= k^\ast k_\ast (Z)$ and therefore

$$\emptyset =i^\ast(Z)=i^\ast(k^\ast k_\ast (Z))=i^\ast k^\ast (k_\ast (Z))=j^\ast(k_\ast(Z))\quad .$$

From which $k_\ast(Z)=\emptyset$ since $j$ is dense by assumption.

Then $Z=k^\ast k_\ast (Z)=k^\ast (\emptyset)=\emptyset$ since $k^\ast$ preserves colimits, in other words, we have shown that $i$ is dense.

But from $k_\ast (Z)=\emptyset$ and $Z=\emptyset$ follows that $k$ is dense as well. $\qed$

Given two dense topologies $j_1$, $j_2$ on a topos $\mathcal{E}$, their join $j_1\vee j_2$ is again dense.

This follows from the general fact that $Sh_{j_1\vee j_2}(\mathcal{E})$ corresponds to the meet, i.e. the intersection of the corresponding subtoposes $Sh_{j_1}(\mathcal{E})\cap Sh_{j_2}(\mathcal{E})$ in the [[lattice of subtoposes]], and this obviously contains $\emptyset_\mathcal{E}$ for $j_1$, $j_2$ dense.

In other words, the intersection of two dense subtoposes is still dense!

Somewhat surprisingly, this still holds if one takes the intersection of _all_ dense subtoposes, as the next section details.

### Relation to double-negation topology {#double_negation}

For any topos $\mathcal{E}$, its [double negation topology](double+negation#DoubleNegationTopology) gives the _smallest_ dense subtopos. This agrees with the [situation for locales](double+negation#double_negation_locale) but contrasts with the [[dense subspace|situation for topological spaces]] where, in general, smallest dense subspaces do not exist.

+-- {: .num_prop #smallest_dense_subtopos}
###### Proposition
$Sh_{\not\not}(\mathcal{E}) \hookrightarrow \mathcal{E}$ is the smallest dense subtopos.
=--
([Johnstone, below Corollary 4.5.20](#Johnstone02))

In fact, dense topologies are characterized by their relation to $\neg\neg$:

+-- {: .num_prop #negdense}
###### Proposition
Let $\mathcal{E}$ be a topos. A topology $j$ satisfies $j\le\neg\neg$ , i.e. $j$ is dense, iff $(\mathcal{E}_j)_{\not\not}=\mathcal{E}_{\not\not}$.
=--

([Blass-Scedrov 1983](#BlassScedrov83), p.19, [Caramello 2012](#Caramello12), p.9, see also at [double negation](#boolean_subtopos)).

From this and the fact that $\mathcal{E}$ is trivially dense, follows:

+-- {: .num_prop #prop_boolean}
###### Proposition
A topos $\mathcal{E}$ is [[Boolean topos|Boolean]] iff $\mathcal{E}$ has exactly one dense subtopos, namely $\mathcal{E}_{\neg\neg}=\mathcal{E}$.
=--

Notice that, though these results prevent a topos from having more than one _dense_ Boolean subtopos, nothing prevents a topos from having more than one _Boolean_ subtopos e.g. the [[Sierpinski topos]] $Set^{\to}$ has two non trivial ones that complement each other in the [[lattice of subtoposes]]. This example, incidentally, also shows that in the [above proposition](#negdense) just $(\mathcal{E}_j)_{\neg\neg}\cong\mathcal{E}_{\neg\neg}$ wouldn't do.

### The (dense,closed)-factorization

A [[geometric embedding]] of [[elementary toposes]]

$$
  Sh_j(\mathcal{E}) \hookrightarrow \mathcal{E}
$$

factors as

$$
  Sh_j(\mathcal{E})
    \hookrightarrow
  Sh_{c(ext(j))}(\mathcal{E})
    \hookrightarrow
  \mathcal{E}
$$

where $ext(j)$ (the "exterior" of $j$) denotes the $j$-closure of $\emptyset \rightarrowtail 1$ and

$$
  \bar j \coloneqq c(ext(j))
$$

the [[closed subtopos|closed topology]] corresponding to the [[subterminal object]] $ext(j)$.

Here the first inclusion exhibits a dense subtopos and the second a [[closed subtopos]].

This is the so called _[[(dense,closed)-factorization]]_ and implies e.g. that _proper_ dense subtoposes aren't closed.

Dense inclusions participate also in the description of [[skeletal geometric morphism|skeletal inclusions]] as the closure of [[open subtopos|open inclusions]] under composition with dense inclusions.

### Some parallels to topology{#parallels_topology}

The above terminology suggests to view a _dense subtopos_ as one with an _empty exterior_.

This analogy to topology is pursued further in ([SGA4](#SGA4), p.462) where a dense subtopos is characterized as a subtopos $Sh_j(\mathcal{E})$ whose 'exterior' $Ext(Sh_j(\mathcal{E}))$ (i.e. the [[open subtopos]] that corresponds to the [[subterminal object]] $ext(j)$) is trivial and whose 'closure' $Cl(Sh_j(\mathcal{E})):=Sh_{c(ext(j))}(\mathcal{E})$ (i.e. the [[closed subtopos]] corresponding to $ext(j)$) coincides with the 'whole space' $\mathcal{E}$.

Let's have a look at some of the details:

Due to the construction of [[open subtopos|open subtoposes]] we know that the objects of $Ext(Sh_j(\mathcal{E}))$ have the form $X^{ext(j)}$ for some $X\in\mathcal{E}$. Hence the exterior is trivial, i.e. $X^{ext(j)}=1$ for all $X\in\mathcal{E}$, precisely when $\bar\emptyset =ext(j)\simeq \emptyset$ which means that $Sh_j(\mathcal{E})$ is dense. By construction $Cl(Sh_j(\mathcal{E}))$ is the [[complement]] of $Ext(Sh_j(\mathcal{E}))$ in the lattice of subtoposes hence $Cl(Sh_j(\mathcal{E}))=\mathcal{E}$ in case the latter is trivial. This follows also directly from the description of objects in $Cl(Sh_j(\mathcal{E}))$ as those objects $X\in\mathcal{E}$ with $X\times ext(j)\cong ext(j)$.

E.g. let $Sh_k(\mathcal{E})$ be a subtopos that has a trivial intersection with a non-trivial open subtopos $Sh_o(\mathcal{E})$. Then $Sh_k(\mathcal{E})$ is contained in the (closed) complement of $Sh_o(\mathcal{E})$ hence $Cl(Sh_k(\mathcal{E}))\neq \mathcal{E}$ and we see that $Sh_k(\mathcal{E})$ cannot be dense: we have recuperated the familiar fact from point-set topology that a [[dense subspace|dense subset]] intersects all non-trivial open sets non-trivially.

Another easy result in this vein is

+-- {: .num_prop}
###### Proposition
Let $i:Sh_j(\mathcal{E})\hookrightarrow\mathcal{E}$ be a dense subtopos that is [[connected object|connected]] in the sense that $1$ is indecomposable: if $W\coprod Z=1$ then $W=\emptyset$ or $Z=\emptyset$. Then $\mathcal{E}$ is connected as well.
=--

**Proof**: Let $X\coprod Y = 1$ be a decomposition of $1$ in $\mathcal{E}$. Since $i^\ast$ is a left exact left adjoint, it preserves coproducts and the terminal object and $i^\ast(X)\coprod i^\ast (Y)$ is therefore a decomposition of $1$ in $Sh_j(\mathcal{E})$ hence trivial by assumption. Let's say $i^\ast(X)\simeq\emptyset$ but $Sh_j(\mathcal{E})$ is dense and therefore we can conclude $X\simeq\emptyset$ hence $X\coprod Y = 1$ is trivial as well. $\qed$

###Example I: two-valued toposes

Presheaf toposes $Set^{M^{op}}$ of actions of a monoid $M$ are classical examples of toposes whose truth value objects $\Omega$ have exactly two global points $1\to\Omega$ without the toposes being necessarily Boolean. In fact they are Boolean precisely when $M$ is a group.

As the next proposition shows, they are also instances of toposes in which only the degenerate subtopos fails to be dense:

+-- {: .num_prop}
###### Proposition
The non-degenerate subtoposes $Sh_j(\mathcal{E})$ of a [[two-valued topos]] $\mathcal{E}$ are precisely the dense subtoposes of $\mathcal{E}$.
=--

**Proof**: Truth values $1\to\Omega$ correspond precisely to subobjects of $1$. Hence the $j$-closure $ext(j)$ of $\emptyset\rightarrowtail 1$ is either $\emptyset$ or $1$. In the first case, $Sh_j(\mathcal{E})$ is dense, in the second, from $X\times 1=1$ for $X\in Cl(Sh_j(\mathcal{E}))$ follows triviality. $\qed$

Combining this with the [above](#prop_boolean) shows that _two-valued and Boolean toposes are opposite extremes_ when it comes to dense subtoposes and the following observation (cf. [Caramello (2009)](#Caramello09); prop. 10.1) follows immediately:

+-- {: .num_prop}
###### Proposition
A topos $\mathcal{E}$ that is two-valued and Boolean has no non-trivial subtoposes. $\qed$
=--

In other words, two-valued Boolean toposes are atoms in the lattice of subtoposes. Notice that this applies e.g. to well-pointed toposes.

### Example II: persistent localizations

Recall that a [[persistent localization]] is given by a [[Lawvere-Tierney topology]] $j$ with the property that every $j$-separated object is a $j$-sheaf. But separated objects are closed under taking subobjects and therefore in the case of persistent $j$, subobjects of $j$-sheaves are themselves $j$-sheaves.

In particular, this applies to $\emptyset\rightarrowtail 1$, since $1$ is always a sheaf. Whence $\emptyset$ is a $j$-sheaf and we see that **persistent localizations are dense**. This includes e.g. 'quintessential localizations' aka [[quality type|quality types]].

This observation is due to [Johnstone (1996)](#Johnstone96).

By the [above proposition](#prop_boolean) it follows immediately that every persistent localization of a Boolean topos is trivial.

### Relation to Aufhebung

Notice that, since the [[localization]] $L$ corresponding to a subtopos is a [[left exact functor]], all subtoposes necessarily contain the [[terminal object]] $\ast$ of the ambient topos. Moreover, the [[idempotent comonad]] and [[idempotent monad]] constant on the [[initial object]] and [[terminal object]], respectively, are [[adjoint functor|adjoint]] to each other (forming an [[adjoint modality]]). Denoting by "$\vee$" the inclusion of [[modal objects]], then the general situation for any subtopos localized on by $L$ is depicted by

$$
  \array{
     && L
     \\
     && \vee
     \\
     \emptyset &\dashv& \ast
  }
  \,.
$$

In view of this, the subtopos being dense says that not only $\ast$, but this whole [[adjoint modality]] that it participates in sits inside the subtopos. [[Lawvere]] had proposed to call this situation **resolution** or (a special minimal version of it) _[[Aufhebung]]_ of the [[unity of opposites]] expressed by $\emptyset \dashv \ast$ ("[[becoming]]").

In other words, for an [[level| essential subtopos]] _being dense is equivalent to resolve_ $\emptyset \dashv \ast$ in the Hegelian calculus of [[level of a topos|levels]]!

#### Example: essential subtoposes of the topos of globular sets

[Kennett-Riehl-Roy-Zaks (2011)](#KRRZ11) show that in the [[gros topos]] $Set^{\mathcal{G}^{op}}$ of reflexive [[globular sets]] essential subtoposes correspond to [[n-truncation modality|dimensional truncations]] (plus the level ${Set^{\mathcal{G}^{op}}}$ 'at infinity'). Then [[level]] $n+1$ is the Aufhebung of $n$ starting from $\emptyset\dashv\ast$ at level $0$. In general, the Aufhebung $\bar{l}$ of a level $l$ resolves all the levels that $l$ resolves. Therefore in $Set^{\mathcal{G}^{op}}$ all essential subtoposes (above 0) resolve $\emptyset\dashv\ast$ and hence are _dense_!

## Related entries

* [[dense]]

* [[dense subspace]]

* [[(dense,closed)-factorization]]

* [[dominant geometric morphism]]

* [[skeletal geometric morphism]]

* [[dense topology]]

* [[double negation]]

* [[dense subcategory]]

## References

* {#SGA4}[[M. Artin]], [[A. Grothendieck]], [[J. L. Verdier]], _Théorie des Topos et Cohomologie Etale des Schémas ([[SGA4]])_, LNM **269** Springer Heidelberg 1972. (pp.429-430, 462)

* {#BlassScedrov83}[[Andreas Blass]], Andrej Scedrov, _Boolean Classifying Topoi_ , JPAA **28** (1983) pp.15-30.

* {#Cara09} [[Olivia Caramello]], _Lattices of theories_ , arXiv:0905.0299 (2009). ([abstract](http://arxiv.org/abs/0905.0299))

* {#Caramello12}[[Olivia Caramello]], _Topologies for intermediate logics_ , arXiv:1205.2547 (2012). ([abstract](http://arxiv.org/abs/1205.2547))

* {#Johnstone96}[[Peter Johnstone]], _Remarks on Quintessential and Persistent Localizations_ , TAC **2** no.8 (1996) pp.90-99. ([pdf](http://www.tac.mta.ca/tac/volumes/1996/n8/n8.pdf))

* {#Johnstone02} [[Peter Johnstone]], _[[Sketches of an Elephant]] I_, Oxford UP 2002. (pp.211,219-220)

* {#KRRZ11} C. Kennett, [[Emily Riehl|E. Riehl]], M. Roy, M. Zaks, _Levels in the toposes of simplicial sets and cubical sets_ , JPAA **215** no.5 (2011) pp.949-961. (preprint as [arXiv:1003.5944](http://arxiv.org/abs/1003.5944))

[[!redirects dense subtoposes]]


dense topology

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}

### Context
#### Category theory
+-- {: .hide}
[[!include category theory - contents]]
=--
#### Topos Theory
+-- {: .hide}
[[!include topos theory - contents]]
=--
=--
=--

# Contents
* automatic table of contents goes here
{:toc}

## Idea

The **dense topology** is a [[Grothendieck topology]] $J_d$ on a small category $\mathcal{C}$ whose [[sieves]] generalize the idea of a 'downward dense' [[poset]]. The corresponding sheaf topos $Sh(\mathcal{C},J_d)$ yields the [[double negation|double negation subtopos]] of the [[presheaf topos]] on $\mathcal{C}$.

The dense topology is important for sheaf-theoretic approaches to [[forcing|forcing in set theory]]  (cf. [[continuum hypothesis]]).

There is also a closely related but more general concept of a _dense_ [[Lawvere-Tierney topology]] which is discussed at [[dense subtopos]].

## Definition

Let $\mathcal{C}$ be a category. The _dense topology_ $J_d$ is the [[Grothendieck topology]] with collections of [[sieves]] $J_d(Y)$ of the form:

A sieve $S$ is in $J_d(Y)$ iff for all $f:X\to Y$ there exists a $g:Z\to X$ such that $f\circ g:Z\to Y$ is in $S$.

## Properties

Recall that a category $\mathcal{C}$ satisfies the [[Ore condition]] if every diagram $X\rightarrow W\leftarrow Y$ can be completed to a commutative square. In this case the dense topology has a simpler description as the collection of all nonempty sieves and is called the [[atomic site|atomic topology]] $J_{at}$ on $\mathcal{C}$ :

+-- {: .num_prop #atomic_dense}
###### Proposition
Let $\mathcal{C}$ be a [[category]] satisfying the [[Ore condition]]. Then the dense topology $J_d$ coincides with the atomic topology $J_{at}$.
=--

For the (easy) argument see at [[atomic site]]. One direction relies on the following straight forward

+-- {: .num_prop #atomic_dense}
###### Observation
If $S\in J_d$ then $S\neq \emptyset$ . $\qed$
=--

Note that the coincidence with the atomic topology on categories satisfying the Ore condition affords for the sheaves of $J_d$ the following simple description in such cases:

+-- {: .num_prop #atomic_sheaf}
###### Proposition
Let $(\mathcal{C}, J_{d})$ be a site such that $\mathcal{C}$ satisfies the Ore condition. A presheaf $P\in Set^{\mathcal{C}^{op}}$ is a sheaf for $J_{d}$ iff for any morphism $f:D\to C$ and any $y\in P(D)$ , if $P(g)(y)=P(h)(y)$ for all diagrams
$$
E\overset{g}{\underset{h}{\rightrightarrows}} D\overset{f}{\to} C
$$
with $f\cdot g=f\cdot h$ , then $y=P(f)(x)$ for a unique $x\in P(C)$.
=--

For the proof see Mac Lane-Moerdijk ([1994](#MM94), pp.126f).

+-- {: .num_remark}
###### Remark
It is possible to define the atomic topology $J_{at}$ on arbitrary categories $\mathcal{C}$ as the smallest topology containing all non-empty sieves. Then  observation \ref{atomic_dense} implies that $J_d\subseteq J_{at}$, and accordingly, $Sh(\mathcal{C},J_{at})\subseteq Sh(\mathcal{C},J_d)$ . But $J_d=J_{at}$ precisely if $\mathcal{C}$ satisfies the Ore condition (for details see at [[atomic site]]).
=--

The next result warrants the importance of the dense topology:

+-- {: .num_prop}
###### Proposition
Assuming the law of excluded middle, for every small category $\mathcal{C}$, the [[Lawvere-Tierney topology]] on the [[presheaf topos]] $Set^{\mathcal{C}^{op}}$ corresponding to the dense topology on $\mathcal{C}$ is the [[double negation|double negation topology]] $\neg\neg$ on $Set^{\mathcal{C}^{op}}$ . In other words,
$Sh(\mathcal{C},J_d)\simeq Sh_{\neg\neg}(Set^{\mathcal{C}^{op}})$ .
=--

This appears as ([MacLaneMoerdijk, corollary VI.1.5](#MacLaneMoerdijk)).

In particular, the [[Lawvere-Tierney topology]] corresponding to the dense topology is [[dense subtopos|dense as a Lawvere-Tierney topology]]!

## Related entries

* [[dense]]

* [[atomic site]]

* [[double negation]]

* [[dense subtopos]]

* [[continuum hypothesis]]

## Reference

* {#MacLaneMoerdijk} [[Saunders Mac Lane]], [[Ieke Moerdijk]], _[[Sheaves in Geometry and Logic]]_ , Springer Heidelberg 1994. (pp.115, 273)


density

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
### Context
#### Bundles
+-- {: .hide}
[[!include bundles - contents]]
=--
#### Differential geometry
+-- {: .hide}
[[!include synthetic differential geometry - contents]]
=--
=--
=--

# Contents
* table of contents
{: toc}

## Idea

A _density_ on a [[manifold]] of [[dimension]] $n$ is a [[function]] that to each point assigns an [[infinitesimal object|infinitesimal]] [[volume]] (in general signed, and possibly degenerate), hence a volume  of $n$-[[hypercubes]] in the [[tangent space]] at that point.  A positive definite density is equivalently a _[[volume element]]_ (or a volume form on an [[orientation|oriented]] manifold).

## Definition

For $X$ a [[manifold]] its **1-density bundle** is the  real [[line bundle]] [[associated bundle|associated]] to the [[principal bundle]] underlying the [[tangent bundle]] by the 1-dimensional [[representation]] of the [[general linear group]]

$$
  \array{
  GL(n) &\to& GL(1) \simeq Aut_{Vect}(\mathbb{R}^1)
  \\
  A &\mapsto& |det(A)|^{-1}.
  }
$$

A [[section]] of the $1$-density bundle on $X$ is called a _$1$-density on $X$_.

This is the general object against which one has [[integration]] of functions on $X$.

More generally, for $s \in \mathbb{R} - \{0\}$ an **$s$-density** is a section of the [[line bundle]] which is [[associated bundle|associated]] to the principal bundle by the representation

$$
  \array{
  GL(n) &\to& GL(1) \simeq Aut_{Vect}(\mathbb{R}^1)
  \\
  A &\mapsto& |\det(A)|^{-s}.
  }
$$

The parameter $s$ is called the __weight__ of the density.  In particular for $s = 1/2$ one speaks of **half-densities**.

## Properties and applications

### Physical interpretation

We earlier spoke of a density (of weight $1$) $\rho$ as a measure of [[volume]], but in application to [[physics]] a density on [[spacetime]] (or space) might as easily be a measure of some other [[extensive quantity]] $Q$ (say, [[mass]]).  We then call $\rho$ the __$Q$-density__ (say, _mass density_); the [[integration of differential forms|integral]] of $\rho$ over a region $R$ is the amount of $Q$ in $R$.

Relative to a nondegenerate notion of volume given by another density $vol$, the ratio $\rho/vol$ is a [[scalar field]], an [[intensive quantity]] which is often also referred to as the _density_.  But $\rho$ itself is more fundamental in the [[geometry of physics]].

### Wave functions and canonical Hilbert spaces

In the context of [[geometric quantization]] one considers spaces of [[sections]] of [[line bundles]] ("[[prequantum line bundles]]") and tries to equip these with an [[inner product]] given by pointwise pairing followed by [[integration]] over the base such as to then [[completion|complete]] to a [[Hilbert space]].

One can define the [[integration]] against a fixed chosen [[measure]], but more canonical is to instead form the [[tensor product]] of the prequantum line bundle with the bundle of half-densities. The compactly supported sections of that tensor bundle can then naturally be integrated. This is sometimes called the "canonical Hilbert space" construction (e.g. ([Bates-Weinstein](#BatesWeinstein))).

## Related concepts

* [[volume form]]

* [[canonical bundle]], [[determinant line bundle]]

* [[pseudoscalar field]]

* [[canonical Hilbert-space of half-densities]]

* [[Verdier duality]]

[[!include square roots of line bundles - table]]

## References

A textbook account is for instance on p. 29 of

* [[Nicole Berline]], [[Ezra Getzler]], [[Michele Vergne]], _Heat kernels and Dirac operators_, Springer (2004)

Discussion of half-densities in the context of [[geometric quantization]] is in

* {#BatesWeinstein} Sean Bates, [[Alan Weinstein]], _Lectures on the geometry of quantization_, [pdf](http://www.math.berkeley.edu/~alanw/GofQ.pdf)

[[!redirects density]]
[[!redirects densities]]

[[!redirects density bundle]]
[[!redirects density bundles]]
[[!redirects density line bundle]]
[[!redirects density line bundles]]

[[!redirects half-density]]
[[!redirects half-densities]]

[[!redirects half-density bundle]]
[[!redirects half-density bundles]]
[[!redirects half-density line bundle]]
[[!redirects half-density line bundles]]


density functional theory

__Density functional theory__ is a particular computational method used in quantum chemistry and condensed matter theory.

A review is in

* K. Capelle, _A bird's-eye view of density-functional theory_, [cond-mat/0211443](https://arxiv.org/abs/cond-mat/0211443)
* [wikipedia](https://en.wikipedia.org/wiki/Density_functional_theory)


density matrix

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
### Context
#### Measure and probability theory
+-- {: .hide}
[[!include measure theory - contents]]
=--
#### Physics
+-- {: .hide}
[[!include physicscontents]]
=--
=--
=--

# Contents
* table of contents
{: toc}

## Idea

In [[quantum mechanics]] a _density matrix_ is a linear endomorphism of a [[Hilbert space]] of pure [[quantum states]] that represents a [[statistical ensemble]] of [[quantum states]], hence [[state on a star-algebra|states]] which are not necessarily [[pure states]] but [[mixed states]].

The space of density matrices inside all suitable endomorphisms is called the _[[Bloch region]]_.

## Notation

In the following definition, we use Dirac's "bra-ket" notation for vectors where a state vector, describing a [[pure state]] of a quantum system, is represented by a "ket" which is a column vector,

$$ {|\psi_{\alpha}\rangle} = \left(
\begin{aligned}
\vdots \\
x_{n-1} \\
x_{n} \\
x_{n+1} \\
\vdots
\end{aligned}
\right) .$$

The [[Hermitian adjoint]], ${\langle\psi_{\alpha}|} = ({|\psi_{\alpha}\rangle})^{\dagger}$, is called a "bra" (hence "bra(c)ket") and is a row vector.

## The density operator of an ensemble

Suppose we have a [[quantum state]] $Q$ that arises from some random process such that the state ${|\psi_{\alpha}\rangle}$ has a probability $p_{\alpha} \in [0,1]$ (we often speak of having 'prepared' the state with the associated probability).  The possible states ${|\psi_{\alpha}\rangle}$ need not be orthogonal and we thus call such a collection of states a *[[mixed state]]*.  More specifically, a mixed state is often described as an *[[ensemble]]* of quantum systems.

Suppose we now measure some observable $\mathbf{A}$ on the system as a whole, i.e. on the ensemble.  The expectation value of $\mathbf{A}$ over the state ${|\psi_{\alpha}\rangle}$ is $\langle{A}\rangle_{\alpha} = \langle\psi_{\alpha} | \mathbf{A} |\psi_{\alpha}\rangle$.  Over the entire ensemble, this becomes

$$ \langle{A}\rangle = \sum_{\alpha} p_{\alpha} \langle{A}\rangle_{\alpha} = \sum_{\alpha} p_{\alpha} tr {|\psi_{\alpha}\rangle} {\langle\psi_{\alpha}|} \mathbf{A} .$$

Given the above, we define the __density operator__ to be

$$ \mathbf{\rho} = \sum_{\alpha} \rho_\alpha {|\psi_{\alpha}\rangle}{\langle\psi_{\alpha}|} .$$

We call the [[matrix]] representation of the density operator, relative to a given [[basis]], the __density matrix__.

## Characterisation

An operator $\rho$ is the density operator associated to some ensemble if and only if it is a positive operator with trace 1.  (Nielsen and Chuang Theorem 2.5, p. 101)

## Coherence

Diagonal density matrices with at least two non-zero terms on the diagonal represent *[[mixed state]]s*.  Density matrices that possess non-zero off-diagonal terms represent *[[superposition state]]s*.  Such states are referred to as *coherent* and the off-diagonal entries are called the *coherences*.  Any physical process that has the effect of suppressing the coherences is known as *[[decoherence]]*.

## Quantum doubles

Given a pure state on the tensor product of Hilbert spaces
$V\otimes W$, the partial trace $\tr_W$ specifies a mixed state on $V$. Moreover, every mixed state comes from the partial trace of a pure state. Hence, this gives an alternate characterization of what a density matrix is: The image of the "pure state" outer products $|\psi\rangle\langle\psi|$ under partial trace.

Even better, given a density matrix $\rho\in V$ one can explicitly construct a pure state which traces to it. Expand $\rho$ as

$$\rho=\sum_{\alpha}\rho_\alpha |\psi_\alpha \rangle \langle \psi_\alpha |.$$

The states $| \psi_{\alpha}\rangle$ serve as a basis for $V$, and the states $\langle\psi_\alpha |$ serve as a basis for $V^*$. Hence, we can consider the state

$$\tilde{\rho}=\sum_{\alpha}\sqrt{\rho_\alpha}|\psi_\alpha \rangle\otimes \langle \psi_\alpha |\in V\otimes V^*.$$

Tracing $V^*$ out of $\tilde{\rho}$ allows us to recover $\rho$. This can be seen in the following computation:

$$
\begin{aligned}
\tr_{V^*}(\tilde{\rho} \tilde{\rho}^{\dagger})&=\left(\sum_{\alpha}\sqrt{\rho_\alpha}|\psi_\alpha \rangle\otimes \langle \psi_\alpha |\right)
\otimes \left(\sum_{\alpha}\sqrt{\rho_\alpha}|\psi_\alpha \rangle\otimes \langle \psi_\alpha |\right)^{\dagger}\\
&=\left(\sum_{\alpha}\sqrt{\rho_\alpha}|\psi_\alpha \rangle\otimes \langle \psi_\alpha |\right)
\otimes \left(\sum_{\alpha}\sqrt{\rho_\alpha}\langle\psi_\alpha |\otimes |\psi_\alpha \rangle\right)\\
&=\sum_{\alpha,\beta}\sqrt{\rho_{\alpha}}\sqrt{\rho_{\beta}}|\psi_\alpha \rangle \langle \psi_\beta | \otimes \langle \psi_\alpha | \psi_\beta \rangle\\
&=\sum_{\alpha}\rho_\alpha |\psi_\alpha \rangle \langle \psi_\alpha |=\rho.
\end{aligned}
$$

## Limitations

Note that a density operator, as the representation of the state of a quantum system, is less restrictive than a state vector which specifies the wavefunction.  On the other hand, two different state vectors can give rise to the same density operator. However, in that case, the two vectors are the same up to a phase, so arguably the density operator still describes the [[physical state]] unambiguously.

More controversially, two entirely different probabilisitic combinations of state vectors can give rise to the same density operator. [[Roger Penrose]], for one, has argued that this means that that the density operator does not describe mixed states unambiguously. But one can also argue the reverse: that mixed states with the same operator really are the same physical state, since they are observationally indistinguishable.

## Related concepts

* [[maximally mixed quantum state]]

* [[quantum channel]]

* [[quantum computation]]

[[!include states and observables -- content]]

## References

The notion of density matrices originates with

* {#vonNeumann32} [[John von Neumann]], §IV, §V in:

  *Mathematische Grundlagen der Quantenmechanik*, Springer (1932, 1971) [[doi:10.1007/978-3-642-96048-2](https://link.springer.com/book/10.1007/978-3-642-96048-2)]

  *Mathematical Foundations of Quantum Mechanics*, Princeton University Press (1955) [[doi:10.1515/9781400889921](https://doi.org/10.1515/9781400889921), [Wikipedia entry](https://en.wikipedia.org/wiki/Mathematical_Foundations_of_Quantum_Mechanics)]

(in precursor discussion of what later came to be called *[[quantum measurement channels]]*).

Most accounts of [[quantum physics]] discuss density matrices in some form. See for instance:

* [[Jun John Sakurai]], Jim Napolitano, §3.4 in: *Modern Quantum Mechanics*, Cambridge University Press (1985, 1994, 2020) [[doi:10.1017/9781108587280](https://doi.org/10.1017/9781108587280), [Wikipedia](https://en.wikipedia.org/wiki/Modern_Quantum_Mechanics)]

* [[Chris Isham]], §6.1 in: *Lectures on Quantum Theory -- Mathematical and Structural Foundations*, World Scientific (1995) [[doi:10.1142/p001](https://doi.org/10.1142/p001), [ark:/13960/t4xh7cs99](https://archive.org/details/lecturesonquantu0000isha)]

In the context of [[quantum computation]]:

* [[Michael A. Nielsen]], [[Isaac L. Chuang]], §2.4 in: *Quantum computation and quantum information*, Cambridge University Press (2000) [[doi:10.1017/CBO9780511976667](https://doi.org/10.1017/CBO9780511976667), [pdf](http://csis.pace.edu/~ctappert/cs837-19spring/QC-textbook.pdf), [[NielsenChuangQuantumComputation.pdf:file]]]

* [[John Preskill]], §2.3 in: *States and Ensembles*, chapter 2 of: *Quantum Computation*, lecture notes, since 2004 [[pdf](http://www.theory.caltech.edu/~preskill/ph219/chap2_15.pdf), [web](http://theory.caltech.edu/~preskill/ph229/)]

* {#Kuperberg05} [[Greg Kuperberg]], §1.4 of: *A concise introduction to quantum probability, quantum mechanics, and quantum computation* (2005) [[pdf](http://www.math.ucdavis.edu/~greg/intro-2005.pdf)]

In the context of [[entanglement]]:

* [[Ingemar Bengtsson]], [[Karol Życzkowski]], Chapters 8 and 12 of: *Geometry of Quantum States --- An Introduction to Quantum Entanglement*, Cambridge University Press (2006) [[doi:10.1017/CBO9780511535048](https://doi.org/10.1017/CBO9780511535048)]

In the context of [[decoherence]]:

* [[Maximilian Schlosshauer]], §2.4 in: *Decoherence and the Quantum-To-Classical Transition*, The Frontiers Collection, Springer (2007) [[doi:10.1007/978-3-540-35775-9](https://doi.org/10.1007/978-3-540-35775-9)]

In the context of [[open quantum systems]]:

* [[Heinz-Peter Breuer]], [[Francesco Petruccione]], §2.1.3 and Part II of: *The Theory of Open Quantum Systems*, Oxford University Press (2007) [[doi:10.1093/acprof:oso/9780199213900.001.0001](https://doi.org/10.1093/acprof:oso/9780199213900.001.0001)]

Further:

* [[Franco Strocchi]], pp. 46 in: *An introduction to the mathematical structure of quantum mechanics*, Advanced Series in Mathematical Physics **28**, World Scientific (2008) [[doi:10.1142/7038](https://doi.org/10.1142/7038)]

* [[Benjamin Schumacher]], [[Michael Westmoreland]], §8 of:  *Quantum Processes, Systems, and Information*, Cambridge University Press (2010) [[doi:10.1017/CBO9780511814006](https://doi.org/10.1017/CBO9780511814006)]

On [[quantum circuits]] with density matrices:

* [[Dorit Aharonov]], [[Alexei Kitaev]], [[Noam Nisan]], *Quantum Circuits with Mixed States*, *Proceedings of the Thirtieth Annual ACM Symposium on Theory of Computation (STOC)* (1998) 20-30 [[arXiv:quant-ph/9806029](https://arxiv.org/abs/quant-ph/9806029), [doi:10.1145/276698.276708](https://doi.org/10.1145/276698.276708)]

[[!redirects density matrix]]
[[!redirects density matrixes]]
[[!redirects density matrices]]

[[!redirects density operator]]
[[!redirects density operators]]

[[!redirects mixed state]]
[[!redirects mixed states]]

[[!redirects mixed quantum state]]
[[!redirects mixed quantum states]]


density of a subset

## Idea

The **density** of a subset $S \subseteq X$ is a measure of how "large" the subset is, or what proportion of $X$ one can consider $S$ to take up.

## Definition

Density is usually defined for subsets $S \subseteq \mathbb{N}$ of the natural numbers, or other countable sets, but the concept generalises to sets $X$ equipped with an exhaustive countable filtration $\emptyset \subseteq F_1 \subseteq F_2 \cdots \subseteq X$ (i.e., one such that $\bigcup_{n\in \mathbb{N}} F_n = X$), where each $F_n$ is equipped with a measure $\mu_n$ satisfying $\mu_n(F_n) \lt \infty$ and where each inclusion $F_n \to F_{n+1}$ is measure-preserving. We call such a filtration and system of measures $\mathcal{F} = \{F_n,\mu_n\}$ a _measured filtration_  on $X$.

The key example is of a totally ordered countable set $A = \{a_1,a_2,\ldots\}$ equipped with the filtration $F_n = \{a_1,\ldots a_n\}$ and the counting measure. For instance, $A$ could be the [[natural numbers]] $\mathbb{N}$, or any countable subset with the inherited ordering, such as the primes.

Notice that any finite set can also be given the structure of a measured filtration, with a filtration that stabilises after finitely many steps, and with the counting measure.

In the other direction, a $\sigma$-finite [[measure space]] $(M,\mu)$ can be equipped (by definition) with a measured filtration by measurable subsets, with the induced measures.

+-- {: .un_defn}
###### Definition
Given a measured filtration $(X,\mathcal{F})$, a subset $S \subseteq X$ with the property that $S\cap F_n$ is measurable for all $n$, the **$\mathcal{F}$-density of $S$** is defined to be the number
$$
    d_\mathcal{F}(S) = \lim_{n\to \infty} \frac{\mu_n(S\cap F_n)}{\mu_n(F_n)} \in [0,1],
$$
if this limit exists.

=--

For a finite set $B=\{b_1,\ldots,b_n\}$ equipped with any measured filtration $\mathcal{F}$, the $\mathcal{F}$-density of a subset $S \subseteq B$ agrees with the simple ratio $|S|/|B|$.

Likewise, for any measure space $(M,\mu)$ of finite total measure and $S$ a measurable subset, we can relate $d_\mathcal{F}(S)$ to $\mu(S)/\mu(M)$ for various choices of measured filtration on $M$ ([[David Roberts|DR]]: does this depend on the choice of filtration?)

## Applications

Density arguments are of importance in counting [[prime numbers]] with certain properties, and have shown great utility in proving partial results about the Birch and Swinnerton-Dyer conjecture on [[elliptic curves]] (namely that it is true for a set of elliptic curves over $\mathbb{Q}$ with density roughly 67%). In this latter example, there are a number of filtrations on can place on the set of elliptic curves up to isomorphism, which only makes small changes to final calculated densities.

Any $\sigma$-finite measure $\mu$ of a set $M$ is equivalent, as a measure, to a [[probability measure]]. This is constructed by considering a filtration arising from a countable disjoint partition into measurable sets of finite measure.

## Upper and lower asymptotic density

One can also consider, instead of the _limit_ in the definition of density, which may or may not exist, the _lim sup_ or the _lim inf_. These give the **upper** and **lower (asymptotic) densities**, respectively.

## Related pages

* [[∞-finite measure]]

## References

* Wikipedia, [Natural density](https://en.wikipedia.org/wiki/Natural_density) (which deals only with the case of sets of natural numbers)

See also

* Wikipedia, [$\sigma$-finite measure](https://en.wikipedia.org/wiki/%CE%A3-finite_measure)

A great number of other definitions of densities of sets of natural numbers (clearly generalisable to other countable ordered sets) are given at

* [[OEIS]] wiki, [Density](https://oeis.org/wiki/Density)


dependence logic

## Idea

Dependence logic adds the concept of dependence to [[first order logic]]. That is, we may add new atomic formulas of the form
$$
= (x_1,x_2,\ldots,x_n,y)
$$
meaning that the values of $x_1,\ldots,x_n$ completely determine the value of $y$.

It "aims to establish a basic theory of dependence and independence underlying such seemingly unrelated subjects as causality, random variables, bound variables in logic, database theory, the theory of social choice, and even quantum physics" (from the abstract of Galliani, Väänänen 2014).

[[team logic|Team logic]] is a further extension of dependence logic by classical negation.

## Literature

* Jouko Väänänen, Dependence logic: A new approach to independence friendly logic, London Mathematical Society Student Texts 70, Cambridge University Press 2007
* P. Galliani, J. Väänänen, _On dependence logic_, In: Baltag A., Smets S. (eds) Johan van Benthem on Logic and Information Dynamics. Outstanding Contributions to Logic, vol 5. Springer, Cham. 2014 [doi](https://doi.org/10.1007/978-3-319-06025-5_4)
* Samson Abramsky, Juha Kontinen, Jouko Väänänen, Heribert Vollmer (eds.), _Dependence logic: theory and applications_, Birkhäuser, Basel, 2016


dependency grammar

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

# Contents
* table of contents
{:toc}

## Idea

Dependency grammars are a kind of [[formal grammar|formal grammars]] based on the notion of dependency graph, rather than constituency trees.
The first mathematical definitions are from [Hays (1960)](#Hays60) and [Gaifman (1965)](#Gaifman65).

## Definition

A dependency grammar is a tuple $G = (V, X, R, s)$ where $V$ and $X$ are finite sets of terminal and non-terminal symbols with the start symbol $s \in X$ and a finite set of rules $R \subseteq \mathcal{R}_1 \cup \mathcal{R}_2 \cup \mathcal{R}_3$ which have one of the following shapes:

1. $\mathcal{R}_1 = X^\star \times X \times X^\star$. The interpretation of a rule $r = (u, x, v) \in \mathcal{R}_1$ is that a word of type $x \in X$ can govern words of type $u \in X^\star$ on its left and $v \in X^\star$ on its right. We say that $u$ and $v$ are the left and right dependencies of the head of type $x$.
2. $\mathcal{R}_2 = V \times X$. The interpretation of a rule $(w, x) \in \mathcal{R}_2$ is that the word $w \in V$ can be given type $x \in X$. These correspond to the dictionary entries in a [[categorial grammar]].
3. $\mathcal{R}_3 = X \times \{ s \}$. The interpretation of a rule $r = (x, s) \in \mathcal{R}_3$ is that a word of type $x \in X$ can be the head of a grammatical sentence.

The language $L(G) \subseteq V^\star$ of a dependency grammar $G$ is defined as follows. A string $w_1 \dots w_n \in V^\star$ is grammatical if there are types $x_1 \dots x_n$, a binary relation $d \subseteq [n] \times [n]$ for $[n] = {1, \dots, n}$ with reflexive transitive closure $d^\star$ such that:

* $(w_i, x_i) \in R$ for all $i \leq n$, i.e. words are appropriately typed,
* $(i, i) \notin d^\star$, i.e. $d$ does not contain cycles,
* for all $i \leq n$, there is at most one $j \leq n$ with $(i, j) \in d$, i.e. every word depends on at most one head,
* if $i \leq j \leq k$ and $(i, k) \in d^\star$ ($(k, i) \in d^\star$) then $(j, k) \in d^\star$ ($(k, j) \in d^\star$), i.e. the dependency is a planar graph,
* $d$ is connected, or equivalently, there is exactly one head $h \leq n$ which doesn't depend on anything, furthermore we have $(x_h, s) \in R$,
* for every $i \leq n$, we have $(u, x_i, v) \in R$
for $u = (x_j \vert j \leq i, (j, i) \in d)$
and $v = (x_j \vert j \geq i, (j, i) \in d)$ its left and right dependencies.

## Drawing conventions

The conventions on how to depict such a dependency relation vary:

![conventions vary](https://upload.wikimedia.org/wikipedia/commons/9/9e/Conventions.jpg)

## As string diagrams

We can reformulate the original definition in terms of the free [[rigid monoidal category]] generated by the symbols $V + X$ as objects and the rules $R$ as arrows.
Then the convention (e.) where dependencies are represented as arcs is precisely a string diagram with the terminal symbols as domain and the start symbol $s$ as codomain.

## Expressive power

Dependency grammars have equivalent expressive power to that of [[context free grammar]] and [[pregroup grammar]].

We can translate a dependency rule $r = (u, x, v) \in R$ into a set of production rules $\{x \to u w v \vert (w, x) \in R\}$ for a [[context free grammar]]. Dependency grammars are precisely the context-free grammars with exactly one terminal symbol in the right hand-side of each production rule.

We can also translate a dependency rule $r = (u, x, v) \in R$ into a set of dictionary entries $\{w \to u^r x v^l \vert (w, x) \in R\}$ for a [[pregroup grammar]].

However going in the other direction, i.e. from pregroup or context free to dependency grammar, the equivalence is weak: it preserves the set of grammatical strings but not their grammatical structure.

## References

* {#Hays60} Hays, David. _Grouping and dependency theories_. RAND CORP (1960)
* {#Gaifman65} Gaifman, Haim. _Dependency systems and phrase-structure systems._ Information and control 8.3 (1965)
* {#Kruijff06} Kruijff, Geert-Jan M. _Dependency grammar._ Encyclopedia of Language and Linguistics, (2006)


dependent anafunction

\tableofcontents

## Idea

In [[dependent type theory]], given types $A$ and $B$, an [[anafunction]] is a [[type family]] $x\colon A, y \colon B \vdash R(x, y) \; \mathrm{type}$ which comes with a family of witnesses
$$x \colon A \vdash p(x) \colon \mathrm{isContr}\left(\sum_{y:B} R(x, y) \right)$$
that for each [[term|element]] $x\colon A$, the [[dependent sum type]] $\sum_{y\colon B} R(x, y)$ is a [[contractible type]].

A *dependent anafunction* is like such an anafunction but where we allow $B$ to also [[dependent type|depend]] on $x\colon A$.

## Definition

In [[dependent type theory]] ([[homotopy type theory]]), given a type $A$ and a [[type family]] $x\colon A \vdash B(x) \; \mathrm{type}$, a **dependent anafunction** is a type family $x\colon A, y\colon B(x) \vdash R(x, y) \; \mathrm{type}$ which comes with a family of witnesses
$$x \colon A \vdash p(x) \colon \mathrm{isContr}\left(\sum_{y\colon B(x)} R(x, y) \right)$$
that for each element $x\colon A$, the [[dependent sum type]] $\sum_{y\colon B(x)} R(x, y)$ is a [[contractible type]].

## Properties

The [[principle of unique choice]] holds in dependent type theory, which means that given any dependent anafunction $x:A, y:B(x) \vdash R(x, y) \; \mathrm{type}$, there is a dependent function $x:A \vdash f(x):B(x)$.

## Dependent function types as types of dependent anafunctions

In the same way that one could define [[equivalence types]] as types of [[one-to-one correspondences]] and [[function types]] as types of [[anafunctions]], one could define [[dependent function types]] as types of dependent anafunctions. This requires both [[identity types]] and [[heterogeneous identity types]] being defined first, which we shall write as $a =_A b$ and $x =_{B}^{p} y$ respectively for $a:A$, $b:A$, $p:a =_A b$, $x:B(a)$, and $y:B(b)$. We use Agda notation $(x:A) \to B(x)$ for dependent function types rather than the dependent product type notation $\prod_{x:A} B(x)$ or $\Pi(x:A).B(x)$ in this section.

Rules for dependent function types
$$\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma, x:A \vdash B(x) \; \mathrm{type}}{\Gamma \vdash (x:A) \to B(x) \; \mathrm{type}} \qquad \frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma, x:A \vdash B(x) \; \mathrm{type}}{\Gamma, f:(x:A) \to B(x), x:A, y:B(x) \vdash \mathcal{F}_{A, B}(f, x, y) \; \mathrm{type}}$$

$$\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma, x:A \vdash B(x) \; \mathrm{type} \quad \Gamma, x:A \vdash f(x):B(x)}{\Gamma \vdash \lambda x.f(x):(x:A) \to B(x)}$$

$$\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma, x:A \vdash B(x) \; \mathrm{type} \quad \Gamma, x:A \vdash f(x):B(x)}{\Gamma, x:A \vdash \alpha(x):\mathcal{F}_{A, B}(\lambda x.f(x), x, f(x))}$$

$$\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma, x:A \vdash B(x) \; \mathrm{type}}{\Gamma, f:(x:A) \to B(x), x:A \vdash \mathrm{ev}(f, x):B(x)}$$

$$\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma, x:A \vdash B(x) \; \mathrm{type}}{\Gamma, f:(x:A) \to B(x), x:A \vdash \beta(f, x):\mathcal{F}_{A, B}(f, x, \mathrm{ev}(f, x))}$$

$$\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma, x:A \vdash B(x) \; \mathrm{type}}{\Gamma, f:(x:A) \to B(x), x:A, y:B(x), u:\mathcal{F}_{A, B}(f, x, y) \vdash \kappa(f, x, y, u):\mathrm{ev}(f, x) =_{B(x)} y}$$

$$\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma, x:A \vdash B(x) \; \mathrm{type}}{\Gamma, f:(x:A) \to B(x), x:A, y:B(x), u:\mathcal{F}_{A, B}(f, x, y) \vdash \eta(f, x, y, u):\beta(f, x) =_{\mathcal{F}_{A, B}(f, x)}^{\kappa(f, x, y, u)} u}$$

By the rules for [[dependent pair types]] and [[dependent function types]], one could derive that

$$\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma, x:A \vdash B(x) \; \mathrm{type}}{\Gamma, f:(x:A) \to B(x) \vdash \eta(f):(x:A) \to \mathrm{isContr}\left((y:B) \times \mathcal{F}_{A, B}(f, x, y)\right)}$$

which is precisely the statement that $\mathcal{F}_{A, B}(f)$ is a dependent anafunction for all dependent functions $f:(x:A) \to B(x)$.

## See also

* [[anafunction]]

* [[dependent function]]

* [[dependent function type]]

* [[dependent correspondence]]

[[!redirects dependent anafunction]]
[[!redirects dependent anafunctions]]


dependent choice

# Dependent choice
* table of contents
{: toc}

## Statement

### In set theory

In [[set theory]], the axiom of **dependent choice** (DC) states that if $X$ is a nonempty ([[inhabited set|inhabited]]) set and if $R$ is a [[entire relation|total]] binary relation on $X$, then there exists a sequence $x\colon \mathbb{N} \to X$ such that $(x_n, x_{n+1})$ belongs to $R$ for all $n \in \mathbb{N}$. It is strictly weaker than the full [[axiom of choice]], but strictly stronger than the axiom of [[countable choice]]. It is called _dependent_ choice because the available choices for $x_{n+1}$ depend on the choice of $x_n$ made at the previous stage.

### In dependent type theory

In [[dependent type theory]], the **axiom of dependent choice** states that if $A$ is an [[inhabited set]] and if $R$ is a [[entire relation]] on $A$, then then there exists a sequence $a:\mathbb{N} \to A$ such that for all $n:\mathbb{N}$, $R(a(n), a(n + 1))$ holds.

$$\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash x:A, y:A \vdash R(x, y) \; \mathrm{type}}{\Gamma \vdash \mathrm{DC}_\mathbb{N}^A:(\mathrm{isSet}(A) \times [A]) \to \left(\prod_{x:A} \left(\prod_{y:A} \mathrm{isProp}(R(x, y))\right) \times \exists y:A.R(x, y)\right) \to \exists a:\mathbb{N} \to A.\prod_{n:\mathbb{N}} R(a(n), a(n + 1))}$$

## Applications

Typical applications of dependent choice include [[Kőnig's lemma]] and the [[Baire category theorem]] for [[complete metric spaces]].

## Acceptability

For a number of schools of [[constructive mathematics]], dependent choice is considered an acceptable alternative to full AC, and the principle holds (assuming that it holds in [[Set]]) in quite a few [[toposes]] of interest in which full AC doesn't hold, including all [[presheaf toposes]] and the [[effective topos]].  In fact, it follows from the stronger [[presentation axiom]], which holds in many of these toposes and also has a constructive justification.

Like countable choice, it fails for sheaves over the space of real numbers.

## Related concepts

* [[axiom of choice]]

* [[axiom of countable choice]]

## References

* Wikipedia, [Axiom of dependent choice](https://en.wikipedia.org/wiki/Axiom_of_dependent_choice)

category: foundational axiom

[[!redirects dependent choice]]
[[!redirects dependent choices]]
[[!redirects axiom of dependent choice]]
[[!redirects axiom of dependent choices]]


dependent correspondence

\tableofcontents

## Idea

In [[dependent type theory]], given types $A$ and $B$, a [[correspondence]] is a [[type family]] $x\colon A, y \colon B \vdash R(x, y) \; \mathrm{type}$. A *dependent correspondence* is like such an correspondence but where we allow $B$ to also [[dependent type|depend]] on $x\colon A$.

## Definition

In [[dependent type theory]] ([[homotopy type theory]]), given a type $A$ and a [[type family]] $x\colon A \vdash B(x) \; \mathrm{type}$, a **dependent correspondence** is a type family $x\colon A, y\colon B(x) \vdash R(x, y) \; \mathrm{type}$.

## Examples

* Every [[correspondence]] is a dependent correspondence where $B$ does not depend upon $A$.

* Every [[dependent anafunction]] is a dependent correspondence $x\colon A, y\colon B(x) \vdash R(x, y)$ which comes with a family of witnesses
$$x \colon A \vdash p(x) \colon \mathrm{isContr}\left(\sum_{y\colon B(x)} R(x, y) \right)$$
that for each element $x\colon A$, the [[dependent sum type]] $\sum_{y\colon B(x)} R(x, y)$ is a [[contractible type]].

## See also

* [[correspondence]], **dependent correspondence**

* [[anafunction]], [[dependent anafunction]]

[[!redirects dependent correspondence]]
[[!redirects dependent correspondences]]


dependent extension type

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

\tableofcontents

## Idea

In [[dependent type theories]] with more than one layer of type, dependent extension types are types which behave like [[dependent product types]] except the index type is the outer layer of type rather than the normal layer of type. Thus, dependent extension types can be defined in [[simplicial type theory]] and [[cubical type theory]].

## Definition

### In type theory with shapes

In [[type theory with shapes]], there are three different layers - there are the cube layer and the tope layer, which is [[logic over type theory]] where the cubes are the types and the topes are the propositions in the logic over type theory, and finally there is the type layer, which is a [[dependent type theory]].

Shapes are formed in the usual set-builder notation in [[set theory]]: given a cube $I$ and a predicate tope $t:I \vdash \phi$, one could construct the shape $\{t:I \vert \phi\}$. A cofibration in a type theory with shapes is an inclusion of shapes, which means shapes $\{t:I \vert \phi\}$ and $\{t:I \vert \psi\}$ with a predicate $t:I \vert \phi \vdash \psi$.

Formation rules for dependent extension types:
$$\frac{
\begin{array}{l}
\{t:I \vert \phi\} \; \mathrm{shape} \quad \{t:I \vert \psi\} \; \mathrm{shape} \quad t:I \vert \phi \vdash \psi \\
\Xi \vert \Phi \vdash \Gamma \; \mathrm{ctx} \quad \Xi, t:I \vert \Phi, \phi \vert \Gamma \vdash A \; \mathrm{type} \quad \Xi, t:I \vert \Phi, \phi \vert \Gamma \vdash a:A
\end{array}
}{\Xi \vert \Phi \vert \Gamma \vdash \langle \prod_{t:I \vert \psi} A \vert_a^\phi \rangle \; \mathrm{type}}$$

Introduction rules for dependent extension types:
$$\frac{
\begin{array}{l}
\{t:I \vert \phi\} \; \mathrm{shape} \quad \{t:I \vert \psi\} \; \mathrm{shape} \quad t:I \vert \phi \vdash \psi \\
\Xi \vert \Phi \vdash \Gamma \; \mathrm{ctx} \quad \Xi, t:I \vert \Phi, \phi \vert \Gamma \vdash A \; \mathrm{type} \quad \Xi, t:I \vert \Phi, \phi \vert \Gamma \vdash a:A \\
\Xi, t:I \vert \Phi, \phi \vert \Gamma \vdash b:A \quad \Xi, t:I \vert \Phi, \phi \vert \Gamma \vdash b \equiv a \\
\end{array}
}{\Xi \vert \Phi \vert \Gamma \vdash \lambda t^{I\vert \phi}.b:\langle \prod_{t:I \vert \psi} A \vert_a^\phi \rangle}$$

Elimination rules for dependent extension types

$$\frac{
\begin{array}{l}
\{t:I \vert \phi\} \; \mathrm{shape} \quad \{t:I \vert \psi\} \; \mathrm{shape} \quad t:I \vert \phi \vdash \psi \\
\Xi \vert \Phi \vert \Gamma \vdash f:\langle \prod_{t:I \vert \psi} A \vert_a^\phi \rangle \quad \Xi \vdash s:I \quad \Xi \vert \Phi \vdash \psi(s)
\end{array}
}{\Xi \vert \Phi \vert \Gamma \vdash f(s):A}$$

$$\frac{
\begin{array}{l}
\{t:I \vert \phi\} \; \mathrm{shape} \quad \{t:I \vert \psi\} \; \mathrm{shape} \quad t:I \vert \phi \vdash \psi \\
\Xi \vert \Phi \vert \Gamma \vdash f:\langle \prod_{t:I \vert \psi} A \vert_a^\phi \rangle \quad \Xi \vdash s:I \quad \Xi \vert \Phi \vdash \phi(s)
\end{array}
}{\Xi \vert \Phi \vert \Gamma \vdash f(s) \equiv a(s)}$$

Computation rules for dependent extension types

$$\frac{
\begin{array}{l}
\{t:I \vert \phi\} \; \mathrm{shape} \quad \{t:I \vert \psi\} \; \mathrm{shape} \quad t:I \vert \phi \vdash \psi \\
\Xi \vert \Phi \vdash \Gamma \; \mathrm{ctx} \quad \Xi, t:I \vert \Phi, \phi \vert \Gamma \vdash A \; \mathrm{type} \quad \Xi, t:I \vert \Phi, \phi \vert \Gamma \vdash a:A \\
\Xi, t:I \vert \Phi, \phi \vert \Gamma \vdash b:A \quad \Xi, t:I \vert \Phi, \phi \vert \Gamma \vdash b \equiv a \\
\Xi \vdash s:I \quad \Xi \vert \Phi \vdash \phi(s)
\end{array}
}{\Xi \vert \Phi \vert \Gamma \vdash (\lambda t^{I\vert \phi}.b)(s) \equiv b(s)}$$

Uniqueness rules for dependent extension types

$$\frac{
\begin{array}{l}
\{t:I \vert \phi\} \; \mathrm{shape} \quad \{t:I \vert \psi\} \; \mathrm{shape} \quad t:I \vert \phi \vdash \psi \\
\Xi \vert \Phi \vert \Gamma \vdash f:\langle \prod_{t:I \vert \psi} A \vert_a^\phi \rangle \quad \Xi \vdash s:I \quad \Xi \vert \Phi \vdash \phi(s)
\end{array}
}{\Xi \vert \Phi \vert \Gamma \vdash f \equiv \lambda t^{I \vert \psi}.f(t)}$$

### In two-level type theory

In [[two-level type theory]], there are two different layers of types - there is the pretype or non-fibrant layer and there is the type or fibrant layer. A cofibration in two-level type theory is an inclusion of pretypes, which means pretypes $A$ and $B$ and an [[embedding]] $i:A \hookrightarrow B$. The rules for dependent extension types are then given as follows:

Formation rules for dependent extension types
$$\frac{
\begin{array}{l}
\Xi \vdash A \; \mathrm{pretype} \quad \Xi \vdash B \; \mathrm{pretype} \quad \Xi \vdash i:A \hookrightarrow B \\
\Xi \vdash \Gamma \; \mathrm{ctx} \quad \Xi, y:B \vert \Gamma \vdash C(y) \; \mathrm{type} \quad \Xi, x:A \vert \Gamma \vdash c(x):C(x)
\end{array}
}{\Xi \vert \Gamma \vdash \langle \prod_{y:B} C(y) \vert_c^A \rangle \; \mathrm{type}}$$

Introduction rules for dependent extension types
$$\frac{
\begin{array}{l}
\Xi \vdash A \; \mathrm{pretype} \quad \Xi \vdash B \; \mathrm{pretype} \quad \Xi \vdash i:A \hookrightarrow B \\
\Xi \vdash \Gamma \; \mathrm{ctx} \quad \Xi, y:B \vert \Gamma \vdash C(y) \; \mathrm{type} \quad \Xi, x:A \vert \Gamma \vdash c(x):C(x) \\
\Xi, y:B \vert \Gamma \vdash d(y):C(y) \quad \Xi, x:A \vert \Gamma \vdash d(i(x)) \equiv c(x):C(x) \\
\end{array}
}{\Xi \vert \Gamma \vdash \lambda y^B.d(y):\langle \prod_{y:B} C(y) \vert_c^A \rangle}$$

Elimination rules for dependent extension types
$$\frac{
\begin{array}{l}
\Xi \vdash A \; \mathrm{pretype} \quad \Xi \vdash B \; \mathrm{pretype} \quad \Xi \vdash i:A \hookrightarrow B \\
\Xi \vert \Gamma \vdash f:\langle \prod_{y:B} C(y) \vert_c^A \rangle \quad \Xi \vdash b:B
\end{array}
}{\Xi \vert \Gamma \vdash f(b):C(b)}$$

$$\frac{
\begin{array}{l}
\Xi \vdash A \; \mathrm{pretype} \quad \Xi \vdash B \; \mathrm{pretype} \quad \Xi \vdash i:A \hookrightarrow B \\
\Xi \vert \Gamma \vdash f:\langle \prod_{y:B} C(y) \vert_c^A \rangle \quad \Xi \vdash a:A
\end{array}
}{\Xi \vert \Gamma \vdash f(i(a)) \equiv c(a):C(a)}$$

Computation rules for dependent extension types
$$\frac{
\begin{array}{l}
\Xi \vdash A \; \mathrm{pretype} \quad \Xi \vdash B \; \mathrm{pretype} \quad \Xi \vdash i:A \hookrightarrow B \\
\Xi \vdash \Gamma \; \mathrm{ctx} \quad \Xi, y:B \vert \Gamma \vdash C(y) \; \mathrm{type} \quad \Xi, x:A \vert \Gamma \vdash c(x):C(x) \\
\Xi, y:B \vert \Gamma \vdash d(y):C(y) \quad \Xi, x:A \vert \Gamma \vdash d(i(x)) \equiv c(x):C(x) \quad \Xi \vert b:B\\
\end{array}
}{\Xi \vert \Gamma \vdash (\lambda y^B.d(y))(b) \equiv d(b):C(b)}$$

Uniqueness rules for dependent extension types

$$\frac{
\begin{array}{l}
\Xi \vdash A \; \mathrm{pretype} \quad \Xi \vdash B \; \mathrm{pretype} \quad \Xi \vdash i:A \hookrightarrow B \\
\Xi \vert \Gamma \vdash f:\langle \prod_{y:B} C(y) \vert_c^A \rangle
\end{array}
}{\Xi \vert \Gamma \vdash f \equiv \lambda y^B.f(y):\langle \prod_{y:B} C(y) \vert_c^A \rangle}$$

Now, if the pretype layer has a [[Tarski universe|Tarski]] [[type of all propositions]] $(\Omega, \mathrm{El}_\Omega)$, then given a pretype $I$ and predicates $t:I \vdash \phi(t):\Omega$, $t:I \vdash \psi(t):\Omega$, one could construct the shapes defined in the above section via the [[dependent sum type]] in the pretype layer:

$$A \coloneqq \sum_{t:I} \mathrm{El}_\Omega(\phi(t)) \qquad B \coloneqq \sum_{t:I} \mathrm{El}_\Omega(\psi(t))$$

The additional requirement above that $t:I, \phi(t):\Omega \vdash \psi(t):\Omega$ implies that $A$ is a [[subtype]] of $B$ with an embedding $i:A \hookrightarrow B$ in the pretype layer.

## Related concepts

* [[extension type]]
* [[dependent function type]]

## References

* {#RiehlShulman17} [[Emily Riehl]], [[Michael Shulman]], *A type theory for synthetic $\infty$-categories* $[$[arXiv:1705.07442](https://arxiv.org/abs/1705.07442)$]$

[[!redirects dependent extension type]]
[[!redirects dependent extension types]]


dependent function

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

\tableofcontents

## Idea

In [[dependent type theory]], a dependent function is like a [[function]] but where we allow the [[codomain]] of the to depend on elements of the [[domain]].

## Definition

In [[dependent type theory]], a [[type]] $A$ is a [[contractible type]] if it comes with an element $a:A$ and a family of identities $x:A \vdash c(x):a =_A x$ indicating that $a$ is a [[center of contraction]]. A **dependent function** from type $A$ to the type family $x:A \vdash B(x)$ could be defined as

* a family of elements $x:A \vdash f(x):B(x)$
* a dependent multivalued partial function $(x:A \vdash P(x); x:A, p:P(x) \vdash f(x, p):B(x))$ for which the dependent type $P(x)$ is a [[contractible type]] for all $x:A$
* a [[dependent anafunction]], a [[dependent correspondence]] $x:A, y:B(x) \vdash R(x, y)$ for which the dependent type $\sum_{y:B(x)} R(x, y)$ is a [[contractible type]] for all $x:A$.
* an element of the [[dependent function type]] $f:\prod_{x:A} B(x)$, in dependent type theories with dependent function types.

The first three definitions are interdefinable with each other in [[dependent type theories]] with [[identity types]] and [[dependent sum types]], and the fourth definition is interdefinable with the other three via the rules for [[dependent function types]]

## See also

* [[tuple]], [[sequence]], [[function]]

* [[dependent tuple]], [[dependent sequence]], **dependent function**

* [[dependent function type]]

* [[dependent anafunction]]

[[!redirects dependent function]]
[[!redirects dependent functions]]

[[!redirects family of functions]]
[[!redirects families of functions]]