Martin Escardo, 1-7 November 2023.
We prove the main results of [1] and [2] about automorphisms of Ξ©.
[1] Peter T. Johnstone. Automorphisms of Ξ©. Algebra Universalis,
9 (1979) 1-7.
https://doi.org/10.1007/BF02488012
[2] Peter Freyd. Choice and well-ordering. Annals of Pure and Applied
Logic 35 (1987) 149-166.
https://doi.org/10.1016/0168-0072(87)90060-1
https://core.ac.uk/download/pdf/81927529.pdf
\begin{code}
{-# OPTIONS --safe --without-K #-}
open import Groups.Type
open import MLTT.Spartan
open import UF.Embeddings
open import UF.Equiv hiding (_β
_)
open import UF.Equiv-FunExt
open import UF.FunExt
open import UF.Logic
open import UF.Sets
open import UF.Sets-Properties
open import UF.Subsingletons
open import UF.Subsingletons-FunExt
open import UF.SubtypeClassifier hiding (Ξ©)
open import UF.SubtypeClassifier-Properties
module Higgs.AutomorphismsOfOmega
{π€ : Universe}
(fe : Fun-Ext)
(pe : propext π€)
where
private
π€βΊ = π€ βΊ
open import Higgs.InvolutionTheorem fe pe
open import Higgs.Rigidity fe pe
open Conjunction
open Implication fe
open Universal fe
can-recover-automorphism-from-its-value-at-β€
: (π : Aut Ξ©)
(p : Ξ©)
β β π β p οΌ (p β β π β β€)
can-recover-automorphism-from-its-value-at-β€ π@(f , _) p =
Ξ©-ext' pe fe
((f p οΌ β€) ββ¨ Ξ©-automorphism-swap-β π β©
(f β€ οΌ p) ββ¨ β-sym (β-equiv-to-οΌ pe (f β€) p) β©
((f β€ β p) οΌ β€) ββ¨ transport-β (_οΌ β€) (β-sym pe (f β€) p) β©
((p β f β€) οΌ β€) β )
\end{code}
The Higgs object β as defined by Johnstone in [1].
\begin{code}
is-widespread : Ξ© β π€βΊ Μ
is-widespread r = (p : Ξ©) β ((p β r) β r) οΌ p
being-widespread-is-prop : (r : Ξ©) β is-prop (is-widespread r)
being-widespread-is-prop r = Ξ -is-prop fe (Ξ» p β Ξ©-is-set fe pe)
β : π€βΊ Μ
β = Ξ£ r κ Ξ© , is-widespread r
βͺ_β« : β β Ξ©
βͺ r , _ β« = r
βͺ_β«-is-widespread : (x : β) β is-widespread βͺ x β«
βͺ _ , i β«-is-widespread = i
β-is-set : is-set β
β-is-set = subsets-of-sets-are-sets
Ξ©
is-widespread
(Ξ©-is-set fe pe)
(Ξ» {r} β being-widespread-is-prop r)
to-β-οΌ : (r s : Ξ©) {i : is-widespread r} {j : is-widespread s}
β r οΌ s
β (r , i) οΌ[ β ] (s , j)
to-β-οΌ r s {i} {j} = to-subtype-οΌ being-widespread-is-prop
to-β-οΌ' : (x@(r , i) y@(s , j) : β)
β (r holds β s holds)
β x οΌ y
to-β-οΌ' (r , i) (s , j) (f , g) = to-β-οΌ r s (Ξ©-extensionality pe fe f g)
\end{code}
The equality of the Higgs object has values in π€βΊ, but is equivalent
to an equality with values in π€ and hence in Ξ©.
\begin{code}
_οΌβ_ : β β β β Ξ©
(p , p-is-ws) οΌβ (q , q-is-ws) = p β q
infix 4 _οΌβ_
οΌβ-agrees-with-οΌ : (x y : β) β ((x οΌβ y) holds) β (x οΌ y)
οΌβ-agrees-with-οΌ x@(p , p-is-ws) y@(q , q-is-ws)
= logically-equivalent-props-are-equivalent
(holds-is-prop (x οΌβ y))
β-is-set
(to-β-οΌ' x y)
(Ξ» (e : x οΌ y) β idtofun _ _ (ap (_holds β βͺ_β«) e) ,
idtofun _ _ (ap (_holds β βͺ_β«) (e β»ΒΉ)))
Ξ©-automorphisms-are-β-embeddings : (π : Aut Ξ©)
(p q : Ξ©)
β (p β q) οΌ (β π β p β β π β q)
Ξ©-automorphisms-are-β-embeddings π@(f , f-is-equiv) p q =
Ξ©-ext' pe fe
(((p β q) οΌ β€) ββ¨ I β©
(p οΌ q) ββ¨ II β©
(f p οΌ f q) ββ¨ III β©
((f p β f q) οΌ β€) β )
where
I = β-equiv-to-οΌ pe p q
II = embedding-criterion-converse' f (equivs-are-embeddings' π) p q
III = β-sym (β-equiv-to-οΌ pe (f p) (f q))
eval-at-β€-is-widespread : (π : Aut Ξ©) β is-widespread (eval-at-β€ π)
eval-at-β€-is-widespread π@(f , _) p = II
where
I = p β β€ οΌβ¨ Iβ β©
f p β f β€ οΌβ¨ Iβ β©
(p β f β€) β f β€ β
where
Iβ = Ξ©-automorphisms-are-β-embeddings π p β€
Iβ = ap (_β f β€) (can-recover-automorphism-from-its-value-at-β€ π p)
II : ((p β f β€) β f β€) οΌ p
II = transport (_οΌ p) I (β€-β-neutral pe p)
Aut-Ξ©-to-β : Aut Ξ© β β
Aut-Ξ©-to-β π = eval-at-β€ π , eval-at-β€-is-widespread π
β-to-Aut-Ξ© : β β Aut Ξ©
β-to-Aut-Ξ© (r , i) = (Ξ» p β p β r) , involutions-are-equivs _ i
Ξ·-β : β-to-Aut-Ξ© β Aut-Ξ©-to-β βΌ id
Ξ·-β π@(f , f-is-equiv) = to-β-οΌ fe h
where
h : (Ξ» p β p β f β€) βΌ f
h p = (can-recover-automorphism-from-its-value-at-β€ π p)β»ΒΉ
Ξ΅-β : Aut-Ξ©-to-β β β-to-Aut-Ξ© βΌ id
Ξ΅-β (r , i) = to-β-οΌ (β€ β r) r (β€-β-neutral' pe r)
β-to-Aut-Ξ©-is-equiv : is-equiv β-to-Aut-Ξ©
β-to-Aut-Ξ©-is-equiv = qinvs-are-equivs β-to-Aut-Ξ© (Aut-Ξ©-to-β , Ξ΅-β , Ξ·-β)
Aut-Ξ©-to-β-is-equiv : is-equiv Aut-Ξ©-to-β
Aut-Ξ©-to-β-is-equiv = inverses-are-equivs β-to-Aut-Ξ© β-to-Aut-Ξ©-is-equiv
opaque
β-to-Aut-Ξ©-equivalence : β β Aut Ξ©
β-to-Aut-Ξ©-equivalence = β-to-Aut-Ξ© , β-to-Aut-Ξ©-is-equiv
\end{code}
The type Aut Ξ© is a group under composition, the symmetric group on Ξ©,
where the neutral element is the identity automorphism and the inverse
of any element is itself. That is, Aut Ξ© is a boolean group, or a
group of order 2. We now show that the group structure on β induced by
the above equivalence is given by logical equivalence _β_ with neutral
element β€.
\begin{code}
open import Groups.Type
open import Groups.Symmetric fe
Ξ©β : Group π€βΊ
Ξ©β = symmetric-group Ξ© (Ξ©-is-set fe pe)
opaque
π-construction : Ξ£ s κ Group-structure β , is-hom (β , s) Ξ©β β-to-Aut-Ξ©
π-construction = transport-Group-structure Ξ©β β β-to-Aut-Ξ© β-to-Aut-Ξ©-is-equiv
π : Group π€βΊ
π = β , prβ π-construction
π-to-Ξ©β-isomorphism : π β
Ξ©β
π-to-Ξ©β-isomorphism = β-to-Aut-Ξ© , β-to-Aut-Ξ©-is-equiv , prβ π-construction
π-isomorphism-explicitly : (x : β) (p : Ξ©)
β β β-to-Aut-Ξ© x β p οΌ (p β βͺ x β«)
π-isomorphism-explicitly x p = refl
\end{code}
The unit of π is β€ and its multiplication is logical equivalence.
\begin{code}
opaque
unfolding π-construction
π-unit : βͺ unit π β« οΌ β€
π-unit = refl
π-multiplication : (x y : β) β βͺ x Β·β¨ π β© y β« οΌ (βͺ x β« β βͺ y β«)
π-multiplication x y =
βͺ x Β·β¨ π β© y β« οΌβ¨reflβ©
(β€ β βͺ x β«) β βͺ y β« οΌβ¨ ap (_β βͺ y β«) (β€-β-neutral' pe βͺ x β«) β©
βͺ x β« β βͺ y β« β
corollary-β€ : is-widespread β€
corollary-β€ = βͺ unit π β«-is-widespread
π₯ : β
π₯ = β€ , corollary-β€
corollary-β : (r s : Ξ©)
β is-widespread r
β is-widespread s
β is-widespread (r β s)
corollary-β r s i j = II
where
x y : β
x = (r , i)
y = (s , j)
I : βͺ x Β·β¨ π β© y β« οΌ (r β s)
I = π-multiplication x y
II : is-widespread (r β s)
II = transport is-widespread I βͺ x Β·β¨ π β© y β«-is-widespread
corollary-β-assoc : (r s t : Ξ©)
β is-widespread r
β is-widespread s
β is-widespread t
β (r β s) β t οΌ r β (s β t)
corollary-β-assoc r s t i j k = I
where
_Β·_ : β β β β β
x Β· y = x Β·β¨ π β© y
x y z : β
x = (r , i)
y = (s , j)
z = (t , k)
I = (r β s) β t οΌβ¨reflβ©
(βͺ x β« β βͺ y β«) β βͺ z β« οΌβ¨ ap (_β βͺ z β«) ((π-multiplication _ _)β»ΒΉ) β©
βͺ x Β· y β« β βͺ z β« οΌβ¨ (π-multiplication _ _)β»ΒΉ β©
βͺ (x Β· y) Β· z β« οΌβ¨ ap βͺ_β« (assoc π x y z) β©
βͺ x Β· (y Β· z) β« οΌβ¨ π-multiplication _ _ β©
βͺ x β« β βͺ y Β· z β« οΌβ¨ ap (βͺ x β« β_) (π-multiplication _ _) β©
βͺ x β« β (βͺ y β« β βͺ z β«) οΌβ¨reflβ©
r β (s β t) β
\end{code}
Alternative characterization of the widespread property, as stated in
Johnstone's Elephant.
\begin{code}
open import UF.PropTrunc
module _ (pt : propositional-truncations-exist) where
open PropositionalTruncation pt hiding (_β¨_ ; β¨-elim)
open Disjunction pt
is-widespread' : Ξ© β π€βΊ Μ
is-widespread' r = (p : Ξ©) β (p β¨ (p β r)) holds
widespread'-gives-widespread : (r : Ξ©)
β is-widespread' r
β is-widespread r
widespread'-gives-widespread r w' = w
where
I : (p : Ξ©)
β (p holds + (p holds β r holds))
β ((p β r) β r) οΌ p
I p (inl h) =
(p β r) β r οΌβ¨ ap (Ξ» - β (- β r) β r) Iβ β©
(β€ β r) β r οΌβ¨ ap (_β r) (β€-β-neutral' pe r) β©
r β r οΌβ¨ β-refl pe r β©
β€ οΌβ¨ Iβ β»ΒΉ β©
p β
where
Iβ : p οΌ β€
Iβ = holds-gives-equal-β€ pe fe p h
I p (inr f) = Ξ©-ext pe fe Iβ Iβ
where
have-f : (p β r) holds
have-f = f
Iβ : (p β r) β r οΌ β€ β p οΌ β€
Iβ eβ =
p οΌβ¨ Iβ β©
r οΌβ¨ (β-gives-οΌ pe _ _ eβ)β»ΒΉ β©
p β r οΌβ¨ οΌ-gives-β pe _ _ Iβ β©
β€ β
where
Iβ : r β (p β r) οΌ β€
Iβ = β§-elim-R pe fe _ _ eβ
Iβ : (r β (p β r)) holds
Iβ = equal-β€-gives-holds _ Iβ
g : (r β p) holds
g r-holds = β§-Elim-R (p β r) (r β p) (Iβ r-holds) r-holds
Iβ : p οΌ r
Iβ = Ξ©-extensionality pe fe f g
Iβ : p οΌ β€ β (p β r) β r οΌ β€
Iβ eβ =
(p β r) β r οΌβ¨ ap (Ξ» - β (- β r) β r) eβ β©
(β€ β r) β r οΌβ¨ ap (_β r) (β€-β-neutral' pe r) β©
r β r οΌβ¨ β-refl pe r β©
β€ β
w : is-widespread r
w p = β₯β₯-rec (Ξ©-is-set fe pe) (I p) (w' p)
\end{code}
TODO. Write the above proof purely equationally. In order to do this,
first formulate and prove the equational definition of Heyting algebra
in other modules. Or to begin with, for simplicity, just prove in
UF.Logic that Ξ© satisfies the equations that define a lattice to be a
Heyting algebra.
\begin{code}
widespread-gives-widespread' : (r : Ξ©)
β is-widespread r
β is-widespread' r
widespread-gives-widespread' r@(R , R-is-prop) w = IV
where
have-w : (p : Ξ©) β ((p β r) β r) οΌ p
have-w = w
module _ (p@(P , P-is-prop) : Ξ©) where
P' : π€ Μ
P' = β₯ P + (P β R) β₯
I : ((P' β R) β R) β P'
I = equal-β€-gives-holds _ (οΌ-gives-β pe _ _ (w (P' , β₯β₯-is-prop)))
II : (P' β R) β R
II f = f β£ inr (Ξ» (Ο : P) β f β£ inl Ο β£) β£
III : P'
III = lr-implication I
((Ξ» (e : P' β R) β II (lr-implication e)) ,
(Ξ» (Ο : R) β (Ξ» (_ : P') β Ο) ,
(Ξ» (_ : R) β β£ inr (Ξ» (_ : P) β Ο) β£)))
IV : (p β¨ (p β r)) holds
IV = III
\end{code}