Unsafe.CantorCompact
Martin Escardo 2011. The Cantor space is the type (β β π). We show it is compact, under the assumptions discussed in CountableTychonoff. This module is a set of corollaries of the module CountableTychonoff and other modules.{-# OPTIONS --without-K #-} open import UF.FunExt module Unsafe.CantorCompact (fe : FunExt) where open import MLTT.Spartan open import MLTT.Two-Properties open import TypeTopology.CompactTypes open import Unsafe.CountableTychonoff fe cantor-compactβ : is-compactβ (β β π) cantor-compactβ = countable-Tychonoff (Ξ» i β π-is-compactβ) cantor-compact : is-compact (β β π) cantor-compact = compactβ-types-are-compact cantor-compactβ cantor-wcompact : is-wcompact (β β π) cantor-wcompact = compact-gives-wcompact cantor-compactβThe characteristic function of the universal quantifier of the Cantor space:A : ((β β π) β π) β π A = prβ (wcompact-types-are-wcompact' cantor-wcompact)Discreteness of ((β β π) β β):open import UF.DiscreteAndSeparated Cantorββ-is-discrete : is-discrete ((β β π) β β) Cantorββ-is-discrete = discrete-to-power-compact-is-discrete' (fe π€β π€β) cantor-compact β-is-discreteThe characteristic function of equality on ((β β π) β β):open import NotionsOfDecidability.Complemented equal : ((β β π) β β) β ((β β π) β β) β π equal f = prβ (characteristic-function (Cantorββ-is-discrete f))Experiments: Evaluate the following to normal form (give β, β, β, β quickly):number : π β β number β = 0 number β = 1 test0 : π test0 = A (Ξ» Ξ± β minπ (Ξ± 17) (Ξ± 180)) test1 : π test1 = A (Ξ» Ξ± β β) test2 : π test2 = equal (Ξ» Ξ± β number (Ξ± 17)) (Ξ» Ξ± β number (Ξ± 100)) test3 : π test3 = equal (Ξ» Ξ± β number (Ξ± 100)) (Ξ» Ξ± β number (Ξ± 100)) test4 : π test4 = equal (Ξ» Ξ± β number (Ξ± 1000)) (Ξ» Ξ± β number (Ξ± 1000)) test5 : π test5 = equal (Ξ» Ξ± β number (Ξ± 1001)) (Ξ» Ξ± β number (Ξ± 1000))