Skip to content

Commit 97376da

Browse files
committed
defn: Asm(𝔸) is not univalent
1 parent c715dd7 commit 97376da

File tree

2 files changed

+131
-6
lines changed

2 files changed

+131
-6
lines changed

src/Cat/Instances/Assemblies.lagda.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -247,14 +247,17 @@ not be unital or associative.
247247
248248
::: warning
249249
Unlike most other categories constructed on the 1Lab, the category of
250-
assemblies is not [[univalent|univalent category]]. This is essentially
251-
*because* of the existence of assemblies such as `𝟚`{.Agda} and its
252-
"flipped" counterpart, described above: the identity map is a computable
253-
isomorphism between them, realised by the `` `not ``{.Agda} program, but
254-
there is no path in `Assembly`{.Agda} between them with first component
255-
projecting to the identity map.
250+
assemblies is not [[univalent|univalent category]]; see [univalence of
251+
categories of assemblies](Cat.Instances.Assemblies.Univalence.html).[^univalence]
256252
:::
257253
254+
[^univalence]:
255+
This is essentially *because* of of assemblies such as `𝟚`{.Agda}
256+
and its "flipped" counterpart, described above. The identity map is
257+
a computable isomorphism between them, realised by the `` `not
258+
``{.Agda} program, which does not extend to a path (unless $\bA$ is
259+
trivial).
260+
258261
However, these two assemblies *are* still identical in the type
259262
`Assembly`{.Agda}, where we allow the identification between the sets to
260263
be nontrivial --- their realisability relations are identical over the
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
<!--
2+
```agda
3+
open import Cat.Instances.Assemblies
4+
open import Cat.Instances.Sets
5+
open import Cat.Functor.Base
6+
open import Cat.Prelude
7+
8+
open import Data.Partial.Total
9+
open import Data.Partial.Base
10+
open import Data.Bool.Base
11+
12+
open import Realisability.PCA.Trivial
13+
open import Realisability.PCA
14+
15+
import Cat.Reasoning
16+
17+
import Realisability.Data.Bool
18+
import Realisability.PCA.Sugar
19+
import Realisability.Base
20+
```
21+
-->
22+
23+
```agda
24+
module Cat.Instances.Assemblies.Univalence {ℓA} (𝔸 : PCA ℓA) where
25+
```
26+
27+
<!--
28+
```agda
29+
open Realisability.Data.Bool 𝔸
30+
open Realisability.PCA.Sugar 𝔸
31+
```
32+
-->
33+
34+
# Failure of univalence in categories of assemblies
35+
36+
While the category $\thecat{Asm}(\bA)$ of [[assemblies]] over a
37+
[[partial combinatory algebra]] $\bA$ may look like an ordinary category
38+
of structured sets, the computable maps $X \to Y$ are *not* the maps
39+
which preserve the realisability relation. This means that the category
40+
of assemblies fails to be [[univalent|univalent category]], unless $\bA$
41+
is trivial (so that $\thecat{Asm}(\bA) \cong \Sets$). We show this by
42+
formalising the "flipped" assembly of booleans, `𝟚'`{.Agda} below, and
43+
showing that no identifications between `𝟚`{.Agda} and `𝟚'`{.Agda}
44+
extend the identity map.
45+
46+
```agda
47+
𝟚' : Assembly 𝔸 lzero
48+
𝟚' .Ob = Bool
49+
𝟚' .has-is-set = hlevel 2
50+
𝟚' .realisers true = singleton⁺ `false
51+
𝟚' .realisers false = singleton⁺ `true
52+
𝟚' .realised true = inc (`false .fst , inc refl)
53+
𝟚' .realised false = inc (`true .fst , inc refl)
54+
```
55+
56+
This theorem turns out to be pretty basic path algebra: if we *are*
57+
given an identification between `𝟚`{.Agda} and `𝟚'`{.Agda}, we have,
58+
in particular, an identification between their realisability relations
59+
*over* the identification between their underlying sets. And if we
60+
assume that the identification between the underlying sets is
61+
`refl`{.Agda}, we're left with an ordinary identification between the
62+
realisability relations; but the realisability relation of `𝟚'`{.Agda}
63+
was chosen explicitly so it differs from `𝟚`{.Agda}'s.
64+
65+
```agda
66+
no-path-extends-identity
67+
: (p : 𝟚 𝔸 ≡ 𝟚') → ap Ob p ≡ refl → `true .fst ≡ `false .fst
68+
no-path-extends-identity p q =
69+
let
70+
p' : (e : ↯ ⌞ 𝔸 ⌟) (x : Bool) → [ 𝟚 𝔸 ] e ⊩ x ≡ [ 𝟚' ] e ⊩ x
71+
p' e x =
72+
[ 𝟚 𝔸 ] e ⊩ transport refl x ≡⟨ sym (ap₂ (λ e x → [ 𝟚 𝔸 ] e ⊩ x) (transport-refl e) (ap (λ e → transport (sym e) x) q)) ⟩
73+
[ 𝟚 𝔸 ] (transport refl e) ⊩ subst Ob (sym p) x ≡⟨ ap (λ r → e ∈ r x) (from-pathp (ap realisers p)) ⟩
74+
[ 𝟚' ] e ⊩ x ∎
75+
in sym (□-out! (transport (p' (`true .fst) true) (inc refl)))
76+
```
77+
78+
As we argued above, the identity map is a computable function from
79+
`𝟚`{.Agda} to `𝟚'`{.Agda} with computable inverse; so if
80+
$\thecat{Asm}(\bA)$ were univalent, we could extend it to a path
81+
satisfying the conditions of the theorem above.
82+
83+
```agda
84+
𝟚≅𝟚' : 𝟚 𝔸 Asm.≅ 𝟚'
85+
𝟚≅𝟚' = Asm.make-iso to from (ext λ _ → refl) (ext λ _ → refl) where
86+
to = to-assembly-hom record where
87+
map = λ x → x
88+
realiser = `not
89+
tracks = λ where
90+
true _ p → inc (sym (ap (`not ⋆_) (sym (□-out! p)) ∙ `not-βt))
91+
false _ p → inc (sym (ap (`not ⋆_) (sym (□-out! p)) ∙ `not-βf))
92+
93+
from = to-assembly-hom record where
94+
map = λ x → x
95+
realiser = `not
96+
tracks = λ where
97+
true _ p → inc (sym (ap (`not ⋆_) (sym (□-out! p)) ∙ `not-βf))
98+
false _ p → inc (sym (ap (`not ⋆_) (sym (□-out! p)) ∙ `not-βt))
99+
100+
Assemblies-not-univalent
101+
: is-category (Assemblies 𝔸 lzero) → is-trivial-pca 𝔸
102+
Assemblies-not-univalent cat =
103+
let
104+
p : 𝟚 𝔸 ≡ 𝟚'
105+
p = cat .to-path 𝟚≅𝟚'
106+
107+
Γ = Forget 𝔸
108+
module Sets = Cat.Reasoning (Sets lzero)
109+
110+
γ : Path (Set lzero) (Γ · 𝟚 𝔸) (Γ · 𝟚') → Bool ≡ Bool
111+
γ = ap ∣_∣
112+
113+
q : ap Ob p ≡ refl
114+
q =
115+
ap Ob p ≡⟨⟩
116+
γ (ap (apply Γ) p) ≡⟨ ap γ (F-map-path (Forget 𝔸) cat Sets-is-category 𝟚≅𝟚') ⟩
117+
γ (Sets-is-category .to-path (F-map-iso Γ 𝟚≅𝟚')) ≡⟨ ap γ (ap (Sets-is-category .to-path) (Sets.≅-pathp refl refl refl)) ⟩
118+
γ (Sets-is-category .to-path Sets.id-iso) ≡⟨ ap γ (to-path-refl Sets-is-category) ⟩
119+
γ refl ≡⟨⟩
120+
refl ∎
121+
in no-path-extends-identity p q
122+
```

0 commit comments

Comments
 (0)