Mercurial > hg > Members > kono > Proof > ZF-in-agda
annotate ordinal.agda @ 84:4b2aff372b7c
omax ..
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 04 Jun 2019 23:58:58 +0900 |
parents | 96c932d0145d |
children | 7494ae6b83c6 |
rev | line source |
---|---|
34 | 1 {-# OPTIONS --allow-unsolved-metas #-} |
16 | 2 open import Level |
29
fce60b99dc55
posturate OD is isomorphic to Ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
28
diff
changeset
|
3 module ordinal where |
3 | 4 |
14
e11e95d5ddee
separete constructible set
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
11
diff
changeset
|
5 open import zf |
3 | 6 |
23 | 7 open import Data.Nat renaming ( zero to Zero ; suc to Suc ; ℕ to Nat ; _⊔_ to _n⊔_ ) |
75 | 8 open import Data.Empty |
14
e11e95d5ddee
separete constructible set
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
11
diff
changeset
|
9 open import Relation.Binary.PropositionalEquality |
3 | 10 |
24 | 11 data OrdinalD {n : Level} : (lv : Nat) → Set n where |
12 Φ : (lv : Nat) → OrdinalD lv | |
13 OSuc : (lv : Nat) → OrdinalD {n} lv → OrdinalD lv | |
3 | 14 |
24 | 15 record Ordinal {n : Level} : Set n where |
16 | 16 field |
17 lv : Nat | |
24 | 18 ord : OrdinalD {n} lv |
16 | 19 |
70 | 20 -- |
21 -- Φ (Suc lv) < ℵ lv < OSuc (Suc lv) (ℵ lv) < OSuc ... < OSuc (Suc lv) (Φ (Suc lv)) < OSuc ... < ℵ (Suc lv) | |
22 -- | |
24 | 23 data _d<_ {n : Level} : {lx ly : Nat} → OrdinalD {n} lx → OrdinalD {n} ly → Set n where |
24 Φ< : {lx : Nat} → {x : OrdinalD {n} lx} → Φ lx d< OSuc lx x | |
25 s< : {lx : Nat} → {x y : OrdinalD {n} lx} → x d< y → OSuc lx x d< OSuc lx y | |
17 | 26 |
27 open Ordinal | |
28 | |
27 | 29 _o<_ : {n : Level} ( x y : Ordinal ) → Set n |
17 | 30 _o<_ x y = (lv x < lv y ) ∨ ( ord x d< ord y ) |
3 | 31 |
75 | 32 s<refl : {n : Level } {lx : Nat } { x : OrdinalD {n} lx } → x d< OSuc lx x |
33 s<refl {n} {lv} {Φ lv} = Φ< | |
34 s<refl {n} {lv} {OSuc lv x} = s< s<refl | |
35 | |
36 trio<> : {n : Level} → {lx : Nat} {x : OrdinalD {n} lx } { y : OrdinalD lx } → y d< x → x d< y → ⊥ | |
37 trio<> {n} {lx} {.(OSuc lx _)} {.(OSuc lx _)} (s< s) (s< t) = trio<> s t | |
38 trio<> {n} {lx} {.(OSuc lx _)} {.(Φ lx)} Φ< () | |
39 | |
40 d<→lv : {n : Level} {x y : Ordinal {n}} → ord x d< ord y → lv x ≡ lv y | |
41 d<→lv Φ< = refl | |
42 d<→lv (s< lt) = refl | |
43 | |
43
0d9b9db14361
equalitu and internal parametorisity
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
41
diff
changeset
|
44 o<-subst : {n : Level } {Z X z x : Ordinal {n}} → Z o< X → Z ≡ z → X ≡ x → z o< x |
0d9b9db14361
equalitu and internal parametorisity
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
41
diff
changeset
|
45 o<-subst df refl refl = df |
0d9b9db14361
equalitu and internal parametorisity
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
41
diff
changeset
|
46 |
14
e11e95d5ddee
separete constructible set
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
11
diff
changeset
|
47 open import Data.Nat.Properties |
30
3b0fdb95618e
problem on Ordinal ( OSuc ℵ )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
29
diff
changeset
|
48 open import Data.Unit using ( ⊤ ) |
6 | 49 open import Relation.Nullary |
50 | |
51 open import Relation.Binary | |
52 open import Relation.Binary.Core | |
53 | |
24 | 54 o∅ : {n : Level} → Ordinal {n} |
55 o∅ = record { lv = Zero ; ord = Φ Zero } | |
21 | 56 |
39 | 57 open import Relation.Binary.HeterogeneousEquality using (_≅_;refl) |
58 | |
59 ordinal-cong : {n : Level} {x y : Ordinal {n}} → | |
60 lv x ≡ lv y → ord x ≅ ord y → x ≡ y | |
61 ordinal-cong refl refl = refl | |
21 | 62 |
46 | 63 ordinal-lv : {n : Level} {x y : Ordinal {n}} → x ≡ y → lv x ≡ lv y |
64 ordinal-lv refl = refl | |
65 | |
66 ordinal-d : {n : Level} {x y : Ordinal {n}} → x ≡ y → ord x ≅ ord y | |
67 ordinal-d refl = refl | |
68 | |
24 | 69 ≡→¬d< : {n : Level} → {lv : Nat} → {x : OrdinalD {n} lv } → x d< x → ⊥ |
70 ≡→¬d< {n} {lx} {OSuc lx y} (s< t) = ≡→¬d< t | |
14
e11e95d5ddee
separete constructible set
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
11
diff
changeset
|
71 |
24 | 72 trio<≡ : {n : Level} → {lx : Nat} {x : OrdinalD {n} lx } { y : OrdinalD lx } → x ≡ y → x d< y → ⊥ |
17 | 73 trio<≡ refl = ≡→¬d< |
14
e11e95d5ddee
separete constructible set
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
11
diff
changeset
|
74 |
24 | 75 trio>≡ : {n : Level} → {lx : Nat} {x : OrdinalD {n} lx } { y : OrdinalD lx } → x ≡ y → y d< x → ⊥ |
17 | 76 trio>≡ refl = ≡→¬d< |
9
5ed16e2d8eb7
try to fix axiom of replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
8
diff
changeset
|
77 |
24 | 78 triO : {n : Level} → {lx ly : Nat} → OrdinalD {n} lx → OrdinalD {n} ly → Tri (lx < ly) ( lx ≡ ly ) ( lx > ly ) |
79 triO {n} {lx} {ly} x y = <-cmp lx ly | |
14
e11e95d5ddee
separete constructible set
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
11
diff
changeset
|
80 |
24 | 81 triOrdd : {n : Level} → {lx : Nat} → Trichotomous _≡_ ( _d<_ {n} {lx} {lx} ) |
82 triOrdd {_} {lv} (Φ lv) (Φ lv) = tri≈ ≡→¬d< refl ≡→¬d< | |
83 triOrdd {_} {lv} (Φ lv) (OSuc lv y) = tri< Φ< (λ ()) ( λ lt → trio<> lt Φ< ) | |
84 triOrdd {_} {lv} (OSuc lv x) (Φ lv) = tri> (λ lt → trio<> lt Φ<) (λ ()) Φ< | |
85 triOrdd {_} {lv} (OSuc lv x) (OSuc lv y) with triOrdd x y | |
86 triOrdd {_} {lv} (OSuc lv x) (OSuc lv y) | tri< a ¬b ¬c = tri< (s< a) (λ tx=ty → trio<≡ tx=ty (s< a) ) ( λ lt → trio<> lt (s< a) ) | |
87 triOrdd {_} {lv} (OSuc lv x) (OSuc lv x) | tri≈ ¬a refl ¬c = tri≈ ≡→¬d< refl ≡→¬d< | |
88 triOrdd {_} {lv} (OSuc lv x) (OSuc lv y) | tri> ¬a ¬b c = tri> ( λ lt → trio<> lt (s< c) ) (λ tx=ty → trio>≡ tx=ty (s< c) ) (s< c) | |
9
5ed16e2d8eb7
try to fix axiom of replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
8
diff
changeset
|
89 |
74
819da8c08f05
ordinal atomical successor?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
73
diff
changeset
|
90 osuc : {n : Level} ( x : Ordinal {n} ) → Ordinal {n} |
75 | 91 osuc record { lv = lx ; ord = ox } = record { lv = lx ; ord = OSuc lx ox } |
74
819da8c08f05
ordinal atomical successor?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
73
diff
changeset
|
92 |
819da8c08f05
ordinal atomical successor?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
73
diff
changeset
|
93 <-osuc : {n : Level} { x : Ordinal {n} } → x o< osuc x |
75 | 94 <-osuc {n} {record { lv = lx ; ord = Φ .lx }} = case2 Φ< |
95 <-osuc {n} {record { lv = lx ; ord = OSuc .lx ox }} = case2 ( s< s<refl ) | |
74
819da8c08f05
ordinal atomical successor?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
73
diff
changeset
|
96 |
819da8c08f05
ordinal atomical successor?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
73
diff
changeset
|
97 osuc-lveq : {n : Level} { x : Ordinal {n} } → lv x ≡ lv ( osuc x ) |
75 | 98 osuc-lveq {n} = refl |
74
819da8c08f05
ordinal atomical successor?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
73
diff
changeset
|
99 |
819da8c08f05
ordinal atomical successor?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
73
diff
changeset
|
100 nat-<> : { x y : Nat } → x < y → y < x → ⊥ |
819da8c08f05
ordinal atomical successor?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
73
diff
changeset
|
101 nat-<> (s≤s x<y) (s≤s y<x) = nat-<> x<y y<x |
819da8c08f05
ordinal atomical successor?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
73
diff
changeset
|
102 |
819da8c08f05
ordinal atomical successor?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
73
diff
changeset
|
103 nat-<≡ : { x : Nat } → x < x → ⊥ |
819da8c08f05
ordinal atomical successor?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
73
diff
changeset
|
104 nat-<≡ (s≤s lt) = nat-<≡ lt |
819da8c08f05
ordinal atomical successor?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
73
diff
changeset
|
105 |
81 | 106 nat-≡< : { x y : Nat } → x ≡ y → x < y → ⊥ |
107 nat-≡< refl lt = nat-<≡ lt | |
108 | |
75 | 109 ¬a≤a : {la : Nat} → Suc la ≤ la → ⊥ |
110 ¬a≤a (s≤s lt) = ¬a≤a lt | |
74
819da8c08f05
ordinal atomical successor?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
73
diff
changeset
|
111 |
81 | 112 o<> : {n : Level} → {x y : Ordinal {n} } → y o< x → x o< y → ⊥ |
113 o<> {n} {x} {y} (case1 x₁) (case1 x₂) = nat-<> x₁ x₂ | |
114 o<> {n} {x} {y} (case1 x₁) (case2 x₂) = nat-≡< (sym (d<→lv x₂)) x₁ | |
115 o<> {n} {x} {y} (case2 x₁) (case1 x₂) = nat-≡< (sym (d<→lv x₁)) x₂ | |
116 o<> {n} {record { lv = lv₁ ; ord = .(OSuc lv₁ _) }} {record { lv = .lv₁ ; ord = .(Φ lv₁) }} (case2 Φ<) (case2 ()) | |
117 o<> {n} {record { lv = lv₁ ; ord = .(OSuc lv₁ _) }} {record { lv = .lv₁ ; ord = .(OSuc lv₁ _) }} (case2 (s< y<x)) (case2 (s< x<y)) = | |
118 o<> (case2 y<x) (case2 x<y) | |
16 | 119 |
24 | 120 orddtrans : {n : Level} {lx : Nat} {x y z : OrdinalD {n} lx } → x d< y → y d< z → x d< z |
121 orddtrans {_} {lx} {.(Φ lx)} {.(OSuc lx _)} {.(OSuc lx _)} Φ< (s< y<z) = Φ< | |
122 orddtrans {_} {lx} {.(OSuc lx _)} {.(OSuc lx _)} {.(OSuc lx _)} (s< x<y) (s< y<z) = s< ( orddtrans x<y y<z ) | |
9
5ed16e2d8eb7
try to fix axiom of replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
8
diff
changeset
|
123 |
75 | 124 osuc-≡< : {n : Level} { a x : Ordinal {n} } → x o< osuc a → (x ≡ a ) ∨ (x o< a) |
125 osuc-≡< {n} {a} {x} (case1 lt) = case2 (case1 lt) | |
126 osuc-≡< {n} {record { lv = lv₁ ; ord = Φ .lv₁ }} {record { lv = .lv₁ ; ord = .(Φ lv₁) }} (case2 Φ<) = case1 refl | |
127 osuc-≡< {n} {record { lv = lv₁ ; ord = OSuc .lv₁ ord₁ }} {record { lv = .lv₁ ; ord = .(Φ lv₁) }} (case2 Φ<) = case2 (case2 Φ<) | |
128 osuc-≡< {n} {record { lv = lv₁ ; ord = Φ .lv₁ }} {record { lv = .lv₁ ; ord = .(OSuc lv₁ _) }} (case2 (s< ())) | |
129 osuc-≡< {n} {record { lv = la ; ord = OSuc la oa }} {record { lv = la ; ord = (OSuc la ox) }} (case2 (s< lt)) with | |
130 osuc-≡< {n} {record { lv = la ; ord = oa }} {record { lv = la ; ord = ox }} (case2 lt ) | |
131 ... | case1 refl = case1 refl | |
132 ... | case2 (case2 x) = case2 (case2( s< x) ) | |
133 ... | case2 (case1 x) = ⊥-elim (¬a≤a x) where | |
134 | |
135 osuc-< : {n : Level} { x y : Ordinal {n} } → y o< osuc x → x o< y → ⊥ | |
136 osuc-< {n} {x} {y} y<ox x<y with osuc-≡< y<ox | |
137 osuc-< {n} {x} {x} y<ox (case1 x₁) | case1 refl = ⊥-elim (¬a≤a x₁) | |
138 osuc-< {n} {x} {x} (case1 x₂) (case2 x₁) | case1 refl = ⊥-elim (¬a≤a x₂) | |
139 osuc-< {n} {x} {x} (case2 x₂) (case2 x₁) | case1 refl = ≡→¬d< x₁ | |
81 | 140 osuc-< {n} {x} {y} y<ox (case1 x₂) | case2 (case1 x₁) = nat-<> x₂ x₁ |
141 osuc-< {n} {x} {y} y<ox (case1 x₂) | case2 (case2 x₁) = nat-≡< (sym (d<→lv x₁)) x₂ | |
142 osuc-< {n} {x} {y} y<ox (case2 x<y) | case2 y<x = o<> (case2 x<y) y<x | |
75 | 143 |
14
e11e95d5ddee
separete constructible set
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
11
diff
changeset
|
144 max : (x y : Nat) → Nat |
e11e95d5ddee
separete constructible set
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
11
diff
changeset
|
145 max Zero Zero = Zero |
e11e95d5ddee
separete constructible set
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
11
diff
changeset
|
146 max Zero (Suc x) = (Suc x) |
e11e95d5ddee
separete constructible set
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
11
diff
changeset
|
147 max (Suc x) Zero = (Suc x) |
e11e95d5ddee
separete constructible set
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
11
diff
changeset
|
148 max (Suc x) (Suc y) = Suc ( max x y ) |
3 | 149 |
24 | 150 maxαd : {n : Level} → { lx : Nat } → OrdinalD {n} lx → OrdinalD lx → OrdinalD lx |
17 | 151 maxαd x y with triOrdd x y |
152 maxαd x y | tri< a ¬b ¬c = y | |
153 maxαd x y | tri≈ ¬a b ¬c = x | |
154 maxαd x y | tri> ¬a ¬b c = x | |
6 | 155 |
24 | 156 _o≤_ : {n : Level} → Ordinal → Ordinal → Set (suc n) |
23 | 157 a o≤ b = (a ≡ b) ∨ ( a o< b ) |
158 | |
27 | 159 ordtrans : {n : Level} {x y z : Ordinal {n} } → x o< y → y o< z → x o< z |
160 ordtrans {n} {x} {y} {z} (case1 x₁) (case1 x₂) = case1 ( <-trans x₁ x₂ ) | |
81 | 161 ordtrans {n} {x} {y} {z} (case1 x₁) (case2 x₂) with d<→lv x₂ |
27 | 162 ... | refl = case1 x₁ |
81 | 163 ordtrans {n} {x} {y} {z} (case2 x₁) (case1 x₂) with d<→lv x₁ |
27 | 164 ... | refl = case1 x₂ |
165 ordtrans {n} {x} {y} {z} (case2 x₁) (case2 x₂) with d<→lv x₁ | d<→lv x₂ | |
166 ... | refl | refl = case2 ( orddtrans x₁ x₂ ) | |
167 | |
24 | 168 trio< : {n : Level } → Trichotomous {suc n} _≡_ _o<_ |
23 | 169 trio< a b with <-cmp (lv a) (lv b) |
24 | 170 trio< a b | tri< a₁ ¬b ¬c = tri< (case1 a₁) (λ refl → ¬b (cong ( λ x → lv x ) refl ) ) lemma1 where |
171 lemma1 : ¬ (Suc (lv b) ≤ lv a) ∨ (ord b d< ord a) | |
172 lemma1 (case1 x) = ¬c x | |
81 | 173 lemma1 (case2 x) = ⊥-elim (nat-≡< (sym ( d<→lv x )) a₁ ) |
24 | 174 trio< a b | tri> ¬a ¬b c = tri> lemma1 (λ refl → ¬b (cong ( λ x → lv x ) refl ) ) (case1 c) where |
175 lemma1 : ¬ (Suc (lv a) ≤ lv b) ∨ (ord a d< ord b) | |
176 lemma1 (case1 x) = ¬a x | |
81 | 177 lemma1 (case2 x) = ⊥-elim (nat-≡< (sym ( d<→lv x )) c ) |
23 | 178 trio< a b | tri≈ ¬a refl ¬c with triOrdd ( ord a ) ( ord b ) |
24 | 179 trio< record { lv = .(lv b) ; ord = x } b | tri≈ ¬a refl ¬c | tri< a ¬b ¬c₁ = tri< (case2 a) (λ refl → ¬b (lemma1 refl )) lemma2 where |
180 lemma1 : (record { lv = _ ; ord = x }) ≡ b → x ≡ ord b | |
181 lemma1 refl = refl | |
182 lemma2 : ¬ (Suc (lv b) ≤ lv b) ∨ (ord b d< x) | |
183 lemma2 (case1 x) = ¬a x | |
184 lemma2 (case2 x) = trio<> x a | |
185 trio< record { lv = .(lv b) ; ord = x } b | tri≈ ¬a refl ¬c | tri> ¬a₁ ¬b c = tri> lemma2 (λ refl → ¬b (lemma1 refl )) (case2 c) where | |
186 lemma1 : (record { lv = _ ; ord = x }) ≡ b → x ≡ ord b | |
187 lemma1 refl = refl | |
188 lemma2 : ¬ (Suc (lv b) ≤ lv b) ∨ (x d< ord b) | |
189 lemma2 (case1 x) = ¬a x | |
190 lemma2 (case2 x) = trio<> x c | |
191 trio< record { lv = .(lv b) ; ord = x } b | tri≈ ¬a refl ¬c | tri≈ ¬a₁ refl ¬c₁ = tri≈ lemma1 refl lemma1 where | |
192 lemma1 : ¬ (Suc (lv b) ≤ lv b) ∨ (ord b d< ord b) | |
193 lemma1 (case1 x) = ¬a x | |
194 lemma1 (case2 x) = ≡→¬d< x | |
23 | 195 |
84 | 196 maxα : {n : Level} → Ordinal {n} → Ordinal → Ordinal |
197 maxα x y with <-cmp (lv x) (lv y) | |
198 maxα x y | tri< a ¬b ¬c = x | |
199 maxα x y | tri> ¬a ¬b c = y | |
200 maxα x y | tri≈ ¬a refl ¬c = record { lv = lv x ; ord = maxαd (ord x) (ord y) } | |
201 | |
202 omax : {n : Level} ( x y : Ordinal {suc n} ) → Ordinal {suc n} | |
203 omax {n} x y with <-cmp (lv x) (lv y) | |
204 omax {n} x y | tri< a ¬b ¬c = osuc y | |
205 omax {n} x y | tri> ¬a ¬b c = osuc x | |
206 omax {n} x y | tri≈ ¬a refl ¬c with triOrdd (ord x) (ord y) | |
207 omax {n} x y | tri≈ ¬a refl ¬c | tri< a ¬b ¬c₁ = osuc y | |
208 omax {n} x y | tri≈ ¬a refl ¬c | tri≈ ¬a₁ b ¬c₁ = osuc x | |
209 omax {n} x y | tri≈ ¬a refl ¬c | tri> ¬a₁ ¬b c = osuc x | |
210 | |
211 omax< : {n : Level} ( x y : Ordinal {suc n} ) → x o< y → osuc y ≡ omax x y | |
212 omax< {n} x y lt with <-cmp (lv x) (lv y) | |
213 omax< {n} x y lt | tri< a ¬b ¬c = refl | |
214 omax< {n} x y (case1 lt) | tri> ¬a ¬b c = ⊥-elim (¬a lt) | |
215 omax< {n} x y (case2 lt) | tri> ¬a ¬b c = ⊥-elim (¬b (d<→lv lt )) | |
216 omax< {n} x y (case1 lt) | tri≈ ¬a b ¬c = ⊥-elim (¬a lt) | |
217 omax< {n} x y (case2 lt) | tri≈ ¬a refl ¬c with triOrdd (ord x) (ord y) | |
218 omax< {n} x y (case2 lt) | tri≈ ¬a refl ¬c | tri< a ¬b ¬c₁ = refl | |
219 omax< {n} x y (case2 lt) | tri≈ ¬a refl ¬c | tri≈ ¬a₁ b ¬c₁ = ⊥-elim ( trio<≡ b lt ) | |
220 omax< {n} x y (case2 lt) | tri≈ ¬a refl ¬c | tri> ¬a₁ ¬b c = ⊥-elim ( o<> (case2 lt) (case2 c) ) | |
221 | |
222 omaxx : {n : Level} ( x y : Ordinal {suc n} ) → x o< omax x y | |
223 omaxx {n} x y with trio< x y | |
224 omaxx {n} x y | tri< a ¬b ¬c = {!!} | |
225 omaxx {n} x y | tri> ¬a ¬b c = {!!} | |
226 omaxx {n} x y | tri≈ ¬a b ¬c = {!!} | |
227 | |
24 | 228 OrdTrans : {n : Level} → Transitive {suc n} _o≤_ |
16 | 229 OrdTrans (case1 refl) (case1 refl) = case1 refl |
230 OrdTrans (case1 refl) (case2 lt2) = case2 lt2 | |
231 OrdTrans (case2 lt1) (case1 refl) = case2 lt1 | |
81 | 232 OrdTrans (case2 x) (case2 y) = case2 (ordtrans x y) |
16 | 233 |
24 | 234 OrdPreorder : {n : Level} → Preorder (suc n) (suc n) (suc n) |
235 OrdPreorder {n} = record { Carrier = Ordinal | |
16 | 236 ; _≈_ = _≡_ |
23 | 237 ; _∼_ = _o≤_ |
16 | 238 ; isPreorder = record { |
239 isEquivalence = record { refl = refl ; sym = sym ; trans = trans } | |
240 ; reflexive = case1 | |
24 | 241 ; trans = OrdTrans |
16 | 242 } |
243 } | |
244 | |
30
3b0fdb95618e
problem on Ordinal ( OSuc ℵ )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
29
diff
changeset
|
245 TransFinite : {n : Level} → { ψ : Ordinal {n} → Set n } |
24 | 246 → ( ∀ (lx : Nat ) → ψ ( record { lv = lx ; ord = Φ lx } ) ) |
247 → ( ∀ (lx : Nat ) → (x : OrdinalD lx ) → ψ ( record { lv = lx ; ord = x } ) → ψ ( record { lv = lx ; ord = OSuc lx x } ) ) | |
22 | 248 → ∀ (x : Ordinal) → ψ x |
81 | 249 TransFinite caseΦ caseOSuc record { lv = lv ; ord = (Φ (lv)) } = caseΦ lv |
250 TransFinite caseΦ caseOSuc record { lv = lx ; ord = (OSuc lx ox) } = | |
251 caseOSuc lx ox (TransFinite caseΦ caseOSuc record { lv = lx ; ord = ox }) |