1
1
------------------------------------------------------------------------
2
2
-- The Agda standard library
3
3
--
4
- -- Defintions for domain theory
4
+ -- Properties satisfied by directed complete partial orders (DCPOs)
5
5
------------------------------------------------------------------------
6
6
7
7
{-# OPTIONS --cubical-compatible --safe #-}
@@ -14,7 +14,6 @@ open import Function using (_∘_; id)
14
14
open import Data.Product using (_,_)
15
15
open import Data.Bool using (Bool; true; false; if_then_else_)
16
16
open import Relation.Binary.Domain.Bundles using (DCPO)
17
- open import Relation.Binary.Domain.Definitions using (IsMonotone)
18
17
open import Relation.Binary.Domain.Structures
19
18
using (IsDirectedFamily; IsDCPO; IsLub; IsScottContinuous)
20
19
open import Relation.Binary.Morphism.Structures using (IsOrderHomomorphism)
@@ -53,7 +52,7 @@ module _ {c ℓ₁ ℓ₂ : Level} {P : Poset c ℓ₁ ℓ₂} {Q : Poset c ℓ
53
52
dcpo+scott→monotone : (P-dcpo : IsDCPO P)
54
53
→ (f : P.Carrier → Q.Carrier)
55
54
→ (scott : IsScottContinuous f)
56
- → IsMonotone P Q f
55
+ → IsOrderHomomorphism (Poset._≈_ P) (Poset._≈_ Q) (Poset._≤_ P) (Poset._≤_ Q) f
57
56
dcpo+scott→monotone P-dcpo f scott = record
58
57
{ cong = λ {x} {y} x≈y → IsScottContinuous.PreserveEquality scott x≈y
59
58
; mono = λ {x} {y} x≤y → mono-proof x y x≤y
@@ -86,7 +85,7 @@ module _ {c ℓ₁ ℓ₂ : Level} {P : Poset c ℓ₁ ℓ₂} {Q : Poset c ℓ
86
85
87
86
monotone∘directed : ∀ {Ix : Set c} {s : Ix → P.Carrier}
88
87
→ (f : P.Carrier → Q.Carrier)
89
- → IsMonotone P Q f
88
+ → IsOrderHomomorphism (Poset._≈_ P) (Poset._≈_ Q) (Poset._≤_ P) (Poset._≤_ Q) f
90
89
→ IsDirectedFamily P s
91
90
→ IsDirectedFamily Q (f ∘ s)
92
91
monotone∘directed f ismonotone dir = record
@@ -106,9 +105,9 @@ module _ where
106
105
scott-∘ : ∀ {c ℓ₁ ℓ₂} {P Q R : Poset c ℓ₁ ℓ₂}
107
106
→ (f : Poset.Carrier R → Poset.Carrier Q) (g : Poset.Carrier P → Poset.Carrier R)
108
107
→ 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
110
109
→ IsScottContinuous {P = P} {Q = Q} (f ∘ g)
111
- scott-∘ f g scottf scottg monof monog = record
110
+ scott-∘ f g scottf scottg monog = record
112
111
{ PreserveLub = λ dir lub z → f.PreserveLub
113
112
(monotone∘directed g monog dir)
114
113
(g lub)
@@ -134,14 +133,16 @@ module _ {c ℓ₁ ℓ₂} {P : Poset c ℓ₁ ℓ₂} (D : DCPO c ℓ₁ ℓ₂
134
133
D.⋁-least (D.⋁ s' fam') λ i → D.trans (p i) (D.⋁-≤ i)
135
134
136
135
module 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
145
146
146
147
open DCPO D
147
148
open DCPO E
@@ -166,7 +167,9 @@ module _ {c ℓ₁ ℓ₂} {P : Poset c ℓ₁ ℓ₂} {D E : DCPO c ℓ₁ ℓ
166
167
module D = DCPO D
167
168
module E = DCPO E
168
169
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
170
173
→ (∀ {Ix} (s : Ix → D.Carrier) (dir : IsDirectedFamily D.poset s)
171
174
→ IsLub E.poset (f ∘ s) (f (D.⋁ s dir)))
172
175
→ IsScottContinuous {P = D.poset} {Q = E.poset} f
0 commit comments