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