unique factorization domain

# Contents #
* table of contents
{:toc}

## Definition

Let $R$ be a [[discrete integral domain]]. We say that an element $u\in R$ is a _unit_ if it is [[invertible element|invertible]]. A non-unit is called _irreducible_ if it can not be represented as a product of two non-units. Note that then, $0$ is never irreducible, because it is a product of two non-units under the form $0 = 0.0$. It is often included in the definition of an irreducible element that it must be non-zero but this is in fact redundant.

An integral domain $R$ is a __unique factorization domain__ (UFD for short) if every non-zero non-unit $r$ has a factorization $r = r_1 \cdots r_n$ (where $n \ge 1$) as product of irreducibles and this decomposition is unique up to renumbering and rescaling the irreducibles by units.

Put differently: $R$ is a UFD precisely when the multiplicative monoid of nonzero [[principal ideals]] of $R$ (which is isomorphic to the quotient monoid $Can(R)/R^\times$, where $Can(R) \coloneqq R \backslash \{0\}$ denotes the [[multiplicative subset of cancellative elements]] in $R$ and $R^\times$ denotes the [[group of units]] in $R$) is a [[commutative monoid]] [[free object|freely generated]] by irreducible principal ideals. It follows that if $K$ is the [[field of fractions]] of $R$, then the [[quotient group]] $K^\times/R^\times$ is an abelian group that is freely generated by the set of cosets $f R^\times$ with $f$ ranging over irreducible elements. As a side remark, we observe that in this circumstance the exact sequence

$$0 \to R^\times \to K^\times \to K^\times/R^\times \to 0$$

splits and there is an isomorphism $K^\times \cong R^\times \oplus (K^\times/R^\times)$ of abelian groups.

## Examples

* The ring of (rational) [[integers]] $\mathbb{Z}$ is a UFD.

* A [[principal ideal domain]] (PID) is a UFD. (In particular, a [[Euclidean domain]] is a UFD.) As a partial converse, a [[Dedekind domain]] that is a UFD is a PID.

* If $R$ is a UFD, then its [[polynomial]] ring $R[x]$ is also a UFD.

* If $R$ is a UFD, then so is any [[localization]] $S^{-1} R$.

* A [[regular local ring]] (for example, a [[discrete valuation]] ring) is a UFD.

* If $R$ is a UFD and all of its localizations at primes are regular local rings, then the ring of [[formal power series]] $R[ [x] ]$ is a UFD.

* For $D$ a positive integer, the [[algebraic integer|ring of integers]] in $\mathbb{Q}(\sqrt{-D})$ is a UFD iff $D$ is a *Heegner number*, namely one of the numbers $1, 2, 3, 7, 11, 19, 43, 67, 163$.

* If $R$ is not [[integral closure|integrally closed]], then it is not a UFD.

## Properties

* As noted above, a UFD is necessarily integrally closed.

* The lattice of principal ideals under the inclusion order is a distributive lattice.

* There is a useful characterization of UFDs by [[Irving Kaplansky]]:

\begin{proposition}
Let $R$ be an [[integral domain]]. Then, $R$ is a UFD iff every non-zero [[prime ideal]] contains a non-zero non-unit [[prime element]].
\end{proposition}

* Let $R$ be the [[ring of integers]] of an algebraic number field. Then $R$ is a unique factorization domain if and only if the [[Picard group]] of $R$ is [[trivial group|trivial]].

## See also

* [[GCD domain]]

* [[unique factorization ring]]

## References

