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