annotate ordinal.agda @ 324:fbabb20f222e

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sat, 04 Jul 2020 18:18:17 +0900
parents 6f10c47e4e7a
children 1a54dbe1ea4c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
16
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
1 open import Level
29
fce60b99dc55 posturate OD is isomorphic to Ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
2 module ordinal where
3
e7990ff544bf reocrd ZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
3
14
e11e95d5ddee separete constructible set
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 11
diff changeset
4 open import zf
3
e7990ff544bf reocrd ZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
5
23
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 22
diff changeset
6 open import Data.Nat renaming ( zero to Zero ; suc to Suc ; ℕ to Nat ; _⊔_ to _n⊔_ )
75
714470702a8b Union done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 74
diff changeset
7 open import Data.Empty
14
e11e95d5ddee separete constructible set
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 11
diff changeset
8 open import Relation.Binary.PropositionalEquality
213
22d435172d1a separate logic and nat
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 204
diff changeset
9 open import logic
22d435172d1a separate logic and nat
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 204
diff changeset
10 open import nat
3
e7990ff544bf reocrd ZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
11
24
3186bbee99dd separte level
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
12 data OrdinalD {n : Level} : (lv : Nat) → Set n where
3186bbee99dd separte level
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
13 Φ : (lv : Nat) → OrdinalD lv
3186bbee99dd separte level
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
14 OSuc : (lv : Nat) → OrdinalD {n} lv → OrdinalD lv
3
e7990ff544bf reocrd ZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
15
24
3186bbee99dd separte level
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
16 record Ordinal {n : Level} : Set n where
202
ed88384b5102 ε-induction like loop again
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 184
diff changeset
17 constructor ordinal
16
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
18 field
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
19 lv : Nat
24
3186bbee99dd separte level
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
20 ord : OrdinalD {n} lv
16
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
21
24
3186bbee99dd separte level
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
22 data _d<_ {n : Level} : {lx ly : Nat} → OrdinalD {n} lx → OrdinalD {n} ly → Set n where
3186bbee99dd separte level
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
23 Φ< : {lx : Nat} → {x : OrdinalD {n} lx} → Φ lx d< OSuc lx x
3186bbee99dd separte level
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
24 s< : {lx : Nat} → {x y : OrdinalD {n} lx} → x d< y → OSuc lx x d< OSuc lx y
17
6a668c6086a5 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
25
6a668c6086a5 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
26 open Ordinal
6a668c6086a5 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
27
27
bade0a35fdd9 OD, HOD, TC
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 26
diff changeset
28 _o<_ : {n : Level} ( x y : Ordinal ) → Set n
17
6a668c6086a5 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
29 _o<_ x y = (lv x < lv y ) ∨ ( ord x d< ord y )
3
e7990ff544bf reocrd ZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
30
75
714470702a8b Union done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 74
diff changeset
31 s<refl : {n : Level } {lx : Nat } { x : OrdinalD {n} lx } → x d< OSuc lx x
714470702a8b Union done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 74
diff changeset
32 s<refl {n} {lv} {Φ lv} = Φ<
714470702a8b Union done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 74
diff changeset
33 s<refl {n} {lv} {OSuc lv x} = s< s<refl
714470702a8b Union done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 74
diff changeset
34
714470702a8b Union done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 74
diff changeset
35 trio<> : {n : Level} → {lx : Nat} {x : OrdinalD {n} lx } { y : OrdinalD lx } → y d< x → x d< y → ⊥
714470702a8b Union done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 74
diff changeset
36 trio<> {n} {lx} {.(OSuc lx _)} {.(OSuc lx _)} (s< s) (s< t) = trio<> s t
714470702a8b Union done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 74
diff changeset
37 trio<> {n} {lx} {.(OSuc lx _)} {.(Φ lx)} Φ< ()
714470702a8b Union done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 74
diff changeset
38
714470702a8b Union done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 74
diff changeset
39 d<→lv : {n : Level} {x y : Ordinal {n}} → ord x d< ord y → lv x ≡ lv y
714470702a8b Union done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 74
diff changeset
40 d<→lv Φ< = refl
714470702a8b Union done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 74
diff changeset
41 d<→lv (s< lt) = refl
714470702a8b Union done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 74
diff changeset
42
43
0d9b9db14361 equalitu and internal parametorisity
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 41
diff changeset
43 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
44 o<-subst df refl refl = df
0d9b9db14361 equalitu and internal parametorisity
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 41
diff changeset
45
14
e11e95d5ddee separete constructible set
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 11
diff changeset
46 open import Data.Nat.Properties
30
3b0fdb95618e problem on Ordinal ( OSuc ℵ )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
47 open import Data.Unit using ( ⊤ )
6
d9b704508281 isEquiv and isZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 4
diff changeset
48 open import Relation.Nullary
d9b704508281 isEquiv and isZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 4
diff changeset
49
d9b704508281 isEquiv and isZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 4
diff changeset
50 open import Relation.Binary
d9b704508281 isEquiv and isZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 4
diff changeset
51 open import Relation.Binary.Core
d9b704508281 isEquiv and isZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 4
diff changeset
52
24
3186bbee99dd separte level
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
53 o∅ : {n : Level} → Ordinal {n}
3186bbee99dd separte level
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
54 o∅ = record { lv = Zero ; ord = Φ Zero }
21
6d9fdd1dfa79 add transfinite
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
55
39
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
56 open import Relation.Binary.HeterogeneousEquality using (_≅_;refl)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
57
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
58 ordinal-cong : {n : Level} {x y : Ordinal {n}} →
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
59 lv x ≡ lv y → ord x ≅ ord y → x ≡ y
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
60 ordinal-cong refl refl = refl
21
6d9fdd1dfa79 add transfinite
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
61
24
3186bbee99dd separte level
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
62 ≡→¬d< : {n : Level} → {lv : Nat} → {x : OrdinalD {n} lv } → x d< x → ⊥
3186bbee99dd separte level
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
63 ≡→¬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
64
24
3186bbee99dd separte level
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
65 trio<≡ : {n : Level} → {lx : Nat} {x : OrdinalD {n} lx } { y : OrdinalD lx } → x ≡ y → x d< y → ⊥
17
6a668c6086a5 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
66 trio<≡ refl = ≡→¬d<
14
e11e95d5ddee separete constructible set
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 11
diff changeset
67
24
3186bbee99dd separte level
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
68 trio>≡ : {n : Level} → {lx : Nat} {x : OrdinalD {n} lx } { y : OrdinalD lx } → x ≡ y → y d< x → ⊥
17
6a668c6086a5 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
69 trio>≡ refl = ≡→¬d<
9
5ed16e2d8eb7 try to fix axiom of replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 8
diff changeset
70
24
3186bbee99dd separte level
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
71 triOrdd : {n : Level} → {lx : Nat} → Trichotomous _≡_ ( _d<_ {n} {lx} {lx} )
3186bbee99dd separte level
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
72 triOrdd {_} {lv} (Φ lv) (Φ lv) = tri≈ ≡→¬d< refl ≡→¬d<
3186bbee99dd separte level
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
73 triOrdd {_} {lv} (Φ lv) (OSuc lv y) = tri< Φ< (λ ()) ( λ lt → trio<> lt Φ< )
3186bbee99dd separte level
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
74 triOrdd {_} {lv} (OSuc lv x) (Φ lv) = tri> (λ lt → trio<> lt Φ<) (λ ()) Φ<
3186bbee99dd separte level
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
75 triOrdd {_} {lv} (OSuc lv x) (OSuc lv y) with triOrdd x y
3186bbee99dd separte level
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
76 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) )
3186bbee99dd separte level
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
77 triOrdd {_} {lv} (OSuc lv x) (OSuc lv x) | tri≈ ¬a refl ¬c = tri≈ ≡→¬d< refl ≡→¬d<
3186bbee99dd separte level
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
78 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
79
74
819da8c08f05 ordinal atomical successor?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 73
diff changeset
80 osuc : {n : Level} ( x : Ordinal {n} ) → Ordinal {n}
75
714470702a8b Union done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 74
diff changeset
81 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
82
819da8c08f05 ordinal atomical successor?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 73
diff changeset
83 <-osuc : {n : Level} { x : Ordinal {n} } → x o< osuc x
75
714470702a8b Union done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 74
diff changeset
84 <-osuc {n} {record { lv = lx ; ord = Φ .lx }} = case2 Φ<
714470702a8b Union done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 74
diff changeset
85 <-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
86
203
8edd2a13a7f3 fixing transfinte induction...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 202
diff changeset
87 o<¬≡ : {n : Level } { ox oy : Ordinal {suc n}} → ox ≡ oy → ox o< oy → ⊥
111
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 97
diff changeset
88 o<¬≡ {_} {ox} {ox} refl (case1 lt) = =→¬< lt
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 97
diff changeset
89 o<¬≡ {_} {ox} {ox} refl (case2 (s< lt)) = trio<≡ refl lt
94
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 91
diff changeset
90
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 91
diff changeset
91 ¬x<0 : {n : Level} → { x : Ordinal {suc n} } → ¬ ( x o< o∅ {suc n} )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 91
diff changeset
92 ¬x<0 {n} {x} (case1 ())
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 91
diff changeset
93 ¬x<0 {n} {x} (case2 ())
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 91
diff changeset
94
81
96c932d0145d simpler ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 75
diff changeset
95 o<> : {n : Level} → {x y : Ordinal {n} } → y o< x → x o< y → ⊥
96c932d0145d simpler ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 75
diff changeset
96 o<> {n} {x} {y} (case1 x₁) (case1 x₂) = nat-<> x₁ x₂
96c932d0145d simpler ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 75
diff changeset
97 o<> {n} {x} {y} (case1 x₁) (case2 x₂) = nat-≡< (sym (d<→lv x₂)) x₁
96c932d0145d simpler ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 75
diff changeset
98 o<> {n} {x} {y} (case2 x₁) (case1 x₂) = nat-≡< (sym (d<→lv x₁)) x₂
96c932d0145d simpler ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 75
diff changeset
99 o<> {n} {record { lv = lv₁ ; ord = .(OSuc lv₁ _) }} {record { lv = .lv₁ ; ord = .(Φ lv₁) }} (case2 Φ<) (case2 ())
96c932d0145d simpler ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 75
diff changeset
100 o<> {n} {record { lv = lv₁ ; ord = .(OSuc lv₁ _) }} {record { lv = .lv₁ ; ord = .(OSuc lv₁ _) }} (case2 (s< y<x)) (case2 (s< x<y)) =
96c932d0145d simpler ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 75
diff changeset
101 o<> (case2 y<x) (case2 x<y)
16
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
102
24
3186bbee99dd separte level
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
103 orddtrans : {n : Level} {lx : Nat} {x y z : OrdinalD {n} lx } → x d< y → y d< z → x d< z
3186bbee99dd separte level
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
104 orddtrans {_} {lx} {.(Φ lx)} {.(OSuc lx _)} {.(OSuc lx _)} Φ< (s< y<z) = Φ<
3186bbee99dd separte level
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
105 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
106
75
714470702a8b Union done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 74
diff changeset
107 osuc-≡< : {n : Level} { a x : Ordinal {n} } → x o< osuc a → (x ≡ a ) ∨ (x o< a)
714470702a8b Union done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 74
diff changeset
108 osuc-≡< {n} {a} {x} (case1 lt) = case2 (case1 lt)
714470702a8b Union done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 74
diff changeset
109 osuc-≡< {n} {record { lv = lv₁ ; ord = Φ .lv₁ }} {record { lv = .lv₁ ; ord = .(Φ lv₁) }} (case2 Φ<) = case1 refl
714470702a8b Union done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 74
diff changeset
110 osuc-≡< {n} {record { lv = lv₁ ; ord = OSuc .lv₁ ord₁ }} {record { lv = .lv₁ ; ord = .(Φ lv₁) }} (case2 Φ<) = case2 (case2 Φ<)
714470702a8b Union done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 74
diff changeset
111 osuc-≡< {n} {record { lv = lv₁ ; ord = Φ .lv₁ }} {record { lv = .lv₁ ; ord = .(OSuc lv₁ _) }} (case2 (s< ()))
714470702a8b Union done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 74
diff changeset
112 osuc-≡< {n} {record { lv = la ; ord = OSuc la oa }} {record { lv = la ; ord = (OSuc la ox) }} (case2 (s< lt)) with
714470702a8b Union done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 74
diff changeset
113 osuc-≡< {n} {record { lv = la ; ord = oa }} {record { lv = la ; ord = ox }} (case2 lt )
714470702a8b Union done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 74
diff changeset
114 ... | case1 refl = case1 refl
714470702a8b Union done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 74
diff changeset
115 ... | case2 (case2 x) = case2 (case2( s< x) )
714470702a8b Union done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 74
diff changeset
116 ... | case2 (case1 x) = ⊥-elim (¬a≤a x) where
714470702a8b Union done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 74
diff changeset
117
714470702a8b Union done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 74
diff changeset
118 osuc-< : {n : Level} { x y : Ordinal {n} } → y o< osuc x → x o< y → ⊥
714470702a8b Union done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 74
diff changeset
119 osuc-< {n} {x} {y} y<ox x<y with osuc-≡< y<ox
714470702a8b Union done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 74
diff changeset
120 osuc-< {n} {x} {x} y<ox (case1 x₁) | case1 refl = ⊥-elim (¬a≤a x₁)
714470702a8b Union done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 74
diff changeset
121 osuc-< {n} {x} {x} (case1 x₂) (case2 x₁) | case1 refl = ⊥-elim (¬a≤a x₂)
714470702a8b Union done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 74
diff changeset
122 osuc-< {n} {x} {x} (case2 x₂) (case2 x₁) | case1 refl = ≡→¬d< x₁
81
96c932d0145d simpler ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 75
diff changeset
123 osuc-< {n} {x} {y} y<ox (case1 x₂) | case2 (case1 x₁) = nat-<> x₂ x₁
96c932d0145d simpler ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 75
diff changeset
124 osuc-< {n} {x} {y} y<ox (case1 x₂) | case2 (case2 x₁) = nat-≡< (sym (d<→lv x₁)) x₂
96c932d0145d simpler ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 75
diff changeset
125 osuc-< {n} {x} {y} y<ox (case2 x<y) | case2 y<x = o<> (case2 x<y) y<x
75
714470702a8b Union done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 74
diff changeset
126
23
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 22
diff changeset
127
27
bade0a35fdd9 OD, HOD, TC
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 26
diff changeset
128 ordtrans : {n : Level} {x y z : Ordinal {n} } → x o< y → y o< z → x o< z
bade0a35fdd9 OD, HOD, TC
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 26
diff changeset
129 ordtrans {n} {x} {y} {z} (case1 x₁) (case1 x₂) = case1 ( <-trans x₁ x₂ )
81
96c932d0145d simpler ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 75
diff changeset
130 ordtrans {n} {x} {y} {z} (case1 x₁) (case2 x₂) with d<→lv x₂
27
bade0a35fdd9 OD, HOD, TC
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 26
diff changeset
131 ... | refl = case1 x₁
81
96c932d0145d simpler ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 75
diff changeset
132 ordtrans {n} {x} {y} {z} (case2 x₁) (case1 x₂) with d<→lv x₁
27
bade0a35fdd9 OD, HOD, TC
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 26
diff changeset
133 ... | refl = case1 x₂
bade0a35fdd9 OD, HOD, TC
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 26
diff changeset
134 ordtrans {n} {x} {y} {z} (case2 x₁) (case2 x₂) with d<→lv x₁ | d<→lv x₂
bade0a35fdd9 OD, HOD, TC
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 26
diff changeset
135 ... | refl | refl = case2 ( orddtrans x₁ x₂ )
bade0a35fdd9 OD, HOD, TC
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 26
diff changeset
136
24
3186bbee99dd separte level
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
137 trio< : {n : Level } → Trichotomous {suc n} _≡_ _o<_
23
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 22
diff changeset
138 trio< a b with <-cmp (lv a) (lv b)
24
3186bbee99dd separte level
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
139 trio< a b | tri< a₁ ¬b ¬c = tri< (case1 a₁) (λ refl → ¬b (cong ( λ x → lv x ) refl ) ) lemma1 where
3186bbee99dd separte level
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
140 lemma1 : ¬ (Suc (lv b) ≤ lv a) ∨ (ord b d< ord a)
3186bbee99dd separte level
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
141 lemma1 (case1 x) = ¬c x
81
96c932d0145d simpler ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 75
diff changeset
142 lemma1 (case2 x) = ⊥-elim (nat-≡< (sym ( d<→lv x )) a₁ )
24
3186bbee99dd separte level
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
143 trio< a b | tri> ¬a ¬b c = tri> lemma1 (λ refl → ¬b (cong ( λ x → lv x ) refl ) ) (case1 c) where
3186bbee99dd separte level
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
144 lemma1 : ¬ (Suc (lv a) ≤ lv b) ∨ (ord a d< ord b)
3186bbee99dd separte level
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
145 lemma1 (case1 x) = ¬a x
81
96c932d0145d simpler ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 75
diff changeset
146 lemma1 (case2 x) = ⊥-elim (nat-≡< (sym ( d<→lv x )) c )
23
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 22
diff changeset
147 trio< a b | tri≈ ¬a refl ¬c with triOrdd ( ord a ) ( ord b )
24
3186bbee99dd separte level
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
148 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
3186bbee99dd separte level
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
149 lemma1 : (record { lv = _ ; ord = x }) ≡ b → x ≡ ord b
3186bbee99dd separte level
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
150 lemma1 refl = refl
3186bbee99dd separte level
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
151 lemma2 : ¬ (Suc (lv b) ≤ lv b) ∨ (ord b d< x)
3186bbee99dd separte level
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
152 lemma2 (case1 x) = ¬a x
3186bbee99dd separte level
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
153 lemma2 (case2 x) = trio<> x a
3186bbee99dd separte level
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
154 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
3186bbee99dd separte level
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
155 lemma1 : (record { lv = _ ; ord = x }) ≡ b → x ≡ ord b
3186bbee99dd separte level
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
156 lemma1 refl = refl
3186bbee99dd separte level
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
157 lemma2 : ¬ (Suc (lv b) ≤ lv b) ∨ (x d< ord b)
3186bbee99dd separte level
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
158 lemma2 (case1 x) = ¬a x
3186bbee99dd separte level
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
159 lemma2 (case2 x) = trio<> x c
3186bbee99dd separte level
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
160 trio< record { lv = .(lv b) ; ord = x } b | tri≈ ¬a refl ¬c | tri≈ ¬a₁ refl ¬c₁ = tri≈ lemma1 refl lemma1 where
3186bbee99dd separte level
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
161 lemma1 : ¬ (Suc (lv b) ≤ lv b) ∨ (ord b d< ord b)
3186bbee99dd separte level
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
162 lemma1 (case1 x) = ¬a x
3186bbee99dd separte level
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
163 lemma1 (case2 x) = ≡→¬d< x
23
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 22
diff changeset
164
86
08be6351927e internal error
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 85
diff changeset
165
91
b4742cf4ef97 infinity axiom done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 88
diff changeset
166 open _∧_
b4742cf4ef97 infinity axiom done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 88
diff changeset
167
203
8edd2a13a7f3 fixing transfinte induction...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 202
diff changeset
168 TransFinite : {n m : Level} → { ψ : Ordinal {suc n} → Set m }
8edd2a13a7f3 fixing transfinte induction...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 202
diff changeset
169 → ( ∀ (lx : Nat ) → ( (x : Ordinal {suc n} ) → x o< ordinal lx (Φ lx) → ψ x ) → ψ ( record { lv = lx ; ord = Φ lx } ) )
222
59771eb07df0 TransFinite induction fixed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 220
diff changeset
170 → ( ∀ (lx : Nat ) → (x : OrdinalD lx ) → ( (y : Ordinal {suc n} ) → y o< ordinal lx (OSuc lx x) → ψ y ) → ψ ( record { lv = lx ; ord = OSuc lx x } ) )
22
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 21
diff changeset
171 → ∀ (x : Ordinal) → ψ x
204
d4802eb159ff Transfinite induction fixed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 203
diff changeset
172 TransFinite {n} {m} {ψ} caseΦ caseOSuc x = proj1 (TransFinite1 (lv x) (ord x) ) where
222
59771eb07df0 TransFinite induction fixed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 220
diff changeset
173 TransFinite1 : (lx : Nat) (ox : OrdinalD lx ) → ψ (ordinal lx ox) ∧ ( ( (x : Ordinal {suc n} ) → x o< ordinal lx ox → ψ x ) )
204
d4802eb159ff Transfinite induction fixed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 203
diff changeset
174 TransFinite1 Zero (Φ 0) = record { proj1 = caseΦ Zero lemma ; proj2 = lemma1 } where
203
8edd2a13a7f3 fixing transfinte induction...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 202
diff changeset
175 lemma : (x : Ordinal) → x o< ordinal Zero (Φ Zero) → ψ x
8edd2a13a7f3 fixing transfinte induction...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 202
diff changeset
176 lemma x (case1 ())
8edd2a13a7f3 fixing transfinte induction...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 202
diff changeset
177 lemma x (case2 ())
204
d4802eb159ff Transfinite induction fixed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 203
diff changeset
178 lemma1 : (x : Ordinal) → x o< ordinal Zero (Φ Zero) → ψ x
d4802eb159ff Transfinite induction fixed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 203
diff changeset
179 lemma1 x (case1 ())
d4802eb159ff Transfinite induction fixed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 203
diff changeset
180 lemma1 x (case2 ())
d4802eb159ff Transfinite induction fixed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 203
diff changeset
181 TransFinite1 (Suc lx) (Φ (Suc lx)) = record { proj1 = caseΦ (Suc lx) (λ x → lemma (lv x) (ord x)) ; proj2 = (λ x → lemma (lv x) (ord x)) } where
d4802eb159ff Transfinite induction fixed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 203
diff changeset
182 lemma0 : (ly : Nat) (oy : OrdinalD ly ) → ordinal ly oy o< ordinal lx (Φ lx) → ψ (ordinal ly oy)
d4802eb159ff Transfinite induction fixed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 203
diff changeset
183 lemma0 ly oy lt = proj2 ( TransFinite1 lx (Φ lx) ) (ordinal ly oy) lt
d4802eb159ff Transfinite induction fixed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 203
diff changeset
184 lemma : (ly : Nat) (oy : OrdinalD ly ) → ordinal ly oy o< ordinal (Suc lx) (Φ (Suc lx)) → ψ (ordinal ly oy)
213
22d435172d1a separate logic and nat
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 204
diff changeset
185 lemma lx1 ox1 (case1 lt) with <-∨ lt
22d435172d1a separate logic and nat
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 204
diff changeset
186 lemma lx (Φ lx) (case1 lt) | case1 refl = proj1 ( TransFinite1 lx (Φ lx) )
222
59771eb07df0 TransFinite induction fixed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 220
diff changeset
187 lemma lx (Φ lx) (case1 lt) | case2 lt1 = lemma0 lx (Φ lx) (case1 lt1)
59771eb07df0 TransFinite induction fixed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 220
diff changeset
188 lemma lx (OSuc lx ox1) (case1 lt) | case1 refl = caseOSuc lx ox1 lemma2 where
59771eb07df0 TransFinite induction fixed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 220
diff changeset
189 lemma2 : (y : Ordinal) → (Suc (lv y) ≤ lx) ∨ (ord y d< OSuc lx ox1) → ψ y
59771eb07df0 TransFinite induction fixed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 220
diff changeset
190 lemma2 y lt1 with osuc-≡< lt1
59771eb07df0 TransFinite induction fixed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 220
diff changeset
191 lemma2 y lt1 | case1 refl = lemma lx ox1 (case1 a<sa)
59771eb07df0 TransFinite induction fixed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 220
diff changeset
192 lemma2 y lt1 | case2 t = proj2 (TransFinite1 lx ox1) y t
59771eb07df0 TransFinite induction fixed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 220
diff changeset
193 lemma lx1 (OSuc lx1 ox1) (case1 lt) | case2 lt1 = caseOSuc lx1 ox1 lemma2 where
59771eb07df0 TransFinite induction fixed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 220
diff changeset
194 lemma2 : (y : Ordinal) → (Suc (lv y) ≤ lx1) ∨ (ord y d< OSuc lx1 ox1) → ψ y
59771eb07df0 TransFinite induction fixed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 220
diff changeset
195 lemma2 y lt2 with osuc-≡< lt2
59771eb07df0 TransFinite induction fixed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 220
diff changeset
196 lemma2 y lt2 | case1 refl = lemma lx1 ox1 (ordtrans lt2 (case1 lt))
59771eb07df0 TransFinite induction fixed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 220
diff changeset
197 lemma2 y lt2 | case2 (case1 lt3) = proj2 (TransFinite1 lx (Φ lx)) y (case1 (<-trans lt3 lt1 ))
59771eb07df0 TransFinite induction fixed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 220
diff changeset
198 lemma2 y lt2 | case2 (case2 lt3) with d<→lv lt3
59771eb07df0 TransFinite induction fixed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 220
diff changeset
199 ... | refl = proj2 (TransFinite1 lx (Φ lx)) y (case1 lt1)
59771eb07df0 TransFinite induction fixed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 220
diff changeset
200 TransFinite1 lx (OSuc lx ox) = record { proj1 = caseOSuc lx ox lemma ; proj2 = lemma } where
59771eb07df0 TransFinite induction fixed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 220
diff changeset
201 lemma : (y : Ordinal) → y o< ordinal lx (OSuc lx ox) → ψ y
59771eb07df0 TransFinite induction fixed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 220
diff changeset
202 lemma y lt with osuc-≡< lt
59771eb07df0 TransFinite induction fixed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 220
diff changeset
203 lemma y lt | case1 refl = proj1 ( TransFinite1 lx ox )
59771eb07df0 TransFinite induction fixed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 220
diff changeset
204 lemma y lt | case2 lt1 = proj2 ( TransFinite1 lx ox ) y lt1
97
f2b579106770 power set using sup on Def
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 94
diff changeset
205
224
afc864169325 recover ε-induction
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 222
diff changeset
206 open import Ordinals
222
59771eb07df0 TransFinite induction fixed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 220
diff changeset
207
224
afc864169325 recover ε-induction
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 222
diff changeset
208 C-Ordinal : {n : Level} → Ordinals {suc n}
222
59771eb07df0 TransFinite induction fixed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 220
diff changeset
209 C-Ordinal {n} = record {
59771eb07df0 TransFinite induction fixed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 220
diff changeset
210 ord = Ordinal {suc n}
59771eb07df0 TransFinite induction fixed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 220
diff changeset
211 ; o∅ = o∅
59771eb07df0 TransFinite induction fixed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 220
diff changeset
212 ; osuc = osuc
59771eb07df0 TransFinite induction fixed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 220
diff changeset
213 ; _o<_ = _o<_
324
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 276
diff changeset
214 ; next = ?
222
59771eb07df0 TransFinite induction fixed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 220
diff changeset
215 ; isOrdinal = record {
59771eb07df0 TransFinite induction fixed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 220
diff changeset
216 Otrans = ordtrans
59771eb07df0 TransFinite induction fixed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 220
diff changeset
217 ; OTri = trio<
59771eb07df0 TransFinite induction fixed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 220
diff changeset
218 ; ¬x<0 = ¬x<0
59771eb07df0 TransFinite induction fixed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 220
diff changeset
219 ; <-osuc = <-osuc
59771eb07df0 TransFinite induction fixed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 220
diff changeset
220 ; osuc-≡< = osuc-≡<
59771eb07df0 TransFinite induction fixed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 220
diff changeset
221 ; TransFinite = TransFinite1
324
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 276
diff changeset
222 ; is-limit = ?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 276
diff changeset
223 ; next-limit = ?
222
59771eb07df0 TransFinite induction fixed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 220
diff changeset
224 }
59771eb07df0 TransFinite induction fixed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 220
diff changeset
225 } where
59771eb07df0 TransFinite induction fixed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 220
diff changeset
226 ord1 : Set (suc n)
59771eb07df0 TransFinite induction fixed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 220
diff changeset
227 ord1 = Ordinal {suc n}
324
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 276
diff changeset
228 TransFinite1 : { ψ : ord1 → Set (suc n) }
222
59771eb07df0 TransFinite induction fixed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 220
diff changeset
229 → ( (x : ord1) → ( (y : ord1 ) → y o< x → ψ y ) → ψ x )
59771eb07df0 TransFinite induction fixed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 220
diff changeset
230 → ∀ (x : ord1) → ψ x
324
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 276
diff changeset
231 TransFinite1 {ψ} lt x = TransFinite {n} {suc n} {ψ} caseΦ caseOSuc x where
222
59771eb07df0 TransFinite induction fixed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 220
diff changeset
232 caseΦ : (lx : Nat) → ((x₁ : Ordinal) → x₁ o< ordinal lx (Φ lx) → ψ x₁) →
59771eb07df0 TransFinite induction fixed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 220
diff changeset
233 ψ (record { lv = lx ; ord = Φ lx })
59771eb07df0 TransFinite induction fixed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 220
diff changeset
234 caseΦ lx prev = lt (ordinal lx (Φ lx) ) prev
59771eb07df0 TransFinite induction fixed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 220
diff changeset
235 caseOSuc : (lx : Nat) (x₁ : OrdinalD lx) → ((y : Ordinal) → y o< ordinal lx (OSuc lx x₁) → ψ y) →
59771eb07df0 TransFinite induction fixed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 220
diff changeset
236 ψ (record { lv = lx ; ord = OSuc lx x₁ })
59771eb07df0 TransFinite induction fixed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 220
diff changeset
237 caseOSuc lx ox prev = lt (ordinal lx (OSuc lx ox)) prev
224
afc864169325 recover ε-induction
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 222
diff changeset
238