-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathatl-lineale.agda
80 lines (65 loc) · 1.82 KB
/
atl-lineale.agda
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
module atl-lineale where
open import empty
open import unit
open import eq
open import functions
-----------------------------------------------------------------------
-- The lineale 3 --
-----------------------------------------------------------------------
data Three : Set where
zero : Three
half : Three
one : Three
infix 3 _≤₃_
_≤₃_ : Three → Three → Set
half ≤₃ zero = ⊥
one ≤₃ zero = ⊥
one ≤₃ half = ⊥
_ ≤₃ _ = ⊤
_⊙₃_ : Three → Three → Three
one ⊙₃ one = one
half ⊙₃ half = half
half ⊙₃ one = one
one ⊙₃ half = one
_ ⊙₃ _ = zero
_▷₃_ : Three → Three → Three
half ▷₃ half = half
half ▷₃ one = one
one ▷₃ half = half
one ▷₃ one = one
_ ▷₃ _ = zero
infix 4 _⊔₃_
_⊔₃_ : Three → Three → Three
half ⊔₃ half = half
half ⊔₃ one = half
one ⊔₃ half = half
one ⊔₃ one = one
_ ⊔₃ _ = zero
unit₃ = half
_⊸₃_ : Three → Three → Three
half ⊸₃ zero = zero
half ⊸₃ half = half
one ⊸₃ zero = zero
one ⊸₃ half = zero
_ ⊸₃ _ = one
_↼₃_ : Three → Three → Three
zero ↼₃ half = zero
zero ↼₃ one = zero
half ↼₃ half = half
half ↼₃ one = half
_ ↼₃ _ = one
_⇀₃_ : Three → Three → Three
half ⇀₃ zero = zero
one ⇀₃ zero = zero
one ⇀₃ half = zero
_ ⇀₃ _ = one
record Three-Morphism : Set where
constructor TMor
field
func : Three → Three
monotone-pf : ∀{x y : Three} → x ≤₃ y → (func x) ≤₃ (func y)
three-morph-comp : Three-Morphism → Three-Morphism → Three-Morphism
three-morph-comp (TMor m₁ pm₁) (TMor m₂ pm₂) = TMor (m₂ ∘ m₁) pf
where
pf : {x y : Three} → x ≤₃ y → (m₂ ∘ m₁) x ≤₃ (m₂ ∘ m₁) y
pf {x}{y} p = pm₂ (pm₁ p)