module Cat.Instances.Shape.Involution where
The walking involution🔗
The walking involution is the category with a single
non-trivial morphism
,
satisfying
.
We can encode this by defining morphisms as booleans, and using xor
as our composition operation.
: Precategory lzero lzero
∙⤮∙ .Precategory.Ob = ⊤
∙⤮∙ .Precategory.Hom _ _ = Bool
∙⤮∙ .Precategory.Hom-set _ _ = Bool-is-set
∙⤮∙ .Precategory.id = false
∙⤮∙ .Precategory._∘_ = xor
∙⤮∙ .Precategory.idr f = xor-falser f
∙⤮∙ .Precategory.idl f = refl
∙⤮∙ .Precategory.assoc f g h = xor-associative f g h
∙⤮∙
open Cat.Reasoning ∙⤮∙
This is the smallest precategory with a non-trivial isomorphism.
: Bool ≃ (tt ≅ tt)
Bool≃∙⤮∙-isos =
Bool≃∙⤮∙-isos (Bool→Iso , iso Iso→Bool right-inv left-inv)
Iso→Equiv where
: Bool → tt ≅ tt
Bool→Iso = make-iso true true refl refl
Bool→Iso true = id-iso
Bool→Iso false
: tt ≅ tt → Bool
Iso→Bool = i .to
Iso→Bool i
: is-right-inverse Iso→Bool Bool→Iso
right-inv =
right-inv f (λ b → b ≡ f .to → Bool→Iso b ≡ f)
Bool-elim (≅-pathp refl refl)
(≅-pathp refl refl)
(f .to) refl
: is-left-inverse Iso→Bool Bool→Iso
left-inv = refl
left-inv true = refl left-inv false
Skeletality and (non)-univalence🔗
As the walking involution only has one object, it is trivially skeletal.
: is-skeletal ∙⤮∙
∙⤮∙-skeletal .to-path _ = refl
∙⤮∙-skeletal .to-path-over _ =
∙⤮∙-skeletal (λ _ → squash) (inc id-iso) _ is-prop→pathp
However, it is not univalent, since its only object has more internal automorphisms than it has loops. By definition, univalence for the walking involution would mean that there are two paths in the unit type: but this contradicts the unit type being a set.
: ¬ is-category ∙⤮∙
∙⤮∙-not-univalent = true≠false (Bool-is-prop true false) where
∙⤮∙-not-univalent is-cat
: Bool ≃ (tt ≡ tt)
Bool≃Ob-path = Bool≃∙⤮∙-isos ∙e identity-system-gives-path is-cat
Bool≃Ob-path
: is-prop Bool
Bool-is-prop = is-hlevel≃ 1 Bool≃Ob-path hlevel! Bool-is-prop