arXiv reader

On a fibrational construction for optics, lenses, and Dialectica categories

Matteo Capucci, Bruno Gavranović, Abdullah Malik, Francisco Rios and Jonathan Weinberger

arXiv
2403.16388v5 · PDF · 12 December 2024
Categories
math.CT, cs.IT, cs.LO, math.IT
Journal
Electronic Notes in Theoretical Informatics and Computer Science, Volume 4 - Proceedings of MFPS XL (December 11, 2024) entics:14638
DOI
10.46298/entics.14638
Licence
CC BY 4.0 The site shows the text.

Abstract

Categories of lenses/optics and Dialectica categories are both comprised of bidirectional morphisms of basically the same form. In this work we show how they can be considered a special case of an overarching fibrational construction, generalizing Hofstra’s construction of Dialectica fibrations and Spivak’s construction of generalized lenses. This construction turns a tower of Grothendieck fibrations into another tower of fibrations by iteratively twisting each of the components, using the opposite fibration construction.

Items 22

Notation

Notation

HAXG

We denote by f\fatsemi g the composition of morphisms f and g in diagrammatic order. We make generous use of generalized elements, written x:X, to talk about objects in categories.

Definition

Definition 2.1

NLND

(Fiber of a functor) Let P: \relax \StrLen{E}[\catarglen] \ifnum\catarglen=1 \mathcal{E} \else \mathbf{E} \fi \to \relax \StrLen{X}[\catarglen] \ifnum\catarglen=1 \mathcal{X} \else \mathbf{X} \fi be a functor. For an object X : \relax \StrLen{X}[\catarglen] \ifnum\catarglen=1 \mathcal{X} \else \mathbf{X} \fi, we define the fiber of P at X as the subcategory \mathrm{d} P(X) of \relax \StrLen{E}[\catarglen] \ifnum\catarglen=1 \mathcal{E} \else \mathbf{E} \fi consisting of those morphisms \varphi in \relax \StrLen{E}[\catarglen] \ifnum\catarglen=1 \mathcal{E} \else \mathbf{E} \fi such that P(\varphi) = \mathrm{id}_X, which we call vertical.

Definition

Definition 2.2

BYRG

(Cartesian arrow) Let P: \relax \StrLen{E}[\catarglen] \ifnum\catarglen=1 \mathcal{E} \else \mathbf{E} \fi \to \relax \StrLen{X}[\catarglen] \ifnum\catarglen=1 \mathcal{X} \else \mathbf{X} \fi. A morphism \varphi : E \to D in \relax \StrLen{E}[\catarglen] \ifnum\catarglen=1 \mathcal{E} \else \mathbf{E} \fi is (strong) P-cartesian if it satisfies the following universal property: let us write f := P(\varphi) and f : X \to Y in \relax \StrLen{X}[\catarglen] \ifnum\catarglen=1 \mathcal{X} \else \mathbf{X} \fi. Then we demand that for any g : Z \to X in \relax \StrLen{X}[\catarglen] \ifnum\catarglen=1 \mathcal{X} \else \mathbf{X} \fi and any g' : U \to D in \relax \StrLen{E}[\catarglen] \ifnum\catarglen=1 \mathcal{E} \else \mathbf{E} \fi with P(g') = g \fatsemi f, there exist a unique morphism h : U \to E in \relax \StrLen{E}[\catarglen] \ifnum\catarglen=1 \mathcal{E} \else \mathbf{E} \fi with P(h) = g and h \fatsemi \varphi = g':

\begin{tikzcd}[ampersand replacement=\&, sep=4ex] U \\ Z \& E \& \& D \\ \& X \& \& Y \arrow[dotted, maps to, from=2-2, to=3-2] \arrow["{{\exists ! h}}", dashed, from=1-1, to=2-2] \arrow[dotted, maps to, from=1-1, to=2-1] \arrow["{{\forall g}}"', curve={height=6pt}, from=2-1, to=3-2] \arrow["f", from=3-2, to=3-4] \arrow["\varphi", from=2-2, to=2-4] \arrow[dotted, maps to, from=2-4, to=3-4] \arrow["{{\forall g'}}"{description}, curve={height=-24pt}, from=1-1, to=2-4] \end{tikzcd}
Definition

Definition 2.3

337S

(Grothendieck fibration) A Grothendieck fibration (or fibration for short) is a functor P: \relax \StrLen{E}[\catarglen] \ifnum\catarglen=1 \mathcal{E} \else \mathbf{E} \fi \to \relax \StrLen{X}[\catarglen] \ifnum\catarglen=1 \mathcal{X} \else \mathbf{X} \fi such that any arrow f:X \to P(D) in \relax \StrLen{X}[\catarglen] \ifnum\catarglen=1 \mathcal{X} \else \mathbf{X} \fi admits a (strong) cartesian lift:

\begin{tikzcd}[ampersand replacement=\&] { \relax \StrLen{E}[\catarglen] \ifnum\catarglen=1 \mathcal{E} \else \mathbf{E} \fi } \& {f^*D} \& D \\ { \relax \StrLen{X}[\catarglen] \ifnum\catarglen=1 \mathcal{X} \else \mathbf{X} \fi } \& X \& {P(D)} \arrow["{f_D}", from=1-2, to=1-3] \arrow["f", from=2-2, to=2-3] \arrow["P"', from=1-1, to=2-1] \end{tikzcd}

For f_D to be a cartesian lift, it has to be terminal among all morphisms into D and projecting down to f, see Definition 2.2. Moreover, we can show these lifts compose: cartesian lifts of f and g compose to give a cartesian lift for f \fatsemi g. Furthermore, up to unique vertical isomorphism, the cartesian lift f_D : f^*D \to D is determined uniquely.

\relax \StrLen{E}[\catarglen] \ifnum\catarglen=1 \mathcal{E} \else \mathbf{E} \fi is called the total category and \relax \StrLen{X}[\catarglen] \ifnum\catarglen=1 \mathcal{X} \else \mathbf{X} \fi the base category.

Proposition

Proposition 2.4

UX5A

(Closure properties of fibrations) Let P : \relax \StrLen{E}[\catarglen] \ifnum\catarglen=1 \mathcal{E} \else \mathbf{E} \fi \to \relax \StrLen{X}[\catarglen] \ifnum\catarglen=1 \mathcal{X} \else \mathbf{X} \fi be a fibration.

  1. If Q: \relax \StrLen{F}[\catarglen] \ifnum\catarglen=1 \mathcal{F} \else \mathbf{F} \fi \to \relax \StrLen{E}[\catarglen] \ifnum\catarglen=1 \mathcal{E} \else \mathbf{E} \fi is a fibration, then the composite functor Q \fatsemi P : \relax \StrLen{F}[\catarglen] \ifnum\catarglen=1 \mathcal{F} \else \mathbf{F} \fi \to \relax \StrLen{X}[\catarglen] \ifnum\catarglen=1 \mathcal{X} \else \mathbf{X} \fi is a fibration.

  2. If Q: \relax \StrLen{F}[\catarglen] \ifnum\catarglen=1 \mathcal{F} \else \mathbf{F} \fi \to \relax \StrLen{X}[\catarglen] \ifnum\catarglen=1 \mathcal{X} \else \mathbf{X} \fi is any functor, then the pullback

    \begin{tikzcd}[sep=4ex] {Q^* \relax \StrLen{E}[\catarglen] \ifnum\catarglen=1 \mathcal{E} \else \mathbf{E} \fi } & { \relax \StrLen{E}[\catarglen] \ifnum\catarglen=1 \mathcal{E} \else \mathbf{E} \fi } \\ { \relax \StrLen{F}[\catarglen] \ifnum\catarglen=1 \mathcal{F} \else \mathbf{F} \fi } & { \relax \StrLen{X}[\catarglen] \ifnum\catarglen=1 \mathcal{X} \else \mathbf{X} \fi } \arrow["{Q^*P}"', from=1-1, to=2-1] \arrow["Q", from=2-1, to=2-2] \arrow["P", from=1-2, to=2-2] \arrow[from=1-1, to=1-2] \arrow["\lrcorner"{anchor=center, pos=0.125}, draw=none, from=1-1, to=2-2] \end{tikzcd}

    is a fibration.

Example

Example 2.5

5ZOE

(Examples of fibrations) For a category \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi, we denote by \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi ^\downarrow the category of morphisms in \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi with arrows given by the commutative squares.

  1. Domain fibration. For any category \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi, the domain projection \mathrm{dom} := \mathrm{dom}_{ \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi } : { \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi }^\downarrow \to \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi is a fibration. For u:I \to J in \relax \StrLen{X}[\catarglen] \ifnum\catarglen=1 \mathcal{X} \else \mathbf{X} \fi, a cartesian lift of u with respect to an arrow g : J\to Y is given by the square:

    \begin{tikzcd}[sep=4ex] I & J \\ X & Y \arrow["u\fatsemi g"', from=1-1, to=2-1] \arrow[Rightarrow, no head, from=2-1, to=2-2] \arrow["u", from=1-1, to=1-2] \arrow["g", from=1-2, to=2-2] \end{tikzcd}
  2. Codomain fibration. If \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi has all pullbacks, then the codomain projection \mathrm{cod} := \mathrm{cod}_{ \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi } : \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi ^\downarrow \to \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi is a fibration, also called the fundamental fibration of \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi. If \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi is locally cartesian closed, the codomain fibration gives rise to a model of dependent type theory with \Sigma- and \Pi-types [seely1984locally]. The idea is to interpret a type X in context (i.e., a list of free variables) I as a morphism X \to I, hence an object of the slice \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi /I, which is the fiber of \mathrm{cod} at I : \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi.

    Given an arrow u : J \to I in \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi together with a map p : X \to I, a \mathrm{cod}-cartesian lift of u with respect to p is given by pullback:

    \begin{tikzcd}[sep=4ex] {u^*X} & X \\ J & I \arrow["u", from=2-1, to=2-2] \arrow["p", from=1-2, to=2-2] \arrow[from=1-1, to=2-1] \arrow[from=1-1, to=1-2] \arrow["\lrcorner"{anchor=center, pos=0.125}, draw=none, from=1-1, to=2-2] \end{tikzcd}

    This corresponds to substituting the variables in context I along u.

  3. Simple fibration. Whereas the codomain fibration models arbitrary dependent types in context I, we might want to restrict to the case of simple types. A constant type is a dependent type over the terminal context 1, hence a map X \to 1, or equivalently, just an object X. We can then view X as a type over any context, by considering the pullback:

    \begin{tikzcd}[sep=4ex] {I \times X} & X \\ I & 1 \arrow[from=2-1, to=2-2] \arrow[from=1-2, to=2-2] \arrow[from=1-1, to=2-1] \arrow[from=1-1, to=1-2] \arrow["\lrcorner"{anchor=center, pos=0.125}, draw=none, from=1-1, to=2-2] \end{tikzcd}

    Therefore, as soon as \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi admits finite products, the simple fibration is given by the subfunctor of \mathrm{cod}_{ \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi } spanned by product projections I \times X \to I. It can also be described, up to fibered equivalence, as follows. Define the category \relax \StrLen{S}[\catarglen] \ifnum\catarglen=1 \mathcal{S} \else \mathbf{S} \fi ( \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi ) by taking as objects pairs (I,X) of \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi and as morphisms (I,X) \to (J,Y) pairs of morphisms (u : I \to J,f : I \times X \to Y) in \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi. The simple fibration S : \relax \StrLen{S}[\catarglen] \ifnum\catarglen=1 \mathcal{S} \else \mathbf{S} \fi ( \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi ) \to \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi is the functor defined by S(I,X) := I and S(u,f) := u. This is indeed a fibration, where a cartesian lift of u : I \to J with respect to (J,Y) is given by the map (u,\pi_Y): (I,Y) \to (J,Y) with \pi_Y : I \times Y \to Y.

  4. Subobject fibration. Let \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi have all pullbacks. We can consider the full subfibration

    \begin{tikzcd}[sep=4ex] {{ \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi }^\downarrow\vert_\mathsf{mono}} && { \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi ^\downarrow} \\ & { \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi } \arrow[hook, from=1-1, to=1-3] \arrow[from=1-1, to=2-2] \arrow[from=1-3, to=2-2] \end{tikzcd}

    of monomorphisms in \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi. Quotienting out by the relation that two monomorphisms shall be equal if and only if they factor through each other (necessarily through a monomorphism), we obtain the subobject fibration \mathrm{sub}:{ \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi ^\subseteq} \to \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi. The subobject fibration is typically used as an elementary example of fibration of predicates on the objects of \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi.

  5. Family fibration. Consider a category \relax \StrLen{X}[\catarglen] \ifnum\catarglen=1 \mathcal{X} \else \mathbf{X} \fi with pullbacks and P : \relax \StrLen{E}[\catarglen] \ifnum\catarglen=1 \mathcal{E} \else \mathbf{E} \fi \to \relax \StrLen{X}[\catarglen] \ifnum\catarglen=1 \mathcal{X} \else \mathbf{X} \fi a fibration.

    Let \relax \StrLen{Fam}[\catarglen] \ifnum\catarglen=1 \mathcal{Fam} \else \mathbf{Fam} \fi (P) : P \downarrow \relax \StrLen{X}[\catarglen] \ifnum\catarglen=1 \mathcal{X} \else \mathbf{X} \fi \to \relax \StrLen{X}[\catarglen] \ifnum\catarglen=1 \mathcal{X} \else \mathbf{X} \fi be the functor constructed as follows:

    \begin{tikzcd}[sep=4ex] {P\downarrow \relax \StrLen{X}[\catarglen] \ifnum\catarglen=1 \mathcal{X} \else \mathbf{X} \fi } && { \relax \StrLen{E}[\catarglen] \ifnum\catarglen=1 \mathcal{E} \else \mathbf{E} \fi } \\ { \relax \StrLen{X}[\catarglen] \ifnum\catarglen=1 \mathcal{X} \else \mathbf{X} \fi ^\downarrow} && { \relax \StrLen{X}[\catarglen] \ifnum\catarglen=1 \mathcal{X} \else \mathbf{X} \fi } \\ \relax \StrLen{X}[\catarglen] \ifnum\catarglen=1 \mathcal{X} \else \mathbf{X} \fi \arrow[from=1-1, to=2-1] \arrow["\mathrm{dom}", from=2-1, to=2-3] \arrow[from=1-1, to=1-3] \arrow["P", from=1-3, to=2-3] \arrow["\mathrm{cod}", from=2-1, to=3-1] \arrow["{ \relax \StrLen{Fam}[\catarglen] \ifnum\catarglen=1 \mathcal{Fam} \else \mathbf{Fam} \fi (P)}"', curve={height=24pt}, from=1-1, to=3-1] \arrow["\lrcorner"{anchor=center, pos=0.125}, draw=none, from=1-1, to=2-3] \end{tikzcd}

    We call \relax \StrLen{Fam}[\catarglen] \ifnum\catarglen=1 \mathcal{Fam} \else \mathbf{Fam} \fi (P) : P \downarrow \relax \StrLen{X}[\catarglen] \ifnum\catarglen=1 \mathcal{X} \else \mathbf{X} \fi \to \relax \StrLen{X}[\catarglen] \ifnum\catarglen=1 \mathcal{X} \else \mathbf{X} \fi the family fibration of P. Indeed this is a fibration: any pullback of P is a fibration, so is \mathrm{dom}^*P. Since \mathrm{cod} is a fibration, as \relax \StrLen{X}[\catarglen] \ifnum\catarglen=1 \mathcal{X} \else \mathbf{X} \fi has all pullbacks, then so is their composite \mathrm{cod} \fatsemi \mathrm{dom}^*P= \relax \StrLen{Fam}[\catarglen] \ifnum\catarglen=1 \mathcal{Fam} \else \mathbf{Fam} \fi (P). Objects in the fiber \mathrm{d} \relax \StrLen{Fam}[\catarglen] \ifnum\catarglen=1 \mathcal{Fam} \else \mathbf{Fam} \fi (P)(I) are given by pairs (f:X \to I, \alpha : \mathrm{d} P(X)). In fact, if P is an arbitrary functor, \relax \StrLen{Fam}[\catarglen] \ifnum\catarglen=1 \mathcal{Fam} \else \mathbf{Fam} \fi (P) is always an opfibration, the free opfibration generated by P. Thus, \relax \StrLen{Fam}[\catarglen] \ifnum\catarglen=1 \mathcal{Fam} \else \mathbf{Fam} \fi (P) is both a fibration and an opfibration. One can show that opcartesian transport serves as taking sums (or existential quantification), and that they commute with cartesian transport, serving as reindexing, in a canonical way (via the Beck–Chevalley isomorphisms). Hence, the family construction on a fibration P can be understood as the result of freely adding sums to P, which are internally indexed, i.e., indexed by the base category \relax \StrLen{X}[\catarglen] \ifnum\catarglen=1 \mathcal{X} \else \mathbf{X} \fi. Accordingly, we also write \relax \StrLen{Fam}[\catarglen] \ifnum\catarglen=1 \mathcal{Fam} \else \mathbf{Fam} \fi (P) for \relax \StrLen{Fam}[\catarglen] \ifnum\catarglen=1 \mathcal{Fam} \else \mathbf{Fam} \fi (P).

    One could replace \mathrm{dom} in the above definition by a full subfibration of itself, corresponding to a version of the family construction that is the sum completion only with respect to a chosen class of morphisms of \relax \StrLen{X}[\catarglen] \ifnum\catarglen=1 \mathcal{X} \else \mathbf{X} \fi.

Definition

Definition 2.6

G4OW

(The vertical–cartesian factorization system, [myers_cartesian_2021]) Let P: \relax \StrLen{E}[\catarglen] \ifnum\catarglen=1 \mathcal{E} \else \mathbf{E} \fi \to \relax \StrLen{X}[\catarglen] \ifnum\catarglen=1 \mathcal{X} \else \mathbf{X} \fi be a fibration. The vertical–cartesian factorization system (\mathrm{vert}, \mathrm{cart}) induced by P on \relax \StrLen{E}[\catarglen] \ifnum\catarglen=1 \mathcal{E} \else \mathbf{E} \fi is an orthogonal factorization system where

  1. the left class (vertical morphisms) is given by the maps projecting to isomorphisms and

  2. the right class (cartesian morphisms) is given by cartesian maps.

Proposition

Proposition 2.7

K3ZC

Let P: \relax \StrLen{E}[\catarglen] \ifnum\catarglen=1 \mathcal{E} \else \mathbf{E} \fi \to \relax \StrLen{X}[\catarglen] \ifnum\catarglen=1 \mathcal{X} \else \mathbf{X} \fi be a fibration. In \relax \StrLen{E}[\catarglen] \ifnum\catarglen=1 \mathcal{E} \else \mathbf{E} \fi, every cospan:

\begin{tikzcd}[ampersand replacement=\&] \& \cdot \\ \cdot \& \cdot \arrow["\mathrm{vert}", from=1-2, to=2-2] \arrow["\mathrm{cart}"', from=2-1, to=2-2] \end{tikzcd}

admits a pullback:

\begin{tikzcd}[ampersand replacement=\&] \cdot \& \cdot \\ \cdot \& \cdot \arrow["\mathrm{vert}", from=1-2, to=2-2] \arrow["\mathrm{cart}"', from=2-1, to=2-2] \arrow["\mathrm{vert}"', from=1-1, to=2-1] \arrow["\mathrm{cart}", from=1-1, to=1-2] \arrow["\lrcorner"{anchor=center, pos=0.125}, draw=none, from=1-1, to=2-2] \end{tikzcd}

Conversely, every commutative square like (?) is a pullback square.

Construction

Construction 1

FU1H

Given a fibration P : \relax \StrLen{E}[\catarglen] \ifnum\catarglen=1 \mathcal{E} \else \mathbf{E} \fi \to \relax \StrLen{X}[\catarglen] \ifnum\catarglen=1 \mathcal{X} \else \mathbf{X} \fi, its dual (or fiberwise opposite) is another fibration {{P}^{\vee_{}}} : {{ \relax \StrLen{E}[\catarglen] \ifnum\catarglen=1 \mathcal{E} \else \mathbf{E} \fi }^{\vee_{}}} \to \relax \StrLen{X}[\catarglen] \ifnum\catarglen=1 \mathcal{X} \else \mathbf{X} \fi constructed as follows.

The category {{ \relax \StrLen{E}[\catarglen] \ifnum\catarglen=1 \mathcal{E} \else \mathbf{E} \fi }^{\vee_{}}} is the category that has the same objects as \relax \StrLen{E}[\catarglen] \ifnum\catarglen=1 \mathcal{E} \else \mathbf{E} \fi and as morphisms equivalence classes of vertical-cartesian spans in \relax \StrLen{E}[\catarglen] \ifnum\catarglen=1 \mathcal{E} \else \mathbf{E} \fi, i.e. spans in \relax \StrLen{E}[\catarglen] \ifnum\catarglen=1 \mathcal{E} \else \mathbf{E} \fi of the form

\begin{tikzcd}[ampersand replacement=\&, sep=small] \& {\cdot } \\ \cdot \&\& \cdot \arrow["\mathrm{cart}", from=1-2, to=2-3] \arrow["\mathrm{vert}"', from=1-2, to=2-1] \end{tikzcd}

They compose because vertical arrows can always be pulled back against cartesian arrows:

\begin{tikzcd}[ampersand replacement=\&, sep=small] \&\& \cdot \\ \& {\cdot } \&\&\cdot \\ X \&\& Y \&\& Z \arrow["\mathrm{cart}"{pos=0.8}, from=2-2, to=3-3] \arrow["\mathrm{vert}"', from=2-2, to=3-1] \arrow["\mathrm{vert}"'{pos=0.3}, from=2-4, to=3-3] \arrow["\mathrm{cart}", from=2-4, to=3-5] \arrow["\mathrm{vert}"', from=1-3, to=2-2] \arrow["\mathrm{cart}", from=1-3, to=2-4] \arrow["\lrcorner"{anchor=center, pos=0.125, rotate=-45}, draw=none, from=1-3, to=3-3] \end{tikzcd}

Hence this defines a category, and P still works as a projection onto \relax \StrLen{X}[\catarglen] \ifnum\catarglen=1 \mathcal{X} \else \mathbf{X} \fi.

The fibration structure comes from noticing one can still lift arrows to cartesian arrows. More easily, since our fibrations are cloven, we can define

{{P}^{\vee_{}}} := \intop (\mathrm{d} P \fatsemi (-)^\mathsf{op})

which is a fibration by construction. This point of view will be also useful later on.

Definition

Definition 3.1

EODZ

(P-lenses) Let P: \relax \StrLen{E}[\catarglen] \ifnum\catarglen=1 \mathcal{E} \else \mathbf{E} \fi \to \relax \StrLen{X}[\catarglen] \ifnum\catarglen=1 \mathcal{X} \else \mathbf{X} \fi be a fibration. Its dual fibration {{P}^{\vee_{}}}: {{ \relax \StrLen{E}[\catarglen] \ifnum\catarglen=1 \mathcal{E} \else \mathbf{E} \fi }^{\vee_{}}} \to \relax \StrLen{X}[\catarglen] \ifnum\catarglen=1 \mathcal{X} \else \mathbf{X} \fi is called the fibration of P-lenses, and morphisms in {{ \relax \StrLen{E}[\catarglen] \ifnum\catarglen=1 \mathcal{E} \else \mathbf{E} \fi }^{\vee_{}}} are P-lenses.

Definition

Definition 3.2

3X7W

The (simple) Dialectica category \mathbf{Dial}_\times( \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi ) has

  1. as objects, triples

    (U : \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi , X : \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi , \alpha : \mathrm{Sub}(U \times X))

    meaning \alpha is a subobject of U \times X,

  2. as morphisms (U,X,\alpha) \to (V,Y,\beta), triples

    Eqalign.

    &f: U V,
    &f^: U Y X,
    u:U, y:Y, &(u, f^(u, y)) (f(u), y)

Definition

Definition 3.3

C92J

(Action of a monoidal category) Let ( \relax \StrLen{M}[\catarglen] \ifnum\catarglen=1 \mathcal{M} \else \mathbf{M} \fi , I, \otimes) be a monoidal category. A (left) \relax \StrLen{M}[\catarglen] \ifnum\catarglen=1 \mathcal{M} \else \mathbf{M} \fi-action on the category \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi is a functor \bullet : \relax \StrLen{M}[\catarglen] \ifnum\catarglen=1 \mathcal{M} \else \mathbf{M} \fi \times \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi \to \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi together with coherent isomorphisms witnessing I \bullet A \cong A and M \bullet (N \bullet A) \cong (M \otimes N) \bullet A. The action is strict when such isomorphisms are in fact identities.

Definition

Definition 3.4

TXAW

(Preoptic) Fix a strict monoidal category \relax \StrLen{M}[\catarglen] \ifnum\catarglen=1 \mathcal{M} \else \mathbf{M} \fi and two strict left \relax \StrLen{M}[\catarglen] \ifnum\catarglen=1 \mathcal{M} \else \mathbf{M} \fi-actions ( \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi ,\bullet) and ( \relax \StrLen{D}[\catarglen] \ifnum\catarglen=1 \mathcal{D} \else \mathbf{D} \fi , \circ). Let A,S : \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi and B,T : \relax \StrLen{D}[\catarglen] \ifnum\catarglen=1 \mathcal{D} \else \mathbf{D} \fi be objects. A preoptic \relax\if@display \begin{pmatrix}{\vphantom{f_f^f}B} \\ {\vphantom{f_f^f}A} \end{pmatrix} \else \begin{psmallmatrix}{\vphantom{f}B} \\ {\vphantom{f}A} \end{psmallmatrix} \fi \leftrightarrows \relax\if@display \begin{pmatrix}{\vphantom{f_f^f}T} \\ {\vphantom{f_f^f}S} \end{pmatrix} \else \begin{psmallmatrix}{\vphantom{f}T} \\ {\vphantom{f}S} \end{psmallmatrix} \fi is a triple (M,f,f^\sharp) where M : \relax \StrLen{M}[\catarglen] \ifnum\catarglen=1 \mathcal{M} \else \mathbf{M} \fi is called the residual, f:A \to M \bullet S is a morphism in \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi called the view, and f^\sharp : M \circ T \to B is a morphism in \relax \StrLen{D}[\catarglen] \ifnum\catarglen=1 \mathcal{D} \else \mathbf{D} \fi called the update. The category of preoptics \relax \StrLen{PreOptic}[\catarglen] \ifnum\catarglen=1 \mathcal{PreOptic} \else \mathbf{PreOptic} \fi _{\bullet,\circ} has objects pairs of an object of \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi and an object of \relax \StrLen{D}[\catarglen] \ifnum\catarglen=1 \mathcal{D} \else \mathbf{D} \fi, and morphisms preoptics.

Remark

Remark 3.5

F22X

Using preoptics instead of optics is a convenient device to avoid working with 2-optics instead, in which the quotient hinted at above is replaced by explicit witnesses. Avoiding the quotient, however, seems necessary for the fibrational manipulation of optics, see e.g. [braithwaite_fibre_2021].

Remark

Remark 4.1

D8Z9

Something stronger is true: Q is actually a fibration of fibrations, i.e. a ‘fiberwise fibration’, since Bénabou showed that fibrations in \relax \StrLen{Fib}[\catarglen] \ifnum\catarglen=1 \mathcal{Fib} \else \mathbf{Fib} \fi ( \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi ) are given by maps of fibrations which are themselves fibrations. A published account of this fact can be found in [hermida_properties_1999].

Definition

Definition 4.2

W8IY

Let (L, R) be a factorization system on \relax \StrLen{E}[\catarglen] \ifnum\catarglen=1 \mathcal{E} \else \mathbf{E} \fi. An ambifibration A : \relax \StrLen{P}[\catarglen] \ifnum\catarglen=1 \mathcal{P} \else \mathbf{P} \fi \to \relax \StrLen{E}[\catarglen] \ifnum\catarglen=1 \mathcal{E} \else \mathbf{E} \fi is a functor such that

  1. every arrow in L has an opcartesian lift (A restrics to an opfibration on L)

  2. every arrow in R has a cartesian lift (A restrics to a fibration on R)

Definition

Definition 4.3

0RPX

Let \boldsymbol{P} = ( \relax \StrLen{E}[\catarglen] \ifnum\catarglen=1 \mathcal{E} \else \mathbf{E} \fi _n \xrightarrow{P_n} \cdots \xrightarrow{P_3} \relax \StrLen{E}[\catarglen] \ifnum\catarglen=1 \mathcal{E} \else \mathbf{E} \fi _2 \xrightarrow{P_2} \relax \StrLen{E}[\catarglen] \ifnum\catarglen=1 \mathcal{E} \else \mathbf{E} \fi _1 \xrightarrow{P_1} \relax \StrLen{E}[\catarglen] \ifnum\catarglen=1 \mathcal{E} \else \mathbf{E} \fi _0) be a sequence of n fibrations (a tower of fibrations of height n). The iterated dual of \boldsymbol{P} is defined inductively on its length 1 \leq k < n as follows:

  • k=1:

    {{( \relax \StrLen{E}[\catarglen] \ifnum\catarglen=1 \mathcal{E} \else \mathbf{E} \fi _1 \xrightarrow{P_1} \relax \StrLen{E}[\catarglen] \ifnum\catarglen=1 \mathcal{E} \else \mathbf{E} \fi _0)}^{\vee_{1}}} = {{ \relax \StrLen{E}[\catarglen] \ifnum\catarglen=1 \mathcal{E} \else \mathbf{E} \fi _1}^{\vee_{ \relax \StrLen{E}[\catarglen] \ifnum\catarglen=1 \mathcal{E} \else \mathbf{E} \fi _0}}} \xrightarrow{{{P_1}^{\vee_{ \relax \StrLen{E}[\catarglen] \ifnum\catarglen=1 \mathcal{E} \else \mathbf{E} \fi _0}}}} \relax \StrLen{E}[\catarglen] \ifnum\catarglen=1 \mathcal{E} \else \mathbf{E} \fi _0
  • 1 < k < n:

    {{( \relax \StrLen{E}[\catarglen] \ifnum\catarglen=1 \mathcal{E} \else \mathbf{E} \fi _{k+1} \xrightarrow{P_{k+1}} \cdots \xrightarrow{P_2} \relax \StrLen{E}[\catarglen] \ifnum\catarglen=1 \mathcal{E} \else \mathbf{E} \fi _1 \xrightarrow{P_1} \relax \StrLen{E}[\catarglen] \ifnum\catarglen=1 \mathcal{E} \else \mathbf{E} \fi _0)}^{\vee_{k+1}}} = {{\left({{( \relax \StrLen{E}[\catarglen] \ifnum\catarglen=1 \mathcal{E} \else \mathbf{E} \fi _{k+1} \xrightarrow{P_{k+1}} \cdots \xrightarrow{P_{2}} \relax \StrLen{E}[\catarglen] \ifnum\catarglen=1 \mathcal{E} \else \mathbf{E} \fi _1)}^{\vee_{k}}}\right)}^{\vee_{ \relax \StrLen{E}[\catarglen] \ifnum\catarglen=1 \mathcal{E} \else \mathbf{E} \fi _0}}}\xrightarrow{{{P_1}^{\vee_{ \relax \StrLen{E}[\catarglen] \ifnum\catarglen=1 \mathcal{E} \else \mathbf{E} \fi _0}}}} \relax \StrLen{E}[\catarglen] \ifnum\catarglen=1 \mathcal{E} \else \mathbf{E} \fi _0
Example

Example 4.4

HIN5

If \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi is a cartesian monoidal category, then the total category of its associated simple fibration S: \relax \StrLen{S}[\catarglen] \ifnum\catarglen=1 \mathcal{S} \else \mathbf{S} \fi ( \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi ) \to \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi is again cartesian, meaning we can form towers of arbitrary height by iterating the construction of simple fibrations.

Example

Example 4.5

J8LR

Likewise, when \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi is finitely complete we can form towers \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi ^{\downarrow^n} \to \cdots \to \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi ^\downarrow \to \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi of arbitrary height where the i-th level is the category of i-dimensional commutative cubes in \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi.

Example

Example 4.6

7OM7

More generally, suppose P: \relax \StrLen{E}[\catarglen] \ifnum\catarglen=1 \mathcal{E} \else \mathbf{E} \fi \to \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi is a full comprehension category [jacobs_comprehension_1993], meaning it admits a right adjoint 1: \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi \to \relax \StrLen{E}[\catarglen] \ifnum\catarglen=1 \mathcal{E} \else \mathbf{E} \fi (a fibered terminal object) as well as a further right adjoint (comprehension) \{-\}: \relax \StrLen{E}[\catarglen] \ifnum\catarglen=1 \mathcal{E} \else \mathbf{E} \fi \to \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi. By repeatedly pulling back P along \{-\} we can form towers of fibrations of arbitrary height.

Definition

Definition 4.7

WZPL

Let \boldsymbol{P} be a tower of fibrations of length n. The morphisms in the total space of its iterated dual {{\boldsymbol{P}}^{\vee_{n}}} are called \boldsymbol{P}-dialenses.

Example

Example 4.8

YZ4F

As anticipated, optics can be constructed as dialenses of height 2, if of a bizarre kind. First, recall from [braithwaite_fibre_2021] that every (strict, for simplicity) action \bullet : \relax \StrLen{M}[\catarglen] \ifnum\catarglen=1 \mathcal{M} \else \mathbf{M} \fi \times \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi \to \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi of a monoidal category \relax \StrLen{M}[\catarglen] \ifnum\catarglen=1 \mathcal{M} \else \mathbf{M} \fi on a category \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi can be repackaged as a 2-opfibration \relax \StrLen{Para}[\catarglen] \ifnum\catarglen=1 \mathcal{Para} \else \mathbf{Para} \fi (\bullet) \to B \relax \StrLen{M}[\catarglen] \ifnum\catarglen=1 \mathcal{M} \else \mathbf{M} \fi, where \relax \StrLen{Para}[\catarglen] \ifnum\catarglen=1 \mathcal{Para} \else \mathbf{Para} \fi (\bullet) is the bicategory of \relax \StrLen{M}[\catarglen] \ifnum\catarglen=1 \mathcal{M} \else \mathbf{M} \fi-parametric \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi-morphisms (see [Capucci_2022]) and the projection to B \relax \StrLen{M}[\catarglen] \ifnum\catarglen=1 \mathcal{M} \else \mathbf{M} \fi is given by projection out the parameter of a morphism. Here let’s ignore the 2-dimensional information and just consider this as an opfibration (because every 2-opfibration has an underlying 1-opfibration, cf. [hermida_properties_1999, Definition 2.1]).

Recall the 1-dimensional data of \relax \StrLen{Para}[\catarglen] \ifnum\catarglen=1 \mathcal{Para} \else \mathbf{Para} \fi (\bullet): its objects are the same of \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi while its 1-cells are pairs (m \in \relax \StrLen{M}[\catarglen] \ifnum\catarglen=1 \mathcal{M} \else \mathbf{M} \fi , f:m \bullet X \to X), composing in the obvious way.

Opcartesian lifts for the functor \relax \StrLen{Para}[\catarglen] \ifnum\catarglen=1 \mathcal{Para} \else \mathbf{Para} \fi (\bullet) \to B \relax \StrLen{M}[\catarglen] \ifnum\catarglen=1 \mathcal{M} \else \mathbf{M} \fi are constructed as follows:

\begin{tikzcd}[ampersand replacement=\&] { \relax \StrLen{Para}[\catarglen] \ifnum\catarglen=1 \mathcal{Para} \else \mathbf{Para} \fi (\bullet)} \& X \& {m \bullet X} \\ {B \relax \StrLen{M}[\catarglen] \ifnum\catarglen=1 \mathcal{M} \else \mathbf{M} \fi } \& \ast \& \ast \arrow["P_\bullet"', from=1-1, to=2-1] \arrow["m"', from=2-2, to=2-3] \arrow["{(m, 1_{m \bullet X})}", from=1-2, to=1-3] \end{tikzcd}

Further on, we’ll abbreviate (m, 1_{m \bullet X}) with m_X.

Then given two left \relax \StrLen{M}[\catarglen] \ifnum\catarglen=1 \mathcal{M} \else \mathbf{M} \fi-actegories ( \relax \StrLen{C}[\catarglen] \ifnum\catarglen=1 \mathcal{C} \else \mathbf{C} \fi ,\bullet) and ( \relax \StrLen{D}[\catarglen] \ifnum\catarglen=1 \mathcal{D} \else \mathbf{D} \fi , \circ), one can construct the following tower of opfibrations:

\begin{tikzcd}[ampersand replacement=\&, sep=5ex] { \relax \StrLen{Para}[\catarglen] \ifnum\catarglen=1 \mathcal{Para} \else \mathbf{Para} \fi (\circ) \times_{B \relax \StrLen{M}[\catarglen] \ifnum\catarglen=1 \mathcal{M} \else \mathbf{M} \fi } \relax \StrLen{Para}[\catarglen] \ifnum\catarglen=1 \mathcal{Para} \else \mathbf{Para} \fi (\bullet)} \& { \relax \StrLen{Para}[\catarglen] \ifnum\catarglen=1 \mathcal{Para} \else \mathbf{Para} \fi (\circ)} \\ { \relax \StrLen{Para}[\catarglen] \ifnum\catarglen=1 \mathcal{Para} \else \mathbf{Para} \fi (\bullet)} \& {B \relax \StrLen{M}[\catarglen] \ifnum\catarglen=1 \mathcal{M} \else \mathbf{M} \fi } \\ {B \relax \StrLen{M}[\catarglen] \ifnum\catarglen=1 \mathcal{M} \else \mathbf{M} \fi } \arrow["{P_\circ}", from=1-2, to=2-2] \arrow["{P_\bullet}", from=2-1, to=2-2] \arrow["{P_\bullet}"', from=2-1, to=3-1] \arrow[from=1-1, to=1-2] \arrow["{P_\circ}"', from=1-1, to=2-1] \arrow["\lrcorner"{anchor=center, pos=0.125}, draw=none, from=1-1, to=2-2] \end{tikzcd}

Then its iterated dual produces preoptics (Def. 3.4):

\begin{tikzcd}[ampersand replacement=\&] { \relax \StrLen{PreOptic}[\catarglen] \ifnum\catarglen=1 \mathcal{PreOptic} \else \mathbf{PreOptic} \fi _{ \relax \StrLen{M}[\catarglen] \ifnum\catarglen=1 \mathcal{M} \else \mathbf{M} \fi }(\bullet, \circ)} \& U \& \textcolor{red}{m \circ U} \& \textcolor{red}{V} \& V \\ {{{ \relax \StrLen{Para}[\catarglen] \ifnum\catarglen=1 \mathcal{Para} \else \mathbf{Para} \fi (\bullet)}^{\vee_{B \relax \StrLen{M}[\catarglen] \ifnum\catarglen=1 \mathcal{M} \else \mathbf{M} \fi }}}} \& X \& {m \bullet X} \& \textcolor{red}{m \bullet X} \& \textcolor{red}{Y} \\ {B \relax \StrLen{M}[\catarglen] \ifnum\catarglen=1 \mathcal{M} \else \mathbf{M} \fi } \& \textcolor{red}{\ast} \& \textcolor{red}{\ast} \& \ast \& \ast \arrow["m", color={red}, from=3-2, to=3-3] \arrow[Rightarrow, no head, from=3-3, to=3-4] \arrow[Rightarrow, no head, from=3-4, to=3-5] \arrow["{m_X}", from=2-2, to=2-3] \arrow[Rightarrow, no head, from=2-3, to=2-4] \arrow["f"', color={red}, from=2-5, to=2-4] \arrow["{1_V}", Rightarrow, no head, from=1-4, to=1-5] \arrow["{m_U}", from=1-2, to=1-3] \arrow["{f^\sharp}", color={red}, from=1-3, to=1-4] \arrow["{{{P_\bullet}^{\vee_{B \relax \StrLen{M}[\catarglen] \ifnum\catarglen=1 \mathcal{M} \else \mathbf{M} \fi }}}}", from=2-1, to=3-1] \arrow["\mathrm{view}", from=1-1, to=2-1] \end{tikzcd}

Source and licence

The text on this page is from arXiv:2403.16388v5 by Matteo Capucci, Bruno Gavranović, Abdullah Malik, Francisco Rios and Jonathan Weinberger, under the licence CC BY 4.0. The corpus made these changes: it read the items out of the LaTeX source, it expanded the macros of the paper, it put each proof after its statement, and it converted the text to HTML. The formulas are the TeX of the paper, and KaTeX renders them. A formula or a reference can look different from the PDF. The page is published under CC BY 4.0.

The record of each item is in analysis/objects/2403/2403.16388.jsonl.