diff --git a/README.md b/README.md index 756e277ca..acc702848 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,7 @@ Please add yourself the first time you contribute. * Lane Biocini * Marc Bezem * Martin Escardo +* Martin Trucchi * Nicolai Kraus * Ohad Kammar * Paul Levy (i) diff --git a/source/SyntheticTopology/Compactness.lagda b/source/SyntheticTopology/Compactness.lagda new file mode 100644 index 000000000..cea7741da --- /dev/null +++ b/source/SyntheticTopology/Compactness.lagda @@ -0,0 +1,183 @@ +--- +title: Compactness in Synthetic Topology +author: Martin Trucchi +date-started: 2024-05-28 +--- + +\begin{code} + +{-# OPTIONS --safe --without-K #-} + +open import MLTT.Spartan +open import SyntheticTopology.SierpinskiObject +open import UF.Base +open import UF.DiscreteAndSeparated +open import UF.FunExt +open import UF.Powerset +open import UF.PropTrunc +open import UF.Sets +open import UF.Sets-Properties +open import UF.Subsingletons +open import UF.Subsingletons-Properties +open import UF.SubtypeClassifier + +module SyntheticTopology.Compactness + (𝓀 π“₯ : Universe) + (fe : Fun-Ext) + (pe : Prop-Ext) + (pt : propositional-truncations-exist) + (π•Š : Generalized-Sierpinski-Object fe pe pt 𝓀 π“₯) + where + +open import UF.ImageAndSurjection pt +open import UF.Logic +open import SyntheticTopology.SetCombinators 𝓀 fe pe pt + +open AllCombinators pt fe +open PropositionalTruncation pt hiding (_∨_) +open Sierpinski-notations fe pe pt π•Š + +\end{code} + +We here start to investigate a notion of compactness defined in [1] and [2]. + +A type `X` is called `compact` if its universal quantification on +`intrinsically-open` predicates is an open proposition. + +\begin{code} + +module _ (𝒳 : hSet 𝓀) where + private + X = underlying-set 𝒳 + + is-compact : Ξ© (𝓀 ⁺ βŠ” π“₯) + is-compact = + β±― (P , open-P) κž‰ π“ž 𝒳 , is-open-proposition (β±― x κž‰ X , x βˆˆβ‚š P) + +\end{code} + +The type `πŸ™` is compact i.e. the empty product is compact, regardless of the +Sierpinski Object. + +\begin{code} + +πŸ™-is-compact : is-compact πŸ™β‚› holds +πŸ™-is-compact (P , open-P) = + ⇔-open (⋆ βˆˆβ‚š P) (β±― x κž‰ πŸ™ , x βˆˆβ‚š P) eq (open-P ⋆) + where + eq : (⋆ βˆˆβ‚š P ⇔ (β±― x κž‰ πŸ™ , x βˆˆβ‚š P)) holds + eq = (Ξ» pstar x β†’ pstar) , (Ξ» f β†’ f ⋆) + +\end{code} + +Binary products of compact types are compact. + +\begin{code} + +module _ (𝒳 𝒴 : hSet 𝓀) where + private + X = underlying-set 𝒳 + Y = underlying-set 𝒴 + + Γ—-is-compact : is-compact 𝒳 holds + β†’ is-compact 𝒴 holds + β†’ is-compact (𝒳 Γ—β‚› 𝒴) holds + + Γ—-is-compact compact-X compact-Y (P , open-P) = + ⇔-open chained-forall + tuple-forall + (p₁ , pβ‚‚) + † + where + tuple-forall : Ξ© 𝓀 + tuple-forall = β±― z κž‰ (X Γ— Y) , z βˆˆβ‚š P + + chained-forall : Ξ© 𝓀 + chained-forall = β±― x κž‰ X , (β±― y κž‰ Y , (x , y) βˆˆβ‚š P) + + p₁ : (chained-forall β‡’ tuple-forall) holds + p₁ = Ξ» Qxy z β†’ Qxy (pr₁ z) (prβ‚‚ z) + + pβ‚‚ : (tuple-forall β‡’ chained-forall) holds + pβ‚‚ = Ξ» Qz x' y' β†’ Qz (x' , y') + + prop-y : π“Ÿ X + prop-y x = β±― y κž‰ Y , (x , y) βˆˆβ‚š P + + prop-y-open : (x : X) β†’ is-open-proposition (prop-y x) holds + prop-y-open x = compact-Y ((Ξ» y β†’ (x , y) βˆˆβ‚š P) , Ξ» y β†’ open-P (x , y)) + + † : is-open-proposition chained-forall holds + † = compact-X (prop-y , prop-y-open) + +\end{code} + +Images of compact types by surjective functions are compact. + +\begin{code} + + image-of-compact : (f : X β†’ Y) + β†’ is-surjection f + β†’ is-compact 𝒳 holds + β†’ is-compact 𝒴 holds + image-of-compact f sf compact-X (P , open-P) = + ⇔-open pre-image-forall image-forall (p₁ , pβ‚‚) † + where + pre-image-forall : Ξ© 𝓀 + pre-image-forall = β±― x κž‰ X , (f x) βˆˆβ‚š P + + image-forall : Ξ© 𝓀 + image-forall = β±― y κž‰ Y , y βˆˆβ‚š P + + p₁ : (pre-image-forall β‡’ image-forall) holds + p₁ pX y = surjection-induction f + sf + (_holds ∘ P) + (Ξ» y β†’ holds-is-prop (P y)) + pX + y + + pβ‚‚ : (image-forall β‡’ pre-image-forall) holds + pβ‚‚ pY x = pY (f x) + + † : is-open-proposition pre-image-forall holds + † = compact-X (P ∘ f , open-P ∘ f) + +\end{code} + +This also works for any function, in which case we prove that `image f` is +compact. + +We have to get out of the module defining `𝒳` and `𝒴` in order to apply the +previous lemma. + +\begin{code} + +image-of-compact' : ((X , sX) : hSet 𝓀) + β†’ ((Y , sY) : hSet 𝓀) + β†’ (f : X β†’ Y) + β†’ is-compact (X , sX) holds + β†’ is-compact (imageβ‚› (X , sX) (Y , sY) f) holds + +image-of-compact' (X , sX) (Y , sY) f compact-X = + image-of-compact (X , sX) + (imageβ‚› (X , sX) (Y , sY) f) + (corestriction f) + (corestrictions-are-surjections f) + compact-X + +\end{code} + +\section{References} + +- [1]: Davorin Lesňik. *Synthetic Topology and Constructive Metric Spaces*. + + PhD Thesis, 2010 + + https://doi.org/10.48550/arXiv.2104.10399 + +- [2]: MartΓ­n EscardΓ³. *Topology via higher-order intuitionistic logic* + + Unpublished notes, Pittsburgh, 2004 + + https://www.cs.bham.ac.uk/~mhe/papers/pittsburgh.pdf diff --git a/source/SyntheticTopology/Density.lagda b/source/SyntheticTopology/Density.lagda new file mode 100644 index 000000000..b6316a1de --- /dev/null +++ b/source/SyntheticTopology/Density.lagda @@ -0,0 +1,84 @@ +--- +title: Density in Synthetic Topology +author: Martin Trucchi +date-started : 2024-05-28 +--- + +\begin{code} + +{-# OPTIONS --safe --without-K #-} + +open import MLTT.Spartan +open import UF.Base +open import UF.FunExt +open import UF.Powerset +open import UF.PropTrunc +open import UF.Sets +open import UF.Sets-Properties +open import UF.Subsingletons +open import UF.SubtypeClassifier +open import SyntheticTopology.SierpinskiObject + +module SyntheticTopology.Density + (𝓀 π“₯ : Universe) + (fe : Fun-Ext) + (pe : Prop-Ext) + (pt : propositional-truncations-exist) + (π•Š : Generalized-Sierpinski-Object fe pe pt 𝓀 π“₯) + (𝒳 : hSet 𝓀) + where + +open import SyntheticTopology.Compactness 𝓀 π“₯ fe pe pt π•Š +open import SyntheticTopology.Overtness 𝓀 π“₯ fe pe pt π•Š +open import SyntheticTopology.SubObjects 𝓀 π“₯ fe pe pt π•Š +open import UF.ImageAndSurjection pt +open import UF.Logic + +open AllCombinators pt fe +open PropositionalTruncation pt hiding (_∨_) +open Sierpinski-notations fe pe pt π•Š + +\end{code} + +Density in synthetic topology. The definition comes from [1]. + +A subset `D` of a set `X` is dense if `D` intersects every inhabited open +subset of `X`. + +The whole module is parametrized by a set `𝒳`. + +`is-dense 𝒳 D` should be read "D is dense in X". + +\begin{code} +private + X = underlying-set 𝒳 + +is-dense : (D : π“Ÿ X) β†’ Ξ© (𝓀 ⁺ βŠ” π“₯) +is-dense D = + β±― (U , open-U) κž‰ π“ž 𝒳 , + (ΖŽβ‚š x κž‰ X , x βˆˆβ‚š U) β‡’ + (ΖŽβ‚š x κž‰ X , (x βˆˆβ‚š (D ∩ U))) + +\end{code} + +We now prove two lemmas, stating respectively that a set is dense in itself +and that a set containing a subovert dense subset is itself overt. + +\begin{code} + +self-is-dense-in-self : is-dense full holds +self-is-dense-in-self (P , open-P) inhabited-P = + βˆ₯βˆ₯-rec (holds-is-prop (ΖŽβ‚š x' κž‰ X , (x' βˆˆβ‚š (full ∩ P)))) † inhabited-P + where + † : Ξ£ x κž‰ X , x βˆˆβ‚š P holds β†’ (ΖŽβ‚š x' κž‰ X , (x' βˆˆβ‚š (full ∩ P))) holds + † (x , Px) = ∣ x , ⊀-holds , Px ∣ + +\end{code} + +\section{References} + +- [1]: Davorin Lesňik. *Synthetic Topology and Constructive Metric Spaces*. + + PhD Thesis, 2010 + + https://doi.org/10.48550/arXiv.2104.10399 diff --git a/source/SyntheticTopology/Discreteness.lagda b/source/SyntheticTopology/Discreteness.lagda new file mode 100644 index 000000000..624911f8b --- /dev/null +++ b/source/SyntheticTopology/Discreteness.lagda @@ -0,0 +1,134 @@ +--- +title: Discreteness in Synthetic Topology +author: Martin Trucchi +date-started: 2024-05-28 +dates-modified: [2024-06-07] +--- + +We here implement the notion of discreteness in Synthetic Topology defined +in [1] and [2], and then prove two lemmas. + +\begin{code} + +{-# OPTIONS --safe --without-K #-} + +open import MLTT.Spartan +open import UF.Base +open import UF.FunExt +open import UF.PropTrunc +open import UF.Powerset +open import UF.Sets +open import UF.Sets-Properties +open import UF.Subsingletons +open import UF.SubtypeClassifier +open import SyntheticTopology.SierpinskiObject + +module SyntheticTopology.Discreteness + (𝓀 π“₯ : Universe) + (fe : Fun-Ext) + (pe : Prop-Ext) + (pt : propositional-truncations-exist) + (π•Š : Generalized-Sierpinski-Object fe pe pt 𝓀 π“₯) + where + +open import SyntheticTopology.Compactness 𝓀 π“₯ fe pe pt π•Š +open import SyntheticTopology.SetCombinators 𝓀 fe pe pt +open import SyntheticTopology.SierpinskiAxioms 𝓀 π“₯ fe pe pt π•Š +open import UF.ImageAndSurjection pt +open import UF.Logic + +open AllCombinators pt fe +open PropositionalTruncation pt hiding (_∨_) +open Sierpinski-notations fe pe pt π•Š + +\end{code} + +Discrete sets. + +A set `𝒳` is `discrete` if its equality map `Ξ» (x , y) β†’ x = y` is +`intrinsically-open` in the product set `𝒳 Γ— 𝒳`. + +\begin{code} + +module _ (𝒳 : hSet 𝓀) where + private + X = underlying-set 𝒳 + set-X = prβ‚‚ 𝒳 + open Equality set-X + + is-discrete : Ξ© (𝓀 βŠ” π“₯) + is-discrete = is-intrinsically-open (𝒳 Γ—β‚› 𝒳) (Ξ» (x , y) β†’ x οΌβ‚š y) + +\end{code} + +We prove here that `πŸ™` is discrete as long as the true truth value lies in the +Sierpinski object's image. + +\begin{code} + +πŸ™-is-discrete : contains-top holds + β†’ is-discrete πŸ™β‚› holds + +πŸ™-is-discrete ct (⋆ , ⋆) = + ⇔-open ⊀ (⋆ οΌβ‚š ⋆) (p₁ , pβ‚‚) ct + where + open Equality πŸ™β‚›-is-set + + p₁ : (⊀ β‡’ (⋆ οΌβ‚š ⋆)) holds + p₁ = Ξ» _ β†’ refl + + pβ‚‚ : ((⋆ οΌβ‚š ⋆) β‡’ ⊀) holds + pβ‚‚ = Ξ» _ β†’ ⊀-holds + +\end{code} + +Compact indexed product of discrete set is itself discrete. + +\begin{code} + +module _ (𝒳 : hSet 𝓀) where + private + X = underlying-set 𝒳 + + compact-Ξ -discrete : (Y : X β†’ hSet 𝓀) + β†’ is-compact 𝒳 holds + β†’ ((x : X) β†’ is-discrete (Y x) holds) + β†’ is-discrete (Ξ β‚› 𝒳 Y) holds + compact-Ξ -discrete Y compact-X discrete-Y (y₁ , yβ‚‚) = + ⇔-open extensional-eq global-eq (p₁ , pβ‚‚) † + where + open Equality (prβ‚‚ (Ξ β‚› 𝒳 Y)) + + extensional-eq : Ξ© 𝓀 + extensional-eq = β±― x κž‰ X , ((y₁ x = yβ‚‚ x) , prβ‚‚ (Y x)) + + global-eq : Ξ© 𝓀 + global-eq = y₁ οΌβ‚š yβ‚‚ + + p₁ : (extensional-eq β‡’ global-eq) holds + p₁ = dfunext fe + + pβ‚‚ : (global-eq β‡’ extensional-eq) holds + pβ‚‚ y₁-eq-yβ‚‚ = transport (Ξ» - β†’ (x : X) β†’ ((y₁ x) = ( - x))) + y₁-eq-yβ‚‚ + Ξ» _ β†’ refl + + † : is-open-proposition extensional-eq holds + † = compact-X ((Ξ» x β†’ (y₁ x = yβ‚‚ x) , prβ‚‚ (Y x)) , + Ξ» x β†’ discrete-Y x (y₁ x , yβ‚‚ x)) + +\end{code} + +\section{References} + +- [1]: Davorin Lesňik. *Synthetic Topology and Constructive Metric Spaces*. + + PhD Thesis, 2010 + + https://doi.org/10.48550/arXiv.2104.10399 + +- [2]: MartΓ­n EscardΓ³. *Topology via higher-order intuitionistic logic* + + Unpublished notes, Pittsburgh, 2004 + + https://www.cs.bham.ac.uk/~mhe/papers/pittsburgh.pdf diff --git a/source/SyntheticTopology/Overtness.lagda b/source/SyntheticTopology/Overtness.lagda new file mode 100644 index 000000000..f5702f95c --- /dev/null +++ b/source/SyntheticTopology/Overtness.lagda @@ -0,0 +1,201 @@ +--- +title: Overtness in Synthetic Topology +author: Martin Trucchi +date-started: 2024-05-28 +dates-modified: [2024-06-06] +--- + +We implement here the notion of overtness in Synthetic Topology defined here : +[1] and [2]. We then foramlize some lemmas. + +\begin{code} + +{-# OPTIONS --safe --without-K #-} + +open import MLTT.Spartan +open import SyntheticTopology.SierpinskiObject +open import UF.FunExt +open import UF.Logic +open import UF.Powerset +open import UF.PropTrunc +open import UF.Sets +open import UF.Subsingletons +open import UF.SubtypeClassifier + +module SyntheticTopology.Overtness + (𝓀 π“₯ : Universe) + (fe : Fun-Ext) + (pe : Prop-Ext) + (pt : propositional-truncations-exist) + (π•Š : Generalized-Sierpinski-Object fe pe pt 𝓀 π“₯) + where + +open import SyntheticTopology.SetCombinators 𝓀 fe pe pt +open import UF.ImageAndSurjection pt + +open AllCombinators pt fe +open PropositionalTruncation pt hiding (_∨_) +open Sierpinski-notations fe pe pt π•Š + +\end{code} + +Overtness + +Overtness is a dual notion of compactness. +A set is `overt` if the proposition `βˆƒ x , x βˆˆβ‚š P` is `open` whenever `P` is +`open`. + +\begin{code} + +module _ (𝒳 : hSet 𝓀) where + private + X = underlying-set 𝒳 + + is-overt : Ξ© (𝓀 ⁺ βŠ” π“₯) + is-overt = β±― (P , open-P) κž‰ π“ž 𝒳 , is-open-proposition (ΖŽβ‚š x κž‰ X , x βˆˆβ‚š P) + +\end{code} + +The type `πŸ™` is always overt, regardless of the Sierpinski object. + +\begin{code} + +πŸ™-is-overt : is-overt πŸ™β‚› holds +πŸ™-is-overt (P , open-P) = + ⇔-open (⋆ βˆˆβ‚š P) (ΖŽβ‚š x κž‰ πŸ™ , x βˆˆβ‚š P) (p₁ , pβ‚‚) (open-P ⋆) + where + p₁ : (⋆ βˆˆβ‚š P β‡’ ΖŽβ‚š x κž‰ πŸ™ , x βˆˆβ‚š P) holds + p₁ P-star = ∣ ⋆ , P-star ∣ + + pβ‚‚ : (ΖŽβ‚š x κž‰ πŸ™ , x βˆˆβ‚š P β‡’ ⋆ βˆˆβ‚š P) holds + pβ‚‚ exists-x = βˆ₯βˆ₯-rec (holds-is-prop (⋆ βˆˆβ‚š P)) (Ξ» (x , Px) β†’ Px) exists-x + +\end{code} + +Binary product of overt sets is overt. + +\begin{code} + +module _ (𝒳 𝒴 : hSet 𝓀) where + private + X = underlying-set 𝒳 + Y = underlying-set 𝒴 + set-Y = prβ‚‚ 𝒴 + open Equality set-Y + + Γ—-is-overt : is-overt 𝒳 holds + β†’ is-overt 𝒴 holds + β†’ is-overt (𝒳 Γ—β‚› 𝒴) holds + Γ—-is-overt overt-X overt-Y (P , open-P) = + ⇔-open chained-ex tuple-ex (p₁ , pβ‚‚) † + where + tuple-ex : Ξ© 𝓀 + tuple-ex = ΖŽβ‚š z κž‰ (X Γ— Y) , z βˆˆβ‚š P + + chained-ex : Ξ© 𝓀 + chained-ex = ΖŽβ‚š x κž‰ X , (ΖŽβ‚š y κž‰ Y , (x , y) βˆˆβ‚š P) + + p₁ : (chained-ex β‡’ tuple-ex) holds + p₁ = βˆ₯βˆ₯-rec βˆƒ-is-prop Ξ» (x , hyp) + β†’ βˆ₯βˆ₯-rec βˆƒ-is-prop (Ξ» (y , hyp') β†’ ∣ (x , y) , hyp' ∣) hyp + + pβ‚‚ : (tuple-ex β‡’ chained-ex) holds + pβ‚‚ = βˆ₯βˆ₯-rec βˆƒ-is-prop Ξ» ((x , y) , hyp) β†’ ∣ x , ∣ y , hyp ∣ ∣ + + prop-y : π“Ÿ X + prop-y x = ΖŽβ‚š y κž‰ Y , (x , y) βˆˆβ‚š P + + prop-y-open : (x : X) β†’ is-open-proposition (prop-y x) holds + prop-y-open x = overt-Y ((Ξ» y β†’ (x , y) βˆˆβ‚š P) , Ξ» y β†’ open-P (x , y)) + + † : is-open-proposition chained-ex holds + † = overt-X (prop-y , prop-y-open) + +\end{code} + +We prove here, similar to `image-of-compact`, that image of `overt` sets are +`overt`. + +\begin{code} + + image-of-overt : (f : X β†’ Y) + β†’ is-surjection f + β†’ is-overt 𝒳 holds + β†’ is-overt 𝒴 holds + + image-of-overt f sf overt-X (P , open-P) = + ⇔-open preimage-exists image-exists (p₁ , pβ‚‚) † + where + preimage-exists : Ξ© 𝓀 + preimage-exists = ΖŽβ‚š x κž‰ X , (f x) βˆˆβ‚š P + + image-exists : Ξ© 𝓀 + image-exists = ΖŽβ‚š y κž‰ Y , y βˆˆβ‚š P + + p₁ : (preimage-exists β‡’ image-exists) holds + p₁ Px = βˆ₯βˆ₯-rec (holds-is-prop image-exists) + (Ξ» (x , Pxf) β†’ ∣ f x , Pxf ∣) + Px + + exists-preimage-of-y : (y : Y) β†’ (ΖŽβ‚š x κž‰ X , (f x οΌβ‚š y)) holds + exists-preimage-of-y y = + surjection-induction f + sf + (Ξ» y β†’ ((ΖŽβ‚š x κž‰ X , (f x οΌβ‚š y)) holds)) + (Ξ» y β†’ holds-is-prop + (ΖŽβ‚š x κž‰ X , (f x οΌβ‚š y))) + (Ξ» x β†’ ∣ x , refl ∣) + y + + pβ‚‚ : (image-exists β‡’ preimage-exists) holds + pβ‚‚ Py-prop = βˆ₯βˆ₯-rec (holds-is-prop preimage-exists) + (Ξ» (y , Py) β†’ βˆ₯βˆ₯-rec (holds-is-prop preimage-exists) + (Ξ» (x , x-eq-fy) β†’ + ∣ x , transport (_holds ∘ P) + (x-eq-fy ⁻¹) + Py + ∣) + (exists-preimage-of-y y)) + Py-prop + + † : is-open-proposition preimage-exists holds + † = overt-X (P ∘ f , open-P ∘ f) + +\end{code} + +As for `image-of-compact'`, there is a version for any function `f : X β†’ Y`, in +which case `image f` is overt as a set. + +We have to get out of the anonymous module to access the previous version of +`image-of-overt`. + +\begin{code} + +image-of-overt' : ((X , sX) : hSet 𝓀) + β†’ ((Y , sY) : hSet 𝓀) + β†’ (f : X β†’ Y) + β†’ is-overt (X , sX) holds + β†’ is-overt (imageβ‚› (X , sX) (Y , sY) f) holds + +image-of-overt' (X , sX) (Y , sY) f overt-X = + image-of-overt (X , sX) + (imageβ‚› (X , sX) (Y , sY) f) + (corestriction f) + (corestrictions-are-surjections f) + overt-X + +\end{code} + +\section{References} + +- [1]: Davorin Lesňik. *Synthetic Topology and Constructive Metric Spaces*. + + PhD Thesis, 2010 + + https://doi.org/10.48550/arXiv.2104.10399 + +- [2]: MartΓ­n EscardΓ³. *Topology via higher-order intuitionistic logic* + + Unpublished notes, Pittsburgh, 2004 + + https://www.cs.bham.ac.uk/~mhe/papers/pittsburgh.pdf diff --git a/source/SyntheticTopology/SetCombinators.lagda b/source/SyntheticTopology/SetCombinators.lagda new file mode 100644 index 000000000..42c93fb18 --- /dev/null +++ b/source/SyntheticTopology/SetCombinators.lagda @@ -0,0 +1,153 @@ +--- +title: Definition of some combinators and shortcut for sets. +author: Martin Trucchi +date-started: 2024-06-07 +--- + +\begin{code} + +{-# OPTIONS --safe --without-K #-} + +open import MLTT.Spartan hiding (𝟚 ; β„•) +open import UF.DiscreteAndSeparated hiding (𝟚-is-set ; β„•-is-set ; β„•-is-discrete) +open import UF.FunExt +open import UF.Logic +open import UF.Powerset +open import UF.PropTrunc +open import UF.Sets +open import UF.Sets-Properties +open import UF.Subsingletons +open import UF.Subsingletons-Properties +open import UF.SubtypeClassifier + +module SyntheticTopology.SetCombinators + (𝓀 : Universe) + (fe : Fun-Ext) + (pe : Prop-Ext) + (pt : propositional-truncations-exist) where + +open import Locales.DiscreteLocale.Two fe pe pt +open import Locales.Frame pt fe +open import UF.ImageAndSurjection pt + +open PropositionalTruncation pt + +\end{code} + +We here define some useful shortcuts for sets, as well as combinators to avoid +messy code in the Synthetic Topology development. + +The first one turns propositions into sets, in order to be able to define +compact propositions for example. + +\begin{code} + +Ξ©β‚› : Ξ© 𝓀 β†’ hSet 𝓀 +Ξ©β‚› p = (p holds , props-are-sets (holds-is-prop p)) + +\end{code} + +Here we define shortcuts rather than combinators for sets used in the module. + +\begin{code} + +πŸ˜β‚›-is-set = 𝟘-is-set + +πŸ˜β‚› : hSet 𝓀 +πŸ˜β‚› = 𝟘 , πŸ˜β‚›-is-set + +πŸ™β‚›-is-set = πŸ™-is-set + +πŸ™β‚› : hSet 𝓀 +πŸ™β‚› = πŸ™ , πŸ™β‚›-is-set + +\end{code} + +We use `𝟚` define in `Locales.DiscreteLocale.Two`, to have a universe +polymorphic version of `𝟚`. + +\begin{code} + +πŸšβ‚›-is-set = 𝟚-is-set 𝓀 + +πŸšβ‚› : hSet 𝓀 +πŸšβ‚› = (𝟚 𝓀) , πŸšβ‚›-is-set + +\end{code} + +I did not find a universe polymorphic version of `β„•`. Here it is. + +\begin{code} + +data β„• : 𝓀 Μ‡ where + zero : β„• + succ : β„• β†’ β„• + +pred : β„• β†’ β„• +pred zero = zero +pred (succ n) = n + +boom : β„• β†’ 𝓀 Μ‡ +boom zero = 𝟘 +boom (succ _) = πŸ™ + +β„•-is-discrete : is-discrete β„• +β„•-is-discrete zero zero = inl refl +β„•-is-discrete zero (succ m) = inr Ξ» p β†’ 𝟘-elim (𝟘-is-not-πŸ™ (ap boom p)) +β„•-is-discrete (succ n) zero = inr Ξ» p β†’ 𝟘-elim (𝟘-is-not-πŸ™ (ap boom (p ⁻¹))) +β„•-is-discrete (succ n) (succ m) = + cases (Ξ» p β†’ inl (ap succ p)) + (Ξ» p β†’ inr Ξ» ps β†’ p (ap pred ps)) + (β„•-is-discrete n m) + +β„•-is-set : is-set β„• +β„•-is-set = discrete-types-are-sets β„•-is-discrete + +β„•β‚›-is-set = β„•-is-set + +β„•β‚› : hSet 𝓀 +β„•β‚› = β„• , β„•β‚›-is-set + +\end{code} + +We now define the set combinators. + +We have the same convention of using `𝒳` as a generic set along with the proof, +with its underlying set being `X`. + +Note : for `imageβ‚›` , the fact that `𝒳` is a set is not useful, but +we define it this way to keep the coherence between the arguments. + +\begin{code} + +module _ (𝒳 : hSet 𝓀) where + private + X = underlying-set 𝒳 + set-X = prβ‚‚ 𝒳 + + Ξ β‚› : (X β†’ hSet 𝓀) β†’ hSet 𝓀 + Ξ β‚› f = Ξ  (underlying-set ∘ f) , Ξ -is-set fe (prβ‚‚ ∘ f) + + module _ (𝒴 : hSet 𝓀) where + private + Y = underlying-set 𝒴 + set-Y = prβ‚‚ 𝒴 + + _Γ—β‚›_ : hSet 𝓀 + _Γ—β‚›_ = (X Γ— Y) , Γ—-is-set set-X set-Y + + imageβ‚› : (X β†’ Y) β†’ hSet 𝓀 + imageβ‚› f = (image f , Ξ£-is-set set-Y Ξ» y β†’ props-are-sets βˆƒ-is-prop) + +\end{code} + +We now define a combinator to get the set induced by a subset. That is, if +`𝒳 = (X , set-X)` is a set, and `U : π“Ÿ X` is a subset of 𝒳, we can get the +set induced by `U` using `𝕋ₛ U`. + +\begin{code} + + 𝕋ₛ : π“Ÿ X β†’ hSet 𝓀 + 𝕋ₛ U = 𝕋 U , Ξ£-is-set set-X Ξ» x β†’ props-are-sets (holds-is-prop (U x)) + +\end{code} diff --git a/source/SyntheticTopology/SierpinskiAxioms.lagda b/source/SyntheticTopology/SierpinskiAxioms.lagda new file mode 100644 index 000000000..e96ffb544 --- /dev/null +++ b/source/SyntheticTopology/SierpinskiAxioms.lagda @@ -0,0 +1,213 @@ +--- +title: Axioms about the Sierpinski object +authors: ["Martin Trucchi" , "Ayberk Tosun"] +date-started: 2024-05-28 +dates-modified: [2024-06-07] +--- + +We write down here various axioms for the Sierpinski object, defined in [1]. + +\begin{code} + +{-# OPTIONS --safe --without-K #-} + +open import MLTT.Spartan +open import UF.Base +open import UF.FunExt +open import UF.Logic +open import UF.Powerset +open import UF.PropTrunc +open import UF.Sets +open import UF.Sets-Properties +open import UF.Subsingletons +open import UF.SubtypeClassifier +open import SyntheticTopology.SierpinskiObject + +module SyntheticTopology.SierpinskiAxioms + (𝓀 π“₯ : Universe) + (fe : Fun-Ext) + (pe : Prop-Ext) + (pt : propositional-truncations-exist) + (π•Š : Generalized-Sierpinski-Object fe pe pt 𝓀 π“₯) + where + +open AllCombinators pt fe +open PropositionalTruncation pt hiding (_∨_) +open Sierpinski-notations fe pe pt π•Š + +\end{code} + + +\section{Dominance axiom} + +The dominance axiom is the most used axiom in our setting. + +\begin{code} + +contains-top : Ξ© π“₯ +contains-top = is-open-proposition ⊀ + +openness-is-transitive : Ξ© (𝓀 ⁺ βŠ” π“₯) +openness-is-transitive = + β±― u κž‰ Ξ© 𝓀 , + (is-open-proposition u + β‡’ (β±― p κž‰ Ξ© 𝓀 , + (u β‡’ (is-open-proposition p)) + β‡’ (is-open-proposition (u ∧ p)))) + +is-synthetic-dominance : Ξ© (𝓀 ⁺ βŠ” π“₯) +is-synthetic-dominance = contains-top ∧ openness-is-transitive + +\end{code} + +We also give a natural axiom saying that the Sierpinski object is being closed +under binary (and thus, finite if `contains-top` holds) meets : + +\begin{code} + +closed-under-binary-meets : Ξ© (𝓀 ⁺ βŠ” π“₯) +closed-under-binary-meets = + β±― p κž‰ Ξ© 𝓀 , + β±― q κž‰ Ξ© 𝓀 , + ((is-open-proposition p ∧ is-open-proposition q) + β‡’ is-open-proposition (p ∧ q)) + +\end{code} + +Added by Martin Trucchi - 3rd June 2024. + +The latter directly follows from `openness-is-transitive`. It is a particular +case in which both `P` and `Q` are known to be `open-proposition`. + +\begin{code} + +open-transitive-gives-cl-∧ + : (openness-is-transitive β‡’ closed-under-binary-meets) holds +open-transitive-gives-cl-∧ open-transitive p q (open-p , open-q) = + open-transitive p open-p q Ξ» _ β†’ open-q + +\end{code} + + +\section{Standard topology} + +We define here the axiom of being a `standard-topology`, defined on 5.9 of [2]. + +Note that not all "used" SierpiΕ„ski verify this (for example, see the SierpiΕ„ski +defined in [3]) + +\begin{code} + +contains-bot : Ξ© π“₯ +contains-bot = is-open-proposition βŠ₯ + +closed-under-binary-joins : Ξ© (𝓀 ⁺ βŠ” π“₯) +closed-under-binary-joins = + β±― p κž‰ Ξ© 𝓀 , + β±― q κž‰ Ξ© 𝓀 , + ((is-open-proposition p ∧ is-open-proposition q) + β‡’ is-open-proposition (p ∨ q)) + +is-standard : Ξ© (𝓀 ⁺ βŠ” π“₯) +is-standard = contains-bot ∧ closed-under-binary-joins + +\end{code} + +\section{Phoa's principle} + +\begin{code} + +phoa’s-principle : contains-top holds β†’ contains-bot holds β†’ Ξ© (𝓀 ⁺ βŠ” π“₯) +phoa’s-principle ct cb = + β±― f κž‰ (Ξ©β‚’ β†’ Ξ©β‚’) , + (β±― (q , open-q) κž‰ Ξ©β‚’ , pr₁ (f (q , open-q)) + ⇔ ((pr₁ (f (⊀ , ct)) ∧ q) ∨ pr₁ (f (βŠ₯ , cb)))) + +\end{code} + +As proved in [1] , `phoa’s-principle` implies that all endomaps of the +Sierpinski are monotonous. + +\begin{code} + +β‡’-functor : (p p' q q' : Ξ© 𝓀) + β†’ ((p ⇔ p') holds) + β†’ ((q ⇔ q') holds) + β†’ ((p β‡’ q) holds) + β†’ ((p' β‡’ q') holds) + +β‡’-functor p p' q q' p-eq-p' q-eq-q' p-gives-q p'-holds = + ⇔-transport pe q q' _holds q-eq-q' + (p-gives-q (⇔-transport pe p' p _holds (⇔-swap pe p p' p-eq-p') p'-holds)) + +phoa’s-principle-gives-monotonous-maps + : (ct : contains-top holds) β†’ (cb : contains-bot holds) β†’ + (phoa’s-principle ct cb β‡’ + (β±― f κž‰ (Ξ©β‚’ β†’ Ξ©β‚’) , + (β±― (p , open-p) κž‰ Ξ©β‚’ , (β±― (q , open-q) κž‰ Ξ©β‚’ , + (p β‡’ q) β‡’ (pr₁ (f (p , open-p)) β‡’ pr₁ (f (q , open-q))))))) holds + +phoa’s-principle-gives-monotonous-maps + ct cb phoa-p f (p , open-p) (q , open-q) p-gives-q = + ⇔-transport pe + ((((pr₁ (f (⊀ , ct))) ∧ p) ∨ (pr₁ (f (βŠ₯ , cb)))) + β‡’ (((pr₁ (f (⊀ , ct))) ∧ q) ∨ (pr₁ (f (βŠ₯ , cb))))) + ((pr₁ (f (p , open-p))) β‡’ (pr₁ (f (q , open-q)))) + _holds + (equiv₁ , equivβ‚‚) + † + where + equiv₁ : (((pr₁ (f (⊀ , ct)) ∧ p ∨ (pr₁ (f (βŠ₯ , cb)))) + β‡’ (pr₁ (f (⊀ , ct)) ∧ q ∨ pr₁ (f (βŠ₯ , cb)))) + β‡’ pr₁ (f (p , open-p)) β‡’ pr₁ (f (q , open-q))) holds + equiv₁ = β‡’-functor ((pr₁ (f (⊀ , ct))) ∧ p ∨ (pr₁ (f (βŠ₯ , cb)))) + ((pr₁ (f (p , open-p)))) + ((pr₁ (f (⊀ , ct))) ∧ q ∨ (pr₁ (f (βŠ₯ , cb)))) + ((pr₁ (f (q , open-q)))) + (⇔-swap pe ((pr₁ (f (p , open-p)))) + ((pr₁ (f (⊀ , ct))) ∧ p ∨ (pr₁ (f (βŠ₯ , cb)))) + (phoa-p f (p , open-p))) + (⇔-swap pe ((pr₁ (f (q , open-q)))) + ((pr₁ (f (⊀ , ct))) ∧ q ∨ (pr₁ (f (βŠ₯ , cb)))) + (phoa-p f (q , open-q))) + + equivβ‚‚ : (((pr₁ (f (p , open-p))) β‡’ (pr₁ (f (q , open-q)))) + β‡’ ((pr₁ (f (⊀ , ct))) ∧ p ∨ (pr₁ (f (βŠ₯ , cb)))) + β‡’ ((pr₁ (f (⊀ , ct))) ∧ q ∨ (pr₁ (f (βŠ₯ , cb))))) holds + equivβ‚‚ = β‡’-functor ((pr₁ (f (p , open-p)))) + ((pr₁ (f (⊀ , ct))) ∧ p ∨ (pr₁ (f (βŠ₯ , cb)))) + ((pr₁ (f (q , open-q)))) + ((pr₁ (f (⊀ , ct))) ∧ q ∨ (pr₁ (f (βŠ₯ , cb)))) + (phoa-p f (p , open-p)) + (phoa-p f (q , open-q)) + + † : (((pr₁ (f (⊀ , ct))) ∧ p ∨ (pr₁ (f (βŠ₯ , cb)))) + β‡’ ((pr₁ (f (⊀ , ct))) ∧ q ∨ (pr₁ (f (βŠ₯ , cb))))) holds + † and-or-p = + βˆ₯βˆ₯-rec (holds-is-prop ((pr₁ (f (⊀ , ct))) ∧ q ∨ (pr₁ (f (βŠ₯ , cb))))) + (cases (Ξ» (f-top-holds , p-holds) β†’ + ∣ inl (f-top-holds , p-gives-q p-holds) ∣) + (∣_∣ ∘ inr)) + and-or-p + +\end{code} + +\section{References} + +- [1]: Davorin Lesňik. *Synthetic Topology and Constructive Metric Spaces*. + + PhD Thesis, 2010 + + https://doi.org/10.48550/arXiv.2104.10399 + +- [2]: MartΓ­n EscardΓ³. *Topology via higher-order intuitionistic logic* + + Unpublished notes, Pittsburgh, 2004 + + https://www.cs.bham.ac.uk/~mhe/papers/pittsburgh.pdf + +- [3]: MartΓ­n EscardΓ³. *Synthetic topology of data types and classical spaces*. + + ENTCS, Elsevier, volume 87, pages 21-156, November 2004. + + https://www.cs.bham.ac.uk/~mhe/papers/entcs87.pdf diff --git a/source/SyntheticTopology/SierpinskiObject.lagda b/source/SyntheticTopology/SierpinskiObject.lagda new file mode 100644 index 000000000..1699c897e --- /dev/null +++ b/source/SyntheticTopology/SierpinskiObject.lagda @@ -0,0 +1,177 @@ +--- +title: Definition of Sierpinski object synthetic topology +authors: ["Ayberk Tosun", "Martin Trucchi"] +date-started: 2024-05-02 +date-completed: 2024-05-31 +dates-updated: [2024-05-28, 2024-06-05 , 2024-06-07] +--- + +\begin{code} + +{-# OPTIONS --safe --without-K #-} + +open import MLTT.Spartan +open import UF.FunExt +open import UF.Powerset +open import UF.PropTrunc +open import UF.Sets +open import UF.Sets-Properties +open import UF.Subsingletons +open import UF.Subsingletons-Properties +open import UF.SubtypeClassifier + +module SyntheticTopology.SierpinskiObject + (fe : Fun-Ext) + (pe : Prop-Ext) + (pt : propositional-truncations-exist) where + +open import UF.Classifiers +open import UF.Embeddings +open import UF.Equiv +open import UF.ImageAndSurjection pt +open import UF.Logic +open import UF.Subsingletons-FunExt +open import UF.Univalence +open import UF.UniverseEmbedding + +open AllCombinators pt fe +open PropositionalTruncation pt hiding (_∨_) + +\end{code} + +What is a SierpiΕ„ski object? In MartΓ­n EscardΓ³Β΄s unpublished note [2], +a SierpiΕ„ski object is defined in the setting of a topos as a subobject of the +subobject classifier. This is also given in Definition 2.4 of Davorin Lesnik's +thesis [1], who took this unpublished note as a starting point for his PhD +thesis. + +The purpose of this development is to develop these notions in the context of +HoTT/UF, where we look at subtypes of the subtype classifier. Because we work +predicatively, however, the definition of the notion of SierpiΕ„ski object is not +that straightforward in our setting. + +In the impredicative setting of topos theory, one works with the topos of 𝓀-sets +over some universe 𝓀, and the SierpiΕ„ski object in that setting would translate +to: + +\begin{code} + +Sierpinski-Objectβ‚€ : (𝓀 : Universe) β†’ 𝓀 ⁺ Μ‡ +Sierpinski-Objectβ‚€ 𝓀 = Subtype' 𝓀 (Ξ© 𝓀) + +\end{code} + +However, many dominances that we are interested in do not fit this definition in +a predicative setting. For example, the largest possible dominance of `Ξ© 𝓀` is +𝓀⁺-set rather than a 𝓀-set. Accordingly, we generalize the universes in the +notion of SierpiΕ„ski object as follows: + +\begin{code} + +Generalized-Sierpinski-Object : (𝓀 π“₯ : Universe) β†’ (𝓀 βŠ” π“₯) ⁺ Μ‡ +Generalized-Sierpinski-Object 𝓀 π“₯ = Ξ© 𝓀 β†’ Ξ© π“₯ + +\end{code} + +We think that in most cases, our dominances will be of the form `Ξ© 𝓀 β†’ Ξ© (𝓀 ⁺)`, +but because we can prove things in this general setting, we choose to work with +the generalized definition instead. + +We define some notation to refer to components of a SierpiΕ„ski object. + +In the module below, we assume the existence of a SierpiΕ„ski object `π•Š` and +define some notions _synthetically_, following the work of MartΓ­n EscardΓ³ (and +Davorin LeΕ‘nik). + +\begin{code} + +module Sierpinski-notations (π•Š : Generalized-Sierpinski-Object 𝓀 π“₯) where + +\end{code} + +The propositions in `Ξ©` that fall in the subset `π•Š` are called _open +propositions_. We introduce suggestive terminology accordingly. + +The type of open proposition is noted Ξ©β‚’ + +\begin{code} + + is-open-proposition : Ξ© 𝓀 β†’ Ξ© π“₯ + is-open-proposition = π•Š + + Ξ©β‚’ : 𝓀 ⁺ βŠ” π“₯ Μ‡ + Ξ©β‚’ = Ξ£ p κž‰ Ξ© 𝓀 , is-open-proposition p holds + +\end{code} + +Here, we only work with sets. + +We defined some combinators for the sake of notational simplicity in the module +SetCombinators. + +To define this and some related notions, we work in a module parameterized by an +hSet `𝒳`. We adopt the convention of using calligraphic letters `𝒳`, `𝒴`, ... +for inhabitants of the type `hSet`. + +\begin{code} + + module _ (𝒳 : hSet 𝓀) where + +\end{code} + +We denote by `X` the underlying set of `𝒳`. + +\begin{code} + + private + X = underlying-set 𝒳 + +\end{code} + +A subset of a set is said to be `intrinsically open` if it is a predicate +defined by open propositions. + +\begin{code} + + is-intrinsically-open : π“Ÿ X β†’ Ξ© (𝓀 βŠ” π“₯) + is-intrinsically-open P = β±― x κž‰ X , is-open-proposition (x βˆˆβ‚š P) + +\end{code} + +For convenience, we write down the subtype of open propositions (= subset) of a +set `X` + +\begin{code} + + π“ž : 𝓀 ⁺ βŠ” π“₯ Μ‡ + π“ž = Ξ£ P κž‰ π“Ÿ X , is-intrinsically-open P holds + + underlying-prop : π“ž β†’ π“Ÿ X + underlying-prop = pr₁ + +\end{code} + +We also prove the following convenient lemma. + +\begin{code} + + ⇔-open + : (p q : Ξ© 𝓀) + β†’ ((p ⇔ q) β‡’ is-open-proposition p β‡’ is-open-proposition q) holds + ⇔-open p q = ⇔-transport pe p q (_holds ∘ is-open-proposition) + +\end{code} + +\section{References} + +- [1]: Davorin Lesňik. *Synthetic Topology and Constructive Metric Spaces*. + + PhD Thesis, 2010 + + https://doi.org/10.48550/arXiv.2104.10399 + +- [2]: MartΓ­n EscardΓ³. *Topology via higher-order intuitionistic logic* + + Unpublished notes, Pittsburgh, 2004 + + https://www.cs.bham.ac.uk/~mhe/papers/pittsburgh.pdf diff --git a/source/SyntheticTopology/SubObjects.lagda b/source/SyntheticTopology/SubObjects.lagda new file mode 100644 index 000000000..6110b728d --- /dev/null +++ b/source/SyntheticTopology/SubObjects.lagda @@ -0,0 +1,246 @@ +--- +title: Subobjects in Synthetic Topology +author: Martin Trucchi +date-started: 2024-05-28 +--- + +\begin{code} + +{-# OPTIONS --safe --without-K #-} + +open import MLTT.Spartan +open import UF.Base +open import UF.FunExt +open import UF.Powerset +open import UF.PropTrunc +open import UF.Sets +open import UF.Sets-Properties +open import UF.Subsingletons +open import UF.SubtypeClassifier +open import SyntheticTopology.SierpinskiObject + +module SyntheticTopology.SubObjects + (𝓀 π“₯ : Universe) + (fe : Fun-Ext) + (pe : Prop-Ext) + (pt : propositional-truncations-exist) + (π•Š : Generalized-Sierpinski-Object fe pe pt 𝓀 π“₯) + where + +open import SyntheticTopology.Compactness 𝓀 π“₯ fe pe pt π•Š +open import SyntheticTopology.Discreteness 𝓀 π“₯ fe pe pt π•Š +open import SyntheticTopology.Overtness 𝓀 π“₯ fe pe pt π•Š +open import SyntheticTopology.SetCombinators 𝓀 fe pe pt +open import SyntheticTopology.SierpinskiAxioms 𝓀 π“₯ fe pe pt π•Š +open import UF.ImageAndSurjection pt +open import UF.Logic + +open AllCombinators pt fe +open PropositionalTruncation pt hiding (_∨_) +open Sierpinski-notations fe pe pt π•Š + +\end{code} + +We define notions involving sub-objects (sub-overtness, sub-compactness...) +defined in [2]. +We also prove some lemmas that are in [1] and [2]. + +Because of predicativity, we have to use definitions 2. of 7.2 and 8.2 +for subcompactness and subovertness in [2]. + +\begin{code} + +module subdefinitions (𝒳 : hSet 𝓀) where + private + X = underlying-set 𝒳 + set-X = prβ‚‚ 𝒳 + + is-subcompact : (U : π“Ÿ X) β†’ Ξ© (𝓀 ⁺ βŠ” π“₯) + is-subcompact U = + β±― (P , open-P) κž‰ π“ž 𝒳 + , is-open-proposition (β±― x κž‰ X , (x βˆˆβ‚š U) β‡’ x βˆˆβ‚š P) + + is-subcompact' : (U : π“Ÿ X) β†’ Ξ© (𝓀 ⁺ βŠ” π“₯) + is-subcompact' U = + β±― (P , open-P) κž‰ π“ž 𝒳 + , is-open-proposition (β±― (x , Ux) κž‰ (𝕋 U) , x βˆˆβ‚š P) + + is-subovert : (U : π“Ÿ X) β†’ Ξ© (𝓀 ⁺ βŠ” π“₯) + is-subovert U = + β±― (P , open-P) κž‰ π“ž 𝒳 , is-open-proposition (ΖŽβ‚š (x , Ux) κž‰ (𝕋 U) , x βˆˆβ‚š P) + +\end{code} + +First, we can prove that the two notions of subcompactness are equivalent. + +\begin{code} + + sub-gives-sub' : (U : π“Ÿ X) β†’ is-subcompact U holds β†’ is-subcompact' U holds + sub-gives-sub' U sub-U (P , open-P) = + ⇔-open (β±― x κž‰ X , x βˆˆβ‚š U β‡’ x βˆˆβ‚š P) (β±― (x , Ux) κž‰ (𝕋 U) , x βˆˆβ‚š P) + ((Ξ» hyp (x , Ux) β†’ hyp x Ux) , Ξ» hyp x Ux β†’ hyp (x , Ux)) + (sub-U ((Ξ» x β†’ x βˆˆβ‚š P) , open-P)) + + + sub'-gives-sub : (U : π“Ÿ X) β†’ is-subcompact' U holds β†’ is-subcompact U holds + sub'-gives-sub U sub'-U (P , open-P) = + ⇔-open (β±― (x , Ux) κž‰ (𝕋 U) , x βˆˆβ‚š P) (β±― x κž‰ X , x βˆˆβ‚š U β‡’ x βˆˆβ‚š P) + ((Ξ» hyp x Ux β†’ hyp (x , Ux)) , (Ξ» hyp (x , Ux) β†’ hyp x Ux)) + (sub'-U ((Ξ» x β†’ x βˆˆβ‚š P) , open-P)) + +\end{code} + +Then we prove some lemmas. + +\begin{code} + + subovert-of-discrete-is-open : (U : π“Ÿ X) + β†’ is-subovert U holds + β†’ is-discrete 𝒳 holds + β†’ is-intrinsically-open 𝒳 U holds + + subovert-of-discrete-is-open U subovert-U discrete-X x = + ⇔-open (ΖŽβ‚š (y , Uy) κž‰ (𝕋 U) , (x οΌβ‚š y)) (x βˆˆβ‚š U) (p₁ , pβ‚‚) † + where + open Equality set-X + + p₁ : ((ΖŽβ‚š (y , Uy) κž‰ (𝕋 U) , (x οΌβ‚š y)) β‡’ x βˆˆβ‚š U) holds + p₁ ex-y = βˆ₯βˆ₯-rec (holds-is-prop (x βˆˆβ‚š U)) + (Ξ» ((y , Uy) , y-eq-x) β†’ transport (_holds ∘ U) + (y-eq-x ⁻¹) + Uy) + ex-y + + pβ‚‚ : (x βˆˆβ‚š U β‡’ ΖŽβ‚š (y , Uy) κž‰ (𝕋 U) , (x οΌβ‚š y)) holds + pβ‚‚ Ux = ∣ (x , Ux) , refl ∣ + + † : is-open-proposition (ΖŽβ‚š (y , Uy) κž‰ (𝕋 U) , (x οΌβ‚š y)) holds + † = subovert-U ((Ξ» y β†’ x οΌβ‚š y) , Ξ» y β†’ discrete-X (x , y)) + + + subovert-inter-open-subovert : closed-under-binary-meets holds + β†’ (β±― A κž‰ (π“Ÿ X) , + β±― (U , _) κž‰ π“ž 𝒳 , + is-subovert A + β‡’ is-subovert (A ∩ U)) holds + + subovert-inter-open-subovert cl-∧ A (U , open-U) subovert-A (V , open-V) = + ⇔-open T-A + T-A∩U + (p₁ , pβ‚‚) + (subovert-A (U ∩ V , Ξ» x β†’ cl-∧ (U x) (V x) ((open-U x) , (open-V x)))) + where + T-A : Ξ© 𝓀 + T-A = ΖŽβ‚š (x , Ax) κž‰ (𝕋 A) , (x βˆˆβ‚š (U ∩ V)) + + T-A∩U : Ξ© 𝓀 + T-A∩U = ΖŽβ‚š (x , A-U-x) κž‰ (𝕋 (A ∩ U)) , (x βˆˆβ‚š V) + + p₁ : (T-A β‡’ T-A∩U) holds + p₁ ex-U-V = βˆ₯βˆ₯-rec (holds-is-prop T-A∩U) + (Ξ» ((x , Ax) , Ux , Vx) β†’ ∣ (x , Ax , Ux) , Vx ∣) + ex-U-V + + pβ‚‚ : (T-A∩U β‡’ T-A) holds + pβ‚‚ ex-V = βˆ₯βˆ₯-rec (holds-is-prop T-A) + (Ξ» ((x , Ax , Ux) , Vx) β†’ ∣ (x , Ax) , Ux , Vx ∣) + ex-V + + open-subset-of-overt-is-subovert : closed-under-binary-meets holds + β†’ (β±― (U , _) κž‰ π“ž 𝒳 , + is-overt 𝒳 β‡’ is-subovert U) holds + + open-subset-of-overt-is-subovert cl-∧ (U , open-U) overt-X (V , open-V) = + ⇔-open (ΖŽβ‚š x κž‰ X , x βˆˆβ‚š (U ∩ V)) + (ΖŽβ‚š (x , Ux) κž‰ (𝕋 U) , (x βˆˆβ‚š V)) + ((Ξ» ex-U∩V β†’ βˆ₯βˆ₯-rec (holds-is-prop (ΖŽβ‚š (x , Ux) κž‰ (𝕋 U) , (x βˆˆβ‚š V))) + (Ξ» (x , Ux , Vx) β†’ ∣ (x , Ux) , Vx ∣) + ex-U∩V) , + (Ξ» ex-V β†’ βˆ₯βˆ₯-rec (holds-is-prop (ΖŽβ‚š x κž‰ X , (x βˆˆβ‚š (U ∩ V)))) + (Ξ» ((x , Ux) , Vx) β†’ ∣ x , Ux , Vx ∣) + ex-V)) + (overt-X ((U ∩ V) , (Ξ» x β†’ cl-∧ (x βˆˆβ‚š U) + (x βˆˆβ‚š V) + ((open-U x) , (open-V x))))) + +\end{code} + +We have some lemmas that states the consistency of "sub" definitions +related to "plain" ones. + +\begin{code} + + compact-iff-subcompact-in-self + : ((is-compact 𝒳 ⇔ (is-subcompact full))) holds + + compact-iff-subcompact-in-self = + compact-gives-subcompact , subcompact-gives-compact + + where + compact-gives-subcompact : + (is-compact 𝒳 β‡’ is-subcompact full) holds + compact-gives-subcompact compact-X (U , open-U) = + ⇔-open (β±― x κž‰ X , x βˆˆβ‚š U) + (β±― x κž‰ X , ⊀ β‡’ U x) + ((Ξ» hyp x _ β†’ hyp x) , (Ξ» hyp x β†’ hyp x ⊀-holds)) + (compact-X (U , open-U)) + + subcompact-gives-compact : + ( is-subcompact full β‡’ is-compact 𝒳) holds + subcompact-gives-compact = Ξ» subcompact-X (U , open-U) β†’ + ⇔-open (β±― x κž‰ X , ⊀ β‡’ x βˆˆβ‚š U) + (β±― x κž‰ X , x βˆˆβ‚š U) + ((Ξ» hyp x β†’ hyp x ⊀-holds) , (Ξ» hyp x _ β†’ hyp x)) + (subcompact-X ((Ξ» z β†’ z βˆˆβ‚š U) , open-U)) + + + overt-iff-subovert-in-self + : ((is-overt 𝒳 ⇔ (is-subovert full))) holds + + overt-iff-subovert-in-self = + overt-gives-subovert , subovert-gives-overt + where + p₁ : (U : π“Ÿ X) + β†’ ((ΖŽβ‚š x κž‰ X , x βˆˆβ‚š U) β‡’ (ΖŽβ‚š (x , true) κž‰ (𝕋 full) , x βˆˆβ‚š U)) holds + p₁ U ex-U = βˆ₯βˆ₯-rec (holds-is-prop (ΖŽβ‚š (x , true) κž‰ (𝕋 full) , x βˆˆβ‚š U)) + (Ξ» (x , Ux) β†’ ∣ (x , ⊀-holds) , Ux ∣) + ex-U + + pβ‚‚ : (U : π“Ÿ X) + β†’ ((ΖŽβ‚š (x , true) κž‰ (𝕋 full) , x βˆˆβ‚š U) β‡’ (ΖŽβ‚š x κž‰ X , x βˆˆβ‚š U)) holds + pβ‚‚ U ex-full = βˆ₯βˆ₯-rec (holds-is-prop (ΖŽβ‚š x κž‰ X , x βˆˆβ‚š U)) + (Ξ» ((x , true) , Ux) β†’ ∣ x , Ux ∣) + ex-full + + overt-gives-subovert : + (is-overt 𝒳 β‡’ is-subovert full) holds + + overt-gives-subovert overt-X (U , open-U) = + ⇔-open (ΖŽβ‚š x κž‰ X , x βˆˆβ‚š U) + (ΖŽβ‚š (x , true) κž‰ (𝕋 full) , U x) + (p₁ U , pβ‚‚ U) + (overt-X (U , open-U)) + + subovert-gives-overt : + ( is-subovert full β‡’ is-overt 𝒳) holds + + subovert-gives-overt = Ξ» subovert-X (U , open-U) β†’ + ⇔-open (ΖŽβ‚š (x , true) κž‰ (𝕋 full) , U x) + (ΖŽβ‚š x κž‰ X , x βˆˆβ‚š U) + (pβ‚‚ U , p₁ U) + (subovert-X (U , open-U)) +\end{code} + +\section{References} + +- [1]: Davorin Lesňik. *Synthetic Topology and Constructive Metric Spaces*. + + PhD Thesis, 2010 + + https://doi.org/10.48550/arXiv.2104.10399 + +- [2]: MartΓ­n EscardΓ³. *Topology via higher-order intuitionistic logic* + + Unpublished notes, Pittsburgh, 2004 + + https://www.cs.bham.ac.uk/~mhe/papers/pittsburgh.pdf diff --git a/source/SyntheticTopology/index.lagda b/source/SyntheticTopology/index.lagda new file mode 100644 index 000000000..e882d6bf4 --- /dev/null +++ b/source/SyntheticTopology/index.lagda @@ -0,0 +1,76 @@ +\begin{code} + +{-# OPTIONS --safe --without-K #-} + +module SyntheticTopology.index where + +\end{code} + +The import lines are sorted alphabetically. + +The module `Compactness` defines the synthetic notion of compact sets. + +\begin{code} + +import SyntheticTopology.Compactness + +\end{code} + +The module `Density` defines the synthetic notion of dense subsets. + +\begin{code} + +import SyntheticTopology.Density + +\end{code} + +The module `Discreteness` defines the synthetic notion of discrete sets. + +\begin{code} + +import SyntheticTopology.Discreteness + +\end{code} + +The module `Overtness` defines the synthetic notion of overt sets. + +\begin{code} + +import SyntheticTopology.Overtness + +\end{code} + +We define in this module useful combinators and shortcut for sets : + +\begin{code} + +import SyntheticTopology.SetCombinators + +\end{code} + + +The axioms considered on SierpiΕ„ski objects live in module `SierpinskiAxioms`: + +\begin{code} + +import SyntheticTopology.SierpinskiAxioms + +\end{code} + +The following module contains definition of the notion of SierpiΕ„ski object. +It is the "root" module. + +\begin{code} + +import SyntheticTopology.SierpinskiObject + +\end{code} + +The module `Subproperties` defines the analogous notions of overtness and +compactness for subsets and states somme lemmas. + +\begin{code} + +import SyntheticTopology.SubObjects + +\end{code} diff --git a/source/UF/Logic.lagda b/source/UF/Logic.lagda index 9c8571cd8..ede918d94 100644 --- a/source/UF/Logic.lagda +++ b/source/UF/Logic.lagda @@ -210,6 +210,18 @@ Added by Martin Escardo 1st Nov 2023. End of addition. +Added by Martin Trucchi and Ayberk Tosun 2024-05-28. + +\begin{code} + + ⇔-transport : (P Q : Ξ© 𝓀) β†’ (B : Ξ© 𝓀 β†’ 𝓦 Μ‡) β†’ ((P ⇔ Q) holds) β†’ B P β†’ B Q + ⇔-transport {𝓀} P Q (π“Ÿ) P-iff-Q Prop-P = transport π“Ÿ q Prop-P + where + q : P = Q + q = ⇔-gives-= P Q (holds-gives-equal-⊀ pe fe (P ⇔ Q) P-iff-Q) + +\end{code} + \section{Disjunction} \begin{code} diff --git a/source/index.lagda b/source/index.lagda index cb03a76b9..b58be4bcc 100644 --- a/source/index.lagda +++ b/source/index.lagda @@ -55,9 +55,9 @@ (https://www.cs.bham.ac.uk/~mhe/TypeTopology/AllModulesIndex.html) - * In our last count, on 2024.09.12, this development has 788 Agda - files with 226K lines of code, including comments and blank - lines. + * In our last count, on 2024.07.18, this development has 778 Agda + files with 222K lines of code, including comments and blank + lines. But we don't update the count frequently. Philosophy of the repository ----------------------------