Mercurial > hg > Members > kono > Proof > ZF-in-agda
annotate OD.agda @ 299:171f23379e2e
better to use ordinal number hierachy to create HOD
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 23 Jun 2020 14:45:55 +0900 |
parents | 3795ffb127d0 |
children |
rev | line source |
---|---|
16 | 1 open import Level |
223
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
2 open import Ordinals |
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
3 module OD {n : Level } (O : Ordinals {n} ) where |
3 | 4 |
14
e11e95d5ddee
separete constructible set
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
11
diff
changeset
|
5 open import zf |
23 | 6 open import Data.Nat renaming ( zero to Zero ; suc to Suc ; ℕ to Nat ; _⊔_ to _n⊔_ ) |
14
e11e95d5ddee
separete constructible set
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
11
diff
changeset
|
7 open import Relation.Binary.PropositionalEquality |
e11e95d5ddee
separete constructible set
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
11
diff
changeset
|
8 open import Data.Nat.Properties |
6 | 9 open import Data.Empty |
10 open import Relation.Nullary | |
11 open import Relation.Binary | |
12 open import Relation.Binary.Core | |
13 | |
213
22d435172d1a
separate logic and nat
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
210
diff
changeset
|
14 open import logic |
22d435172d1a
separate logic and nat
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
210
diff
changeset
|
15 open import nat |
22d435172d1a
separate logic and nat
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
210
diff
changeset
|
16 |
223
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
17 open inOrdinal O |
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
18 |
27 | 19 -- Ordinal Definable Set |
11 | 20 |
223
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
21 record OD : Set (suc n ) where |
29
fce60b99dc55
posturate OD is isomorphic to Ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
28
diff
changeset
|
22 field |
223
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
23 def : (x : Ordinal ) → Set n |
29
fce60b99dc55
posturate OD is isomorphic to Ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
28
diff
changeset
|
24 |
141 | 25 open OD |
29
fce60b99dc55
posturate OD is isomorphic to Ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
28
diff
changeset
|
26 |
120 | 27 open _∧_ |
213
22d435172d1a
separate logic and nat
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
210
diff
changeset
|
28 open _∨_ |
22d435172d1a
separate logic and nat
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
210
diff
changeset
|
29 open Bool |
44
fcac01485f32
od→lv : {n : Level} → OD {n} → Nat
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
43
diff
changeset
|
30 |
223
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
31 record _==_ ( a b : OD ) : Set n where |
43
0d9b9db14361
equalitu and internal parametorisity
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
42
diff
changeset
|
32 field |
223
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
33 eq→ : ∀ { x : Ordinal } → def a x → def b x |
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
34 eq← : ∀ { x : Ordinal } → def b x → def a x |
43
0d9b9db14361
equalitu and internal parametorisity
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
42
diff
changeset
|
35 |
234
e06b76e5b682
ac from LEM in abstract ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
228
diff
changeset
|
36 id : {A : Set n} → A → A |
43
0d9b9db14361
equalitu and internal parametorisity
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
42
diff
changeset
|
37 id x = x |
0d9b9db14361
equalitu and internal parametorisity
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
42
diff
changeset
|
38 |
271 | 39 ==-refl : { x : OD } → x == x |
40 ==-refl {x} = record { eq→ = id ; eq← = id } | |
43
0d9b9db14361
equalitu and internal parametorisity
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
42
diff
changeset
|
41 |
0d9b9db14361
equalitu and internal parametorisity
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
42
diff
changeset
|
42 open _==_ |
0d9b9db14361
equalitu and internal parametorisity
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
42
diff
changeset
|
43 |
271 | 44 ==-trans : { x y z : OD } → x == y → y == z → x == z |
45 ==-trans x=y y=z = record { eq→ = λ {m} t → eq→ y=z (eq→ x=y t) ; eq← = λ {m} t → eq← x=y (eq← y=z t) } | |
43
0d9b9db14361
equalitu and internal parametorisity
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
42
diff
changeset
|
46 |
271 | 47 ==-sym : { x y : OD } → x == y → y == x |
48 ==-sym x=y = record { eq→ = λ {m} t → eq← x=y t ; eq← = λ {m} t → eq→ x=y t } | |
49 | |
43
0d9b9db14361
equalitu and internal parametorisity
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
42
diff
changeset
|
50 |
223
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
51 ⇔→== : { x y : OD } → ( {z : Ordinal } → def x z ⇔ def y z) → x == y |
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
52 eq→ ( ⇔→== {x} {y} eq ) {z} m = proj1 eq m |
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
53 eq← ( ⇔→== {x} {y} eq ) {z} m = proj2 eq m |
120 | 54 |
277
d9d3654baee1
seperate choice from LEM
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
276
diff
changeset
|
55 -- next assumptions are our axiom |
290 | 56 -- In classical Set Theory, HOD is used, as a subset of OD, |
277
d9d3654baee1
seperate choice from LEM
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
276
diff
changeset
|
57 -- HOD = { x | TC x ⊆ OD } |
290 | 58 -- where TC x is a transitive clusure of x, i.e. Union of all elemnts of all subset of x. |
59 -- This is not possible because we don't have V yet. | |
60 -- We simply assume V=OD here. | |
61 -- | |
62 -- We also assumes ODs are isomorphic to Ordinals, which is ususally proved by Goedel number tricks. | |
63 -- ODs have an ovbious maximum, but Ordinals are not. This means, od→ord is not an on-to mapping. | |
64 -- | |
65 -- ==→o≡ is necessary to prove axiom of extensionality. | |
66 -- | |
67 -- In classical Set Theory, sup is defined by Uion. Since we are working on constructive logic, | |
68 -- we need explict assumption on sup. | |
277
d9d3654baee1
seperate choice from LEM
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
276
diff
changeset
|
69 |
d9d3654baee1
seperate choice from LEM
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
276
diff
changeset
|
70 record ODAxiom : Set (suc n) where |
d9d3654baee1
seperate choice from LEM
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
276
diff
changeset
|
71 -- OD can be iso to a subset of Ordinal ( by means of Godel Set ) |
d9d3654baee1
seperate choice from LEM
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
276
diff
changeset
|
72 field |
297 | 73 maxod : Ordinal |
277
d9d3654baee1
seperate choice from LEM
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
276
diff
changeset
|
74 od→ord : OD → Ordinal |
297 | 75 ord→od : (x : Ordinal ) → x o< maxod → OD |
298
3795ffb127d0
... should we use HOD?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
297
diff
changeset
|
76 -- ZFSet has bounded solution of OD |
297 | 77 o<max : {x : OD } → od→ord x o< maxod |
298
3795ffb127d0
... should we use HOD?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
297
diff
changeset
|
78 def<maxod : {x y : Ordinal} → (lt : x o< maxod) → def (ord→od x lt ) y → y o< maxod |
277
d9d3654baee1
seperate choice from LEM
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
276
diff
changeset
|
79 c<→o< : {x y : OD } → def y ( od→ord x ) → od→ord x o< od→ord y |
297 | 80 oiso : {x : OD } → ord→od ( od→ord x ) o<max ≡ x |
81 diso : {x : Ordinal } → (lt : x o< maxod) → od→ord ( ord→od x lt ) ≡ x | |
277
d9d3654baee1
seperate choice from LEM
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
276
diff
changeset
|
82 ==→o≡ : { x y : OD } → (x == y) → x ≡ y |
d9d3654baee1
seperate choice from LEM
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
276
diff
changeset
|
83 -- supermum as Replacement Axiom ( corresponding Ordinal of OD has maximum ) |
d9d3654baee1
seperate choice from LEM
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
276
diff
changeset
|
84 sup-o : ( OD → Ordinal ) → Ordinal |
d9d3654baee1
seperate choice from LEM
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
276
diff
changeset
|
85 sup-o< : { ψ : OD → Ordinal } → ∀ {x : OD } → ψ x o< sup-o ψ |
297 | 86 sup-<od : { ψ : OD → OD } → ∀ {x : OD } → sup-o (λ x → od→ord (ψ x)) o< maxod |
277
d9d3654baee1
seperate choice from LEM
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
276
diff
changeset
|
87 -- contra-position of mimimulity of supermum required in Power Set Axiom which we don't use |
d9d3654baee1
seperate choice from LEM
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
276
diff
changeset
|
88 -- sup-x : {n : Level } → ( OD → Ordinal ) → Ordinal |
d9d3654baee1
seperate choice from LEM
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
276
diff
changeset
|
89 -- sup-lb : {n : Level } → { ψ : OD → Ordinal } → {z : Ordinal } → z o< sup-o ψ → z o< osuc (ψ (sup-x ψ)) |
d9d3654baee1
seperate choice from LEM
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
276
diff
changeset
|
90 |
d9d3654baee1
seperate choice from LEM
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
276
diff
changeset
|
91 postulate odAxiom : ODAxiom |
d9d3654baee1
seperate choice from LEM
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
276
diff
changeset
|
92 open ODAxiom odAxiom |
d9d3654baee1
seperate choice from LEM
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
276
diff
changeset
|
93 |
d9d3654baee1
seperate choice from LEM
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
276
diff
changeset
|
94 data One : Set n where |
d9d3654baee1
seperate choice from LEM
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
276
diff
changeset
|
95 OneObj : One |
d9d3654baee1
seperate choice from LEM
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
276
diff
changeset
|
96 |
d9d3654baee1
seperate choice from LEM
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
276
diff
changeset
|
97 -- Ordinals in OD , the maximum |
d9d3654baee1
seperate choice from LEM
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
276
diff
changeset
|
98 Ords : OD |
d9d3654baee1
seperate choice from LEM
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
276
diff
changeset
|
99 Ords = record { def = λ x → One } |
d9d3654baee1
seperate choice from LEM
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
276
diff
changeset
|
100 |
299
171f23379e2e
better to use ordinal number hierachy to create HOD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
298
diff
changeset
|
101 maxod0 : {x : OD} → od→ord x o< od→ord Ords |
171f23379e2e
better to use ordinal number hierachy to create HOD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
298
diff
changeset
|
102 maxod0 {x} = c<→o< OneObj |
277
d9d3654baee1
seperate choice from LEM
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
276
diff
changeset
|
103 |
179 | 104 -- Ordinal in OD ( and ZFSet ) Transitive Set |
223
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
105 Ord : ( a : Ordinal ) → OD |
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
106 Ord a = record { def = λ y → y o< a } |
109
dab56d357fa3
remove o<→c< and add otrans in OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
103
diff
changeset
|
107 |
223
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
108 od∅ : OD |
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
109 od∅ = Ord o∅ |
40 | 110 |
258 | 111 |
298
3795ffb127d0
... should we use HOD?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
297
diff
changeset
|
112 -- = subst (λ k → k o< maxod ) (diso {!!}) ( ordtrans ( c<→o< lt ) o<max ) |
297 | 113 -- o<→c<→OD=Ord : ( {x y : Ordinal } → x o< y → def (ord→od y {!!} ) x ) → {x : OD } → x ≡ Ord (od→ord x) |
114 -- o<→c<→OD=Ord o<→c< {x} = ==→o≡ ( record { eq→ = lemma1 ; eq← = lemma2 } ) where | |
115 -- lemma1 : {y : Ordinal} → def x y → def (Ord (od→ord x)) y | |
116 -- lemma1 {y} lt = subst ( λ k → k o< od→ord x ) (diso {!!}) (c<→o< {ord→od y {!!} } {x} (subst (λ k → def x k ) (sym (diso {!!})) lt)) | |
117 -- lemma2 : {y : Ordinal} → def (Ord (od→ord x)) y → def x y | |
118 -- lemma2 {y} lt = subst (λ k → def k y ) oiso (o<→c< {y} {od→ord x} lt ) | |
123 | 119 |
223
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
120 _∋_ : ( a x : OD ) → Set n |
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
121 _∋_ a x = def a ( od→ord x ) |
95 | 122 |
223
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
123 _c<_ : ( x a : OD ) → Set n |
109
dab56d357fa3
remove o<→c< and add otrans in OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
103
diff
changeset
|
124 x c< a = a ∋ x |
103 | 125 |
223
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
126 cseq : {n : Level} → OD → OD |
140
312e27aa3cb5
remove otrans again. start over
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
139
diff
changeset
|
127 cseq x = record { def = λ y → def x (osuc y) } where |
113 | 128 |
223
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
129 def-subst : {Z : OD } {X : Ordinal }{z : OD } {x : Ordinal }→ def Z X → Z ≡ z → X ≡ x → def z x |
95 | 130 def-subst df refl refl = df |
131 | |
260
8b85949bde00
sup with limit give up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
259
diff
changeset
|
132 sup-od : ( OD → OD ) → OD |
276 | 133 sup-od ψ = Ord ( sup-o ( λ x → od→ord (ψ x)) ) |
95 | 134 |
260
8b85949bde00
sup with limit give up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
259
diff
changeset
|
135 sup-c< : ( ψ : OD → OD ) → ∀ {x : OD } → def ( sup-od ψ ) (od→ord ( ψ x )) |
276 | 136 sup-c< ψ {x} = def-subst {_} {_} {Ord ( sup-o ( λ x → od→ord (ψ x)) )} {od→ord ( ψ x )} |
109
dab56d357fa3
remove o<→c< and add otrans in OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
103
diff
changeset
|
137 lemma refl (cong ( λ k → od→ord (ψ k) ) oiso) where |
297 | 138 lemma : od→ord (ψ (ord→od (od→ord x) o<max )) o< sup-o (λ x → od→ord (ψ x)) |
139 lemma = subst₂ (λ j k → j o< k ) refl (diso (sup-<od {ψ} {x}) ) (o<-subst (sup-o< ) refl (sym (diso sup-<od))) | |
28 | 140 |
223
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
141 otrans : {n : Level} {a x y : Ordinal } → def (Ord a) x → def (Ord x) y → def (Ord a) y |
187 | 142 otrans x<a y<x = ordtrans y<x x<a |
123 | 143 |
297 | 144 -- def→o< : {X : OD } → {x : Ordinal } → def X x → x o< od→ord X |
145 -- def→o< {X} {x} lt = o<-subst {_} {_} {x} {od→ord X} ( c<→o< ( def-subst {X} {x} lt (sym oiso) (sym (diso lemma)))) (diso lemma) (diso o<max) where | |
146 -- lemma : x o< maxod | |
147 -- lemma = subst (λ k → k o< maxod ) (diso {!!} ) (otrans o<max ( c<→o< lt )) | |
44
fcac01485f32
od→lv : {n : Level} → OD {n} → Nat
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
43
diff
changeset
|
148 |
297 | 149 ==-iso : { x y : OD } → ord→od (od→ord x) o<max == ord→od (od→ord y) o<max → x == y |
223
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
150 ==-iso {x} {y} eq = record { |
51 | 151 eq→ = λ d → lemma ( eq→ eq (def-subst d (sym oiso) refl )) ; |
152 eq← = λ d → lemma ( eq← eq (def-subst d (sym oiso) refl )) } | |
153 where | |
297 | 154 lemma : {x : OD } {z : Ordinal } → def (ord→od (od→ord x) o<max ) z → def x z |
51 | 155 lemma {x} {z} d = def-subst d oiso refl |
156 | |
297 | 157 =-iso : {x y : OD } → (x == y) ≡ (ord→od (od→ord x) o<max == y) |
223
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
158 =-iso {_} {y} = cong ( λ k → k == y ) (sym oiso) |
57 | 159 |
298
3795ffb127d0
... should we use HOD?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
297
diff
changeset
|
160 -- open import Relation.Binary.HeterogeneousEquality as HE using (_≅_;refl) |
3795ffb127d0
... should we use HOD?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
297
diff
changeset
|
161 -- |
297 | 162 <-irr : {x y z : Ordinal } → x ≡ y → (x o< z) ≡ (y o< z) |
163 <-irr refl = refl | |
164 | |
223
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
165 ord→== : { x y : OD } → od→ord x ≡ od→ord y → x == y |
298
3795ffb127d0
... should we use HOD?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
297
diff
changeset
|
166 ord→== {x} {y} eq = ==-iso (lemma (od→ord x) (od→ord y) eq o<max o<max ) where |
297 | 167 lemma : ( ox oy : Ordinal ) → ox ≡ oy → (x<m : ox o< maxod) (y<m : oy o< maxod) → (ord→od ox x<m ) == (ord→od oy y<m ) |
168 lemma ox ox refl x<m y<m = subst (λ k → ord→od ox x<m == ord→od ox k) {!!} ==-refl | |
51 | 169 |
298
3795ffb127d0
... should we use HOD?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
297
diff
changeset
|
170 o≡→== : { x y : Ordinal } → x ≡ y → (lx : x o< maxod ) → (ly : y o< maxod ) → ord→od x lx == ord→od y ly |
3795ffb127d0
... should we use HOD?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
297
diff
changeset
|
171 o≡→== {x} {.x} refl _ _ = {!!} -- ==-refl |
51 | 172 |
298
3795ffb127d0
... should we use HOD?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
297
diff
changeset
|
173 o∅<maxod : o∅ o< maxod |
3795ffb127d0
... should we use HOD?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
297
diff
changeset
|
174 o∅<maxod with IsOrdinals.OTri (Ordinals.isOrdinal O) o∅ maxod |
3795ffb127d0
... should we use HOD?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
297
diff
changeset
|
175 o∅<maxod | tri< a ¬b ¬c = a |
3795ffb127d0
... should we use HOD?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
297
diff
changeset
|
176 o∅<maxod | tri≈ ¬a b ¬c = ⊥-elim (¬x<0 (subst (λ k → (od→ord record { def = λ x → One }) o< k ) (sym b) o<max )) |
3795ffb127d0
... should we use HOD?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
297
diff
changeset
|
177 o∅<maxod | tri> ¬a ¬b c = ⊥-elim (¬x<0 c) |
3795ffb127d0
... should we use HOD?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
297
diff
changeset
|
178 |
3795ffb127d0
... should we use HOD?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
297
diff
changeset
|
179 o∅≡od∅ : ord→od o∅ o∅<maxod ≡ od∅ |
223
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
180 o∅≡od∅ = ==→o≡ lemma where |
298
3795ffb127d0
... should we use HOD?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
297
diff
changeset
|
181 lemma0 : {x : Ordinal} → x o< maxod → def (ord→od o∅ o∅<maxod) x → def od∅ x |
3795ffb127d0
... should we use HOD?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
297
diff
changeset
|
182 lemma0 {x} x<m lt = o<-subst (c<→o< {ord→od x x<m } {ord→od o∅ o∅<maxod} |
3795ffb127d0
... should we use HOD?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
297
diff
changeset
|
183 (def-subst {ord→od o∅ o∅<maxod} {x} lt refl (sym (diso x<m ))) ) (diso x<m) (diso o∅<maxod) |
3795ffb127d0
... should we use HOD?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
297
diff
changeset
|
184 lemma1 : {x : Ordinal} → def od∅ x → def (ord→od o∅ o∅<maxod ) x |
223
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
185 lemma1 {x} lt = ⊥-elim (¬x<0 lt) |
298
3795ffb127d0
... should we use HOD?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
297
diff
changeset
|
186 lemma : ord→od o∅ o∅<maxod == od∅ |
3795ffb127d0
... should we use HOD?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
297
diff
changeset
|
187 lemma = record { eq→ = λ {x} lt → lemma0 (def<maxod o∅<maxod lt ) lt ; eq← = lemma1 } |
150 | 188 |
223
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
189 ord-od∅ : od→ord (od∅ ) ≡ o∅ |
298
3795ffb127d0
... should we use HOD?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
297
diff
changeset
|
190 ord-od∅ = sym ( subst (λ k → k ≡ od→ord (od∅ ) ) (diso o∅<maxod) (cong ( λ k → od→ord k ) o∅≡od∅ ) ) |
80 | 191 |
223
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
192 ∅0 : record { def = λ x → Lift n ⊥ } == od∅ |
109
dab56d357fa3
remove o<→c< and add otrans in OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
103
diff
changeset
|
193 eq→ ∅0 {w} (lift ()) |
223
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
194 eq← ∅0 {w} lt = lift (¬x<0 lt) |
109
dab56d357fa3
remove o<→c< and add otrans in OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
103
diff
changeset
|
195 |
223
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
196 ∅< : { x y : OD } → def x (od→ord y ) → ¬ ( x == od∅ ) |
271 | 197 ∅< {x} {y} d eq with eq→ (==-trans eq (==-sym ∅0) ) d |
223
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
198 ∅< {x} {y} d eq | lift () |
57 | 199 |
223
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
200 ∅6 : { x : OD } → ¬ ( x ∋ x ) -- no Russel paradox |
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
201 ∅6 {x} x∋x = o<¬≡ refl ( c<→o< {x} {x} x∋x ) |
51 | 202 |
223
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
203 def-iso : {A B : OD } {x y : Ordinal } → x ≡ y → (def A y → def B y) → def A x → def B x |
76 | 204 def-iso refl t = t |
205 | |
223
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
206 is-o∅ : ( x : Ordinal ) → Dec ( x ≡ o∅ ) |
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
207 is-o∅ x with trio< x o∅ |
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
208 is-o∅ x | tri< a ¬b ¬c = no ¬b |
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
209 is-o∅ x | tri≈ ¬a b ¬c = yes b |
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
210 is-o∅ x | tri> ¬a ¬b c = no ¬b |
57 | 211 |
254 | 212 _,_ : OD → OD → OD |
213 x , y = record { def = λ t → (t ≡ od→ord x ) ∨ ( t ≡ od→ord y ) } -- Ord (omax (od→ord x) (od→ord y)) | |
188
1f2c8b094908
axiom of choice → p ∨ ¬ p
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
187
diff
changeset
|
214 |
79 | 215 -- open import Relation.Binary.HeterogeneousEquality as HE using (_≅_ ) |
223
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
216 -- postulate f-extensionality : { n : Level} → Relation.Binary.PropositionalEquality.Extensionality n (suc n) |
59
d13d1351a1fa
lemma = cong₂ (λ x not → minimul x not ) oiso { }6
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
58
diff
changeset
|
217 |
298
3795ffb127d0
... should we use HOD?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
297
diff
changeset
|
218 |
223
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
219 in-codomain : (X : OD ) → ( ψ : OD → OD ) → OD |
298
3795ffb127d0
... should we use HOD?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
297
diff
changeset
|
220 in-codomain X ψ = record { def = λ x → ¬ ( (y : Ordinal ) → ¬ ( (lt : def X y ) → (lt : y o< maxod) → ( x ≡ od→ord (ψ (ord→od y lt ))))) } where |
141 | 221 |
96 | 222 -- Power Set of X ( or constructible by λ y → def X (od→ord y ) |
97
f2b579106770
power set using sup on Def
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
96
diff
changeset
|
223 |
223
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
224 ZFSubset : (A x : OD ) → OD |
191
9eb6a8691f02
choice function cannot jump between ordinal level
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
190
diff
changeset
|
225 ZFSubset A x = record { def = λ y → def A y ∧ def x y } -- roughly x = A → Set |
97
f2b579106770
power set using sup on Def
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
96
diff
changeset
|
226 |
223
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
227 Def : (A : OD ) → OD |
276 | 228 Def A = Ord ( sup-o ( λ x → od→ord ( ZFSubset A x) ) ) |
190 | 229 |
271 | 230 -- _⊆_ : ( A B : OD ) → ∀{ x : OD } → Set n |
231 -- _⊆_ A B {x} = A ∋ x → B ∋ x | |
232 | |
233 record _⊆_ ( A B : OD ) : Set (suc n) where | |
234 field | |
235 incl : { x : OD } → A ∋ x → B ∋ x | |
236 | |
237 open _⊆_ | |
190 | 238 |
239 infixr 220 _⊆_ | |
240 | |
271 | 241 subset-lemma : {A x : OD } → ( {y : OD } → x ∋ y → ZFSubset A x ∋ y ) ⇔ ( x ⊆ A ) |
242 subset-lemma {A} {x} = record { | |
243 proj1 = λ lt → record { incl = λ x∋z → proj1 (lt x∋z) } | |
244 ; proj2 = λ x⊆A lt → record { proj1 = incl x⊆A lt ; proj2 = lt } | |
190 | 245 } |
246 | |
261
d9d178d1457c
ε-induction from TransFinite induction
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
260
diff
changeset
|
247 open import Data.Unit |
d9d178d1457c
ε-induction from TransFinite induction
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
260
diff
changeset
|
248 |
d9d178d1457c
ε-induction from TransFinite induction
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
260
diff
changeset
|
249 ε-induction : { ψ : OD → Set (suc n)} |
d9d178d1457c
ε-induction from TransFinite induction
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
260
diff
changeset
|
250 → ( {x : OD } → ({ y : OD } → x ∋ y → ψ y ) → ψ x ) |
d9d178d1457c
ε-induction from TransFinite induction
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
260
diff
changeset
|
251 → (x : OD ) → ψ x |
d9d178d1457c
ε-induction from TransFinite induction
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
260
diff
changeset
|
252 ε-induction {ψ} ind x = subst (λ k → ψ k ) oiso (ε-induction-ord (osuc (od→ord x)) <-osuc ) where |
297 | 253 induction : (ox : Ordinal) → ((oy : Ordinal) → oy o< ox → ψ (ord→od oy {!!} )) → ψ (ord→od ox {!!} ) |
254 induction ox prev = ind ( λ {y} lt → subst (λ k → ψ k ) oiso (prev (od→ord y) (o<-subst (c<→o< lt) refl (diso {!!}) ))) | |
255 ε-induction-ord : (ox : Ordinal) { oy : Ordinal } → oy o< ox → ψ (ord→od oy {!!} ) | |
256 ε-induction-ord ox {oy} lt = TransFinite {λ oy → ψ (ord→od oy {!!} )} induction oy | |
261
d9d178d1457c
ε-induction from TransFinite induction
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
260
diff
changeset
|
257 |
262 | 258 -- minimal-2 : (x : OD ) → ( ne : ¬ (x == od∅ ) ) → (y : OD ) → ¬ ( def (minimal x ne) (od→ord y)) ∧ (def x (od→ord y) ) |
259 -- minimal-2 x ne y = contra-position ( ε-induction (λ {z} ind → {!!} ) x ) ( λ p → {!!} ) | |
260 | |
223
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
261 OD→ZF : ZF |
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
262 OD→ZF = record { |
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
263 ZFSet = OD |
43
0d9b9db14361
equalitu and internal parametorisity
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
42
diff
changeset
|
264 ; _∋_ = _∋_ |
0d9b9db14361
equalitu and internal parametorisity
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
42
diff
changeset
|
265 ; _≈_ = _==_ |
29
fce60b99dc55
posturate OD is isomorphic to Ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
28
diff
changeset
|
266 ; ∅ = od∅ |
28 | 267 ; _,_ = _,_ |
268 ; Union = Union | |
29
fce60b99dc55
posturate OD is isomorphic to Ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
28
diff
changeset
|
269 ; Power = Power |
28 | 270 ; Select = Select |
271 ; Replace = Replace | |
161 | 272 ; infinite = infinite |
29
fce60b99dc55
posturate OD is isomorphic to Ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
28
diff
changeset
|
273 ; isZF = isZF |
28 | 274 } where |
287 | 275 ZFSet = OD -- is less than Ords because of maxod |
223
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
276 Select : (X : OD ) → ((x : OD ) → Set n ) → OD |
297 | 277 Select X ψ = record { def = λ x → ( def X x ∧ ψ ( ord→od x {!!} )) } |
223
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
278 Replace : OD → (OD → OD ) → OD |
276 | 279 Replace X ψ = record { def = λ x → (x o< sup-o ( λ x → od→ord (ψ x))) ∧ def (in-codomain X ψ) x } |
144 | 280 _∩_ : ( A B : ZFSet ) → ZFSet |
145 | 281 A ∩ B = record { def = λ x → def A x ∧ def B x } |
223
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
282 Union : OD → OD |
297 | 283 Union U = record { def = λ x → ¬ (∀ (u : Ordinal ) → ¬ ((def U u) ∧ (def (ord→od u {!!} ) x))) } |
223
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
284 _∈_ : ( A B : ZFSet ) → Set n |
29
fce60b99dc55
posturate OD is isomorphic to Ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
28
diff
changeset
|
285 A ∈ B = B ∋ A |
223
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
286 Power : OD → OD |
129 | 287 Power A = Replace (Def (Ord (od→ord A))) ( λ x → A ∩ x ) |
277
d9d3654baee1
seperate choice from LEM
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
276
diff
changeset
|
288 -- {_} : ZFSet → ZFSet |
287 | 289 -- { x } = ( x , x ) -- it works but we don't use |
109
dab56d357fa3
remove o<→c< and add otrans in OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
103
diff
changeset
|
290 |
223
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
291 data infinite-d : ( x : Ordinal ) → Set n where |
161 | 292 iφ : infinite-d o∅ |
223
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
293 isuc : {x : Ordinal } → infinite-d x → |
297 | 294 infinite-d (od→ord ( Union (ord→od x {!!} , (ord→od x {!!} , ord→od x {!!} ) ) )) |
161 | 295 |
223
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
296 infinite : OD |
161 | 297 infinite = record { def = λ x → infinite-d x } |
298 | |
29
fce60b99dc55
posturate OD is isomorphic to Ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
28
diff
changeset
|
299 infixr 200 _∈_ |
96 | 300 -- infixr 230 _∩_ _∪_ |
223
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
301 isZF : IsZF (OD ) _∋_ _==_ od∅ _,_ Union Power Select Replace infinite |
29
fce60b99dc55
posturate OD is isomorphic to Ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
28
diff
changeset
|
302 isZF = record { |
271 | 303 isEquivalence = record { refl = ==-refl ; sym = ==-sym; trans = ==-trans } |
247 | 304 ; pair→ = pair→ |
305 ; pair← = pair← | |
72 | 306 ; union→ = union→ |
307 ; union← = union← | |
29
fce60b99dc55
posturate OD is isomorphic to Ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
28
diff
changeset
|
308 ; empty = empty |
129 | 309 ; power→ = power→ |
76 | 310 ; power← = power← |
186 | 311 ; extensionality = λ {A} {B} {w} → extensionality {A} {B} {w} |
274 | 312 ; ε-induction = ε-induction |
78
9a7a64b2388c
infinite and replacement begin
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
77
diff
changeset
|
313 ; infinity∅ = infinity∅ |
160 | 314 ; infinity = infinity |
116 | 315 ; selection = λ {X} {ψ} {y} → selection {X} {ψ} {y} |
135 | 316 ; replacement← = replacement← |
317 ; replacement→ = replacement→ | |
274 | 318 -- ; choice-func = choice-func |
319 -- ; choice = choice | |
29
fce60b99dc55
posturate OD is isomorphic to Ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
28
diff
changeset
|
320 } where |
129 | 321 |
247 | 322 pair→ : ( x y t : ZFSet ) → (x , y) ∋ t → ( t == x ) ∨ ( t == y ) |
298
3795ffb127d0
... should we use HOD?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
297
diff
changeset
|
323 pair→ x y t (case1 t≡x ) = case1 (subst₂ (λ j k → j == k ) oiso oiso (o≡→== t≡x {!!} {!!} )) |
3795ffb127d0
... should we use HOD?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
297
diff
changeset
|
324 pair→ x y t (case2 t≡y ) = case2 (subst₂ (λ j k → j == k ) oiso oiso (o≡→== t≡y {!!} {!!} )) |
247 | 325 |
326 pair← : ( x y t : ZFSet ) → ( t == x ) ∨ ( t == y ) → (x , y) ∋ t | |
327 pair← x y t (case1 t==x) = case1 (cong (λ k → od→ord k ) (==→o≡ t==x)) | |
328 pair← x y t (case2 t==y) = case2 (cong (λ k → od→ord k ) (==→o≡ t==y)) | |
329 | |
223
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
330 empty : (x : OD ) → ¬ (od∅ ∋ x) |
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
331 empty x = ¬x<0 |
129 | 332 |
271 | 333 o<→c< : {x y : Ordinal } → x o< y → (Ord x) ⊆ (Ord y) |
334 o<→c< lt = record { incl = λ z → ordtrans z lt } | |
155 | 335 |
271 | 336 ⊆→o< : {x y : Ordinal } → (Ord x) ⊆ (Ord y) → x o< osuc y |
155 | 337 ⊆→o< {x} {y} lt with trio< x y |
338 ⊆→o< {x} {y} lt | tri< a ¬b ¬c = ordtrans a <-osuc | |
339 ⊆→o< {x} {y} lt | tri≈ ¬a b ¬c = subst ( λ k → k o< osuc y) (sym b) <-osuc | |
297 | 340 ⊆→o< {x} {y} lt | tri> ¬a ¬b c with (incl lt) (o<-subst c (sym (diso {!!})) refl ) |
341 ... | ttt = ⊥-elim ( o<¬≡ refl (o<-subst ttt (diso {!!}) refl )) | |
151 | 342 |
144 | 343 union→ : (X z u : OD) → (X ∋ u) ∧ (u ∋ z) → Union X ∋ z |
157
afc030b7c8d0
explict logical definition of Union failed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
156
diff
changeset
|
344 union→ X z u xx not = ⊥-elim ( not (od→ord u) ( record { proj1 = proj1 xx |
afc030b7c8d0
explict logical definition of Union failed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
156
diff
changeset
|
345 ; proj2 = subst ( λ k → def k (od→ord z)) (sym oiso) (proj2 xx) } )) |
159 | 346 union← : (X z : OD) (X∋z : Union X ∋ z) → ¬ ( (u : OD ) → ¬ ((X ∋ u) ∧ (u ∋ z ))) |
258 | 347 union← X z UX∋z = FExists _ lemma UX∋z where |
297 | 348 lemma : {y : Ordinal} → def X y ∧ def (ord→od y {!!} ) (od→ord z) → ¬ ((u : OD) → ¬ (X ∋ u) ∧ (u ∋ z)) |
349 lemma {y} xx not = not (ord→od y {!!} ) record { proj1 = subst ( λ k → def X k ) (sym (diso {!!})) (proj1 xx ) ; proj2 = proj2 xx } | |
144 | 350 |
223
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
351 ψiso : {ψ : OD → Set n} {x y : OD } → ψ x → x ≡ y → ψ y |
144 | 352 ψiso {ψ} t refl = t |
223
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
353 selection : {ψ : OD → Set n} {X y : OD} → ((X ∋ y) ∧ ψ y) ⇔ (Select X ψ ∋ y) |
144 | 354 selection {ψ} {X} {y} = record { |
355 proj1 = λ cond → record { proj1 = proj1 cond ; proj2 = ψiso {ψ} (proj2 cond) (sym oiso) } | |
356 ; proj2 = λ select → record { proj1 = proj1 select ; proj2 = ψiso {ψ} (proj2 select) oiso } | |
357 } | |
358 replacement← : {ψ : OD → OD} (X x : OD) → X ∋ x → Replace X ψ ∋ ψ x | |
260
8b85949bde00
sup with limit give up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
259
diff
changeset
|
359 replacement← {ψ} X x lt = record { proj1 = sup-c< ψ {x} ; proj2 = lemma } where |
144 | 360 lemma : def (in-codomain X ψ) (od→ord (ψ x)) |
298
3795ffb127d0
... should we use HOD?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
297
diff
changeset
|
361 lemma not = ⊥-elim ( not ( od→ord x ) {!!} ) -- (record { proj1 = lt ; proj2 = cong (λ k → od→ord (ψ k)) (sym oiso)} )) |
144 | 362 replacement→ : {ψ : OD → OD} (X x : OD) → (lt : Replace X ψ ∋ x) → ¬ ( (y : OD) → ¬ (x == ψ y)) |
298
3795ffb127d0
... should we use HOD?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
297
diff
changeset
|
363 replacement→ {ψ} X x lt = contra-position lemma (lemma2 {!!}) where |
297 | 364 lemma2 : ¬ ((y : Ordinal) → ¬ def X y ∧ ((od→ord x) ≡ od→ord (ψ (ord→od y {!!} )))) |
365 → ¬ ((y : Ordinal) → ¬ def X y ∧ (ord→od (od→ord x) {!!} == ψ (ord→od y {!!} ))) | |
144 | 366 lemma2 not not2 = not ( λ y d → not2 y (record { proj1 = proj1 d ; proj2 = lemma3 (proj2 d)})) where |
297 | 367 lemma3 : {y : Ordinal } → (od→ord x ≡ od→ord (ψ (ord→od y {!!} ))) → (ord→od (od→ord x) {!!} == ψ (ord→od y {!!} )) |
298
3795ffb127d0
... should we use HOD?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
297
diff
changeset
|
368 lemma3 {y} eq = subst (λ k → ord→od (od→ord x) {!!} == k ) oiso (o≡→== eq {!!} {!!} ) |
297 | 369 lemma : ( (y : OD) → ¬ (x == ψ y)) → ( (y : Ordinal) → ¬ def X y ∧ (ord→od (od→ord x) {!!} == ψ (ord→od y {!!} )) ) |
370 lemma not y not2 = not (ord→od y {!!} ) (subst (λ k → k == ψ (ord→od y {!!} )) oiso ( proj2 not2 )) | |
144 | 371 |
372 --- | |
373 --- Power Set | |
374 --- | |
375 --- First consider ordinals in OD | |
100 | 376 --- |
377 --- ZFSubset A x = record { def = λ y → def A y ∧ def x y } subset of A | |
378 -- | |
379 -- | |
223
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
380 ∩-≡ : { a b : OD } → ({x : OD } → (a ∋ x → b ∋ x)) → a == ( b ∩ a ) |
142 | 381 ∩-≡ {a} {b} inc = record { |
382 eq→ = λ {x} x<a → record { proj2 = x<a ; | |
297 | 383 proj1 = def-subst {_} {_} {b} {x} (inc (def-subst {_} {_} {a} {_} x<a refl (sym (diso {!!})) )) refl (diso {!!}) } ; |
142 | 384 eq← = λ {x} x<a∩b → proj2 x<a∩b } |
100 | 385 -- |
258 | 386 -- Transitive Set case |
387 -- we have t ∋ x → Ord a ∋ x means t is a subset of Ord a, that is ZFSubset (Ord a) t == t | |
388 -- Def (Ord a) is a sup of ZFSubset (Ord a) t, so Def (Ord a) ∋ t | |
389 -- Def A = Ord ( sup-o ( λ x → od→ord ( ZFSubset A (ord→od x )) ) ) | |
100 | 390 -- |
141 | 391 ord-power← : (a : Ordinal ) (t : OD) → ({x : OD} → (t ∋ x → (Ord a) ∋ x)) → Def (Ord a) ∋ t |
223
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
392 ord-power← a t t→A = def-subst {_} {_} {Def (Ord a)} {od→ord t} |
127 | 393 lemma refl (lemma1 lemma-eq )where |
129 | 394 lemma-eq : ZFSubset (Ord a) t == t |
97
f2b579106770
power set using sup on Def
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
96
diff
changeset
|
395 eq→ lemma-eq {z} w = proj2 w |
f2b579106770
power set using sup on Def
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
96
diff
changeset
|
396 eq← lemma-eq {z} w = record { proj2 = w ; |
223
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
397 proj1 = def-subst {_} {_} {(Ord a)} {z} |
297 | 398 ( t→A (def-subst {_} {_} {t} {od→ord (ord→od z {!!} )} w refl (sym (diso {!!})) )) refl (diso {!!}) } |
223
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
399 lemma1 : {a : Ordinal } { t : OD } |
297 | 400 → (eq : ZFSubset (Ord a) t == t) → od→ord (ZFSubset (Ord a) (ord→od (od→ord t) o<max )) ≡ od→ord t |
223
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
401 lemma1 {a} {t} eq = subst (λ k → od→ord (ZFSubset (Ord a) k) ≡ od→ord t ) (sym oiso) (cong (λ k → od→ord k ) (==→o≡ eq )) |
297 | 402 lemma : od→ord (ZFSubset (Ord a) (ord→od (od→ord t) o<max ) ) o< sup-o (λ x → od→ord (ZFSubset (Ord a) x)) |
260
8b85949bde00
sup with limit give up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
259
diff
changeset
|
403 lemma = sup-o< |
129 | 404 |
144 | 405 -- |
258 | 406 -- Every set in OD is a subset of Ordinals, so make Def (Ord (od→ord A)) first |
407 -- then replace of all elements of the Power set by A ∩ y | |
144 | 408 -- |
142 | 409 -- Power A = Replace (Def (Ord (od→ord A))) ( λ y → A ∩ y ) |
166 | 410 |
411 -- we have oly double negation form because of the replacement axiom | |
412 -- | |
413 power→ : ( A t : OD) → Power A ∋ t → {x : OD} → t ∋ x → ¬ ¬ (A ∋ x) | |
258 | 414 power→ A t P∋t {x} t∋x = FExists _ lemma5 lemma4 where |
142 | 415 a = od→ord A |
416 lemma2 : ¬ ( (y : OD) → ¬ (t == (A ∩ y))) | |
417 lemma2 = replacement→ (Def (Ord (od→ord A))) t P∋t | |
166 | 418 lemma3 : (y : OD) → t == ( A ∩ y ) → ¬ ¬ (A ∋ x) |
419 lemma3 y eq not = not (proj1 (eq→ eq t∋x)) | |
297 | 420 lemma4 : ¬ ((y : Ordinal) → ¬ (t == (A ∩ (ord→od y {!!} )))) |
142 | 421 lemma4 not = lemma2 ( λ y not1 → not (od→ord y) (subst (λ k → t == ( A ∩ k )) (sym oiso) not1 )) |
297 | 422 lemma5 : {y : Ordinal} → t == (A ∩ (ord→od y {!!})) → ¬ ¬ (def A (od→ord x)) |
423 lemma5 {y} eq not = (lemma3 (ord→od y {!!} ) eq) not | |
166 | 424 |
142 | 425 power← : (A t : OD) → ({x : OD} → (t ∋ x → A ∋ x)) → Power A ∋ t |
426 power← A t t→A = record { proj1 = lemma1 ; proj2 = lemma2 } where | |
427 a = od→ord A | |
428 lemma0 : {x : OD} → t ∋ x → Ord a ∋ x | |
429 lemma0 {x} t∋x = c<→o< (t→A t∋x) | |
430 lemma3 : Def (Ord a) ∋ t | |
431 lemma3 = ord-power← a t lemma0 | |
297 | 432 lemma4 : (A ∩ ord→od (od→ord t) {!!} ) ≡ t |
152 | 433 lemma4 = let open ≡-Reasoning in begin |
297 | 434 A ∩ ord→od (od→ord t) {!!} |
152 | 435 ≡⟨ cong (λ k → A ∩ k) oiso ⟩ |
436 A ∩ t | |
437 ≡⟨ sym (==→o≡ ( ∩-≡ t→A )) ⟩ | |
438 t | |
439 ∎ | |
276 | 440 lemma1 : od→ord t o< sup-o (λ x → od→ord (A ∩ x)) |
441 lemma1 = subst (λ k → od→ord k o< sup-o (λ x → od→ord (A ∩ x))) | |
442 lemma4 (sup-o< {λ x → od→ord (A ∩ x)} ) | |
142 | 443 lemma2 : def (in-codomain (Def (Ord (od→ord A))) (_∩_ A)) (od→ord t) |
298
3795ffb127d0
... should we use HOD?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
297
diff
changeset
|
444 lemma2 not = ⊥-elim ( not (od→ord t) {!!}) where -- (record { proj1 = lemma3 ; proj2 = lemma6 }) ) where |
297 | 445 lemma6 : od→ord t ≡ od→ord (A ∩ ord→od (od→ord t) {!!} ) |
151 | 446 lemma6 = cong ( λ k → od→ord k ) (==→o≡ (subst (λ k → t == (A ∩ k)) (sym oiso) ( ∩-≡ t→A ))) |
142 | 447 |
271 | 448 ord⊆power : (a : Ordinal) → (Ord (osuc a)) ⊆ (Power (Ord a)) |
449 ord⊆power a = record { incl = λ {x} lt → power← (Ord a) x (lemma lt) } where | |
450 lemma : {x y : OD} → od→ord x o< osuc a → x ∋ y → Ord a ∋ y | |
451 lemma lt y<x with osuc-≡< lt | |
452 lemma lt y<x | case1 refl = c<→o< y<x | |
453 lemma lt y<x | case2 x<a = ordtrans (c<→o< y<x) x<a | |
262 | 454 |
276 | 455 continuum-hyphotheis : (a : Ordinal) → Set (suc n) |
456 continuum-hyphotheis a = Power (Ord a) ⊆ Ord (osuc a) | |
129 | 457 |
223
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
458 extensionality0 : {A B : OD } → ((z : OD) → (A ∋ z) ⇔ (B ∋ z)) → A == B |
297 | 459 eq→ (extensionality0 {A} {B} eq ) {x} d = def-iso {A} {B} (sym (diso {!!})) (proj1 (eq (ord→od x {!!} ))) d |
460 eq← (extensionality0 {A} {B} eq ) {x} d = def-iso {B} {A} (sym (diso {!!})) (proj2 (eq (ord→od x {!!} ))) d | |
186 | 461 |
223
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
462 extensionality : {A B w : OD } → ((z : OD ) → (A ∋ z) ⇔ (B ∋ z)) → (w ∋ A) ⇔ (w ∋ B) |
186 | 463 proj1 (extensionality {A} {B} {w} eq ) d = subst (λ k → w ∋ k) ( ==→o≡ (extensionality0 {A} {B} eq) ) d |
464 proj2 (extensionality {A} {B} {w} eq ) d = subst (λ k → w ∋ k) (sym ( ==→o≡ (extensionality0 {A} {B} eq) )) d | |
129 | 465 |
223
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
466 infinity∅ : infinite ∋ od∅ |
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
467 infinity∅ = def-subst {_} {_} {infinite} {od→ord (od∅ )} iφ refl lemma where |
161 | 468 lemma : o∅ ≡ od→ord od∅ |
469 lemma = let open ≡-Reasoning in begin | |
470 o∅ | |
297 | 471 ≡⟨ sym (diso {!!}) ⟩ |
472 od→ord ( ord→od o∅ {!!} ) | |
161 | 473 ≡⟨ cong ( λ k → od→ord k ) o∅≡od∅ ⟩ |
474 od→ord od∅ | |
475 ∎ | |
476 infinity : (x : OD) → infinite ∋ x → infinite ∋ Union (x , (x , x )) | |
223
2e1f19c949dc
sepration of ordinal from OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
219
diff
changeset
|
477 infinity x lt = def-subst {_} {_} {infinite} {od→ord (Union (x , (x , x )))} ( isuc {od→ord x} lt ) refl lemma where |
297 | 478 lemma : od→ord (Union (ord→od (od→ord x) {!!} , (ord→od (od→ord x) {!!} , ord→od (od→ord x) {!!} ))) |
161 | 479 ≡ od→ord (Union (x , (x , x))) |
480 lemma = cong (λ k → od→ord (Union ( k , ( k , k ) ))) oiso | |
481 | |
234
e06b76e5b682
ac from LEM in abstract ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
228
diff
changeset
|
482 |
226
176ff97547b4
set theortic function definition using sup
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
223
diff
changeset
|
483 Union = ZF.Union OD→ZF |
176ff97547b4
set theortic function definition using sup
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
223
diff
changeset
|
484 Power = ZF.Power OD→ZF |
176ff97547b4
set theortic function definition using sup
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
223
diff
changeset
|
485 Select = ZF.Select OD→ZF |
176ff97547b4
set theortic function definition using sup
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
223
diff
changeset
|
486 Replace = ZF.Replace OD→ZF |
176ff97547b4
set theortic function definition using sup
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
223
diff
changeset
|
487 isZF = ZF.isZF OD→ZF |