BasicDiscontinuity
Martin Escardo 2012. The following says that a particular kind of discontinuity for functions p : ββ β β is a taboo. Equivalently, it says that the convergence of the constant sequence β to the number β in the type of binary numbers is a taboo. A Brouwerian continuity axiom is that any convergent sequence in the type β of binary numbers must be eventually constant (which we don't postulate).{-# OPTIONS --safe --without-K #-} open import MLTT.Spartan open import UF.FunExt module Taboos.BasicDiscontinuity (fe : funextβ) where open import CoNaturals.Type open import MLTT.Plus-Properties open import MLTT.Two-Properties open import Notation.CanonicalMap open import Taboos.WLPO basic-discontinuity : (ββ β π) β π€β Μ basic-discontinuity p = ((n : β) β p (ΞΉ n) οΌ β) Γ (p β οΌ β) basic-discontinuity-taboo : (p : ββ β π) β basic-discontinuity p β WLPO basic-discontinuity-taboo p (f , r) u = π-equality-cases lemmaβ lemmaβ where factβ : u οΌ β β p u οΌ β factβ t = p u οΌβ¨ ap p t β© p β οΌβ¨ r β© β β factβ : p u β β β u β β factβ = contrapositive factβ factβ : p u οΌ β β u β β factβ = factβ β equal-β-different-from-β lemmaβ : p u οΌ β β (u οΌ β) + (u β β) lemmaβ s = inr (factβ s) factβ : p u οΌ β β ((n : β) β u β ΞΉ n) factβ t n s = zero-is-not-one (β οΌβ¨ (f n)β»ΒΉ β© p (ΞΉ n) οΌβ¨ (ap p s)β»ΒΉ β© p u οΌβ¨ t β© β β) lemmaβ : p u οΌ β β (u οΌ β) + (u β β) lemmaβ t = inl (not-finite-is-β fe (factβ t))The converse also holds. It shows that any proof of WLPO is a discontinuous function, which we use to build a discontinuous function of type ββ β π.WLPO-is-discontinuous : WLPO β Ξ£ p κ (ββ β π), basic-discontinuity p WLPO-is-discontinuous f = p , (d , dβ) where p : ββ β π p u = equality-cases (f u) caseβ caseβ where caseβ : (r : u οΌ β) β f u οΌ inl r β π caseβ r s = β caseβ : (r : u β β) β f u οΌ inr r β π caseβ r s = β d : (n : β) β p (ΞΉ n) οΌ β d n = equality-cases (f (ΞΉ n)) caseβ caseβ where caseβ : (r : ΞΉ n οΌ β) β f (ΞΉ n) οΌ inl r β p (ΞΉ n) οΌ β caseβ r s = π-elim (β-is-not-finite n (r β»ΒΉ)) caseβ : (g : ΞΉ n β β) β f (ΞΉ n) οΌ inr g β p (ΞΉ n) οΌ β caseβ g = ap (Ξ» - β equality-cases - (Ξ» r s β β) (Ξ» r s β β)) dβ : p β οΌ β dβ = equality-cases (f β) caseβ caseβ where caseβ : (r : β οΌ β) β f β οΌ inl r β p β οΌ β caseβ r = ap (Ξ» - β equality-cases - (Ξ» r s β β) (Ξ» r s β β)) caseβ : (g : β β β) β f β οΌ inr g β p β οΌ β caseβ g = π-elim (g refl)If two discrete-valued functions defined on ββ agree, they have to agree at β too, unless WLPO holds:open import NotionsOfDecidability.Decidable open import UF.DiscreteAndSeparated module _ {D : π€ Μ } (d : is-discrete D) where disagreement-taboo' : (p q : ββ β D) β ((n : β) β p (ΞΉ n) οΌ q (ΞΉ n)) β p β β q β β WLPO disagreement-taboo' p q f g = basic-discontinuity-taboo r (r-lemma , r-lemmaβ) where A : ββ β π€ Μ A u = p u οΌ q u Ξ΄ : (u : ββ) β is-decidable (p u οΌ q u) Ξ΄ u = d (p u) (q u) r : ββ β π r = characteristic-map A Ξ΄ r-lemma : (n : β) β r (ΞΉ n) οΌ β r-lemma n = characteristic-map-propertyβ-back A Ξ΄ (ΞΉ n) (f n) r-lemmaβ : r β οΌ β r-lemmaβ = characteristic-map-propertyβ-back A Ξ΄ β (Ξ» a β g a) agreement-cotaboo' : Β¬ WLPO β (p q : ββ β D) β ((n : β) β p (ΞΉ n) οΌ q (ΞΉ n)) β p β οΌ q β agreement-cotaboo' Ο p q f = discrete-is-¬¬-separated d (p β) (q β) (contrapositive (disagreement-taboo' p q f) Ο) disagreement-taboo : (p q : ββ β π) β ((n : β) β p (ΞΉ n) οΌ q (ΞΉ n)) β p β β q β β WLPO disagreement-taboo = disagreement-taboo' π-is-discrete agreement-cotaboo : Β¬ WLPO β (p q : ββ β π) β ((n : β) β p (ΞΉ n) οΌ q (ΞΉ n)) β p β οΌ q β agreement-cotaboo = agreement-cotaboo' π-is-discreteAdded 23rd August 2023. Variation.basic-discontinuity' : (ββ β ββ) β π€β Μ basic-discontinuity' f = ((n : β) β f (ΞΉ n) οΌ ΞΉ 0) Γ (f β οΌ ΞΉ 1) basic-discontinuity-taboo' : (f : ββ β ββ) β basic-discontinuity' f β WLPO basic-discontinuity-taboo' f (fβ , fβ) = VI where I : (u : ββ) β f u οΌ ΞΉ 0 β u β β I u p q = Zero-not-Succ (ΞΉ 0 οΌβ¨ p β»ΒΉ β© f u οΌβ¨ ap f q β© f β οΌβ¨ fβ β© ΞΉ 1 β) II : (u : ββ) β f u β ΞΉ 0 β u οΌ β II u Ξ½ = not-finite-is-β fe III where III : (n : β) β u β ΞΉ n III n refl = V IV where IV : f (ΞΉ n) οΌ ΞΉ 0 IV = fβ n V : f (ΞΉ n) β ΞΉ 0 V = Ξ½ VI : WLPO VI u = Cases (finite-isolated fe 0 (f u)) (Ξ» (p : ΞΉ 0 οΌ f u) β inr (I u (p β»ΒΉ))) (Ξ» (Ξ½ : ΞΉ 0 β f u) β inl (II u (β -sym Ξ½))) WLPO-is-discontinuous' : WLPO β Ξ£ p κ (ββ β ββ), basic-discontinuity' p WLPO-is-discontinuous' wlpo = II where inc : π β β inc = π-cases 0 1 I : Ξ£ g κ (ββ β π) , ((n : β) β g (ΞΉ n) οΌ β) Γ (g β οΌ β) I = WLPO-is-discontinuous wlpo q = prβ I qβ = prβ (prβ I) qβ = prβ (prβ I) p : ββ β ββ p = ΞΉ β inc β q pβ : (n : β) β p (ΞΉ n) οΌ ΞΉ 0 pβ n = ΞΉ (inc (q (ΞΉ n))) οΌβ¨ ap (ΞΉ β inc) (qβ n) β© ΞΉ (inc β) οΌβ¨ refl β© ΞΉ 0 β pβ : p β οΌ ΞΉ 1 pβ = ΞΉ (inc (q β)) οΌβ¨ ap (ΞΉ β inc) qβ β© ΞΉ (inc β) οΌβ¨ refl β© ΞΉ 1 β II : Ξ£ p κ (ββ β ββ) , ((n : β) β p (ΞΉ n) οΌ ΞΉ 0) Γ (p β οΌ ΞΉ 1) II = p , pβ , pβAdded 13th November 2023.open import Notation.Order ββ-linearity-taboo : ((u v : ββ) β (u βΌ v) + (v βΌ u)) β WLPO ββ-linearity-taboo Ξ΄ = III where g : (u v : ββ) β (u βΌ v) + (v βΌ u) β π g u v (inl _) = β g u v (inr _) = β f : ββ β ββ β π f u v = g u v (Ξ΄ u v) Iβ : (n : β) β f (ΞΉ n) β οΌ β Iβ n = a (Ξ΄ (ΞΉ n) β) where a : (d : (ΞΉ n βΌ β) + (β βΌ ΞΉ n)) β g (ΞΉ n) β d οΌ β a (inl _) = refl a (inr β) = π-elim (βΌ-gives-not-βΊ β (ΞΉ n) β (β-βΊ-largest n)) Iβ : (n : β) β f β (ΞΉ n) οΌ β Iβ n = b (Ξ΄ β (ΞΉ n)) where b : (d : (β βΌ ΞΉ n) + (ΞΉ n βΌ β)) β g β (ΞΉ n) d οΌ β b (inl β) = π-elim (βΌ-gives-not-βΊ β (ΞΉ n) β (β-βΊ-largest n)) b (inr _) = refl II : (b : π) β f β β οΌ b β WLPO II β e = basic-discontinuity-taboo p IIβ where p : ββ β π p x = complement (f β x) IIβ : ((n : β) β p (ΞΉ n) οΌ β) Γ (p β οΌ β) IIβ = (Ξ» n β p (ΞΉ n) οΌβ¨reflβ© complement (f β (ΞΉ n)) οΌβ¨ ap complement (Iβ n) β© complement β οΌβ¨reflβ© β β) , (p β οΌβ¨reflβ© complement (f β β) οΌβ¨ ap complement e β© complement β οΌβ¨reflβ© β β) II β e = basic-discontinuity-taboo p IIβ where p : ββ β π p x = f x β IIβ : ((n : β) β p (ΞΉ n) οΌ β) Γ (p β οΌ β) IIβ = Iβ , e III : WLPO III = II (f β β) refl