module Cat.Instances.Assemblies.Univalence {βA} (πΈ : PCA βA) where
open Realisability.Data.Bool πΈ
open Realisability.PCA.Sugar πΈ
Failure of univalence in categories of assembliesπ
While the category
of assemblies over a partial combinatory
algebra
may look like an ordinary category of structured sets, the computable
maps
are not the maps which preserve the realisability relation.
This means that the category of assemblies fails to be univalent, unless
is trivial (so that
We show this by formalising the βflippedβ assembly of booleans, π'
below, and showing that no
identifications between π
and π'
extend the identity map.
: Assembly πΈ lzero
π' .Ob = Bool
π' .has-is-set = hlevel 2
π' .realisers true = singletonβΊ `false
π' .realisers false = singletonβΊ `true
π' .realised true = inc (`false .fst , inc refl)
π' .realised false = inc (`true .fst , inc refl) π'
This theorem turns out to be pretty basic path algebra: if we
are given an identification between π
and π'
, we have, in particular, an
identification between their realisability relations over the
identification between their underlying sets. And if we assume that the
identification between the underlying sets is refl
, weβre left with an ordinary
identification between the realisability relations; but the
realisability relation of π'
was chosen explicitly so it differs from π
βs.
no-path-extends-identity: (p : π πΈ β‘ π') β ap Ob p β‘ refl β `true .fst β‘ `false .fst
=
no-path-extends-identity p q let
: (e : β― β πΈ β) (x : Bool) β [ π πΈ ] e β© x β‘ [ π' ] e β© x
p' =
p' e x (apβ (Ξ» e x β [ π πΈ ] e β© x) (transport-refl e) (ap (Ξ» e β transport (sym e) x) q)) β©
[ π πΈ ] e β© transport refl x β‘β¨ sym (transport refl e) β© subst Ob (sym p) x β‘β¨ ap (Ξ» r β e β r x) (from-pathp (ap realisers p)) β©
[ π πΈ ]
[ π' ] e β© x βin sym (β‘-out! (transport (p' (`true .fst) true) (inc refl)))
As we argued above, the identity map is a computable function from
π
to π'
with computable inverse; so if
were univalent, we could extend it to a path satisfying the conditions
of the theorem above.
: π πΈ Asm.β
π'
πβ
π' = Asm.make-iso to from (ext Ξ» _ β refl) (ext Ξ» _ β refl) where
πβ
π' to = to-assembly-hom record where
= Ξ» x β x
map = `not
realiser = Ξ» where
tracks _ p β inc (sym (ap (`not β_) (sym (β‘-out! p)) β `not-Ξ²t))
true _ p β inc (sym (ap (`not β_) (sym (β‘-out! p)) β `not-Ξ²f))
false
= to-assembly-hom record where
from = Ξ» x β x
map = `not
realiser = Ξ» where
tracks _ p β inc (sym (ap (`not β_) (sym (β‘-out! p)) β `not-Ξ²f))
true _ p β inc (sym (ap (`not β_) (sym (β‘-out! p)) β `not-Ξ²t))
false
Assemblies-not-univalent: is-category (Assemblies πΈ lzero) β is-trivial-pca πΈ
=
Assemblies-not-univalent cat let
: π πΈ β‘ π'
p = cat .to-path πβ
π'
p
= Forget πΈ
Ξ module Sets = Cat.Reasoning (Sets lzero)
: Path (Set lzero) (Ξ Β· π πΈ) (Ξ Β· π') β Bool β‘ Bool
Ξ³ = ap β£_β£
Ξ³
: ap Ob p β‘ refl
q =
q
ap Ob p β‘β¨β©(ap (apply Ξ) p) β‘β¨ ap Ξ³ (F-map-path (Forget πΈ) cat Sets-is-category πβ
π') β©
Ξ³ (Sets-is-category .to-path (F-map-iso Ξ πβ
π')) β‘β¨ ap Ξ³ (ap (Sets-is-category .to-path) (Sets.β
-pathp refl refl refl)) β©
Ξ³ (Sets-is-category .to-path Sets.id-iso) β‘β¨ ap Ξ³ (to-path-refl Sets-is-category) β©
Ξ³
Ξ³ refl β‘β¨β©
refl βin no-path-extends-identity p q