* [[Henri Lombardi]], [[Claude Quitté]] (2010): *Commutative algebra: Constructive methods (Finite projective modules)* Translated by Tania K. Roblo, Springer (2015) ([doi:10.1007/978-94-017-9944-7](https://link.springer.com/book/10.1007/978-94-017-9944-7), [pdf](http://hlombardi.free.fr/CACM.pdf))

* [[Irving Kaplansky]], *Commutative rings*, rev. ed., the University of Chicago (1974), [pdf](https://www.maths.ed.ac.uk/~v1ranick/papers/kaprings.pdf)

* [[John Baez]], *Hoàng Xuân Sính’s thesis: categorifying group theory* ([pdf](https://math.ucr.edu/home/baez/sinh.pdf))

[[!redirects unique factorization domains]]


unique factorization monoid

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
###Context###
#### Algebra
+--{: .hide}
[[!include higher algebra - contents]]
=--
#### Monoid theory
+-- {: .hide}
[[!include monoid theory - contents]]
=--
=--
=--

# Contents
* table of contents
{: toc}

## Definition

Let $M$ be a monoid. We say that an element $a\in M$ is a _unit_ if it is [[invertible element|invertible]]. A non-unit is called
[[irreducible element|irreducible]] if it can not be represented as a product of two non-units.

A commutative monoid $M$ is a __unique factorization monoid__ if every non-unit has a factorization $u = m_1 \cdots m_n$ as a product of irreducible non-units and this decomposition is unique up to renumbering and rescaling the irreducibles by units.

Put differently: $M$ is a unique factorization monoid precisely when the monoid of [[principal ideal of a monoid|principal ideals]] of $M$ is a [[commutative monoid]] [[free object|freely generated]] by irreducible principal ideals.

## Examples

Every [[abelian group]] is trivially a unique factorization monoid.

A unique factorization monoid object in the category of [[commutative]] [[semigroups]] is a _unique factorization [[semiring]]_. The statement that the semiring of positive integers is a unique factorization semiring is the [[fundamental theorem of arithmetic]].

## Related concepts

* [[fundamental theorem of arithmetic]]

* [[ideal of a monoid]]

* [[principal ideal of a monoid]]

* [[principal ideal monoid]]


unique factorization ring

\tableofcontents

## Idea

A unique factorization ring is like a unique factorization domain but where we do not require the [[commutative ring]] to be an [[integral domain]]: instead of talking about the non-zero elements, we simply talk about the [[regular elements]] of the commutative ring, since the non-regular elements of a commutative ring are precisely the [[zero divisors]] of a commutative ring.

This becomes important in [[constructive mathematics]] when we have multiple different notions of [[integral domain]], where one could talk about

* the non-regular elements being zero,

* or in rings with a [[tight apartness relation]], the elements apart from zero being regular,

* or in rings with [[decidable equality]], where both notions coincide

Instead of having to constantly distinguish between different notions of unique factorization domains, we could simply generalize to unique factorization rings.

## Definition

Let $R$ be a [[commutative ring]]. We say that an element  $r\in R$ is _regular_ if left multiplication by $r$ is an [[injection]] and right multiplication by $r$ is an injection. We say that an element $r\in R$ is a _unit_ if it is [[invertible element|invertible]]. A non-unit is called _irreducible_ if it can not be represented as a product of two non-units.

A commutative ring $R$ is a __unique factorization ring__ if every regular non-unit has a factorization $u = r_1 \cdots r_n$ (where $n \ge 1$) as product of irreducibles and this decomposition is unique up to renumbering and rescaling the irreducibles by units.

Put differently: $R$ is a unique factorization ring precisely when the multiplicative monoid of regular [[principal ideals]] of $R$ (which is isomorphic to the quotient monoid $Reg(R)/R^\times$, where $Reg(R)$ denotes the [[multiplicative subset of regular elements]] in $R$ and $R^\times$ denotes the [[group of units]] in $R$) is a [[commutative monoid]] [[free object|freely generated]] by irreducible principal ideals.

## Examples

* A [[unique factorization domain]] is precisely a unique factorization ring which is an integral domain; i.e. a commutative ring whose [[multiplicative subset of regular elements]] are precisely the non-zero elements.

* A [[prefield ring]] is a unique factorization ring where every regular element is invertible.

## See also

* [[commutative ring]]

* [[GCD ring]]

* [[Euclidean ring]]

* [[prefield ring]]

* [[unique factorization domain]]


uniqueness of identity proofs

[[!redirects axiom UIP]]

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

#Contents#
* table of contents
{:toc}

## Idea

In [[dependent type theory]], _uniqueness of identity proofs_ or _UIP_ refers to a couple of different axioms and rules applicable to individual [[types]] to turn them into [[h-sets]], [[type families]] to turn them into [[families of sets]] (and in particular, [[universes]] to turn them into internal types of sets), as well as the type theory as a whole to turn it into an actual [[set-level type theory]], where all types are [[h-sets]]. Under certain conditions, uniqueness of identity proofs for universes is incompatible with the [[univalence axiom]], and uniqueness of identity proofs for the whole type theory is incompatible with the existence of a [[univalent universe]].

Heuristically, the axiom asserts that for each element $a:A$ and $b:A$, every two [[identification]] $p:\mathrm{Id}_A(a, b)$ and $q:\mathrm{Id}_A(a, b)$ of the [[identity type]] $\mathrm{Id}_A(a, b)$ are [[typal equality|typally equal]] to each other. This is equivalent to saying that every identity type $\mathrm{Id}_A(a, b)$ is an [[h-proposition]].

## Statement

There are multiple notions of uniqueness of identity proofs: for individual types, for type families and Tarski universes, and for the type theory itself.

### For individual types

Given a type $A$, uniqueness of identity proofs is the axiom that for all elements $a:A$ and $b:A$ and identifications $p:\mathrm{Id}_A(a, b)$ and $q:\mathrm{Id}_A(a, b)$, there is an identification $\mathrm{UIP}_A(a, b, p, q):\mathrm{Id}_{\mathrm{Id}_A(a, b)}(p, q)$. This is the same as stating that there is a dependent function
$$\mathrm{UIP}_A:\prod_{a:A} \prod_{b:A} \prod_{p:\mathrm{Id}_A(a, b)} \prod_{q:\mathrm{Id}_A(a, b)} \mathrm{Id}_{\mathrm{Id}_A(a, b)}(p, q)$$

Uniqueness of identity proofs implies that $A$ is an [[h-set]], and can be used in the definition of an [[h-set]].

### For type families and universes

Uniqueness of identity proofs for type families $(A, B)$ says that given a type $A$ with a type family $B(a)$ indexed by elements $a:A$, the typal uniqueness of identity proofs holds for the dependent type $B(a)$ of every element of the index type $a:A$. This is the same as stating that there is a dependent function

$$\mathrm{UIP}_{A, B}: \prod_{a:A} \prod_{b:B(a)} \prod_{c:B(a)} \prod_{p:\mathrm{Id}_{B(a)}(b, c)} \prod_{q:\mathrm{Id}_{B(a)}(b, c)} \mathrm{Id}_{\mathrm{Id}_A(b, c)}(p, q)$$

This definition of uniqueness of identity proofs could be used in the definition of [[family of sets]]. Since this definition applies to type families, this should probably be called the **familial uniqueness of identity proofs** to distinguish it from the uniqueness of identity proofs axiom above.

Since every Tarski universe consists of a type $U$ of encodings and a type family $T$ representing the actual small types indexed by the type $U$, with addition structure representing the closure of $U$ under all type formers, the familial uniqueness of identity proofs definition works for Tarski universes as well, and this could equivalently be called the **Tarski universe uniqueness of identity proofs**.

### As a rule in the type theory

Uniqueness of identity proofs could also be rewritten as a rule instead of an axiom, by making the hypotheses of the axioms into premises of the rule. This makes uniqueness of identity proofs applicable not only to universes, but to the entire type theory. In addition, one could use, in addition to [[typal equality]], either [[judgmental equality]] or [[propositional equality]], resulting in **judgmental uniqueness of identity proofs** and **propositional uniqueness of identity proofs**, with the original uniqueness of identity proofs axiom called **typal uniqueness of identity proofs**

In this manner, uniqueness of identity proofs then becomes the rules:

* Judgmental uniqueness of identity proofs

$$\frac{\Gamma \vdash A \; type \quad \Gamma \vdash a:A \quad \Gamma \vdash b:A \quad \Gamma \vdash p:\mathrm{Id}_A(a, b) \quad \Gamma \vdash q:\mathrm{Id}_A(a, b)}{\Gamma \vdash p \equiv q:\mathrm{Id}_A(a, b)}$$

* Propositional uniqueness of identity proofs

$$\frac{\Gamma \vdash A \; type \quad \Gamma \vdash a:A \quad \Gamma \vdash b:A \quad \Gamma \vdash p:\mathrm{Id}_A(a, b) \quad \Gamma \vdash q:\mathrm{Id}_A(a, b)}{\Gamma \vdash p =_{\mathrm{Id}_A(a, b)} q \; \mathrm{true}}$$

* Typal uniqueness of identity proofs

$$\frac{\Gamma \vdash A \; type \quad \Gamma \vdash a:A \quad \Gamma \vdash b:A \quad \Gamma \vdash p:\mathrm{Id}_A(a, b) \quad \Gamma \vdash q:\mathrm{Id}_A(a, b)}{\Gamma \vdash \mathrm{UIP}_A(a, b, p, q):\mathrm{Id}_{\mathrm{Id}_A(a, b)}(p, q)}$$

Uniqueness of identity proofs is a [[axiom of set truncation]], and turns the type theory into a [[set-level type theory]]. Judgmental uniqueness of identity proofs holds in [[XTT]], where it follows from [[boundary separation]].

### Uniqueness of identity proofs for heterogeneous identity types

There is also a notion of uniqueness of identity proofs for [[heterogeneous identity types]], which is given by the following rule:

* Judgmental uniqueness of identity proofs for heterogeneous identity types:
$$\frac{
    \begin{array}{l}
      \Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash B \; \mathrm{type} \\
      \Gamma \vdash  a:A \quad \Gamma \vdash b:A \quad \Gamma \vdash p:\mathrm{Id}_A(a, b) \quad \Gamma \vdash y:B \quad \Gamma \vdash z:B \\
     \Gamma \vdash q:\mathrm{hId}_{B}(a, b, p, y, z) \quad \Gamma \vdash r:\mathrm{hId}_{B}(a, b, p, y, z)
    \end{array}
}{\Gamma \vdash q \equiv r:\mathrm{hId}_{B}(a, b, p, y, z)}$$

* Propositional uniqueness of identity proofs for heterogeneous identity types:
$$\frac{
    \begin{array}{l}
      \Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash B \; \mathrm{type} \\
      \Gamma \vdash  a:A \quad \Gamma \vdash b:A \quad \Gamma \vdash p:\mathrm{Id}_A(a, b) \quad \Gamma \vdash y:B \quad \Gamma \vdash z:B \\
     \Gamma \vdash q:\mathrm{hId}_{B}(a, b, p, y, z) \quad \Gamma \vdash r:\mathrm{hId}_{B}(a, b, p, y, z)
    \end{array}
}{\Gamma \vdash q =_{\mathrm{hId}_{B}(a, b, p, y, z)} r \; \mathrm{true}}$$

* Typal uniqueness of identity proofs for heterogeneous identity types:
$$\frac{
    \begin{array}{l}
      \Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash B \; \mathrm{type} \\
      \Gamma \vdash  a:A \quad \Gamma \vdash b:A \quad \Gamma \vdash p:\mathrm{Id}_A(a, b) \quad \Gamma \vdash y:B \quad \Gamma \vdash z:B \\
     \Gamma \vdash q:\mathrm{hId}_{B}(a, b, p, y, z) \quad \Gamma \vdash r:\mathrm{hId}_{B}(a, b, p, y, z)
    \end{array}
}{\Gamma \vdash \mathrm{UIP}_{B}(a, b, p, y, z, q, r):\mathrm{Id}_{\mathrm{hId}_{B}(a, b, p, y, z)}(q, r)}$$

and likewise for [[dependent heterogeneous identity types]]:

* Judgmental uniqueness of identity proofs for dependent heterogeneous identity types:
$$\frac{
    \begin{array}{l}
      \Gamma \vdash A \; \mathrm{type} \quad \Gamma, x:A \vdash B(x) \; \mathrm{type} \\
      \Gamma \vdash  a:A \quad \Gamma \vdash b:A \quad \Gamma \vdash p:\mathrm{Id}_A(a, b) \quad \Gamma \vdash y:B(a) \quad \Gamma \vdash z:B(b) \\
     \Gamma \vdash q:\mathrm{hId}_{x:A.B(x)}(a, b, p, y, z) \quad \Gamma \vdash r:\mathrm{hId}_{x:A.B(x)}(a, b, p, y, z)
    \end{array}
}{\Gamma \vdash q \equiv r:\mathrm{hId}_{x:A.B(x)}(a, b, p, y, z)}$$

* Propositional uniqueness of identity proofs for dependent heterogeneous identity types:
$$\frac{
    \begin{array}{l}
      \Gamma \vdash A \; \mathrm{type} \quad \Gamma, x:A \vdash B(x) \; \mathrm{type} \\
      \Gamma \vdash  a:A \quad \Gamma \vdash b:A \quad \Gamma \vdash p:\mathrm{Id}_A(a, b) \quad \Gamma \vdash y:B(a) \quad \Gamma \vdash z:B(b) \\
     \Gamma \vdash q:\mathrm{hId}_{x:A.B(x)}(a, b, p, y, z) \quad \Gamma \vdash r:\mathrm{hId}_{x:A.B(x)}(a, b, p, y, z)
    \end{array}
}{\Gamma \vdash q =_{\mathrm{hId}_{x:A.B(x)}(a, b, p, y, z)} r \; \mathrm{true}}$$

* Typal uniqueness of identity proofs for dependent heterogeneous identity types:
$$\frac{
    \begin{array}{l}
      \Gamma \vdash A \; \mathrm{type} \quad \Gamma, x:A \vdash B(x) \; \mathrm{type} \\
      \Gamma \vdash  a:A \quad \Gamma \vdash b:A \quad \Gamma \vdash p:\mathrm{Id}_A(a, b) \quad \Gamma \vdash y:B(a) \quad \Gamma \vdash z:B(b) \\
     \Gamma \vdash q:\mathrm{hId}_{x:A.B(x)}(a, b, p, y, z) \quad \Gamma \vdash r:\mathrm{hId}_{x:A.B(x)}(a, b, p, y, z)
    \end{array}
}{\Gamma \vdash \mathrm{UIP}_{x:A.B(x)}(a, b, p, y, z, q, r):\mathrm{Id}_{\mathrm{hId}_{x:A.B(x)}(a, b, p, y, z)}(q, r)}$$

## Properties

### Uniqueness of identity proofs and univalence

In this section we assume that the universe is a Tarski universe. Uniqueness of identity proofs is inconsistent with having a [[univalent type with a type family]] $(A, B)$ with at least one term $a:A$ where the dependent type $B(a)$ is provably not a proposition
$$\left(\prod_{p:B(a)}  \prod_{q:B(a)} \mathrm{Id}_{B(a)}(p, q)\right) \to \emptyset$$
because by univalence, $A$ is then provably not a set, which contradicts uniqueness of identity proofs.
In particular, having a [[univalent universe]] $(U, T)$ in the type theory is inconsistent with uniqueness of identity proofs.

The familial uniqueness of identity proofs axiom applied to Tarski universes implies that for all $A:U$ the type $T(A)$ is a set. This means the type reflection of the internal equivalences $T(A \simeq_U B)$ is an [[h-set]], and the [[univalence axiom]] then implies that $U$ is an [[h-groupoid]]. If $U$ has [[h-sets]] which can be proven not to be an [[h-proposition]], such as the [[booleans type]], then $U$ is provably not an [[h-set]].

However, unlike the case for uniqueness of identity proofs, the familial uniqueness of identity proofs and the univalence axiom for universes are inconsistent with each other only if the Tarski universe $U$ has objects which can be proven not to be an [[h-set]], such as internal univalent Tarski universes $V:U$ where the type $T(V)$ has terms $A:T(V)$ such that $T_V(A)$ is an [[h-set]] which is not an [[h-proposition]], such as the [[booleans type]]. As a result, $T(V)$ can be proven to not be a set, causing uniqueness of identity proofs for $U$ to be inconsistent with the existence of $V:U$ and univalence.

## Related concepts

* [[axiom of set truncation]]

* [[axiom K]]

* [[boundary separation]]

* [[axiom of circle type localization]]

## References

* "[The groupoid interpretation of type theory](http://www.tcs.ifi.lmu.de/mitarbeiter/martin-hofmann/pdfs/agroupoidinterpretationoftypetheroy.pdf)" [PDF], by Martin Hofmann and Thomas Streicher, 1996.

Discussion in [[Coq]] is in

* Pierre Corbineau, _The K axiom  in Coq (almost) for free_ ([pdf](http://coq.inria.fr/files/adt-2fev10-corbineau.pdf))

For definitional UIP in [[XTT]]

* [[Jonathan Sterling]], [[Carlo Angiuli]], [[Daniel Gratzer]], _Cubical syntax for reflection-free extensional equality_. In Herman Geuvers, editor, _4th International Conference on Formal Structures for Computation and Deduction (FSCD 2019)_, volume 131 of _Leibniz International Proceedings in Informatics (LIPIcs)_, pages 31:1-31:25. ([arXiv:1904.08562](https://arxiv.org/abs/1904.08562), [doi:10.4230/LIPIcs.FCSD.2019.31](https://doi.org/10.4230/LIPIcs.FCSD.2019.31))

* [[Jonathan Sterling]], [[Carlo Angiuli]], [[Daniel Gratzer]], _A Cubical Language for Bishop Sets_, Logical Methods in Computer Science, 18 (1), 2022. ([arXiv:2003.01491](https://arxiv.org/abs/2003.01491)).

[[!redirects uniqueness of identity proofs]]
[[!redirects UIP]]

[[!redirects judgmental uniqueness of identity proofs]]
[[!redirects propositional uniqueness of identity proofs]]
[[!redirects typal uniqueness of identity proofs]]

[[!redirects judgmental UIP]]
[[!redirects propositional UIP]]
[[!redirects typal UIP]]


uniqueness quantifier

\tableofcontents

## Definition

### In first order logic with equality

#### Uniqueness up to equality

In [[first order logic with equality]], given a predicate $P$ on a type $T$ with equality, the __uniqueness quantifier__ of $P$, denoted $\exists!\, x\colon T, P(x)$, is defined in terms of the universal and existential quantifiers as

$$ \exists!\, x\colon T, P(x) \;\equiv\; \exists\, x\colon T, P(x) \wedge \forall\, y\colon T, P(y) \Rightarrow (x = y) .$$

The intended interpretation is that $\exists!\, x\colon T, P(x)$ is true iff $P(a)$ is true for *exactly* one element $a$ of $T$.

#### Uniqueness up to isomorphism

Sometimes, we want to use a weaker notion of [[equivalence]] than strict [[equality]], such as [[isomorphism]] $x \cong y$. The __uniqueness up to isomorphism quantifier__ of $P$, denoted $\exists!_\cong\, x\colon T, P(x)$, is defined in terms of the universal and existential quantifiers as

$$ \exists!_\cong\, x\colon T, P(x) \;\equiv\; \exists\, x\colon T, P(x) \wedge \forall\, y\colon T, P(y) \Rightarrow (x \cong y).$$

The intended interpretation is that $\exists!_\cong\, x\colon T, P(x)$ is true iff $P(a)$ is true for *exactly* one element $a$ of $T$ up to isomorphism.

Uniqueness up to isomorphism quantifiers are important in [[category theory]], where the relevant notion of sameness is isomorphism rather than strict equality. It is also important in [[foundations|foundational]] [[set theories]] where the type of sets does not have equality, such as some presentations of [[SEAR]] and [[ETCS]].

### In dependent type theory

In [[dependent type theory]], given a type $T$ and a type family $x:T \vdash P(x)$, the uniqueness quantifier is a type defined as

$$\exists!\, x\colon T. P(x) \coloneqq \mathrm{isContr}\left(\sum_{x:T} P(x)\right)$$

which indicates that the [[dependent sum type]] $\sum_{x:T} P(x)$ is a [[contractible type]], which is only the case for a family of type if every dependent type is a mere proposition and, for exactly one element $x:T$ up to identity, the type $P(x)$ is inhabited.

#### Rules for uniqueness quantifiers

If the [[dependent type theory]] has [[identity types]] and [[dependent identity types]], but does not have general [[dependent function types]] (such as in [[strongly predicative mathematics]]), one could directly form the uniqueness quantifier via its [[natural deduction]] rules:

Formation rules for uniqueness quantifier types:
$$\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma, x:A \vdash B(x) \; \mathrm{type}}{\Gamma \vdash \exists!x:A.B(x) \; \mathrm{type}}$$

Introduction rules for uniqueness quantifier types:
$$\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma, x:A \vdash B(x) \; \mathrm{type} \quad \Gamma \vdash a:A \quad \Gamma \vdash b:B(a) \quad \Gamma, x:A, y:B(x) \vdash \tau_A(x, y):a =_A x \quad \Gamma, x:A, y:B(x) \vdash \tau_B(x, y):b =_B^{\tau_A(x, y)} y}{\Gamma \vdash w(a, b, \tau_A, \tau_B):\exists!x:A.B(x)}$$

Elimination rules for uniqueness quantifier types:
$$\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma, x:A \vdash B(x) \; \mathrm{type} \quad \Gamma \vdash p:\exists!x:A.B(x)}{\Gamma \vdash \epsilon_A(p):A}$$

$$\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma, x:A \vdash B(x) \; \mathrm{type} \quad \Gamma \vdash p:\exists!x:A.B(x)}{\Gamma \vdash \epsilon_B(p):B(\epsilon_A(p))}$$

$$\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma, x:A \vdash B(x) \; \mathrm{type} \quad \Gamma \vdash p:\exists!x:A.B(x)}{\Gamma, x:A, y:B(x) \vdash c_A(p, x, y):\epsilon_A(p) =_A x}$$

$$\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma, x:A \vdash B(x) \; \mathrm{type} \quad \Gamma \vdash p:\exists!x:A.B(x)}{\Gamma, x:A, y:B(x) \vdash c_B(p, x, y):\epsilon_B(p) =_B^{c_A(p, x, y)} y}$$

Computation rules for uniqueness quantifier types:
$$\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma, x:A \vdash B(x) \; \mathrm{type} \quad \Gamma \vdash a:A \quad \Gamma \vdash b:B(a) \quad \Gamma, x:A, y:B(x) \vdash \tau_A(x, y):a =_A x \quad \Gamma, x:A, y:B(x) \vdash \tau_B(x, y):b =_B^{\tau_A(x, y)} y}{\Gamma \vdash \beta_{\exists!x:A.B(x)}^{\epsilon_A}(a, b):\epsilon_A(w(a, b, \tau_A, \tau_B)) =_A a}$$

$$\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma, x:A \vdash B(x) \; \mathrm{type} \quad \Gamma \vdash a:A \quad \Gamma \vdash b:B(a) \quad \Gamma, x:A, y:B(x) \vdash \tau_A(x, y):a =_A x \quad \Gamma, x:A, y:B(x) \vdash \tau_B(x, y):b =_B^{\tau_A(x, y)} y}{\Gamma \vdash \beta_{\exists!x:A.B(x)}^{\epsilon_B}(a, b):\epsilon_B(w(a, b, \tau_A, \tau_B))) =_B^{\beta_{\exists!x:A.B(x)}^{\epsilon_A}(a, b)} b}$$

$$\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma, x:A \vdash B(x) \; \mathrm{type} \quad \Gamma \vdash a:A \quad \Gamma \vdash b:B(a) \quad \Gamma, x:A, y:B(x) \vdash \tau_A(x, y):a =_A x \quad \Gamma, x:A, y:B(x) \vdash \tau_B(x, y):b =_B^{\tau_A(x, y)} y}{\Gamma, x:A, y:B(x) \vdash \beta_{\exists!x:A.B(x)}^{c_A}(a, b, x, y):c_A(w(a, b, \tau_A, \tau_B), x, y) =_{(-) =_A x}^{\beta_{\exists!x:A.B(x)}^{\epsilon_A}} \tau_A(x, y)}$$

$$\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma, x:A \vdash B(x) \; \mathrm{type} \quad \Gamma \vdash a:A \quad \Gamma \vdash b:B(a) \quad \Gamma, x:A, y:B(x) \vdash \tau_A(x, y):a =_A x \quad \Gamma, x:A, y:B(x) \vdash \tau_B(x, y):b =_B^{\tau_A(x, y)} y}{\Gamma, x:A, y:B(x) \vdash \beta_{\exists!x:A.B(x)}^{c_B}(a, b, x, y):c_B(w(a, b, \tau_A, \tau_B), x, y) =_{(-) =_B^{\beta_{\exists!x:A.B(x)}^{c_A}(a, b, x, y)} y}^{\beta_{\exists!x:A.B(x)}^{\epsilon_B}} \tau_B(x, y)}$$

