-------------------------------------------------------------------------------- title: Properties of frame homomorphisms author: Ayberk Tosun date-started: 2024-04-10 dates-updated: [2024-05-06] -------------------------------------------------------------------------------- Originally written as part of the `Locales.Frame` module on 2021-03-09. Factored out from the `Locales.Frame` module on 2024-04-10. \begin{code}[hide] {-# OPTIONS --safe --without-K #-} open import MLTT.Spartan hiding (π; β; β) open import UF.Base open import UF.FunExt open import UF.PropTrunc module Locales.ContinuousMap.FrameHomomorphism-Properties (pt : propositional-truncations-exist) (fe : Fun-Ext) where open import Locales.ContinuousMap.FrameHomomorphism-Definition pt fe open import Locales.Frame pt fe open import Slice.Family open import UF.Logic open import UF.Subsingletons open import UF.SubtypeClassifier open AllCombinators pt fe \end{code} We work in a module parameterized by two frames. \begin{code} module FrameHomomorphismProperties (F : Frame π€ π₯ π¦) (G : Frame π€' π₯' π¦) where open FrameHomomorphisms using (_βfβ_) open FrameHomomorphisms F G hiding (_βfβ_) \end{code} The following lemma says that if the underlying functions of two frame homomorphisms are extensionally equal, then the frame homomorphisms are equal. \begin{code} to-frame-homomorphism-οΌ : (hβ hβ : F βfβ G) β ((x : β¨ F β©) β hβ .prβ x οΌ hβ .prβ x) β hβ οΌ hβ to-frame-homomorphism-οΌ hβ hβ Ο = to-subtype-οΌ β (dfunext fe Ο) where β : (f : β¨ F β© β β¨ G β©) β is-prop (is-a-frame-homomorphism f holds) β f = holds-is-prop (is-a-frame-homomorphism f) \end{code} \begin{code} frame-morphisms-are-monotonic : (h : β¨ F β© β β¨ G β©) β is-a-frame-homomorphism h holds β is-monotonic (poset-of F) (poset-of G) h holds frame-morphisms-are-monotonic f (_ , Ο , _) (x , y) p = f x β€β¨ β β© f (x β§[ F ] y) β€β¨ β ‘ β© f x β§[ G ] f y β€β¨ β ’ β© f y β where open PosetReasoning (poset-of G) β = reflexivity+ (poset-of G) (ap f (connecting-lemmaβ F p)) β ‘ = reflexivity+ (poset-of G) (Ο x y) β ’ = β§[ G ]-lowerβ (f x) (f y) \end{code} \begin{code} monotone-map-of : (F βfβ G) β poset-of F βmβ poset-of G monotone-map-of h = fun h , β where β : is-monotonic (poset-of F) (poset-of G) (prβ h) holds β = frame-morphisms-are-monotonic (prβ h) (prβ h) \end{code} \begin{code} meet-preserving-implies-monotone : (h : β¨ F β© β β¨ G β©) β preserves-binary-meets h holds β is-monotonic (poset-of F) (poset-of G) h holds meet-preserving-implies-monotone h ΞΌ (x , y) p = h x οΌβ¨ i β©β h (x β§[ F ] y) οΌβ¨ ii β©β h x β§[ G ] h y β€β¨ iii β© h y β where open PosetReasoning (poset-of G) i = ap h (connecting-lemmaβ F p) ii = ΞΌ x y iii = β§[ G ]-lowerβ (h x) (h y) \end{code} \begin{code} frame-homomorphisms-preserve-bottom : (h : F βfβ G) β h .prβ π[ F ] οΌ π[ G ] frame-homomorphisms-preserve-bottom π½@(h , _ , _ , Ξ³) = only-π-is-below-π G (π½ .prβ π[ F ]) β where β : (h π[ F ] β€[ poset-of G ] π[ G ]) holds β = prβ (Ξ³ (β _)) ((β[ G ] β π¦) , Ξ» ()) \end{code} \begin{code} frame-homomorphisms-preserve-binary-joins : (h : F βfβ G) β (x y : β¨ F β©) β h .prβ (x β¨[ F ] y) οΌ (h .prβ x) β¨[ G ] (h .prβ y) frame-homomorphisms-preserve-binary-joins π½@(h , _ , _ , Ξ³) x y = β[ G ]-unique β h x , h y β (h (x β¨[ F ] y)) (β , β‘) where open Joins (Ξ» x y β x β€[ poset-of G ] y) β : (h (x β¨[ F ] y) is-an-upper-bound-of β h x , h y β) holds β (inl β) = prβ (Ξ³ β x , y β) (inl β) β (inr β) = prβ (Ξ³ β x , y β) (inr β) β‘ : ((u , _) : upper-bound β h x , h y β) β (h (x β¨[ F ] y) β€[ poset-of G ] u) holds β‘ (u , p) = prβ (Ξ³ β x , y β) (u , q) where q : (u is-an-upper-bound-of β h z β£ z Ξ΅ β x , y β β) holds q (inl β) = p (inl β) q (inr β) = p (inr β) \end{code} Added on 2024-05-06. \begin{code} sections-are-order-embeddings : (P : Poset π€ π₯) (Q : Poset π€' π₯') β (s : β£ P β£β β β£ Q β£β) β (r : β£ Q β£β β β£ P β£β ) β is-monotonic Q P r holds β r β s βΌ id β {x y : β£ P β£β} β (s x β€[ Q ] s y β x β€[ P ] y) holds sections-are-order-embeddings P Q s r π Ο {x} {y} p = transportβ (Ξ» x y β (x β€[ P ] y) holds) (Ο x) (Ο y) β where β : (r (s x) β€[ P ] r (s y)) holds β = π (s x , s y) p \end{code}