Tom de Jong
Reboot: 22 January 2021
Earlier version: 18 September 2020
We show that the type of integers enjoys the symmetric induction principle, as
used in constructing the circle as the type of โค-torsors. The symmetric
induction principle appears as Theorem 3.13 in "Construction of the circle in
UniMath" by Bezem, Buchholtz, Grayson and Shulman
(doi:10.1016/j.jpaa.2021.106687).
\begin{code}
{-# OPTIONS --safe --without-K #-}
open import Naturals.UniversalProperty
open import SyntheticHomotopyTheory.Circle.Integers
open import SyntheticHomotopyTheory.Circle.Integers-Properties
open import MLTT.Spartan
open import UF.Embeddings
open import UF.Equiv
open import UF.EquivalenceExamples
open import UF.FunExt
open import UF.Subsingletons
module SyntheticHomotopyTheory.Circle.Integers-SymmetricInduction where
โค-symmetric-induction : {๐ค : Universe}
โ funext ๐คโ ๐ค
โ (A : โค โ ๐ค ฬ )
(f : (z : โค) โ A z โ A (succ-โค z))
โ (ฮฃ h ๊ ฮ A , ((z : โค) โ h (succ-โค z) ๏ผ โ f z โ (h z)))
โ A ๐
โค-symmetric-induction {๐ค} fe A f =
(ฮฃ h ๊ ฮ A , Qโ h) โโจ I โฉ
(ฮฃ h ๊ (ฮ (A โ โ๐โ) ร ฮ (A โ inr)) , Qโ (gโ h)) โโจ II โฉ
(ฮฃ hโ ๊ ฮ (A โ โ๐โ) , ฮฃ hแตฃ ๊ ฮ (A โ inr) , Qโ (gโ (hโ , hแตฃ))) โโจ III โฉ
(ฮฃ hโ ๊ ฮ (A โ โ๐โ) , ฮฃ hแตฃ ๊ (ฮ (A โ pos) ร ฮ (A โ neg)),
Qโ hโ (gโ hแตฃ)) โโจ IV โฉ
(ฮฃ hโ ๊ ฮ (A โ โ๐โ) , ฮฃ hโ ๊ ฮ (A โ pos) ,
ฮฃ hโ ๊ ฮ (A โ neg) , Qโ hโ (gโ (hโ , hโ))) โโจ V โฉ
(ฮฃ hโ ๊ ฮ (A โ โ๐โ) , ฮฃ hโ ๊ ฮ (A โ pos) ,
ฮฃ hโ ๊ ฮ (A โ neg) , Qโ (hโ โ) hโ
ร Qโ' (hโ โ) hโ) โโจ VI โฉ
(ฮฃ hโ ๊ ฮ (A โ โ๐โ) , ((ฮฃ hโ ๊ ฮ (A โ pos) , Qโ (hโ โ) hโ)
ร (ฮฃ hโ ๊ ฮ (A โ neg) , Qโ' (hโ โ) hโ))) โโจ VII โฉ
(ฮฃ hโ ๊ ฮ (A โ โ๐โ) , ๐ ร (ฮฃ hโ ๊ ฮ (A โ neg) , Qโ' (hโ โ) hโ)) โโจ VIII โฉ
(ฮฃ hโ ๊ ฮ (A โ โ๐โ) , ฮฃ hโ ๊ ฮ (A โ neg) , Qโ' (hโ โ) hโ) โโจ IX โฉ
(ฮฃ hโ ๊ ฮ (A โ โ๐โ) , ฮฃ hโ ๊ ฮ (A โ neg) , Qโ (hโ โ) hโ) โโจ X โฉ
(ฮฃ hโ ๊ ฮ (A โ โ๐โ) , ๐) โโจ XI โฉ
ฮ (A โ โ๐โ) โโจ XII โฉ
A ๐ โ
where
โ๐โ : ๐ {๐คโ} โ โค
โ๐โ _ = ๐
Qโ : ฮ A โ ๐ค ฬ
Qโ h = (z : โค) โ h (succ-โค z) ๏ผ โ f z โ (h z)
gโ : ฮ (A โ โ๐โ) ร ฮ (A โ inr) โ ฮ A
gโ = โ ฮ ร+ fe โ
Qโ : ฮ (A โ โ๐โ) โ ฮ (A โ inr) โ ๐ค ฬ
Qโ hโ hแตฃ = Qโ (gโ (hโ , hแตฃ))
gโ : ฮ (A โ pos) ร ฮ (A โ neg) โ ฮ (A โ inr)
gโ = โ ฮ ร+ fe โ
Qโ : A ๐ โ ฮ (A โ pos) โ ๐ค ฬ
Qโ aโ hโ = (hโ 0 ๏ผ โ f ๐ โ aโ)
ร ((n : โ) โ hโ (succ n) ๏ผ โ f (pos n) โ (hโ n))
Qโ' : A ๐ โ ฮ (A โ neg) โ ๐ค ฬ
Qโ' aโ hโ = (aโ ๏ผ โ f (neg 0) โ (hโ 0))
ร ((n : โ) โ hโ n ๏ผ โ f (neg (succ n)) โ (hโ (succ n)))
Qโ : A ๐ โ ฮ (A โ neg) โ ๐ค ฬ
Qโ aโ hโ = (hโ 0 ๏ผ โ (f (neg 0)) โโปยน aโ)
ร ((n : โ) โ hโ (succ n) ๏ผ โ (f (neg (succ n))) โโปยน (hโ n))
I = โ-sym (ฮฃ-change-of-variable Qโ gโ (โโ-is-equiv (ฮ ร+ fe)))
II = ฮฃ-assoc
III = ฮฃ-cong
(ฮป hโ โ โ-sym (ฮฃ-change-of-variable (Qโ hโ) gโ (โโ-is-equiv (ฮ ร+ fe))))
IV = ฮฃ-cong (ฮป _ โ ฮฃ-assoc)
V = ฮฃ-cong ฮป hโ โ ฮฃ-cong (ฮป hโ โ ฮฃ-cong (ฮป hโ โ ฮณ hโ hโ hโ))
where
ฮณ : (hโ : ฮ (A โ โ๐โ)) (hโ : ฮ (A โ pos)) (hโ : ฮ (A โ neg))
โ Qโ hโ (gโ (hโ , hโ)) โ Qโ (hโ โ) hโ ร Qโ' (hโ โ) hโ
ฮณ hโ hโ hโ = qinveq ฯ (ฯ , ฮท , ฮต)
where
ฯ : Qโ hโ (gโ (hโ , hโ)) โ Qโ (hโ โ) hโ ร Qโ' (hโ โ) hโ
ฯ q = ((q ๐ , q โ pos) , (q (neg 0) , q โ neg โ succ))
ฯ : (Qโ (hโ โ) hโ ร Qโ' (hโ โ) hโ) โ Qโ hโ (gโ (hโ , hโ))
ฯ ((qโ , qโ) , (qโ' , qโ')) = c
where
c : Qโ hโ (gโ (hโ , hโ))
c ๐ = qโ
c (pos n) = qโ n
c (neg zero) = qโ'
c (neg (succ n)) = qโ' n
ฮต : ฯ โ ฯ โผ id
ฮต q = refl
ฮท : ฯ โ ฯ โผ id
ฮท q = dfunext fe c
where
c : (z : โค) โ (ฯ (ฯ q)) z ๏ผ q (z)
c ๐ = refl
c (pos n) = refl
c (neg zero) = refl
c (neg (succ n)) = refl
VI = ฮฃ-cong ฮณ
where
ฮณ : (hโ : ฮ (A โ โ๐โ))
โ (ฮฃ hโ ๊ ฮ (A โ pos) , ฮฃ hโ ๊ ฮ (A โ neg) , Qโ (hโ โ) hโ ร Qโ' (hโ โ) hโ)
โ ( (ฮฃ hโ ๊ ฮ (A โ pos) , Qโ (hโ โ) hโ)
ร (ฮฃ hโ ๊ ฮ (A โ neg) , Qโ' (hโ โ) hโ))
ฮณ hโ = ฮฃ-interchange
VII = ฮฃ-cong (ฮป hโ โ ร-cong (singleton-โ-๐ {๐ค} {๐คโ} (ฮณ hโ)) (โ-refl _))
where
ฮณ : (hโ : ฮ (A โ โ๐โ))
โ is-singleton ((ฮฃ hโ ๊ ฮ (A โ pos) , Qโ (hโ โ) hโ))
ฮณ hโ = (โ-is-nno-dep fe (A โ pos) aโ s)
where
aโ : A (pos 0)
aโ = โ (f ๐) โ (hโ โ)
s : (n : โ) โ A (pos n) โ A (pos (succ n))
s n = โ f (pos n) โ
VIII = ฮฃ-cong (ฮป hโ โ ๐-lneutral)
IX = ฮฃ-cong (ฮป hโ โ ฮฃ-cong (ฮป hโ โ ฮณ hโ hโ))
where
ฮณ : (hโ : ฮ (A โ โ๐โ)) (hโ : ฮ (A โ neg))
โ Qโ' (hโ โ) hโ โ Qโ (hโ โ) hโ
ฮณ hโ hโ = ร-cong ฮณโ (ฮ -cong fe fe ฮณโ)
where
fโ = โ f (neg 0) โ
fโโปยน = โ (f (neg 0)) โโปยน
eโ : is-equiv fโ
eโ = โโ-is-equiv (f (neg 0))
ฮณโ : (hโ โ ๏ผ fโ (hโ 0))
โ (hโ 0 ๏ผ fโโปยน (hโ โ))
ฮณโ = (hโ โ ๏ผ fโ (hโ 0)) โโจ Iโ โฉ
(fโ (hโ 0) ๏ผ hโ โ) โโจ IIโ โฉ
(fโ (hโ 0) ๏ผ fโ (fโโปยน (hโ โ))) โโจ IIIโ โฉ
(hโ 0 ๏ผ fโโปยน (hโ โ)) โ
where
Iโ = ๏ผ-flip
IIโ = ๏ผ-cong-r (fโ (hโ 0)) (hโ โ)
((inverses-are-sections fโ eโ (hโ โ)) โปยน)
IIIโ = embedding-criterion-converse fโ
(equivs-are-embeddings fโ eโ)
(hโ 0) (fโโปยน (hโ โ))
fโ : (n : โ) โ A (neg (succ n)) โ A (neg n)
fโ n = โ f (neg (succ n)) โ
eโ : (n : โ) โ is-equiv (fโ n)
eโ n = โโ-is-equiv (f (neg (succ n)))
fโโปยน : (n : โ) โ A (neg n) โ A (neg (succ n))
fโโปยน n = โ (f (neg (succ n))) โโปยน
ฮณโ : (n : โ)
โ (hโ n ๏ผ fโ n (hโ (succ n)))
โ (hโ (succ n) ๏ผ fโโปยน n (hโ n))
ฮณโ n = (hโ n ๏ผ fโ n (hโ (succ n))) โโจ Iโ โฉ
(fโ n (hโ (succ n)) ๏ผ hโ n) โโจ IIโ โฉ
(fโ n (hโ (succ n)) ๏ผ fโ n (fโโปยน n (hโ n))) โโจ IIIโ โฉ
(hโ (succ n) ๏ผ fโโปยน n (hโ n)) โ
where
Iโ = ๏ผ-flip
IIโ = ๏ผ-cong-r (fโ n (hโ (succ n))) (hโ n)
((inverses-are-sections (fโ n) (eโ n) (hโ n)) โปยน)
IIIโ = embedding-criterion-converse (fโ n)
(equivs-are-embeddings (fโ n) (eโ n))
(hโ (succ n)) (fโโปยน n (hโ n))
X = ฮฃ-cong (ฮป hโ โ singleton-โ-๐ {๐ค} {๐คโ} (ฮณ hโ))
where
ฮณ : (hโ : ฮ (A โ โ๐โ))
โ is-singleton ((ฮฃ hโ ๊ ฮ (A โ neg) , Qโ (hโ โ) hโ))
ฮณ hโ = (โ-is-nno-dep fe (A โ neg) aโ s)
where
aโ : A (neg 0)
aโ = โ (f (neg 0)) โโปยน (hโ โ)
s : (n : โ) โ A (neg n) โ A (neg (succ n))
s n = โ (f (neg (succ n))) โโปยน
XI = ๐-rneutral
XII = โ-sym (๐โ fe)
\end{code}