Andrew Swan, started 13th February 2024 We demonstrate the upwards absoluteness of compactness, by using it to give an alternative proof of the propositional Tychonoff theorem (as proved in the module TypeTopology.PropTychonoff). \begin{code} {-# OPTIONS --safe --without-K #-} open import MLTT.Spartan import Modal.Open import Modal.SigmaClosedReflectiveSubuniverse import TypeTopology.AbsolutenessOfCompactness open import TypeTopology.CompactTypes open import UF.Equiv open import UF.FunExt open import UF.PropIndexedPiSigma open import UF.Subsingletons module TypeTopology.AbsolutenessOfCompactnessExample (fe : funext đ¤ đ¤) (P : đ¤ Ě ) (P-is-prop : is-prop P) where \end{code} We are given a proposition P as a parameter and function extensionality. We use this in a sequence of module imports. First of all, we give P to the open modality module, as well as function extensionality to get results about the open modality on P. \begin{code} open Modal.Open fe P P-is-prop \end{code} The open modality module gives us proofs that the open modality is reflective and ÎŁ-closed. We hand these off to the SigmaClosedReflectiveSubuniverse module. \begin{code} open Modal.SigmaClosedReflectiveSubuniverse open-subuniverse open-is-reflective open-is-sigma-closed \end{code} We also hand off the open modality as a parameter to the AbsolutenessOfCompactness module. \begin{code} open TypeTopology.AbsolutenessOfCompactness open-subuniverse open-is-reflective \end{code} Finally, we recall that AbsolutenessOfCompactness has a submodule that requires the extra assumptions of function extensionality and that the reflective subuniverse is ÎŁ-closed and replete. We have all of these, so we pass them on as parameters to the submodule. \begin{code} open WithFunExtAndRepleteSigmaClosed fe open-is-sigma-closed open-is-replete \end{code} If we apply the theorems in AbsolutenessOfCompactness directly, the best we can get is the following non dependent version of propositional Tychonoff. \begin{code} non-dependent-prop-tychonoff : (A : đ¤ Ě ) â (P â is-compactâ A) â is-compactâ (P â A) non-dependent-prop-tychonoff = modalities-preserve-compact \end{code} In order to get a new proof of propositional Tychonoff, we need to show how to derive it from the non-dependent version. \begin{code} prop-tychonoffâ : (A : P â đ¤ Ě ) â ((z : P) â is-compactâ (A z)) â is-compactâ (Î A) prop-tychonoffâ A A-compact = Î A-compact where \end{code} We are given a family of types A : P â đ¤ Ě and we aim to apply the non-dependent version above to the product Î A. In order to do this, there are two things to check. Firstly, we have to show that P implies Î A is compact. This allows us to apply the non-dependent version above, which shows that P â Î A is compact. We then need to deduce from this that in fact Î A is compact. The first step, of showing that P implies Î A compact, is copied straight from the original propositional Tychonoff proof. Namely, if P is true, as witnessed by an inhabitant z, then Î A is equivalent to A z, and so is compact. \begin{code} đ : (z : P) â Î A â A z đ = prop-indexed-product fe P-is-prop product-locally-compact : P â is-compactâ (Î A) product-locally-compact z = compactâ-types-are-closed-under-equiv (â-sym (đ z)) (A-compact z) \end{code} We can now apply the non dependent version above to show that P â Î A is compact. \begin{code} PâÎ A-compact : is-compactâ (P â Î A) PâÎ A-compact = non-dependent-prop-tychonoff (Î A) product-locally-compact \end{code} To deduce that Î A is compact, it suffices to show that it is equivalent to P â Î A. This can be shown directly, but we will give a slightly more abstract proof using general results about modalities. First note that given z : P, we known that P is true and so every type is modal for the open modality on P. Hence, in particular A z is modal. \begin{code} A-modal : (z : P) â is-modal (A z) A-modal z = P-true-implies-all-modal z (A z) \end{code} Since A is a family of modal types its product Î A is also modal. \begin{code} Î A-modal : is-modal (Î A) Î A-modal = products-of-modal-types-are-modal fe open-is-replete P A A-modal \end{code} However, the fact that Î A is modal precisely tells us that the unit map of the modality Î A â (P â Î A) is an equivalence. Putting this together with the earlier proof that P â Î A is modal allows us to complete the proof of the theorem. \begin{code} Î A-compact : is-compactâ (Î A) Î A-compact = compactâ-types-are-closed-under-equiv (â-sym ((open-unit (Î A)) , Î A-modal)) PâÎ A-compact \end{code}