Uniqueness rules for uniqueness quantifier types:
$$\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma, x:A \vdash B(x) \; \mathrm{type} \quad \Gamma \vdash p:\exists!x:A.B(x)}{\Gamma \vdash \eta_{\exists!x:A.B(x)}(p):w(\epsilon_A(p), \epsilon_B(p), c_A(p), c_B(p)) =_{\exists!x:A.B(x)} p}$$

## Usages

### Bijections and equivalences

The uniqueness quantifier is used in the definition of a [[bijection]] in [[set theory]] and an [[equivalence in type theory]], where one defines a [[function]] $f:A \to B$ to be a bijection or equivalence if for all $y:B$ the there is a unique $x:A$ such that $f(x) =_B y$

$$\mathrm{isEquiv}(f) \coloneqq \forall y:B.\exists! x:A.f(x) =_B y$$

In [[dependent type theory]], this is the same as defining a family of elements $x:A \vdash f(x):B$ to be an equivalence if it comes with a family of elements
$$y:B \vdash \epsilon(f)(y):\exists! x:A.f(x) =_B y$$
The [[inverse]] of an equivalence is given by the family of elements $y:B \vdash \epsilon_A(\epsilon(f)(y)):A$, where $\epsilon_A$ is defined in the [[elimination rules]] for [[uniqueness quantifiers]] in [[dependent type theory]].

### Anafunctions

Similarly, uniqueness quantifications is used in the definition of an [[anafunction]], where one defines a [[relation]] or [[correspondence]] $x:A, y:B \vdash R(x, y)$ to be an anafunction if for all $x:A$ there is a unique $y:B$ such that $R(x, y)$

$$\mathrm{isAnafunc}(R) \coloneqq \forall x:A.\exists! y:B.R(x, y)$$

### Univalent universes

Uniqueness quantifiers are also used to define [[univalent universes]]. A [[Russell universe]] $U$ is a [[univalent universe]] if for all elements $A:U$ there is a unique $B:U$ such that $A \simeq B$:

$$\mathrm{isUnivalent}(U) \coloneqq \forall A:U.\exists! B:U.A \simeq B$$

Similarly, a [[Tarski universe]] $(U, T)$ is a [[univalent universe]] if for all elements $A:U$ there is a unique $B:U$ such that $T(A) \simeq T(B)$:

$$\mathrm{isUnivalent}(U, T) \coloneqq \forall A:U.\exists! B:U.T(A) \simeq T(B)$$

## See also

* [[quantification]]

* [[existential quantifier]]

* [[universal quantifier]]

* [[definite description]]

* [[generalized the]]

[[!redirects uniquely quantified]]

[[!redirects uniqueness quantifier]]
[[!redirects uniqueness quantifiers]]
[[!redirects uniqueness quantification]]
[[!redirects uniqueness quantifications]]
[[!redirects unicity quantifier]]
[[!redirects unicity quantifiers]]
[[!redirects unicity quantification]]
[[!redirects unicity quantifications]]


unirational variety

An [[algebraic variety]] $X$ over a [[field]] $k$ is __unirational__ if there is a [[dominant rational map of varieties]] $f : P^n_k \dashrightarrow X$.  The class of unirational varieties is a natural generalization of a class of [[rational varieties]]. Usually, it is much easier to decide if a variety is unirational or not, than it is to decide whether or not it is rational.

[[!redirects unirational varieties]]


unistochastic quantum channel

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

#Contents#
* table of contents
{:toc}

## Idea

