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