From 15bcc35bd161d26f7fc1d7c62e99a8b673c7f884 Mon Sep 17 00:00:00 2001 From: Trebor-Huang <2300936257@qq.com> Date: Thu, 23 Feb 2023 14:31:11 +0800 Subject: [PATCH 01/27] Preliminary definition of dcpo presentations --- .../Presentation/Presentation.lagda | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 source/DomainTheory/Presentation/Presentation.lagda diff --git a/source/DomainTheory/Presentation/Presentation.lagda b/source/DomainTheory/Presentation/Presentation.lagda new file mode 100644 index 000000000..f159bc618 --- /dev/null +++ b/source/DomainTheory/Presentation/Presentation.lagda @@ -0,0 +1,40 @@ +(...) + +\begin{code} +{-# OPTIONS --without-K --exact-split --safe --auto-inline #-} +open import MLTT.Spartan hiding (J) + +open import UF.FunExt +open import UF.PropTrunc +open import UF.Subsingletons + +module DomainTheory.Presentation.Presentation + (pt : propositional-truncations-exist) + (fe : Fun-Ext) + (𝓀 π“₯ 𝓦 : Universe) + where + +open import UF.Powerset +open import Posets.Poset fe +open PosetAxioms + +open import DomainTheory.Basics.Dcpo pt fe π“₯ + +module _ + (G : 𝓀 Μ‡) -- Generators + (_≲_ : G β†’ G β†’ 𝓣 Μ‡) + where + + cover-set : 𝓀 βŠ” π“₯ ⁺ βŠ” 𝓦 ⁺ Μ‡ + cover-set = G β†’ {I : π“₯ Μ‡} β†’ (I β†’ G) β†’ Ξ© 𝓦 + + is-dcpo-presentation : cover-set β†’ 𝓀 βŠ” π“₯ ⁺ βŠ” 𝓦 βŠ” 𝓣 Μ‡ + is-dcpo-presentation _β—ƒ_ = ≲-prop-valued Γ— ≲-reflexive Γ— ≲-transitive Γ— cover-directed + where + ≲-prop-valued = {x y : G} β†’ is-prop (x ≲ y) + ≲-reflexive = {x : G} β†’ x ≲ x + ≲-transitive = {x y z : G} β†’ x ≲ y β†’ y ≲ z β†’ x ≲ z + cover-directed = {x : G} {I : π“₯ Μ‡} {U : I β†’ G} β†’ (x β—ƒ U) holds + β†’ is-directed _≲_ U + +\end{code} From 1e194b9ca0c94297420b75d5bb2ae0e739de86f3 Mon Sep 17 00:00:00 2001 From: Trebor-Huang <2300936257@qq.com> Date: Fri, 24 Feb 2023 10:37:37 +0800 Subject: [PATCH 02/27] Interpretation --- .../Presentation/Presentation.lagda | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/source/DomainTheory/Presentation/Presentation.lagda b/source/DomainTheory/Presentation/Presentation.lagda index f159bc618..8695df7d3 100644 --- a/source/DomainTheory/Presentation/Presentation.lagda +++ b/source/DomainTheory/Presentation/Presentation.lagda @@ -19,6 +19,7 @@ open import Posets.Poset fe open PosetAxioms open import DomainTheory.Basics.Dcpo pt fe π“₯ +open import DomainTheory.Basics.Miscelanea pt fe π“₯ module _ (G : 𝓀 Μ‡) -- Generators @@ -37,4 +38,25 @@ module _ cover-directed = {x : G} {I : π“₯ Μ‡} {U : I β†’ G} β†’ (x β—ƒ U) holds β†’ is-directed _≲_ U + -- TODO: Define structure and projections + -- and characterize paths (better paths using powersets) + + module Interpretation + (_β—ƒ_ : cover-set) + (β—ƒ-is-dcpo-presentation : is-dcpo-presentation _β—ƒ_) + {D : DCPO {𝓀} {𝓣}} + where -- Defines maps from a presentation into dcpos + + private + U-is-directed : {x : G} {I : π“₯ Μ‡} {U : I β†’ G} β†’ (x β—ƒ U) holds + β†’ is-directed _≲_ U + U-is-directed = β—ƒ-is-dcpo-presentation .prβ‚‚ .prβ‚‚ .prβ‚‚ + + preserves-covers : (f : G β†’ ⟨ D ⟩) + β†’ ({x y : G} β†’ x ≲ y β†’ f x βŠ‘βŸ¨ D ⟩ f y) + β†’ 𝓀 βŠ” π“₯ ⁺ βŠ” 𝓦 βŠ” 𝓣 Μ‡ + preserves-covers f m = {x : G} {I : π“₯ Μ‡} {U : I β†’ G} + β†’ (c : (x β—ƒ U) holds) + β†’ f x βŠ‘βŸ¨ D ⟩ ∐ D {! U-is-directed c !} + \end{code} From 89788c57cd96b33aaea6c75889fd526b08e590b3 Mon Sep 17 00:00:00 2001 From: Trebor-Huang <2300936257@qq.com> Date: Fri, 24 Feb 2023 10:52:36 +0800 Subject: [PATCH 03/27] Refactor `image-is-directed` --- source/DomainTheory/Basics/Exponential.lagda | 4 +- source/DomainTheory/Basics/Miscelanea.lagda | 37 ++++++++++++------- source/DomainTheory/Lifting/LiftingDcpo.lagda | 4 +- 3 files changed, 27 insertions(+), 18 deletions(-) diff --git a/source/DomainTheory/Basics/Exponential.lagda b/source/DomainTheory/Basics/Exponential.lagda index 8ee831b03..924e2c695 100644 --- a/source/DomainTheory/Basics/Exponential.lagda +++ b/source/DomainTheory/Basics/Exponential.lagda @@ -197,7 +197,7 @@ DCPO-∘-is-continuous₁ 𝓓 𝓔 𝓔' f I Ξ± Ξ΄ = Ξ² : I β†’ ⟨ 𝓓 βŸΉα΅ˆαΆœα΅–α΅’ 𝓔' ⟩ Ξ² i = DCPO-∘ 𝓓 𝓔 𝓔' f (Ξ± i) Ξ΅ : is-Directed (𝓓 βŸΉα΅ˆαΆœα΅–α΅’ 𝓔') Ξ² - Ξ΅ = image-is-directed (𝓔 βŸΉα΅ˆαΆœα΅–α΅’ 𝓔') (𝓓 βŸΉα΅ˆαΆœα΅–α΅’ 𝓔') {DCPO-∘ 𝓓 𝓔 𝓔' f} + Ξ΅ = image-is-Directed (𝓔 βŸΉα΅ˆαΆœα΅–α΅’ 𝓔') (𝓓 βŸΉα΅ˆαΆœα΅–α΅’ 𝓔') {DCPO-∘ 𝓓 𝓔 𝓔' f} (DCPO-∘-is-monotone₁ 𝓓 𝓔 𝓔' f) {I} {Ξ±} Ξ΄ Ξ³ : DCPO-∘ 𝓓 𝓔 𝓔' f (∐ (𝓔 βŸΉα΅ˆαΆœα΅–α΅’ 𝓔') {I} {Ξ±} Ξ΄) = ∐ (𝓓 βŸΉα΅ˆαΆœα΅–α΅’ 𝓔') {I} {Ξ²} Ξ΅ Ξ³ = to-continuous-function-= 𝓓 𝓔' ψ @@ -229,7 +229,7 @@ DCPO-∘-is-continuousβ‚‚ 𝓓 𝓔 𝓔' g I Ξ± Ξ΄ = Ξ² : I β†’ ⟨ 𝓓 βŸΉα΅ˆαΆœα΅–α΅’ 𝓔' ⟩ Ξ² i = DCPO-∘ 𝓓 𝓔 𝓔' (Ξ± i) g Ξ΅ : is-Directed (𝓓 βŸΉα΅ˆαΆœα΅–α΅’ 𝓔') Ξ² - Ξ΅ = image-is-directed (𝓓 βŸΉα΅ˆαΆœα΅–α΅’ 𝓔) (𝓓 βŸΉα΅ˆαΆœα΅–α΅’ 𝓔') {Ξ» f β†’ DCPO-∘ 𝓓 𝓔 𝓔' f g} + Ξ΅ = image-is-Directed (𝓓 βŸΉα΅ˆαΆœα΅–α΅’ 𝓔) (𝓓 βŸΉα΅ˆαΆœα΅–α΅’ 𝓔') {Ξ» f β†’ DCPO-∘ 𝓓 𝓔 𝓔' f g} (DCPO-∘-is-monotoneβ‚‚ 𝓓 𝓔 𝓔' g) {I} {Ξ±} Ξ΄ Ξ³ : DCPO-∘ 𝓓 𝓔 𝓔' (∐ (𝓓 βŸΉα΅ˆαΆœα΅–α΅’ 𝓔) {I} {Ξ±} Ξ΄) g = ∐ (𝓓 βŸΉα΅ˆαΆœα΅–α΅’ 𝓔') {I} {Ξ²} Ξ΅ Ξ³ = to-continuous-function-= 𝓓 𝓔' ψ diff --git a/source/DomainTheory/Basics/Miscelanea.lagda b/source/DomainTheory/Basics/Miscelanea.lagda index 15e4f3f2a..e090ca833 100644 --- a/source/DomainTheory/Basics/Miscelanea.lagda +++ b/source/DomainTheory/Basics/Miscelanea.lagda @@ -98,19 +98,28 @@ Lemmas for establishing Scott continuity of maps between dcpos. \begin{code} -image-is-directed : (𝓓 : DCPO {𝓀} {𝓣}) (𝓔 : DCPO {𝓀'} {𝓣'}) +image-is-directed : {D : 𝓀 Μ‡} {E : 𝓀' Μ‡} + β†’ (_βŠ‘_ : D β†’ D β†’ 𝓣 Μ‡ ) (_≀_ : E β†’ E β†’ 𝓣' Μ‡ ) + β†’ {f : D β†’ E} β†’ ((x y : D) β†’ x βŠ‘ y β†’ f x ≀ f y) + β†’ {I : π“₯ Μ‡ } β†’ {Ξ± : I β†’ D} + β†’ is-directed _βŠ‘_ Ξ± + β†’ is-directed _≀_ (f ∘ Ξ±) +image-is-directed _βŠ‘_ _≀_ {f} m {I} {Ξ±} Ξ΄ = + inhabited-if-directed _βŠ‘_ Ξ± Ξ΄ , Ξ³ + where + Ξ³ : is-semidirected _≀_ (f ∘ Ξ±) + Ξ³ i j = βˆ₯βˆ₯-functor (Ξ» (k , u , v) β†’ k , m (Ξ± i) (Ξ± k) u , m (Ξ± j) (Ξ± k) v) + (semidirected-if-directed _βŠ‘_ Ξ± Ξ΄ i j) + +image-is-Directed : (𝓓 : DCPO {𝓀} {𝓣}) (𝓔 : DCPO {𝓀'} {𝓣'}) {f : ⟨ 𝓓 ⟩ β†’ ⟨ 𝓔 ⟩} β†’ is-monotone 𝓓 𝓔 f β†’ {I : π“₯ Μ‡ } β†’ {Ξ± : I β†’ ⟨ 𝓓 ⟩} β†’ is-Directed 𝓓 Ξ± β†’ is-Directed 𝓔 (f ∘ Ξ±) -image-is-directed 𝓓 𝓔 {f} m {I} {Ξ±} Ξ΄ = - inhabited-if-Directed 𝓓 Ξ± Ξ΄ , Ξ³ - where - Ξ³ : is-semidirected (underlying-order 𝓔) (f ∘ Ξ±) - Ξ³ i j = βˆ₯βˆ₯-functor (Ξ» (k , u , v) β†’ k , m (Ξ± i) (Ξ± k) u , m (Ξ± j) (Ξ± k) v) - (semidirected-if-Directed 𝓓 Ξ± Ξ΄ i j) +image-is-Directed 𝓓 𝓔 m Ξ΄ = + image-is-directed (underlying-order 𝓓) (underlying-order 𝓔) m Ξ΄ continuity-criterion : (𝓓 : DCPO {𝓀} {𝓣}) (𝓔 : DCPO {𝓀'} {𝓣'}) (f : ⟨ 𝓓 ⟩ β†’ ⟨ 𝓔 ⟩) @@ -118,14 +127,14 @@ continuity-criterion : (𝓓 : DCPO {𝓀} {𝓣}) (𝓔 : DCPO {𝓀'} {𝓣'}) β†’ ((I : π“₯ Μ‡ ) (Ξ± : I β†’ ⟨ 𝓓 ⟩) (Ξ΄ : is-Directed 𝓓 Ξ±) - β†’ f (∐ 𝓓 Ξ΄) βŠ‘βŸ¨ 𝓔 ⟩ ∐ 𝓔 (image-is-directed 𝓓 𝓔 m Ξ΄)) + β†’ f (∐ 𝓓 Ξ΄) βŠ‘βŸ¨ 𝓔 ⟩ ∐ 𝓔 (image-is-Directed 𝓓 𝓔 m Ξ΄)) β†’ is-continuous 𝓓 𝓔 f continuity-criterion 𝓓 𝓔 f m e I Ξ± Ξ΄ = ub , lb-of-ubs where ub : (i : I) β†’ f (Ξ± i) βŠ‘βŸ¨ 𝓔 ⟩ f (∐ 𝓓 Ξ΄) ub i = m (Ξ± i) (∐ 𝓓 Ξ΄) (∐-is-upperbound 𝓓 Ξ΄ i) Ξ΅ : is-Directed 𝓔 (f ∘ Ξ±) - Ξ΅ = image-is-directed 𝓓 𝓔 m Ξ΄ + Ξ΅ = image-is-Directed 𝓓 𝓔 m Ξ΄ lb-of-ubs : is-lowerbound-of-upperbounds (underlying-order 𝓔) (f (∐ 𝓓 Ξ΄)) (f ∘ Ξ±) lb-of-ubs y u = f (∐ 𝓓 Ξ΄) βŠ‘βŸ¨ 𝓔 ⟩[ e I Ξ± Ξ΄ ] @@ -180,7 +189,7 @@ image-is-directed' : (𝓓 : DCPO {𝓀} {𝓣}) (𝓔 : DCPO {𝓀'} {𝓣'}) (f : DCPO[ 𝓓 , 𝓔 ]) {I : π“₯ Μ‡} {Ξ± : I β†’ ⟨ 𝓓 ⟩} β†’ is-Directed 𝓓 Ξ± β†’ is-Directed 𝓔 ([ 𝓓 , 𝓔 ]⟨ f ⟩ ∘ Ξ±) -image-is-directed' 𝓓 𝓔 f {I} {Ξ±} Ξ΄ = image-is-directed 𝓓 𝓔 m Ξ΄ +image-is-directed' 𝓓 𝓔 f {I} {Ξ±} Ξ΄ = image-is-Directed 𝓓 𝓔 m Ξ΄ where m : is-monotone 𝓓 𝓔 [ 𝓓 , 𝓔 ]⟨ f ⟩ m = monotone-if-continuous 𝓓 𝓔 f @@ -245,9 +254,9 @@ id-is-continuous : (𝓓 : DCPO {𝓀} {𝓣}) β†’ is-continuous 𝓓 𝓓 id id-is-continuous 𝓓 = continuity-criterion 𝓓 𝓓 id (id-is-monotone 𝓓) Ξ³ where Ξ³ : (I : π“₯ Μ‡) (Ξ± : I β†’ ⟨ 𝓓 ⟩) (Ξ΄ : is-Directed 𝓓 Ξ±) - β†’ ∐ 𝓓 Ξ΄ βŠ‘βŸ¨ 𝓓 ⟩ ∐ 𝓓 (image-is-directed 𝓓 𝓓 (Ξ» x y l β†’ l) Ξ΄) + β†’ ∐ 𝓓 Ξ΄ βŠ‘βŸ¨ 𝓓 ⟩ ∐ 𝓓 (image-is-Directed 𝓓 𝓓 (Ξ» x y l β†’ l) Ξ΄) Ξ³ I Ξ± Ξ΄ = =-to-βŠ‘ 𝓓 (∐-independent-of-directedness-witness 𝓓 - Ξ΄ (image-is-directed 𝓓 𝓓 (Ξ» x y l β†’ l) Ξ΄)) + Ξ΄ (image-is-Directed 𝓓 𝓓 (Ξ» x y l β†’ l) Ξ΄)) ∘-is-continuous : (𝓓 : DCPO {𝓀} {𝓣}) (𝓔 : DCPO {𝓀'} {𝓣'}) (𝓔' : DCPO {𝓦} {𝓦'}) (f : ⟨ 𝓓 ⟩ β†’ ⟨ 𝓔 ⟩) (g : ⟨ 𝓔 ⟩ β†’ ⟨ 𝓔' ⟩) @@ -263,14 +272,14 @@ id-is-continuous 𝓓 = continuity-criterion 𝓓 𝓓 id (id-is-monotone 𝓓) m : is-monotone 𝓓 𝓔' (g ∘ f) m x y l = mg (f x) (f y) (mf x y l) ψ : (I : π“₯ Μ‡) (Ξ± : I β†’ ⟨ 𝓓 ⟩) (Ξ΄ : is-Directed 𝓓 Ξ±) - β†’ g (f (∐ 𝓓 Ξ΄)) βŠ‘βŸ¨ 𝓔' ⟩ ∐ 𝓔' (image-is-directed 𝓓 𝓔' m Ξ΄) + β†’ g (f (∐ 𝓓 Ξ΄)) βŠ‘βŸ¨ 𝓔' ⟩ ∐ 𝓔' (image-is-Directed 𝓓 𝓔' m Ξ΄) ψ I Ξ± Ξ΄ = g (f (∐ 𝓓 Ξ΄)) βŠ‘βŸ¨ 𝓔' ⟩[ l₁ ] g (∐ 𝓔 Ξ΅f) βŠ‘βŸ¨ 𝓔' ⟩[ lβ‚‚ ] ∐ 𝓔' Ξ΅g βŠ‘βŸ¨ 𝓔' ⟩[ l₃ ] ∐ 𝓔' Ξ΅ ∎⟨ 𝓔' ⟩ where Ξ΅ : is-Directed 𝓔' (g ∘ f ∘ Ξ±) - Ξ΅ = image-is-directed 𝓓 𝓔' m Ξ΄ + Ξ΅ = image-is-Directed 𝓓 𝓔' m Ξ΄ Ξ΅f : is-Directed 𝓔 (f ∘ Ξ±) Ξ΅f = image-is-directed' 𝓓 𝓔 (f , cf) Ξ΄ Ξ΅g : is-Directed 𝓔' (g ∘ f ∘ Ξ±) diff --git a/source/DomainTheory/Lifting/LiftingDcpo.lagda b/source/DomainTheory/Lifting/LiftingDcpo.lagda index 52ff4b72d..f2c0c87c1 100644 --- a/source/DomainTheory/Lifting/LiftingDcpo.lagda +++ b/source/DomainTheory/Lifting/LiftingDcpo.lagda @@ -240,14 +240,14 @@ dcpo. where Ξ³ : (I : π“₯ Μ‡) (Ξ± : I β†’ ⟨ 𝓛-DCPO ⟩) (Ξ΄ : is-Directed 𝓛-DCPO Ξ±) β†’ fΜƒ (∐ 𝓛-DCPO {I} {Ξ±} Ξ΄) βŠ‘βŸͺ 𝓔 ⟫ - ∐ (𝓔 ⁻) (image-is-directed 𝓛-DCPO (𝓔 ⁻) fΜƒ-is-monotone {I} {Ξ±} Ξ΄) + ∐ (𝓔 ⁻) (image-is-Directed 𝓛-DCPO (𝓔 ⁻) fΜƒ-is-monotone {I} {Ξ±} Ξ΄) Ξ³ I Ξ± Ξ΄ = ∐˒˒-is-lowerbound-of-upperbounds 𝓔 (f ∘ value s) (being-defined-is-prop s) (∐ (𝓔 ⁻) Ξ΅) lem where s : ⟨ 𝓛-DCPO ⟩ s = ∐ 𝓛-DCPO {I} {Ξ±} Ξ΄ Ξ΅ : is-Directed (𝓔 ⁻) (fΜƒ ∘ Ξ±) - Ξ΅ = image-is-directed 𝓛-DCPO (𝓔 ⁻) fΜƒ-is-monotone {I} {Ξ±} Ξ΄ + Ξ΅ = image-is-Directed 𝓛-DCPO (𝓔 ⁻) fΜƒ-is-monotone {I} {Ξ±} Ξ΄ lem : (q : is-defined s) β†’ f (value s q) βŠ‘βŸͺ 𝓔 ⟫ ∐ (𝓔 ⁻) Ξ΅ lem q = f (value s q) βŠ‘βŸͺ 𝓔 ⟫[ β¦…1⦆ ] f (∐ 𝓓 Ξ΄') βŠ‘βŸͺ 𝓔 ⟫[ β¦…2⦆ ] From 8942871ffc20085a504cdaa519b77c7b259f2621 Mon Sep 17 00:00:00 2001 From: Trebor-Huang <2300936257@qq.com> Date: Fri, 24 Feb 2023 11:04:54 +0800 Subject: [PATCH 04/27] Define cover preserving map --- source/DomainTheory/Presentation/Presentation.lagda | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/source/DomainTheory/Presentation/Presentation.lagda b/source/DomainTheory/Presentation/Presentation.lagda index 8695df7d3..e0805294e 100644 --- a/source/DomainTheory/Presentation/Presentation.lagda +++ b/source/DomainTheory/Presentation/Presentation.lagda @@ -44,7 +44,7 @@ module _ module Interpretation (_β—ƒ_ : cover-set) (β—ƒ-is-dcpo-presentation : is-dcpo-presentation _β—ƒ_) - {D : DCPO {𝓀} {𝓣}} + {𝓓 : DCPO {𝓀} {𝓣}} where -- Defines maps from a presentation into dcpos private @@ -52,11 +52,13 @@ module _ β†’ is-directed _≲_ U U-is-directed = β—ƒ-is-dcpo-presentation .prβ‚‚ .prβ‚‚ .prβ‚‚ - preserves-covers : (f : G β†’ ⟨ D ⟩) - β†’ ({x y : G} β†’ x ≲ y β†’ f x βŠ‘βŸ¨ D ⟩ f y) + _≀_ = underlying-order 𝓓 + + preserves-covers : (f : G β†’ ⟨ 𝓓 ⟩) + β†’ ((x y : G) β†’ x ≲ y β†’ f x βŠ‘βŸ¨ 𝓓 ⟩ f y) β†’ 𝓀 βŠ” π“₯ ⁺ βŠ” 𝓦 βŠ” 𝓣 Μ‡ preserves-covers f m = {x : G} {I : π“₯ Μ‡} {U : I β†’ G} β†’ (c : (x β—ƒ U) holds) - β†’ f x βŠ‘βŸ¨ D ⟩ ∐ D {! U-is-directed c !} + β†’ f x βŠ‘βŸ¨ 𝓓 ⟩ ∐ 𝓓 (image-is-directed _≲_ _≀_ m (U-is-directed c)) \end{code} From 0d84848105476b7fa904ca91fc5619bea85d370c Mon Sep 17 00:00:00 2001 From: Trebor-Huang <2300936257@qq.com> Date: Fri, 24 Feb 2023 13:09:02 +0800 Subject: [PATCH 05/27] Projections --- .../Presentation/Presentation.lagda | 56 +++++++++++-------- 1 file changed, 32 insertions(+), 24 deletions(-) diff --git a/source/DomainTheory/Presentation/Presentation.lagda b/source/DomainTheory/Presentation/Presentation.lagda index e0805294e..a3c5f6a79 100644 --- a/source/DomainTheory/Presentation/Presentation.lagda +++ b/source/DomainTheory/Presentation/Presentation.lagda @@ -11,7 +11,7 @@ open import UF.Subsingletons module DomainTheory.Presentation.Presentation (pt : propositional-truncations-exist) (fe : Fun-Ext) - (𝓀 π“₯ 𝓦 : Universe) + {𝓀 π“₯ 𝓦 : Universe} -- TODO clear universe levels where open import UF.Powerset @@ -26,39 +26,47 @@ module _ (_≲_ : G β†’ G β†’ 𝓣 Μ‡) where - cover-set : 𝓀 βŠ” π“₯ ⁺ βŠ” 𝓦 ⁺ Μ‡ - cover-set = G β†’ {I : π“₯ Μ‡} β†’ (I β†’ G) β†’ Ξ© 𝓦 + Cover-set : 𝓀 βŠ” π“₯ ⁺ βŠ” 𝓦 ⁺ Μ‡ + Cover-set = G β†’ {I : π“₯ Μ‡} β†’ (I β†’ G) β†’ Ξ© 𝓦 - is-dcpo-presentation : cover-set β†’ 𝓀 βŠ” π“₯ ⁺ βŠ” 𝓦 βŠ” 𝓣 Μ‡ - is-dcpo-presentation _β—ƒ_ = ≲-prop-valued Γ— ≲-reflexive Γ— ≲-transitive Γ— cover-directed + is-dcpo-presentation : Cover-set β†’ 𝓀 βŠ” π“₯ ⁺ βŠ” 𝓦 βŠ” 𝓣 Μ‡ + is-dcpo-presentation _β—ƒ_ = (≲-prop-valued Γ— ≲-reflexive Γ— ≲-transitive) Γ— Cover-directed where ≲-prop-valued = {x y : G} β†’ is-prop (x ≲ y) ≲-reflexive = {x : G} β†’ x ≲ x ≲-transitive = {x y z : G} β†’ x ≲ y β†’ y ≲ z β†’ x ≲ z - cover-directed = {x : G} {I : π“₯ Μ‡} {U : I β†’ G} β†’ (x β—ƒ U) holds + Cover-directed = {x : G} {I : π“₯ Μ‡} {U : I β†’ G} β†’ (x β—ƒ U) holds β†’ is-directed _≲_ U - -- TODO: Define structure and projections - -- and characterize paths (better paths using powersets) +DCPO-Presentation : {𝓣 : Universe} β†’ (𝓀 βŠ” π“₯ βŠ” 𝓦 βŠ” 𝓣)⁺ Μ‡ +DCPO-Presentation {𝓣} = Ξ£ G κž‰ 𝓀 Μ‡ , Ξ£ _βŠ‘_ κž‰ (G β†’ G β†’ 𝓣 Μ‡) , + Ξ£ _β—ƒ_ κž‰ (Cover-set G _βŠ‘_) , (is-dcpo-presentation G _βŠ‘_ _β—ƒ_) - module Interpretation - (_β—ƒ_ : cover-set) - (β—ƒ-is-dcpo-presentation : is-dcpo-presentation _β—ƒ_) - {𝓓 : DCPO {𝓀} {𝓣}} - where -- Defines maps from a presentation into dcpos +module _ (𝓖 : DCPO-Presentation {𝓣}) where + ⟨_βŸ©β‚š : 𝓀 Μ‡ -- We need a uniform way to refer to underlying sets + ⟨_βŸ©β‚š = 𝓖 .pr₁ - private - U-is-directed : {x : G} {I : π“₯ Μ‡} {U : I β†’ G} β†’ (x β—ƒ U) holds - β†’ is-directed _≲_ U - U-is-directed = β—ƒ-is-dcpo-presentation .prβ‚‚ .prβ‚‚ .prβ‚‚ + underlying-preorder = 𝓖 .prβ‚‚ .pr₁ + + cover-set = 𝓖 .prβ‚‚ .prβ‚‚ .pr₁ -- better syntax? + + cover-directed = 𝓖 .prβ‚‚ .prβ‚‚ .prβ‚‚ .prβ‚‚ + +module Interpretation + (𝓖 : DCPO-Presentation {𝓣}) + (𝓓 : DCPO {𝓀} {𝓣}) + where -- Defines maps from a presentation into dcpos - _≀_ = underlying-order 𝓓 + private + _≀_ = underlying-order 𝓓 + _≲_ = underlying-preorder 𝓖 + _β—ƒ_ = cover-set 𝓖 - preserves-covers : (f : G β†’ ⟨ 𝓓 ⟩) - β†’ ((x y : G) β†’ x ≲ y β†’ f x βŠ‘βŸ¨ 𝓓 ⟩ f y) - β†’ 𝓀 βŠ” π“₯ ⁺ βŠ” 𝓦 βŠ” 𝓣 Μ‡ - preserves-covers f m = {x : G} {I : π“₯ Μ‡} {U : I β†’ G} - β†’ (c : (x β—ƒ U) holds) - β†’ f x βŠ‘βŸ¨ 𝓓 ⟩ ∐ 𝓓 (image-is-directed _≲_ _≀_ m (U-is-directed c)) + preserves-covers : (f : ⟨ 𝓖 βŸ©β‚š β†’ ⟨ 𝓓 ⟩) + β†’ ((x y : ⟨ 𝓖 βŸ©β‚š) β†’ x ≲ y β†’ f x ≀ f y) + β†’ 𝓀 βŠ” π“₯ ⁺ βŠ” 𝓦 βŠ” 𝓣 Μ‡ + preserves-covers f m = {x : ⟨ 𝓖 βŸ©β‚š} {I : π“₯ Μ‡} {U : I β†’ ⟨ 𝓖 βŸ©β‚š} + β†’ (c : (x β—ƒ U) holds) + β†’ f x ≀ ∐ 𝓓 (image-is-directed _≲_ _≀_ m (cover-directed 𝓖 c)) \end{code} From da91febe5637cac91b4d3b2693195f1ad82ff255 Mon Sep 17 00:00:00 2001 From: Trebor-Huang <2300936257@qq.com> Date: Fri, 24 Feb 2023 17:08:48 +0800 Subject: [PATCH 06/27] C-Ideals --- .../DomainTheory/Presentation/C-Ideal.lagda | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 source/DomainTheory/Presentation/C-Ideal.lagda diff --git a/source/DomainTheory/Presentation/C-Ideal.lagda b/source/DomainTheory/Presentation/C-Ideal.lagda new file mode 100644 index 000000000..07c838556 --- /dev/null +++ b/source/DomainTheory/Presentation/C-Ideal.lagda @@ -0,0 +1,48 @@ + + +\begin{code} +{-# OPTIONS --without-K --exact-split --safe --auto-inline #-} +open import MLTT.Spartan hiding (J) + +open import UF.FunExt +open import UF.PropTrunc +open import UF.Subsingletons +open import UF.Subsingletons-FunExt + +module DomainTheory.Presentation.C-Ideal + (pt : propositional-truncations-exist) + (fe : Fun-Ext) + {𝓀 π“₯ 𝓦 : Universe} + where + +open import UF.Powerset +open import UF.ImageAndSurjection pt +open import Posets.Poset fe +open PosetAxioms + +open import DomainTheory.Basics.Dcpo pt fe π“₯ +open import DomainTheory.Basics.Miscelanea pt fe π“₯ +open import DomainTheory.Presentation.Presentation pt fe {𝓀} {π“₯} {𝓦} + +module C-Ideal + (G : 𝓀 Μ‡) + (_≲_ : G β†’ G β†’ 𝓣 Μ‡) + (_β—ƒ_ : Cover-set G _≲_) + (β„‘ : G β†’ Ξ© 𝓣') + where + + is-C-ideal : 𝓀 βŠ” π“₯ ⁺ βŠ” 𝓦 βŠ” 𝓣 βŠ” 𝓣' Μ‡ + is-C-ideal = downward-closed Γ— cover-closed + where + downward-closed = βˆ€ x y β†’ x ≲ y + β†’ β„‘ x holds β†’ β„‘ y holds + cover-closed = βˆ€ I x (U : I β†’ G) β†’ (x β—ƒ U) holds + β†’ (βˆ€ y β†’ y ∈image U β†’ β„‘ y holds) + β†’ β„‘ x holds + + being-C-ideal-is-prop : is-prop is-C-ideal + being-C-ideal-is-prop = Γ—-is-prop + (Ξ β‚„-is-prop fe Ξ» _ _ _ _ β†’ holds-is-prop (β„‘ _)) + (Ξ β‚…-is-prop fe Ξ» _ _ _ _ _ β†’ holds-is-prop (β„‘ _)) + +\end{code} From 49d9265923bcc2285455933f371608c4e0933539 Mon Sep 17 00:00:00 2001 From: Trebor-Huang <2300936257@qq.com> Date: Fri, 24 Feb 2023 17:35:50 +0800 Subject: [PATCH 07/27] =?UTF-8?q?Use=20=E2=88=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/DomainTheory/Presentation/C-Ideal.lagda | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/DomainTheory/Presentation/C-Ideal.lagda b/source/DomainTheory/Presentation/C-Ideal.lagda index 07c838556..c6d8f490c 100644 --- a/source/DomainTheory/Presentation/C-Ideal.lagda +++ b/source/DomainTheory/Presentation/C-Ideal.lagda @@ -35,14 +35,14 @@ module C-Ideal is-C-ideal = downward-closed Γ— cover-closed where downward-closed = βˆ€ x y β†’ x ≲ y - β†’ β„‘ x holds β†’ β„‘ y holds + β†’ x ∈ β„‘ β†’ y ∈ β„‘ cover-closed = βˆ€ I x (U : I β†’ G) β†’ (x β—ƒ U) holds - β†’ (βˆ€ y β†’ y ∈image U β†’ β„‘ y holds) - β†’ β„‘ x holds + β†’ (βˆ€ y β†’ y ∈image U β†’ y ∈ β„‘) + β†’ x ∈ β„‘ being-C-ideal-is-prop : is-prop is-C-ideal being-C-ideal-is-prop = Γ—-is-prop - (Ξ β‚„-is-prop fe Ξ» _ _ _ _ β†’ holds-is-prop (β„‘ _)) - (Ξ β‚…-is-prop fe Ξ» _ _ _ _ _ β†’ holds-is-prop (β„‘ _)) + (Ξ β‚„-is-prop fe Ξ» _ _ _ _ β†’ ∈-is-prop β„‘ _) + (Ξ β‚…-is-prop fe Ξ» _ _ _ _ _ β†’ ∈-is-prop β„‘ _) \end{code} From 3b323ccbfb4ef984bca160a2a8bd86ff7fd33d06 Mon Sep 17 00:00:00 2001 From: Trebor-Huang <2300936257@qq.com> Date: Fri, 24 Feb 2023 17:44:36 +0800 Subject: [PATCH 08/27] Start to define C-Idl --- .../DomainTheory/Presentation/C-Ideal.lagda | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/source/DomainTheory/Presentation/C-Ideal.lagda b/source/DomainTheory/Presentation/C-Ideal.lagda index c6d8f490c..035028a89 100644 --- a/source/DomainTheory/Presentation/C-Ideal.lagda +++ b/source/DomainTheory/Presentation/C-Ideal.lagda @@ -24,7 +24,7 @@ open import DomainTheory.Basics.Dcpo pt fe π“₯ open import DomainTheory.Basics.Miscelanea pt fe π“₯ open import DomainTheory.Presentation.Presentation pt fe {𝓀} {π“₯} {𝓦} -module C-Ideal +module C-Ideal {𝓣'} (G : 𝓀 Μ‡) (_≲_ : G β†’ G β†’ 𝓣 Μ‡) (_β—ƒ_ : Cover-set G _≲_) @@ -45,4 +45,21 @@ module C-Ideal (Ξ β‚„-is-prop fe Ξ» _ _ _ _ β†’ ∈-is-prop β„‘ _) (Ξ β‚…-is-prop fe Ξ» _ _ _ _ _ β†’ ∈-is-prop β„‘ _) +module _ {𝓣'} + (G : 𝓀 Μ‡) + (_≲_ : G β†’ G β†’ 𝓣 Μ‡) + (_β—ƒ_ : Cover-set G _≲_) where + open C-Ideal {𝓣' = 𝓣'} G _≲_ _β—ƒ_ + + C-Idl = Ξ£ is-C-ideal + + carrier : C-Idl β†’ G β†’ Ξ© 𝓣' + carrier (β„‘ , _) = β„‘ + + C-ideality : (π“˜ : C-Idl) β†’ is-C-ideal (carrier π“˜) + C-ideality (_ , i) = i + + _βŠ‘_ : C-Idl β†’ C-Idl β†’ 𝓀 βŠ” 𝓣' Μ‡ + (β„‘ , β„‘-is-ideal) βŠ‘ (𝔍 , 𝔍-is-ideal) = β„‘ βŠ† 𝔍 + \end{code} From 30934f32448a90850d8cc48f2baf161345b51ce1 Mon Sep 17 00:00:00 2001 From: Trebor-Huang <2300936257@qq.com> Date: Fri, 24 Feb 2023 22:54:06 +0800 Subject: [PATCH 09/27] Impredicative ideal generation --- .../DomainTheory/Presentation/C-Ideal.lagda | 75 ++++++++++++------- 1 file changed, 48 insertions(+), 27 deletions(-) diff --git a/source/DomainTheory/Presentation/C-Ideal.lagda b/source/DomainTheory/Presentation/C-Ideal.lagda index 035028a89..1d1d13b40 100644 --- a/source/DomainTheory/Presentation/C-Ideal.lagda +++ b/source/DomainTheory/Presentation/C-Ideal.lagda @@ -24,42 +24,63 @@ open import DomainTheory.Basics.Dcpo pt fe π“₯ open import DomainTheory.Basics.Miscelanea pt fe π“₯ open import DomainTheory.Presentation.Presentation pt fe {𝓀} {π“₯} {𝓦} -module C-Ideal {𝓣'} + +-- TODO put this at the right place +Conjunction : (I : 𝓣' Μ‡) β†’ (I β†’ Ξ© 𝓣) β†’ Ξ© (𝓣 βŠ” 𝓣') +Conjunction I ps = (βˆ€ i β†’ ps i holds) , Ξ -is-prop fe Ξ» _ β†’ holds-is-prop (ps _) + +syntax Conjunction I (Ξ» i β†’ p) = β‹€ i κž‰ I , p + +module C-Ideal (G : 𝓀 Μ‡) (_≲_ : G β†’ G β†’ 𝓣 Μ‡) (_β—ƒ_ : Cover-set G _≲_) - (β„‘ : G β†’ Ξ© 𝓣') - where - - is-C-ideal : 𝓀 βŠ” π“₯ ⁺ βŠ” 𝓦 βŠ” 𝓣 βŠ” 𝓣' Μ‡ - is-C-ideal = downward-closed Γ— cover-closed - where - downward-closed = βˆ€ x y β†’ x ≲ y - β†’ x ∈ β„‘ β†’ y ∈ β„‘ - cover-closed = βˆ€ I x (U : I β†’ G) β†’ (x β—ƒ U) holds - β†’ (βˆ€ y β†’ y ∈image U β†’ y ∈ β„‘) - β†’ x ∈ β„‘ - - being-C-ideal-is-prop : is-prop is-C-ideal - being-C-ideal-is-prop = Γ—-is-prop + where + + is-C-ideal : (G β†’ Ξ© 𝓣') β†’ 𝓀 βŠ” π“₯ ⁺ βŠ” 𝓦 βŠ” 𝓣 βŠ” 𝓣' Μ‡ + is-C-ideal β„‘ = downward-closed Γ— cover-closed + where + downward-closed = βˆ€ x y β†’ x ≲ y + β†’ x ∈ β„‘ β†’ y ∈ β„‘ + cover-closed = βˆ€ I x (U : I β†’ G) β†’ (x β—ƒ U) holds + β†’ (βˆ€ y β†’ y ∈image U β†’ y ∈ β„‘) + β†’ x ∈ β„‘ + + being-C-ideal-is-prop : (β„‘ : G β†’ Ξ© 𝓣') β†’ is-prop (is-C-ideal β„‘) + being-C-ideal-is-prop β„‘ = Γ—-is-prop (Ξ β‚„-is-prop fe Ξ» _ _ _ _ β†’ ∈-is-prop β„‘ _) (Ξ β‚…-is-prop fe Ξ» _ _ _ _ _ β†’ ∈-is-prop β„‘ _) -module _ {𝓣'} - (G : 𝓀 Μ‡) - (_≲_ : G β†’ G β†’ 𝓣 Μ‡) - (_β—ƒ_ : Cover-set G _≲_) where - open C-Ideal {𝓣' = 𝓣'} G _≲_ _β—ƒ_ + intersection-is-C-ideal : {I : π“₯' Μ‡} (β„‘s : I β†’ G β†’ Ξ© 𝓣') + β†’ (βˆ€ i β†’ is-C-ideal (β„‘s i)) + β†’ is-C-ideal Ξ» g β†’ β‹€ i κž‰ _ , β„‘s i g + intersection-is-C-ideal β„‘s ΞΉs = dc , cc + where + dc = Ξ» x y x≲y xβˆˆβ„‘s i β†’ pr₁ (ΞΉs i) x y x≲y (xβˆˆβ„‘s i) + cc = Ξ» J g U gβ—ƒU c i β†’ prβ‚‚ (ΞΉs i) J g U gβ—ƒU Ξ» g' g'∈U β†’ c g' g'∈U i + + C-Idl : βˆ€ 𝓣' β†’ 𝓀 βŠ” π“₯ ⁺ βŠ” 𝓦 βŠ” 𝓣 βŠ” 𝓣' ⁺ Μ‡ + C-Idl 𝓣' = Ξ£ (is-C-ideal {𝓣' = 𝓣'}) + + module _ {𝓣' : Universe} where + carrier : C-Idl 𝓣' β†’ G β†’ Ξ© 𝓣' + carrier (β„‘ , _) = β„‘ + + C-ideality : (π“˜ : C-Idl 𝓣') β†’ is-C-ideal (carrier π“˜) + C-ideality (_ , ΞΉ) = ΞΉ - C-Idl = Ξ£ is-C-ideal + _βŠ‘_ : C-Idl 𝓣' β†’ C-Idl 𝓣' β†’ 𝓀 βŠ” 𝓣' Μ‡ + (β„‘ , β„‘-is-ideal) βŠ‘ (𝔍 , 𝔍-is-ideal) = β„‘ βŠ† 𝔍 - carrier : C-Idl β†’ G β†’ Ξ© 𝓣' - carrier (β„‘ , _) = β„‘ + -- The impredicatively generated C-ideal from a set + Generated : (𝓣' : Universe) β†’ (G β†’ Ξ© π“₯') β†’ C-Idl (𝓀 βŠ” (π“₯ ⁺) βŠ” 𝓦 βŠ” 𝓣 βŠ” π“₯' βŠ” (𝓣' ⁺)) + Generated 𝓣' S = (Ξ» g β†’ β‹€ ((β„‘ , _) , _) κž‰ -- Too messy + (Ξ£ (β„‘ , _) κž‰ C-Idl 𝓣' , S βŠ† β„‘), β„‘ g) , + intersection-is-C-ideal (pr₁ ∘ pr₁) (prβ‚‚ ∘ pr₁) - C-ideality : (π“˜ : C-Idl) β†’ is-C-ideal (carrier π“˜) - C-ideality (_ , i) = i + Generated-contains : (S : G β†’ Ξ© π“₯') β†’ S βŠ† carrier (Generated 𝓣' S) + Generated-contains S g g∈S ((β„‘ , ΞΉ), SβŠ†β„‘) = SβŠ†β„‘ g g∈S - _βŠ‘_ : C-Idl β†’ C-Idl β†’ 𝓀 βŠ” 𝓣' Μ‡ - (β„‘ , β„‘-is-ideal) βŠ‘ (𝔍 , 𝔍-is-ideal) = β„‘ βŠ† 𝔍 + -- Universal property \end{code} From cb5d45c77e3111099a001a056a58ffd4641cf50a Mon Sep 17 00:00:00 2001 From: Trebor-Huang <2300936257@qq.com> Date: Fri, 24 Feb 2023 23:55:53 +0800 Subject: [PATCH 10/27] Sort out universe levels --- source/DomainTheory/Presentation/C-Ideal.lagda | 8 ++++---- .../DomainTheory/Presentation/Presentation.lagda | 16 ++++++++++------ 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/source/DomainTheory/Presentation/C-Ideal.lagda b/source/DomainTheory/Presentation/C-Ideal.lagda index 1d1d13b40..291797793 100644 --- a/source/DomainTheory/Presentation/C-Ideal.lagda +++ b/source/DomainTheory/Presentation/C-Ideal.lagda @@ -12,7 +12,7 @@ open import UF.Subsingletons-FunExt module DomainTheory.Presentation.C-Ideal (pt : propositional-truncations-exist) (fe : Fun-Ext) - {𝓀 π“₯ 𝓦 : Universe} + {𝓀 𝓣 π“₯ 𝓦 : Universe} where open import UF.Powerset @@ -22,11 +22,11 @@ open PosetAxioms open import DomainTheory.Basics.Dcpo pt fe π“₯ open import DomainTheory.Basics.Miscelanea pt fe π“₯ -open import DomainTheory.Presentation.Presentation pt fe {𝓀} {π“₯} {𝓦} +open import DomainTheory.Presentation.Presentation pt fe {𝓀} {𝓣} {π“₯} {𝓦} -- TODO put this at the right place -Conjunction : (I : 𝓣' Μ‡) β†’ (I β†’ Ξ© 𝓣) β†’ Ξ© (𝓣 βŠ” 𝓣') +Conjunction : (I : 𝓀' Μ‡) β†’ (I β†’ Ξ© π“₯') β†’ Ξ© (𝓀' βŠ” π“₯') Conjunction I ps = (βˆ€ i β†’ ps i holds) , Ξ -is-prop fe Ξ» _ β†’ holds-is-prop (ps _) syntax Conjunction I (Ξ» i β†’ p) = β‹€ i κž‰ I , p @@ -73,7 +73,7 @@ module C-Ideal (β„‘ , β„‘-is-ideal) βŠ‘ (𝔍 , 𝔍-is-ideal) = β„‘ βŠ† 𝔍 -- The impredicatively generated C-ideal from a set - Generated : (𝓣' : Universe) β†’ (G β†’ Ξ© π“₯') β†’ C-Idl (𝓀 βŠ” (π“₯ ⁺) βŠ” 𝓦 βŠ” 𝓣 βŠ” π“₯' βŠ” (𝓣' ⁺)) + Generated : βˆ€ 𝓣' β†’ (G β†’ Ξ© π“₯') β†’ C-Idl (𝓀 βŠ” π“₯ ⁺ βŠ” 𝓦 βŠ” 𝓣 βŠ” π“₯' βŠ” 𝓣' ⁺) Generated 𝓣' S = (Ξ» g β†’ β‹€ ((β„‘ , _) , _) κž‰ -- Too messy (Ξ£ (β„‘ , _) κž‰ C-Idl 𝓣' , S βŠ† β„‘), β„‘ g) , intersection-is-C-ideal (pr₁ ∘ pr₁) (prβ‚‚ ∘ pr₁) diff --git a/source/DomainTheory/Presentation/Presentation.lagda b/source/DomainTheory/Presentation/Presentation.lagda index a3c5f6a79..61672e9e7 100644 --- a/source/DomainTheory/Presentation/Presentation.lagda +++ b/source/DomainTheory/Presentation/Presentation.lagda @@ -11,7 +11,11 @@ open import UF.Subsingletons module DomainTheory.Presentation.Presentation (pt : propositional-truncations-exist) (fe : Fun-Ext) - {𝓀 π“₯ 𝓦 : Universe} -- TODO clear universe levels + {𝓀 𝓣 π“₯ 𝓦 : Universe} + -- 𝓀 : the universe of the underlying set + -- 𝓣 : the universe of the preorder + -- π“₯ : the universe of the indices of directed sets + -- 𝓦 : the universe of covering sets where open import UF.Powerset @@ -26,7 +30,7 @@ module _ (_≲_ : G β†’ G β†’ 𝓣 Μ‡) where - Cover-set : 𝓀 βŠ” π“₯ ⁺ βŠ” 𝓦 ⁺ Μ‡ + Cover-set : 𝓀 βŠ” π“₯ ⁺ βŠ” 𝓦 ⁺ Μ‡ -- This one has spurious assumptions Cover-set = G β†’ {I : π“₯ Μ‡} β†’ (I β†’ G) β†’ Ξ© 𝓦 is-dcpo-presentation : Cover-set β†’ 𝓀 βŠ” π“₯ ⁺ βŠ” 𝓦 βŠ” 𝓣 Μ‡ @@ -38,11 +42,11 @@ module _ Cover-directed = {x : G} {I : π“₯ Μ‡} {U : I β†’ G} β†’ (x β—ƒ U) holds β†’ is-directed _≲_ U -DCPO-Presentation : {𝓣 : Universe} β†’ (𝓀 βŠ” π“₯ βŠ” 𝓦 βŠ” 𝓣)⁺ Μ‡ -DCPO-Presentation {𝓣} = Ξ£ G κž‰ 𝓀 Μ‡ , Ξ£ _βŠ‘_ κž‰ (G β†’ G β†’ 𝓣 Μ‡) , +DCPO-Presentation : (𝓀 βŠ” π“₯ βŠ” 𝓦 βŠ” 𝓣)⁺ Μ‡ +DCPO-Presentation = Ξ£ G κž‰ 𝓀 Μ‡ , Ξ£ _βŠ‘_ κž‰ (G β†’ G β†’ 𝓣 Μ‡) , Ξ£ _β—ƒ_ κž‰ (Cover-set G _βŠ‘_) , (is-dcpo-presentation G _βŠ‘_ _β—ƒ_) -module _ (𝓖 : DCPO-Presentation {𝓣}) where +module _ (𝓖 : DCPO-Presentation) where ⟨_βŸ©β‚š : 𝓀 Μ‡ -- We need a uniform way to refer to underlying sets ⟨_βŸ©β‚š = 𝓖 .pr₁ @@ -53,7 +57,7 @@ module _ (𝓖 : DCPO-Presentation {𝓣}) where cover-directed = 𝓖 .prβ‚‚ .prβ‚‚ .prβ‚‚ .prβ‚‚ module Interpretation - (𝓖 : DCPO-Presentation {𝓣}) + (𝓖 : DCPO-Presentation) (𝓓 : DCPO {𝓀} {𝓣}) where -- Defines maps from a presentation into dcpos From 1b0095437aa0871d0a4c8d6fc65d7fcb22549ba5 Mon Sep 17 00:00:00 2001 From: Trebor-Huang <2300936257@qq.com> Date: Sat, 25 Feb 2023 16:29:26 +0800 Subject: [PATCH 11/27] WIP Suplattics of C-Ideals --- .../DomainTheory/Presentation/C-Ideal.lagda | 19 +++++++++++++++++++ source/Posets/FreeSupLattice.lagda | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/source/DomainTheory/Presentation/C-Ideal.lagda b/source/DomainTheory/Presentation/C-Ideal.lagda index 291797793..e3a431f26 100644 --- a/source/DomainTheory/Presentation/C-Ideal.lagda +++ b/source/DomainTheory/Presentation/C-Ideal.lagda @@ -16,9 +16,11 @@ module DomainTheory.Presentation.C-Ideal where open import UF.Powerset +open PropositionalTruncation pt open import UF.ImageAndSurjection pt open import Posets.Poset fe open PosetAxioms +open import Posets.FreeSupLattice pt open import DomainTheory.Basics.Dcpo pt fe π“₯ open import DomainTheory.Basics.Miscelanea pt fe π“₯ @@ -83,4 +85,21 @@ module C-Ideal -- Universal property + -- C-Ideals form a suplattice + -- set assumptions not included yet + C-Idl-SupLattice : βˆ€ 𝓣' 𝓦' β†’ SupLattice 𝓦' _ _ + C-Idl-SupLattice 𝓣' 𝓦' = record { + L = C-Idl (𝓀 βŠ” 𝓣 βŠ” (π“₯ ⁺) βŠ” 𝓦 βŠ” (𝓣' ⁺) βŠ” 𝓦') ; + L-is-set = _ ; + _βŠ‘_ = Ξ» (β„‘ , ΞΉ) (𝔍 , Ο…) β†’ β„‘ βŠ† 𝔍 ; + βŠ‘-is-prop-valued = _ ; + βŠ‘-is-reflexive = Ξ» _ _ β†’ id ; + βŠ‘-is-transitive = Ξ» _ _ _ β„‘βŠ†π” π”βŠ†π”Ž u iβˆˆβ„‘ β†’ π”βŠ†π”Ž u (β„‘βŠ†π” u iβˆˆβ„‘) ; + βŠ‘-is-antisymmetric = {! !} ; + ⋁ = Ξ» β„‘s β†’ Generated 𝓣' Ξ» g β†’ + (βˆƒ i κž‰ _ , g ∈ carrier (β„‘s i)) , βˆƒ-is-prop ; + ⋁-is-upperbound = {! !} ; + ⋁-is-lowerbound-of-upperbounds = {! !} + } + \end{code} diff --git a/source/Posets/FreeSupLattice.lagda b/source/Posets/FreeSupLattice.lagda index c5f1f3c1e..7903debb1 100644 --- a/source/Posets/FreeSupLattice.lagda +++ b/source/Posets/FreeSupLattice.lagda @@ -28,7 +28,7 @@ and syntax for reasoning about the order βŠ‘. \begin{code} -record SupLattice (π“₯ 𝓀 𝓣 : Universe) : 𝓀ω where +record SupLattice (π“₯ 𝓀 𝓣 : Universe) : π“₯ ⁺ βŠ” 𝓀 ⁺ βŠ” 𝓣 ⁺ Μ‡ where constructor lattice field From 5137639ee9568718f1e8ca884bb48172b13340f3 Mon Sep 17 00:00:00 2001 From: Jon Sterling Date: Sat, 25 Feb 2023 12:19:06 -0500 Subject: [PATCH 12/27] formatting: DomainTheory.Basics.Miscelanea Only regularizing the formatting of the code we are adding; this file needs attention/cleanup in a separate PR. --- source/DomainTheory/Basics/Miscelanea.lagda | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source/DomainTheory/Basics/Miscelanea.lagda b/source/DomainTheory/Basics/Miscelanea.lagda index e090ca833..d3b42c398 100644 --- a/source/DomainTheory/Basics/Miscelanea.lagda +++ b/source/DomainTheory/Basics/Miscelanea.lagda @@ -105,11 +105,11 @@ image-is-directed : {D : 𝓀 Μ‡} {E : 𝓀' Μ‡} β†’ is-directed _βŠ‘_ Ξ± β†’ is-directed _≀_ (f ∘ Ξ±) image-is-directed _βŠ‘_ _≀_ {f} m {I} {Ξ±} Ξ΄ = - inhabited-if-directed _βŠ‘_ Ξ± Ξ΄ , Ξ³ - where - Ξ³ : is-semidirected _≀_ (f ∘ Ξ±) - Ξ³ i j = βˆ₯βˆ₯-functor (Ξ» (k , u , v) β†’ k , m (Ξ± i) (Ξ± k) u , m (Ξ± j) (Ξ± k) v) - (semidirected-if-directed _βŠ‘_ Ξ± Ξ΄ i j) + inhabited-if-directed _βŠ‘_ Ξ± Ξ΄ , Ξ³ + where + Ξ³ : is-semidirected _≀_ (f ∘ Ξ±) + Ξ³ i j = βˆ₯βˆ₯-functor (Ξ» (k , u , v) β†’ k , m (Ξ± i) (Ξ± k) u , m (Ξ± j) (Ξ± k) v) + (semidirected-if-directed _βŠ‘_ Ξ± Ξ΄ i j) image-is-Directed : (𝓓 : DCPO {𝓀} {𝓣}) (𝓔 : DCPO {𝓀'} {𝓣'}) {f : ⟨ 𝓓 ⟩ β†’ ⟨ 𝓔 ⟩} @@ -119,7 +119,7 @@ image-is-Directed : (𝓓 : DCPO {𝓀} {𝓣}) (𝓔 : DCPO {𝓀'} {𝓣'}) β†’ is-Directed 𝓓 Ξ± β†’ is-Directed 𝓔 (f ∘ Ξ±) image-is-Directed 𝓓 𝓔 m Ξ΄ = - image-is-directed (underlying-order 𝓓) (underlying-order 𝓔) m Ξ΄ + image-is-directed (underlying-order 𝓓) (underlying-order 𝓔) m Ξ΄ continuity-criterion : (𝓓 : DCPO {𝓀} {𝓣}) (𝓔 : DCPO {𝓀'} {𝓣'}) (f : ⟨ 𝓓 ⟩ β†’ ⟨ 𝓔 ⟩) From b0e5f90b1269eb8dc934921be4ac29408a508052 Mon Sep 17 00:00:00 2001 From: Jon Sterling Date: Sat, 25 Feb 2023 12:26:21 -0500 Subject: [PATCH 13/27] formatting: DomainTheory.Presentation.C-Ideal --- .../DomainTheory/Presentation/C-Ideal.lagda | 80 ++++++++++++------- 1 file changed, 50 insertions(+), 30 deletions(-) diff --git a/source/DomainTheory/Presentation/C-Ideal.lagda b/source/DomainTheory/Presentation/C-Ideal.lagda index e3a431f26..47f2d9019 100644 --- a/source/DomainTheory/Presentation/C-Ideal.lagda +++ b/source/DomainTheory/Presentation/C-Ideal.lagda @@ -10,10 +10,10 @@ open import UF.Subsingletons open import UF.Subsingletons-FunExt module DomainTheory.Presentation.C-Ideal - (pt : propositional-truncations-exist) - (fe : Fun-Ext) - {𝓀 𝓣 π“₯ 𝓦 : Universe} - where + (pt : propositional-truncations-exist) + (fe : Fun-Ext) + {𝓀 𝓣 π“₯ 𝓦 : Universe} + where open import UF.Powerset open PropositionalTruncation pt @@ -29,7 +29,8 @@ open import DomainTheory.Presentation.Presentation pt fe {𝓀} {𝓣} {π“₯} { -- TODO put this at the right place Conjunction : (I : 𝓀' Μ‡) β†’ (I β†’ Ξ© π“₯') β†’ Ξ© (𝓀' βŠ” π“₯') -Conjunction I ps = (βˆ€ i β†’ ps i holds) , Ξ -is-prop fe Ξ» _ β†’ holds-is-prop (ps _) +pr₁ (Conjunction I ps) = βˆ€ i β†’ ps i holds +prβ‚‚ (Conjunction I ps) = Ξ -is-prop fe Ξ» _ β†’ holds-is-prop (ps _) syntax Conjunction I (Ξ» i β†’ p) = β‹€ i κž‰ I , p @@ -49,13 +50,15 @@ module C-Ideal β†’ x ∈ β„‘ being-C-ideal-is-prop : (β„‘ : G β†’ Ξ© 𝓣') β†’ is-prop (is-C-ideal β„‘) - being-C-ideal-is-prop β„‘ = Γ—-is-prop + being-C-ideal-is-prop β„‘ = + Γ—-is-prop (Ξ β‚„-is-prop fe Ξ» _ _ _ _ β†’ ∈-is-prop β„‘ _) (Ξ β‚…-is-prop fe Ξ» _ _ _ _ _ β†’ ∈-is-prop β„‘ _) - intersection-is-C-ideal : {I : π“₯' Μ‡} (β„‘s : I β†’ G β†’ Ξ© 𝓣') - β†’ (βˆ€ i β†’ is-C-ideal (β„‘s i)) - β†’ is-C-ideal Ξ» g β†’ β‹€ i κž‰ _ , β„‘s i g + intersection-is-C-ideal + : {I : π“₯' Μ‡} (β„‘s : I β†’ G β†’ Ξ© 𝓣') + β†’ (βˆ€ i β†’ is-C-ideal (β„‘s i)) + β†’ is-C-ideal Ξ» g β†’ β‹€ i κž‰ _ , β„‘s i g intersection-is-C-ideal β„‘s ΞΉs = dc , cc where dc = Ξ» x y x≲y xβˆˆβ„‘s i β†’ pr₁ (ΞΉs i) x y x≲y (xβˆˆβ„‘s i) @@ -65,41 +68,58 @@ module C-Ideal C-Idl 𝓣' = Ξ£ (is-C-ideal {𝓣' = 𝓣'}) module _ {𝓣' : Universe} where - carrier : C-Idl 𝓣' β†’ G β†’ Ξ© 𝓣' - carrier (β„‘ , _) = β„‘ + carrier : C-Idl 𝓣' β†’ G β†’ Ξ© 𝓣' + carrier (β„‘ , _) = β„‘ - C-ideality : (π“˜ : C-Idl 𝓣') β†’ is-C-ideal (carrier π“˜) - C-ideality (_ , ΞΉ) = ΞΉ + C-ideality : (π“˜ : C-Idl 𝓣') β†’ is-C-ideal (carrier π“˜) + C-ideality (_ , ΞΉ) = ΞΉ - _βŠ‘_ : C-Idl 𝓣' β†’ C-Idl 𝓣' β†’ 𝓀 βŠ” 𝓣' Μ‡ - (β„‘ , β„‘-is-ideal) βŠ‘ (𝔍 , 𝔍-is-ideal) = β„‘ βŠ† 𝔍 + _βŠ‘_ : C-Idl 𝓣' β†’ C-Idl 𝓣' β†’ 𝓀 βŠ” 𝓣' Μ‡ + (β„‘ , β„‘-is-ideal) βŠ‘ (𝔍 , 𝔍-is-ideal) = β„‘ βŠ† 𝔍 -- The impredicatively generated C-ideal from a set Generated : βˆ€ 𝓣' β†’ (G β†’ Ξ© π“₯') β†’ C-Idl (𝓀 βŠ” π“₯ ⁺ βŠ” 𝓦 βŠ” 𝓣 βŠ” π“₯' βŠ” 𝓣' ⁺) Generated 𝓣' S = (Ξ» g β†’ β‹€ ((β„‘ , _) , _) κž‰ -- Too messy - (Ξ£ (β„‘ , _) κž‰ C-Idl 𝓣' , S βŠ† β„‘), β„‘ g) , - intersection-is-C-ideal (pr₁ ∘ pr₁) (prβ‚‚ ∘ pr₁) + (Ξ£ (β„‘ , _) κž‰ C-Idl 𝓣' , S βŠ† β„‘), β„‘ g) , + intersection-is-C-ideal (pr₁ ∘ pr₁) (prβ‚‚ ∘ pr₁) Generated-contains : (S : G β†’ Ξ© π“₯') β†’ S βŠ† carrier (Generated 𝓣' S) Generated-contains S g g∈S ((β„‘ , ΞΉ), SβŠ†β„‘) = SβŠ†β„‘ g g∈S -- Universal property + private module SL = SupLattice -- C-Ideals form a suplattice -- set assumptions not included yet C-Idl-SupLattice : βˆ€ 𝓣' 𝓦' β†’ SupLattice 𝓦' _ _ - C-Idl-SupLattice 𝓣' 𝓦' = record { - L = C-Idl (𝓀 βŠ” 𝓣 βŠ” (π“₯ ⁺) βŠ” 𝓦 βŠ” (𝓣' ⁺) βŠ” 𝓦') ; - L-is-set = _ ; - _βŠ‘_ = Ξ» (β„‘ , ΞΉ) (𝔍 , Ο…) β†’ β„‘ βŠ† 𝔍 ; - βŠ‘-is-prop-valued = _ ; - βŠ‘-is-reflexive = Ξ» _ _ β†’ id ; - βŠ‘-is-transitive = Ξ» _ _ _ β„‘βŠ†π” π”βŠ†π”Ž u iβˆˆβ„‘ β†’ π”βŠ†π”Ž u (β„‘βŠ†π” u iβˆˆβ„‘) ; - βŠ‘-is-antisymmetric = {! !} ; - ⋁ = Ξ» β„‘s β†’ Generated 𝓣' Ξ» g β†’ - (βˆƒ i κž‰ _ , g ∈ carrier (β„‘s i)) , βˆƒ-is-prop ; - ⋁-is-upperbound = {! !} ; - ⋁-is-lowerbound-of-upperbounds = {! !} - } + SL.L (C-Idl-SupLattice 𝓣' 𝓦') = + C-Idl (𝓀 βŠ” 𝓣 βŠ” (π“₯ ⁺) βŠ” 𝓦 βŠ” (𝓣' ⁺) βŠ” 𝓦') + + SL.L-is-set (C-Idl-SupLattice 𝓣' 𝓦') = + {!!} + + SL._βŠ‘_ (C-Idl-SupLattice 𝓣' 𝓦') (β„‘ , ΞΉ) (𝔍 , Ο…) = + β„‘ βŠ† 𝔍 + + SL.βŠ‘-is-prop-valued (C-Idl-SupLattice 𝓣' 𝓦') = + {!!} + + SL.βŠ‘-is-reflexive (C-Idl-SupLattice 𝓣' 𝓦') _ _ = + id + + SL.βŠ‘-is-transitive (C-Idl-SupLattice 𝓣' 𝓦') _ _ _ β„‘βŠ†π” π”βŠ†π”Ž u iβˆˆβ„‘ = + π”βŠ†π”Ž u (β„‘βŠ†π” u iβˆˆβ„‘) + + SL.βŠ‘-is-antisymmetric (C-Idl-SupLattice 𝓣' 𝓦') = + {!!} + + SL.⋁ (C-Idl-SupLattice 𝓣' 𝓦') β„‘s = + Generated 𝓣' Ξ» g β†’ + (βˆƒ i κž‰ _ , g ∈ carrier (β„‘s i)) , βˆƒ-is-prop + + SL.⋁-is-upperbound (C-Idl-SupLattice 𝓣' 𝓦') = + {!!} + SL.⋁-is-lowerbound-of-upperbounds (C-Idl-SupLattice 𝓣' 𝓦') = + {!!} \end{code} From 1962bfc80f8b988b8fe9734abb9a263332c6e9a6 Mon Sep 17 00:00:00 2001 From: Jon Sterling Date: Sat, 25 Feb 2023 12:28:28 -0500 Subject: [PATCH 14/27] formatting: DomainTheory.Presentation.Presentation --- .../Presentation/Presentation.lagda | 83 ++++++++++--------- 1 file changed, 42 insertions(+), 41 deletions(-) diff --git a/source/DomainTheory/Presentation/Presentation.lagda b/source/DomainTheory/Presentation/Presentation.lagda index 61672e9e7..8941ccf39 100644 --- a/source/DomainTheory/Presentation/Presentation.lagda +++ b/source/DomainTheory/Presentation/Presentation.lagda @@ -9,14 +9,14 @@ open import UF.PropTrunc open import UF.Subsingletons module DomainTheory.Presentation.Presentation - (pt : propositional-truncations-exist) - (fe : Fun-Ext) - {𝓀 𝓣 π“₯ 𝓦 : Universe} - -- 𝓀 : the universe of the underlying set - -- 𝓣 : the universe of the preorder - -- π“₯ : the universe of the indices of directed sets - -- 𝓦 : the universe of covering sets - where + (pt : propositional-truncations-exist) + (fe : Fun-Ext) + {𝓀 𝓣 π“₯ 𝓦 : Universe} + -- 𝓀 : the universe of the underlying set + -- 𝓣 : the universe of the preorder + -- π“₯ : the universe of the indices of directed sets + -- 𝓦 : the universe of covering sets + where open import UF.Powerset open import Posets.Poset fe @@ -35,42 +35,43 @@ module _ is-dcpo-presentation : Cover-set β†’ 𝓀 βŠ” π“₯ ⁺ βŠ” 𝓦 βŠ” 𝓣 Μ‡ is-dcpo-presentation _β—ƒ_ = (≲-prop-valued Γ— ≲-reflexive Γ— ≲-transitive) Γ— Cover-directed - where - ≲-prop-valued = {x y : G} β†’ is-prop (x ≲ y) - ≲-reflexive = {x : G} β†’ x ≲ x - ≲-transitive = {x y z : G} β†’ x ≲ y β†’ y ≲ z β†’ x ≲ z - Cover-directed = {x : G} {I : π“₯ Μ‡} {U : I β†’ G} β†’ (x β—ƒ U) holds - β†’ is-directed _≲_ U + where + ≲-prop-valued = {x y : G} β†’ is-prop (x ≲ y) + ≲-reflexive = {x : G} β†’ x ≲ x + ≲-transitive = {x y z : G} β†’ x ≲ y β†’ y ≲ z β†’ x ≲ z + Cover-directed = {x : G} {I : π“₯ Μ‡} {U : I β†’ G} β†’ (x β—ƒ U) holds β†’ is-directed _≲_ U DCPO-Presentation : (𝓀 βŠ” π“₯ βŠ” 𝓦 βŠ” 𝓣)⁺ Μ‡ -DCPO-Presentation = Ξ£ G κž‰ 𝓀 Μ‡ , Ξ£ _βŠ‘_ κž‰ (G β†’ G β†’ 𝓣 Μ‡) , - Ξ£ _β—ƒ_ κž‰ (Cover-set G _βŠ‘_) , (is-dcpo-presentation G _βŠ‘_ _β—ƒ_) +DCPO-Presentation = + Ξ£ G κž‰ 𝓀 Μ‡ , + Ξ£ _βŠ‘_ κž‰ (G β†’ G β†’ 𝓣 Μ‡) , + Ξ£ _β—ƒ_ κž‰ (Cover-set G _βŠ‘_) , + (is-dcpo-presentation G _βŠ‘_ _β—ƒ_) module _ (𝓖 : DCPO-Presentation) where - ⟨_βŸ©β‚š : 𝓀 Μ‡ -- We need a uniform way to refer to underlying sets - ⟨_βŸ©β‚š = 𝓖 .pr₁ - - underlying-preorder = 𝓖 .prβ‚‚ .pr₁ - - cover-set = 𝓖 .prβ‚‚ .prβ‚‚ .pr₁ -- better syntax? - - cover-directed = 𝓖 .prβ‚‚ .prβ‚‚ .prβ‚‚ .prβ‚‚ - -module Interpretation - (𝓖 : DCPO-Presentation) - (𝓓 : DCPO {𝓀} {𝓣}) - where -- Defines maps from a presentation into dcpos - - private - _≀_ = underlying-order 𝓓 - _≲_ = underlying-preorder 𝓖 - _β—ƒ_ = cover-set 𝓖 - - preserves-covers : (f : ⟨ 𝓖 βŸ©β‚š β†’ ⟨ 𝓓 ⟩) - β†’ ((x y : ⟨ 𝓖 βŸ©β‚š) β†’ x ≲ y β†’ f x ≀ f y) - β†’ 𝓀 βŠ” π“₯ ⁺ βŠ” 𝓦 βŠ” 𝓣 Μ‡ - preserves-covers f m = {x : ⟨ 𝓖 βŸ©β‚š} {I : π“₯ Μ‡} {U : I β†’ ⟨ 𝓖 βŸ©β‚š} - β†’ (c : (x β—ƒ U) holds) - β†’ f x ≀ ∐ 𝓓 (image-is-directed _≲_ _≀_ m (cover-directed 𝓖 c)) + ⟨_βŸ©β‚š : 𝓀 Μ‡ -- We need a uniform way to refer to underlying sets + ⟨_βŸ©β‚š = 𝓖 .pr₁ + + underlying-preorder = 𝓖 .prβ‚‚ .pr₁ + + cover-set = 𝓖 .prβ‚‚ .prβ‚‚ .pr₁ -- better syntax? + + cover-directed = 𝓖 .prβ‚‚ .prβ‚‚ .prβ‚‚ .prβ‚‚ + +-- Defines maps from a presentation into dcpos +module Interpretation (𝓖 : DCPO-Presentation) (𝓓 : DCPO {𝓀} {𝓣}) where + private + _≀_ = underlying-order 𝓓 + _≲_ = underlying-preorder 𝓖 + _β—ƒ_ = cover-set 𝓖 + + preserves-covers + : (f : ⟨ 𝓖 βŸ©β‚š β†’ ⟨ 𝓓 ⟩) + β†’ ((x y : ⟨ 𝓖 βŸ©β‚š) β†’ x ≲ y β†’ f x ≀ f y) + β†’ 𝓀 βŠ” π“₯ ⁺ βŠ” 𝓦 βŠ” 𝓣 Μ‡ + preserves-covers f m = + {x : ⟨ 𝓖 βŸ©β‚š} {I : π“₯ Μ‡} {U : I β†’ ⟨ 𝓖 βŸ©β‚š} + β†’ (c : (x β—ƒ U) holds) + β†’ f x ≀ ∐ 𝓓 (image-is-directed _≲_ _≀_ m (cover-directed 𝓖 c)) \end{code} From dfe0d79c2dcad0fe962a1fb9bd4179190fef3556 Mon Sep 17 00:00:00 2001 From: Jon Sterling Date: Sat, 25 Feb 2023 12:29:05 -0500 Subject: [PATCH 15/27] rename DomainTheory.Presentation.Presentation => DomainTheory.Presentation.Type --- .../DomainTheory/Presentation/{Presentation.lagda => Type.lagda} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename source/DomainTheory/Presentation/{Presentation.lagda => Type.lagda} (100%) diff --git a/source/DomainTheory/Presentation/Presentation.lagda b/source/DomainTheory/Presentation/Type.lagda similarity index 100% rename from source/DomainTheory/Presentation/Presentation.lagda rename to source/DomainTheory/Presentation/Type.lagda From 5bc599601c457f53ae6a5fe15892bc366139d1a6 Mon Sep 17 00:00:00 2001 From: Jon Sterling Date: Sat, 25 Feb 2023 12:32:13 -0500 Subject: [PATCH 16/27] fix my mistake (unfinished rename) --- source/DomainTheory/Presentation/Type.lagda | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/DomainTheory/Presentation/Type.lagda b/source/DomainTheory/Presentation/Type.lagda index 8941ccf39..9ad0ab2bb 100644 --- a/source/DomainTheory/Presentation/Type.lagda +++ b/source/DomainTheory/Presentation/Type.lagda @@ -8,7 +8,7 @@ open import UF.FunExt open import UF.PropTrunc open import UF.Subsingletons -module DomainTheory.Presentation.Presentation +module DomainTheory.Presentation.Type (pt : propositional-truncations-exist) (fe : Fun-Ext) {𝓀 𝓣 π“₯ 𝓦 : Universe} From 5065a2e61b1b4cd90622d725c51a7ab8f15a4384 Mon Sep 17 00:00:00 2001 From: Trebor-Huang <2300936257@qq.com> Date: Tue, 28 Feb 2023 21:39:15 +0800 Subject: [PATCH 17/27] Define monotonicity --- source/Posets/Poset.lagda | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/source/Posets/Poset.lagda b/source/Posets/Poset.lagda index ca68abf9c..caee815e0 100644 --- a/source/Posets/Poset.lagda +++ b/source/Posets/Poset.lagda @@ -69,3 +69,24 @@ Added 25 August 2022, but added elsewhere in TypeTopology much earlier (June posets-are-sets = type-with-prop-valued-refl-antisym-rel-is-set _βŠ‘_ \end{code} + +Defines monotone functions. + +\begin{code} + + module MonotoneAxioms -- TODO find occurences of monotonicity and refactor + {D : 𝓀 Μ‡ } + (_βŠ‘_ : D β†’ D β†’ 𝓣 Μ‡ ) + {E : 𝓀' Μ‡ } + (_β‰Ό_ : E β†’ E β†’ 𝓣' Μ‡ ) + (f : D β†’ E) + where + + is-monotone = βˆ€ x y β†’ x βŠ‘ y β†’ f x β‰Ό f y + + open PosetAxioms _β‰Ό_ + + being-monotone-is-prop : is-prop-valued β†’ is-prop is-monotone + being-monotone-is-prop p = Π₃-is-prop fe Ξ» _ _ _ β†’ p _ _ + +\end{code} From d43a6b56ed59243b2a98444cde371a63553eb64c Mon Sep 17 00:00:00 2001 From: Trebor-Huang <2300936257@qq.com> Date: Tue, 28 Feb 2023 22:36:00 +0800 Subject: [PATCH 18/27] Closure --- source/Posets/Closure.lagda | 38 +++++++++++++++++++++++++++ source/Posets/KuratowskiClosure.lagda | 19 ++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 source/Posets/Closure.lagda create mode 100644 source/Posets/KuratowskiClosure.lagda diff --git a/source/Posets/Closure.lagda b/source/Posets/Closure.lagda new file mode 100644 index 000000000..fdbdb7047 --- /dev/null +++ b/source/Posets/Closure.lagda @@ -0,0 +1,38 @@ +We define closure operators on a poset as a monotone increasing function 𝑓 +such that 𝑓(π‘₯) β‰₯ π‘₯ and 𝑓(𝑓(π‘₯)) = 𝑓(π‘₯). + +\begin{code} + +{-# OPTIONS --without-K --exact-split --safe --auto-inline #-} + +open import MLTT.Spartan +open import UF.FunExt + +open import UF.Subsingletons +open import UF.Subsingletons-FunExt + +module Posets.Closure + (fe : Fun-Ext) + where +open import Posets.Poset fe + +module Closure + {D : 𝓀 Μ‡ } + (_βŠ‘_ : D β†’ D β†’ 𝓣 Μ‡ ) + (f : D β†’ D) + where + closure-Ξ· = βˆ€ x β†’ x βŠ‘ f x + closure-ΞΌ = βˆ€ x β†’ f (f x) βŠ‘ f x + + open PosetAxioms _βŠ‘_ -- TODO bundle more things + + idempotent + : closure-Ξ· + β†’ closure-ΞΌ + β†’ is-antisymmetric + β†’ βˆ€ x β†’ f (f x) = f x + idempotent Ξ· ΞΌ a x = a _ _ (ΞΌ _) (Ξ· _) + + +\end{code} + diff --git a/source/Posets/KuratowskiClosure.lagda b/source/Posets/KuratowskiClosure.lagda new file mode 100644 index 000000000..b74a02629 --- /dev/null +++ b/source/Posets/KuratowskiClosure.lagda @@ -0,0 +1,19 @@ +A Kuratowski closure operator is a closure operator that preserves joins. + +\begin{code} + +{-# OPTIONS --without-K --exact-split --safe --auto-inline #-} + +open import MLTT.Spartan +open import UF.FunExt + +open import UF.Subsingletons +open import UF.Subsingletons-FunExt + +module Posets.KuratowskiClosure + (fe : Fun-Ext) + where +open import Posets.Poset fe +open import Posets.Closure fe + +\end{code} From 9eedad1b36c7bf43aab4c85acb1d0198fcd7b9f4 Mon Sep 17 00:00:00 2001 From: Trebor-Huang <2300936257@qq.com> Date: Wed, 1 Mar 2023 13:22:48 +0800 Subject: [PATCH 19/27] Kuratowski closure --- source/Posets/JoinSemiLattices.lagda | 2 +- source/Posets/KuratowskiClosure.lagda | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/source/Posets/JoinSemiLattices.lagda b/source/Posets/JoinSemiLattices.lagda index 7344c2b40..c9131de99 100644 --- a/source/Posets/JoinSemiLattices.lagda +++ b/source/Posets/JoinSemiLattices.lagda @@ -16,7 +16,7 @@ open import Fin.Type open import UF.Subsingletons -record JoinSemiLattice (π“₯ 𝓣 : Universe) : 𝓀ω where +record JoinSemiLattice (π“₯ 𝓣 : Universe) : 𝓣 ⁺ βŠ” π“₯ ⁺ Μ‡ where field L : π“₯ Μ‡ L-is-set : is-set L diff --git a/source/Posets/KuratowskiClosure.lagda b/source/Posets/KuratowskiClosure.lagda index b74a02629..82f7e67ff 100644 --- a/source/Posets/KuratowskiClosure.lagda +++ b/source/Posets/KuratowskiClosure.lagda @@ -10,10 +10,26 @@ open import UF.FunExt open import UF.Subsingletons open import UF.Subsingletons-FunExt +open import Posets.JoinSemiLattices + module Posets.KuratowskiClosure (fe : Fun-Ext) where open import Posets.Poset fe open import Posets.Closure fe +module _ (D : JoinSemiLattice π“₯ 𝓣) where + open JoinSemiLattice D + open MonotoneAxioms _βŠ‘_ _βŠ‘_ + open Closure _βŠ‘_ + + kuratowski-closure-axioms : (L β†’ L) β†’ _ + kuratowski-closure-axioms f + = is-monotone f + Γ— (closure-Ξ· f Γ— closure-ΞΌ f) + Γ— (preserves-βŠ₯ Γ— preserves-∨) + where + preserves-βŠ₯ = f βŠ₯ = βŠ₯ + preserves-∨ = βˆ€ x y β†’ f (x ∨ y) = f x ∨ f y + \end{code} From 8d22030e1c81b90c1c62714780a26c038aab0b08 Mon Sep 17 00:00:00 2001 From: Trebor-Huang <2300936257@qq.com> Date: Fri, 10 Mar 2023 14:08:48 +0800 Subject: [PATCH 20/27] WIP suplattice closure --- source/Posets/Closure.lagda | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/source/Posets/Closure.lagda b/source/Posets/Closure.lagda index fdbdb7047..8432f4a41 100644 --- a/source/Posets/Closure.lagda +++ b/source/Posets/Closure.lagda @@ -7,12 +7,13 @@ such that 𝑓(π‘₯) β‰₯ π‘₯ and 𝑓(𝑓(π‘₯)) = 𝑓(π‘₯). open import MLTT.Spartan open import UF.FunExt - +open import UF.PropTrunc open import UF.Subsingletons open import UF.Subsingletons-FunExt module Posets.Closure (fe : Fun-Ext) + (pt : propositional-truncations-exist) where open import Posets.Poset fe @@ -32,7 +33,26 @@ module Closure β†’ is-antisymmetric β†’ βˆ€ x β†’ f (f x) = f x idempotent Ξ· ΞΌ a x = a _ _ (ΞΌ _) (Ξ· _) +\end{code} -\end{code} +If we have a closure operator on a suplattice, then the image is +also a suplattice. + +\begin{code} +open import Posets.FreeSupLattice pt +-- TODO we don't want the "free" part, factor the definition out +module _ (𝕃 : SupLattice 𝓀 π“₯ 𝓦) where + open SupLattice 𝕃 + open Closure _βŠ‘_ + + module SupLattice-Closure + (f : L β†’ L) + (f-is-monotone : βˆ€ x y β†’ x βŠ‘ y β†’ f x βŠ‘ f y) + (f-closure-Ξ· : closure-Ξ· f) + (f-closure-ΞΌ : closure-ΞΌ f) where + -- To avoid using UA early, image should be + -- defined using the universal property + +\end{code} From 605b3165a6746560fe6c7824ca73fe0a07506bff Mon Sep 17 00:00:00 2001 From: Trebor-Huang <2300936257@qq.com> Date: Fri, 10 Mar 2023 14:23:17 +0800 Subject: [PATCH 21/27] WIP suplattice closure --- source/Posets/Closure.lagda | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/source/Posets/Closure.lagda b/source/Posets/Closure.lagda index 8432f4a41..9b6c22011 100644 --- a/source/Posets/Closure.lagda +++ b/source/Posets/Closure.lagda @@ -43,16 +43,18 @@ also a suplattice. open import Posets.FreeSupLattice pt -- TODO we don't want the "free" part, factor the definition out module _ (𝕃 : SupLattice 𝓀 π“₯ 𝓦) where - open SupLattice 𝕃 - open Closure _βŠ‘_ + module 𝕃 = SupLattice 𝕃 + open Closure 𝕃._βŠ‘_ module SupLattice-Closure - (f : L β†’ L) - (f-is-monotone : βˆ€ x y β†’ x βŠ‘ y β†’ f x βŠ‘ f y) - (f-closure-Ξ· : closure-Ξ· f) - (f-closure-ΞΌ : closure-ΞΌ f) where + {D : 𝓀 Μ‡ } + (_βŠ‘_ : D β†’ D β†’ 𝓣 Μ‡ ) + (f : 𝕃.L β†’ D) + (f-is-monotone : βˆ€ x y β†’ x 𝕃.βŠ‘ y β†’ f x βŠ‘ f y) + (ΞΉ : D β†’ 𝕃.L) + (ΞΉ-is-monotome : βˆ€ x y β†’ x βŠ‘ y β†’ ΞΉ x 𝕃.βŠ‘ ΞΉ y) + (ι∘f-closure-Ξ· : closure-Ξ· (ΞΉ ∘ f)) + (ι∘f-closure-ΞΌ : closure-ΞΌ (ΞΉ ∘ f)) where - -- To avoid using UA early, image should be - -- defined using the universal property \end{code} From ed9c6f79b2d8bcd6ae607c193d41e3ff29f42679 Mon Sep 17 00:00:00 2001 From: Trebor-Huang <2300936257@qq.com> Date: Fri, 10 Mar 2023 14:25:14 +0800 Subject: [PATCH 22/27] Fix --- source/Posets/Closure.lagda | 2 +- source/Posets/KuratowskiClosure.lagda | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/source/Posets/Closure.lagda b/source/Posets/Closure.lagda index 9b6c22011..534afcaf1 100644 --- a/source/Posets/Closure.lagda +++ b/source/Posets/Closure.lagda @@ -43,7 +43,7 @@ also a suplattice. open import Posets.FreeSupLattice pt -- TODO we don't want the "free" part, factor the definition out module _ (𝕃 : SupLattice 𝓀 π“₯ 𝓦) where - module 𝕃 = SupLattice 𝕃 + private module 𝕃 = SupLattice 𝕃 open Closure 𝕃._βŠ‘_ module SupLattice-Closure diff --git a/source/Posets/KuratowskiClosure.lagda b/source/Posets/KuratowskiClosure.lagda index 82f7e67ff..657ff33ce 100644 --- a/source/Posets/KuratowskiClosure.lagda +++ b/source/Posets/KuratowskiClosure.lagda @@ -6,7 +6,7 @@ A Kuratowski closure operator is a closure operator that preserves joins. open import MLTT.Spartan open import UF.FunExt - +open import UF.PropTrunc open import UF.Subsingletons open import UF.Subsingletons-FunExt @@ -14,9 +14,10 @@ open import Posets.JoinSemiLattices module Posets.KuratowskiClosure (fe : Fun-Ext) + (pt : propositional-truncations-exist) where open import Posets.Poset fe -open import Posets.Closure fe +open import Posets.Closure fe pt module _ (D : JoinSemiLattice π“₯ 𝓣) where open JoinSemiLattice D From ada0ae31e3f24c1ffd6306031dcb0fc650fecec1 Mon Sep 17 00:00:00 2001 From: Trebor-Huang <2300936257@qq.com> Date: Fri, 10 Mar 2023 14:54:21 +0800 Subject: [PATCH 23/27] We don't need set assumptions! --- source/DomainTheory/Presentation/C-Ideal.lagda | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/source/DomainTheory/Presentation/C-Ideal.lagda b/source/DomainTheory/Presentation/C-Ideal.lagda index 47f2d9019..43422b450 100644 --- a/source/DomainTheory/Presentation/C-Ideal.lagda +++ b/source/DomainTheory/Presentation/C-Ideal.lagda @@ -12,9 +12,11 @@ open import UF.Subsingletons-FunExt module DomainTheory.Presentation.C-Ideal (pt : propositional-truncations-exist) (fe : Fun-Ext) + (pe : Prop-Ext) {𝓀 𝓣 π“₯ 𝓦 : Universe} where +open import UF.Retracts open import UF.Powerset open PropositionalTruncation pt open import UF.ImageAndSurjection pt @@ -24,7 +26,7 @@ open import Posets.FreeSupLattice pt open import DomainTheory.Basics.Dcpo pt fe π“₯ open import DomainTheory.Basics.Miscelanea pt fe π“₯ -open import DomainTheory.Presentation.Presentation pt fe {𝓀} {𝓣} {π“₯} {𝓦} +open import DomainTheory.Presentation.Type pt fe {𝓀} {𝓣} {π“₯} {𝓦} -- TODO put this at the right place @@ -90,19 +92,20 @@ module C-Ideal private module SL = SupLattice -- C-Ideals form a suplattice - -- set assumptions not included yet + -- TODO clean up fe and pe assumptions C-Idl-SupLattice : βˆ€ 𝓣' 𝓦' β†’ SupLattice 𝓦' _ _ SL.L (C-Idl-SupLattice 𝓣' 𝓦') = C-Idl (𝓀 βŠ” 𝓣 βŠ” (π“₯ ⁺) βŠ” 𝓦 βŠ” (𝓣' ⁺) βŠ” 𝓦') SL.L-is-set (C-Idl-SupLattice 𝓣' 𝓦') = - {!!} + Ξ£-is-set (Ξ -is-set fe Ξ» _ β†’ Ξ©-is-set fe pe) Ξ» β„‘ β†’ + props-are-sets (being-C-ideal-is-prop β„‘) SL._βŠ‘_ (C-Idl-SupLattice 𝓣' 𝓦') (β„‘ , ΞΉ) (𝔍 , Ο…) = β„‘ βŠ† 𝔍 - SL.βŠ‘-is-prop-valued (C-Idl-SupLattice 𝓣' 𝓦') = - {!!} + SL.βŠ‘-is-prop-valued (C-Idl-SupLattice 𝓣' 𝓦') _ 𝔍 = + Ξ β‚‚-is-prop fe Ξ» g _ β†’ holds-is-prop (carrier 𝔍 g) SL.βŠ‘-is-reflexive (C-Idl-SupLattice 𝓣' 𝓦') _ _ = id @@ -117,8 +120,8 @@ module C-Ideal Generated 𝓣' Ξ» g β†’ (βˆƒ i κž‰ _ , g ∈ carrier (β„‘s i)) , βˆƒ-is-prop - SL.⋁-is-upperbound (C-Idl-SupLattice 𝓣' 𝓦') = - {!!} + SL.⋁-is-upperbound (C-Idl-SupLattice 𝓣' 𝓦') β„‘ i g gβˆˆβ„‘i ((𝔍 , _ , _) , β„‘'βŠ†π”) = + β„‘'βŠ†π” g ∣ i , gβˆˆβ„‘i ∣ SL.⋁-is-lowerbound-of-upperbounds (C-Idl-SupLattice 𝓣' 𝓦') = {!!} From 4673b63f2bd16827ccceb10263f9ba9d84dcf1f0 Mon Sep 17 00:00:00 2001 From: Trebor-Huang <2300936257@qq.com> Date: Sun, 19 Mar 2023 19:07:27 +0800 Subject: [PATCH 24/27] Fill in some holes --- .../DomainTheory/Presentation/C-Ideal.lagda | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/source/DomainTheory/Presentation/C-Ideal.lagda b/source/DomainTheory/Presentation/C-Ideal.lagda index 43422b450..dca911ced 100644 --- a/source/DomainTheory/Presentation/C-Ideal.lagda +++ b/source/DomainTheory/Presentation/C-Ideal.lagda @@ -4,6 +4,7 @@ {-# OPTIONS --without-K --exact-split --safe --auto-inline #-} open import MLTT.Spartan hiding (J) +open import UF.Base open import UF.FunExt open import UF.PropTrunc open import UF.Subsingletons @@ -77,7 +78,12 @@ module C-Ideal C-ideality (_ , ΞΉ) = ΞΉ _βŠ‘_ : C-Idl 𝓣' β†’ C-Idl 𝓣' β†’ 𝓀 βŠ” 𝓣' Μ‡ - (β„‘ , β„‘-is-ideal) βŠ‘ (𝔍 , 𝔍-is-ideal) = β„‘ βŠ† 𝔍 + (β„‘ , _) βŠ‘ (𝔍 , _) = β„‘ βŠ† 𝔍 + + -- Characterize the equality of C-ideals + to-C-ideal-= : (I J : C-Idl 𝓣') β†’ carrier I = carrier J β†’ I = J + to-C-ideal-= (β„‘ , _) (𝔍 , Ο…) p = to-Ξ£-= + (p , being-C-ideal-is-prop 𝔍 _ _) -- The impredicatively generated C-ideal from a set Generated : βˆ€ 𝓣' β†’ (G β†’ Ξ© π“₯') β†’ C-Idl (𝓀 βŠ” π“₯ ⁺ βŠ” 𝓦 βŠ” 𝓣 βŠ” π“₯' βŠ” 𝓣' ⁺) @@ -113,16 +119,19 @@ module C-Ideal SL.βŠ‘-is-transitive (C-Idl-SupLattice 𝓣' 𝓦') _ _ _ β„‘βŠ†π” π”βŠ†π”Ž u iβˆˆβ„‘ = π”βŠ†π”Ž u (β„‘βŠ†π” u iβˆˆβ„‘) - SL.βŠ‘-is-antisymmetric (C-Idl-SupLattice 𝓣' 𝓦') = - {!!} + SL.βŠ‘-is-antisymmetric (C-Idl-SupLattice 𝓣' 𝓦') (β„‘ , ΞΉ) (𝔍 , Ο…) β„‘βŠ†π” π”βŠ†β„‘ = + to-C-ideal-= _ _ (dfunext fe (Ξ» g β†’ to-Ξ£-= + (pe (prβ‚‚ (β„‘ g)) (prβ‚‚ (𝔍 g)) (β„‘βŠ†π” g) (π”βŠ†β„‘ g) , + being-prop-is-prop fe _ _))) + -- This needs to-Ξ©-= somewhere in the library SL.⋁ (C-Idl-SupLattice 𝓣' 𝓦') β„‘s = Generated 𝓣' Ξ» g β†’ (βˆƒ i κž‰ _ , g ∈ carrier (β„‘s i)) , βˆƒ-is-prop - SL.⋁-is-upperbound (C-Idl-SupLattice 𝓣' 𝓦') β„‘ i g gβˆˆβ„‘i ((𝔍 , _ , _) , β„‘'βŠ†π”) = - β„‘'βŠ†π” g ∣ i , gβˆˆβ„‘i ∣ + SL.⋁-is-upperbound (C-Idl-SupLattice 𝓣' 𝓦') I i g g∈Ii ((𝔍 , _ , _) , β„‘βŠ†π”) = + β„‘βŠ†π” g ∣ i , g∈Ii ∣ - SL.⋁-is-lowerbound-of-upperbounds (C-Idl-SupLattice 𝓣' 𝓦') = - {!!} + SL.⋁-is-lowerbound-of-upperbounds (C-Idl-SupLattice 𝓣' 𝓦') = {! !} + -- This is not correct for universe reasons \end{code} From d0989b716eec5629a07af847f4e6948240bc014c Mon Sep 17 00:00:00 2001 From: Trebor-Huang <2300936257@qq.com> Date: Wed, 12 Apr 2023 19:11:16 +0800 Subject: [PATCH 25/27] Expose the resizing --- source/DomainTheory/Presentation/C-Ideal.lagda | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/source/DomainTheory/Presentation/C-Ideal.lagda b/source/DomainTheory/Presentation/C-Ideal.lagda index dca911ced..e5e2cd993 100644 --- a/source/DomainTheory/Presentation/C-Ideal.lagda +++ b/source/DomainTheory/Presentation/C-Ideal.lagda @@ -132,6 +132,19 @@ module C-Ideal SL.⋁-is-upperbound (C-Idl-SupLattice 𝓣' 𝓦') I i g g∈Ii ((𝔍 , _ , _) , β„‘βŠ†π”) = β„‘βŠ†π” g ∣ i , g∈Ii ∣ - SL.⋁-is-lowerbound-of-upperbounds (C-Idl-SupLattice 𝓣' 𝓦') = {! !} - -- This is not correct for universe reasons + SL.⋁-is-lowerbound-of-upperbounds (C-Idl-SupLattice 𝓣' 𝓦') + I (𝔍 , Ο…) IiβŠ†π” g g∈SupI = 𝔍'→𝔍 g (g∈SupI ((𝔍' , Ο…') , + Ξ» g β†’ βˆ₯βˆ₯-rec (holds-is-prop (𝔍' g)) Ξ» (i , e) β†’ 𝔍→𝔍' g (IiβŠ†π” i g e))) + where + 𝔍' : G β†’ Ξ© 𝓣' + 𝔍' = {! !} -- requires resizing + + 𝔍'→𝔍 : βˆ€ g β†’ 𝔍' g holds β†’ 𝔍 g holds + 𝔍'→𝔍 = {! !} + + 𝔍→𝔍' : βˆ€ g β†’ 𝔍 g holds β†’ 𝔍' g holds + 𝔍→𝔍' = {! !} + + Ο…' : is-C-ideal 𝔍' + Ο…' = {! !} -- deducible from propositional equivalence \end{code} From 40f2df13ff87b2ecd0c55dc2fb10ba5d5d57152c Mon Sep 17 00:00:00 2001 From: Trebor-Huang <2300936257@qq.com> Date: Tue, 18 Jul 2023 18:08:38 +0800 Subject: [PATCH 26/27] Singleton map --- source/DomainTheory/Presentation/C-Ideal.lagda | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/source/DomainTheory/Presentation/C-Ideal.lagda b/source/DomainTheory/Presentation/C-Ideal.lagda index e5e2cd993..a7d8dd3d0 100644 --- a/source/DomainTheory/Presentation/C-Ideal.lagda +++ b/source/DomainTheory/Presentation/C-Ideal.lagda @@ -23,7 +23,7 @@ open PropositionalTruncation pt open import UF.ImageAndSurjection pt open import Posets.Poset fe open PosetAxioms -open import Posets.FreeSupLattice pt +open import Posets.FreeSupLattice pt using (SupLattice) open import DomainTheory.Basics.Dcpo pt fe π“₯ open import DomainTheory.Basics.Miscelanea pt fe π“₯ @@ -39,6 +39,7 @@ syntax Conjunction I (Ξ» i β†’ p) = β‹€ i κž‰ I , p module C-Ideal (G : 𝓀 Μ‡) + (G-is-set : is-set G) (_≲_ : G β†’ G β†’ 𝓣 Μ‡) (_β—ƒ_ : Cover-set G _≲_) where @@ -147,4 +148,12 @@ module C-Ideal Ο…' : is-C-ideal 𝔍' Ο…' = {! !} -- deducible from propositional equivalence + + -- The map from G to C-Idl + Ξ· : G β†’ C-Idl (𝓀 βŠ” 𝓣 βŠ” (π“₯ ⁺) βŠ” 𝓦 βŠ” (𝓣' ⁺)) + Ξ· {𝓣' = 𝓣'} g = Generated {π“₯' = 𝓀} 𝓣' Ξ» g' β†’ (g = g') , G-is-set + + -- Every map from G to a suplattice S preserving covers + -- factors uniquely through C-Idl + \end{code} From c4f34949d603ed5b4dbdd44178425589eb361ab5 Mon Sep 17 00:00:00 2001 From: Trebor-Huang <2300936257@qq.com> Date: Wed, 19 Jul 2023 00:56:47 +0800 Subject: [PATCH 27/27] eta is monotone --- .../DomainTheory/Presentation/C-Ideal.lagda | 29 ++++++++++++++----- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/source/DomainTheory/Presentation/C-Ideal.lagda b/source/DomainTheory/Presentation/C-Ideal.lagda index a7d8dd3d0..d550cae9e 100644 --- a/source/DomainTheory/Presentation/C-Ideal.lagda +++ b/source/DomainTheory/Presentation/C-Ideal.lagda @@ -39,7 +39,6 @@ syntax Conjunction I (Ξ» i β†’ p) = β‹€ i κž‰ I , p module C-Ideal (G : 𝓀 Μ‡) - (G-is-set : is-set G) (_≲_ : G β†’ G β†’ 𝓣 Μ‡) (_β—ƒ_ : Cover-set G _≲_) where @@ -48,7 +47,7 @@ module C-Ideal is-C-ideal β„‘ = downward-closed Γ— cover-closed where downward-closed = βˆ€ x y β†’ x ≲ y - β†’ x ∈ β„‘ β†’ y ∈ β„‘ + β†’ y ∈ β„‘ β†’ x ∈ β„‘ cover-closed = βˆ€ I x (U : I β†’ G) β†’ (x β—ƒ U) holds β†’ (βˆ€ y β†’ y ∈image U β†’ y ∈ β„‘) β†’ x ∈ β„‘ @@ -149,11 +148,27 @@ module C-Ideal Ο…' : is-C-ideal 𝔍' Ο…' = {! !} -- deducible from propositional equivalence - -- The map from G to C-Idl - Ξ· : G β†’ C-Idl (𝓀 βŠ” 𝓣 βŠ” (π“₯ ⁺) βŠ” 𝓦 βŠ” (𝓣' ⁺)) - Ξ· {𝓣' = 𝓣'} g = Generated {π“₯' = 𝓀} 𝓣' Ξ» g' β†’ (g = g') , G-is-set + module _ (G-is-set : is-set G) where + -- The map from G to C-Idl + Ξ· : βˆ€ 𝓣' β†’ G β†’ C-Idl (𝓀 βŠ” 𝓣 βŠ” (π“₯ ⁺) βŠ” 𝓦 βŠ” (𝓣' ⁺)) + Ξ· 𝓣' g = Generated 𝓣' Ξ» g' β†’ (g = g') , G-is-set - -- Every map from G to a suplattice S preserving covers - -- factors uniquely through C-Idl + -- it is monotone + Ξ·-is-monotone : βˆ€ g g' β†’ g ≲ g' + β†’ carrier (Ξ· 𝓣' g) βŠ† carrier (Ξ· 𝓣' g') + Ξ·-is-monotone {𝓣' = 𝓣'} g g' g≲g' h h∈ηg ((𝔍 , Ο…) , ⟨g'βŸ©βŠ†π”) + = h∈ηg ((𝔍 , Ο…) , Ξ» { .g refl β†’ gβˆˆπ” }) + where + g'βˆˆπ” : g' ∈ 𝔍 + g'βˆˆπ” = ⟨g'βŸ©βŠ†π” g' refl + + gβˆˆπ” : g ∈ 𝔍 + gβˆˆπ” = Ο… .pr₁ g g' g≲g' g'βˆˆπ” + + -- it preserves covers + open Interpretation + + -- Every monotone map from G to a suplattice S preserving covers + -- factors uniquely through Ξ· \end{code}