|
| 1 | +------------------------------------------------------------------------ |
| 2 | +-- The Agda standard library |
| 3 | +-- |
| 4 | +-- Structures for domain theory |
| 5 | +------------------------------------------------------------------------ |
| 6 | + |
| 7 | +{-# OPTIONS --cubical-compatible --safe #-} |
| 8 | + |
| 9 | +module Relation.Binary.Domain.Structures where |
| 10 | + |
| 11 | +open import Data.Product using (_×_; _,_) |
| 12 | +open import Data.Nat.Properties using (≤-trans) |
| 13 | +open import Function using (_∘_) |
| 14 | +open import Level using (Level; _⊔_; suc) |
| 15 | +open import Relation.Binary.Bundles using (Poset) |
| 16 | +open import Relation.Binary.Domain.Definitions |
| 17 | +open import Relation.Binary.Morphism.Structures using (IsOrderHomomorphism) |
| 18 | + |
| 19 | +private variable |
| 20 | + o ℓ e o' ℓ' e' ℓ₂ : Level |
| 21 | + Ix A B : Set o |
| 22 | + |
| 23 | +module _ {c ℓ₁ ℓ₂ : Level} (P : Poset c ℓ₁ ℓ₂) where |
| 24 | + open Poset P |
| 25 | + |
| 26 | + record IsDirectedFamily {Ix : Set c} (s : Ix → Carrier) : Set (c ⊔ ℓ₁ ⊔ ℓ₂) where |
| 27 | + no-eta-equality |
| 28 | + field |
| 29 | + elt : Ix |
| 30 | + SemiDirected : IsSemidirectedFamily P s |
| 31 | + |
| 32 | + record IsLub {Ix : Set c} (s : Ix → Carrier) (lub : Carrier) : Set (c ⊔ ℓ₁ ⊔ ℓ₂) where |
| 33 | + field |
| 34 | + is-upperbound : ∀ i → s i ≤ lub |
| 35 | + is-least : ∀ y → (∀ i → s i ≤ y) → lub ≤ y |
| 36 | + |
| 37 | + record IsDCPO : Set (suc (c ⊔ ℓ₁ ⊔ ℓ₂)) where |
| 38 | + field |
| 39 | + ⋁ : ∀ {Ix : Set c} |
| 40 | + → (s : Ix → Carrier) |
| 41 | + → IsDirectedFamily s |
| 42 | + → Carrier |
| 43 | + ⋁-isLub : ∀ {Ix : Set c} |
| 44 | + → (s : Ix → Carrier) |
| 45 | + → (dir : IsDirectedFamily s) |
| 46 | + → IsLub s (⋁ s dir) |
| 47 | + |
| 48 | + module _ {Ix : Set c} {s : Ix → Carrier} {dir : IsDirectedFamily s} where |
| 49 | + open IsLub (⋁-isLub s dir) |
| 50 | + renaming (is-upperbound to ⋁-≤; is-least to ⋁-least) |
| 51 | + public |
| 52 | + |
| 53 | +module _ {c ℓ₁ ℓ₂ : Level} {P : Poset c ℓ₁ ℓ₂} {Q : Poset c ℓ₁ ℓ₂} where |
| 54 | + |
| 55 | + private |
| 56 | + module P = Poset P |
| 57 | + module Q = Poset Q |
| 58 | + |
| 59 | + record IsScottContinuous (f : P.Carrier → Q.Carrier) : Set (suc (c ⊔ ℓ₁ ⊔ ℓ₂)) where |
| 60 | + field |
| 61 | + PreserveLub : ∀ {Ix : Set c} {s : Ix → P.Carrier} |
| 62 | + → (dir : IsDirectedFamily P s) |
| 63 | + → (lub : P.Carrier) |
| 64 | + → IsLub P s lub |
| 65 | + → IsLub Q (f ∘ s) (f lub) |
| 66 | + PreserveEquality : ∀ {x y} → x P.≈ y → f x Q.≈ f y |
0 commit comments