Mercurial > hg > Members > kono > Proof > ZF-in-agda
annotate src/zorn.agda @ 732:ddeb107b6f71
bchain can be reached from upwords by f. so it is worng.
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 19 Jul 2022 07:36:10 +0900 |
parents | ac6b4d200f27 |
children | 15f3bcc4ae3f |
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 open _∧_ | |
46 open _∨_ | |
47 open Bool | |
431 | 48 |
49 open HOD | |
50 | |
560 | 51 -- |
52 -- Partial Order on HOD ( possibly limited in A ) | |
53 -- | |
54 | |
571 | 55 _<<_ : (x y : Ordinal ) → Set n -- Set n order |
570 | 56 x << y = * x < * y |
57 | |
58 POO : IsStrictPartialOrder _≡_ _<<_ | |
59 POO = record { isEquivalence = record { refl = refl ; sym = sym ; trans = trans } | |
60 ; trans = IsStrictPartialOrder.trans PO | |
61 ; irrefl = λ x=y x<y → IsStrictPartialOrder.irrefl PO (cong (*) x=y) x<y | |
62 ; <-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 } } | |
63 | |
528
8facdd7cc65a
TransitiveClosure with x <= f x is possible
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
527
diff
changeset
|
64 _≤_ : (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
|
65 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
|
66 |
554 | 67 ≤-ftrans : {x y z : HOD} → x ≤ y → y ≤ z → x ≤ z |
68 ≤-ftrans {x} {y} {z} (case1 refl ) (case1 refl ) = case1 refl | |
69 ≤-ftrans {x} {y} {z} (case1 refl ) (case2 y<z) = case2 y<z | |
70 ≤-ftrans {x} {_} {z} (case2 x<y ) (case1 refl ) = case2 x<y | |
71 ≤-ftrans {x} {y} {z} (case2 x<y) (case2 y<z) = case2 ( IsStrictPartialOrder.trans PO x<y y<z ) | |
72 | |
556 | 73 <-irr : {a b : HOD} → (a ≡ b ) ∨ (a < b ) → b < a → ⊥ |
74 <-irr {a} {b} (case1 a=b) b<a = IsStrictPartialOrder.irrefl PO (sym a=b) b<a | |
75 <-irr {a} {b} (case2 a<b) b<a = IsStrictPartialOrder.irrefl PO refl | |
76 (IsStrictPartialOrder.trans PO b<a a<b) | |
490 | 77 |
561 | 78 ptrans = IsStrictPartialOrder.trans PO |
79 | |
492 | 80 open _==_ |
81 open _⊆_ | |
82 | |
530 | 83 -- |
560 | 84 -- Closure of ≤-monotonic function f has total order |
530 | 85 -- |
86 | |
87 ≤-monotonic-f : (A : HOD) → ( Ordinal → Ordinal ) → Set (Level.suc n) | |
88 ≤-monotonic-f A f = (x : Ordinal ) → odef A x → ( * x ≤ * (f x) ) ∧ odef A (f x ) | |
89 | |
551 | 90 data FClosure (A : HOD) (f : Ordinal → Ordinal ) (s : Ordinal) : Ordinal → Set n where |
600 | 91 init : odef A s → FClosure A f s s |
555 | 92 fsuc : (x : Ordinal) ( p : FClosure A f s x ) → FClosure A f s (f x) |
554 | 93 |
556 | 94 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 | 95 A∋fc {A} s f mf (init as) = as |
556 | 96 A∋fc {A} s f mf (fsuc y fcy) = proj2 (mf y ( A∋fc {A} s f mf fcy ) ) |
555 | 97 |
714 | 98 A∋fcs : {A : HOD} (s : Ordinal) {y : Ordinal } (f : Ordinal → Ordinal) (mf : ≤-monotonic-f A f) → (fcy : FClosure A f s y ) → odef A s |
99 A∋fcs {A} s f mf (init as) = as | |
100 A∋fcs {A} s f mf (fsuc y fcy) = A∋fcs {A} s f mf fcy | |
101 | |
556 | 102 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 | 103 s≤fc {A} s {.s} f mf (init x) = case1 refl |
556 | 104 s≤fc {A} s {.(f x)} f mf (fsuc x fcy) with proj1 (mf x (A∋fc s f mf fcy ) ) |
105 ... | case1 x=fx = subst (λ k → * s ≤ * k ) (*≡*→≡ x=fx) ( s≤fc {A} s f mf fcy ) | |
106 ... | case2 x<fx with s≤fc {A} s f mf fcy | |
107 ... | case1 s≡x = case2 ( subst₂ (λ j k → j < k ) (sym s≡x) refl x<fx ) | |
108 ... | case2 s<x = case2 ( IsStrictPartialOrder.trans PO s<x x<fx ) | |
555 | 109 |
557 | 110 fcn : {A : HOD} (s : Ordinal) { x : Ordinal} {f : Ordinal → Ordinal} → (mf : ≤-monotonic-f A f) → FClosure A f s x → ℕ |
600 | 111 fcn s mf (init as) = zero |
558 | 112 fcn {A} s {x} {f} mf (fsuc y p) with proj1 (mf y (A∋fc s f mf p)) |
113 ... | case1 eq = fcn s mf p | |
114 ... | case2 y<fy = suc (fcn s mf p ) | |
557 | 115 |
558 | 116 fcn-inject : {A : HOD} (s : Ordinal) { x y : Ordinal} {f : Ordinal → Ordinal} → (mf : ≤-monotonic-f A f) |
117 → (cx : FClosure A f s x ) (cy : FClosure A f s y ) → fcn s mf cx ≡ fcn s mf cy → * x ≡ * y | |
559 | 118 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 |
119 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 | 120 fc00 zero zero refl (init _) (init x₁) i=x i=y = refl |
121 fc00 zero zero refl (init as) (fsuc y cy) i=x i=y with proj1 (mf y (A∋fc s f mf cy ) ) | |
122 ... | case1 y=fy = subst (λ k → * s ≡ k ) y=fy ( fc00 zero zero refl (init as) cy i=x i=y ) | |
123 fc00 zero zero refl (fsuc x cx) (init as) i=x i=y with proj1 (mf x (A∋fc s f mf cx ) ) | |
124 ... | case1 x=fx = subst (λ k → k ≡ * s ) x=fx ( fc00 zero zero refl cx (init as) i=x i=y ) | |
559 | 125 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 ) ) |
126 ... | 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 ) | |
127 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 ) ) | |
128 ... | 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 ) | |
129 ... | case1 x=fx | case2 y<fy = subst (λ k → k ≡ * (f y)) x=fx (fc02 x cx i=x) where | |
130 fc02 : (x1 : Ordinal) → (cx1 : FClosure A f s x1 ) → suc i ≡ fcn s mf cx1 → * x1 ≡ * (f y) | |
131 fc02 .(f x1) (fsuc x1 cx1) i=x1 with proj1 (mf x1 (A∋fc s f mf cx1 ) ) | |
560 | 132 ... | case1 eq = trans (sym eq) ( fc02 x1 cx1 i=x1 ) -- derefence while f x ≡ x |
559 | 133 ... | case2 lt = subst₂ (λ j k → * (f j) ≡ * (f k )) &iso &iso ( cong (λ k → * ( f (& k ))) fc04) where |
134 fc04 : * x1 ≡ * y | |
135 fc04 = fc00 i j (cong pred i=j) cx1 cy (cong pred i=x1) (cong pred j=y) | |
136 ... | case2 x<fx | case1 y=fy = subst (λ k → * (f x) ≡ k ) y=fy (fc03 y cy j=y) where | |
137 fc03 : (y1 : Ordinal) → (cy1 : FClosure A f s y1 ) → suc j ≡ fcn s mf cy1 → * (f x) ≡ * y1 | |
138 fc03 .(f y1) (fsuc y1 cy1) j=y1 with proj1 (mf y1 (A∋fc s f mf cy1 ) ) | |
139 ... | case1 eq = trans ( fc03 y1 cy1 j=y1 ) eq | |
140 ... | case2 lt = subst₂ (λ j k → * (f j) ≡ * (f k )) &iso &iso ( cong (λ k → * ( f (& k ))) fc05) where | |
141 fc05 : * x ≡ * y1 | |
142 fc05 = fc00 i j (cong pred i=j) cx cy1 (cong pred i=x) (cong pred j=y1) | |
143 ... | 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 | 144 |
600 | 145 |
557 | 146 fcn-< : {A : HOD} (s : Ordinal ) { x y : Ordinal} {f : Ordinal → Ordinal} → (mf : ≤-monotonic-f A f) |
147 → (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 | 148 fcn-< {A} s {x} {y} {f} mf cx cy x<y = fc01 (fcn s mf cy) cx cy refl x<y where |
149 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 | |
150 fc01 (suc i) {y} cx (fsuc y1 cy) i=y (s≤s x<i) with proj1 (mf y1 (A∋fc s f mf cy ) ) | |
151 ... | case1 y=fy = subst (λ k → * x < k ) y=fy ( fc01 (suc i) {y1} cx cy i=y (s≤s x<i) ) | |
152 ... | case2 y<fy with <-cmp (fcn s mf cx ) i | |
153 ... | tri> ¬a ¬b c = ⊥-elim ( nat-≤> x<i c ) | |
154 ... | tri≈ ¬a b ¬c = subst (λ k → k < * (f y1) ) (fcn-inject s mf cy cx (sym (trans b (cong pred i=y) ))) y<fy | |
155 ... | tri< a ¬b ¬c = IsStrictPartialOrder.trans PO fc02 y<fy where | |
156 fc03 : suc i ≡ suc (fcn s mf cy) → i ≡ fcn s mf cy | |
157 fc03 eq = cong pred eq | |
158 fc02 : * x < * y1 | |
159 fc02 = fc01 i cx cy (fc03 i=y ) a | |
557 | 160 |
559 | 161 fcn-cmp : {A : HOD} (s : Ordinal) { x y : Ordinal } (f : Ordinal → Ordinal) (mf : ≤-monotonic-f A f) |
554 | 162 → (cx : FClosure A f s x) → (cy : FClosure A f s y ) → Tri (* x < * y) (* x ≡ * y) (* y < * x ) |
559 | 163 fcn-cmp {A} s {x} {y} f mf cx cy with <-cmp ( fcn s mf cx ) (fcn s mf cy ) |
164 ... | tri< a ¬b ¬c = tri< fc11 (λ eq → <-irr (case1 (sym eq)) fc11) (λ lt → <-irr (case2 fc11) lt) where | |
165 fc11 : * x < * y | |
166 fc11 = fcn-< {A} s {x} {y} {f} mf cx cy a | |
167 ... | tri≈ ¬a b ¬c = tri≈ (λ lt → <-irr (case1 (sym fc10)) lt) fc10 (λ lt → <-irr (case1 fc10) lt) where | |
168 fc10 : * x ≡ * y | |
169 fc10 = fcn-inject {A} s {x} {y} {f} mf cx cy b | |
170 ... | tri> ¬a ¬b c = tri> (λ lt → <-irr (case2 fc12) lt) (λ eq → <-irr (case1 eq) fc12) fc12 where | |
171 fc12 : * y < * x | |
172 fc12 = fcn-< {A} s {y} {x} {f} mf cy cx c | |
173 | |
600 | 174 |
562 | 175 fcn-imm : {A : HOD} (s : Ordinal) { x y : Ordinal } (f : Ordinal → Ordinal) (mf : ≤-monotonic-f A f) |
176 → (cx : FClosure A f s x) → (cy : FClosure A f s y ) → ¬ ( ( * x < * y ) ∧ ( * y < * (f x )) ) | |
563 | 177 fcn-imm {A} s {x} {y} f mf cx cy ⟪ x<y , y<fx ⟫ = fc21 where |
178 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 ) | |
179 fc20 y<sx with <-cmp ( fcn s mf cy ) (fcn s mf cx ) | |
180 ... | tri< a ¬b ¬c = case2 a | |
181 ... | tri≈ ¬a b ¬c = case1 b | |
182 ... | tri> ¬a ¬b c = ⊥-elim ( nat-≤> y<sx (s≤s c)) | |
183 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 | |
184 fc17 {x} {y} cx cy sx=y = fc18 (fcn s mf cy) cx cy refl sx=y where | |
185 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 | |
186 fc18 (suc i) {y} cx (fsuc y1 cy) i=y sx=i with proj1 (mf y1 (A∋fc s f mf cy ) ) | |
187 ... | case1 y=fy = subst (λ k → * (f x) ≡ k ) y=fy ( fc18 (suc i) {y1} cx cy i=y sx=i) -- dereference | |
188 ... | case2 y<fy = subst₂ (λ j k → * (f j) ≡ * (f k) ) &iso &iso (cong (λ k → * (f (& k) ) ) fc19) where | |
189 fc19 : * x ≡ * y1 | |
190 fc19 = fcn-inject s mf cx cy (cong pred ( trans sx=i i=y )) | |
191 fc21 : ⊥ | |
192 fc21 with <-cmp (suc ( fcn s mf cx )) (fcn s mf cy ) | |
193 ... | tri< a ¬b ¬c = <-irr (case2 y<fx) (fc22 a) where -- suc ncx < ncy | |
194 cxx : FClosure A f s (f x) | |
195 cxx = fsuc x cx | |
196 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 | 197 fc16 x (init as) with proj1 (mf s as ) |
563 | 198 ... | case1 _ = case1 refl |
199 ... | case2 _ = case2 refl | |
200 fc16 .(f x) (fsuc x cx ) with proj1 (mf (f x) (A∋fc s f mf (fsuc x cx)) ) | |
201 ... | case1 _ = case1 refl | |
202 ... | case2 _ = case2 refl | |
203 fc22 : (suc ( fcn s mf cx )) Data.Nat.< (fcn s mf cy ) → * (f x) < * y | |
204 fc22 a with fc16 x cx | |
205 ... | case1 eq = fcn-< s mf cxx cy (subst (λ k → k Data.Nat.< fcn s mf cy ) eq (<-trans a<sa a)) | |
206 ... | case2 eq = fcn-< s mf cxx cy (subst (λ k → k Data.Nat.< fcn s mf cy ) eq a ) | |
207 ... | tri≈ ¬a b ¬c = <-irr (case1 (fc17 cx cy b)) y<fx | |
208 ... | tri> ¬a ¬b c with fc20 c -- ncy < suc ncx | |
209 ... | case1 y=x = <-irr (case1 ( fcn-inject s mf cy cx y=x )) x<y | |
210 ... | case2 y<x = <-irr (case2 x<y) (fcn-< s mf cy cx y<x ) | |
211 | |
729 | 212 fc-conv : (A : HOD ) (f : Ordinal → Ordinal) {b u : Ordinal } |
213 → {p0 p1 : Ordinal → Ordinal} | |
214 → p0 u ≡ p1 u | |
215 → FClosure A f (p0 u) b → FClosure A f (p1 u) b | |
216 fc-conv A f {.(p0 u)} {u} {p0} {p1} p0u=p1u (init ap0u) = subst (λ k → FClosure A f (p1 u) k) (sym p0u=p1u) | |
217 ( init (subst (λ k → odef A k) p0u=p1u ap0u )) | |
218 fc-conv A f {_} {u} {p0} {p1} p0u=p1u (fsuc z fc) = fsuc z (fc-conv A f {_} {u} {p0} {p1} p0u=p1u fc) | |
219 | |
560 | 220 -- open import Relation.Binary.Properties.Poset as Poset |
221 | |
222 IsTotalOrderSet : ( A : HOD ) → Set (Level.suc n) | |
223 IsTotalOrderSet A = {a b : HOD} → odef A (& a) → odef A (& b) → Tri (a < b) (a ≡ b) (b < a ) | |
224 | |
567 | 225 ⊆-IsTotalOrderSet : { A B : HOD } → B ⊆ A → IsTotalOrderSet A → IsTotalOrderSet B |
568 | 226 ⊆-IsTotalOrderSet {A} {B} B⊆A T ax ay = T (incl B⊆A ax) (incl B⊆A ay) |
567 | 227 |
568 | 228 _⊆'_ : ( A B : HOD ) → Set n |
229 _⊆'_ A B = {x : Ordinal } → odef A x → odef B x | |
560 | 230 |
231 -- | |
232 -- inductive maxmum tree from x | |
233 -- tree structure | |
234 -- | |
554 | 235 |
567 | 236 record HasPrev (A B : HOD) {x : Ordinal } (xa : odef A x) ( f : Ordinal → Ordinal ) : Set n where |
533 | 237 field |
534 | 238 y : Ordinal |
541 | 239 ay : odef B y |
534 | 240 x=fy : x ≡ f y |
529 | 241 |
570 | 242 record IsSup (A B : HOD) {x : Ordinal } (xa : odef A x) : Set n where |
654 | 243 field |
571 | 244 x<sup : {y : Ordinal} → odef B y → (y ≡ x ) ∨ (y << x ) |
568 | 245 |
656 | 246 record SUP ( A B : HOD ) : Set (Level.suc n) where |
247 field | |
248 sup : HOD | |
249 A∋maximal : A ∋ sup | |
250 x<sup : {x : HOD} → B ∋ x → (x ≡ sup ) ∨ (x < sup ) -- B is Total, use positive | |
251 | |
724 | 252 record IsSup>b (A : HOD) (b : Ordinal) (p : Ordinal) : Set n where |
253 field | |
254 x2 : Ordinal | |
255 ax2 : odef A x2 | |
256 b<x2 : b o< x2 | |
257 is-sup>b : IsSup A (* p) ax2 | |
690 | 258 -- |
259 -- sup and its fclosure is in a chain HOD | |
260 -- chain HOD is sorted by sup as Ordinal and <-ordered | |
261 -- whole chain is a union of separated Chain | |
262 -- minimum index is y not ϕ | |
263 -- | |
264 | |
714 | 265 record ChainP (A : HOD ) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) {y : Ordinal} (ay : odef A y) (supf : Ordinal → Ordinal) (u z : Ordinal) : Set n where |
690 | 266 field |
725 | 267 u>0 : o∅ o< u -- ¬ ch-init |
732
ddeb107b6f71
bchain can be reached from upwords by f. so it is worng.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
729
diff
changeset
|
268 supf=u : supf u ≡ u |
714 | 269 au : odef A u |
721 | 270 ¬u=fx : {x : Ordinal} → ¬ ( u ≡ f x ) |
695 | 271 asup : (x : Ordinal) → odef A (supf x) |
714 | 272 fcy<sup : {z : Ordinal } → FClosure A f y z → z << supf u |
273 csupz : FClosure A f (supf u) z | |
274 order : {sup1 z1 : Ordinal} → (lt : sup1 o< u ) → FClosure A f (supf sup1 ) z1 → z1 << supf u | |
694 | 275 |
276 data Chain (A : HOD ) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) {y : Ordinal} (ay : odef A y) (supf : Ordinal → Ordinal) : Ordinal → Ordinal → Set n where | |
711 | 277 ch-init : (z : Ordinal) → FClosure A f y z → Chain A f mf ay supf o∅ z |
694 | 278 ch-is-sup : {sup z : Ordinal } |
279 → ( is-sup : ChainP A f mf ay supf sup z) | |
280 → ( fc : FClosure A f (supf sup) z ) → Chain A f mf ay supf sup z | |
281 | |
282 -- Union of supf z which o< x | |
283 -- | |
690 | 284 |
694 | 285 record UChain ( A : HOD ) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) {y : Ordinal } (ay : odef A y ) |
286 (supf : Ordinal → Ordinal) (x : Ordinal) (z : Ordinal) : Set n where | |
287 field | |
288 u : Ordinal | |
711 | 289 u<x : (u o< x ) ∨ ( u ≡ o∅) |
707 | 290 uchain : Chain A f mf ay supf u z |
694 | 291 |
292 ∈∧P→o< : {A : HOD } {y : Ordinal} → {P : Set n} → odef A y ∧ P → y o< & A | |
293 ∈∧P→o< {A } {y} p = subst (λ k → k o< & A) &iso ( c<→o< (subst (λ k → odef A k ) (sym &iso ) (proj1 p ))) | |
294 | |
295 UnionCF : ( A : HOD ) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) {y : Ordinal } (ay : odef A y ) | |
296 ( supf : Ordinal → Ordinal ) ( x : Ordinal ) → HOD | |
297 UnionCF A f mf ay supf x | |
298 = record { od = record { def = λ z → odef A z ∧ UChain A f mf ay supf x z } ; odmax = & A ; <odmax = λ {y} sy → ∈∧P→o< sy } | |
662 | 299 |
703 | 300 record ZChain ( A : HOD ) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) |
301 {init : Ordinal} (ay : odef A init) ( z : Ordinal ) : Set (Level.suc n) where | |
655 | 302 field |
694 | 303 supf : Ordinal → Ordinal |
608
6655f03984f9
mutual tranfinite in zorn
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
607
diff
changeset
|
304 chain : HOD |
703 | 305 chain = UnionCF A f mf ay supf z |
568 | 306 field |
732
ddeb107b6f71
bchain can be reached from upwords by f. so it is worng.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
729
diff
changeset
|
307 -- chain-mono : {z1 : Ordinal} → z1 o≤ z → UnionCF A f mf ay supf z1 ⊆' UnionCF A f mf ay supf z |
ddeb107b6f71
bchain can be reached from upwords by f. so it is worng.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
729
diff
changeset
|
308 chain<A : {z : Ordinal } → UnionCF A f mf ay supf z ⊆' UnionCF A f mf ay supf (& A) |
568 | 309 chain⊆A : chain ⊆' A |
653 | 310 chain∋init : odef chain init |
311 initial : {y : Ordinal } → odef chain y → * init ≤ * y | |
568 | 312 f-next : {a : Ordinal } → odef chain a → odef chain (f a) |
654 | 313 f-total : IsTotalOrderSet chain |
653 | 314 |
728 | 315 record ZChain1 ( A : HOD ) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) |
316 {init : Ordinal} (ay : odef A init) (zc : ZChain A f mf ay (& A)) ( z : Ordinal ) : Set (Level.suc n) where | |
317 field | |
732
ddeb107b6f71
bchain can be reached from upwords by f. so it is worng.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
729
diff
changeset
|
318 chain≤x : { b : Ordinal } → b o≤ z → odef (UnionCF A f mf ay (ZChain.supf zc) (& A)) b → odef (UnionCF A f mf ay (ZChain.supf zc) z) b |
728 | 319 chain-mono2 : { a b c : Ordinal } → |
320 a o≤ b → b o≤ z → odef (UnionCF A f mf ay (ZChain.supf zc) a) c → odef (UnionCF A f mf ay (ZChain.supf zc) b) c | |
321 is-max : {a b : Ordinal } → (ca : odef (UnionCF A f mf ay (ZChain.supf zc) z) a ) → b o< z → (ab : odef A b) | |
322 → HasPrev A (UnionCF A f mf ay (ZChain.supf zc) z) ab f ∨ IsSup A (UnionCF A f mf ay (ZChain.supf zc) z) ab | |
323 → * a < * b → odef ((UnionCF A f mf ay (ZChain.supf zc) z)) b | |
324 | |
568 | 325 record Maximal ( A : HOD ) : Set (Level.suc n) where |
326 field | |
327 maximal : HOD | |
328 A∋maximal : A ∋ maximal | |
329 ¬maximal<x : {x : HOD} → A ∋ x → ¬ maximal < x -- A is Partial, use negative | |
567 | 330 |
684
822fce8af579
no transfinite on data Chain trichotomos
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
683
diff
changeset
|
331 -- data Chain is total |
822fce8af579
no transfinite on data Chain trichotomos
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
683
diff
changeset
|
332 |
694 | 333 chain-total : (A : HOD ) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) {y : Ordinal} (ay : odef A y) (supf : Ordinal → Ordinal ) |
334 {s s1 a b : Ordinal } ( ca : Chain A f mf ay supf s a ) ( cb : Chain A f mf ay supf s1 b ) → Tri (* a < * b) (* a ≡ * b) (* b < * a ) | |
335 chain-total A f mf {y} ay supf {xa} {xb} {a} {b} ca cb = ct-ind xa xb ca cb where | |
336 ct-ind : (xa xb : Ordinal) → {a b : Ordinal} → Chain A f mf ay supf xa a → Chain A f mf ay supf xb b → Tri (* a < * b) (* a ≡ * b) (* b < * a) | |
689
34650e39e553
Chain is not strictly positive
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
688
diff
changeset
|
337 ct-ind xa xb {a} {b} (ch-init a fca) (ch-init b fcb) = fcn-cmp y f mf fca fcb |
690 | 338 ct-ind xa xb {a} {b} (ch-init a fca) (ch-is-sup supb fcb) = tri< ct01 (λ eq → <-irr (case1 (sym eq)) ct01) (λ lt → <-irr (case2 ct01) lt) where |
695 | 339 ct00 : * a < * (supf xb) |
340 ct00 = ChainP.fcy<sup supb fca | |
689
34650e39e553
Chain is not strictly positive
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
688
diff
changeset
|
341 ct01 : * a < * b |
695 | 342 ct01 with s≤fc (supf xb) f mf fcb |
689
34650e39e553
Chain is not strictly positive
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
688
diff
changeset
|
343 ... | case1 eq = subst (λ k → * a < k ) eq ct00 |
34650e39e553
Chain is not strictly positive
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
688
diff
changeset
|
344 ... | case2 lt = IsStrictPartialOrder.trans POO ct00 lt |
690 | 345 ct-ind xa xb {a} {b} (ch-is-sup supa fca) (ch-init b fcb)= tri> (λ lt → <-irr (case2 ct01) lt) (λ eq → <-irr (case1 eq) ct01) ct01 where |
695 | 346 ct00 : * b < * (supf xa) |
347 ct00 = ChainP.fcy<sup supa fcb | |
689
34650e39e553
Chain is not strictly positive
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
688
diff
changeset
|
348 ct01 : * b < * a |
695 | 349 ct01 with s≤fc (supf xa) f mf fca |
689
34650e39e553
Chain is not strictly positive
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
688
diff
changeset
|
350 ... | case1 eq = subst (λ k → * b < k ) eq ct00 |
34650e39e553
Chain is not strictly positive
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
688
diff
changeset
|
351 ... | case2 lt = IsStrictPartialOrder.trans POO ct00 lt |
690 | 352 ct-ind xa xb {a} {b} (ch-is-sup supa fca) (ch-is-sup supb fcb) with trio< xa xb |
685 | 353 ... | tri< a₁ ¬b ¬c = tri< ct02 (λ eq → <-irr (case1 (sym eq)) ct02) (λ lt → <-irr (case2 ct02) lt) where |
695 | 354 ct03 : * a < * (supf xb) |
355 ct03 = ChainP.order supb a₁ (ChainP.csupz supa) | |
689
34650e39e553
Chain is not strictly positive
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
688
diff
changeset
|
356 ct02 : * a < * b |
695 | 357 ct02 with s≤fc (supf xb) f mf fcb |
689
34650e39e553
Chain is not strictly positive
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
688
diff
changeset
|
358 ... | case1 eq = subst (λ k → * a < k ) eq ct03 |
34650e39e553
Chain is not strictly positive
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
688
diff
changeset
|
359 ... | case2 lt = IsStrictPartialOrder.trans POO ct03 lt |
695 | 360 ... | tri≈ ¬a refl ¬c = fcn-cmp (supf xa) f mf fca fcb |
685 | 361 ... | tri> ¬a ¬b c = tri> (λ lt → <-irr (case2 ct04) lt) (λ eq → <-irr (case1 (eq)) ct04) ct04 where |
695 | 362 ct05 : * b < * (supf xa) |
363 ct05 = ChainP.order supa c (ChainP.csupz supb) | |
689
34650e39e553
Chain is not strictly positive
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
688
diff
changeset
|
364 ct04 : * b < * a |
695 | 365 ct04 with s≤fc (supf xa) f mf fca |
689
34650e39e553
Chain is not strictly positive
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
688
diff
changeset
|
366 ... | case1 eq = subst (λ k → * b < k ) eq ct05 |
34650e39e553
Chain is not strictly positive
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
688
diff
changeset
|
367 ... | case2 lt = IsStrictPartialOrder.trans POO ct05 lt |
684
822fce8af579
no transfinite on data Chain trichotomos
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
683
diff
changeset
|
368 |
698 | 369 ChainP-next : (A : HOD ) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) {y : Ordinal} (ay : odef A y) (supf : Ordinal → Ordinal ) |
370 → {x z : Ordinal } → ChainP A f mf ay supf x z → ChainP A f mf ay supf x (f z ) | |
728 | 371 ChainP-next A f mf {y} ay supf {x} {z} cp = {!!} --record { y-init = ChainP.y-init cp ; asup = ChainP.asup cp ; au = ChainP.au cp |
724 | 372 -- ; fcy<sup = ChainP.fcy<sup cp ; csupz = fsuc _ (ChainP.csupz cp) ; order = ChainP.order cp } |
698 | 373 |
497 | 374 Zorn-lemma : { A : HOD } |
464 | 375 → o∅ o< & A |
568 | 376 → ( ( B : HOD) → (B⊆A : B ⊆' A) → IsTotalOrderSet B → SUP A B ) -- SUP condition |
497 | 377 → Maximal A |
552 | 378 Zorn-lemma {A} 0<A supP = zorn00 where |
571 | 379 <-irr0 : {a b : HOD} → A ∋ a → A ∋ b → (a ≡ b ) ∨ (a < b ) → b < a → ⊥ |
380 <-irr0 {a} {b} A∋a A∋b = <-irr | |
537 | 381 z07 : {y : Ordinal} → {P : Set n} → odef A y ∧ P → y o< & A |
382 z07 {y} p = subst (λ k → k o< & A) &iso ( c<→o< (subst (λ k → odef A k ) (sym &iso ) (proj1 p ))) | |
530 | 383 s : HOD |
384 s = ODC.minimal O A (λ eq → ¬x<0 ( subst (λ k → o∅ o< k ) (=od∅→≡o∅ eq) 0<A )) | |
568 | 385 as : A ∋ * ( & s ) |
386 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
|
387 as0 : odef A (& s ) |
6655f03984f9
mutual tranfinite in zorn
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
607
diff
changeset
|
388 as0 = subst (λ k → odef A k ) &iso as |
547 | 389 s<A : & s o< & A |
568 | 390 s<A = c<→o< (subst (λ k → odef A (& k) ) *iso as ) |
530 | 391 HasMaximal : HOD |
537 | 392 HasMaximal = record { od = record { def = λ x → odef A x ∧ ( (m : Ordinal) → odef A m → ¬ (* x < * m)) } ; odmax = & A ; <odmax = z07 } |
393 no-maximum : HasMaximal =h= od∅ → (x : Ordinal) → odef A x ∧ ((m : Ordinal) → odef A m → odef A x ∧ (¬ (* x < * m) )) → ⊥ | |
394 no-maximum nomx x P = ¬x<0 (eq→ nomx {x} ⟪ proj1 P , (λ m ma p → proj2 ( proj2 P m ma ) p ) ⟫ ) | |
532 | 395 Gtx : { x : HOD} → A ∋ x → HOD |
537 | 396 Gtx {x} ax = record { od = record { def = λ y → odef A y ∧ (x < (* y)) } ; odmax = & A ; <odmax = z07 } |
397 z08 : ¬ Maximal A → HasMaximal =h= od∅ | |
398 z08 nmx = record { eq→ = λ {x} lt → ⊥-elim ( nmx record {maximal = * x ; A∋maximal = subst (λ k → odef A k) (sym &iso) (proj1 lt) | |
399 ; ¬maximal<x = λ {y} ay → subst (λ k → ¬ (* x < k)) *iso (proj2 lt (& y) ay) } ) ; eq← = λ {y} lt → ⊥-elim ( ¬x<0 lt )} | |
400 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)) | |
401 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 | |
402 ¬x<m : ¬ (* x < * m) | |
403 ¬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 | 404 |
560 | 405 -- Uncountable ascending chain by axiom of choice |
530 | 406 cf : ¬ Maximal A → Ordinal → Ordinal |
532 | 407 cf nmx x with ODC.∋-p O A (* x) |
408 ... | no _ = o∅ | |
409 ... | yes ax with is-o∅ (& ( Gtx ax )) | |
538 | 410 ... | yes nogt = -- no larger element, so it is maximal |
411 ⊥-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 | 412 ... | no not = & (ODC.minimal O (Gtx ax) (λ eq → not (=od∅→≡o∅ eq))) |
537 | 413 is-cf : (nmx : ¬ Maximal A ) → {x : Ordinal} → odef A x → odef A (cf nmx x) ∧ ( * x < * (cf nmx x) ) |
414 is-cf nmx {x} ax with ODC.∋-p O A (* x) | |
415 ... | no not = ⊥-elim ( not (subst (λ k → odef A k ) (sym &iso) ax )) | |
416 ... | yes ax with is-o∅ (& ( Gtx ax )) | |
417 ... | 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 ⟫ ) | |
418 ... | no not = ODC.x∋minimal O (Gtx ax) (λ eq → not (=od∅→≡o∅ eq)) | |
606 | 419 |
420 --- | |
421 --- infintie ascention sequence of f | |
422 --- | |
530 | 423 cf-is-<-monotonic : (nmx : ¬ Maximal A ) → (x : Ordinal) → odef A x → ( * x < * (cf nmx x) ) ∧ odef A (cf nmx x ) |
537 | 424 cf-is-<-monotonic nmx x ax = ⟪ proj2 (is-cf nmx ax ) , proj1 (is-cf nmx ax ) ⟫ |
530 | 425 cf-is-≤-monotonic : (nmx : ¬ Maximal A ) → ≤-monotonic-f A ( cf nmx ) |
532 | 426 cf-is-≤-monotonic nmx x ax = ⟪ case2 (proj1 ( cf-is-<-monotonic nmx x ax )) , proj2 ( cf-is-<-monotonic nmx x ax ) ⟫ |
543 | 427 |
703 | 428 sp0 : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) (zc : ZChain A f mf as0 (& A) ) |
653 | 429 (total : IsTotalOrderSet (ZChain.chain zc) ) → SUP A (ZChain.chain zc) |
703 | 430 sp0 f mf zc total = supP (ZChain.chain zc) (ZChain.chain⊆A zc) total |
543 | 431 zc< : {x y z : Ordinal} → {P : Set n} → (x o< y → P) → x o< z → z o< y → P |
432 zc< {x} {y} {z} {P} prev x<z z<y = prev (ordtrans x<z z<y) | |
433 | |
728 | 434 SZ1 :( A : HOD ) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) |
435 {init : Ordinal} (ay : odef A init) (zc : ZChain A f mf ay (& A)) (x : Ordinal) → ZChain1 A f mf ay zc x | |
436 SZ1 A f mf {y} ay zc x = TransFinite { λ x → ZChain1 A f mf ay zc x } zc1 x where | |
437 zc1 : (x : Ordinal) → ((y₁ : Ordinal) → y₁ o< x → ZChain1 A f mf ay zc y₁) → ZChain1 A f mf ay zc x | |
732
ddeb107b6f71
bchain can be reached from upwords by f. so it is worng.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
729
diff
changeset
|
438 zc1 x prev with Oprev-p x |
ddeb107b6f71
bchain can be reached from upwords by f. so it is worng.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
729
diff
changeset
|
439 ... | yes op = record { is-max = is-max ; chain-mono2 = chain-mono2 ; chain≤x = bchain } where |
ddeb107b6f71
bchain can be reached from upwords by f. so it is worng.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
729
diff
changeset
|
440 -- supf u ≡ u ? |
ddeb107b6f71
bchain can be reached from upwords by f. so it is worng.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
729
diff
changeset
|
441 px = Oprev.oprev op |
ddeb107b6f71
bchain can be reached from upwords by f. so it is worng.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
729
diff
changeset
|
442 bchain : {b : Ordinal} → b o≤ x → |
729 | 443 odef (UnionCF A f mf ay (ZChain.supf zc) (& A)) b → |
444 odef (UnionCF A f mf ay (ZChain.supf zc) x) b | |
732
ddeb107b6f71
bchain can be reached from upwords by f. so it is worng.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
729
diff
changeset
|
445 bchain {b} b≤x ⟪ ab , record { u = u0 ; u<x = u<x ; uchain = ch-init .b x } ⟫ = |
ddeb107b6f71
bchain can be reached from upwords by f. so it is worng.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
729
diff
changeset
|
446 ⟪ ab , record { u = u0 ; u<x = case2 refl ; uchain = ch-init b x } ⟫ |
ddeb107b6f71
bchain can be reached from upwords by f. so it is worng.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
729
diff
changeset
|
447 bchain {b} b≤x ub@record { proj1 = ab ; proj2 = record { u = u ; u<x = u<x ; uchain = ch-is-sup is-sup fc } } with osuc-≡< b≤x |
ddeb107b6f71
bchain can be reached from upwords by f. so it is worng.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
729
diff
changeset
|
448 ... | case2 lt = ⟪ ab , record { u = UChain.u (proj2 sz00) ; u<x = ? ; uchain = UChain.uchain (proj2 sz00) } ⟫ where |
ddeb107b6f71
bchain can be reached from upwords by f. so it is worng.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
729
diff
changeset
|
449 sz00 : odef (UnionCF A f mf ay (ZChain.supf zc) px) b |
ddeb107b6f71
bchain can be reached from upwords by f. so it is worng.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
729
diff
changeset
|
450 sz00 = ZChain1.chain≤x (prev px ? ) ? ub |
ddeb107b6f71
bchain can be reached from upwords by f. so it is worng.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
729
diff
changeset
|
451 ... | case1 refl = ? |
ddeb107b6f71
bchain can be reached from upwords by f. so it is worng.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
729
diff
changeset
|
452 |
729 | 453 chain-mono2 : {a b c : Ordinal} → a o≤ b → b o≤ x → |
454 odef (UnionCF A f mf ay (ZChain.supf zc) a) c → odef (UnionCF A f mf ay (ZChain.supf zc) b) c | |
732
ddeb107b6f71
bchain can be reached from upwords by f. so it is worng.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
729
diff
changeset
|
455 chain-mono2 {a} {b} {c} a≤b b≤x uac = {!!} |
728 | 456 is-max : {a : Ordinal} {b : Ordinal} → odef (UnionCF A f mf ay (ZChain.supf zc) x) a → |
457 b o< x → (ab : odef A b) → | |
458 HasPrev A (UnionCF A f mf ay (ZChain.supf zc) x) ab f ∨ IsSup A (UnionCF A f mf ay (ZChain.supf zc) x) ab → | |
459 * a < * b → odef (UnionCF A f mf ay (ZChain.supf zc) x) b | |
460 is-max {a} {b} ua b<x ab (case1 has-prev) a<b = {!!} | |
461 is-max {a} {b} ua b<x ab (case2 is-sup) a<b with ODC.p∨¬p O ( HasPrev A (ZChain.chain zc ) ab f ) | |
462 ... | case1 has-prev = m03 (subst (λ k → odef (UnionCF A f mf ay (ZChain.supf zc) (& A)) k ) {!!} m02 ) {!!} where | |
463 m03 : odef (UnionCF A f mf ay (ZChain.supf zc) (& A)) b → b o< x → odef (UnionCF A f mf ay (ZChain.supf zc) x) b | |
464 m03 = {!!} | |
465 m02 : odef (UnionCF A f mf ay (ZChain.supf zc) (& A)) (f (HasPrev.y has-prev)) | |
466 m02 = ZChain.f-next zc (HasPrev.ay has-prev) | |
732
ddeb107b6f71
bchain can be reached from upwords by f. so it is worng.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
729
diff
changeset
|
467 ... | case2 ¬fy<x = {!!} where |
728 | 468 m01 : odef (UnionCF A f mf ay (ZChain.supf zc) x) b |
469 m01 with trio< px b | |
732
ddeb107b6f71
bchain can be reached from upwords by f. so it is worng.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
729
diff
changeset
|
470 ... | tri< a ¬b ¬c = ZChain1.chain-mono2 (prev px {!!}) {!!} {!!} m04 where |
728 | 471 m04 : odef (UnionCF A f mf ay (ZChain.supf zc) px) b |
732
ddeb107b6f71
bchain can be reached from upwords by f. so it is worng.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
729
diff
changeset
|
472 m04 = ZChain1.is-max (prev px {!!}) {!!} {!!} ab {!!} a<b |
728 | 473 ... | tri≈ ¬a b ¬c = {!!} |
474 ... | tri> ¬a ¬b c = {!!} | |
732
ddeb107b6f71
bchain can be reached from upwords by f. so it is worng.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
729
diff
changeset
|
475 ... | no lim = record { is-max = {!!} ; chain-mono2 = {!!} ; chain≤x = {!!} } |
ddeb107b6f71
bchain can be reached from upwords by f. so it is worng.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
729
diff
changeset
|
476 --- m04 : odef (UnionCF A f mf ay (ZChain.supf zc) (osuc b)) b |
ddeb107b6f71
bchain can be reached from upwords by f. so it is worng.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
729
diff
changeset
|
477 --- m04 = ZChain1.is-max (prev (osuc b) {!!} ) {!!} <-osuc ab {!!} a<b |
727 | 478 |
543 | 479 --- |
560 | 480 --- the maximum chain has fix point of any ≤-monotonic function |
543 | 481 --- |
703 | 482 fixpoint : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) (zc : ZChain A f mf as0 (& A) ) |
633
6cd4a483122c
ZChain1 is not strictly positive
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
631
diff
changeset
|
483 → (total : IsTotalOrderSet (ZChain.chain zc) ) |
703 | 484 → f (& (SUP.sup (sp0 f mf zc total ))) ≡ & (SUP.sup (sp0 f mf zc total)) |
485 fixpoint f mf zc total = z14 where | |
538 | 486 chain = ZChain.chain zc |
703 | 487 sp1 = sp0 f mf zc total |
712 | 488 z10 : {a b : Ordinal } → (ca : odef chain a ) → b o< & A → (ab : odef A b ) |
570 | 489 → HasPrev A chain ab f ∨ IsSup A chain {b} ab -- (supO chain (ZChain.chain⊆A zc) (ZChain.f-total zc) ≡ b ) |
538 | 490 → * a < * b → odef chain b |
728 | 491 z10 = ZChain1.is-max (SZ1 A f mf as0 zc (& A) ) |
543 | 492 z11 : & (SUP.sup sp1) o< & A |
493 z11 = c<→o< ( SUP.A∋maximal sp1) | |
538 | 494 z12 : odef chain (& (SUP.sup sp1)) |
495 z12 with o≡? (& s) (& (SUP.sup sp1)) | |
653 | 496 ... | yes eq = subst (λ k → odef chain k) eq ( ZChain.chain∋init zc ) |
712 | 497 ... | no ne = z10 {& s} {& (SUP.sup sp1)} ( ZChain.chain∋init zc ) z11 (SUP.A∋maximal sp1) |
570 | 498 (case2 z19 ) z13 where |
538 | 499 z13 : * (& s) < * (& (SUP.sup sp1)) |
653 | 500 z13 with SUP.x<sup sp1 ( ZChain.chain∋init zc ) |
538 | 501 ... | case1 eq = ⊥-elim ( ne (cong (&) eq) ) |
502 ... | case2 lt = subst₂ (λ j k → j < k ) (sym *iso) (sym *iso) lt | |
570 | 503 z19 : IsSup A chain {& (SUP.sup sp1)} (SUP.A∋maximal sp1) |
571 | 504 z19 = record { x<sup = z20 } where |
505 z20 : {y : Ordinal} → odef chain y → (y ≡ & (SUP.sup sp1)) ∨ (y << & (SUP.sup sp1)) | |
506 z20 {y} zy with SUP.x<sup sp1 (subst (λ k → odef chain k ) (sym &iso) zy) | |
570 | 507 ... | case1 y=p = case1 (subst (λ k → k ≡ _ ) &iso ( cong (&) y=p )) |
508 ... | case2 y<p = case2 (subst (λ k → * y < k ) (sym *iso) y<p ) | |
509 -- λ {y} zy → subst (λ k → (y ≡ & k ) ∨ (y << & k)) ? (SUP.x<sup sp1 ? ) } | |
703 | 510 z14 : f (& (SUP.sup (sp0 f mf zc total ))) ≡ & (SUP.sup (sp0 f mf zc total )) |
633
6cd4a483122c
ZChain1 is not strictly positive
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
631
diff
changeset
|
511 z14 with total (subst (λ k → odef chain k) (sym &iso) (ZChain.f-next zc z12 )) z12 |
631 | 512 ... | tri< a ¬b ¬c = ⊥-elim z16 where |
513 z16 : ⊥ | |
514 z16 with proj1 (mf (& ( SUP.sup sp1)) ( SUP.A∋maximal sp1 )) | |
515 ... | case1 eq = ⊥-elim (¬b (subst₂ (λ j k → j ≡ k ) refl *iso (sym eq) )) | |
516 ... | case2 lt = ⊥-elim (¬c (subst₂ (λ j k → k < j ) refl *iso lt )) | |
517 ... | tri≈ ¬a b ¬c = subst ( λ k → k ≡ & (SUP.sup sp1) ) &iso ( cong (&) b ) | |
518 ... | tri> ¬a ¬b c = ⊥-elim z17 where | |
519 z15 : (* (f ( & ( SUP.sup sp1 ))) ≡ SUP.sup sp1) ∨ (* (f ( & ( SUP.sup sp1 ))) < SUP.sup sp1) | |
520 z15 = SUP.x<sup sp1 (subst (λ k → odef chain k ) (sym &iso) (ZChain.f-next zc z12 )) | |
521 z17 : ⊥ | |
522 z17 with z15 | |
523 ... | case1 eq = ¬b eq | |
524 ... | case2 lt = ¬a lt | |
560 | 525 |
526 -- ZChain contradicts ¬ Maximal | |
527 -- | |
571 | 528 -- ZChain forces fix point on any ≤-monotonic function (fixpoint) |
560 | 529 -- ¬ Maximal create cf which is a <-monotonic function by axiom of choice. This contradicts fix point of ZChain |
530 -- | |
697 | 531 z04 : (nmx : ¬ Maximal A ) |
703 | 532 → (zc : ZChain A (cf nmx) (cf-is-≤-monotonic nmx) as0 (& A)) |
664 | 533 → IsTotalOrderSet (ZChain.chain zc) → ⊥ |
703 | 534 z04 nmx zc total = <-irr0 {* (cf nmx c)} {* c} (subst (λ k → odef A k ) (sym &iso) (proj1 (is-cf nmx (SUP.A∋maximal sp1 )))) |
571 | 535 (subst (λ k → odef A (& k)) (sym *iso) (SUP.A∋maximal sp1) ) |
703 | 536 (case1 ( cong (*)( fixpoint (cf nmx) (cf-is-≤-monotonic nmx ) zc total ))) -- x ≡ f x ̄ |
633
6cd4a483122c
ZChain1 is not strictly positive
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
631
diff
changeset
|
537 (proj1 (cf-is-<-monotonic nmx c (SUP.A∋maximal sp1 ))) where -- x < f x |
6cd4a483122c
ZChain1 is not strictly positive
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
631
diff
changeset
|
538 sp1 : SUP A (ZChain.chain zc) |
703 | 539 sp1 = sp0 (cf nmx) (cf-is-≤-monotonic nmx) zc total |
538 | 540 c = & (SUP.sup sp1) |
548 | 541 |
711 | 542 inititalChain : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) → ZChain A f mf ay o∅ |
543 inititalChain f mf {y} ay = record { supf = isupf ; chain⊆A = λ lt → proj1 lt ; chain∋init = cy | |
732
ddeb107b6f71
bchain can be reached from upwords by f. so it is worng.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
729
diff
changeset
|
544 ; initial = isy ; f-next = inext ; f-total = itotal ; chain<A = {!!} } where |
711 | 545 isupf : Ordinal → Ordinal |
546 isupf z = y | |
547 cy : odef (UnionCF A f mf ay isupf o∅) y | |
548 cy = ⟪ ay , record { u = o∅ ; u<x = case2 refl ; uchain = ch-init _ (init ay) } ⟫ | |
549 isy : {z : Ordinal } → odef (UnionCF A f mf ay isupf o∅) z → * y ≤ * z | |
550 isy {z} ⟪ az , uz ⟫ with UChain.uchain uz | |
551 ... | ch-init z fc = s≤fc y f mf fc | |
552 ... | ch-is-sup is-sup fc = ⊥-elim ( <-irr (case1 refl) ( ChainP.fcy<sup is-sup (init ay) ) ) | |
553 inext : {a : Ordinal} → odef (UnionCF A f mf ay isupf o∅) a → odef (UnionCF A f mf ay isupf o∅) (f a) | |
554 inext {a} ua with UChain.uchain (proj2 ua) | |
555 ... | ch-init a fc = ⟪ proj2 (mf _ (proj1 ua)) , record { u = o∅ ; u<x = case2 refl ; uchain = ch-init _ (fsuc _ fc ) } ⟫ | |
556 ... | ch-is-sup is-sup fc = ⊥-elim ( <-irr (case1 refl) ( ChainP.fcy<sup is-sup (init ay) ) ) | |
557 itotal : IsTotalOrderSet (UnionCF A f mf ay isupf o∅) | |
558 itotal {a} {b} ca cb = subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso uz01 where | |
559 uz01 : Tri (* (& a) < * (& b)) (* (& a) ≡ * (& b)) (* (& b) < * (& a) ) | |
560 uz01 = chain-total A f mf ay isupf (UChain.uchain (proj2 ca)) (UChain.uchain (proj2 cb)) | |
561 imax : {a b : Ordinal} → odef (UnionCF A f mf ay isupf o∅) a → | |
712 | 562 b o< o∅ → (ab : odef A b) → |
711 | 563 HasPrev A (UnionCF A f mf ay isupf o∅) ab f ∨ IsSup A (UnionCF A f mf ay isupf o∅) ab → |
564 * a < * b → odef (UnionCF A f mf ay isupf o∅) b | |
714 | 565 imax {a} {b} ua b<x ab (case1 hasp) a<b = subst (λ k → odef (UnionCF A f mf ay isupf o∅) k ) (sym (HasPrev.x=fy hasp)) ( inext (HasPrev.ay hasp) ) |
566 imax {a} {b} ua b<x ab (case2 sup) a<b = ⊥-elim ( ¬x<0 b<x ) | |
711 | 567 |
560 | 568 -- |
547 | 569 -- create all ZChains under o< x |
560 | 570 -- |
608
6655f03984f9
mutual tranfinite in zorn
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
607
diff
changeset
|
571 |
674 | 572 ind : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) → (x : Ordinal) |
703 | 573 → ((z : Ordinal) → z o< x → ZChain A f mf ay z) → ZChain A f mf ay x |
707 | 574 ind f mf {y} ay x prev with Oprev-p x |
697 | 575 ... | yes op = zc4 where |
682 | 576 -- |
577 -- we have previous ordinal to use induction | |
578 -- | |
579 px = Oprev.oprev op | |
703 | 580 zc : ZChain A f mf ay (Oprev.oprev op) |
682 | 581 zc = prev px (subst (λ k → px o< k) (Oprev.oprev=x op) <-osuc ) |
582 px<x : px o< x | |
583 px<x = subst (λ k → px o< k) (Oprev.oprev=x op) <-osuc | |
709 | 584 zc-b<x : (b : Ordinal ) → b o< x → b o< osuc px |
585 zc-b<x b lt = subst (λ k → b o< k ) (sym (Oprev.oprev=x op)) lt | |
697 | 586 |
703 | 587 pchain : HOD |
588 pchain = UnionCF A f mf ay (ZChain.supf zc) x | |
589 ptotal : IsTotalOrderSet pchain | |
590 ptotal {a} {b} ca cb = subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso uz01 where | |
591 uz01 : Tri (* (& a) < * (& b)) (* (& a) ≡ * (& b)) (* (& b) < * (& a) ) | |
707 | 592 uz01 = chain-total A f mf ay (ZChain.supf zc) (UChain.uchain (proj2 ca)) (UChain.uchain (proj2 cb)) |
704 | 593 pchain⊆A : {y : Ordinal} → odef pchain y → odef A y |
594 pchain⊆A {y} ny = proj1 ny | |
595 pnext : {a : Ordinal} → odef pchain a → odef pchain (f a) | |
707 | 596 pnext {a} ⟪ aa , ua ⟫ = ⟪ afa , record { u = UChain.u ua ; u<x = UChain.u<x ua ; uchain = fua } ⟫ where |
704 | 597 afa : odef A ( f a ) |
598 afa = proj2 ( mf a aa ) | |
707 | 599 fua : Chain A f mf ay (ZChain.supf zc) (UChain.u ua) (f a) |
600 fua with UChain.uchain ua | |
704 | 601 ... | ch-init a fc = ch-init (f a) ( fsuc _ fc ) |
707 | 602 ... | ch-is-sup is-sup fc = ch-is-sup (ChainP-next A f mf ay _ is-sup ) (fsuc _ fc ) |
704 | 603 pinit : {y₁ : Ordinal} → odef pchain y₁ → * y ≤ * y₁ |
707 | 604 pinit {a} ⟪ aa , ua ⟫ with UChain.uchain ua |
704 | 605 ... | ch-init a fc = s≤fc y f mf fc |
707 | 606 ... | ch-is-sup is-sup fc = ≤-ftrans (case2 zc7) (s≤fc _ f mf fc) where |
607 zc7 : y << (ZChain.supf zc) (UChain.u ua) | |
608 zc7 = ChainP.fcy<sup is-sup (init ay) | |
704 | 609 pcy : odef pchain y |
711 | 610 pcy = ⟪ ay , record { u = o∅ ; u<x = case2 refl ; uchain = ch-init _ (init ay) } ⟫ |
703 | 611 |
611 | 612 -- if previous chain satisfies maximality, we caan reuse it |
613 -- | |
727 | 614 no-extension : ZChain A f mf ay x |
728 | 615 no-extension = record { supf = {!!} ; initial = pinit ; chain∋init = pcy |
727 | 616 ; chain⊆A = pchain⊆A ; f-next = pnext ; f-total = ptotal } |
709 | 617 |
710 | 618 chain-mono : UnionCF A f mf ay (ZChain.supf zc) (Oprev.oprev op ) ⊆' pchain |
619 chain-mono {a} za = ⟪ proj1 za , record { u = UChain.u (proj2 za) ; u<x = zc11 ; uchain = UChain.uchain (proj2 za) } ⟫ where | |
711 | 620 zc11 : (UChain.u (proj2 za) o< x) ∨ (UChain.u (proj2 za) ≡ o∅) |
710 | 621 zc11 with UChain.u<x (proj2 za) |
622 ... | case1 z<x = case1 (ordtrans z<x px<x ) | |
711 | 623 ... | case2 z=0 = case2 z=0 |
624 | |
625 chain-≡ : pchain ⊆' UnionCF A f mf ay (ZChain.supf zc) (Oprev.oprev op ) | |
626 → pchain ≡ UnionCF A f mf ay (ZChain.supf zc) (Oprev.oprev op ) | |
627 chain-≡ lt = ==→o≡ record { eq→ = lt ; eq← = chain-mono } | |
709 | 628 |
721 | 629 chain-x : ( {z : Ordinal} → (az : odef pchain z) → ¬ ( UChain.u (proj2 az) ≡ px )) → pchain ⊆' UnionCF A f mf ay (ZChain.supf zc) px |
630 chain-x ne {z} ⟪ az , record { u = u ; u<x = case2 u=y ; uchain = uc } ⟫ = | |
714 | 631 ⟪ az , record { u = u ; u<x = case2 u=y ; uchain = uc } ⟫ |
721 | 632 chain-x ne {z} ⟪ az , record { u = u ; u<x = case1 u<x ; uchain = ch-init z fc } ⟫ with trio< o∅ px |
714 | 633 ... | tri< a ¬b ¬c = ⟪ az , record { u = u ; u<x = case1 a ; uchain = ch-init z fc } ⟫ |
634 ... | tri≈ ¬a b ¬c = ⟪ az , record { u = u ; u<x = case2 refl ; uchain = ch-init z fc } ⟫ | |
635 ... | tri> ¬a ¬b c = ⊥-elim ( ¬x<0 c ) | |
721 | 636 chain-x ne {z} uz@record { proj1 = az ; proj2 = record { u = u ; u<x = case1 u<x ; uchain = ch-is-sup is-sup fc } } with trio< u px |
714 | 637 ... | tri< a ¬b ¬c = ⟪ az , record { u = u ; u<x = case1 a ; uchain = ch-is-sup is-sup fc } ⟫ |
638 ... | tri≈ ¬a b ¬c = ⊥-elim ( ne uz b ) | |
639 ... | tri> ¬a ¬b c = ⊥-elim ( ¬p<x<op ⟪ c , subst (λ k → u o< k ) (sym (Oprev.oprev=x op)) u<x ⟫ ) | |
640 | |
703 | 641 zc4 : ZChain A f mf ay x |
713 | 642 zc4 with ODC.∋-p O A (* px) |
727 | 643 ... | no noapx = no-extension -- ¬ A ∋ p, just skip |
713 | 644 ... | yes apx with ODC.p∨¬p O ( HasPrev A (ZChain.chain zc ) apx f ) |
703 | 645 -- we have to check adding x preserve is-max ZChain A y f mf x |
727 | 646 ... | case1 pr = no-extension -- we have previous A ∋ z < x , f z ≡ x, so chain ∋ f z ≡ x because of f-next |
713 | 647 ... | case2 ¬fy<x with ODC.p∨¬p O (IsSup A (ZChain.chain zc ) apx ) |
682 | 648 ... | case1 is-sup = -- x is a sup of zc |
728 | 649 record { supf = {!!} ; chain⊆A = pchain⊆A ; f-next = pnext ; f-total = ptotal |
727 | 650 ; initial = pinit ; chain∋init = pcy } |
651 ... | case2 ¬x=sup = no-extension -- px is not f y' nor sup of former ZChain from y -- no extention | |
728 | 652 ... | no lim = zc5 where |
726
b2e2cd12e38f
psupf-mono and is-max conflict
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
725
diff
changeset
|
653 |
703 | 654 pzc : (z : Ordinal) → z o< x → ZChain A f mf ay z |
655 pzc z z<x = prev z z<x | |
726
b2e2cd12e38f
psupf-mono and is-max conflict
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
725
diff
changeset
|
656 |
703 | 657 psupf0 : (z : Ordinal) → Ordinal |
658 psupf0 z with trio< z x | |
659 ... | tri< a ¬b ¬c = ZChain.supf (pzc z a) z | |
704 | 660 ... | tri≈ ¬a b ¬c = y |
661 ... | tri> ¬a ¬b c = y | |
726
b2e2cd12e38f
psupf-mono and is-max conflict
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
725
diff
changeset
|
662 |
704 | 663 pchain : HOD |
664 pchain = UnionCF A f mf ay psupf0 x | |
726
b2e2cd12e38f
psupf-mono and is-max conflict
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
725
diff
changeset
|
665 |
b2e2cd12e38f
psupf-mono and is-max conflict
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
725
diff
changeset
|
666 psupf0=pzc : {z : Ordinal} → (z<x : z o< x) → psupf0 z ≡ ZChain.supf (pzc z z<x) z |
b2e2cd12e38f
psupf-mono and is-max conflict
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
725
diff
changeset
|
667 psupf0=pzc {z} z<x with trio< z x |
b2e2cd12e38f
psupf-mono and is-max conflict
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
725
diff
changeset
|
668 ... | tri≈ ¬a b ¬c = ⊥-elim (¬a z<x) |
b2e2cd12e38f
psupf-mono and is-max conflict
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
725
diff
changeset
|
669 ... | tri> ¬a ¬b c = ⊥-elim (¬a z<x) |
b2e2cd12e38f
psupf-mono and is-max conflict
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
725
diff
changeset
|
670 ... | tri< a ¬b ¬c with o<-irr z<x a |
b2e2cd12e38f
psupf-mono and is-max conflict
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
725
diff
changeset
|
671 ... | refl = refl |
b2e2cd12e38f
psupf-mono and is-max conflict
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
725
diff
changeset
|
672 |
704 | 673 ptotal : IsTotalOrderSet pchain |
674 ptotal {a} {b} ca cb = subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso uz01 where | |
703 | 675 uz01 : Tri (* (& a) < * (& b)) (* (& a) ≡ * (& b)) (* (& b) < * (& a) ) |
707 | 676 uz01 = chain-total A f mf ay psupf0 (UChain.uchain (proj2 ca)) (UChain.uchain (proj2 cb)) |
704 | 677 |
678 pchain⊆A : {y : Ordinal} → odef pchain y → odef A y | |
679 pchain⊆A {y} ny = proj1 ny | |
680 pnext : {a : Ordinal} → odef pchain a → odef pchain (f a) | |
707 | 681 pnext {a} ⟪ aa , ua ⟫ = ⟪ afa , record { u = UChain.u ua ; u<x = UChain.u<x ua ; uchain = fua } ⟫ where |
704 | 682 afa : odef A ( f a ) |
683 afa = proj2 ( mf a aa ) | |
684 fua : Chain A f mf ay psupf0 (UChain.u ua) (f a) | |
707 | 685 fua with UChain.uchain ua |
704 | 686 ... | ch-init a fc = ch-init (f a) ( fsuc _ fc ) |
707 | 687 ... | ch-is-sup is-sup fc = ch-is-sup (ChainP-next A f mf ay _ is-sup ) (fsuc _ fc ) |
704 | 688 pinit : {y₁ : Ordinal} → odef pchain y₁ → * y ≤ * y₁ |
707 | 689 pinit {a} ⟪ aa , ua ⟫ with UChain.uchain ua |
704 | 690 ... | ch-init a fc = s≤fc y f mf fc |
707 | 691 ... | ch-is-sup is-sup fc = ≤-ftrans (case2 zc7) (s≤fc _ f mf fc) where |
704 | 692 zc7 : y << psupf0 (UChain.u ua) |
707 | 693 zc7 = ChainP.fcy<sup is-sup (init ay) |
704 | 694 pcy : odef pchain y |
711 | 695 pcy = ⟪ ay , record { u = o∅ ; u<x = case2 refl ; uchain = ch-init _ (init ay) } ⟫ |
704 | 696 |
727 | 697 no-extension : ZChain A f mf ay x |
732
ddeb107b6f71
bchain can be reached from upwords by f. so it is worng.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
729
diff
changeset
|
698 no-extension = record { initial = pinit ; chain∋init = pcy ; supf = psupf0 ; chain<A = {!!} |
727 | 699 ; chain⊆A = pchain⊆A ; f-next = pnext ; f-total = ptotal } |
709 | 700 |
704 | 701 usup : SUP A pchain |
702 usup = supP pchain (λ lt → proj1 lt) ptotal | |
703 | 703 spu = & (SUP.sup usup) |
704 psupf : Ordinal → Ordinal | |
705 psupf z with trio< z x | |
706 ... | tri< a ¬b ¬c = ZChain.supf (pzc z a) z | |
707 ... | tri≈ ¬a b ¬c = spu | |
708 ... | tri> ¬a ¬b c = spu | |
704 | 709 |
711 | 710 |
710 | 711 chain-mono : pchain ⊆' UnionCF A f mf ay psupf x |
721 | 712 chain-mono {a} ⟪ az , record { u = u ; u<x = u<x ; uchain = ch-init a x } ⟫ = |
713 ⟪ az , record { u = u ; u<x = u<x ; uchain = ch-init a x } ⟫ | |
714 chain-mono {.(psupf0 u)} ⟪ az , record { u = u ; u<x = u<x ; uchain = ch-is-sup is-sup (init x) } ⟫ = | |
728 | 715 ⟪ az , record { u = u ; u<x = u<x ; uchain = ch-is-sup {!!} {!!} } ⟫ |
721 | 716 chain-mono {.(f x)} ⟪ az , record { u = u ; u<x = u<x ; uchain = ch-is-sup is-sup (fsuc x fc) } ⟫ = |
728 | 717 ⟪ az , record { u = u ; u<x = u<x ; uchain = ch-is-sup {!!} (fsuc x {!!}) } ⟫ |
721 | 718 |
711 | 719 chain-≡ : UnionCF A f mf ay psupf x ⊆' pchain |
720 → UnionCF A f mf ay psupf x ≡ pchain | |
721 chain-≡ lt = ==→o≡ record { eq→ = lt ; eq← = chain-mono } | |
722 | |
703 | 723 zc5 : ZChain A f mf ay x |
697 | 724 zc5 with ODC.∋-p O A (* x) |
732
ddeb107b6f71
bchain can be reached from upwords by f. so it is worng.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
729
diff
changeset
|
725 ... | no noax = no-extension -- ¬ A ∋ p, just skip |
704 | 726 ... | yes ax with ODC.p∨¬p O ( HasPrev A pchain ax f ) |
703 | 727 -- we have to check adding x preserve is-max ZChain A y f mf x |
727 | 728 ... | case1 pr = no-extension |
704 | 729 ... | case2 ¬fy<x with ODC.p∨¬p O (IsSup A pchain ax ) |
732
ddeb107b6f71
bchain can be reached from upwords by f. so it is worng.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
729
diff
changeset
|
730 ... | case1 is-sup = record { initial = {!!} ; chain∋init = {!!} ; supf = psupf1 ; chain<A = {!!} |
ddeb107b6f71
bchain can be reached from upwords by f. so it is worng.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
729
diff
changeset
|
731 ; chain⊆A = {!!} ; f-next = {!!} ; f-total = {!!} } where -- x is a sup of (zc ?) |
728 | 732 psupf1 : Ordinal → Ordinal |
733 psupf1 z with trio< z x | |
734 ... | tri< a ¬b ¬c = ZChain.supf (pzc z a) z | |
735 ... | tri≈ ¬a b ¬c = x | |
736 ... | tri> ¬a ¬b c = x | |
727 | 737 ... | case2 ¬x=sup = no-extension -- x is not f y' nor sup of former ZChain from y -- no extention |
553 | 738 |
703 | 739 SZ : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) → {y : Ordinal} (ay : odef A y) → ZChain A f mf ay (& A) |
740 SZ f mf {y} ay = TransFinite {λ z → ZChain A f mf ay z } (λ x → ind f mf ay x ) (& A) | |
608
6655f03984f9
mutual tranfinite in zorn
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
607
diff
changeset
|
741 |
551 | 742 zorn00 : Maximal A |
743 zorn00 with is-o∅ ( & HasMaximal ) -- we have no Level (suc n) LEM | |
744 ... | no not = record { maximal = ODC.minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) ; A∋maximal = zorn01 ; ¬maximal<x = zorn02 } where | |
745 -- yes we have the maximal | |
746 zorn03 : odef HasMaximal ( & ( ODC.minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) ) ) | |
606 | 747 zorn03 = ODC.x∋minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) -- Axiom of choice |
551 | 748 zorn01 : A ∋ ODC.minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) |
749 zorn01 = proj1 zorn03 | |
750 zorn02 : {x : HOD} → A ∋ x → ¬ (ODC.minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) < x) | |
751 zorn02 {x} ax m<x = proj2 zorn03 (& x) ax (subst₂ (λ j k → j < k) (sym *iso) (sym *iso) m<x ) | |
703 | 752 ... | yes ¬Maximal = ⊥-elim ( z04 nmx zorn04 total ) where |
551 | 753 -- if we have no maximal, make ZChain, which contradict SUP condition |
754 nmx : ¬ Maximal A | |
755 nmx mx = ∅< {HasMaximal} zc5 ( ≡o∅→=od∅ ¬Maximal ) where | |
756 zc5 : odef A (& (Maximal.maximal mx)) ∧ (( y : Ordinal ) → odef A y → ¬ (* (& (Maximal.maximal mx)) < * y)) | |
757 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) ) ⟫ | |
703 | 758 zorn04 : ZChain A (cf nmx) (cf-is-≤-monotonic nmx) as0 (& A) |
653 | 759 zorn04 = SZ (cf nmx) (cf-is-≤-monotonic nmx) (subst (λ k → odef A k ) &iso as ) |
634 | 760 total : IsTotalOrderSet (ZChain.chain zorn04) |
654 | 761 total {a} {b} = zorn06 where |
762 zorn06 : odef (ZChain.chain zorn04) (& a) → odef (ZChain.chain zorn04) (& b) → Tri (a < b) (a ≡ b) (b < a) | |
763 zorn06 = ZChain.f-total (SZ (cf nmx) (cf-is-≤-monotonic nmx) (subst (λ k → odef A k ) &iso as) ) | |
551 | 764 |
516 | 765 -- usage (see filter.agda ) |
766 -- | |
497 | 767 -- _⊆'_ : ( A B : HOD ) → Set n |
768 -- _⊆'_ A B = (x : Ordinal ) → odef A x → odef B x | |
482 | 769 |
497 | 770 -- MaximumSubset : {L P : HOD} |
771 -- → o∅ o< & L → o∅ o< & P → P ⊆ L | |
772 -- → IsPartialOrderSet P _⊆'_ | |
773 -- → ( (B : HOD) → B ⊆ P → IsTotalOrderSet B _⊆'_ → SUP P B _⊆'_ ) | |
774 -- → Maximal P (_⊆'_) | |
775 -- MaximumSubset {L} {P} 0<L 0<P P⊆L PO SP = Zorn-lemma {P} {_⊆'_} 0<P PO SP |