{-# OPTIONS --cubical --safe #-}
module CoverFormsNucleus where
open import Basis hiding (A) renaming (squash to squashβ²)
open import Poset
open import Frame
open import Cover
open import Nucleus using (isNuclear; Nucleus; π£π¦π΅; idem)
open import Cubical.Data.Bool using (Bool; true; false)
open import FormalTopology renaming (pos to posβ²)
We use a module that takes some formal topology F as a parameter to reduce parameter-passing.
module NucleusFrom (β± : FormalTopology ββ ββ) where
We refer to the underlying poset of F as P and the frame of downwards-closed subsets of P as Pβ.
private
P = posβ² β±
Pβ = DCFrame P
_β_ = Ξ» (x y : stage β±) β x β[ P ] y
open CoverFromFormalTopology β± public
Now, we define the covering nucleus which we denote by π. At its heart, this is nothing but the map U β¦ - β U.
π : β£ Pβ β£F β β£ Pβ β£F
π (U , U-down) = (Ξ» - β U β· -) , Uβ·-dc
where
-- This is not propositional unless we force it to be using the HIT definition!
_β·_ : π« β£ P β£β β π« β£ P β£β
U β· a = a β U , squash
Uβ·-dc : [ isDownwardsClosed P (Ξ» - β (- β U) , squash) ]
Uβ·-dc a aβ aΞ΅Uβ aββa = β-lemβ U-down aββa aΞ΅Uβ
π-nuclear : isNuclear Pβ π
π-nuclear = Nβ , Nβ , Nβ
where
-- We reason by antisymmetry and prove in (d) π (aβ β aβ) β (π aβ) β (π aβ) and
-- in (u) (π aβ) β (π aβ) β π (aβ β aβ).
Nβ : (π π : β£ Pβ β£F) β π (π β[ Pβ ] π) β‘ (π π) β[ Pβ ] (π π)
Nβ π@(U , U-down) π@(V , V-down) =
β[ pos Pβ ]-antisym (π (π β[ Pβ ] π)) (π π β[ Pβ ] π π) down up
where
down : [ (π (π β[ Pβ ] π)) β[ pos Pβ ] (π π β[ Pβ ] π π) ]
down a p = (β-lemβ (U β© V) U (Ξ» { u (uβU , uβV) β dir uβU }) a p)
, (β-lemβ (U β© V) V (Ξ» { u (uβU , uβV) β dir uβV }) a p)
up : [ (π π β[ Pβ ] π π) β[ pos Pβ ] π (π β[ Pβ ] π) ]
up a (aβU , aβV) = β-lemβ V U V-down U-down (β[ P ]-refl a) aβV aβU
Nβ : (π : β£ Pβ β£F) β [ π β[ pos Pβ ] (π π) ]
Nβ _ aβ aβU = dir aβU
Nβ : (π : β£ Pβ β£F) β [ Οβ (π (π π)) β Οβ (π π) ]
Nβ π@(U , _) = β-lemβ (Οβ (π π)) U (Ξ» _ q β q)
We denote by L the frame of fixed points for π.
L : Frame (β-suc ββ) ββ ββ L = π£π¦π΅ Pβ (π , π-nuclear)
The following is a just a piece of convenient notation for projecting out the underlying set of a downwards-closed subset equipped with the information that it is a fixed point for π.
β¦ _β¦ : β£ L β£F β π« β£ P β£β β¦ ((U , _) , _) β¦ = U
Given some x in F, we define a map taking x to its downwards-closure.
β-clos : stage β± β β£ Pβ β£F
β-clos x = xβ , down-DC
where
xβ = Ξ» y β y β[ P ] x
down-DC : [ isDownwardsClosed P xβ ]
down-DC z y zβx yβz = β[ P ]-trans y z x yβz zβx
xβxβ : (x : stage β±) β x β (Ξ» - β - β[ P ] x)
xβxβ x = dir (β[ P ]-refl x)
By composing this with the covering nucleus, we define a map e from F to Pβ.
e : β£ P β£β β β£ Pβ β£F
e z = (Ξ» a β (a β (Οβ (β-clos z))) , squash) , NTS
where
NTS : [ isDownwardsClosed P (Ξ» a β (a β (Ξ» - β - β[ P ] z)) , squash) ]
NTS _ _ x y = β-lemβ (Ξ» _ _ xβy yβz β β[ P ]-trans _ _ z yβz xβy) y x
We can further refine the codomain of e to L. In other words, we can prove that j (e x) = e x for every x. We call the version e with the refined codomain Ξ·.
fixing : (x : β£ P β£β) β π (e x) β‘ e x
fixing x = β[ pos Pβ ]-antisym (π (e x)) (e x) down up
where
down : β y β [ Οβ (π (e x)) y ] β [ Οβ (e x) y ]
down = β-lemβ (Οβ (e x)) (Οβ (β-clos x)) (Ξ» _ q β q)
up : [ e x β[ pos Pβ ] π (e x) ]
up = Οβ (Οβ π-nuclear) (e x)
Ξ· : stage β± β β£ L β£F
Ξ· x = e x , fixing x
Furthermore, Ξ· is a monotonic map.
Ξ·m : P βmβ pos L
Ξ·m = Ξ· , Ξ·-mono
where
Ξ·-mono : isMonotonic P (pos L) Ξ·
Ξ·-mono x y xβy = β-lemβ (Οβ (β-clos x)) (Οβ (β-clos y)) NTS
where
NTS : (u : β£ P β£β) β [ u β Οβ (β-clos x) ] β u β Οβ (β-clos y)
NTS _ p = β-lemβ (Οβ (β-clos y)) p (dir xβy)