478
|
1 {-# OPTIONS --allow-unsolved-metas #-}
|
508
|
2 open import Level hiding ( suc ; zero )
|
431
|
3 open import Ordinals
|
497
|
4 import OD
|
|
5 module zorn {n : Level } (O : Ordinals {n}) (_<_ : (x y : OD.HOD O ) → Set n ) where
|
431
|
6
|
|
7 open import zf
|
477
|
8 open import logic
|
|
9 -- open import partfunc {n} O
|
|
10
|
|
11 open import Relation.Nullary
|
|
12 open import Relation.Binary
|
|
13 open import Data.Empty
|
431
|
14 open import Relation.Binary
|
|
15 open import Relation.Binary.Core
|
477
|
16 open import Relation.Binary.PropositionalEquality
|
|
17 import BAlgbra
|
431
|
18
|
|
19
|
|
20 open inOrdinal O
|
|
21 open OD O
|
|
22 open OD.OD
|
|
23 open ODAxiom odAxiom
|
477
|
24 import OrdUtil
|
|
25 import ODUtil
|
431
|
26 open Ordinals.Ordinals O
|
|
27 open Ordinals.IsOrdinals isOrdinal
|
|
28 open Ordinals.IsNext isNext
|
|
29 open OrdUtil O
|
477
|
30 open ODUtil O
|
|
31
|
|
32
|
|
33 import ODC
|
|
34
|
|
35
|
|
36 open _∧_
|
|
37 open _∨_
|
|
38 open Bool
|
431
|
39
|
|
40
|
|
41 open HOD
|
|
42
|
508
|
43 record Element (A : HOD) : Set (Level.suc n) where
|
469
|
44 field
|
|
45 elm : HOD
|
|
46 is-elm : A ∋ elm
|
|
47
|
|
48 open Element
|
|
49
|
509
|
50 _<A_ : {A : HOD} → (x y : Element A ) → Set n
|
|
51 x <A y = elm x < elm y
|
|
52 _≡A_ : {A : HOD} → (x y : Element A ) → Set (Level.suc n)
|
|
53 x ≡A y = elm x ≡ elm y
|
|
54
|
508
|
55 IsPartialOrderSet : ( A : HOD ) → Set (Level.suc n)
|
509
|
56 IsPartialOrderSet A = IsStrictPartialOrder (_≡A_ {A}) _<A_
|
490
|
57
|
492
|
58 open _==_
|
|
59 open _⊆_
|
|
60
|
495
|
61 isA : { A B : HOD } → B ⊆ A → (x : Element B) → Element A
|
|
62 isA B⊆A x = record { elm = elm x ; is-elm = incl B⊆A (is-elm x) }
|
494
|
63
|
497
|
64 ⊆-IsPartialOrderSet : { A B : HOD } → B ⊆ A → IsPartialOrderSet A → IsPartialOrderSet B
|
|
65 ⊆-IsPartialOrderSet {A} {B} B⊆A PA = record {
|
|
66 isEquivalence = record { refl = refl ; sym = sym ; trans = trans } ; trans = λ {x} {y} {z} → trans1 {x} {y} {z}
|
498
|
67 ; irrefl = λ {x} {y} → irrefl1 {x} {y} ; <-resp-≈ = resp0
|
493
|
68 } where
|
495
|
69 _<B_ : (x y : Element B ) → Set n
|
|
70 x <B y = elm x < elm y
|
|
71 trans1 : {x y z : Element B} → x <B y → y <B z → x <B z
|
|
72 trans1 {x} {y} {z} x<y y<z = IsStrictPartialOrder.trans PA {isA B⊆A x} {isA B⊆A y} {isA B⊆A z} x<y y<z
|
|
73 irrefl1 : {x y : Element B} → elm x ≡ elm y → ¬ ( x <B y )
|
|
74 irrefl1 {x} {y} x=y x<y = IsStrictPartialOrder.irrefl PA {isA B⊆A x} {isA B⊆A y} x=y x<y
|
|
75 open import Data.Product
|
|
76 resp0 : ({x y z : Element B} → elm y ≡ elm z → x <B y → x <B z) × ({x y z : Element B} → elm y ≡ elm z → y <B x → z <B x)
|
|
77 resp0 = Data.Product._,_ (λ {x} {y} {z} → proj₁ (IsStrictPartialOrder.<-resp-≈ PA) {isA B⊆A x } {isA B⊆A y }{isA B⊆A z })
|
|
78 (λ {x} {y} {z} → proj₂ (IsStrictPartialOrder.<-resp-≈ PA) {isA B⊆A x } {isA B⊆A y }{isA B⊆A z })
|
492
|
79
|
497
|
80 -- open import Relation.Binary.Properties.Poset as Poset
|
496
|
81
|
508
|
82 IsTotalOrderSet : ( A : HOD ) → Set (Level.suc n)
|
509
|
83 IsTotalOrderSet A = IsStrictTotalOrder (_≡A_ {A}) _<A_
|
490
|
84
|
469
|
85 me : { A a : HOD } → A ∋ a → Element A
|
|
86 me {A} {a} lt = record { elm = a ; is-elm = lt }
|
|
87
|
504
|
88 A∋x-irr : (A : HOD) {x y : HOD} → x ≡ y → (A ∋ x) ≡ (A ∋ y )
|
|
89 A∋x-irr A {x} {y} refl = refl
|
|
90
|
506
|
91 me-elm-refl : (A : HOD) → (x : Element A) → elm (me {A} (d→∋ A (is-elm x))) ≡ elm x
|
|
92 me-elm-refl A record { elm = ex ; is-elm = ax } = *iso
|
504
|
93
|
|
94 open import Relation.Binary.HeterogeneousEquality as HE using (_≅_ )
|
|
95
|
|
96 postulate
|
|
97 ∋x-irr : (A : HOD) {x y : HOD} → x ≡ y → (ax : A ∋ x) (ay : A ∋ y ) → ax ≅ ay
|
|
98 odef-irr : (A : OD) {x y : Ordinal} → x ≡ y → (ax : def A x) (ay : def A y ) → ax ≅ ay
|
|
99
|
|
100 is-elm-irr : (A : HOD) → {x y : Element A } → elm x ≡ elm y → is-elm x ≅ is-elm y
|
|
101 is-elm-irr A {x} {y} eq = ∋x-irr A eq (is-elm x) (is-elm y )
|
|
102
|
|
103 El-irr2 : (A : HOD) → {x y : Element A } → elm x ≡ elm y → is-elm x ≅ is-elm y → x ≡ y
|
|
104 El-irr2 A {x} {y} refl HE.refl = refl
|
|
105
|
|
106 El-irr : {A : HOD} → {x y : Element A } → elm x ≡ elm y → x ≡ y
|
|
107 El-irr {A} {x} {y} eq = El-irr2 A eq ( is-elm-irr A eq )
|
|
108
|
508
|
109 record ZChain ( A : HOD ) (y : Ordinal) : Set (Level.suc n) where
|
464
|
110 field
|
497
|
111 max : HOD
|
|
112 A∋max : A ∋ max
|
|
113 y<max : y o< & max
|
|
114 chain : HOD
|
|
115 chain⊆A : chain ⊆ A
|
|
116 total : IsTotalOrderSet chain
|
|
117 chain-max : (x : HOD) → chain ∋ x → (x ≡ max ) ∨ ( x < max )
|
498
|
118
|
|
119 data IChain (A : HOD) : Ordinal → Set n where
|
|
120 ifirst : {ox : Ordinal} → odef A ox → IChain A ox
|
|
121 inext : {ox oy : Ordinal} → odef A oy → * ox < * oy → IChain A ox → IChain A oy
|
|
122
|
506
|
123 -- * ox < .. < * oy
|
|
124 ic-connect : {A : HOD} {oy : Ordinal} → (ox : Ordinal) → (iy : IChain A oy) → Set n
|
|
125 ic-connect {A} ox (ifirst {oy} ay) = Lift n ⊥
|
|
126 ic-connect {A} ox (inext {oy} {oz} ay y<z iz) = (ox ≡ oy) ∨ ic-connect ox iz
|
|
127
|
|
128 ic→odef : {A : HOD} {ox : Ordinal} → IChain A ox → odef A ox
|
|
129 ic→odef {A} {ox} (ifirst ax) = ax
|
|
130 ic→odef {A} {ox} (inext ax x<y ic) = ax
|
|
131
|
|
132 ic→< : {A : HOD} → (IsPartialOrderSet A) → (x : Ordinal) → odef A x → {y : Ordinal} → (iy : IChain A y) → ic-connect {A} {y} x iy → * x < * y
|
|
133 ic→< {A} PO x ax {y} (ifirst ay) ()
|
|
134 ic→< {A} PO x ax {y} (inext ay x<y iy) (case1 refl) = x<y
|
|
135 ic→< {A} PO x ax {y} (inext {oy} ay x<y iy) (case2 ic) = IsStrictPartialOrder.trans PO
|
|
136 {me (subst (λ k → odef A k) (sym &iso) ax )} {me (subst (λ k → odef A k) (sym &iso) (ic→odef {A} {oy} iy) ) } {me (subst (λ k → odef A k) (sym &iso) ay) }
|
|
137 (ic→< {A} PO x ax iy ic ) x<y
|
|
138
|
|
139 record IChained (A : HOD) (x y : Ordinal) : Set n where
|
|
140 field
|
|
141 iy : IChain A y
|
|
142 ic : ic-connect x iy
|
498
|
143
|
|
144 IChainSet : {A : HOD} → Element A → HOD
|
506
|
145 IChainSet {A} ax = record { od = record { def = λ y → odef A y ∧ IChained A (& (elm ax)) y }
|
498
|
146 ; odmax = & A ; <odmax = λ {y} lt → subst (λ k → k o< & A) &iso (c<→o< (subst (λ k → odef A k) (sym &iso) (proj1 lt))) }
|
|
147
|
512
|
148 IChainSet⊆A : {A : HOD} → (x : Element A ) → IChainSet x ⊆ A
|
|
149 IChainSet⊆A {A} x = record { incl = λ {oy} y → proj1 y }
|
|
150
|
498
|
151 -- there is a y, & y > & x
|
|
152
|
501
|
153 record OSup> (A : HOD) {x : Ordinal} (ax : A ∋ * x) : Set n where
|
498
|
154 field
|
501
|
155 y : Ordinal
|
|
156 icy : odef (IChainSet {A} (me ax)) y
|
|
157 y>x : x o< y
|
498
|
158
|
505
|
159 record IChainSup> (A : HOD) {x : Ordinal} (ax : A ∋ * x) : Set n where
|
|
160 field
|
|
161 y : Ordinal
|
|
162 A∋y : odef A y
|
|
163 y>x : * x < * y
|
|
164
|
498
|
165 -- finite IChain
|
|
166
|
511
|
167 ic→A∋y : (A : HOD) {x y : Ordinal} (ax : A ∋ * x) → odef (IChainSet {A} (me ax)) y → A ∋ * y
|
|
168 ic→A∋y A {x} {y} ax ⟪ ay , _ ⟫ = subst (λ k → odef A k) (sym &iso) ay
|
|
169
|
501
|
170 record InFiniteIChain (A : HOD) {x : Ordinal} (ax : A ∋ * x) : Set n where
|
498
|
171 field
|
501
|
172 chain<x : (y : Ordinal ) → odef (IChainSet {A} (me ax)) y → y o< x
|
|
173 c-infinite : (y : Ordinal ) → (cy : odef (IChainSet {A} (me ax)) y )
|
511
|
174 → IChainSup> A (ic→A∋y A ax cy)
|
509
|
175
|
510
|
176 open import Data.Nat hiding (_<_)
|
|
177 import Data.Nat.Properties as NP
|
|
178 open import nat
|
|
179
|
509
|
180 data Chain (A : HOD) (next : (x : Ordinal ) → odef A x → Ordinal ) : ( x : Ordinal ) → Set n where
|
510
|
181 cfirst : (x : Ordinal ) → odef A x → Chain A next x
|
512
|
182 csuc : (x : Ordinal ) → (ax : odef A x ) → Chain A next x → odef A (next x ax) → Chain A next (next x ax )
|
|
183
|
|
184 ct∈A : (A : HOD ) → (next : (x : Ordinal ) → odef A x → Ordinal ) → {x : Ordinal} → Chain A next x → odef A x
|
|
185 ct∈A A next {x} (cfirst .x x₁) = x₁
|
|
186 ct∈A A next {.(next x ax)} (csuc x ax t anx) = anx
|
509
|
187
|
|
188 ChainClosure : (A : HOD) → (next : (x : Ordinal ) → odef A x → Ordinal ) → HOD
|
512
|
189 ChainClosure A next = record { od = record { def = λ x → Chain A next x } ; odmax = & A ; <odmax = {!!} }
|
509
|
190
|
510
|
191 cton0 : (A : HOD ) → (next : (x : Ordinal ) → odef A x → Ordinal ) {y : Ordinal } → Chain A next y → ℕ
|
|
192 cton0 A next (cfirst _ x) = zero
|
512
|
193 cton0 A next (csuc x ax z _) = suc (cton0 A next z)
|
510
|
194 cton : (A : HOD ) → (next : (x : Ordinal ) → odef A x → Ordinal ) → Element (ChainClosure A next) → ℕ
|
|
195 cton A next y = cton0 A next (is-elm y)
|
|
196
|
509
|
197 InFCSet : (A : HOD) → {x : Ordinal} (ax : A ∋ * x)
|
|
198 → (ifc : InFiniteIChain A ax ) → HOD
|
|
199 InFCSet A ax ifc = ChainClosure (IChainSet {A} (me ax)) (λ y ay → IChainSup>.y ( InFiniteIChain.c-infinite ifc y ay ) )
|
|
200
|
512
|
201 InFCSet⊆A : (A : HOD) → {x : Ordinal} (ax : A ∋ * x) → (ifc : InFiniteIChain A ax ) → InFCSet A ax ifc ⊆ A
|
|
202 InFCSet⊆A A {x} ax ifc = record { incl = λ {y} lt → incl (IChainSet⊆A (me ax)) (
|
|
203 ct∈A (IChainSet {A} (me ax)) (λ y ay → IChainSup>.y ( InFiniteIChain.c-infinite ifc y ay ) ) lt ) }
|
|
204
|
509
|
205 ChainClosure-is-total : (A : HOD) → {x : Ordinal} (ax : A ∋ * x)
|
|
206 → IsPartialOrderSet A
|
|
207 → (ifc : InFiniteIChain A ax )
|
|
208 → IsTotalOrderSet ( InFCSet A ax ifc )
|
|
209 ChainClosure-is-total A {x} ax PO ifc = record { isEquivalence = IsStrictPartialOrder.isEquivalence IPO
|
|
210 ; trans = λ {x} {y} {z} → IsStrictPartialOrder.trans IPO {x} {y} {z} ; compare = cmp } where
|
|
211 IPO : IsPartialOrderSet (InFCSet A ax ifc )
|
512
|
212 IPO = ⊆-IsPartialOrderSet record { incl = λ {y} lt → incl (InFCSet⊆A A {x} ax ifc) lt} PO
|
511
|
213 B = IChainSet {A} (me ax)
|
|
214 cnext : (y : Ordinal ) → odef B y → Ordinal
|
510
|
215 cnext y ay = IChainSup>.y ( InFiniteIChain.c-infinite ifc y ay )
|
512
|
216 ct02 : {ox : Ordinal} → (x : Chain B cnext ox ) → A ∋ * ox
|
|
217 ct02 x = incl (IChainSet⊆A {A} (me ax)) (subst (λ k → odef (IChainSet (me ax)) k) (sym &iso) (ct∈A B cnext x) )
|
511
|
218 ct-monotonic : {ox oy : Ordinal} → (x : Chain B cnext ox ) → (y : Chain B cnext oy )
|
|
219 → (cton0 B cnext x) Data.Nat.< (cton0 B cnext y) → * ox < * oy
|
512
|
220 ct-monotonic {ox} {oy} x (csuc oy1 ay y _) (s≤s lt) with NP.<-cmp ( cton0 B cnext x ) ( cton0 B cnext y )
|
|
221 ... | tri< a ¬b ¬c = IsStrictPartialOrder.trans PO {me (ct02 x) } {me (ct02 y)} {me ct03} (ct-monotonic x y a ) ct01 where
|
|
222 ct03 : A ∋ * (IChainSup>.y (InFiniteIChain.c-infinite ifc oy1 ay))
|
|
223 ct03 = subst (λ k → odef A k ) (sym &iso) (IChainSup>.A∋y (InFiniteIChain.c-infinite ifc oy1 ay))
|
|
224 ct01 : * oy1 < * ( IChainSup>.y (InFiniteIChain.c-infinite ifc oy1 ay) )
|
|
225 ct01 = (IChainSup>.y>x (InFiniteIChain.c-infinite ifc oy1 ay))
|
511
|
226 ... | tri≈ ¬a b ¬c = {!!}
|
|
227 ... | tri> ¬a ¬b c = {!!}
|
509
|
228 cmp : Trichotomous _ _
|
511
|
229 cmp x y with NP.<-cmp (cton B cnext x) (cton B cnext y)
|
510
|
230 ... | tri< a ¬b ¬c = {!!}
|
|
231 ... | tri≈ ¬a b ¬c = {!!}
|
|
232 ... | tri> ¬a ¬b c = {!!}
|
509
|
233
|
501
|
234
|
502
|
235 record IsFC (A : HOD) {x : Ordinal} (ax : A ∋ * x) (y : Ordinal) : Set n where
|
501
|
236 field
|
|
237 icy : odef (IChainSet {A} (me ax)) y
|
505
|
238 c-finite : ¬ IChainSup> A ax
|
497
|
239
|
508
|
240 record Maximal ( A : HOD ) : Set (Level.suc n) where
|
503
|
241 field
|
|
242 maximal : HOD
|
|
243 A∋maximal : A ∋ maximal
|
|
244 ¬maximal<x : {x : HOD} → A ∋ x → ¬ maximal < x -- A is Partial, use negative
|
|
245
|
|
246 --
|
|
247 -- possible three cases in a limit ordinal step
|
|
248 --
|
507
|
249 -- case 1) < goes > x (will contradic in the transfinite induction )
|
503
|
250 -- case 2) no > x in some chain ( maximal )
|
507
|
251 -- case 3) countably infinite chain below x (will be prohibited by sup condtion )
|
503
|
252 --
|
|
253 Zorn-lemma-3case : { A : HOD }
|
498
|
254 → o∅ o< & A
|
|
255 → IsPartialOrderSet A
|
501
|
256 → (x : Element A) → OSup> A (d→∋ A (is-elm x)) ∨ Maximal A ∨ InFiniteIChain A (d→∋ A (is-elm x))
|
503
|
257 Zorn-lemma-3case {A} 0<A PO x = zc2 where
|
499
|
258 Gtx : HOD
|
|
259 Gtx = record { od = record { def = λ y → odef ( IChainSet x ) y ∧ ( & (elm x) o< y ) } ; odmax = & A
|
501
|
260 ; <odmax = λ lt → subst (λ k → k o< & A) &iso (c<→o< (d→∋ A (proj1 (proj1 lt)))) }
|
|
261 HG : HOD
|
502
|
262 HG = record { od = record { def = λ y → odef A y ∧ IsFC A (d→∋ A (is-elm x) ) y } ; odmax = & A
|
501
|
263 ; <odmax = λ lt → subst (λ k → k o< & A) &iso (c<→o< (d→∋ A (proj1 lt) )) }
|
|
264 zc2 : OSup> A (d→∋ A (is-elm x)) ∨ Maximal A ∨ InFiniteIChain A (d→∋ A (is-elm x))
|
499
|
265 zc2 with is-o∅ (& Gtx)
|
504
|
266 ... | no not = case1 record { y = & y ; icy = zc4 ; y>x = proj2 zc3 } where
|
|
267 y : HOD
|
|
268 y = ODC.minimal O Gtx (λ eq → not (=od∅→≡o∅ eq))
|
|
269 zc3 : odef ( IChainSet x ) (& y) ∧ ( & (elm x) o< (& y ))
|
|
270 zc3 = ODC.x∋minimal O Gtx (λ eq → not (=od∅→≡o∅ eq))
|
|
271 zc4 : odef (IChainSet (me (subst (OD.def (od A)) (sym &iso) (is-elm x)))) (& y)
|
506
|
272 zc4 = ⟪ proj1 (proj1 zc3) , subst (λ k → IChained A (& k) (& y) ) (sym *iso) (proj2 (proj1 zc3)) ⟫
|
501
|
273 ... | yes nogt with is-o∅ (& HG)
|
505
|
274 ... | no finite-chain = case2 (case1 record { maximal = y ; A∋maximal = proj1 zc3 ; ¬maximal<x = zc4 } ) where
|
504
|
275 y : HOD
|
505
|
276 y = ODC.minimal O HG (λ eq → finite-chain (=od∅→≡o∅ eq))
|
504
|
277 zc3 : odef A (& y) ∧ IsFC A (d→∋ A (is-elm x) ) (& y)
|
505
|
278 zc3 = ODC.x∋minimal O HG (λ eq → finite-chain (=od∅→≡o∅ eq))
|
504
|
279 zc5 : odef (IChainSet {A} (me (d→∋ A (is-elm x) ))) (& y)
|
|
280 zc5 = IsFC.icy (proj2 zc3)
|
|
281 zc4 : {z : HOD} → A ∋ z → ¬ (y < z)
|
506
|
282 zc4 {z} az y<z = IsFC.c-finite (proj2 zc3) record { y = & z ; A∋y = az ; y>x = subst₂ (λ j k → j < k ) (sym *iso) (sym *iso) zc6 } where
|
|
283 zc8 : ic-connect (& (* (& (elm x)))) (IChained.iy (proj2 zc5))
|
|
284 zc8 = IChained.ic (proj2 zc5)
|
|
285 zc7 : elm x < y
|
|
286 zc7 = subst₂ (λ j k → j < k ) *iso *iso ( ic→< {A} PO (& (elm x)) (is-elm x) (IChained.iy (proj2 zc5))
|
|
287 (subst (λ k → ic-connect (& k) (IChained.iy (proj2 zc5)) ) (me-elm-refl A x) (IChained.ic (proj2 zc5)) ) )
|
505
|
288 zc6 : elm x < z
|
506
|
289 zc6 = IsStrictPartialOrder.trans PO {x} {me (proj1 zc3)} {me az} zc7 y<z
|
507
|
290 ... | yes inifite = case2 (case2 record { chain<x = {!!} ; c-infinite = {!!} } )
|
499
|
291
|
498
|
292
|
508
|
293 record SUP ( A B : HOD ) : Set (Level.suc n) where
|
503
|
294 field
|
|
295 sup : HOD
|
|
296 A∋maximal : A ∋ sup
|
|
297 x<sup : {x : HOD} → B ∋ x → (x ≡ sup ) ∨ (x < sup ) -- B is Total, use positive
|
|
298
|
497
|
299 Zorn-lemma : { A : HOD }
|
464
|
300 → o∅ o< & A
|
497
|
301 → IsPartialOrderSet A
|
|
302 → ( ( B : HOD) → (B⊆A : B ⊆ A) → IsTotalOrderSet B → SUP A B ) -- SUP condition
|
|
303 → Maximal A
|
507
|
304 Zorn-lemma {A} 0<A PO supP = zorn04 where
|
493
|
305 z01 : {a b : HOD} → A ∋ a → A ∋ b → (a ≡ b ) ∨ (a < b ) → b < a → ⊥
|
496
|
306 z01 {a} {b} A∋a A∋b (case1 a=b) b<a = IsStrictPartialOrder.irrefl PO {me A∋b} {me A∋a} (sym a=b) b<a
|
|
307 z01 {a} {b} A∋a A∋b (case2 a<b) b<a = IsStrictPartialOrder.irrefl PO {me A∋b} {me A∋b} refl (IsStrictPartialOrder.trans PO {me A∋b} {me A∋a} {me A∋b} b<a a<b)
|
507
|
308 z02 : {x : Ordinal } → (ax : A ∋ * x ) → InFiniteIChain A ax → ⊥
|
|
309 z02 {x} ax ic = zc5 ic where
|
|
310 FC : HOD
|
|
311 FC = IChainSet {A} (me ax)
|
|
312 zc6 : InFiniteIChain A ax → ¬ SUP A FC
|
|
313 zc6 inf = {!!}
|
|
314 FC-is-total : IsTotalOrderSet FC
|
|
315 FC-is-total = {!!}
|
|
316 FC⊆A : FC ⊆ A
|
|
317 FC⊆A = record { incl = λ {x} lt → proj1 lt }
|
|
318 zc5 : InFiniteIChain A ax → ⊥
|
|
319 zc5 x = zc6 x ( supP FC FC⊆A FC-is-total )
|
478
|
320 -- ZChain is not compatible with the SUP condition
|
497
|
321 ind : (x : Ordinal) → ((y : Ordinal) → y o< x → ZChain A y ∨ Maximal A )
|
|
322 → ZChain A x ∨ Maximal A
|
|
323 ind x prev with Oprev-p x
|
477
|
324 ... | yes op with ODC.∋-p O A (* x)
|
498
|
325 ... | no ¬Ax = zc1 where
|
476
|
326 -- we have previous ordinal and ¬ A ∋ x, use previous Zchain
|
471
|
327 px = Oprev.oprev op
|
498
|
328 zc1 : ZChain A x ∨ Maximal A
|
497
|
329 zc1 with prev px (subst (λ k → px o< k) (Oprev.oprev=x op) <-osuc)
|
498
|
330 ... | case2 x = case2 x -- we have the Maximal
|
|
331 ... | case1 z with trio< x (& (ZChain.max z))
|
|
332 ... | tri< a ¬b ¬c = case1 record { max = ZChain.max z ; y<max = a }
|
|
333 ... | tri≈ ¬a b ¬c = {!!} -- x = max so ¬ A ∋ max
|
|
334 ... | tri> ¬a ¬b c = {!!} -- can't happen
|
503
|
335 ... | yes ax = zc4 where -- we have previous ordinal and A ∋ x
|
472
|
336 px = Oprev.oprev op
|
503
|
337 zc1 : OSup> A (subst (OD.def (od A)) (sym &iso) ax) → ZChain A x ∨ Maximal A
|
|
338 zc1 os with prev px (subst (λ k → px o< k) (Oprev.oprev=x op) <-osuc)
|
498
|
339 ... | case2 x = case2 x
|
507
|
340 ... | case1 x = {!!}
|
503
|
341 zc4 : ZChain A x ∨ Maximal A
|
|
342 zc4 with Zorn-lemma-3case 0<A PO (me ax)
|
|
343 ... | case1 y>x = zc1 y>x
|
|
344 ... | case2 (case1 x) = case2 x
|
|
345 ... | case2 (case2 x) = ⊥-elim (zc5 x) where
|
|
346 FC : HOD
|
|
347 FC = IChainSet {A} (me ax)
|
511
|
348 B : InFiniteIChain A ax → HOD
|
|
349 B ifc = InFCSet A ax ifc
|
|
350 zc6 : (ifc : InFiniteIChain A ax ) → ¬ SUP A (B ifc)
|
503
|
351 zc6 = {!!}
|
511
|
352 FC-is-total : (ifc : InFiniteIChain A ax) → IsTotalOrderSet (B ifc)
|
|
353 FC-is-total ifc = ChainClosure-is-total A ax PO ifc
|
|
354 B⊆A : (ifc : InFiniteIChain A ax) → B ifc ⊆ A
|
|
355 B⊆A = {!!}
|
|
356 ifc : InFiniteIChain A (subst (OD.def (od A)) (sym &iso) ax) → InFiniteIChain A ax
|
512
|
357 ifc record { chain<x = chain<x ; c-infinite = c-infinite } = record { chain<x = {!!} ; c-infinite = {!!} } where
|
|
358 ifc01 : {!!} -- me (subst (OD.def (od A)) (sym &iso) ax)
|
|
359 ifc01 = {!!}
|
|
360 -- (y : Ordinal) → odef (IChainSet (me (subst (OD.def (od A)) (sym &iso) ax))) y → y o< & (* x₁)
|
|
361 -- (y : Ordinal) → odef (IChainSet (me ax)) y → y o< x₁
|
503
|
362 zc5 : InFiniteIChain A (subst (OD.def (od A)) (sym &iso) ax) → ⊥
|
511
|
363 zc5 x = zc6 (ifc x) ( supP (B (ifc x)) (B⊆A (ifc x)) (FC-is-total (ifc x) ))
|
497
|
364 ind x prev | no ¬ox with trio< (& A) x --- limit ordinal case
|
483
|
365 ... | tri< a ¬b ¬c = {!!} where
|
497
|
366 zc1 : ZChain A (& A)
|
|
367 zc1 with prev (& A) a
|
|
368 ... | t = {!!}
|
483
|
369 ... | tri≈ ¬a b ¬c = {!!} where
|
478
|
370 ... | tri> ¬a ¬b c with ODC.∋-p O A (* x)
|
|
371 ... | no ¬Ax = {!!} where
|
507
|
372 ... | yes ax = {!!}
|
478
|
373 ... | no not = {!!} where
|
497
|
374 zorn03 : (x : Ordinal) → ZChain A x ∨ Maximal A
|
507
|
375 zorn03 x = TransFinite ind x
|
497
|
376 zorn04 : Maximal A
|
|
377 zorn04 with zorn03 (& A)
|
507
|
378 ... | case1 chain = ⊥-elim ( o<> (c<→o< {ZChain.max chain} {A} (ZChain.A∋max chain)) (ZChain.y<max chain) )
|
497
|
379 ... | case2 m = m
|
464
|
380
|
497
|
381 -- _⊆'_ : ( A B : HOD ) → Set n
|
|
382 -- _⊆'_ A B = (x : Ordinal ) → odef A x → odef B x
|
482
|
383
|
497
|
384 -- MaximumSubset : {L P : HOD}
|
|
385 -- → o∅ o< & L → o∅ o< & P → P ⊆ L
|
|
386 -- → IsPartialOrderSet P _⊆'_
|
|
387 -- → ( (B : HOD) → B ⊆ P → IsTotalOrderSet B _⊆'_ → SUP P B _⊆'_ )
|
|
388 -- → Maximal P (_⊆'_)
|
|
389 -- MaximumSubset {L} {P} 0<L 0<P P⊆L PO SP = Zorn-lemma {P} {_⊆'_} 0<P PO SP
|