Skip to content

Commit 8a7a679

Browse files
committed
comments
1 parent 04535a2 commit 8a7a679

File tree

5 files changed

+65
-37
lines changed

5 files changed

+65
-37
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,10 @@ New modules
123123

124124
* `Data.Sign.Show` to show a sign
125125

126+
* Added a new domain theory section to the library under `Relation.Binary.Domain.*`:
127+
- Introduced new modules and bundles for domain theory, including `DCPO`, `Lub`, and `ScottContinuous`.
128+
- All files for domain theory are now available in `src/Relation/Binary/Domain/`.
129+
126130
Additions to existing modules
127131
-----------------------------
128132

src/Relation/Binary/Domain/Bundles.agda

Lines changed: 37 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,41 +4,56 @@
44
-- Bundles for domain theory
55
------------------------------------------------------------------------
66

7+
{-# OPTIONS --cubical-compatible --safe #-}
8+
79
module Relation.Binary.Domain.Bundles where
810

911
open import Level using (Level; _⊔_; suc)
1012
open import Relation.Binary.Bundles using (Poset)
1113
open import Relation.Binary.Domain.Structures
1214
open import Relation.Binary.Domain.Definitions
1315

14-
private variable
15-
o ℓ e o' ℓ' e' ℓ₂ : Level
16-
Ix A B : Set o
17-
module _ {c ℓ₁ ℓ₂ : Level} (P : Poset c ℓ₁ ℓ₂) where
18-
open Poset P
16+
private
17+
variable
18+
o ℓ e o' ℓ' e' ℓ₂ : Level
19+
Ix A B : Set o
1920

20-
record Lub {Ix : Set c} (s : Ix Carrier) : Set (c ⊔ ℓ₁ ⊔ ℓ₂) where
21-
constructor mkLub
22-
field
23-
lub : Carrier
24-
is-upperbound : i s i ≤ lub
25-
is-least : y ( i s i ≤ y) lub ≤ y
21+
------------------------------------------------------------------------
22+
-- DCPOs
23+
------------------------------------------------------------------------
2624

27-
record DCPO (c ℓ₁ ℓ₂ : Level) : Set (suc (c ⊔ ℓ₁ ⊔ ℓ₂)) where
28-
field
29-
poset : Poset c ℓ₁ ℓ₂
30-
DcpoStr : IsDCPO poset
25+
record DCPO (c ℓ₁ ℓ₂ : Level) : Set (suc (c ⊔ ℓ₁ ⊔ ℓ₂)) where
26+
field
27+
poset : Poset c ℓ₁ ℓ₂
28+
DcpoStr : IsDCPO poset
3129

32-
open Poset poset public
33-
open IsDCPO DcpoStr public
30+
open Poset poset public
31+
open IsDCPO DcpoStr public
32+
33+
------------------------------------------------------------------------
34+
-- Scott-continuous functions
35+
------------------------------------------------------------------------
3436

35-
module _ {c ℓ₁ ℓ₂ : Level} {P : Poset c ℓ₁ ℓ₂} {Q : Poset c ℓ₁ ℓ₂} where
37+
module _ {c ℓ₁ ℓ₂ : Level} (P : Poset c ℓ₁ ℓ₂) (Q : Poset c ℓ₁ ℓ₂) where
3638
private
3739
module P = Poset P
3840
module Q = Poset Q
3941

40-
-- record ScottContinuous : Set (suc (c ⊔ ℓ₁ ⊔ ℓ₂)) where
41-
-- field
42-
-- Function : (f : P.Carrier Q.Carrier)
43-
-- Scottfunciton : IsScottContinuous f
42+
record ScottContinuous : Set (suc (c ⊔ ℓ₁ ⊔ ℓ₂)) where
43+
field
44+
f : P.Carrier Q.Carrier
45+
Scottfunction : IsScottContinuous {P = P} {Q = Q} f
46+
47+
------------------------------------------------------------------------
48+
-- Lubs
49+
------------------------------------------------------------------------
4450

51+
module _ {c ℓ₁ ℓ₂ : Level} (P : Poset c ℓ₁ ℓ₂) where
52+
open Poset P
53+
54+
record Lub {Ix : Set c} (s : Ix Carrier) : Set (c ⊔ ℓ₁ ⊔ ℓ₂) where
55+
constructor mkLub
56+
field
57+
lub : Carrier
58+
is-upperbound : i s i ≤ lub
59+
is-least : y ( i s i ≤ y) lub ≤ y

src/Relation/Binary/Domain/Definitions.agda

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,32 @@
44
-- Definitions for domain theory
55
------------------------------------------------------------------------
66

7+
{-# OPTIONS --cubical-compatible --safe #-}
8+
79
module Relation.Binary.Domain.Definitions where
810

911
open import Data.Product using (∃-syntax; _×_; _,_)
1012
open import Level using (Level; _⊔_)
1113
open import Relation.Binary.Bundles using (Poset)
1214
open import Relation.Binary.Morphism.Structures using (IsOrderHomomorphism)
1315

14-
private variable
15-
c o ℓ e o' ℓ' e' ℓ₂ : Level
16-
Ix A B : Set o
17-
P : Poset c ℓ e
16+
private
17+
variable
18+
c o ℓ e o' ℓ' e' ℓ₁ ℓ₂ : Level
19+
Ix A B : Set o
20+
P : Poset c ℓ e
21+
22+
------------------------------------------------------------------------
23+
-- Monotonicity
24+
------------------------------------------------------------------------
1825

19-
module _ where
20-
IsMonotone : (P : Poset o ℓ e) (Q : Poset o' ℓ' e') (f : Poset.Carrier P Poset.Carrier Q) Set (o ⊔ ℓ ⊔ e ⊔ ℓ' ⊔ e')
21-
IsMonotone P Q f = IsOrderHomomorphism (Poset._≈_ P) (Poset._≈_ Q) (Poset._≤_ P) (Poset._≤_ Q) f
26+
IsMonotone : (P : Poset o ℓ e) (Q : Poset o' ℓ' e') (f : Poset.Carrier P Poset.Carrier Q) Set (o ⊔ ℓ ⊔ e ⊔ ℓ' ⊔ e')
27+
IsMonotone P Q f = IsOrderHomomorphism (Poset._≈_ P) (Poset._≈_ Q) (Poset._≤_ P) (Poset._≤_ Q) f
28+
29+
------------------------------------------------------------------------
30+
-- Directed families
31+
------------------------------------------------------------------------
2232

23-
module _ {c ℓ₁ ℓ₂ : Level} (P : Poset c ℓ₁ ℓ₂) where
24-
open Poset P
25-
IsSemidirectedFamily : {Ix : Set c} (s : Ix Carrier) Set _
26-
IsSemidirectedFamily s = i j ∃[ k ] (s i ≤ s k × s j ≤ s k)
33+
IsSemidirectedFamily : (P : Poset c ℓ₁ ℓ₂) {Ix : Set c} (s : Ix Poset.Carrier P) Set _
34+
IsSemidirectedFamily P {Ix} s = i j ∃[ k ] (Poset._≤_ P (s i) (s k) × Poset._≤_ P (s j) (s k))
2735

src/Relation/Binary/Domain/Structures.agda

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
-- Structures for domain theory
55
------------------------------------------------------------------------
66

7+
{-# OPTIONS --cubical-compatible --safe #-}
8+
79
module Relation.Binary.Domain.Structures where
810

911
open import Data.Product using (_×_; _,_)

src/Relation/Binary/Properties/Domain.agda

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,16 @@ open import Level using (Level; Lift; lift)
1111
open import Function using (_∘_; id)
1212
open import Data.Product using (_,_)
1313
open import Data.Bool using (Bool; true; false; if_then_else_)
14-
open import Relation.Binary.Domain.Definitions
14+
open import Relation.Binary.Domain.Bundles using (DCPO)
15+
open import Relation.Binary.Domain.Definitions using (IsMonotone)
1516
open import Relation.Binary.Domain.Structures
16-
open import Relation.Binary.Domain.Bundles
17+
using (IsDirectedFamily; IsDCPO; IsLub; IsScottContinuous)
1718
open import Relation.Binary.Morphism.Structures using (IsOrderHomomorphism)
1819

19-
2020
private variable
2121
c ℓ₁ ℓ₂ o ℓ : Level
2222
Ix A B : Set o
2323

24-
2524
module _ {c ℓ₁ ℓ₂} {P : Poset c ℓ₁ ℓ₂} {D : DCPO P c ℓ₁ ℓ₂ } where
2625
private
2726
module D = DCPO D

0 commit comments

Comments
 (0)