Equality in a Cartesian Fibration

Let p : : 𝑝 p:\mathcal{E}\rightarrowtriangle\mathcal{B} be a Cartesian Fibration over a Cartesian Category. We say that p 𝑝 p has simple equality if

&& Y &&& {Eq(Z)}
X &&& Z
&& {(Γ × A) × A} &&& {(Δ × A) × A}
{Γ × A} &&& {Δ × A} \end{tikzcd} \]

If the two red maps are Cartesian, then the blue map is Cocartesian.

Note that we should not think of equality as an equality type, but rather a sort of wonky "unquantifier" that duplicates a variable. EG: when we form Eq ( P ) ( Γ × A ) × A Eq 𝑃 Γ 𝐴 𝐴 \mathrm{Eq}(P)\rightarrowtriangle(\Gamma\times A)\times A from P Γ × A 𝑃 Γ 𝐴 P\rightarrowtriangle\Gamma\times A , we should think of this as turning Γ , x : A P ( x ) true : Γ 𝑥 𝐴 proves 𝑃 𝑥 true \Gamma,x:A\vdash P(x)\;\mathrm{true} into Γ , x : A , y : A x = y P ( y ) true : Γ 𝑥 𝐴 𝑦 : 𝐴 proves 𝑥 𝑦 𝑃 𝑦 true \Gamma,x:A,y:A\vdash x=y\land P(y)\;\mathrm{true} ; the cocartesian map refl refl \mathrm{refl} then says that we can prove Γ , x : A P ( x ) x = x P ( x ) true : Γ 𝑥 conditional 𝐴 𝑃 𝑥 proves 𝑥 𝑥 𝑃 𝑥 true \Gamma,x:A\mid P(x)\vdash x=x\land P(x)\;\mathrm{true}

If \mathcal{E} has Fibred Terminal Objects, then we can get a notion of equality on morphisms u , v : A B : 𝑢 𝑣 𝐴 𝐵 u,v:{{A}\to{B}} by base changing Eq ( 1 ) : ( A × B ) × B : Eq 1 subscript 𝐴 𝐵 𝐵 \mathrm{Eq}(1):\mathcal{E}_{(A\times B)\times B} to E A subscript 𝐸 𝐴 E_{A} along m a t h r m i d i f x . . l s e i , u , v \langle\langle mathrm{id}{ifx..lse\par i},u\rangle,v\rangle . What this essentially does is turn the predicate a : A , b : B true : 𝑎 𝐴 𝑏 : 𝐵 proves top true a:A,b:B\vdash\top\;\mathrm{true} into a : A , b 1 : B , b 2 : B b 1 = b 2 true a:A,b_{1}:B,b_{2}:B\vdash b_{1}=b_{2}\land\top\;\mathrm{true} , and then Substitute away the b 1 subscript 𝑏 1 b_{1} and b 2 subscript 𝑏 2 b_{2} to get a : A u ( a ) = v ( a ) true a:A\vdash u(a)=v(a)\land\top\;\mathrm{true} .