11------------------------------------------------------------------------
22-- The Agda standard library
33--
4- -- Defintions for domain theory
4+ -- Properties satisfied by directed complete partial orders (DCPOs)
55------------------------------------------------------------------------
66
77{-# OPTIONS --cubical-compatible --safe #-}
@@ -14,7 +14,6 @@ open import Function using (_∘_; id)
1414open import Data.Product using (_,_)
1515open import Data.Bool using (Bool; true; false; if_then_else_)
1616open import Relation.Binary.Domain.Bundles using (DCPO)
17- open import Relation.Binary.Domain.Definitions using (IsMonotone)
1817open import Relation.Binary.Domain.Structures
1918 using (IsDirectedFamily; IsDCPO; IsLub; IsScottContinuous)
2019open import Relation.Binary.Morphism.Structures using (IsOrderHomomorphism)
@@ -53,7 +52,7 @@ module _ {c ℓ₁ ℓ₂ : Level} {P : Poset c ℓ₁ ℓ₂} {Q : Poset c ℓ
5352 dcpo+scott→monotone : (P-dcpo : IsDCPO P)
5453 → (f : P.Carrier → Q.Carrier)
5554 → (scott : IsScottContinuous f)
56- → IsMonotone P Q f
55+ → IsOrderHomomorphism (Poset._≈_ P) (Poset._≈_ Q) (Poset._≤_ P) (Poset._≤_ Q) f
5756 dcpo+scott→monotone P-dcpo f scott = record
5857 { cong = λ {x} {y} x≈y → IsScottContinuous.PreserveEquality scott x≈y
5958 ; mono = λ {x} {y} x≤y → mono-proof x y x≤y
@@ -86,7 +85,7 @@ module _ {c ℓ₁ ℓ₂ : Level} {P : Poset c ℓ₁ ℓ₂} {Q : Poset c ℓ
8685
8786 monotone∘directed : ∀ {Ix : Set c} {s : Ix → P.Carrier}
8887 → (f : P.Carrier → Q.Carrier)
89- → IsMonotone P Q f
88+ → IsOrderHomomorphism (Poset._≈_ P) (Poset._≈_ Q) (Poset._≤_ P) (Poset._≤_ Q) f
9089 → IsDirectedFamily P s
9190 → IsDirectedFamily Q (f ∘ s)
9291 monotone∘directed f ismonotone dir = record
@@ -106,9 +105,9 @@ module _ where
106105 scott-∘ : ∀ {c ℓ₁ ℓ₂} {P Q R : Poset c ℓ₁ ℓ₂}
107106 → (f : Poset.Carrier R → Poset.Carrier Q) (g : Poset.Carrier P → Poset.Carrier R)
108107 → IsScottContinuous {P = R} {Q = Q} f → IsScottContinuous {P = P} {Q = R} g
109- → IsMonotone R Q f → IsMonotone P R g
108+ → IsOrderHomomorphism (Poset._≈_ P) (Poset._≈_ R) (Poset._≤_ P) (Poset._≤_ R) g
110109 → IsScottContinuous {P = P} {Q = Q} (f ∘ g)
111- scott-∘ f g scottf scottg monof monog = record
110+ scott-∘ f g scottf scottg monog = record
112111 { PreserveLub = λ dir lub z → f.PreserveLub
113112 (monotone∘directed g monog dir)
114113 (g lub)
@@ -134,14 +133,16 @@ module _ {c ℓ₁ ℓ₂} {P : Poset c ℓ₁ ℓ₂} (D : DCPO c ℓ₁ ℓ₂
134133 D.⋁-least (D.⋁ s' fam') λ i → D.trans (p i) (D.⋁-≤ i)
135134
136135module Scott
137- {c ℓ₁ ℓ₂}
138- {P : Poset c ℓ₁ ℓ₂}
139- {D E : DCPO c ℓ₁ ℓ₂}
140- (let module D = DCPO D)
141- (let module E = DCPO E)
142- (f : D.Carrier → E.Carrier)
143- (isScott : IsScottContinuous {P = D.poset} {Q = E.poset} f)
144- (mono : IsMonotone D.poset E.poset f) where
136+ {c ℓ₁ ℓ₂}
137+ {P : Poset c ℓ₁ ℓ₂}
138+ {D E : DCPO c ℓ₁ ℓ₂}
139+ (let module D = DCPO D)
140+ (let module E = DCPO E)
141+ (f : D.Carrier → E.Carrier)
142+ (isScott : IsScottContinuous {P = D.poset} {Q = E.poset} f)
143+ (mono : IsOrderHomomorphism (Poset._≈_ D.poset) (Poset._≈_ E.poset)
144+ (Poset._≤_ D.poset) (Poset._≤_ E.poset) f)
145+ where
145146
146147 open DCPO D
147148 open DCPO E
@@ -166,7 +167,9 @@ module _ {c ℓ₁ ℓ₂} {P : Poset c ℓ₁ ℓ₂} {D E : DCPO c ℓ₁ ℓ
166167 module D = DCPO D
167168 module E = DCPO E
168169
169- to-scott : (f : D.Carrier → E.Carrier) → IsMonotone D.poset E.poset f
170+ to-scott : (f : D.Carrier → E.Carrier)
171+ → IsOrderHomomorphism (Poset._≈_ D.poset) (Poset._≈_ E.poset)
172+ (Poset._≤_ D.poset) (Poset._≤_ E.poset) f
170173 → (∀ {Ix} (s : Ix → D.Carrier) (dir : IsDirectedFamily D.poset s)
171174 → IsLub E.poset (f ∘ s) (f (D.⋁ s dir)))
172175 → IsScottContinuous {P = D.poset} {Q = E.poset} f
0 commit comments