A [[quantum operation]]/[[quantum channel]] $chan \,\colon\, \mathscr{H} \otimes \mathscr{H}^\ast \to \mathscr{H} \otimes \mathscr{H}^\ast$ is called a *noisy operation* [by [Horodecki, Horodecki & Oppenheim 2003](#HorodeckiHorodeckiOppenheim03), but beware that this can be ambiguous] or a *unistochastic channel* [[Życzkowski & Bengtsson 2004](#ŻyczkowskiBengtsson04)] if it has an [environmental representation](quantum+channel#QuantumChannelsAndDecoherence) where the environment/bath system $\mathscr{B}$ is in its *[[maximally mixed state|maximally]]* [[mixed quantum state]]:

$$
  chan(\rho)
  \;\;=\;\;
  \mathrm{tr}^{\mathscr{B}}
  \Big(
    U
    \big(
      \rho
        \otimes
      \underset{
        \mathclap{
          {maximally \; mixed}
          \atop
          environment
        }
      }{
        \underbrace{
          \frac{1}{dim(\mathscr{B})}
          id_{\mathscr{B}}
        }
      }
    \big)
    U^\dagger
  \Big)
  \,.
$$

\begin{remark}
  The theorem ([here](quantum+channel#QuantumChannelsAsPartialTracesOfUnitariesOnTensors)) that every endo-[[quantum channel]] has an environmental representation is sometimes advertized with the addendum that "... and such that the environment may be chosen to be in a pure state". But existing general proofs actually produce *only* such environmental representations. For environments in non-pure states it is not clear that they can environmentally represent all quantum channels, and for noisy/unistochastic channels it is not to be expected that they exhaust all quantum channels.

But [Müller-Hermes & Perry 2019](#Müller-HermesPerry19) show that at least all *[[unital quantum channels]]* on single [[qbits]] can be realized as noisy/unistochastic channels (with a bath of size at least 4).
\end{remark}

\begin{remark}
\label{DQC1Model}
**(DQC1 model)**
\linebreak
But the idea of exploring [[quantum computation]]/[[quantum information theory]] on (a few or just single) clean [[qbits]] coupled to an environment in a maximally [[mixed state]] goes back already to [Knill & Laflamme 1998](#KnillLaflamme98) (motivated by discussion of [[spin resonance qbits]]), who referred to this model of computation as *deterministic quantum computation with one quantum bit* (abbreviated "*DQC1*", now also used for the corresponding [[quantum complexity theory|quantum complexity ]] [[complexity class|class]], first studied by [Shor 2008](#Shor08), and often referred as the "one clean qbit"-model).

> The DQC1 model is believed to be a very restricted, but still genuinely quantum, computing model -- a sub-universal quantum computing model whose power is something between classical computation and universal quantum computation. [[FKMNTT18, p. 2](#FKMNTT18)]

The communities using these different terminologies for closely related ideas may have been somewhat disconnected. A proposal to look at DQC1 in terms of [[quantum channels]] seems to not appear not before [Xuereb, Campbell, Goold & Xuereb 2023](#XuerebCampbellGooldXuereb23); [Fu, He, Li & Luo 2023](#FuHeLiLuo23) (and the "unistochastic" terminology is not used there).
\end{remark}

## Examples

\begin{example}
\label{UniformlyMixedUnitaryChannelsAreUnistochastic}
Any [[mixed unitary quantum channel]] for a *uniform* [[probability distribution]], i.e. one of the form
$$
  \rho
  \;\mapsto\;
  \tfrac{1}{Card(S)}
  \underset{s \colon S}{\sum}
  \,
  U_s \cdot \rho \cdot U_s^\dagger,
  \;\;\;\;
  \,,
$$
for unitaries
$$
  s\,\colon\, S
  \;\;\;\;\;\;
  \vdash
  \;\;\;\;\;\;
  U_s \,\colon\, \mathscr{H}_1 \to \mathscr{H}_2
$$
is unistochastic, as evidently exhibited by the following coupling unitary
$$
  U_tot
  \;\colon\;
  \mathscr{H}_1 \otimes \underset{S}{\oplus} \mathbb{C}
  \to
  \mathscr{H}_2 \otimes \underset{S}{\oplus} \mathbb{C}
$$
\[
  \label{CouplingMatrixForUniformMixedUnitaryChannel}
  U_{tot}
  \;\;\coloneqq\;\;
  \tfrac{1}{Card(S)}
  \underset{s \colon S}{\sum}
  \,
  U_s
    \otimes
  \left\vert s \right\rangle
  \left\langle s \right\vert
  \mathrlap{\,.}
\]
\end{example}
(cf. [Müller-Hermes & Perry 2019, proof of Cor. 1.4](#Müller-HermesPerry19))

\begin{proposition}
  \label{MixedUnitaryChannelsOnSIngleQBitAreUnistochastic}
  On a single [[qbit]], every [[mixed unitary quantum channel]]  is a unistochastic channel.
\end{proposition}
([Müller-Hermes & Perry 2019, Cor 1.4](#Müller-HermesPerry19))
\begin{proof}
By Exp. \ref{UniformlyMixedUnitaryChannelsAreUnistochastic} one is reduced to showing that on QBits every mixed unitary quantum channel equals one with uniformly distributed unitaries (this is [M-H & P 19, Thm. 1.2](#Müller-HermesPerry19)). We further spell out the case where there are two unitaries to start with ([M-H & P 19, Lem. 1.1](#Müller-HermesPerry19)):

So let the mixed unitary channel be given by
$$
  \rho
  \;\mapsto\;
  p_1 \, U_1 \cdot \rho \cdot U_1^\dagger
  \;+\;
  p_2 \, U_2 \cdot \rho \cdot U_2^\dagger
$$
then we want to find $U'_i$ with
$$
  p_1 \, U_1 \cdot (\text{-}) \cdot U_1^\dagger
  \;+\;
  p_2 \, U_2 \cdot (\text{-}) \cdot U_2^\dagger
  \;\;
  =
  \;\;
  \tfrac{1}{2}
  \,
  U'_1 \cdot (\text{-}) \cdot U'_1^\dagger
  \;+\;
  \tfrac{1}{2}
  \,
  U'_2 \cdot (\text{-}) \cdot U'_2^\dagger
  \,.
$$
First, by replacing $(\text{-}) \mapsto S \cdot (\text{-}) S^\dagger$ --- for a unitary $S$ to be specified in a moment ---, this is equivalent to
$$
  \begin{array}{r}
  p_1 \, U_1 \cdot S \cdot (\text{-}) \cdot S^\dagger \cdot U_1^\dagger
  \\
  +\;
  p_2 \, U_2 \cdot S \cdot (\text{-}) \cdot S^\dagger \cdot U_2^\dagger
  \end{array}
  \;\;
  =
  \;\;
  \begin{array}{r}
  \tfrac{1}{2}
  \,
  U'_1 \cdot S \cdot (\text{-}) \cdot S^\dagger \cdot U'_1^\dagger
  \\
  +
  \;
  \tfrac{1}{2}
  \,
  U'_2 \cdot S \cdot (\text{-}) \cdot S^\dagger \cdot U'_2^\dagger
  \mathrlap{\,.}
  \end{array}
$$
and then conjugating both sides by $S^\dagger \cdot U^\dagger_1$  gives that this is equivalent to
\[
  \label{IntermediateStepInQBitArgument}
  p_1 \, (\text{-})
  \;+\;
  p_2 \,
  \underset{D}{
  \underbrace{
    S^\dagger U_1^\dagger \cdot U_2 \cdot S
  } }
  \cdot
  (\text{-})
  \cdot
  \underset{D^\dagger}{
  \underbrace{
    S^\dagger \cdot U_2^\dagger \cdot U_1 \cdot S
  }
  }
  \;\;
  =
  \;\;
  \begin{array}{r}
  \tfrac{1}{2}
  \,
  \underset{ W_1 }{
  \underbrace{
    S^\dagger \cdot U_1^\dagger \cdot U'_1 \cdot S
  }
  }
  \cdot
    (\text{-})
  \cdot
  \underset{
    W_1^\dagger
  }{
  \underbrace{
    S^\dagger \cdot U'_1^\dagger \cdot U_1 \cdot S
  }
  }
  \\
  +
  \;
  \tfrac{1}{2}
  \,
  \underset{
    W_2
  }{
    \underbrace{
      S^\dagger \cdot U_1^\dagger \cdot U'_2 \cdot S
    }
  }
  \cdot
  (\text{-})
  \cdot
  \underset{W_2^\dagger}{
    \underbrace{
      S^\dagger \cdot U'_2^\dagger \cdot U_1 \cdot S
    }
  }
  \end{array}
\]
At this point we fix $S$: Since $U_1^\dagger \cdot U_2$ is evidently a [[normal operator]], the [[spectral theorem]] applies to show that we may find $S$ such that $D$ above is a [[diagonal matrix]]:
\[
  \label{DiagonalizingOperatorInQBitArgument}
  S \cdot U_1^\dagger \cdot U_2 \cdot S^\dagger
  \;\;=\;\;
  diag\big( D_{11}, \, D_{22} \big)
  \,=\,
  D
  \,.
\]

This way we are now reduced to finding unitary operators $W_i$, such that
$$
  p_1 \, (\text{-})
  \;+\;
  p_2
  \,
  D \cdot (\text{-}) \cdot D^\dagger
  \;\;
  =
  \;\;
  \tfrac{1}{2}
  \,
  W_1 \cdot (\text{-}) \cdot W_1^\dagger
  \;+\;
  \tfrac{1}{2}
  \,
  W_2 \cdot (\text{-}) \cdot W_2^\dagger
  \,.
$$
Plugging in the simple ansatz
$$
  W_i
  \;\coloneqq\;
  \left[
  \array{
    e^{2 \pi \mathrm{i} \phi_i } & 0
    \\
    0 & 1
  }
  \right]
$$
shows that this works for
\[
  \label{PhaseConditionForQBitArgument}
  \tfrac{1}{2}
  \big(
    e^{2 \pi \mathrm{i} \phi_1}
    +
    e^{2 \pi \mathrm{i} \phi_2}
  \big)
  \;\;
  =
  \;\;
  p_1
  \,+\,
  p_2
  \,
  D_11 \overline{D_22}
  \mathrlap{\,.}
\]
which always has a solution for the $\phi_i$ ([M-H & P 19, p. 3](#Müller-HermesPerry19)).

Finally plugging back into (eq:IntermediateStepInQBitArgument) shows that the desired uniformly distributed unitaries may be taken to be:
$$
  \label{UniformUnitariesInQBitCase}
  U'_i
  \;\;\coloneqq\;\;
  U_1
  \cdot
  S
  \cdot
  \left[
  \array{
    e^{2 \pi \mathrm{i} \phi_i} & 0
    \\
    0 & 1
  }
  \right]
  \cdot
  S^\dagger
  \,.
$$
\end{proof}

\begin{example}
\label{BitFlipAsUnistochasticChannel}
The [[bit-flip quantum channel]]
\[
  \label{OrdinaryBitFlipChannel}
  \array{
    \mathllap{
      flip_p
      \;\colon\;
    }
    QBit \otimes QBit^\ast
    &\longrightarrow&
    QBit \otimes QBit^\ast
    \\
    \rho &\mapsto&
    (1-p)\,\rho
    \;+\;
    p \, X \cdot \rho \cdot X
  }
\]
is unistochastic, by Exp. \ref{MixedUnitaryChannelsOnSIngleQBitAreUnistochastic}, since it is manifestly [[mixed unitary quantum channel|mixed unitary]].

Explicitly, the unitary $S$ (eq:DiagonalizingOperatorInQBitArgument) in this case may be taken to be
$$
  S
  \;=\;
  \tfrac{1}{\sqrt{2}}
  \left[
  \array{
    1 & 1
    \\
    -1 & 1
  }
  \right]
$$
which gives
$$
  D
  \;\;
  =
  \;\;
  \tfrac{1}{\sqrt{2}}
  \left[
  \array{
    1 & 1
    \\
    -1 & 1
  }
  \right]
  \cdot
  \underset{
    X
  }{
  \underbrace{
  \left[
  \array{
    0 & 1
    \\
    1 & 0
  }
  \right]
  }
  }
  \cdot
  \tfrac{1}{\sqrt{2}}
  \left[
  \array{
    1 & -1
    \\
    1 & 1
  }
  \right]
  \;\;
  =
  \;\;
  \left[
  \array{
    1 & 0
    \\
    0 & -1
  }
  \right]
  \mathrlap{\,,}
$$
and the condition (eq:PhaseConditionForQBitArgument) in this case is
$$
  \tfrac{1}{2}
  \big(
    e^{2 \pi \mathrm{i} \phi_1}
    +
    e^{2 \pi \mathrm{i} \phi_2}
  \big)
  \;\;
  =
  \;\;
  (1 - 2 p)
  \,.
$$
This is solved for
$$
  \phi_1 = -\phi_2 = arccos(1-2p)
  \,,
$$
so that the desired unitary operators as obtained from formula (eq:UniformUnitariesInQBitCase) are:
$$
  \begin{array}{l}
  U_{1/2}
  \\
  \;=\;
  \tfrac{1}{\sqrt{2}}
  \left[
  \array{
    1 & 1
    \\
    -1 & 1
  }
  \right]
  \cdot
  \left[
  \array{
    e^{ \pm \mathrm{i} \phi }
    & 0
    \\
    0 & 1
  }
  \right]
  \cdot
  \tfrac{1}{\sqrt{2}}
  \left[
  \array{
    1 & -1
    \\
    1 & 1
  }
  \right]
  \\
  \;=\;
  \tfrac{1}{2}
  \left[
  \array{
    1 + e^{ \pm \mathrm{i} \phi }
    &
    1 - e^{ \pm \mathrm{i} \phi }
    \\
    1 - e^{ \pm \mathrm{i} \phi }
    &
    1 + e^{ \pm \mathrm{i} \phi }
  }
  \right]
  \\
  \;=\;
  \tfrac{1}{2}
  e^{ \pm \mathrm{i} \phi/2 }
  \left[
  \array{
    e^{ \mp \mathrm{i} \phi/2 } + e^{ \pm \mathrm{i} \phi/2 }
    &
    e^{ \mp \mathrm{i} \phi/2 } - e^{ \pm \mathrm{i} \phi/2 }
    \\
    e^{ \mp \mathrm{i} \phi/2 } - e^{ \pm \mathrm{i} \phi/2 }
    &
    e^{ \mp \mathrm{i} \phi/2 } + e^{ \pm \mathrm{i} \phi/2 }
  }
  \right]
  \\
  \;=\;
  e^{ \pm \mathrm{i} \phi/2 }
  \left[
  \array{
    cos(\phi/2) & \pm\mathrm{i}\,sin(\phi/2)
    \\
    \pm\mathrm{i}\,sin(\phi/2) & cos(\phi/2)
  }
  \right]
  \mathrlap{\,.}
  \end{array}
$$
for
$$
  \phi
  \,\coloneqq\,
  arccos(1-2p)
  \,.
$$

Hence a uniformly mixed unitary channel representation of the [[bit-flip quantum channel]] (eq:OrdinaryBitFlipChannel) is:
\[
  \label{UniformlyMixedUnitaryFormOfBitFliChannel}
  \begin{array}{rcl}
  flip_p(\rho)
  &=&
  \tfrac{1}{2}
  \,
  \left[
  \array{
    cos(\phi/2) & -\mathrm{i}\,sin(\phi/2)
    \\
    -\mathrm{i}\,sin(\phi/2) & cos(\phi/2)
  }
  \right]
  \cdot
  \rho
  \cdot
  \left[
  \array{
    cos(\phi/2) & +\mathrm{i}\,sin(\phi/2)
    \\
    +\mathrm{i}\,sin(\phi/2) & cos(\phi/2)
  }
  \right]
  \\
  &+&
  \tfrac{1}{2}
  \,
  \left[
  \array{
    cos(\phi/2) & +\mathrm{i}\,sin(\phi/2)
    \\
    +\mathrm{i}\,sin(\phi/2) & cos(\phi/2)
  }
  \right]
  \cdot
  \rho
  \cdot
  \left[
  \array{
    cos(\phi/2) & -\mathrm{i}\,sin(\phi/2)
    \\
    -\mathrm{i}\,sin(\phi/2) & cos(\phi/2)
  }
  \right]
  \mathrlap{\,,}
  \\
  &&
  \text{where}\;
  \phi
  \,\equiv\,
  arccos(1-2p)
  \text{.}
  \end{array}
\]
With (eq:CouplingMatrixForUniformMixedUnitaryChannel) this uniformly mixed unitary presentation immediately gives the unistochastic presentation of the bit-flip channel.
\end{example}

## References

### DQC1 computation

The exploration of the possibilities of [[quantum computing]]/[[quantum information theory]] with (a few or even just single) "clean" [[qubits]] coupled to a [[maximally mixed state]] environment goes back to

* {#KnillLaflamme98} [[Emanuel Knill]], [[Raymond Laflamme]], *On the Power of One Bit of Quantum Information*, Phys. Rev. Lett. **81** (1998) 5672-5675 [[arXiv:quant-ph/9802037](https://arxiv.org/abs/quant-ph/9802037), [doi:10.1103/PhysRevLett.81.5672](https://doi.org/10.1103/PhysRevLett.81.5672)]

(motivated by the practical reality of [[NMR]] [[spin resonance qbits]]) who called this model of computation *deterministic quantum computation with one quantum bit (DQC1)*.

The model was further discussed in:

* [[David Poulin]], [[Raymond Laflamme]], [[Gerard J. Milburn]], [[Juan Pablo Paz]], *Testing integrability with a single bit of quantum information*, Phys. Rev. A **68** 22302 (2003) [[arXiv:quant-ph/0303042](https://arxiv.org/abs/quant-ph/0303042), [doi:10.1103/PhysRevA.68.022302](https://doi.org/10.1103/PhysRevA.68.022302)]

* [[David Poulin]], Robin Blume-Kohout, [[Raymond Laflamme]], Harold Ollivier, around (2) of:  *Exponential speed-up with a single bit of quantum information: Testing the quantum butterfly effect*, Phys. Rev. Lett. **92** 177906 (2004) [[arXiv:quant-ph/0310038](https://arxiv.org/abs/quant-ph/0310038), [doi:10.1103/PhysRevLett.92.177906](https://doi.org/10.1103/PhysRevLett.92.177906)]

* {#Shor08} [[Peter W. Shor]], Stephen P. Jordan, *Estimating Jones polynomials is a complete problem for one clean qubit*, Quantum Information and Computation **8** (2008) 681 [[arXiv:0707.2831](https://arxiv.org/abs/0707.2831), [doi:10.5555/2017011.2017012](https://dl.acm.org/doi/10.5555/2017011.2017012)]

* Dan Shepherd, *Computation with Unitaries and One Pure Qubit* [[arXiv:quant-ph/0608132](https://arxiv.org/abs/quant-ph/0608132)]

* Chris Cade, Ashley Montanaro, *The Quantum Complexity of Computing Schatten $p$-norms* [[arXiv:1706.09279](https://arxiv.org/abs/1706.09279)]

See also:

* Wikipedia, *[One Clean QBit](https://en.wikipedia.org/wiki/One_Clean_Qubit)*.

Discussion where even the single system qbit is not fully coherent, either:

* Tomoyuki Morimae, Keisuke Fujii, Harumichi Nishimura, *Power of one non-clean qubit*, Phys. Rev. A *95* 042336 (2017) [[arXiv:1610.07244](https://arxiv.org/abs/1610.07244), [doi:10.1103/PhysRevA.95.042336](https://doi.org/10.1103/PhysRevA.95.042336)]

Proof that all [[unital quantum channels]] on single [[qubits]] are unistochastic (noisy operations) for a bath of size at least 4:

* {#Müller-HermesPerry19} Alexander Müller-Hermes, Christopher Perry, *All unital qubit channels are 4-noisy operations*, Letters in Mathematical Physics **109** (2019) 1–9 [[doi:10.1007/s11005-018-1104-x](https://doi.org/10.1007/s11005-018-1104-x), [arXiv:1802.01337](https://arxiv.org/abs/1802.01337)]

Discussion of DQC1 in the language of [[quantum channels]]:

* {#XuerebCampbellGooldXuereb23} Jake Xuereb, Steve Campbell, John Goold, André Xuereb, *DQC1 as an Open Quantum System*, Phys. Rev. A **107** 042222 (2023) [[arXiv:2209.03947](https://arxiv.org/abs/2209.03947), [doi:10.1103/PhysRevA.107.042222](https://doi.org/10.1103/PhysRevA.107.042222)]

* {#FuHeLiLuo23} Shuangshuang Fu, Jiayu He, Xiaohui Li and Shunlong Luo, *Uncertainties and coherence in DQC1*, Physica Scripta, **98** 4 (2023) [[doi:10.1088/1402-4896/acc5ba](https://iopscience.iop.org/article/10.1088/1402-4896/acc5ba)]

Discussion of classical simulation (or not) of the DQC1 model

* {#FKMNTT18} Keisuke Fujii, Hirotada Kobayashi, Tomoyuki Morimae, Harumichi Nishimura, Shuhei Tamate, Seiichiro Tani, *Impossibility of Classically Simulating One-Clean-Qubit Computation*,  	Phys. Rev. Lett. **120** 200502 (2018) [[arXiv:1409.6777](https://arxiv.org/abs/1409.6777), [doi:10.1103/PhysRevLett.120.200502](https://doi.org/10.1103/PhysRevLett.120.200502)]

### Noisy operations/unistochastic channels

The terminology of "noisy operations" is due to

* {#HorodeckiHorodeckiOppenheim03} [[Michal Horodecki]], [[Pawel Horodecki]], [[Jonathan Oppenheim]], *Reversible transformations from pure to mixed states, and the unique measure of information*, Phys. Rev. A 67 062104 (2003) [[doi:10.1103/PhysRevA.67.062104](https://doi.org/10.1103/PhysRevA.67.062104), [arXiv;quant-ph/0212019](https://arxiv.org/abs/quant-ph/0212019)]

* picked up by [Müller-Hermes & Perry 2019](#Müller-HermesPerry19)

and the terminology "unistochastic channels" was introduced in:

* {#ŻyczkowskiBengtsson04} [[Karol Życzkowski]], [[Ingemar Bengtsson]], p. 13 of: *On Duality between Quantum Maps and Quantum States*, Open Systems & Information Dynamics **11** 01 (2004) 3-42 [[doi:10.1023/B:OPSY.0000024753.05661.c2](https://doi.org/10.1023/B:OPSY.0000024753.05661.c2)]

* {#BengtssonŻyczkowski06} [[Ingemar Bengtsson]], [[Karol Życzkowski]], p. 259 of: *Geometry of Quantum States --- An Introduction to Quantum Entanglement*, Cambridge University Press (2006) [[doi:10.1017/CBO9780511535048](https://doi.org/10.1017/CBO9780511535048), [ResearchGate](https://www.researchgate.net/publication/266435541_Geometry_of_Quantum_States_An_Introduction_to_Quantum_Entanglement)]

* Marcin Musz, Marek Kuś, [[Karol Życzkowski]], *Unitary quantum gates, perfect entanglers, and unistochastic maps*, Phys. Rev. A **87** (2013) 022111 [[doi:10.1103/PhysRevA.87.022111](https://doi.org/10.1103/PhysRevA.87.022111)]

[[!redirects unistochastic quantum channels]]

[[!redirects noisy quantum operation]]
[[!redirects noisy quantum operations]]

[[!redirects DQC1]]
[[!redirects one clean qbit]]


unit

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
###Context###
#### Algebra
+--{: .hide}
[[!include higher algebra - contents]]
=--
#### Monoid theory
+-- {: .hide}
[[!include monoid theory - contents]]
=--
=--
=--

> For other kinds of units see also _[[unit of an adjunction]]_ and _[[unit of a monad]]_. Different (but related) is _[[physical unit]]_.

****

# Units
* table of contents
{: toc}

## Idea

Considering a [[ring]] $R$, then by _the unit element_ or _the multiplicative unit_ one usually means the [[neutral element]] $1 \in R$ with respect to [[multiplication]]. This is the sense of "unit" in terms such as _[[nonunital ring]]_.

But more generally _a unit element_ in a unital (!) ring is any element that has an [[inverse element]] under [[multiplication]].

This concept generalizes beyond [[rings]], and this is what is discussed in the following.

## Definitions

Exactly what this means depends on context.  A very general definition is this:

Given [[sets]] $R$ and $M$, and a [[function]] ${\cdot}\colon R \times M \to M$, an [[element]] $u$ of $M$ is a __unit__ (relative to the operation ${\cdot}$) if, given any element $x$ of $M$, there exists a unique element $a$ of $R$ such that $x = a \cdot u$.

That is, every element of $M$ is a multiple (in a unique way) of $u$, where 'multiple' is defined in terms of the operation ${\cdot}$.

### Units in rings

If $R$ is a [[ring]] (or [[rig]]), then $R$ comes equipped with a multiplication map ${\cdot}\colon R \times R \to R$.  So $R$ can play the role of both $R$ and $M$ above, although there are two ways to do this: on the left and on the right.

We find that $u$ is a __left unit__ if and only if $u$ has a [[left inverse]], and $u$ is a __right unit__ if and only if $u$ has a [[right inverse]].  First, an element $u$ with an inverse is a unit because, given any element $x$, we have
$$ x = (x u^{-1}) u $$
(on the left) or
$$ x = u (u^{-1} x) $$
(on the right).  Conversely, a unit must have an inverse, since there must a solution to
$$ 1 = a u $$
(on the left) or
$$ 1 = u a $$
(on the right).

In a [[commutative ring]] (or rig), a __unit__ is an element of $R$ that has an [[inverse element|inverse]], period.  Of course, a commutative ring $R$ is a [[field]] just when every non-[[zero]] element is a unit.

### Units in monoids

Notice that addition plays no role in the characterisation above of a unit in a ring.  Accordingly, a unit in a [[monoid]] may be defined in precisely the same way.

A [[group]] is precisely a monoid in which every element is a unit.

### Units in rngs or semigroups

In a [[rng]] (or, ignoring addition, in a [[semigroup]]), we cannot speak of inverses of elements.  However, we can still talk about units; $u$ is a __left unit__ if, for every $x$, there is an $a$ such that
$$ x = a u ;$$
and $u$ is a __right unit__ if, for every $x$, there is an $a$ such that
$$ x = u a .$$

### Units in nonassocative rings or magmas

In a [[nonassociative algebra|nonassociative ring]] (or, ignoring addition, in a [[magma]]), even if we have an identity element, an invertible element might not be a unit.  So we must use the same explicit definition as in a rng (or semigroup) above.

A [[quasigroup]] is precisely a magma in which every element is a two-sided unit.

### Units in modules

If $R$ is a [[ring]] (or [[rig]]) and $M$ an $R$-[[module]], then a __unit__ in $M$ is an element $u \in M$ such that every other $x \in M$ can be written as $x = a u$ (or $x = u a$ for a right module) for some $a \in R$.  This is the same as a [[generator]] of $M$ as an $R$-module.  There is no need to distinguish left and right units unless $M$ is a [[bimodule]].  Note that a (left or right) unit in $R$ _qua_ ring is the same as a unit in $R$ _qua_ (left or right) $R$-module.

### Units of measurement
 {#UnitsOfMeasurement}

In [[physics]], the quantities of a given dimension generally form an $\mathbb{R}$-[[line]], a $1$-dimensional [[real vector space]]. Since $\mathbb{R}$ is a [[field]], any non-[[zero]] element is a unit, called in this context a __[[unit of measurement]]__.  This is actually a special case of a unit in a module, where $R \coloneqq \mathbb{R}$ and $M$ is the line in question.

Often (but not always) these quantities form an [[orientation|oriented]] line, so that nonzero quantities are either positive or negative.  Then we usually also require a unit of measurement to be positive.  In fact, for some dimensions, there is no physical meaning to a negative quantity, in which case the quantities actually form a module over the rig $\mathbb{R}_{\ge 0}$ and every nonzero element is "positive."

For example, the [[kilogram]] is a unit of mass, because any mass may be expressed as a real multiple of the kilogram.  Further, it is a positive unit; the mass of any physical object is a nonnegative quantity (so that mass quantities actually form an $\mathbb{R}_{\ge 0}$-module) and may be expressed as a nonnegative real multiple of the kilogram.

## Identities as units

Often the term 'unit' (or 'unity') is used as a synonym for '[[identity element]]', especially when this identity element is denoted $1$.  For example, a 'ring with unit' (or 'ring with unity') is a ring with an identity (used by authors who say 'ring' for a rng).  Of course, a rng with identity has a unit, since $1$ itself is a unit; conversely, a commutative rng with a unit must have an identity.
+-- {: .query}
I haven\'t managed to find either a proof or a counterexample to the converse (in the noncommutative case): that a rng with a unit must have an identity.

Response: If $R$ is a rng with a unit $u$, then every element uniquely factors through $u$. In particular, $u$ itself does. $u = a u$, with $a$ unique. So $a$ is an identity.

Reply: Why is $a$ an identity then?  This works if the rng is commutative: given any $v$, write $v$ as $b u$, and then $a v = a (b u) = b (a u) = b u = v$.  But without commutativity (and associativity), this doesn\'t work.
=--

It is this meaning of 'unit' which gives rise to the [[unit of an adjunction]].

## Related concepts

* [[unit object]]

* [[unit of an adjunction]]

* [[unit of a monad]]

* [[monad terminology]]

* [[exponential ring]]

## References

See also

* Wilkipedia, _Unit (Ring theory)_

[[!redirects unit]]
[[!redirects units]]

[[!redirects unit element]]
[[!redirects unit elements]]

[[!redirects unit of measurement]]
[[!redirects unit of measurements]]
[[!redirects units of measurement]]
[[!redirects units of measurements]]


unit ball

#Contents#
* table of contents
{:toc}

## Definition

In a [[metric space]] $(X,d)$, the _unit ball_ around some point $x \in X$ is the [[set]] of points of [[distance]] at most 1 from $x$: $\{y \in X \vert d(x,y) \leq 1\}$.

One special case that is often used is the unit ball in a metrized [[topological vector space]], whereby the point $x$ in the above definition is taken to be the zero vector. More specifically, the unit ball of a [[Banach space]] is of interest, as there is an [[adjunction]] between the category of Banach spaces and contractions, and the category of sets, where the right adjoint functor $Ban \to Set$ takes the underlying set of the unit ball.

Note that the unit ball around the zero vector makes sense in any [[norm#on_a_vector_space|normed vector space]], or even if the vector space is only equipped with a [[seminorm]].

## Related concepts

* [[disk]]

* [[open ball]]

## References

On [[star-autonomous categories]] of [[unit balls]] in [[Banach spaces]]:

* [[Michael Barr]], [[Heinrich Kleisli]], *Topological balls*, [[Cahiers|Cahiers Topologie Géométrie Différentielle Catégorique]], **40** 1 (1999) 3–20 [[numdam:CTGDC_1999__40_1_3_0](http://www.numdam.org/item/?id=CTGDC_1999__40_1_3_0)]

[[!redirects unit balls]]


unit enriched category

If $V$ is a [[monoidal category]], the **unit $V$-category** is the $V$-[[enriched category]] $\mathcal{I}$ having one [[object]], say $\star$, with $\mathcal{I}(\star,\star)=I$, the monoidal unit object of $V$, and the composition and identity-assigning morphisms being the canonical coherence isomorphism $I\otimes I\cong I$ and the identity arrow $id_I$, respectively.

From a $2$-categorical point of view, the unit enriched category $\mathcal{I}$ satisfies the property that $[\mathcal{I},\mathcal{I}]$ (the category of $1$-endomorphisms of $\mathcal{I}$) is a category with one object, and the $2$-functor $[\mathcal{I},-]$ is the functor returning the underlying category of an enriched category.

In other words, the $V$-category $\mathcal{I}$ plays a role in enriched category theory similar to the role played by the [[terminal category]] in ordinary unenriched category theory.  (In fact, the terminal category is the unit [[Set]]-category.)  For instance, objects of a $V$-category $\mathcal{A}$ can be identified with $V$-functors $\mathcal{I}\to\mathcal{A}$.

Note that in general the unit $V$-category is *not* a [[terminal object]] of $V Cat$, just as $I$ is not usually terminal in $V$. We can see in particular that when $V$ is closed and $I$ is not terminal, $\mathcal{I}$ is not terminal since $V$ embeds in $V Cat$.

[[!redirects unit enriched category]]
[[!redirects unit enriched categories]]

[[!redirects unit V-category]]
[[!redirects unit V-categories]]


unit object

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

#Contents#
* table of contents
{:toc}

## Idea

In a [[monoidal category]] $(C, \otimes, I)$, the **unit object** (or _[[tensor unit]]_) $I$ is [[generalized the|the]] [[object]] which plays the role of the unit for the [[tensor product]] $\otimes$, in that for any other object $a$ there are [[isomorphism|isomorphisms]] $a \otimes I \simeq a$ and $I \otimes a \simeq a$ (the [[unitors]]).

Dually, in a [[closed category]] there is a _unit object_ which is such that maps out of it into an [[internal hom]] correspond to the external hom.

## Related concepts

* [[unit of an adjunction]]

* [[unit of a monad]]

* [[monad terminology]]

* [[physical unit]]

* [[identity]]

* [[dual object]], [[invertible object]]

[[!redirects unit objects]]
[[!redirects monoidal unit]]
[[!redirects monoidal units]]


unit of a monad

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

#Contents#
* table of contents
{:toc}

## Defintion

Given a [[monad]] $T \;\colon\; \mathcal{C} \to \mathcal{C}$, its **unit** is the [[natural transformation]]

$$
  \epsilon \;\colon\; id_{\mathcal{C}} \to T
$$

which is part of the definition of _[[monad]]_. Hence for every [[object]] $X \in \mathcal{C}$ the component of the unit on $X$ is a [[morphism]]

$$
  \epsilon_X \;\colon\; X \to T(X)
$$

in $\mathcal{C}$.

[[duality|Dually]], there is a _counit of a comonad_.

## Properties

### Relation to adjunctions

If $(L \dashv R)$ is an [[adjunction]] that gives rise to the monad $T$ as $T \simeq R \circ L$, then the unit of the monad is equivalently the [[unit of an adjunction|unit of the adjunction]].

## Related concepts

* [[unit]]

  * [[unit object]]

  * [[unit of an adjunction]]

  * **unit of a monad**

[[!redirects counit of a comonad]]

[[!redirects monad unit]]
[[!redirects monad units]]


unit of an adjunction

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

#Contents#
* table of contents
{:toc}

## Definition

Given an [[adjunction]]

$$
  (L \dashv R)
  \colon\;
  X
    \underoverset{R}{L}{\rightleftarrows}
  Y
$$

there is a [[natural transformation]] (or more generally, a $2$-[[2-morphism|morphism]]) $\eta\colon id_X \to R \circ L$, called the __unit__ of the adjunction (in older texts, called a "front adjunction").  (A reason for the name is that $R \circ L$ is a [[monad]], which is a kind of [[monoid object]], and $\eta$ is the [[identity element|identity]] of this monoid.  Since 'identity' in this context would suggest an [[identity natural transformation]], we use the synonym 'unit'.)

Similarly, there is a $2$-morphism $\epsilon\colon L \circ R \to id_Y$, called the __counit__ of the adjunction (in older texts, called a "back adjunction" or "end adjunction").  (This is the co-identity of the [[comonad]] $L \circ R$.)

## Properties

### General

Unit and counit of an adjunction satisfy the [[triangle identities]].

An [[adjunct]] is given by precomposition with a unit or postcomposition with a counit.

The left adjoint $L : X \to Y$ is [[fully faithful]] (i.e. a [[coreflection]]) if and only if the unit $\eta : id_X \to R \circ L$ is a [[natural isomorphism]] (if and only if $id_X \cong R \circ L$ by Lemma A1.1.1 of the [[Elephant]]). Dually, the right adjoint $R : Y \to X$ is fully faithful (i.e. a [[reflective subcategory|reflection]]) if and only if the counit $\epsilon : L \circ R \to id_Y$ is a natural isomorphism. (See [this Prop.](adjoint+functor#FullyFaithfulAndInvertibleAdjoints) at *[[adjoint functor]]*.)

If the unit is the identity, $L$ is sometimes termed __lari__ ("left adjoint right inverse"); whilst $R$ is termed __rali__ ("right adjoint left inverse"). Dually, if the counit is the identity, $L$ is sometimes termed __lali__ ("left adjoint left inverse"); whilst $R$ is termed __rari__ ("right adjoint right inverse"). All four classes of functor are closed under composition, and contain the equivalences.

### Relation to monads

Every [[adjunction]] $(L \dashv R)$ gives rise to a [[monad]] $T \coloneqq R \circ L$. The [[unit of a monad|unit of this monad]] $id \to T$ is the unit of the adjunction, $id \to R \circ L$.

## Related concepts

* [[adjunction]]

* [[zig-zag law]]/[[triangle identity]]

* [[unit]]

  * [[unit object]]

  * **unit of an adjunction**

    [[derived adjunction unit]]

  * [[unit of a monad]]

* [[adjunct]]

[[!redirects unit of an adjunction]]
[[!redirects unit of the adjunction]]
[[!redirects units of adjunctions]]

[[!redirects counit of an adjunction]]
[[!redirects counit of the adjunction]]
[[!redirects counits of adjunctions]]
[[!redirects counit]]
[[!redirects counits]]

[[!redirects adjunction unit]]
[[!redirects adjunction units]]

[[!redirects adjunction counit]]
[[!redirects adjunction counits]]

[[!redirects front adjunction]]
[[!redirects back adjunction]]

[[!redirects lali]]
[[!redirects rali]]
[[!redirects lari]]
[[!redirects rari]]


unit sphere

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

#Contents#
* table of contents
{:toc}

## Idea

Given a [[metric space]] $(X,d)$ and a point $x \in X$, then the _unit sphere_ $S_x(X) \subset X$ is the [[subset]] of those points with unit [[distance]] from $x$:

$$
  S_x(X)
  \;\coloneqq\;
  \left\{
     x' \in X  \;\vert\; d(x',x) = 1
  \right\}
  \,.
$$

## Examples

In the [[Euclidean space]] $(X,d) = E^n$ of [[dimension]] $n$, the unit sphere is the usual [[n-sphere|(n-1)-sphere]] $S^{n-1} \simeq S_0(\mathbb{R}^n)$. For $n = 2$ this is the _unit [[circle]]_, for $n = 3$ the unit [[2-sphere]] and so on.

## Related concepts

* [[stereographic projection]]

* [[unit sphere bundle]]

* [[direction of a vector]]

* [[polar coordinates]]

[[!redirects unit spheres]]

[[!redirects unit n-sphere]]
[[!redirects unit n-spheres]]

[[!redirects unit circle]]
[[!redirects unit circles]]


unit type

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

# Contents
* table of contents
{: toc}

## Idea

In [[type theory]] the _unit type_ is the [[type]] with a unique [[term]].  It is the special case of a [[product type]] with no factors.

In a [[model]] by [[categorical semantics]], this is a [[terminal object]]. In [[set theory]], it is a [[singleton]].

## Definition

Like any [[type]] in [[type theory]], the unit type is specified by rules saying when we can [[type formation|introduce it as a type]], how to  [[term introduction|introduce terms]] of that type, how to use or [[term elimination|eliminate terms]] of that type, and how to [[computation rule|compute]] when we combine the constructors with the eliminators.

The unit type, like the binary [[product type]], can be presented both as a [[positive type]] and as a [[negative type]]. There are typically two foundations in which the unit type is specified in, [[natural deduction]] and [[lambda-calculus]].

### In natural deduction

We assume that our unit types have typal [[conversion rules]], as those are the most general of the conversion rules. Both the propositional and judgmental conversion rules imply the typal conversion rules by the structural rules for propositional and judgmental equality respectively.

For both the positive unit type and the negative unit type, the formation and introduction rules are the same.

The [[formation rule]] for the unit type is given by

$$\frac{\Gamma \; \mathrm{ctx}}{\Gamma \vdash \mathbb{1} \; \mathrm{type}}$$

and the [[introduction rule]] for the unit type is given by

$$\frac{\Gamma \; \mathrm{ctx}}{\Gamma \vdash *:\mathbb{1}}$$

The positive unit type says that $\mathbb{1}$ satisfies [[singleton induction]]. The negative unit type says that the element $*:\mathbb{1}$ is the [[center of contraction]] of $\mathbb{1}$.

#### As a positive type

[[singleton induction|Singleton induction]] for a type $\mathbb{1}$ and term $*:\mathbb{1}$ states that the type has the following [[elimination rule]], [[computation rule]], and [[uniqueness rule]]:

* given a type family $C(x)$ indexed by $\mathbb{1}$, for all elements $x:\mathbb{1}$ and $c:C(*)$, there is an element $\mathrm{ind}_\mathbb{1}^C(x, c):C(x)$.

$$\frac{\Gamma, x:\mathbb{1} \vdash C(x) \; \mathrm{type}}{\Gamma, x:\mathbb{1}, c:C(*) \vdash \mathrm{ind}_\mathbb{1}^C(x, c):C(x)}$$

* given a type family $C(x)$ indexed by $\mathbb{1}$, for all elements $c:C(*)$, the element $\mathrm{ind}_\mathbb{1}^C(*, c)$ derived from the elimination rule is equal to $c$ with witness $\beta_\mathbb{1}^C(c)$.

$$\frac{\Gamma, x:\mathbb{1} \vdash C(x) \; \mathrm{type}}{\Gamma, c_*:C(*) \vdash \beta_\mathbb{1}^C(c):\mathrm{ind}_\mathbb{1}^C(*, c) =_{C(*)} c}$$

* given a type family $C(x)$ indexed by $\mathbb{1}$ and a family of elements $u(x):C(x)$ indexed by $\mathbb{1}$, for all elements $x:\mathbb{1}$ there is a witness $\eta_\mathbb{1}^C(x, u(x))$ that $u(x)$ is equal to $\mathrm{ind}_\mathbb{1}^{C}(x, u(*))$ in $C(x)$.

$$\frac{\Gamma, x:\mathbb{1} \vdash C(x) \; \mathrm{type} \quad \Gamma, x:\mathbb{1} \vdash u(x):C(x)}{\Gamma, x:\mathbb{1} \vdash \eta_\mathbb{1}^C(x, u(x)):u(x) =_{C(x)} \mathrm{ind}_\mathbb{1}^{C}(x, u(*))}$$

Thus, the unit type satisfies [[singleton induction]].

In type theories with a separate type judgment where not all types are elements of universes, one has to additionally add the following elimination and computation rules:

Elimination rules:

$$\frac{\Gamma \vdash A \; \mathrm{type}}{\Gamma, x:\mathbb{1} \vdash \mathrm{typerec}_{\mathbb{1}}^{A}(x) \; \mathrm{type}}$$

Computation rules:

* judgmental computation rules

$$\frac{\Gamma \vdash A \; \mathrm{type}}{\Gamma \vdash \mathrm{typerec}_{\mathbb{1}}^{A}(*) \equiv A \; \mathrm{type}}$$

* typal computation rules
$$\frac{\Gamma \vdash A \; \mathrm{type}}{\Gamma \vdash \beta_{\mathbb{1}}^{A}:\mathrm{typerec}_{\mathbb{1}}^{A}(*) \simeq A}$$

#### As a negative type

As a negative type, there are no [[elimination rules]] or [[computation rules]] for $\mathbb{1}$. The [[uniqueness rule]] states that $*$ is the [[center of contraction]] of $\mathbb{1}$ and is given by:

$$\frac{\Gamma \; \mathrm{ctx}}{\Gamma, p:\mathbb{1} \vdash \eta_\mathbb{1}(p):* =_\mathbb{1} p}$$

Thus, the unit type is a [[contractible type]].

#### Positive versus negative

\begin{theorem}
Let $\mathbb{1}$ denote the positive unit type, and let $p:\mathbb{1}$ and $q:\mathbb{1}$ be elements of $\mathbb{1}$. Then the identity type $q =_\mathbb{1} p$ is a [[contractible type]].
\end{theorem}

\begin{proof}
Given an element $p:\mathbb{1}$, we can define the family of types $C(q) \coloneqq q =_\mathbb{1} p$ for all $q:\mathbb{1}$. The elimination and computation rules for the positive unit type imply that $* =_\mathbb{1} p$ is a [[contractible type]] with [[center of contraction]] $c_*(p):* =_\mathbb{1} p$ which is equal to $\mathrm{ind}_\mathbb{1}^{(-) =_\mathbb{1} p}(p, c_*(p))$.

The uniqueness rule for the positive unit type states that given a family of terms $u(p):q =_\mathbb{1} p$ indexed by $p:\mathbb{1}$ and $q:\mathbb{1}$, for all elements $c_*(p):* =_\mathbb{1} p$, elements $q:\mathbb{1}$, and witnesses $i_*(u(p))$ that $u(p)(*)$ is equal to $c_*(p)$ in $* =_\mathbb{1} p$, there is a witness $\eta_\mathbb{1}^{(-) =_\mathbb{1} p}(c_*(p), q, u(p), i_*(u(q)))$ that $u(p)$ is equal to $\mathrm{ind}_\mathbb{1}^{(-) =_\mathbb{1} p}(p, c_*(p))$ in $C(p)$.

Thus, the identity type $q =_\mathbb{1} p$ is a [[contractible type]] for all elements $p:\mathbb{1}$ and $q:\mathbb{1}$, with element $\eta_\mathbb{1}^{(-) =_\mathbb{1} p}(c_*(p), q, u(p), i_*(u(q))):q =_\mathbb{1} p$.
\end{proof}

\begin{lemma}
The positive unit type is a contractible type.
\end{lemma}

\begin{proof}
Since the identity type $q =_\mathbb{1} p$ is a [[contractible type]] for all elements $p:\mathbb{1}$ and $q:\mathbb{1}$, with element $\eta_\mathbb{1}^{(-) =_\mathbb{1} p}(c_*(p), q, u(p), i_*(u(q))):q =_\mathbb{1} p$, it follows that $\mathbb{1}$ is an [[h-proposition]]. Since $\mathbb{1}$ is also pointed with element $*:\mathbb{1}$, it is thus a [[contractible type]].
\end{proof}

\begin{theorem}
There is an [[equivalence of types]] between two [[contractible types]] $S$ and $T$.
\end{theorem}

\begin{proof}
By the definition of [[contractible type]], there are elements $p_S:\sum_{a:S} \prod_{b:S} a =_S b$ and $p_T:\sum_{a:T} \prod_{b:T} a =_T b$, and thus, an element $\pi_1(p_S)$ and a witness $\pi_2(p_S)$ that $\pi_1(p_S)$ is a [[center of contraction]] of $S$, and an element $\pi_1(p_T)$ and a witness $\pi_2(p_T)$ that $\pi_1(p_T)$ is a [[center of contraction]] of $T$. By the uniqueness principle of contractible types, it suffices to define a function $f:S \to T$ at $\pi_1(p_S)$. We define it as $f(\pi_1(p_S)) \coloneqq \pi_1(p_T)$. Now, all that's left is to prove that the fiber of $f$ at all elements $a:T$ is contractible. But by the uniqueness principle of contractible types, it suffices to prove it for the center of contraction $\pi_1(p_T)$. The canonical element $*$ is in the fiber of $f$ at $\pi_1(p_T)$, and since $\pi_1(p_S)$ is the center of contraction of $S$, the fiber of $f$ at $\pi_1(p_T)$ is contractible, and thus the fiber of $f$ at every element $a:T$ is contractible. Thus, $f$ is an equivalence of types between the contractible types $S$ and $T$.
\end{proof}

\begin{lemma}
The positive and negative unit types are equivalent to each other.
\end{lemma}

\begin{proof}
Since the negative unit type is contractible by definition, and the positive unit type is contractible, they are equivalent to each other.
\end{proof}

#### Extensionality principle

Then we could derive the extensionality principle for the unit type:

\begin{lemma}
Given elements $x:\mathbb{1}$ and $y:\mathbb{1}$, there is an [[equivalence of types]] $(x =_\mathbb{1} y) \simeq \mathbb{1}$ between the [[identity type]] $x =_\mathbb{1} y$ and $\mathbb{1}$ itself.
\end{lemma}

\begin{proof}
Since every identity type $x =_\mathbb{1} y$ is contractible for elements $x:\mathbb{1}$ and $y:\mathbb{1}$, and $\mathbb{1}$ itself is contractible, this implies that every identity type $x =_\mathbb{1} y$ is equivalent to $\mathbb{1}$.
\end{proof}

#### The unit type as a univalent universe

In [[set theory]], regular and inaccessible cardinals are useful in determining [[size issues]] in [[strongly predicative]] and [[weakly predicative]]/[[impredicative]] mathematics respectively. Some definitions of regular and inaccessible cardinals do not have a requirement that the cardinals be infinite; thus finite cardinals such as $0$ and $1$ could be considered to be regular and inaccessible cardinals. Univalent universes in type theory which are closed under [[dependent sum types]] are the type theoretic equivalent of [[regular cardinals]], and univalent universe which are additionally closed under [[power sets]] are the type theoretic equivalent of [[inaccessible cardinals]].

We [[inductive definition|inductively define]] the type family $x:\mathbb{1} \vdash \mathrm{El}_\mathbb{1}(x) \; \mathrm{type}$ by defining
$$\mathrm{El}_\mathbb{1}(*) \coloneqq \mathbb{1}$$
The extensionality principle for the unit type then is simply the [[univalence axiom]]:
$$\mathrm{ext}_\mathbb{1}:\prod_{x:\mathbb{1}} \prod_{y:\mathbb{1}} (x =_\mathbb{1} y) \simeq (\mathrm{El}_\mathbb{1}(x) \simeq \mathrm{El}_\mathbb{1}(y))$$
The unit type $\mathbb{1}$ represents the trivial universe, the universe with only one element up to identification, where every type in the universe is a [[contractible type]] and thus every contractible type is [[essentially small type|essentially $\mathbb{1}$-small]]. The [[equivalence type]] between the two contractible types $\mathrm{El}_\mathbb{1}(x)$ and $\mathrm{El}_\mathbb{1}(y)$ is itself contractible and thus equivalent to $\mathbb{1}$ itself. As proven in the previous section, $\mathbb{1}$ is equivalent to $x =_\mathbb{1} y$ for any $x:\mathbb{1}$ and $y:\mathbb{1}$. Thus the univalence axiom for $\mathbb{1}$ is true.

In addition, given any type $A$, functions into the unit type $A \to \mathbb{1}$ are families of [[contractible types]]. The universe $(\mathbb{1}, \mathrm{El}_\mathbb{1})$ is also closed under [[dependent sum types]], as for any family of contractible types $p:B \to \mathbb{1}$,
$$\left(\sum_{x:\mathbb{1}} \mathrm{El}_\mathbb{1}(B(x))\right) \simeq \mathbb{1}$$
This makes the unit type into a [[Tarski universe]] representing a finite regular cardinal.

If the [[dependent type theory]] also has [[weak function extensionality]], then the universe above is also closed under [[dependent product types]], as weak function extensionality states that for any family of contractible types $p:B \to \mathbb{1}$,
$$\left(\prod_{x:\mathbb{1}} B(x)\right) \simeq \mathbb{1}$$
making the unit type into a [[Tarski universe]] representing a finite [[product-regular cardinal]].

As a universe, the unit type also satisfies [[propositional resizing]]: the type of all $\mathbb{1}$-small propositions is simply the unit type itself as a [[weakly Tarski universe]], which is essentially $\mathbb{1}$-small. Thus, in the context of [[weak function extensionality]], [[power sets]] exist in the unit type, making the unit type impredicative: power sets are just [[function types]] into the unit type. This makes the unit type into a [[Tarski universe]] representing a finite [[inaccessible cardinal]].

The unit type is also the only universe which contains itself, as any univalent universe which contains the [[empty type]] and itself makes the entire [[dependent type theory]] inconsistent.

### In lambda-calculus

In lambda-calculus, for both the positive unit type and the negative unit type, the rule for building the unit type is the same, namely "it exists":

$$ \frac{ }{1\colon Type} $$

#### As a positive type

Regarded as a [[positive type]], we give primacy to the constructors, of which there is exactly one, denoted $()$ or $tt$.

$$ \frac{ }{() \colon 1 } $$

The eliminator now says that to use something of type $1$, it suffices to say what to do in the case when that thing is $()$.

$$ \frac{\vdash c\colon C}{u\colon 1 \vdash let () = u in c \;\colon C}$$

Obviously this is not very interesting, but this is what we get from the general rules of type theory in this degenerate case.  In [[dependent type theory]], we should also allow $C$ to depend on the unit type $1$.

We then have the [[∞-reduction]] rule:

$$ let () = () in c \;\to_\beta\; c$$

and (if we wish) the [[∞-reduction]] rule:

$$ let () = u in c[()/z] \;\to_\eta\; c[u/z]. $$

The $\beta$-reduction rule is simple.  The $\eta$-reduction rule says that if $c$ is an expression involving a variable $z$ of type $1$, and we substitute $()$ for $z$ in $c$ and use that (with the eliminator) to define a term involving another term $u$ of type $1$, then the result is the same as what we would get by substituting $u$ for $z$ in $c$ directly.

The positive presentation of the unit type is naturally expressed as an [[inductive type]].  In [[Coq]] syntax:

    Inductive unit : Type :=
    | tt : unit.

(Coq then implements beta-reduction, but not eta-reduction. However, eta-equivalence is provable with the internally defined [[identity type]], using the dependent eliminator mentioned above.)

#### As a negative type

A [[negative type]] is characterized by its eliminators, which is a little subtle for the unit type.  But by analogy with binary [[product types]], which have two eliminators $\pi_1$ and $\pi_2$ when presented negatively, the negative unit type (a [[zero|nullary]] product) should have *no eliminators at all*.

To derive the constructors from this, we follow the general rule for negative types that to construct an element of $1$, it should suffice to specify how that element behaves under all the eliminators.  Since there *are* no eliminators, this means we have nothing to do; thus we have exactly one way to construct an element of $1$, by doing nothing:

$$\frac{ }{()\colon 1}$$

There is no $\beta$-reduction rule, since there are no eliminators to compose with the constructor.  However, there *is* an $\eta$-conversion rule.  In general, an $\eta$-[[redex]] consists of a constructor whose inputs are all obtained from eliminators.  Here we have a constructor which has no inputs, so it is not a problem that we have no eliminators to fill them in with.  Thus, the term $()\colon 1$ is an "$\eta$-redex", and it "reduces" to *any* term of type $1$ at all:

$$ () \;\to_\eta\; u$$

This is obviously not a well-defined "operation", so in this case it is better to view $\eta$-conversion in terms of *expansion*:

$$ u \;\to_\eta\; ().$$

#### Positive versus negative

In ordinary "nonlinear" type theory, the positive and negative unit types are equivalent.  They manifestly have the same constructor, while we can define the positive eliminator in a trivial way as

$$ let () = u in c  \quad \coloneqq\quad c $$

Note that just as for binary [[product types]], in order for this to be a well-typed definition of the *dependent* eliminator in dependent type theory, we need to assume the $\eta$-conversion rule for the assumed negative unit type (at least, [propositionally](/nlab/show/eta-conversion#Propositional)).

Of course, the positive $\beta$-reduction rule holds by definition for the above defined eliminator.

For the $\eta$-conversion rules, if we start from the negative presentation and define the positive eliminator as above, then $let () = u in c[()/z]$ is precisely $c[()/z]$, which is convertible to $c[u/z]$ by the negative $\eta$-conversion rule $() \;\leftrightarrow_\eta\; u$.

Conversely, if we start from the positive presentation, then we have

$$
  ()
  \;\leftrightarrow_\eta\; let () = u in ()
  \;\leftrightarrow_\eta\; u
$$

where in the first conversion we use $c \coloneqq ()$ and in the second we use $c\coloneqq z$.

As in the case of binary [[product types]], these translations require the [[contraction rule]] and the [[weakening rule]]; that is, they duplicate and discard terms.  In [[linear logic]] these rules are disallowed, and therefore the positive and negative unit types become different.  The positive product becomes "one" $\mathbf{1}$, while the negative product becomes "top" $\top$.

## Categorical semantics

There are two interpretations of the unit type, corresponding to the positive and negative unit types. Namely:

* The negative unit type corresponds to a [[terminal object]] in a category

* The positive unit type with both $\beta$-conversion and $\eta$-conversion corresponds to an [[initial object]] with a point, a morphism from some unit object $I$ to the object corresponding to the unit type, in a category.

These two conditions are the same if the [[syntactic category]] is a [[cartesian monoidal category]], where the points are the [[global elements]] and the [[unit]] is the [[terminal object]]. In general, however, the points may not be defined out of the terminal object. In [[linear logic]], therefore, the categorical terminal object interprets "top" $\top$, while the unit object of an additional [[monoidal category|monoidal structure]] interprets "one" $\mathbf{1}$.

## Related concepts

* [[product type]]
* [[empty type]]
* [[contractible type]]

## References

On the unit type as an [[inductive type]] satisfying [[singleton induction]]:

* [[Univalent Foundations Project]], p. 30 *[[Homotopy Type Theory -- Univalent Foundations of Mathematics]]* (2013) [[web](http://homotopytypetheory.org/book/), [pdf](http://hottheory.files.wordpress.com/2013/03/hott-online-323-g28e4374.pdf)]

* [[Egbert Rijke]], Def. 3.1.1 in: *[[Introduction to Homotopy Type Theory]]*, lecture notes, CMU (2018) [[pdf](http://www.andrew.cmu.edu/user/erijke/hott/hott_intro.pdf), [[Rijke-IntroductionHoTT-2018.pdf:file]], [webpage](https://www.andrew.cmu.edu/user/erijke/hott/)]

[[!include homotopy n-types - table]]

[[!redirects unit type]]
[[!redirects unit types]]
[[!redirects trivial type]]
[[!redirects trivial types]]


unit vector

# Contents
* table of contents
{:toc}

## Definition
Let $V$ be a [[norm|normed]] [[vector space]]. A **unit vector** in $V$ is a vector with norm of 1. Given a non-zero vector $v \in V$, we can **normalize** it to a unit vector $\frac{v}{|v|}$ in the same direction.

## In quantum mechanics

Classically, the space of [[states]] of a [[quantum mechanics|quantum-mechanical]] system is given by a [[Hilbert space]] $H$. Often, it is desirable to consider only states of unit norm. One can view this as requiring that probabilities sum up to 1.

## Related concepts

* [[vector space]]
* [[norm]]

[[!redirects normalized vectors]]


unital category

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

#Contents#
* table of contents
{:toc}

## Definition

A [[category]] is __unital in the sense of Bourn__ if it has a [[zero object]] (is a [[pointed category]]), admits [[finite limits]] and for all objects $X,Y$ the pair of maps $(id_X,0) : X\to X\times Y$, $(0,id_Y): Y\to X\times Y$ is (jointly) [[strong epimorphism|strongly epimorphic]].

## References

This terminology is introduced in

* [[Dominique Bourn]], _Mal'cev categories and fibrations of pointed objects_, Appl. Cate-
gorical Structures __4__ (1996) 302-327

Exposition is in the section 1.2 in

* [[Francis Borceux]], [[Dominique Bourn]], _[[Borceux-Bourn|Mal'cev, protomodular, homological and semi-abelian categories]]_ , Mathematics and Its Applications __566__, Kluwer 2004

Unfortunately the terminology is not compatible with the notions of unitality of [[A-infinity categories]].

[[!redirects unital categories]]


unital dagger 2-poset

[[!redirects unital dagger 2-posets]]

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

## Contents ##
* table of contents
{:toc}

## Definition ##

A **unital dagger 2-poset** is a [[dagger 2-poset]] $C$ with an object $\mathbb{1} \in Ob(C)$ such that for every morphism $f \in Hom(\mathbb{1}, \mathbb{1})$, $f \leq 1_\mathbb{1}$, and for every object $A \in Ob(C)$, there is an [[onto morphism in a dagger 2-poset|onto morphism]] $u_A \in Hom(A,\mathbb{1})$.

## Examples ##

* The dagger 2-poset [[Rel]] of sets and relations is a unital dagger 2-poset.

## See also ##

* [[dagger 2-poset]]


unital magma

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

#Contents#
* table of contents
{: toc}

## Definition

A [[magma]] $(S,\cdot)$ is called _unital_ if it has an [[identity element]] $1 \in S$, hence an element such that for all $x \in S$ it satisfies the [[equation]]

$$
  1 \cdot x = x = x \cdot 1
$$

holds. The identity element is [[idempotent]].

Some authors take a magma to be unital by default (cf. [[Borceux-Bourn]] Def. 1.2.1).

There is also a possibly empty version, where the identity element is replaced with a [[constant function]] $1:S \to S$ such that for all $x,y \in S$, $1(x)\cdot y = y$ and $x\cdot 1(y) = x$.

## Properties

The [[Eckmann-Hilton argument]] holds for unital magmas: two compatible ones on a set must be equal, associative and commutative.

## Examples

Examples include [[unital rings]] etc.

## Generalizations

This concept could be generalized from the [[category of sets]] to any [[monoidal category]]:

A **unital magma object** or **unital algebra object** in a [[monoidal category]] $(C, I, \otimes)$ is an object $A \in C$ with morphisms $\iota:I \to A$ and $\pi:A \otimes A \to A$ such that the following [[commuting diagram|diagrams commute]]:

   $$
     \array{
       I \otimes A
         &\overset{\iota \otimes \mathrm{id}_A}{\longrightarrow}&
       A \otimes A
       \\
       \downarrow^{\lambda_A} & & \downarrow^{\pi}
       \\
       A &\overset{\mathrm{id}_A}{\longrightarrow}& A
     }
     \,,
   $$

   $$
     \array{
       A \otimes I
         &\overset{\mathrm{id}_A \otimes \iota}{\longrightarrow}&
       A \otimes A
       \\
       \downarrow^{\rho_A} & & \downarrow^{\pi}
       \\
       A &\overset{\mathrm{id}_A}{\longrightarrow}& A
     }
     \,,
   $$

where $\lambda_A:I \otimes A \to A$ and $\rho_A:A \otimes I \to A$ are the left and right [[unitors]] of the [[monoidal category]].

In the [[category of modules]], unital magma objects are called **[[nonassociative algebra|nonassociative]] [[unital algebras]]**, and in the [[category of abelian groups]], unital magma objects are called **[[nonassociative rings]]**.

## Related concepts

* [[associative magma]]

* [[commutative magma]]

* [[nonassociative group]]

* [[paraunital magma]]

[[!include oidification - table]]

[[!redirects unital magma]]
[[!redirects unital magmas]]
[[!redirects unitary magma]]
[[!redirects unitary magmas]]

[[!redirects unital magma object]]
[[!redirects unital magma objects]]
[[!redirects unital algebra object]]
[[!redirects unital algebra objects]]


unital magmoid

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
### Context
#### Category theory
+-- {: .hide}
[[!include category theory - contents]]
=--
#### Algebra
+-- {: .hide}
[[!include higher algebra - contents]]
=--
#### Categorification
+-- {: .hide}
[[!include categorification - contents]]
=--
=--
=--

#Contents#
* table of contents
{:toc}

## Idea

Just as a [[groupoid]] is the [[oidification]] of a [[group]] and a [[ringoid]] is the oidification of a [[ring]], a [[unital magmoid]] should be the oidification of a [[unital magma]].

## Definition

A __unital magmoid__ $Q$ is a [[magmoid]] where every object $a \in Ob(Q)$ has an [[identity morphism]] $id_a: a \to a$, such that for any morphism $f:a \to b$, $f \circ id_a = f$, and for any morphism $g:c \to a$, $id_a \circ g = g$.

A unital magmoid is __invertible__ if for every pair of objects $a,b \in Ob(Q)$ and for every morphism $f:a \to b$, there exists an [[inverse morphism]] $g:b \to a$ such that $f \circ g = id_b$ and $g \circ f = id_a$.

## Examples

* A [[groupoid]] is a unital magmoid.

* A [[category]] and a [[loopoid]] are unital magmoids.

* A unital magmoid with only one object is called a [[unital magma]].

* A unital magmoid [[enriched magmoid|enriched]] on [[truth values]] is a [[preorder]].

## See also

* [[H-spaceoid]]

## Related concepts

[[!include oidification - table]]

[[!redirects unital magmoids]]


unital quantum channel

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

#Contents#
* table of contents
{:toc}

## Idea

A [[quantum channel]]

$$
  chan \,\colon\,
  \mathscr{H}_1 \otimes \mathscr{H}^\ast_1
  \longrightarrow
  \mathscr{H}_1 \otimes \mathscr{H}^\ast_1
$$

is called *unital* if it preserves the [[maximally mixed quantum state]].

In any [operator-sum decomposition](quantum+channel#QuantumChannelsAndDecoherence) of the channel as

$$
  chan
  \;\colon\;
  \rho
  \;\mapsto\;
  \underset{s}{\sum}
  \,
  E_s \cdot \rho \cdot E_s^\dagger
$$

this means that not only

$$
  \underset{s}{\sum} \, E_s^\dagger \cdot E_s
  \;=\;
  id_{\mathscr{H}_1}
$$

(reflecting the preservation of the [[trace]] of [[density matrices]]) but also

$$
  \underset{s}{\sum} \, E_s \cdot E_s^\dagger
  \;=\;
  id_{\mathscr{H}_2}
  \,.
$$

## Related concepts

* [[unistochastic quantum channel]]

## References

See most references on *[[quantum channels]]*.

* [[Christian Mendl]], *Unital Quantum Channels*, talk (2007) [[pdf](http://christian.mendl.net/science/talks/ringberg%202007.pdf)]

[[!redirects unital quantum channels]]


unitalization

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

# Contents
* table of contents
{: toc}

## Idea

The _unitalization_ of a non-unital [[algebra]] is a unital algebra with a "unit" (an [[identity]] element) [[free construction|freely]] adjoined.

This is a [[free functor]]: [[Rng]] $\to$ [[Ring]].

## Definitions

### For (non)associative algebras

For $R$ a [[commutative ring]] write $R Alg_{\mathrm{u}}$ for the [[category]] of [[nonassociative algebra]]s with unit over $R$ and unit-preserving [[homomorphisms]], and write $R Alg_{\mathrm{nu}}$ for nonunital nonassociative $R$-algebras.  Note that $R Alg_{\mathrm{u}}$ is a [[subcategory]] of $R Alg_{\mathrm{nu}}$, as we use both 'non-unital' and 'non-associative' in accordance with the [[red herring principle]].

The [[inclusion functor]] $U\colon R Alg_{\mathrm{u}} \to R Alg_{\mathrm{nu}}$ has a [[left adjoint]] $(-)^+\colon R Alg_{\mathrm{u}} \to R Alg{\mathrm{u}}$. For $A \in R Alg_{\mathrm{nu}}$ we say $A^+$ is the **unitalization** of $A$.

Explicitly, $A^+ = A \oplus R$ as an $R$-[[module]], with product given by
$$ (a_1, 0) (a_2, 0) = (a_1 a_2, 0) ,$$
$$ (0, r_1) (0, r_2) = (0, r_1 r_2) ,$$
$$ (a,0) (0,r) = (0,r) (a,0) = (r a, 0) ,$$
or in general
$$ (a_1, r_1) (a_2, r_2) = (a_1 a_2 + r_2 a_1 + r_1 a_2, r_1 r_2) .$$
We often write $(a, r)$ as $a + r$ or $a \oplus r$, which makes the above formulas obvious.

If $A$ is an [[associative algebra]], then $A^+$ will also be associative; if $A$ is a [[commutative algebra]], then $A^+$ will also be commutative.

### For other (special) cases

See

* _[[unitisation of rings]]_;

* _[[unitisation of C*-algebras]]_.

### Properties

The unitalization functor is not a [[conservative functor]].
\cite{Andruszkiewicz}

However, it does become conservative when restricted
to the full subcategory of nonunital algebras
over a [[field]] $k$
that do not admit a surjective homomorphism to $k$.
\cite{Andruszkiewicz}

### For $\mathbb{E}_k$-algebra

Unitisation in the generality of [[Ek-algebra]] -- hence for [[nonunital Ek-algebras]] -- unitalization is the content of ([Lurie, prop. 5.2.3.13](#Lurie)).

## Related concepts

* [[unit]]

* [[unitality]]

## References

* {#Lurie} [[Jacob Lurie]], section 5.2.3 of _[[Higher Algebra]]_

* [[Ryszard R. Andruszkiewicz]], _Surprise at Adjoining an Identity to an Algebra_, Vietnam Journal of Mathematics, [doi](https://doi.org/10.1007/s10013-020-00437-9).

[[!redirects unitalization]]
[[!redirects unitalizations]]
[[!redirects unitalisation]]
[[!redirects unitalisations]]
[[!redirects unitization]]
[[!redirects unitizations]]
[[!redirects unitisation]]
[[!redirects unitisations]]


unitalization > history

< [[unitalization]]


unitary calculus

#Contents#
* table of contents
{:toc}

## Idea

The **unitary calculus** is the complex version of the [[orthogonal calculus]], with $O(n)$ replaced by the [[unitary group]], $U(n)$.


unitary functorial field theory

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
###Context###
#### Functorial quantum field theory
+--{: .hide}
[[!include functorial quantum field theory - contents]]
=--
=--
=--

#Contents#
* table of contents
{:toc}

## Idea

A *[[cobordism category]]* $Cob$ typically is canonically a [[dagger-category]] with dagger-[[involution]] given by reversal of the [[orientation]] of [[cobordisms]].

Given a [[symmetric monoidal category|symmetric]] [[monoidal dagger category]] $\mathcal{C}$ as [[coefficients]], a [[1-functor|1-]][[functorial field theory]]

$$
  Cob \longrightarrow \mathcal{C}
$$

is called "unitary" if it is a [[dagger functor]].

(This is the "hermitian axiom" of [Atiyah 1989](#Atiyah89).)

## References

The original notion:

* {#Atiyah89} [[Michael Atiyah]], [p. 8](http://www.numdam.org/item/PMIHES_1988__68__175_0.pdf#page=8) of: *Topological quantum field theories*, Publications Mathématiques de l’IHÉS **86** (1989) 175-186 [[numdam:PMIHES_1988__68__175_0](http://www.numdam.org/item?id=PMIHES_1988__68__175_0)]

* [[Vladimir Turaev]], *Hermitian and unitary TQFTs*, §III.5 in: *Quantum invariants of knots and 3-manifolds*, Studies in Mathematics **18**, de Gruyter (1994) [[doi:10.1515/9783110435221](https://doi.org/10.1515/9783110435221)]

Exposition and review:

* {#Baez04} [[John Baez]], [p. 11](https://arxiv.org/pdf/quant-ph/0404040.pdf#page=11) of *Quantum Quandaries: a Category-Theoretic Perspective*, in D. Rickles et al. (ed.) *The structural foundations of quantum gravity*, Clarendon Press (2006) 240-265 [[arXiv:quant-ph/0404040](https://arxiv.org/abs/quant-ph/0404040), [ISBN:9780199269693](https://global.oup.com/academic/product/the-structural-foundations-of-quantum-gravity-9780199269693)]

Further discussion:

* Honglin Zhu, *The Hermitian axiom on two-dimensional topological quantum field theories*, J. Math. Phys. **64**  (2023) 022301 [[arXiv:2206.07193](https://arxiv.org/abs/2206.07193), [doi:10.1063/5.0121440](https://doi.org/10.1063/5.0121440)]

On generalization to [[extended functorial field theory]] via [[higher dagger categories]]:

* [[Theo Johnson-Freyd]], *Higher Dagger Categories*, [talk at](Center+for+Quantum+and+Topological+Systems#JohnsonFreydNov2023) [[CQTS]] (08 Nov 2023) [slides:[pdf](http://categorified.net/NYUADtalk.pdf), [[JohnsonFreyd-HigherDaggerNYUAD.pdf:file]]]

See also:

* [[Lukas Müller]], [[Luuk Stehouwer]], around Def 4.1 in: _Reflection Structures and Spin Statistics in Low Dimensions_ [[arXiv:2301.06664](https://arxiv.org/abs/2301.06664)]

[[!redirects unitary functorial field theories]]

[[!redirects unitary topological field theory]]
[[!redirects unitary topological field theories]]

[[!redirects unitary topological quantum field theory]]
[[!redirects unitary topological quantum field theories]]

[[!redirects unitary TQFT]]
[[!redirects unitary TQFTs]]

[[!redirects Hermitian functorial field theory]]
[[!redirects Hermitian functorial field theories]]

[[!redirects Hermitian topological field theory]]
[[!redirects Hermitian topological field theories]]

[[!redirects Hermitian topological quantum field theory]]
[[!redirects Hermitian topological quantum field theories]]

[[!redirects Hermitian TQFT]]
[[!redirects Hermitian TQFTs]]

[[!redirects hermitian functorial field theory]]
[[!redirects hermitian functorial field theories]]

[[!redirects hermitian topological field theory]]
[[!redirects hermitian topological field theories]]

[[!redirects hermitian topological quantum field theory]]
[[!redirects hermitian topological quantum field theories]]

[[!redirects hermitian TQFT]]
[[!redirects hermitian TQFTs]]


unitary fusion category

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

#Contents#
* table of contents
{:toc}

## Idea

A *unitary fusion category* is a [[C*-category|C*]]-[[fusion category]].

(...)

## Related concept

* [[unitary operator]]

* [[dagger-category]], [[C*-category]]

* In the [[condensed matter theory]] of [[topological phases of matter]] (especially in contexts related to [[topological quantum computation]], see the references there) it is [[folklore]] that the [[anyon]]-content in [[topological orders]] is characterized by unitary fusion categories.

## References

### General

* [[David Penneys]], *Unitary fusion categories*, Section 3 in: *[Topological Phases of Matter](https://people.math.osu.edu/penneys.2/8800//Math8800Spring2021.html)* (2021) $[$[pdf](https://people.math.osu.edu/penneys.2/8800//Notes/FusionCats.pdf)$]$

* MO discussion: *Unitary structures on fusion categories* $[$[MO:q/131546/](https://mathoverflow.net/q/131546/381)$]$

* Cain Edie-Michell, Masaki Izumi, David Penneys, *Classification of $\mathbb{Z}/2\mathbb{Z}$-quadratic unitary fusion categories* $[$[arXiv:2108.01564](https://arxiv.org/abs/2108.01564)$]$

[[!include anyonic topological order via braided fusion categories -- references]]

[[!redirects unitary fusion categories]]