Dialectica Category

There are a couple of versions of dialectica categories: we shall start with the most general first. Let 𝒟 𝒞 𝒟 𝒞 \mathcal{E}\to\mathcal{D}\to\mathcal{C} be a tower of Cartesian Fibrations. The dialectica category Dia ( , 𝒟 ) 𝒞 Dia 𝒟 𝒞 \mathrm{Dia}(\mathcal{E},\mathcal{D})\to\mathcal{C} is defined as ( 𝒟 op ) op superscript 𝒟 superscript op op (\mathcal{D}\circ\mathcal{E}^{\mathrm{op}})^{\mathrm{op}} , where \circ denotes the Composition of Displayed Categories, and ( ) op superscript op (-)^{\mathrm{op}} denotes the Fibrewise Opposite of a Cartesian Fibration.

If we unfold this, the objects over U : 𝒞 : 𝑈 𝒞 U:\mathcal{C} consist of a pair of a X : 𝒟 X : 𝑋 subscript 𝒟 𝑋 X:\mathcal{D}_{X} and an α : U , X : 𝛼 subscript 𝑈 𝑋 \alpha:\mathcal{E}_{U,X} . Morphisms are a bit involved because of all the fibrewise ops: A map over f : U V : 𝑓 𝑈 𝑉 f:U\to V between ( X , α ) 𝑋 𝛼 (X,\alpha) and ( Y , β ) 𝑌 𝛽 (Y,\beta) consists of:

This is somewhat bonkers to read in categorical notation; here's what happens when we specialize to iterated Family Fibrations over the Category of Sets:

{-# NO_UNIVERSE_CHECK #-}
record Dia : Type where
  field
    Ix : Type
    Shape : Ix → Type
    Pos : ∀ (i : Ix) → Shape i → Type

open Dia

record Dia-hom (P Q : Dia) : Type where
  field
    ix : P .Ix → Q .Ix
    shape : ∀ (i : P .Ix) → Q .Shape (ix i) → P .Shape i
    pos : ∀ (i : P .Ix) (q : Q .Shape (ix i)) → P .Pos i (shape i q) → Q .Pos (ix i) q

open Dia-hom

References