Mercurial > hg > Members > kono > Proof > ZF-in-agda
annotate src/zorn.agda @ 630:d5cd551e0ed9
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 20 Jun 2022 17:39:28 +0900 |
parents | 5b7b54fa4cf7 |
children | 1150b006059b |
rev | line source |
---|---|
478 | 1 {-# OPTIONS --allow-unsolved-metas #-} |
508 | 2 open import Level hiding ( suc ; zero ) |
431 | 3 open import Ordinals |
552 | 4 open import Relation.Binary |
5 open import Relation.Binary.Core | |
6 open import Relation.Binary.PropositionalEquality | |
497 | 7 import OD |
552 | 8 module zorn {n : Level } (O : Ordinals {n}) (_<_ : (x y : OD.HOD O ) → Set n ) (PO : IsStrictPartialOrder _≡_ _<_ ) where |
431 | 9 |
560 | 10 -- |
11 -- Zorn-lemma : { A : HOD } | |
12 -- → o∅ o< & A | |
13 -- → ( ( B : HOD) → (B⊆A : B ⊆ A) → IsTotalOrderSet B → SUP A B ) -- SUP condition | |
14 -- → Maximal A | |
15 -- | |
16 | |
431 | 17 open import zf |
477 | 18 open import logic |
19 -- open import partfunc {n} O | |
20 | |
21 open import Relation.Nullary | |
22 open import Data.Empty | |
23 import BAlgbra | |
431 | 24 |
555 | 25 open import Data.Nat hiding ( _<_ ; _≤_ ) |
26 open import Data.Nat.Properties | |
27 open import nat | |
28 | |
431 | 29 |
30 open inOrdinal O | |
31 open OD O | |
32 open OD.OD | |
33 open ODAxiom odAxiom | |
477 | 34 import OrdUtil |
35 import ODUtil | |
431 | 36 open Ordinals.Ordinals O |
37 open Ordinals.IsOrdinals isOrdinal | |
38 open Ordinals.IsNext isNext | |
39 open OrdUtil O | |
477 | 40 open ODUtil O |
41 | |
42 | |
43 import ODC | |
44 | |
45 | |
46 open _∧_ | |
47 open _∨_ | |
48 open Bool | |
431 | 49 |
50 | |
51 open HOD | |
52 | |
560 | 53 -- |
54 -- Partial Order on HOD ( possibly limited in A ) | |
55 -- | |
56 | |
571 | 57 _<<_ : (x y : Ordinal ) → Set n -- Set n order |
570 | 58 x << y = * x < * y |
59 | |
60 POO : IsStrictPartialOrder _≡_ _<<_ | |
61 POO = record { isEquivalence = record { refl = refl ; sym = sym ; trans = trans } | |
62 ; trans = IsStrictPartialOrder.trans PO | |
63 ; irrefl = λ x=y x<y → IsStrictPartialOrder.irrefl PO (cong (*) x=y) x<y | |
64 ; <-resp-≈ = record { fst = λ {x} {y} {y1} y=y1 xy1 → subst (λ k → x << k ) y=y1 xy1 ; snd = λ {x} {x1} {y} x=x1 x1y → subst (λ k → k << x ) x=x1 x1y } } | |
65 | |
528
8facdd7cc65a
TransitiveClosure with x <= f x is possible
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
527
diff
changeset
|
66 _≤_ : (x y : HOD) → Set (Level.suc n) |
8facdd7cc65a
TransitiveClosure with x <= f x is possible
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
527
diff
changeset
|
67 x ≤ y = ( x ≡ y ) ∨ ( x < y ) |
8facdd7cc65a
TransitiveClosure with x <= f x is possible
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
527
diff
changeset
|
68 |
554 | 69 ≤-ftrans : {x y z : HOD} → x ≤ y → y ≤ z → x ≤ z |
70 ≤-ftrans {x} {y} {z} (case1 refl ) (case1 refl ) = case1 refl | |
71 ≤-ftrans {x} {y} {z} (case1 refl ) (case2 y<z) = case2 y<z | |
72 ≤-ftrans {x} {_} {z} (case2 x<y ) (case1 refl ) = case2 x<y | |
73 ≤-ftrans {x} {y} {z} (case2 x<y) (case2 y<z) = case2 ( IsStrictPartialOrder.trans PO x<y y<z ) | |
74 | |
556 | 75 <-irr : {a b : HOD} → (a ≡ b ) ∨ (a < b ) → b < a → ⊥ |
76 <-irr {a} {b} (case1 a=b) b<a = IsStrictPartialOrder.irrefl PO (sym a=b) b<a | |
77 <-irr {a} {b} (case2 a<b) b<a = IsStrictPartialOrder.irrefl PO refl | |
78 (IsStrictPartialOrder.trans PO b<a a<b) | |
490 | 79 |
561 | 80 ptrans = IsStrictPartialOrder.trans PO |
81 | |
492 | 82 open _==_ |
83 open _⊆_ | |
84 | |
530 | 85 -- |
560 | 86 -- Closure of ≤-monotonic function f has total order |
530 | 87 -- |
88 | |
89 ≤-monotonic-f : (A : HOD) → ( Ordinal → Ordinal ) → Set (Level.suc n) | |
90 ≤-monotonic-f A f = (x : Ordinal ) → odef A x → ( * x ≤ * (f x) ) ∧ odef A (f x ) | |
91 | |
551 | 92 data FClosure (A : HOD) (f : Ordinal → Ordinal ) (s : Ordinal) : Ordinal → Set n where |
600 | 93 init : odef A s → FClosure A f s s |
555 | 94 fsuc : (x : Ordinal) ( p : FClosure A f s x ) → FClosure A f s (f x) |
554 | 95 |
556 | 96 A∋fc : {A : HOD} (s : Ordinal) {y : Ordinal } (f : Ordinal → Ordinal) (mf : ≤-monotonic-f A f) → (fcy : FClosure A f s y ) → odef A y |
600 | 97 A∋fc {A} s f mf (init as) = as |
556 | 98 A∋fc {A} s f mf (fsuc y fcy) = proj2 (mf y ( A∋fc {A} s f mf fcy ) ) |
555 | 99 |
556 | 100 s≤fc : {A : HOD} (s : Ordinal ) {y : Ordinal } (f : Ordinal → Ordinal) (mf : ≤-monotonic-f A f) → (fcy : FClosure A f s y ) → * s ≤ * y |
600 | 101 s≤fc {A} s {.s} f mf (init x) = case1 refl |
556 | 102 s≤fc {A} s {.(f x)} f mf (fsuc x fcy) with proj1 (mf x (A∋fc s f mf fcy ) ) |
103 ... | case1 x=fx = subst (λ k → * s ≤ * k ) (*≡*→≡ x=fx) ( s≤fc {A} s f mf fcy ) | |
104 ... | case2 x<fx with s≤fc {A} s f mf fcy | |
105 ... | case1 s≡x = case2 ( subst₂ (λ j k → j < k ) (sym s≡x) refl x<fx ) | |
106 ... | case2 s<x = case2 ( IsStrictPartialOrder.trans PO s<x x<fx ) | |
555 | 107 |
557 | 108 fcn : {A : HOD} (s : Ordinal) { x : Ordinal} {f : Ordinal → Ordinal} → (mf : ≤-monotonic-f A f) → FClosure A f s x → ℕ |
600 | 109 fcn s mf (init as) = zero |
558 | 110 fcn {A} s {x} {f} mf (fsuc y p) with proj1 (mf y (A∋fc s f mf p)) |
111 ... | case1 eq = fcn s mf p | |
112 ... | case2 y<fy = suc (fcn s mf p ) | |
557 | 113 |
558 | 114 fcn-inject : {A : HOD} (s : Ordinal) { x y : Ordinal} {f : Ordinal → Ordinal} → (mf : ≤-monotonic-f A f) |
115 → (cx : FClosure A f s x ) (cy : FClosure A f s y ) → fcn s mf cx ≡ fcn s mf cy → * x ≡ * y | |
559 | 116 fcn-inject {A} s {x} {y} {f} mf cx cy eq = fc00 (fcn s mf cx) (fcn s mf cy) eq cx cy refl refl where |
117 fc00 : (i j : ℕ ) → i ≡ j → {x y : Ordinal } → (cx : FClosure A f s x ) (cy : FClosure A f s y ) → i ≡ fcn s mf cx → j ≡ fcn s mf cy → * x ≡ * y | |
600 | 118 fc00 zero zero refl (init _) (init x₁) i=x i=y = refl |
119 fc00 zero zero refl (init as) (fsuc y cy) i=x i=y with proj1 (mf y (A∋fc s f mf cy ) ) | |
120 ... | case1 y=fy = subst (λ k → * s ≡ k ) y=fy ( fc00 zero zero refl (init as) cy i=x i=y ) | |
121 fc00 zero zero refl (fsuc x cx) (init as) i=x i=y with proj1 (mf x (A∋fc s f mf cx ) ) | |
122 ... | case1 x=fx = subst (λ k → k ≡ * s ) x=fx ( fc00 zero zero refl cx (init as) i=x i=y ) | |
559 | 123 fc00 zero zero refl (fsuc x cx) (fsuc y cy) i=x i=y with proj1 (mf x (A∋fc s f mf cx ) ) | proj1 (mf y (A∋fc s f mf cy ) ) |
124 ... | case1 x=fx | case1 y=fy = subst₂ (λ j k → j ≡ k ) x=fx y=fy ( fc00 zero zero refl cx cy i=x i=y ) | |
125 fc00 (suc i) (suc j) i=j {.(f x)} {.(f y)} (fsuc x cx) (fsuc y cy) i=x j=y with proj1 (mf x (A∋fc s f mf cx ) ) | proj1 (mf y (A∋fc s f mf cy ) ) | |
126 ... | case1 x=fx | case1 y=fy = subst₂ (λ j k → j ≡ k ) x=fx y=fy ( fc00 (suc i) (suc j) i=j cx cy i=x j=y ) | |
127 ... | case1 x=fx | case2 y<fy = subst (λ k → k ≡ * (f y)) x=fx (fc02 x cx i=x) where | |
128 fc02 : (x1 : Ordinal) → (cx1 : FClosure A f s x1 ) → suc i ≡ fcn s mf cx1 → * x1 ≡ * (f y) | |
129 fc02 .(f x1) (fsuc x1 cx1) i=x1 with proj1 (mf x1 (A∋fc s f mf cx1 ) ) | |
560 | 130 ... | case1 eq = trans (sym eq) ( fc02 x1 cx1 i=x1 ) -- derefence while f x ≡ x |
559 | 131 ... | case2 lt = subst₂ (λ j k → * (f j) ≡ * (f k )) &iso &iso ( cong (λ k → * ( f (& k ))) fc04) where |
132 fc04 : * x1 ≡ * y | |
133 fc04 = fc00 i j (cong pred i=j) cx1 cy (cong pred i=x1) (cong pred j=y) | |
134 ... | case2 x<fx | case1 y=fy = subst (λ k → * (f x) ≡ k ) y=fy (fc03 y cy j=y) where | |
135 fc03 : (y1 : Ordinal) → (cy1 : FClosure A f s y1 ) → suc j ≡ fcn s mf cy1 → * (f x) ≡ * y1 | |
136 fc03 .(f y1) (fsuc y1 cy1) j=y1 with proj1 (mf y1 (A∋fc s f mf cy1 ) ) | |
137 ... | case1 eq = trans ( fc03 y1 cy1 j=y1 ) eq | |
138 ... | case2 lt = subst₂ (λ j k → * (f j) ≡ * (f k )) &iso &iso ( cong (λ k → * ( f (& k ))) fc05) where | |
139 fc05 : * x ≡ * y1 | |
140 fc05 = fc00 i j (cong pred i=j) cx cy1 (cong pred i=x) (cong pred j=y1) | |
141 ... | case2 x₁ | case2 x₂ = subst₂ (λ j k → * (f j) ≡ * (f k) ) &iso &iso (cong (λ k → * (f (& k))) (fc00 i j (cong pred i=j) cx cy (cong pred i=x) (cong pred j=y))) | |
557 | 142 |
600 | 143 |
557 | 144 fcn-< : {A : HOD} (s : Ordinal ) { x y : Ordinal} {f : Ordinal → Ordinal} → (mf : ≤-monotonic-f A f) |
145 → (cx : FClosure A f s x ) (cy : FClosure A f s y ) → fcn s mf cx Data.Nat.< fcn s mf cy → * x < * y | |
558 | 146 fcn-< {A} s {x} {y} {f} mf cx cy x<y = fc01 (fcn s mf cy) cx cy refl x<y where |
147 fc01 : (i : ℕ ) → {y : Ordinal } → (cx : FClosure A f s x ) (cy : FClosure A f s y ) → (i ≡ fcn s mf cy ) → fcn s mf cx Data.Nat.< i → * x < * y | |
148 fc01 (suc i) {y} cx (fsuc y1 cy) i=y (s≤s x<i) with proj1 (mf y1 (A∋fc s f mf cy ) ) | |
149 ... | case1 y=fy = subst (λ k → * x < k ) y=fy ( fc01 (suc i) {y1} cx cy i=y (s≤s x<i) ) | |
150 ... | case2 y<fy with <-cmp (fcn s mf cx ) i | |
151 ... | tri> ¬a ¬b c = ⊥-elim ( nat-≤> x<i c ) | |
152 ... | tri≈ ¬a b ¬c = subst (λ k → k < * (f y1) ) (fcn-inject s mf cy cx (sym (trans b (cong pred i=y) ))) y<fy | |
153 ... | tri< a ¬b ¬c = IsStrictPartialOrder.trans PO fc02 y<fy where | |
154 fc03 : suc i ≡ suc (fcn s mf cy) → i ≡ fcn s mf cy | |
155 fc03 eq = cong pred eq | |
156 fc02 : * x < * y1 | |
157 fc02 = fc01 i cx cy (fc03 i=y ) a | |
557 | 158 |
559 | 159 fcn-cmp : {A : HOD} (s : Ordinal) { x y : Ordinal } (f : Ordinal → Ordinal) (mf : ≤-monotonic-f A f) |
554 | 160 → (cx : FClosure A f s x) → (cy : FClosure A f s y ) → Tri (* x < * y) (* x ≡ * y) (* y < * x ) |
559 | 161 fcn-cmp {A} s {x} {y} f mf cx cy with <-cmp ( fcn s mf cx ) (fcn s mf cy ) |
162 ... | tri< a ¬b ¬c = tri< fc11 (λ eq → <-irr (case1 (sym eq)) fc11) (λ lt → <-irr (case2 fc11) lt) where | |
163 fc11 : * x < * y | |
164 fc11 = fcn-< {A} s {x} {y} {f} mf cx cy a | |
165 ... | tri≈ ¬a b ¬c = tri≈ (λ lt → <-irr (case1 (sym fc10)) lt) fc10 (λ lt → <-irr (case1 fc10) lt) where | |
166 fc10 : * x ≡ * y | |
167 fc10 = fcn-inject {A} s {x} {y} {f} mf cx cy b | |
168 ... | tri> ¬a ¬b c = tri> (λ lt → <-irr (case2 fc12) lt) (λ eq → <-irr (case1 eq) fc12) fc12 where | |
169 fc12 : * y < * x | |
170 fc12 = fcn-< {A} s {y} {x} {f} mf cy cx c | |
171 | |
600 | 172 |
562 | 173 fcn-imm : {A : HOD} (s : Ordinal) { x y : Ordinal } (f : Ordinal → Ordinal) (mf : ≤-monotonic-f A f) |
174 → (cx : FClosure A f s x) → (cy : FClosure A f s y ) → ¬ ( ( * x < * y ) ∧ ( * y < * (f x )) ) | |
563 | 175 fcn-imm {A} s {x} {y} f mf cx cy ⟪ x<y , y<fx ⟫ = fc21 where |
176 fc20 : fcn s mf cy Data.Nat.< suc (fcn s mf cx) → (fcn s mf cy ≡ fcn s mf cx) ∨ ( fcn s mf cy Data.Nat.< fcn s mf cx ) | |
177 fc20 y<sx with <-cmp ( fcn s mf cy ) (fcn s mf cx ) | |
178 ... | tri< a ¬b ¬c = case2 a | |
179 ... | tri≈ ¬a b ¬c = case1 b | |
180 ... | tri> ¬a ¬b c = ⊥-elim ( nat-≤> y<sx (s≤s c)) | |
181 fc17 : {x y : Ordinal } → (cx : FClosure A f s x) → (cy : FClosure A f s y ) → suc (fcn s mf cx) ≡ fcn s mf cy → * (f x ) ≡ * y | |
182 fc17 {x} {y} cx cy sx=y = fc18 (fcn s mf cy) cx cy refl sx=y where | |
183 fc18 : (i : ℕ ) → {y : Ordinal } → (cx : FClosure A f s x ) (cy : FClosure A f s y ) → (i ≡ fcn s mf cy ) → suc (fcn s mf cx) ≡ i → * (f x) ≡ * y | |
184 fc18 (suc i) {y} cx (fsuc y1 cy) i=y sx=i with proj1 (mf y1 (A∋fc s f mf cy ) ) | |
185 ... | case1 y=fy = subst (λ k → * (f x) ≡ k ) y=fy ( fc18 (suc i) {y1} cx cy i=y sx=i) -- dereference | |
186 ... | case2 y<fy = subst₂ (λ j k → * (f j) ≡ * (f k) ) &iso &iso (cong (λ k → * (f (& k) ) ) fc19) where | |
187 fc19 : * x ≡ * y1 | |
188 fc19 = fcn-inject s mf cx cy (cong pred ( trans sx=i i=y )) | |
189 fc21 : ⊥ | |
190 fc21 with <-cmp (suc ( fcn s mf cx )) (fcn s mf cy ) | |
191 ... | tri< a ¬b ¬c = <-irr (case2 y<fx) (fc22 a) where -- suc ncx < ncy | |
192 cxx : FClosure A f s (f x) | |
193 cxx = fsuc x cx | |
194 fc16 : (x : Ordinal ) → (cx : FClosure A f s x) → (fcn s mf cx ≡ fcn s mf (fsuc x cx)) ∨ ( suc (fcn s mf cx ) ≡ fcn s mf (fsuc x cx)) | |
600 | 195 fc16 x (init as) with proj1 (mf s as ) |
563 | 196 ... | case1 _ = case1 refl |
197 ... | case2 _ = case2 refl | |
198 fc16 .(f x) (fsuc x cx ) with proj1 (mf (f x) (A∋fc s f mf (fsuc x cx)) ) | |
199 ... | case1 _ = case1 refl | |
200 ... | case2 _ = case2 refl | |
201 fc22 : (suc ( fcn s mf cx )) Data.Nat.< (fcn s mf cy ) → * (f x) < * y | |
202 fc22 a with fc16 x cx | |
203 ... | case1 eq = fcn-< s mf cxx cy (subst (λ k → k Data.Nat.< fcn s mf cy ) eq (<-trans a<sa a)) | |
204 ... | case2 eq = fcn-< s mf cxx cy (subst (λ k → k Data.Nat.< fcn s mf cy ) eq a ) | |
205 ... | tri≈ ¬a b ¬c = <-irr (case1 (fc17 cx cy b)) y<fx | |
206 ... | tri> ¬a ¬b c with fc20 c -- ncy < suc ncx | |
207 ... | case1 y=x = <-irr (case1 ( fcn-inject s mf cy cx y=x )) x<y | |
208 ... | case2 y<x = <-irr (case2 x<y) (fcn-< s mf cy cx y<x ) | |
209 | |
560 | 210 -- open import Relation.Binary.Properties.Poset as Poset |
211 | |
212 IsTotalOrderSet : ( A : HOD ) → Set (Level.suc n) | |
213 IsTotalOrderSet A = {a b : HOD} → odef A (& a) → odef A (& b) → Tri (a < b) (a ≡ b) (b < a ) | |
214 | |
567 | 215 ⊆-IsTotalOrderSet : { A B : HOD } → B ⊆ A → IsTotalOrderSet A → IsTotalOrderSet B |
568 | 216 ⊆-IsTotalOrderSet {A} {B} B⊆A T ax ay = T (incl B⊆A ax) (incl B⊆A ay) |
567 | 217 |
568 | 218 _⊆'_ : ( A B : HOD ) → Set n |
219 _⊆'_ A B = {x : Ordinal } → odef A x → odef B x | |
560 | 220 |
221 -- | |
222 -- inductive maxmum tree from x | |
223 -- tree structure | |
224 -- | |
554 | 225 |
567 | 226 record HasPrev (A B : HOD) {x : Ordinal } (xa : odef A x) ( f : Ordinal → Ordinal ) : Set n where |
533 | 227 field |
534 | 228 y : Ordinal |
541 | 229 ay : odef B y |
534 | 230 x=fy : x ≡ f y |
529 | 231 |
570 | 232 record IsSup (A B : HOD) {x : Ordinal } (xa : odef A x) : Set n where |
567 | 233 field |
571 | 234 x<sup : {y : Ordinal} → odef B y → (y ≡ x ) ∨ (y << x ) |
568 | 235 |
626 | 236 record ZChain ( A : HOD ) (x : Ordinal) ( f : Ordinal → Ordinal ) ( z : Ordinal ) : Set (Level.suc n) where |
237 field | |
238 supf : Ordinal → HOD | |
608
6655f03984f9
mutual tranfinite in zorn
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
607
diff
changeset
|
239 chain : HOD |
624 | 240 chain = supf z |
568 | 241 field |
242 chain⊆A : chain ⊆' A | |
243 chain∋x : odef chain x | |
244 initial : {y : Ordinal } → odef chain y → * x ≤ * y | |
245 f-next : {a : Ordinal } → odef chain a → odef chain (f a) | |
246 is-max : {a b : Ordinal } → (ca : odef chain a ) → b o< osuc z → (ab : odef A b) | |
574 | 247 → HasPrev A chain ab f ∨ IsSup A chain ab |
568 | 248 → * a < * b → odef chain b |
608
6655f03984f9
mutual tranfinite in zorn
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
607
diff
changeset
|
249 |
628 | 250 -- chain-mono : {x y : Ordinal} → x o≤ y → y o≤ z → supf x ⊆' supf y |
251 -- f-total : {x y : Ordinal} → x o≤ z → IsTotalOrderSet (supf x) | |
252 | |
626 | 253 ZChainSupUnique : ( A : HOD ) (x : Ordinal) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f ) ( a b : Ordinal ) |
628 | 254 → ( za : ZChain A x f a ) → (zb : ZChain A x f b ) → {i : Ordinal } → a o< b → i o≤ a → ZChain.supf za i ≡ ZChain.supf zb i |
255 ZChainSupUnique = {!!} | |
595 | 256 |
568 | 257 record Maximal ( A : HOD ) : Set (Level.suc n) where |
258 field | |
259 maximal : HOD | |
260 A∋maximal : A ∋ maximal | |
261 ¬maximal<x : {x : HOD} → A ∋ x → ¬ maximal < x -- A is Partial, use negative | |
567 | 262 |
508 | 263 record SUP ( A B : HOD ) : Set (Level.suc n) where |
503 | 264 field |
265 sup : HOD | |
266 A∋maximal : A ∋ sup | |
267 x<sup : {x : HOD} → B ∋ x → (x ≡ sup ) ∨ (x < sup ) -- B is Total, use positive | |
268 | |
533 | 269 SupCond : ( A B : HOD) → (B⊆A : B ⊆ A) → IsTotalOrderSet B → Set (Level.suc n) |
270 SupCond A B _ _ = SUP A B | |
271 | |
497 | 272 Zorn-lemma : { A : HOD } |
464 | 273 → o∅ o< & A |
568 | 274 → ( ( B : HOD) → (B⊆A : B ⊆' A) → IsTotalOrderSet B → SUP A B ) -- SUP condition |
497 | 275 → Maximal A |
552 | 276 Zorn-lemma {A} 0<A supP = zorn00 where |
568 | 277 supO : (C : HOD ) → C ⊆' A → IsTotalOrderSet C → Ordinal |
566 | 278 supO C C⊆A TC = & ( SUP.sup ( supP C C⊆A TC )) |
571 | 279 <-irr0 : {a b : HOD} → A ∋ a → A ∋ b → (a ≡ b ) ∨ (a < b ) → b < a → ⊥ |
280 <-irr0 {a} {b} A∋a A∋b = <-irr | |
537 | 281 z07 : {y : Ordinal} → {P : Set n} → odef A y ∧ P → y o< & A |
282 z07 {y} p = subst (λ k → k o< & A) &iso ( c<→o< (subst (λ k → odef A k ) (sym &iso ) (proj1 p ))) | |
530 | 283 s : HOD |
284 s = ODC.minimal O A (λ eq → ¬x<0 ( subst (λ k → o∅ o< k ) (=od∅→≡o∅ eq) 0<A )) | |
568 | 285 as : A ∋ * ( & s ) |
286 as = subst (λ k → odef A (& k) ) (sym *iso) ( ODC.x∋minimal O A (λ eq → ¬x<0 ( subst (λ k → o∅ o< k ) (=od∅→≡o∅ eq) 0<A )) ) | |
608
6655f03984f9
mutual tranfinite in zorn
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
607
diff
changeset
|
287 as0 : odef A (& s ) |
6655f03984f9
mutual tranfinite in zorn
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
607
diff
changeset
|
288 as0 = subst (λ k → odef A k ) &iso as |
547 | 289 s<A : & s o< & A |
568 | 290 s<A = c<→o< (subst (λ k → odef A (& k) ) *iso as ) |
530 | 291 HasMaximal : HOD |
537 | 292 HasMaximal = record { od = record { def = λ x → odef A x ∧ ( (m : Ordinal) → odef A m → ¬ (* x < * m)) } ; odmax = & A ; <odmax = z07 } |
293 no-maximum : HasMaximal =h= od∅ → (x : Ordinal) → odef A x ∧ ((m : Ordinal) → odef A m → odef A x ∧ (¬ (* x < * m) )) → ⊥ | |
294 no-maximum nomx x P = ¬x<0 (eq→ nomx {x} ⟪ proj1 P , (λ m ma p → proj2 ( proj2 P m ma ) p ) ⟫ ) | |
532 | 295 Gtx : { x : HOD} → A ∋ x → HOD |
537 | 296 Gtx {x} ax = record { od = record { def = λ y → odef A y ∧ (x < (* y)) } ; odmax = & A ; <odmax = z07 } |
297 z08 : ¬ Maximal A → HasMaximal =h= od∅ | |
298 z08 nmx = record { eq→ = λ {x} lt → ⊥-elim ( nmx record {maximal = * x ; A∋maximal = subst (λ k → odef A k) (sym &iso) (proj1 lt) | |
299 ; ¬maximal<x = λ {y} ay → subst (λ k → ¬ (* x < k)) *iso (proj2 lt (& y) ay) } ) ; eq← = λ {y} lt → ⊥-elim ( ¬x<0 lt )} | |
300 x-is-maximal : ¬ Maximal A → {x : Ordinal} → (ax : odef A x) → & (Gtx (subst (λ k → odef A k ) (sym &iso) ax)) ≡ o∅ → (m : Ordinal) → odef A m → odef A x ∧ (¬ (* x < * m)) | |
301 x-is-maximal nmx {x} ax nogt m am = ⟪ subst (λ k → odef A k) &iso (subst (λ k → odef A k ) (sym &iso) ax) , ¬x<m ⟫ where | |
302 ¬x<m : ¬ (* x < * m) | |
303 ¬x<m x<m = ∅< {Gtx (subst (λ k → odef A k ) (sym &iso) ax)} {* m} ⟪ subst (λ k → odef A k) (sym &iso) am , subst (λ k → * x < k ) (cong (*) (sym &iso)) x<m ⟫ (≡o∅→=od∅ nogt) | |
543 | 304 |
560 | 305 -- Uncountable ascending chain by axiom of choice |
530 | 306 cf : ¬ Maximal A → Ordinal → Ordinal |
532 | 307 cf nmx x with ODC.∋-p O A (* x) |
308 ... | no _ = o∅ | |
309 ... | yes ax with is-o∅ (& ( Gtx ax )) | |
538 | 310 ... | yes nogt = -- no larger element, so it is maximal |
311 ⊥-elim (no-maximum (z08 nmx) x ⟪ subst (λ k → odef A k) &iso ax , x-is-maximal nmx (subst (λ k → odef A k ) &iso ax) nogt ⟫ ) | |
532 | 312 ... | no not = & (ODC.minimal O (Gtx ax) (λ eq → not (=od∅→≡o∅ eq))) |
537 | 313 is-cf : (nmx : ¬ Maximal A ) → {x : Ordinal} → odef A x → odef A (cf nmx x) ∧ ( * x < * (cf nmx x) ) |
314 is-cf nmx {x} ax with ODC.∋-p O A (* x) | |
315 ... | no not = ⊥-elim ( not (subst (λ k → odef A k ) (sym &iso) ax )) | |
316 ... | yes ax with is-o∅ (& ( Gtx ax )) | |
317 ... | yes nogt = ⊥-elim (no-maximum (z08 nmx) x ⟪ subst (λ k → odef A k) &iso ax , x-is-maximal nmx (subst (λ k → odef A k ) &iso ax) nogt ⟫ ) | |
318 ... | no not = ODC.x∋minimal O (Gtx ax) (λ eq → not (=od∅→≡o∅ eq)) | |
606 | 319 |
320 --- | |
321 --- infintie ascention sequence of f | |
322 --- | |
530 | 323 cf-is-<-monotonic : (nmx : ¬ Maximal A ) → (x : Ordinal) → odef A x → ( * x < * (cf nmx x) ) ∧ odef A (cf nmx x ) |
537 | 324 cf-is-<-monotonic nmx x ax = ⟪ proj2 (is-cf nmx ax ) , proj1 (is-cf nmx ax ) ⟫ |
530 | 325 cf-is-≤-monotonic : (nmx : ¬ Maximal A ) → ≤-monotonic-f A ( cf nmx ) |
532 | 326 cf-is-≤-monotonic nmx x ax = ⟪ case2 (proj1 ( cf-is-<-monotonic nmx x ax )) , proj2 ( cf-is-<-monotonic nmx x ax ) ⟫ |
543 | 327 |
626 | 328 zsup : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f) → (zc : ZChain A (& s) f (& A) ) → SUP A (ZChain.chain zc) |
628 | 329 zsup f mf zc = supP (ZChain.chain zc) (ZChain.chain⊆A zc) {!!} |
626 | 330 A∋zsup : (nmx : ¬ Maximal A ) (zc : ZChain A (& s) (cf nmx) (& A) ) |
331 → A ∋ * ( & ( SUP.sup (zsup (cf nmx) (cf-is-≤-monotonic nmx) zc ))) | |
332 A∋zsup nmx zc = subst (λ k → odef A (& k )) (sym *iso) ( SUP.A∋maximal (zsup (cf nmx) (cf-is-≤-monotonic nmx) zc ) ) | |
333 sp0 : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) (zc : ZChain A (& s) f (& A) ) → SUP A (ZChain.chain zc) | |
628 | 334 sp0 f mf zc = supP (ZChain.chain zc) (ZChain.chain⊆A zc) {!!} |
543 | 335 zc< : {x y z : Ordinal} → {P : Set n} → (x o< y → P) → x o< z → z o< y → P |
336 zc< {x} {y} {z} {P} prev x<z z<y = prev (ordtrans x<z z<y) | |
337 | |
338 --- | |
560 | 339 --- the maximum chain has fix point of any ≤-monotonic function |
543 | 340 --- |
626 | 341 fixpoint : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) (zc : ZChain A (& s) f (& A) ) |
342 → f (& (SUP.sup (sp0 f mf zc ))) ≡ & (SUP.sup (sp0 f mf zc )) | |
343 fixpoint f mf zc = z14 where | |
538 | 344 chain = ZChain.chain zc |
626 | 345 sp1 = sp0 f mf zc |
565 | 346 z10 : {a b : Ordinal } → (ca : odef chain a ) → b o< osuc (& A) → (ab : odef A b ) |
570 | 347 → HasPrev A chain ab f ∨ IsSup A chain {b} ab -- (supO chain (ZChain.chain⊆A zc) (ZChain.f-total zc) ≡ b ) |
538 | 348 → * a < * b → odef chain b |
349 z10 = ZChain.is-max zc | |
543 | 350 z11 : & (SUP.sup sp1) o< & A |
351 z11 = c<→o< ( SUP.A∋maximal sp1) | |
538 | 352 z12 : odef chain (& (SUP.sup sp1)) |
353 z12 with o≡? (& s) (& (SUP.sup sp1)) | |
354 ... | yes eq = subst (λ k → odef chain k) eq ( ZChain.chain∋x zc ) | |
569 | 355 ... | no ne = z10 {& s} {& (SUP.sup sp1)} ( ZChain.chain∋x zc ) (ordtrans z11 <-osuc ) (SUP.A∋maximal sp1) |
570 | 356 (case2 z19 ) z13 where |
538 | 357 z13 : * (& s) < * (& (SUP.sup sp1)) |
566 | 358 z13 with SUP.x<sup sp1 ( ZChain.chain∋x zc ) |
538 | 359 ... | case1 eq = ⊥-elim ( ne (cong (&) eq) ) |
360 ... | case2 lt = subst₂ (λ j k → j < k ) (sym *iso) (sym *iso) lt | |
570 | 361 z19 : IsSup A chain {& (SUP.sup sp1)} (SUP.A∋maximal sp1) |
571 | 362 z19 = record { x<sup = z20 } where |
363 z20 : {y : Ordinal} → odef chain y → (y ≡ & (SUP.sup sp1)) ∨ (y << & (SUP.sup sp1)) | |
364 z20 {y} zy with SUP.x<sup sp1 (subst (λ k → odef chain k ) (sym &iso) zy) | |
570 | 365 ... | case1 y=p = case1 (subst (λ k → k ≡ _ ) &iso ( cong (&) y=p )) |
366 ... | case2 y<p = case2 (subst (λ k → * y < k ) (sym *iso) y<p ) | |
367 -- λ {y} zy → subst (λ k → (y ≡ & k ) ∨ (y << & k)) ? (SUP.x<sup sp1 ? ) } | |
626 | 368 z14 : f (& (SUP.sup (sp0 f mf zc))) ≡ & (SUP.sup (sp0 f mf zc)) |
628 | 369 z14 = {!!} |
370 -- with ZChain.f-total zc {& A} {& A} o≤-refl (subst (λ k → odef chain k) (sym &iso) (ZChain.f-next zc z12 )) z12 | |
371 -- ... | tri< a ¬b ¬c = ⊥-elim z16 where | |
372 -- z16 : ⊥ | |
373 -- z16 with proj1 (mf (& ( SUP.sup sp1)) ( SUP.A∋maximal sp1 )) | |
374 -- ... | case1 eq = ⊥-elim (¬b (subst₂ (λ j k → j ≡ k ) refl *iso (sym eq) )) | |
375 -- ... | case2 lt = ⊥-elim (¬c (subst₂ (λ j k → k < j ) refl *iso lt )) | |
376 -- ... | tri≈ ¬a b ¬c = subst ( λ k → k ≡ & (SUP.sup sp1) ) &iso ( cong (&) b ) | |
377 -- ... | tri> ¬a ¬b c = ⊥-elim z17 where | |
378 -- z15 : (* (f ( & ( SUP.sup sp1 ))) ≡ SUP.sup sp1) ∨ (* (f ( & ( SUP.sup sp1 ))) < SUP.sup sp1) | |
379 -- z15 = SUP.x<sup sp1 (subst (λ k → odef chain k ) (sym &iso) (ZChain.f-next zc z12 )) | |
380 -- z17 : ⊥ | |
381 -- z17 with z15 | |
382 -- ... | case1 eq = ¬b eq | |
383 -- ... | case2 lt = ¬a lt | |
560 | 384 |
385 -- ZChain contradicts ¬ Maximal | |
386 -- | |
571 | 387 -- ZChain forces fix point on any ≤-monotonic function (fixpoint) |
560 | 388 -- ¬ Maximal create cf which is a <-monotonic function by axiom of choice. This contradicts fix point of ZChain |
389 -- | |
626 | 390 z04 : (nmx : ¬ Maximal A ) → (zc : ZChain A (& s) (cf nmx) (& A)) → ⊥ |
391 z04 nmx zc = <-irr0 {* (cf nmx c)} {* c} (subst (λ k → odef A k ) (sym &iso) (proj1 (is-cf nmx (SUP.A∋maximal sp1)))) | |
571 | 392 (subst (λ k → odef A (& k)) (sym *iso) (SUP.A∋maximal sp1) ) |
626 | 393 (case1 ( cong (*)( fixpoint (cf nmx) (cf-is-≤-monotonic nmx ) zc ))) -- x ≡ f x ̄ |
571 | 394 (proj1 (cf-is-<-monotonic nmx c (SUP.A∋maximal sp1))) where -- x < f x |
626 | 395 sp1 = sp0 (cf nmx) (cf-is-≤-monotonic nmx) zc |
538 | 396 c = & (SUP.sup sp1) |
548 | 397 |
560 | 398 -- |
547 | 399 -- create all ZChains under o< x |
560 | 400 -- |
608
6655f03984f9
mutual tranfinite in zorn
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
607
diff
changeset
|
401 |
630 | 402 ys : {y : Ordinal} → (ay : odef A y) (f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) → HOD |
403 ys {y} ay f mf = record { od = record { def = λ x → FClosure A f y x } ; odmax = & A ; <odmax = {!!} } | |
404 init-chain : {y x : Ordinal} → (ay : odef A y) (f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) → x o< osuc y → ZChain A y f x | |
405 init-chain {y} {x} ay f mf x≤y = record { chain⊆A = λ fx → A∋fc y f mf fx | |
406 ; f-next = λ {x} sx → fsuc x sx ; supf = λ _ → ys ay f mf | |
407 ; initial = {!!} ; chain∋x = init ay ; is-max = is-max } where | |
408 i-total : IsTotalOrderSet (ys ay f mf ) | |
409 i-total fa fb = subst₂ (λ a b → Tri (a < b) (a ≡ b) (b < a ) ) *iso *iso (fcn-cmp y f mf fa fb) | |
410 is-max : {a b : Ordinal} → odef (ys ay f mf) a → | |
411 b o< osuc x → (ab : odef A b) → HasPrev A (ys ay f mf) ab f ∨ IsSup A (ys ay f mf) ab → | |
412 * a < * b → odef (ys ay f mf) b | |
413 is-max {a} {b} yca b≤x ab P a<b = {!!} | |
414 initial : {i : Ordinal} → odef (ys ay f mf) i → * y ≤ * i | |
415 initial {i} (init ai) = case1 refl | |
416 initial .{f x} (fsuc x lt) = {!!} | |
417 | |
418 sind : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) → (x : Ordinal) | |
419 → ((z : Ordinal) → z o< x → HOD ) → HOD | |
420 sind f mf {y} ay x prev with Oprev-p x | |
421 ... | yes op = sc4 where | |
422 px = Oprev.oprev op | |
423 sc : HOD | |
424 sc = prev px (subst (λ k → px o< k) (Oprev.oprev=x op) <-osuc ) | |
425 | |
426 sc4 : HOD | |
427 sc4 with ODC.∋-p O A (* x) | |
428 ... | no noax = {!!} | |
429 ... | yes ax with ODC.p∨¬p O ( HasPrev A sc ax f ) | |
430 ... | case1 pr = sc | |
431 ... | case2 ¬fy<x with ODC.p∨¬p O (IsSup A sc ax ) | |
432 ... | case1 is-sup = schain where | |
433 -- A∋sc -- x is a sup of zc | |
434 sup0 : SUP A sc | |
435 sup0 = record { sup = * x ; A∋maximal = ax ; x<sup = x21 } where | |
436 x21 : {y : HOD} → sc ∋ y → (y ≡ * x) ∨ (y < * x) | |
437 x21 {y} zy with IsSup.x<sup is-sup zy | |
438 ... | case1 y=x = case1 ( subst₂ (λ j k → j ≡ * k ) *iso &iso ( cong (*) y=x) ) | |
439 ... | case2 y<x = case2 (subst₂ (λ j k → j < * k ) *iso &iso y<x ) | |
440 sp : HOD | |
441 sp = SUP.sup sup0 | |
442 schain : HOD | |
443 schain = record { od = record { def = λ x → odef sc x ∨ (FClosure A f (& sp) x) } ; odmax = & A ; <odmax = λ {y} sy → {!!} } | |
444 ... | case2 ¬x=sup = sc | |
445 ... | no ¬ox with trio< x y | |
446 ... | tri< a ¬b ¬c = {!!} | |
447 ... | tri≈ ¬a b ¬c = {!!} | |
448 ... | tri> ¬a ¬b y<x = Uz where | |
449 record Usup (z : Ordinal) : Set n where -- Union of supf from y which has maximality o< x | |
450 field | |
451 u : Ordinal | |
452 u<x : u o< x | |
453 chain∋z : odef (prev u u<x ) z | |
454 Uz : HOD | |
455 Uz = record { od = record { def = λ y → Usup y } ; odmax = & A | |
456 ; <odmax = {!!} } -- λ lt → subst (λ k → k o< & A ) &iso (c<→o< (subst (λ k → odef A k ) (sym &iso) (Uz⊆A lt))) } | |
457 | |
458 | |
628 | 459 ind : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) → (x : Ordinal) |
460 → ((z : Ordinal) → z o< x → ZChain A y f z) → ZChain A y f x | |
461 ind f mf {y} ay x prev with Oprev-p x | |
548 | 462 ... | yes op = zc4 where |
560 | 463 -- |
464 -- we have previous ordinal to use induction | |
465 -- | |
530 | 466 px = Oprev.oprev op |
624 | 467 supf : Ordinal → HOD |
628 | 468 supf = ZChain.supf (prev px (subst (λ k → px o< k) (Oprev.oprev=x op) <-osuc ) ) |
626 | 469 zc : ZChain A y f (Oprev.oprev op) |
628 | 470 zc = prev px (subst (λ k → px o< k) (Oprev.oprev=x op) <-osuc ) |
626 | 471 zc-b<x : (b : Ordinal ) → b o< x → b o< osuc px |
472 zc-b<x b lt = subst (λ k → b o< k ) (sym (Oprev.oprev=x op)) lt | |
604 | 473 px<x : px o< x |
474 px<x = subst (λ k → px o< k) (Oprev.oprev=x op) <-osuc | |
569 | 475 |
611 | 476 -- if previous chain satisfies maximality, we caan reuse it |
477 -- | |
626 | 478 no-extenion : ( {a b : Ordinal} → odef (ZChain.chain zc) a → b o< osuc x → (ab : odef A b) → |
479 HasPrev A (ZChain.chain zc) ab f ∨ IsSup A (ZChain.chain zc) ab → | |
480 * a < * b → odef (ZChain.chain zc) b ) → ZChain A y f x | |
481 no-extenion is-max = record { supf = supf0 ; chain⊆A = subst (λ k → k ⊆' A ) seq (ZChain.chain⊆A zc) | |
482 ; initial = subst (λ k → {y₁ : Ordinal} → odef k y₁ → * y ≤ * y₁ ) seq (ZChain.initial zc) | |
483 ; f-next = subst (λ k → {a : Ordinal} → odef k a → odef k (f a) ) seq (ZChain.f-next zc) | |
630 | 484 ; chain∋x = subst (λ k → odef k y ) seq (ZChain.chain∋x zc) |
610 | 485 ; is-max = subst (λ k → {a b : Ordinal} → odef k a → b o< osuc x → (ab : odef A b) → |
628 | 486 HasPrev A k ab f ∨ IsSup A k ab → * a < * b → odef k b ) seq is-max } where |
624 | 487 supf0 : Ordinal → HOD |
610 | 488 supf0 z with trio< z x |
489 ... | tri< a ¬b ¬c = supf z | |
626 | 490 ... | tri≈ ¬a b ¬c = ZChain.chain zc |
491 ... | tri> ¬a ¬b c = ZChain.chain zc | |
492 seq : ZChain.chain zc ≡ supf0 x | |
610 | 493 seq with trio< x x |
494 ... | tri< a ¬b ¬c = ⊥-elim ( ¬b refl ) | |
624 | 495 ... | tri≈ ¬a b ¬c = refl |
496 ... | tri> ¬a ¬b c = refl | |
497 seq<x : {b : Ordinal } → b o< x → supf b ≡ supf0 b | |
611 | 498 seq<x {b} b<x with trio< b x |
499 ... | tri< a ¬b ¬c = refl | |
500 ... | tri≈ ¬a b₁ ¬c = ⊥-elim (¬a b<x ) | |
501 ... | tri> ¬a ¬b c = ⊥-elim (¬a b<x ) | |
610 | 502 |
626 | 503 zc4 : ZChain A y f x |
565 | 504 zc4 with ODC.∋-p O A (* x) |
626 | 505 ... | no noax = no-extenion zc1 where -- ¬ A ∋ p, just skip |
506 zc1 : {a b : Ordinal} → odef (ZChain.chain zc) a → b o< osuc x → (ab : odef A b) → | |
507 HasPrev A (ZChain.chain zc) ab f ∨ IsSup A (ZChain.chain zc) ab → | |
508 * a < * b → odef (ZChain.chain zc) b | |
509 zc1 {a} {b} za b<ox ab P a<b with osuc-≡< b<ox | |
568 | 510 ... | case1 eq = ⊥-elim ( noax (subst (λ k → odef A k) (trans eq (sym &iso)) ab ) ) |
626 | 511 ... | case2 lt = ZChain.is-max zc za (zc-b<x b lt) ab P a<b |
512 ... | yes ax with ODC.p∨¬p O ( HasPrev A (ZChain.chain zc) ax f ) -- we have to check adding x preserve is-max ZChain A y f mf supO x | |
513 ... | case1 pr = no-extenion zc7 where -- we have previous A ∋ z < x , f z ≡ x, so chain ∋ f z ≡ x because of f-next | |
514 chain0 = ZChain.chain zc | |
515 zc7 : {a b : Ordinal} → odef (ZChain.chain zc) a → b o< osuc x → (ab : odef A b) → | |
516 HasPrev A (ZChain.chain zc) ab f ∨ IsSup A (ZChain.chain zc) ab → | |
517 * a < * b → odef (ZChain.chain zc) b | |
518 zc7 {a} {b} za b<ox ab P a<b with osuc-≡< b<ox | |
519 ... | case2 lt = ZChain.is-max zc za (zc-b<x b lt) ab P a<b | |
520 ... | case1 b=x = subst (λ k → odef chain0 k ) (trans (sym (HasPrev.x=fy pr )) (trans &iso (sym b=x)) ) ( ZChain.f-next zc (HasPrev.ay pr)) | |
521 ... | case2 ¬fy<x with ODC.p∨¬p O (IsSup A (ZChain.chain zc) ax ) | |
522 ... | case1 is-sup = -- x is a sup of zc | |
523 record { chain⊆A = {!!} ; f-next = {!!} | |
630 | 524 ; initial = {!!} ; chain∋x = {!!} ; is-max = {!!} ; supf = supf0 } where |
626 | 525 sup0 : SUP A (ZChain.chain zc) |
571 | 526 sup0 = record { sup = * x ; A∋maximal = ax ; x<sup = x21 } where |
626 | 527 x21 : {y : HOD} → ZChain.chain zc ∋ y → (y ≡ * x) ∨ (y < * x) |
571 | 528 x21 {y} zy with IsSup.x<sup is-sup zy |
529 ... | case1 y=x = case1 ( subst₂ (λ j k → j ≡ * k ) *iso &iso ( cong (*) y=x) ) | |
530 ... | case2 y<x = case2 (subst₂ (λ j k → j < * k ) *iso &iso y<x ) | |
570 | 531 sp : HOD |
561 | 532 sp = SUP.sup sup0 |
570 | 533 x=sup : x ≡ & sp |
534 x=sup = sym &iso | |
626 | 535 chain0 = ZChain.chain zc |
604 | 536 sc<A : {y : Ordinal} → odef chain0 y ∨ FClosure A f (& sp) y → y o< & A |
626 | 537 sc<A {y} (case1 zx) = subst (λ k → k o< (& A)) &iso ( c<→o< (ZChain.chain⊆A zc (subst (λ k → odef chain0 k) (sym &iso) zx ))) |
561 | 538 sc<A {y} (case2 fx) = subst (λ k → k o< (& A)) &iso ( c<→o< (subst (λ k → odef A k ) (sym &iso) (A∋fc (& sp) f mf fx )) ) |
552 | 539 schain : HOD |
604 | 540 schain = record { od = record { def = λ x → odef chain0 x ∨ (FClosure A f (& sp) x) } ; odmax = & A ; <odmax = λ {y} sy → sc<A {y} sy } |
561 | 541 A∋schain : {x : HOD } → schain ∋ x → A ∋ x |
626 | 542 A∋schain (case1 zx ) = ZChain.chain⊆A zc zx |
561 | 543 A∋schain {y} (case2 fx ) = A∋fc (& sp) f mf fx |
569 | 544 s⊆A : schain ⊆' A |
626 | 545 s⊆A {x} (case1 zx) = ZChain.chain⊆A zc zx |
569 | 546 s⊆A {x} (case2 fx) = A∋fc (& sp) f mf fx |
604 | 547 cmp : {a b : HOD} (za : odef chain0 (& a)) (fb : FClosure A f (& sp) (& b)) → Tri (a < b) (a ≡ b) (b < a ) |
561 | 548 cmp {a} {b} za fb with SUP.x<sup sup0 za | s≤fc (& sp) f mf fb |
549 ... | case1 sp=a | case1 sp=b = tri≈ (λ lt → <-irr (case1 (sym eq)) lt ) eq (λ lt → <-irr (case1 eq) lt ) where | |
550 eq : a ≡ b | |
551 eq = trans sp=a (subst₂ (λ j k → j ≡ k ) *iso *iso sp=b ) | |
552 ... | case1 sp=a | case2 sp<b = tri< a<b (λ eq → <-irr (case1 (sym eq)) a<b ) (λ lt → <-irr (case2 a<b) lt ) where | |
553 a<b : a < b | |
554 a<b = subst (λ k → k < b ) (sym sp=a) (subst₂ (λ j k → j < k ) *iso *iso sp<b ) | |
555 ... | case2 a<sp | case1 sp=b = tri< a<b (λ eq → <-irr (case1 (sym eq)) a<b ) (λ lt → <-irr (case2 a<b) lt ) where | |
556 a<b : a < b | |
557 a<b = subst (λ k → a < k ) (trans sp=b *iso ) (subst (λ k → a < k ) (sym *iso) a<sp ) | |
558 ... | case2 a<sp | case2 sp<b = tri< a<b (λ eq → <-irr (case1 (sym eq)) a<b ) (λ lt → <-irr (case2 a<b) lt ) where | |
559 a<b : a < b | |
560 a<b = ptrans (subst (λ k → a < k ) (sym *iso) a<sp ) ( subst₂ (λ j k → j < k ) refl *iso sp<b ) | |
561 scmp : {a b : HOD} → odef schain (& a) → odef schain (& b) → Tri (a < b) (a ≡ b) (b < a ) | |
628 | 562 scmp {a} {b} (case1 za) (case1 zb) = {!!} -- ZChain.f-total zc {px} {px} o≤-refl za zb |
561 | 563 scmp {a} {b} (case1 za) (case2 fb) = cmp za fb |
564 scmp (case2 fa) (case1 zb) with cmp zb fa | |
565 ... | tri< a ¬b ¬c = tri> ¬c (λ eq → ¬b (sym eq)) a | |
566 ... | tri≈ ¬a b ¬c = tri≈ ¬c (sym b) ¬a | |
567 ... | tri> ¬a ¬b c = tri< c (λ eq → ¬b (sym eq)) ¬a | |
568 scmp (case2 fa) (case2 fb) = subst₂ (λ a b → Tri (a < b) (a ≡ b) (b < a ) ) *iso *iso (fcn-cmp (& sp) f mf fa fb) | |
569 scnext : {a : Ordinal} → odef schain a → odef schain (f a) | |
626 | 570 scnext {x} (case1 zx) = case1 (ZChain.f-next zc zx) |
561 | 571 scnext {x} (case2 sx) = case2 ( fsuc x sx ) |
572 scinit : {x : Ordinal} → odef schain x → * y ≤ * x | |
626 | 573 scinit {x} (case1 zx) = ZChain.initial zc zx |
574 scinit {x} (case2 sx) with (s≤fc (& sp) f mf sx ) | SUP.x<sup sup0 (subst (λ k → odef chain0 k ) (sym &iso) ( ZChain.chain∋x zc ) ) | |
562 | 575 ... | case1 sp=x | case1 y=sp = case1 (trans y=sp (subst (λ k → k ≡ * x ) *iso sp=x ) ) |
576 ... | case1 sp=x | case2 y<sp = case2 (subst (λ k → * y < k ) (trans (sym *iso) sp=x) y<sp ) | |
577 ... | case2 sp<x | case1 y=sp = case2 (subst (λ k → k < * x ) (trans *iso (sym y=sp )) sp<x ) | |
578 ... | case2 sp<x | case2 y<sp = case2 (ptrans y<sp (subst (λ k → k < * x ) *iso sp<x) ) | |
604 | 579 A∋za : {a : Ordinal } → odef chain0 a → odef A a |
626 | 580 A∋za za = ZChain.chain⊆A zc za |
604 | 581 za<sup : {a : Ordinal } → odef chain0 a → ( * a ≡ sp ) ∨ ( * a < sp ) |
582 za<sup za = SUP.x<sup sup0 (subst (λ k → odef chain0 k ) (sym &iso) za ) | |
571 | 583 s-ismax : {a b : Ordinal} → odef schain a → b o< osuc x → (ab : odef A b) |
584 → HasPrev A schain ab f ∨ IsSup A schain ab | |
569 | 585 → * a < * b → odef schain b |
571 | 586 s-ismax {a} {b} sa b<ox ab p a<b with osuc-≡< b<ox -- b is x? |
600 | 587 ... | case1 b=x = case2 (subst (λ k → FClosure A f (& sp) k ) (sym (trans b=x x=sup )) (init (SUP.A∋maximal sup0) )) |
571 | 588 s-ismax {a} {b} (case1 za) b<ox ab (case1 p) a<b | case2 b<x = z21 p where -- has previous |
568 | 589 z21 : HasPrev A schain ab f → odef schain b |
567 | 590 z21 record { y = y ; ay = (case1 zy) ; x=fy = x=fy } = |
626 | 591 case1 (ZChain.is-max zc za (zc-b<x b b<x) ab (case1 record { y = y ; ay = zy ; x=fy = x=fy }) a<b ) |
567 | 592 z21 record { y = y ; ay = (case2 sy) ; x=fy = x=fy } = subst (λ k → odef schain k) (sym x=fy) (case2 (fsuc y sy) ) |
626 | 593 s-ismax {a} {b} (case1 za) b<ox ab (case2 p) a<b | case2 b<x = case1 (ZChain.is-max zc za (zc-b<x b b<x) ab (case2 z22) a<b ) where -- previous sup |
594 z22 : IsSup A (ZChain.chain zc) ab | |
571 | 595 z22 = record { x<sup = λ {y} zy → IsSup.x<sup p (case1 zy ) } |
596 s-ismax {a} {b} (case2 sa) b<ox ab (case1 p) a<b | case2 b<x with HasPrev.ay p | |
626 | 597 ... | case1 zy = case1 (subst (λ k → odef chain0 k ) (sym (HasPrev.x=fy p)) (ZChain.f-next zc zy )) -- in previous closure of f |
571 | 598 ... | case2 sy = case2 (subst (λ k → FClosure A f (& (* x)) k ) (sym (HasPrev.x=fy p)) (fsuc (HasPrev.y p) sy )) -- in current closure of f |
626 | 599 s-ismax {a} {b} (case2 sa) b<ox ab (case2 p) a<b | case2 b<x = case1 z23 where -- sup o< x is already in zc |
600 z24 : IsSup A schain ab → IsSup A (ZChain.chain zc) ab | |
571 | 601 z24 p = record { x<sup = λ {y} zy → IsSup.x<sup p (case1 zy ) } |
604 | 602 z23 : odef chain0 b |
626 | 603 z23 with IsSup.x<sup (z24 p) ( ZChain.chain∋x zc ) |
604 ... | case1 y=b = subst (λ k → odef chain0 k ) y=b ( ZChain.chain∋x zc ) | |
605 ... | case2 y<b = ZChain.is-max zc (ZChain.chain∋x zc ) (zc-b<x b b<x) ab (case2 (z24 p)) y<b | |
624 | 606 supf0 : Ordinal → HOD |
611 | 607 supf0 z with trio< z x |
608 ... | tri< a ¬b ¬c = supf z | |
624 | 609 ... | tri≈ ¬a b ¬c = schain |
610 ... | tri> ¬a ¬b c = schain | |
611 seq : schain ≡ supf0 x | |
611 | 612 seq with trio< x x |
613 ... | tri< a ¬b ¬c = ⊥-elim ( ¬b refl ) | |
624 | 614 ... | tri≈ ¬a b ¬c = refl |
615 ... | tri> ¬a ¬b c = refl | |
616 seq<x : {b : Ordinal } → b o< x → supf b ≡ supf0 b | |
611 | 617 seq<x {b} b<x with trio< b x |
618 ... | tri< a ¬b ¬c = refl | |
619 ... | tri≈ ¬a b₁ ¬c = ⊥-elim (¬a b<x ) | |
620 ... | tri> ¬a ¬b c = ⊥-elim (¬a b<x ) | |
624 | 621 mono : {a b : Ordinal} → a o≤ b → b o< osuc x → supf0 a ⊆' supf0 b |
611 | 622 mono {a} {b} a≤b b<ox = {!!} |
623 | |
624 ... | case2 ¬x=sup = no-extenion z18 where -- x is not f y' nor sup of former ZChain from y -- no extention | |
626 | 625 z18 : {a b : Ordinal} → odef (ZChain.chain zc) a → b o< osuc x → (ab : odef A b) → |
626 HasPrev A (ZChain.chain zc) ab f ∨ IsSup A (ZChain.chain zc) ab → | |
627 * a < * b → odef (ZChain.chain zc) b | |
568 | 628 z18 {a} {b} za b<x ab p a<b with osuc-≡< b<x |
626 | 629 ... | case2 lt = ZChain.is-max zc za (zc-b<x b lt) ab p a<b |
565 | 630 ... | case1 b=x with p |
567 | 631 ... | case1 pr = ⊥-elim ( ¬fy<x record {y = HasPrev.y pr ; ay = HasPrev.ay pr ; x=fy = trans (trans &iso (sym b=x) ) (HasPrev.x=fy pr ) } ) |
571 | 632 ... | case2 b=sup = ⊥-elim ( ¬x=sup record { |
633 x<sup = λ {y} zy → subst (λ k → (y ≡ k) ∨ (y << k)) (trans b=x (sym &iso)) (IsSup.x<sup b=sup zy) } ) | |
630 | 634 ... | no ¬ox with trio< x y |
635 ... | tri< a ¬b ¬c = init-chain ay f mf {!!} | |
636 ... | tri≈ ¬a b ¬c = init-chain ay f mf {!!} | |
637 ... | tri> ¬a ¬b y<x = record { supf = supf0 ; chain⊆A = {!!} ; f-next = {!!} | |
638 ; initial = {!!} ; chain∋x = {!!} ; is-max = {!!} } where --- limit ordinal case | |
554 | 639 record UZFChain (z : Ordinal) : Set n where -- Union of ZFChain from y which has maximality o< x |
553 | 640 field |
641 u : Ordinal | |
642 u<x : u o< x | |
628 | 643 chain∋z : odef (ZChain.chain (prev u u<x )) z |
572
427e36467a18
ZChain is monotonic on x, should be in record ZFChain
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
571
diff
changeset
|
644 Uz⊆A : {z : Ordinal} → UZFChain z → odef A z |
628 | 645 Uz⊆A {z} u = ZChain.chain⊆A ( prev (UZFChain.u u) (UZFChain.u<x u) ) (UZFChain.chain∋z u) |
626 | 646 uzc : {z : Ordinal} → (u : UZFChain z) → ZChain A y f (UZFChain.u u) |
628 | 647 uzc {z} u = prev (UZFChain.u u) (UZFChain.u<x u) |
554 | 648 Uz : HOD |
572
427e36467a18
ZChain is monotonic on x, should be in record ZFChain
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
571
diff
changeset
|
649 Uz = record { od = record { def = λ y → UZFChain y } ; odmax = & A |
427e36467a18
ZChain is monotonic on x, should be in record ZFChain
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
571
diff
changeset
|
650 ; <odmax = λ lt → subst (λ k → k o< & A ) &iso (c<→o< (subst (λ k → odef A k ) (sym &iso) (Uz⊆A lt))) } |
427e36467a18
ZChain is monotonic on x, should be in record ZFChain
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
571
diff
changeset
|
651 u-next : {z : Ordinal} → odef Uz z → odef Uz (f z) |
427e36467a18
ZChain is monotonic on x, should be in record ZFChain
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
571
diff
changeset
|
652 u-next {z} u = record { u = UZFChain.u u ; u<x = UZFChain.u<x u ; chain∋z = ZChain.f-next ( uzc u ) (UZFChain.chain∋z u) } |
427e36467a18
ZChain is monotonic on x, should be in record ZFChain
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
571
diff
changeset
|
653 u-initial : {z : Ordinal} → odef Uz z → * y ≤ * z |
427e36467a18
ZChain is monotonic on x, should be in record ZFChain
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
571
diff
changeset
|
654 u-initial {z} u = ZChain.initial ( uzc u ) (UZFChain.chain∋z u) |
427e36467a18
ZChain is monotonic on x, should be in record ZFChain
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
571
diff
changeset
|
655 u-chain∋x : odef Uz y |
630 | 656 u-chain∋x = record { u = y ; u<x = y<x ; chain∋z = ZChain.chain∋x (prev y y<x ) } |
624 | 657 supf0 : Ordinal → HOD |
611 | 658 supf0 z with trio< z x |
628 | 659 ... | tri< a ¬b ¬c = ZChain.supf (prev z a ) z |
624 | 660 ... | tri≈ ¬a b ¬c = Uz |
661 ... | tri> ¬a ¬b c = Uz | |
662 seq : Uz ≡ supf0 x | |
611 | 663 seq with trio< x x |
664 ... | tri< a ¬b ¬c = ⊥-elim ( ¬b refl ) | |
624 | 665 ... | tri≈ ¬a b ¬c = refl |
666 ... | tri> ¬a ¬b c = refl | |
628 | 667 seq<x : {b : Ordinal } → (b<x : b o< x ) → ZChain.supf (prev b b<x ) b ≡ supf0 b |
611 | 668 seq<x {b} b<x with trio< b x |
628 | 669 ... | tri< a ¬b ¬c = cong (λ k → ZChain.supf (prev b k ) b) o<-irr -- b<x ≡ a |
611 | 670 ... | tri≈ ¬a b₁ ¬c = ⊥-elim (¬a b<x ) |
671 ... | tri> ¬a ¬b c = ⊥-elim (¬a b<x ) | |
626 | 672 ord≤< : {x y z : Ordinal} → x o< z → z o≤ y → x o< y |
673 ord≤< {x} {y} {z} x<z z≤y with osuc-≡< z≤y | |
674 ... | case1 z=y = subst (λ k → x o< k ) z=y x<z | |
675 ... | case2 z<y = ordtrans x<z z<y | |
676 u-mono : {z : Ordinal} {w : Ordinal} → z o≤ w → w o≤ x → supf0 z ⊆' supf0 w | |
677 u-mono {z} {w} z≤w w≤x {i} with trio< z x | trio< w x | |
678 ... | tri< a ¬b ¬c | tri< a₁ ¬b₁ ¬c₁ = um00 where -- ZChain.chain-mono (prev w ? ay) ? ? lt | |
628 | 679 um00 : odef (ZChain.supf (prev z a ) z) i → odef (ZChain.supf (prev w a₁ ) w) i |
626 | 680 um00 = {!!} |
628 | 681 um01 : odef (ZChain.supf (prev z a ) z) i → odef (ZChain.supf (prev z {!!} ) w) i |
682 um01 = {!!} -- ZChain.chain-mono (prev z a ay) {!!} {!!} | |
626 | 683 ... | tri< a ¬b ¬c | tri≈ ¬a b ¬c₁ = λ lt → record { u = z ; u<x = a ; chain∋z = lt } |
684 ... | tri< a ¬b ¬c | tri> ¬a ¬b₁ c = ⊥-elim ( osuc-< w≤x c ) | |
685 ... | tri≈ ¬a z=x ¬c | tri< w<x ¬b ¬c₁ = ⊥-elim ( osuc-< z≤w (subst (λ k → w o< k ) (sym z=x) w<x ) ) | |
686 ... | tri≈ ¬a b ¬c | tri≈ ¬a₁ b₁ ¬c₁ = λ lt → lt | |
687 ... | tri≈ ¬a b ¬c | tri> ¬a₁ ¬b c = ⊥-elim ( osuc-< w≤x c ) -- o<> c ( ord≤< w≤x )) -- z≡w x o< w | |
688 ... | tri> ¬a ¬b c | t = ⊥-elim ( osuc-< w≤x (ord≤< c z≤w ) ) -- x o< z → x o< w | |
553 | 689 |
626 | 690 SZ : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) → {y : Ordinal} (ya : odef A y) → ZChain A y f (& A) |
628 | 691 SZ f mf {y} ay = TransFinite {λ z → ZChain A y f z } (ind f mf ay ) (& A) |
692 | |
693 ind-mono : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) { y : Ordinal} (ay : odef A y) → (x : Ordinal) | |
694 → (prev : (z : Ordinal) → z o< x → ZChain A y f z) | |
695 → (z : Ordinal) → (z<x : z o< x) → ZChain.chain (prev z z<x ) ⊆' ZChain.chain ( ind f mf ay x prev ) | |
696 ind-mono f mf ay x prev z z<x = {!!} | |
697 | |
629 | 698 postulate |
699 TFcomm : { ψ : Ordinal → Set (Level.suc n) } | |
700 → (ind : (x : Ordinal) → ( (y : Ordinal ) → y o< x → ψ y ) → ψ x ) | |
701 → ∀ (x : Ordinal) → ind x (λ y _ → TransFinite ind y ) ≡ TransFinite ind x | |
702 | |
703 SZ-mono : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) → {y : Ordinal} → (ay : odef A y) | |
704 → {a b : Ordinal } → a o< b → | |
628 | 705 ZChain.chain (TransFinite {λ z → ZChain A y f z } (ind f mf ay ) a ) ⊆' |
706 ZChain.chain (TransFinite {λ z → ZChain A y f z } (ind f mf ay ) b ) | |
629 | 707 SZ-mono f mf {y} ay {a} {b} a<b = TransFinite0 {λ b → a o< b → ZChain.chain (TransFinite {λ z → ZChain A y f z } (ind f mf ay ) a ) ⊆' |
630 | 708 ZChain.chain (TransFinite {λ z → ZChain A y f z } (ind f mf ay ) b ) } szind b a<b where |
709 szind : (x : Ordinal) → ((y₁ : Ordinal) → y₁ o< x → a o< y₁ → | |
629 | 710 ZChain.chain (TransFinite (ind f mf ay) a) ⊆' ZChain.chain (TransFinite (ind f mf ay) y₁)) → |
711 a o< x → ZChain.chain (TransFinite (ind f mf ay) a) ⊆' ZChain.chain (TransFinite (ind f mf ay) x) | |
630 | 712 szind = {!!} -- |
629 | 713 |
608
6655f03984f9
mutual tranfinite in zorn
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
607
diff
changeset
|
714 |
551 | 715 zorn00 : Maximal A |
716 zorn00 with is-o∅ ( & HasMaximal ) -- we have no Level (suc n) LEM | |
717 ... | no not = record { maximal = ODC.minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) ; A∋maximal = zorn01 ; ¬maximal<x = zorn02 } where | |
718 -- yes we have the maximal | |
719 zorn03 : odef HasMaximal ( & ( ODC.minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) ) ) | |
606 | 720 zorn03 = ODC.x∋minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) -- Axiom of choice |
551 | 721 zorn01 : A ∋ ODC.minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) |
722 zorn01 = proj1 zorn03 | |
723 zorn02 : {x : HOD} → A ∋ x → ¬ (ODC.minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) < x) | |
724 zorn02 {x} ax m<x = proj2 zorn03 (& x) ax (subst₂ (λ j k → j < k) (sym *iso) (sym *iso) m<x ) | |
725 ... | yes ¬Maximal = ⊥-elim ( z04 nmx zorn04) where | |
726 -- if we have no maximal, make ZChain, which contradict SUP condition | |
727 nmx : ¬ Maximal A | |
728 nmx mx = ∅< {HasMaximal} zc5 ( ≡o∅→=od∅ ¬Maximal ) where | |
729 zc5 : odef A (& (Maximal.maximal mx)) ∧ (( y : Ordinal ) → odef A y → ¬ (* (& (Maximal.maximal mx)) < * y)) | |
730 zc5 = ⟪ Maximal.A∋maximal mx , (λ y ay mx<y → Maximal.¬maximal<x mx (subst (λ k → odef A k ) (sym &iso) ay) (subst (λ k → k < * y) *iso mx<y) ) ⟫ | |
626 | 731 zorn04 : ZChain A (& s) (cf nmx) (& A) |
608
6655f03984f9
mutual tranfinite in zorn
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
607
diff
changeset
|
732 zorn04 = SZ (cf nmx) (cf-is-≤-monotonic nmx) (subst (λ k → odef A k ) &iso as ) |
551 | 733 |
516 | 734 -- usage (see filter.agda ) |
735 -- | |
497 | 736 -- _⊆'_ : ( A B : HOD ) → Set n |
737 -- _⊆'_ A B = (x : Ordinal ) → odef A x → odef B x | |
482 | 738 |
497 | 739 -- MaximumSubset : {L P : HOD} |
740 -- → o∅ o< & L → o∅ o< & P → P ⊆ L | |
741 -- → IsPartialOrderSet P _⊆'_ | |
742 -- → ( (B : HOD) → B ⊆ P → IsTotalOrderSet B _⊆'_ → SUP P B _⊆'_ ) | |
743 -- → Maximal P (_⊆'_) | |
744 -- MaximumSubset {L} {P} 0<L 0<P P⊆L PO SP = Zorn-lemma {P} {_⊆'_} 0<P PO SP |