Mercurial > hg > Members > kono > Proof > ZF-in-agda
annotate src/zorn.agda @ 831:b91681b604d8
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 22 Aug 2022 11:03:00 +0900 |
parents | 507f6582c31d |
children | e61cbf28ec31 |
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 |
783 | 108 init : {s1 : Ordinal } → odef A s → s ≡ s1 → FClosure A f s s1 |
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 |
783 | 112 A∋fc {A} s f mf (init as refl ) = 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 |
783 | 116 A∋fcs {A} s f mf (init as refl) = as |
714 | 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 |
783 | 120 s≤fc {A} s {.s} f mf (init x refl ) = 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 |
800 | 127 fcn : {A : HOD} (s : Ordinal) { x : Ordinal} {f : Ordinal → Ordinal} → (mf : ≤-monotonic-f A f) → FClosure A f s x → ℕ |
128 fcn s mf (init as refl) = zero | |
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 ) | |
132 | |
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 | |
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 fc06 : {y : Ordinal } { as : odef A s } (eq : s ≡ y ) { j : ℕ } → ¬ suc j ≡ fcn {A} s {y} {f} mf (init as eq ) | |
137 fc06 {x} {y} refl {j} not = fc08 not where | |
138 fc08 : {j : ℕ} → ¬ suc j ≡ 0 | |
139 fc08 () | |
140 fc07 : {x : Ordinal } (cx : FClosure A f s x ) → 0 ≡ fcn s mf cx → * s ≡ * x | |
141 fc07 {x} (init as refl) eq = refl | |
142 fc07 {.(f x)} (fsuc x cx) eq with proj1 (mf x (A∋fc s f mf cx ) ) | |
143 ... | case1 x=fx = subst (λ k → * s ≡ k ) x=fx ( fc07 cx eq ) | |
144 -- ... | case2 x<fx = ? | |
145 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 | |
146 fc00 (suc i) (suc j) x cx (init x₃ x₄) x₁ x₂ = ⊥-elim ( fc06 x₄ x₂ ) | |
147 fc00 (suc i) (suc j) x (init x₃ x₄) (fsuc x₅ cy) x₁ x₂ = ⊥-elim ( fc06 x₄ x₁ ) | |
148 fc00 zero zero refl (init _ refl) (init x₁ refl) i=x i=y = refl | |
149 fc00 zero zero refl (init as refl) (fsuc y cy) i=x i=y with proj1 (mf y (A∋fc s f mf cy ) ) | |
150 ... | case1 y=fy = subst (λ k → * s ≡ k ) y=fy (fc07 cy i=y) -- ( fc00 zero zero refl (init as refl) cy i=x i=y ) | |
151 fc00 zero zero refl (fsuc x cx) (init as refl) i=x i=y with proj1 (mf x (A∋fc s f mf cx ) ) | |
152 ... | case1 x=fx = subst (λ k → k ≡ * s ) x=fx (sym (fc07 cx i=x)) -- ( fc00 zero zero refl cx (init as refl) i=x i=y ) | |
153 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 ) ) | |
154 ... | 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 ) | |
155 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 ) ) | |
156 ... | 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 ) | |
157 ... | case1 x=fx | case2 y<fy = subst (λ k → k ≡ * (f y)) x=fx (fc02 x cx i=x) where | |
158 fc02 : (x1 : Ordinal) → (cx1 : FClosure A f s x1 ) → suc i ≡ fcn s mf cx1 → * x1 ≡ * (f y) | |
159 fc02 x1 (init x₁ x₂) x = ⊥-elim (fc06 x₂ x) | |
160 fc02 .(f x1) (fsuc x1 cx1) i=x1 with proj1 (mf x1 (A∋fc s f mf cx1 ) ) | |
161 ... | case1 eq = trans (sym eq) ( fc02 x1 cx1 i=x1 ) -- derefence while f x ≡ x | |
162 ... | case2 lt = subst₂ (λ j k → * (f j) ≡ * (f k )) &iso &iso ( cong (λ k → * ( f (& k ))) fc04) where | |
163 fc04 : * x1 ≡ * y | |
164 fc04 = fc00 i j (cong pred i=j) cx1 cy (cong pred i=x1) (cong pred j=y) | |
165 ... | case2 x<fx | case1 y=fy = subst (λ k → * (f x) ≡ k ) y=fy (fc03 y cy j=y) where | |
166 fc03 : (y1 : Ordinal) → (cy1 : FClosure A f s y1 ) → suc j ≡ fcn s mf cy1 → * (f x) ≡ * y1 | |
167 fc03 y1 (init x₁ x₂) x = ⊥-elim (fc06 x₂ x) | |
168 fc03 .(f y1) (fsuc y1 cy1) j=y1 with proj1 (mf y1 (A∋fc s f mf cy1 ) ) | |
169 ... | case1 eq = trans ( fc03 y1 cy1 j=y1 ) eq | |
170 ... | case2 lt = subst₂ (λ j k → * (f j) ≡ * (f k )) &iso &iso ( cong (λ k → * ( f (& k ))) fc05) where | |
171 fc05 : * x ≡ * y1 | |
172 fc05 = fc00 i j (cong pred i=j) cx cy1 (cong pred i=x) (cong pred j=y1) | |
173 ... | 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))) | |
174 | |
175 | |
176 fcn-< : {A : HOD} (s : Ordinal ) { x y : Ordinal} {f : Ordinal → Ordinal} → (mf : ≤-monotonic-f A f) | |
177 → (cx : FClosure A f s x ) (cy : FClosure A f s y ) → fcn s mf cx Data.Nat.< fcn s mf cy → * x < * y | |
178 fcn-< {A} s {x} {y} {f} mf cx cy x<y = fc01 (fcn s mf cy) cx cy refl x<y where | |
179 fc06 : {y : Ordinal } { as : odef A s } (eq : s ≡ y ) { j : ℕ } → ¬ suc j ≡ fcn {A} s {y} {f} mf (init as eq ) | |
180 fc06 {x} {y} refl {j} not = fc08 not where | |
181 fc08 : {j : ℕ} → ¬ suc j ≡ 0 | |
182 fc08 () | |
183 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 | |
184 fc01 (suc i) cx (init x₁ x₂) x (s≤s x₃) = ⊥-elim (fc06 x₂ x) | |
185 fc01 (suc i) {y} cx (fsuc y1 cy) i=y (s≤s x<i) with proj1 (mf y1 (A∋fc s f mf cy ) ) | |
186 ... | case1 y=fy = subst (λ k → * x < k ) y=fy ( fc01 (suc i) {y1} cx cy i=y (s≤s x<i) ) | |
187 ... | case2 y<fy with <-cmp (fcn s mf cx ) i | |
188 ... | tri> ¬a ¬b c = ⊥-elim ( nat-≤> x<i c ) | |
189 ... | tri≈ ¬a b ¬c = subst (λ k → k < * (f y1) ) (fcn-inject s mf cy cx (sym (trans b (cong pred i=y) ))) y<fy | |
190 ... | tri< a ¬b ¬c = IsStrictPartialOrder.trans PO fc02 y<fy where | |
191 fc03 : suc i ≡ suc (fcn s mf cy) → i ≡ fcn s mf cy | |
192 fc03 eq = cong pred eq | |
193 fc02 : * x < * y1 | |
194 fc02 = fc01 i cx cy (fc03 i=y ) a | |
195 | |
557 | 196 |
559 | 197 fcn-cmp : {A : HOD} (s : Ordinal) { x y : Ordinal } (f : Ordinal → Ordinal) (mf : ≤-monotonic-f A f) |
554 | 198 → (cx : FClosure A f s x) → (cy : FClosure A f s y ) → Tri (* x < * y) (* x ≡ * y) (* y < * x ) |
800 | 199 fcn-cmp {A} s {x} {y} f mf cx cy with <-cmp ( fcn s mf cx ) (fcn s mf cy ) |
200 ... | tri< a ¬b ¬c = tri< fc11 (λ eq → <-irr (case1 (sym eq)) fc11) (λ lt → <-irr (case2 fc11) lt) where | |
201 fc11 : * x < * y | |
202 fc11 = fcn-< {A} s {x} {y} {f} mf cx cy a | |
203 ... | tri≈ ¬a b ¬c = tri≈ (λ lt → <-irr (case1 (sym fc10)) lt) fc10 (λ lt → <-irr (case1 fc10) lt) where | |
204 fc10 : * x ≡ * y | |
205 fc10 = fcn-inject {A} s {x} {y} {f} mf cx cy b | |
206 ... | tri> ¬a ¬b c = tri> (λ lt → <-irr (case2 fc12) lt) (λ eq → <-irr (case1 eq) fc12) fc12 where | |
207 fc12 : * y < * x | |
208 fc12 = fcn-< {A} s {y} {x} {f} mf cy cx c | |
600 | 209 |
563 | 210 |
729 | 211 |
560 | 212 -- open import Relation.Binary.Properties.Poset as Poset |
213 | |
214 IsTotalOrderSet : ( A : HOD ) → Set (Level.suc n) | |
215 IsTotalOrderSet A = {a b : HOD} → odef A (& a) → odef A (& b) → Tri (a < b) (a ≡ b) (b < a ) | |
216 | |
567 | 217 ⊆-IsTotalOrderSet : { A B : HOD } → B ⊆ A → IsTotalOrderSet A → IsTotalOrderSet B |
568 | 218 ⊆-IsTotalOrderSet {A} {B} B⊆A T ax ay = T (incl B⊆A ax) (incl B⊆A ay) |
567 | 219 |
568 | 220 _⊆'_ : ( A B : HOD ) → Set n |
221 _⊆'_ A B = {x : Ordinal } → odef A x → odef B x | |
560 | 222 |
223 -- | |
224 -- inductive maxmum tree from x | |
225 -- tree structure | |
226 -- | |
554 | 227 |
567 | 228 record HasPrev (A B : HOD) {x : Ordinal } (xa : odef A x) ( f : Ordinal → Ordinal ) : Set n where |
533 | 229 field |
534 | 230 y : Ordinal |
541 | 231 ay : odef B y |
534 | 232 x=fy : x ≡ f y |
529 | 233 |
570 | 234 record IsSup (A B : HOD) {x : Ordinal } (xa : odef A x) : Set n where |
654 | 235 field |
779 | 236 x<sup : {y : Ordinal} → odef B y → (y ≡ x ) ∨ (y << x ) |
568 | 237 |
656 | 238 record SUP ( A B : HOD ) : Set (Level.suc n) where |
239 field | |
240 sup : HOD | |
804 | 241 as : A ∋ sup |
656 | 242 x<sup : {x : HOD} → B ∋ x → (x ≡ sup ) ∨ (x < sup ) -- B is Total, use positive |
243 | |
690 | 244 -- |
245 -- sup and its fclosure is in a chain HOD | |
246 -- chain HOD is sorted by sup as Ordinal and <-ordered | |
247 -- whole chain is a union of separated Chain | |
803 | 248 -- minimum index is sup of y not ϕ |
690 | 249 -- |
250 | |
787 | 251 record ChainP (A : HOD ) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) {y : Ordinal} (ay : odef A y) (supf : Ordinal → Ordinal) (u : Ordinal) : Set n where |
690 | 252 field |
765 | 253 fcy<sup : {z : Ordinal } → FClosure A f y z → (z ≡ supf u) ∨ ( z << supf u ) |
828 | 254 order : {s z1 : Ordinal} → (lt : supf s o< supf u ) → FClosure A f (supf s ) z1 → (z1 ≡ supf u ) ∨ ( z1 << supf u ) |
255 supu=u : supf u ≡ u | |
694 | 256 |
748 | 257 data UChain ( A : HOD ) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) {y : Ordinal } (ay : odef A y ) |
258 (supf : Ordinal → Ordinal) (x : Ordinal) : (z : Ordinal) → Set n where | |
259 ch-init : {z : Ordinal } (fc : FClosure A f y z) → UChain A f mf ay supf x z | |
791 | 260 ch-is-sup : (u : Ordinal) {z : Ordinal } (u≤x : u o≤ x) ( is-sup : ChainP A f mf ay supf u ) |
748 | 261 ( fc : FClosure A f (supf u) z ) → UChain A f mf ay supf x z |
694 | 262 |
263 ∈∧P→o< : {A : HOD } {y : Ordinal} → {P : Set n} → odef A y ∧ P → y o< & A | |
264 ∈∧P→o< {A } {y} p = subst (λ k → k o< & A) &iso ( c<→o< (subst (λ k → odef A k ) (sym &iso ) (proj1 p ))) | |
265 | |
803 | 266 -- Union of supf z which o< x |
267 -- | |
694 | 268 UnionCF : ( A : HOD ) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) {y : Ordinal } (ay : odef A y ) |
269 ( supf : Ordinal → Ordinal ) ( x : Ordinal ) → HOD | |
270 UnionCF A f mf ay supf x | |
271 = 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 | 272 |
703 | 273 record ZChain ( A : HOD ) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) |
783 | 274 {y : Ordinal} (ay : odef A y) ( z : Ordinal ) : Set (Level.suc n) where |
655 | 275 field |
694 | 276 supf : Ordinal → Ordinal |
608
6655f03984f9
mutual tranfinite in zorn
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
607
diff
changeset
|
277 chain : HOD |
703 | 278 chain = UnionCF A f mf ay supf z |
568 | 279 field |
280 chain⊆A : chain ⊆' A | |
783 | 281 chain∋init : odef chain y |
282 initial : {z : Ordinal } → odef chain z → * y ≤ * z | |
568 | 283 f-next : {a : Ordinal } → odef chain a → odef chain (f a) |
654 | 284 f-total : IsTotalOrderSet chain |
756 | 285 |
813 | 286 sup : {x : Ordinal } → x o< z → SUP A (UnionCF A f mf ay supf x) |
817 | 287 sup=u : {b : Ordinal} → (ab : odef A b) → b o≤ z → IsSup A (UnionCF A f mf ay supf b) ab → supf b ≡ b |
822 | 288 supf-is-sup : {x : Ordinal } → (x≤z : x o< z) → supf x ≡ & (SUP.sup (sup x≤z) ) |
825 | 289 supf-mono : {x y : Ordinal } → x o≤ y → supf x o≤ supf y |
828 | 290 csupf : {b : Ordinal } → b o≤ z → odef (UnionCF A f mf ay supf (supf b)) (supf b) |
825 | 291 supf-inject : {x y : Ordinal } → supf x o< supf y → x o< y |
292 supf-inject {x} {y} sx<sy with trio< x y | |
293 ... | tri< a ¬b ¬c = a | |
294 ... | tri≈ ¬a refl ¬c = ⊥-elim ( o<¬≡ (cong supf refl) sx<sy ) | |
295 ... | tri> ¬a ¬b y<x with osuc-≡< (supf-mono (o<→≤ y<x) ) | |
296 ... | case1 eq = ⊥-elim ( o<¬≡ (sym eq) sx<sy ) | |
297 ... | case2 lt = ⊥-elim ( o<> sx<sy lt ) | |
798 | 298 |
803 | 299 -- ordering is proved here for totality and sup |
300 | |
813 | 301 fcy<sup : {u w : Ordinal } → u o< z → FClosure A f y w → (w ≡ supf u ) ∨ ( w << supf u ) -- different from order because y o< supf |
302 fcy<sup {u} {w} u<z fc with SUP.x<sup (sup u<z) ⟪ subst (λ k → odef A k ) (sym &iso) (A∋fc {A} y f mf fc) | |
798 | 303 , ch-init (subst (λ k → FClosure A f y k) (sym &iso) fc ) ⟫ |
813 | 304 ... | case1 eq = case1 (subst (λ k → k ≡ supf u ) &iso (trans (cong (&) eq) (sym (supf-is-sup u<z ) ) )) |
305 ... | case2 lt = case2 (subst (λ k → * w < k ) (subst (λ k → k ≡ _ ) *iso (cong (*) (sym (supf-is-sup u<z ))) ) lt ) | |
825 | 306 |
831 | 307 csupf-fc : {b s z1 : Ordinal} → b o≤ z → supf s o≤ supf b → FClosure A f (supf s) z1 → UnionCF A f mf ay supf b ∋ * z1 |
308 csupf-fc {b} {s} {z1} b≤z ss≤sb (init x refl ) with osuc-≡< ss≤sb | |
309 ... | case1 eq = subst (λ k → odef (UnionCF A f mf ay supf b) k ) (sym &iso) zc05 where | |
310 zc04 : odef (UnionCF A f mf ay supf (supf s)) (supf s) | |
311 zc04 = subst (λ k → odef (UnionCF A f mf ay supf k) k) (sym eq) ( csupf b≤z ) | |
312 zc05 : odef (UnionCF A f mf ay supf b) (supf s) | |
313 zc05 with zc04 | |
314 ... | ⟪ as , ch-init fc ⟫ = ⟪ as , ch-init fc ⟫ | |
315 ... | ⟪ as , ch-is-sup u u≤x is-sup fc ⟫ = zc09 u≤x where | |
316 zc06 : supf u ≡ u | |
317 zc06 = ChainP.supu=u is-sup | |
318 zc09 : u o≤ supf s → odef (UnionCF A f mf ay supf b) (supf s) | |
319 zc09 u≤ss with osuc-≡< (subst (λ k → k o≤ supf s) (sym zc06) u≤ss) | |
320 ... | case1 su=ss = zc08 where | |
321 zc07 : supf u o≤ supf b | |
322 zc07 = subst₂ (λ j k → j o≤ k) (sym zc06) eq u≤ss | |
323 zc08 : odef (UnionCF A f mf ay supf b) (supf s) | |
324 zc08 with osuc-≡< zc07 | |
325 ... | case2 lt = ⟪ as , ch-is-sup u (o<→≤ (supf-inject lt )) is-sup fc ⟫ | |
326 ... | case1 su=sb with trio< u b | |
327 ... | tri< u<b ¬b ¬c = ? | |
328 ... | tri≈ ¬a u=b ¬c = ? | |
329 ... | tri> ¬a ¬b b<u = ⟪ ? , ch-is-sup (supf b) ? ? ? ⟫ | |
330 ... | case2 lt = ⟪ as , ch-is-sup u (o<→≤ (supf-inject (subst (λ k → supf u o< k) eq lt ))) is-sup fc ⟫ | |
331 ... | case2 ss<sb = subst (λ k → odef (UnionCF A f mf ay supf b) k ) (sym &iso) zc05 where | |
828 | 332 s<b : s o< b |
333 s<b = supf-inject ss<sb | |
830 | 334 s≤<z : s o≤ z |
831 | 335 s≤<z = ordtrans s<b b≤z |
825 | 336 zc04 : odef (UnionCF A f mf ay supf (supf s)) (supf s) |
830 | 337 zc04 = csupf s≤<z |
825 | 338 zc05 : odef (UnionCF A f mf ay supf b) (supf s) |
339 zc05 with zc04 | |
340 ... | ⟪ as , ch-init fc ⟫ = ⟪ as , ch-init fc ⟫ | |
828 | 341 ... | ⟪ as , ch-is-sup u u≤x is-sup fc ⟫ = ⟪ as , ch-is-sup u (zc09 u≤x ) is-sup fc ⟫ where |
825 | 342 zc06 : supf u ≡ u |
828 | 343 zc06 = ChainP.supu=u is-sup |
344 zc09 : u o≤ supf s → u o≤ b | |
826 | 345 zc09 u<s with osuc-≡< (subst (λ k → k o≤ supf s) (sym zc06) u<s) |
346 ... | case1 su=ss = zc08 where | |
825 | 347 zc07 : supf u o≤ supf b |
348 zc07 = subst (λ k → k o≤ supf b) (sym su=ss) (supf-mono (o<→≤ s<b) ) | |
828 | 349 zc08 : u o≤ b |
825 | 350 zc08 with osuc-≡< zc07 |
829 | 351 ... | case1 su=sb = ⊥-elim ( o<¬≡ (trans (sym su=ss) su=sb ) ss<sb ) |
828 | 352 ... | case2 lt = o<→≤ (supf-inject lt ) |
353 ... | case2 lt = o<→≤ (ordtrans (supf-inject lt) s<b) | |
831 | 354 csupf-fc {b} {s} {z1} b<z ss≤sb (fsuc x fc) = subst (λ k → odef (UnionCF A f mf ay supf b) k ) (sym &iso) zc04 where |
785 | 355 zc04 : odef (UnionCF A f mf ay supf b) (f x) |
831 | 356 zc04 with subst (λ k → odef (UnionCF A f mf ay supf b) k ) &iso (csupf-fc b<z ss≤sb fc ) |
785 | 357 ... | ⟪ as , ch-init fc ⟫ = ⟪ proj2 (mf _ as) , ch-init (fsuc _ fc) ⟫ |
791 | 358 ... | ⟪ as , ch-is-sup u u≤x is-sup fc ⟫ = ⟪ proj2 (mf _ as) , ch-is-sup u u≤x is-sup (fsuc _ fc) ⟫ |
831 | 359 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) |
360 order {b} {s} {z1} b<z ss≤sb fc = zc04 where | |
813 | 361 zc00 : ( * z1 ≡ SUP.sup (sup b<z )) ∨ ( * z1 < SUP.sup ( sup b<z ) ) |
831 | 362 zc00 = SUP.x<sup (sup b<z) (csupf-fc (o<→≤ b<z) ss≤sb fc ) |
797 | 363 zc04 : (z1 ≡ supf b) ∨ (z1 << supf b) |
364 zc04 with zc00 | |
813 | 365 ... | case1 eq = case1 (subst₂ (λ j k → j ≡ k ) &iso (sym (supf-is-sup b<z) ) (cong (&) eq) ) |
366 ... | case2 lt = case2 (subst₂ (λ j k → j < k ) refl (subst₂ (λ j k → j ≡ k ) *iso refl (cong (*) (sym (supf-is-sup b<z ) ))) lt ) | |
756 | 367 |
728 | 368 record ZChain1 ( A : HOD ) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) |
783 | 369 {y : Ordinal} (ay : odef A y) (zc : ZChain A f mf ay (& A)) ( z : Ordinal ) : Set (Level.suc n) where |
728 | 370 field |
371 is-max : {a b : Ordinal } → (ca : odef (UnionCF A f mf ay (ZChain.supf zc) z) a ) → b o< z → (ab : odef A b) | |
372 → 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 | |
373 → * a < * b → odef ((UnionCF A f mf ay (ZChain.supf zc) z)) b | |
374 | |
568 | 375 record Maximal ( A : HOD ) : Set (Level.suc n) where |
376 field | |
377 maximal : HOD | |
804 | 378 as : A ∋ maximal |
568 | 379 ¬maximal<x : {x : HOD} → A ∋ x → ¬ maximal < x -- A is Partial, use negative |
567 | 380 |
748 | 381 -- data UChain is total |
684
822fce8af579
no transfinite on data Chain trichotomos
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
683
diff
changeset
|
382 |
694 | 383 chain-total : (A : HOD ) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) {y : Ordinal} (ay : odef A y) (supf : Ordinal → Ordinal ) |
748 | 384 {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 | 385 chain-total A f mf {y} ay supf {xa} {xb} {a} {b} ca cb = ct-ind xa xb ca cb where |
748 | 386 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) |
387 ct-ind xa xb {a} {b} (ch-init fca) (ch-init fcb) = fcn-cmp y f mf fca fcb | |
791 | 388 ct-ind xa xb {a} {b} (ch-init fca) (ch-is-sup ub u≤x supb fcb) with ChainP.fcy<sup supb fca |
766 | 389 ... | case1 eq with s≤fc (supf ub) f mf fcb |
390 ... | case1 eq1 = tri≈ (λ lt → ⊥-elim (<-irr (case1 (sym ct00)) lt)) ct00 (λ lt → ⊥-elim (<-irr (case1 ct00) lt)) where | |
391 ct00 : * a ≡ * b | |
392 ct00 = trans (cong (*) eq) eq1 | |
765 | 393 ... | case2 lt = tri< ct01 (λ eq → <-irr (case1 (sym eq)) ct01) (λ lt → <-irr (case2 ct01) lt) where |
766 | 394 ct01 : * a < * b |
395 ct01 = subst (λ k → * k < * b ) (sym eq) lt | |
791 | 396 ct-ind xa xb {a} {b} (ch-init fca) (ch-is-sup ub u≤x supb fcb) | case2 lt = tri< ct01 (λ eq → <-irr (case1 (sym eq)) ct01) (λ lt → <-irr (case2 ct01) lt) where |
748 | 397 ct00 : * a < * (supf ub) |
765 | 398 ct00 = lt |
689
34650e39e553
Chain is not strictly positive
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
688
diff
changeset
|
399 ct01 : * a < * b |
748 | 400 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
|
401 ... | 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
|
402 ... | case2 lt = IsStrictPartialOrder.trans POO ct00 lt |
791 | 403 ct-ind xa xb {a} {b} (ch-is-sup ua u≤x supa fca) (ch-init fcb) with ChainP.fcy<sup supa fcb |
766 | 404 ... | case1 eq with s≤fc (supf ua) f mf fca |
405 ... | case1 eq1 = tri≈ (λ lt → ⊥-elim (<-irr (case1 (sym ct00)) lt)) ct00 (λ lt → ⊥-elim (<-irr (case1 ct00) lt)) where | |
406 ct00 : * a ≡ * b | |
407 ct00 = sym (trans (cong (*) eq) eq1 ) | |
765 | 408 ... | case2 lt = tri> (λ lt → <-irr (case2 ct01) lt) (λ eq → <-irr (case1 eq) ct01) ct01 where |
766 | 409 ct01 : * b < * a |
410 ct01 = subst (λ k → * k < * a ) (sym eq) lt | |
791 | 411 ct-ind xa xb {a} {b} (ch-is-sup ua u≤x supa fca) (ch-init fcb) | case2 lt = tri> (λ lt → <-irr (case2 ct01) lt) (λ eq → <-irr (case1 eq) ct01) ct01 where |
749 | 412 ct00 : * b < * (supf ua) |
765 | 413 ct00 = lt |
689
34650e39e553
Chain is not strictly positive
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
688
diff
changeset
|
414 ct01 : * b < * a |
749 | 415 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
|
416 ... | 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
|
417 ... | case2 lt = IsStrictPartialOrder.trans POO ct00 lt |
800 | 418 ct-ind xa xb {a} {b} (ch-is-sup ua ua<x supa fca) (ch-is-sup ub ub<x supb fcb) with trio< ua ub |
829 | 419 ... | tri< a₁ ¬b ¬c with ChainP.order supb (subst₂ (λ j k → j o< k ) (sym (ChainP.supu=u supa )) (sym (ChainP.supu=u supb )) a₁) fca |
766 | 420 ... | case1 eq with s≤fc (supf ub) f mf fcb |
421 ... | case1 eq1 = tri≈ (λ lt → ⊥-elim (<-irr (case1 (sym ct00)) lt)) ct00 (λ lt → ⊥-elim (<-irr (case1 ct00) lt)) where | |
422 ct00 : * a ≡ * b | |
423 ct00 = trans (cong (*) eq) eq1 | |
424 ... | case2 lt = tri< ct02 (λ eq → <-irr (case1 (sym eq)) ct02) (λ lt → <-irr (case2 ct02) lt) where | |
425 ct02 : * a < * b | |
426 ct02 = subst (λ k → * k < * b ) (sym eq) lt | |
788 | 427 ct-ind xa xb {a} {b} (ch-is-sup ua ua<x supa fca) (ch-is-sup ub ub<x supb fcb) | tri< a₁ ¬b ¬c | case2 lt = tri< ct02 (λ eq → <-irr (case1 (sym eq)) ct02) (λ lt → <-irr (case2 ct02) lt) where |
748 | 428 ct03 : * a < * (supf ub) |
765 | 429 ct03 = lt |
689
34650e39e553
Chain is not strictly positive
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
688
diff
changeset
|
430 ct02 : * a < * b |
748 | 431 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
|
432 ... | 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
|
433 ... | case2 lt = IsStrictPartialOrder.trans POO ct03 lt |
788 | 434 ct-ind xa xb {a} {b} (ch-is-sup ua ua<x supa fca) (ch-is-sup ub ub<x supb fcb) | tri≈ ¬a eq ¬c |
800 | 435 = fcn-cmp (supf ua) f mf fca (subst (λ k → FClosure A f k b ) (cong supf (sym eq)) fcb ) |
829 | 436 ct-ind xa xb {a} {b} (ch-is-sup ua ua<x supa fca) (ch-is-sup ub ub<x supb fcb) | tri> ¬a ¬b c with ChainP.order supa (subst₂ (λ j k → j o< k ) (sym (ChainP.supu=u supb )) (sym (ChainP.supu=u supa )) c) fcb |
766 | 437 ... | case1 eq with s≤fc (supf ua) f mf fca |
438 ... | case1 eq1 = tri≈ (λ lt → ⊥-elim (<-irr (case1 (sym ct00)) lt)) ct00 (λ lt → ⊥-elim (<-irr (case1 ct00) lt)) where | |
439 ct00 : * a ≡ * b | |
440 ct00 = sym (trans (cong (*) eq) eq1) | |
441 ... | case2 lt = tri> (λ lt → <-irr (case2 ct02) lt) (λ eq → <-irr (case1 eq) ct02) ct02 where | |
442 ct02 : * b < * a | |
443 ct02 = subst (λ k → * k < * a ) (sym eq) lt | |
788 | 444 ct-ind xa xb {a} {b} (ch-is-sup ua ua<x supa fca) (ch-is-sup ub ub<x supb fcb) | tri> ¬a ¬b c | case2 lt = tri> (λ lt → <-irr (case2 ct04) lt) (λ eq → <-irr (case1 (eq)) ct04) ct04 where |
749 | 445 ct05 : * b < * (supf ua) |
765 | 446 ct05 = lt |
689
34650e39e553
Chain is not strictly positive
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
688
diff
changeset
|
447 ct04 : * b < * a |
749 | 448 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
|
449 ... | 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
|
450 ... | 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
|
451 |
743 | 452 init-uchain : (A : HOD) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) {y : Ordinal } → (ay : odef A y ) |
453 { supf : Ordinal → Ordinal } { x : Ordinal } → odef (UnionCF A f mf ay supf x) y | |
783 | 454 init-uchain A f mf ay = ⟪ ay , ch-init (init ay refl) ⟫ |
743 | 455 |
497 | 456 Zorn-lemma : { A : HOD } |
464 | 457 → o∅ o< & A |
568 | 458 → ( ( B : HOD) → (B⊆A : B ⊆' A) → IsTotalOrderSet B → SUP A B ) -- SUP condition |
497 | 459 → Maximal A |
552 | 460 Zorn-lemma {A} 0<A supP = zorn00 where |
571 | 461 <-irr0 : {a b : HOD} → A ∋ a → A ∋ b → (a ≡ b ) ∨ (a < b ) → b < a → ⊥ |
462 <-irr0 {a} {b} A∋a A∋b = <-irr | |
788 | 463 z07 : {y : Ordinal} {A : HOD } → {P : Set n} → odef A y ∧ P → y o< & A |
464 z07 {y} {A} p = subst (λ k → k o< & A) &iso ( c<→o< (subst (λ k → odef A k ) (sym &iso ) (proj1 p ))) | |
760 | 465 z09 : {b : Ordinal } { A : HOD } → odef A b → b o< & A |
466 z09 {b} {A} ab = subst (λ k → k o< & A) &iso ( c<→o< (subst (λ k → odef A k ) (sym &iso ) ab)) | |
530 | 467 s : HOD |
468 s = ODC.minimal O A (λ eq → ¬x<0 ( subst (λ k → o∅ o< k ) (=od∅→≡o∅ eq) 0<A )) | |
568 | 469 as : A ∋ * ( & s ) |
470 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
|
471 as0 : odef A (& s ) |
6655f03984f9
mutual tranfinite in zorn
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
607
diff
changeset
|
472 as0 = subst (λ k → odef A k ) &iso as |
547 | 473 s<A : & s o< & A |
568 | 474 s<A = c<→o< (subst (λ k → odef A (& k) ) *iso as ) |
530 | 475 HasMaximal : HOD |
537 | 476 HasMaximal = record { od = record { def = λ x → odef A x ∧ ( (m : Ordinal) → odef A m → ¬ (* x < * m)) } ; odmax = & A ; <odmax = z07 } |
477 no-maximum : HasMaximal =h= od∅ → (x : Ordinal) → odef A x ∧ ((m : Ordinal) → odef A m → odef A x ∧ (¬ (* x < * m) )) → ⊥ | |
478 no-maximum nomx x P = ¬x<0 (eq→ nomx {x} ⟪ proj1 P , (λ m ma p → proj2 ( proj2 P m ma ) p ) ⟫ ) | |
532 | 479 Gtx : { x : HOD} → A ∋ x → HOD |
537 | 480 Gtx {x} ax = record { od = record { def = λ y → odef A y ∧ (x < (* y)) } ; odmax = & A ; <odmax = z07 } |
481 z08 : ¬ Maximal A → HasMaximal =h= od∅ | |
804 | 482 z08 nmx = record { eq→ = λ {x} lt → ⊥-elim ( nmx record {maximal = * x ; as = subst (λ k → odef A k) (sym &iso) (proj1 lt) |
537 | 483 ; ¬maximal<x = λ {y} ay → subst (λ k → ¬ (* x < k)) *iso (proj2 lt (& y) ay) } ) ; eq← = λ {y} lt → ⊥-elim ( ¬x<0 lt )} |
484 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)) | |
485 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 | |
486 ¬x<m : ¬ (* x < * m) | |
487 ¬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 | 488 |
560 | 489 -- Uncountable ascending chain by axiom of choice |
530 | 490 cf : ¬ Maximal A → Ordinal → Ordinal |
532 | 491 cf nmx x with ODC.∋-p O A (* x) |
492 ... | no _ = o∅ | |
493 ... | yes ax with is-o∅ (& ( Gtx ax )) | |
538 | 494 ... | yes nogt = -- no larger element, so it is maximal |
495 ⊥-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 | 496 ... | no not = & (ODC.minimal O (Gtx ax) (λ eq → not (=od∅→≡o∅ eq))) |
537 | 497 is-cf : (nmx : ¬ Maximal A ) → {x : Ordinal} → odef A x → odef A (cf nmx x) ∧ ( * x < * (cf nmx x) ) |
498 is-cf nmx {x} ax with ODC.∋-p O A (* x) | |
499 ... | no not = ⊥-elim ( not (subst (λ k → odef A k ) (sym &iso) ax )) | |
500 ... | yes ax with is-o∅ (& ( Gtx ax )) | |
501 ... | 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 ⟫ ) | |
502 ... | no not = ODC.x∋minimal O (Gtx ax) (λ eq → not (=od∅→≡o∅ eq)) | |
606 | 503 |
504 --- | |
505 --- infintie ascention sequence of f | |
506 --- | |
530 | 507 cf-is-<-monotonic : (nmx : ¬ Maximal A ) → (x : Ordinal) → odef A x → ( * x < * (cf nmx x) ) ∧ odef A (cf nmx x ) |
537 | 508 cf-is-<-monotonic nmx x ax = ⟪ proj2 (is-cf nmx ax ) , proj1 (is-cf nmx ax ) ⟫ |
530 | 509 cf-is-≤-monotonic : (nmx : ¬ Maximal A ) → ≤-monotonic-f A ( cf nmx ) |
532 | 510 cf-is-≤-monotonic nmx x ax = ⟪ case2 (proj1 ( cf-is-<-monotonic nmx x ax )) , proj2 ( cf-is-<-monotonic nmx x ax ) ⟫ |
543 | 511 |
793 | 512 chain-mono : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) (supf : Ordinal → Ordinal ) |
513 {a b c : Ordinal} → a o≤ b | |
514 → odef (UnionCF A f mf ay supf a) c → odef (UnionCF A f mf ay supf b) c | |
515 chain-mono f mf ay supf {a} {b} {c} a≤b ⟪ ua , ch-init fc ⟫ = | |
516 ⟪ ua , ch-init fc ⟫ | |
517 chain-mono f mf ay supf {a} {b} {c} a≤b ⟪ uaa , ch-is-sup ua ua<x is-sup fc ⟫ = | |
518 ⟪ uaa , ch-is-sup ua (ordtrans<-≤ ua<x (osucc a≤b )) is-sup fc ⟫ | |
519 | |
703 | 520 sp0 : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) (zc : ZChain A f mf as0 (& A) ) |
653 | 521 (total : IsTotalOrderSet (ZChain.chain zc) ) → SUP A (ZChain.chain zc) |
703 | 522 sp0 f mf zc total = supP (ZChain.chain zc) (ZChain.chain⊆A zc) total |
543 | 523 zc< : {x y z : Ordinal} → {P : Set n} → (x o< y → P) → x o< z → z o< y → P |
524 zc< {x} {y} {z} {P} prev x<z z<y = prev (ordtrans x<z z<y) | |
525 | |
803 | 526 -- |
527 -- Second TransFinite Pass for maximality | |
528 -- | |
529 | |
793 | 530 SZ1 : ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) |
728 | 531 {init : Ordinal} (ay : odef A init) (zc : ZChain A f mf ay (& A)) (x : Ordinal) → ZChain1 A f mf ay zc x |
793 | 532 SZ1 f mf {y} ay zc x = TransFinite { λ x → ZChain1 A f mf ay zc x } zc1 x where |
533 chain-mono1 : {a b c : Ordinal} → a o≤ b | |
788 | 534 → odef (UnionCF A f mf ay (ZChain.supf zc) a) c → odef (UnionCF A f mf ay (ZChain.supf zc) b) c |
793 | 535 chain-mono1 {a} {b} {c} a≤b = chain-mono f mf ay (ZChain.supf zc) a≤b |
735 | 536 is-max-hp : (x : Ordinal) {a : Ordinal} {b : Ordinal} → odef (UnionCF A f mf ay (ZChain.supf zc) x) a → |
537 b o< x → (ab : odef A b) → | |
538 HasPrev A (UnionCF A f mf ay (ZChain.supf zc) x) ab f → | |
539 * a < * b → odef (UnionCF A f mf ay (ZChain.supf zc) x) b | |
749 | 540 is-max-hp x {a} {b} ua b<x ab has-prev a<b with HasPrev.ay has-prev |
541 ... | ⟪ ab0 , ch-init fc ⟫ = ⟪ ab , ch-init ( subst (λ k → FClosure A f y k) (sym (HasPrev.x=fy has-prev)) (fsuc _ fc )) ⟫ | |
791 | 542 ... | ⟪ ab0 , ch-is-sup u u≤x is-sup fc ⟫ = ⟪ ab , |
749 | 543 subst (λ k → UChain A f mf ay (ZChain.supf zc) x k ) |
791 | 544 (sym (HasPrev.x=fy has-prev)) ( ch-is-sup u u≤x is-sup (fsuc _ fc)) ⟫ |
728 | 545 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
|
546 zc1 x prev with Oprev-p x |
756 | 547 ... | 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
|
548 px = Oprev.oprev op |
789 | 549 zc-b<x : {b : Ordinal } → b o< x → b o< osuc px |
550 zc-b<x {b} lt = subst (λ k → b o< k ) (sym (Oprev.oprev=x op)) lt | |
728 | 551 is-max : {a : Ordinal} {b : Ordinal} → odef (UnionCF A f mf ay (ZChain.supf zc) x) a → |
552 b o< x → (ab : odef A b) → | |
553 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 → | |
554 * a < * b → odef (UnionCF A f mf ay (ZChain.supf zc) x) b | |
735 | 555 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 |
790
201b66da4e69
remove unnesesary part in SZ1 the second TransFinite induction for is-max
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
789
diff
changeset
|
556 is-max {a} {b} ua b<x ab (case2 is-sup) a<b |
201b66da4e69
remove unnesesary part in SZ1 the second TransFinite induction for is-max
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
789
diff
changeset
|
557 = ⟪ ab , ch-is-sup b (o<→≤ b<x) m06 (subst (λ k → FClosure A f k b) m05 (init ab refl)) ⟫ where |
201b66da4e69
remove unnesesary part in SZ1 the second TransFinite induction for is-max
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
789
diff
changeset
|
558 b<A : b o< & A |
201b66da4e69
remove unnesesary part in SZ1 the second TransFinite induction for is-max
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
789
diff
changeset
|
559 b<A = z09 ab |
201b66da4e69
remove unnesesary part in SZ1 the second TransFinite induction for is-max
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
789
diff
changeset
|
560 m05 : b ≡ ZChain.supf zc b |
814 | 561 m05 = sym ( ZChain.sup=u zc ab (o<→≤ (z09 ab) ) |
817 | 562 record { x<sup = λ {z} uz → IsSup.x<sup is-sup (chain-mono1 (o<→≤ b<x) uz ) } ) |
790
201b66da4e69
remove unnesesary part in SZ1 the second TransFinite induction for is-max
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
789
diff
changeset
|
563 m08 : {z : Ordinal} → (fcz : FClosure A f y z ) → z <= ZChain.supf zc b |
813 | 564 m08 {z} fcz = ZChain.fcy<sup zc b<A fcz |
828 | 565 m09 : {s z1 : Ordinal} → ZChain.supf zc s o< ZChain.supf zc b |
825 | 566 → FClosure A f (ZChain.supf zc s) z1 → z1 <= ZChain.supf zc b |
831 | 567 m09 {s} {z} s<b fcz = ZChain.order zc b<A (o<→≤ s<b) fcz |
790
201b66da4e69
remove unnesesary part in SZ1 the second TransFinite induction for is-max
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
789
diff
changeset
|
568 m06 : ChainP A f mf ay (ZChain.supf zc) b |
828 | 569 m06 = record { fcy<sup = m08 ; order = m09 ; supu=u = ZChain.sup=u zc ab (o<→≤ b<A ) |
570 record { x<sup = λ {z} uz → IsSup.x<sup is-sup (chain-mono1 (o<→≤ b<x) uz ) } } | |
756 | 571 ... | no lim = record { is-max = is-max } where |
734 | 572 is-max : {a : Ordinal} {b : Ordinal} → odef (UnionCF A f mf ay (ZChain.supf zc) x) a → |
573 b o< x → (ab : odef A b) → | |
574 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 → | |
575 * a < * b → odef (UnionCF A f mf ay (ZChain.supf zc) x) b | |
735 | 576 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 | 577 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 ) |
789 | 578 ... | case1 b=y = ⟪ subst (λ k → odef A k ) b=y ay , ch-init (subst (λ k → FClosure A f y k ) b=y (init ay refl )) ⟫ |
793 | 579 ... | case2 y<b = chain-mono1 (osucc b<x) |
790
201b66da4e69
remove unnesesary part in SZ1 the second TransFinite induction for is-max
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
789
diff
changeset
|
580 ⟪ ab , ch-is-sup b (ordtrans o≤-refl <-osuc ) m06 (subst (λ k → FClosure A f k b) m05 (init ab refl)) ⟫ where |
201b66da4e69
remove unnesesary part in SZ1 the second TransFinite induction for is-max
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
789
diff
changeset
|
581 m09 : b o< & A |
201b66da4e69
remove unnesesary part in SZ1 the second TransFinite induction for is-max
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
789
diff
changeset
|
582 m09 = subst (λ k → k o< & A) &iso ( c<→o< (subst (λ k → odef A k ) (sym &iso ) ab)) |
201b66da4e69
remove unnesesary part in SZ1 the second TransFinite induction for is-max
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
789
diff
changeset
|
583 m07 : {z : Ordinal} → FClosure A f y z → z <= ZChain.supf zc b |
813 | 584 m07 {z} fc = ZChain.fcy<sup zc m09 fc |
828 | 585 m08 : {s z1 : Ordinal} → ZChain.supf zc s o< ZChain.supf zc b |
825 | 586 → FClosure A f (ZChain.supf zc s) z1 → z1 <= ZChain.supf zc b |
831 | 587 m08 {s} {z1} s<b fc = ZChain.order zc m09 (o<→≤ s<b) fc |
790
201b66da4e69
remove unnesesary part in SZ1 the second TransFinite induction for is-max
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
789
diff
changeset
|
588 m05 : b ≡ ZChain.supf zc b |
814 | 589 m05 = sym (ZChain.sup=u zc ab (o<→≤ m09) |
817 | 590 record { x<sup = λ lt → IsSup.x<sup is-sup (chain-mono1 (o<→≤ b<x) lt )} ) -- ZChain on x |
790
201b66da4e69
remove unnesesary part in SZ1 the second TransFinite induction for is-max
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
789
diff
changeset
|
591 m06 : ChainP A f mf ay (ZChain.supf zc) b |
828 | 592 m06 = record { fcy<sup = m07 ; order = m08 ; supu=u = ZChain.sup=u zc ab (o<→≤ m09) |
593 record { x<sup = λ lt → IsSup.x<sup is-sup (chain-mono1 (o<→≤ b<x) lt )} } | |
727 | 594 |
543 | 595 --- |
560 | 596 --- the maximum chain has fix point of any ≤-monotonic function |
543 | 597 --- |
703 | 598 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
|
599 → (total : IsTotalOrderSet (ZChain.chain zc) ) |
703 | 600 → f (& (SUP.sup (sp0 f mf zc total ))) ≡ & (SUP.sup (sp0 f mf zc total)) |
601 fixpoint f mf zc total = z14 where | |
538 | 602 chain = ZChain.chain zc |
703 | 603 sp1 = sp0 f mf zc total |
712 | 604 z10 : {a b : Ordinal } → (ca : odef chain a ) → b o< & A → (ab : odef A b ) |
570 | 605 → HasPrev A chain ab f ∨ IsSup A chain {b} ab -- (supO chain (ZChain.chain⊆A zc) (ZChain.f-total zc) ≡ b ) |
538 | 606 → * a < * b → odef chain b |
793 | 607 z10 = ZChain1.is-max (SZ1 f mf as0 zc (& A) ) |
543 | 608 z11 : & (SUP.sup sp1) o< & A |
804 | 609 z11 = c<→o< ( SUP.as sp1) |
538 | 610 z12 : odef chain (& (SUP.sup sp1)) |
611 z12 with o≡? (& s) (& (SUP.sup sp1)) | |
653 | 612 ... | yes eq = subst (λ k → odef chain k) eq ( ZChain.chain∋init zc ) |
804 | 613 ... | no ne = z10 {& s} {& (SUP.sup sp1)} ( ZChain.chain∋init zc ) z11 (SUP.as sp1) |
570 | 614 (case2 z19 ) z13 where |
538 | 615 z13 : * (& s) < * (& (SUP.sup sp1)) |
653 | 616 z13 with SUP.x<sup sp1 ( ZChain.chain∋init zc ) |
538 | 617 ... | case1 eq = ⊥-elim ( ne (cong (&) eq) ) |
618 ... | case2 lt = subst₂ (λ j k → j < k ) (sym *iso) (sym *iso) lt | |
804 | 619 z19 : IsSup A chain {& (SUP.sup sp1)} (SUP.as sp1) |
571 | 620 z19 = record { x<sup = z20 } where |
621 z20 : {y : Ordinal} → odef chain y → (y ≡ & (SUP.sup sp1)) ∨ (y << & (SUP.sup sp1)) | |
622 z20 {y} zy with SUP.x<sup sp1 (subst (λ k → odef chain k ) (sym &iso) zy) | |
570 | 623 ... | case1 y=p = case1 (subst (λ k → k ≡ _ ) &iso ( cong (&) y=p )) |
624 ... | case2 y<p = case2 (subst (λ k → * y < k ) (sym *iso) y<p ) | |
625 -- λ {y} zy → subst (λ k → (y ≡ & k ) ∨ (y << & k)) ? (SUP.x<sup sp1 ? ) } | |
703 | 626 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
|
627 z14 with total (subst (λ k → odef chain k) (sym &iso) (ZChain.f-next zc z12 )) z12 |
631 | 628 ... | tri< a ¬b ¬c = ⊥-elim z16 where |
629 z16 : ⊥ | |
804 | 630 z16 with proj1 (mf (& ( SUP.sup sp1)) ( SUP.as sp1 )) |
631 | 631 ... | case1 eq = ⊥-elim (¬b (subst₂ (λ j k → j ≡ k ) refl *iso (sym eq) )) |
632 ... | case2 lt = ⊥-elim (¬c (subst₂ (λ j k → k < j ) refl *iso lt )) | |
633 ... | tri≈ ¬a b ¬c = subst ( λ k → k ≡ & (SUP.sup sp1) ) &iso ( cong (&) b ) | |
634 ... | tri> ¬a ¬b c = ⊥-elim z17 where | |
635 z15 : (* (f ( & ( SUP.sup sp1 ))) ≡ SUP.sup sp1) ∨ (* (f ( & ( SUP.sup sp1 ))) < SUP.sup sp1) | |
636 z15 = SUP.x<sup sp1 (subst (λ k → odef chain k ) (sym &iso) (ZChain.f-next zc z12 )) | |
637 z17 : ⊥ | |
638 z17 with z15 | |
639 ... | case1 eq = ¬b eq | |
640 ... | case2 lt = ¬a lt | |
560 | 641 |
642 -- ZChain contradicts ¬ Maximal | |
643 -- | |
571 | 644 -- ZChain forces fix point on any ≤-monotonic function (fixpoint) |
560 | 645 -- ¬ Maximal create cf which is a <-monotonic function by axiom of choice. This contradicts fix point of ZChain |
646 -- | |
697 | 647 z04 : (nmx : ¬ Maximal A ) |
703 | 648 → (zc : ZChain A (cf nmx) (cf-is-≤-monotonic nmx) as0 (& A)) |
664 | 649 → IsTotalOrderSet (ZChain.chain zc) → ⊥ |
804 | 650 z04 nmx zc total = <-irr0 {* (cf nmx c)} {* c} (subst (λ k → odef A k ) (sym &iso) (proj1 (is-cf nmx (SUP.as sp1 )))) |
651 (subst (λ k → odef A (& k)) (sym *iso) (SUP.as sp1) ) | |
703 | 652 (case1 ( cong (*)( fixpoint (cf nmx) (cf-is-≤-monotonic nmx ) zc total ))) -- x ≡ f x ̄ |
804 | 653 (proj1 (cf-is-<-monotonic nmx c (SUP.as sp1 ))) where -- x < f x |
633
6cd4a483122c
ZChain1 is not strictly positive
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
631
diff
changeset
|
654 sp1 : SUP A (ZChain.chain zc) |
703 | 655 sp1 = sp0 (cf nmx) (cf-is-≤-monotonic nmx) zc total |
538 | 656 c = & (SUP.sup sp1) |
548 | 657 |
757 | 658 uchain : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) → HOD |
659 uchain f mf {y} ay = record { od = record { def = λ x → FClosure A f y x } ; odmax = & A ; <odmax = | |
660 λ {z} cz → subst (λ k → k o< & A) &iso ( c<→o< (subst (λ k → odef A k ) (sym &iso ) (A∋fc y f mf cz ))) } | |
661 | |
662 utotal : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) | |
663 → IsTotalOrderSet (uchain f mf ay) | |
664 utotal f mf {y} ay {a} {b} ca cb = subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso uz01 where | |
665 uz01 : Tri (* (& a) < * (& b)) (* (& a) ≡ * (& b)) (* (& b) < * (& a) ) | |
666 uz01 = fcn-cmp y f mf ca cb | |
667 | |
668 ysup : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) | |
669 → SUP A (uchain f mf ay) | |
670 ysup f mf {y} ay = supP (uchain f mf ay) (λ lt → A∋fc y f mf lt) (utotal f mf ay) | |
671 | |
793 | 672 SUP⊆ : { B C : HOD } → B ⊆' C → SUP A C → SUP A B |
804 | 673 SUP⊆ {B} {C} B⊆C sup = record { sup = SUP.sup sup ; as = SUP.as sup ; x<sup = λ lt → SUP.x<sup sup (B⊆C lt) } |
711 | 674 |
560 | 675 -- |
547 | 676 -- create all ZChains under o< x |
560 | 677 -- |
608
6655f03984f9
mutual tranfinite in zorn
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
607
diff
changeset
|
678 |
674 | 679 ind : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) → (x : Ordinal) |
703 | 680 → ((z : Ordinal) → z o< x → ZChain A f mf ay z) → ZChain A f mf ay x |
707 | 681 ind f mf {y} ay x prev with Oprev-p x |
697 | 682 ... | yes op = zc4 where |
682 | 683 -- |
684 -- we have previous ordinal to use induction | |
685 -- | |
686 px = Oprev.oprev op | |
703 | 687 zc : ZChain A f mf ay (Oprev.oprev op) |
682 | 688 zc = prev px (subst (λ k → px o< k) (Oprev.oprev=x op) <-osuc ) |
689 px<x : px o< x | |
690 px<x = subst (λ k → px o< k) (Oprev.oprev=x op) <-osuc | |
709 | 691 zc-b<x : (b : Ordinal ) → b o< x → b o< osuc px |
692 zc-b<x b lt = subst (λ k → b o< k ) (sym (Oprev.oprev=x op)) lt | |
697 | 693 |
703 | 694 pchain : HOD |
830 | 695 pchain = UnionCF A f mf ay (ZChain.supf zc) px |
703 | 696 ptotal : IsTotalOrderSet pchain |
697 ptotal {a} {b} ca cb = subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso uz01 where | |
698 uz01 : Tri (* (& a) < * (& b)) (* (& a) ≡ * (& b)) (* (& b) < * (& a) ) | |
748 | 699 uz01 = chain-total A f mf ay (ZChain.supf zc) ( (proj2 ca)) ( (proj2 cb)) |
704 | 700 pchain⊆A : {y : Ordinal} → odef pchain y → odef A y |
701 pchain⊆A {y} ny = proj1 ny | |
702 pnext : {a : Ordinal} → odef pchain a → odef pchain (f a) | |
749 | 703 pnext {a} ⟪ aa , ch-init fc ⟫ = ⟪ proj2 (mf a aa) , ch-init (fsuc _ fc) ⟫ |
797 | 704 pnext {a} ⟪ aa , ch-is-sup u u≤x is-sup fc ⟫ = ⟪ proj2 (mf a aa) , ch-is-sup u u≤x is-sup (fsuc _ fc ) ⟫ |
704 | 705 pinit : {y₁ : Ordinal} → odef pchain y₁ → * y ≤ * y₁ |
748 | 706 pinit {a} ⟪ aa , ua ⟫ with ua |
707 ... | ch-init fc = s≤fc y f mf fc | |
791 | 708 ... | ch-is-sup u u≤x is-sup fc = ≤-ftrans (<=to≤ zc7) (s≤fc _ f mf fc) where |
765 | 709 zc7 : y <= (ZChain.supf zc) u |
783 | 710 zc7 = ChainP.fcy<sup is-sup (init ay refl) |
704 | 711 pcy : odef pchain y |
783 | 712 pcy = ⟪ ay , ch-init (init ay refl) ⟫ |
703 | 713 |
754 | 714 supf0 = ZChain.supf zc |
715 | |
830 | 716 sup1 : SUP A (UnionCF A f mf ay supf0 px) |
793 | 717 sup1 = supP pchain pchain⊆A ptotal |
718 sp1 = & (SUP.sup sup1 ) | |
719 supf1 : Ordinal → Ordinal | |
720 supf1 z with trio< z px | |
721 ... | tri< a ¬b ¬c = ZChain.supf zc z | |
830 | 722 ... | tri≈ ¬a b ¬c = sp1 |
723 ... | tri> ¬a ¬b c = sp1 | |
793 | 724 |
803 | 725 pchain1 : HOD |
726 pchain1 = UnionCF A f mf ay supf1 x | |
727 pcy1 : odef pchain1 y | |
728 pcy1 = ⟪ ay , ch-init (init ay refl) ⟫ | |
729 pinit1 : {y₁ : Ordinal} → odef pchain1 y₁ → * y ≤ * y₁ | |
730 pinit1 {a} ⟪ aa , ua ⟫ with ua | |
731 ... | ch-init fc = s≤fc y f mf fc | |
732 ... | ch-is-sup u u≤x is-sup fc = ≤-ftrans (<=to≤ zc7) (s≤fc _ f mf fc) where | |
733 zc7 : y <= supf1 u | |
734 zc7 = ChainP.fcy<sup is-sup (init ay refl) | |
735 pnext1 : {a : Ordinal} → odef pchain1 a → odef pchain1 (f a) | |
736 pnext1 {a} ⟪ aa , ch-init fc ⟫ = ⟪ proj2 (mf a aa) , ch-init (fsuc _ fc) ⟫ | |
737 pnext1 {a} ⟪ aa , ch-is-sup u u≤x is-sup fc ⟫ = ⟪ proj2 (mf a aa) , ch-is-sup u u≤x is-sup (fsuc _ fc ) ⟫ | |
807 | 738 ptotal1 : IsTotalOrderSet pchain1 |
739 ptotal1 {a} {b} ca cb = subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso uz01 where | |
740 uz01 : Tri (* (& a) < * (& b)) (* (& a) ≡ * (& b)) (* (& b) < * (& a) ) | |
741 uz01 = chain-total A f mf ay supf1 ( (proj2 ca)) ( (proj2 cb)) | |
803 | 742 |
830 | 743 zc64 : {z : Ordinal } → z o< px → odef (UnionCF A f mf ay supf0 px) (supf0 z) |
744 zc64 {z} z<px = chain-mono f mf ay supf0 zc72 zc70 where | |
745 zc70 : odef (UnionCF A f mf ay supf0 (supf0 z) ) (supf0 z) | |
746 zc70 = ZChain.csupf zc (o<→≤ z<px ) | |
747 zc71 : supf0 z o≤ supf0 px | |
748 zc71 = ZChain.supf-mono zc (o<→≤ z<px ) | |
749 zc72 : supf0 z o≤ px | |
750 zc72 = ? | |
751 zc73 : odef (UnionCF A f mf ay supf0 px ) (supf0 z) | |
752 zc73 = subst (λ k → odef (UnionCF A f mf ay supf0 px ) k ) &iso ( ZChain.csupf-fc zc o≤-refl ? (init (proj1 zc70) refl) ) | |
753 | |
754 supf1<sp1 : {z : Ordinal } → supf1 z o≤ sp1 | |
755 supf1<sp1 {z} with trio< z px | inspect supf1 z | |
756 ... | tri≈ ¬a b ¬c | record { eq = eq1 } = o≤-refl | |
757 ... | tri> ¬a ¬b c | record { eq = eq1 } = o≤-refl | |
758 ... | tri< a ¬b ¬c | record { eq = eq1 } with trio< (supf1 z) sp1 | |
759 ... | tri< a₁ ¬b₁ ¬c₁ = subst (λ k → k o≤ sp1) eq1 (o<→≤ a₁) | |
760 ... | tri≈ ¬a b ¬c₁ = o≤-refl0 (trans (sym eq1) b ) | |
761 ... | tri> ¬a ¬b₁ c = ? where | |
762 zc65 : sp1 o< ZChain.supf zc z | |
763 zc65 = subst (λ k → sp1 o< k ) eq1 c | |
764 zc66 : ( * (ZChain.supf zc z) ≡ * sp1) ∨ (ZChain.supf zc z << sp1) | |
765 zc66 = subst₂ (λ j k → ( j ≡ k) ∨ ( j < k ) ) refl (sym *iso) zc68 where | |
766 zc68 : ( *( ZChain.supf zc z) ≡ SUP.sup sup1 ) ∨ ( * (ZChain.supf zc z) < SUP.sup sup1 ) | |
767 zc68 = SUP.x<sup sup1 (subst (λ k → odef (UnionCF A f mf ay supf0 px) k ) (sym &iso) (zc64 a) ) | |
768 zc67 : ZChain.supf zc sp1 ≡ sp1 | |
769 zc67 = ? | |
770 | |
611 | 771 -- if previous chain satisfies maximality, we caan reuse it |
772 -- | |
791 | 773 -- supf0 px is sup of UnionCF px , supf0 x is sup of UnionCF x |
805 | 774 |
775 record xSUP : Set n where | |
776 field | |
777 ax : odef A x | |
819 | 778 is-sup : IsSup A (UnionCF A f mf ay supf0 px) ax |
805 | 779 |
825 | 780 UnionCF⊆ : {z0 z1 : Ordinal} → (z0≤1 : z0 o≤ z1 ) → (z0≤px : z0 o< px ) → UnionCF A f mf ay supf0 z0 ⊆' UnionCF A f mf ay supf1 z1 |
781 UnionCF⊆ {z0} {z1} z0≤1 z0<px ⟪ au , ch-init fc ⟫ = ⟪ au , ch-init fc ⟫ | |
782 UnionCF⊆ {z0} {z1} z0≤1 z0<px ⟪ au , ch-is-sup u1 {w} u1≤x u1-is-sup fc ⟫ = zc60 fc where | |
808 | 783 zc60 : {w : Ordinal } → FClosure A f (supf0 u1) w → odef (UnionCF A f mf ay supf1 z1 ) w |
784 zc60 (init asp refl) with trio< u1 px | inspect supf1 u1 | |
822 | 785 ... | tri< a ¬b ¬c | record { eq = eq1 } = ⟪ A∋fcs _ f mf fc , ch-is-sup u1 (OrdTrans u1≤x z0≤1 ) |
830 | 786 record { fcy<sup = fcy<sup ; order = order ; supu=u = trans eq1 (ChainP.supu=u u1-is-sup) } (init (subst (λ k → odef A k ) (sym eq1) asp) eq1 ) ⟫ where |
809 | 787 fcy<sup : {z : Ordinal} → FClosure A f y z → (z ≡ supf1 u1) ∨ (z << supf1 u1 ) |
788 fcy<sup {z} fc = subst ( λ k → (z ≡ k) ∨ (z << k )) (sym eq1) ( ChainP.fcy<sup u1-is-sup fc ) | |
830 | 789 order : {s : Ordinal} {z2 : Ordinal} → supf1 s o< supf1 u1 → FClosure A f (supf1 s) z2 → |
809 | 790 (z2 ≡ supf1 u1) ∨ (z2 << supf1 u1) |
810 | 791 order {s} {z2} s<u1 fc with trio< s px |
830 | 792 ... | tri< a ¬b ¬c = subst (λ k → (z2 ≡ k) ∨ (z2 << k) ) (sym eq1) ( ChainP.order u1-is-sup zc61 fc ) where |
793 zc61 : supf0 s o< supf0 u1 | |
794 zc61 = subst (λ k → supf0 s o< k ) eq1 s<u1 | |
795 ... | tri≈ ¬a b ¬c = ⊥-elim ( o≤> supf1<sp1 s<u1 ) | |
796 ... | tri> ¬a ¬b px<s = ⊥-elim ( o<¬≡ refl (ordtrans px<s {!!} )) -- px o< s < u1 < px | |
822 | 797 ... | tri≈ ¬a b ¬c | record { eq = eq1 } = ⟪ A∋fcs _ f mf fc , ch-is-sup u1 (OrdTrans u1≤x z0≤1 ) |
830 | 798 record { fcy<sup = fcy<sup ; order = order ; supu=u = trans eq1 {!!} } (init (subst (λ k → odef A k ) (sym eq1) {!!} ) {!!} ) ⟫ where |
809 | 799 fcy<sup : {z : Ordinal} → FClosure A f y z → (z ≡ supf1 u1) ∨ (z << supf1 u1 ) |
830 | 800 fcy<sup {z} fc = subst ( λ k → (z ≡ k) ∨ (z << k )) (sym eq1) {!!} -- ( ChainP.fcy<sup u1-is-sup fc ) |
801 order : {s : Ordinal} {z2 : Ordinal} → supf1 s o< supf1 u1 → FClosure A f (supf1 s) z2 → | |
810 | 802 (z2 ≡ supf1 u1) ∨ (z2 << supf1 u1) |
803 order {s} {z2} s<u1 fc with trio< s px | |
830 | 804 ... | tri< a ¬b ¬c = subst (λ k → (z2 ≡ k) ∨ (z2 << k) ) (sym eq1) {!!} |
805 ... | tri≈ ¬a b ¬c = subst (λ k → (z2 ≡ k) ∨ (z2 << k) ) (sym eq1) {!!} -- ( ChainP.order u1-is-sup s<u1 fc ) | |
806 ... | tri> ¬a ¬b px<s = ⊥-elim ( o<¬≡ refl (ordtrans px<s (subst (λ k → s o< k) b {!!} ) )) -- px o< s < u1 = px | |
825 | 807 ... | tri> ¬a ¬b px<u1 | record { eq = eq1 } with osuc-≡< (OrdTrans u1≤x (o<→≤ z0<px)) |
822 | 808 ... | case1 eq = ⊥-elim ( o<¬≡ (sym eq) px<u1 ) |
809 ... | case2 lt = ⊥-elim ( o<> lt px<u1 ) | |
808 | 810 zc60 (fsuc w1 fc) with zc60 fc |
811 ... | ⟪ ua1 , ch-init fc₁ ⟫ = ⟪ proj2 ( mf _ ua1) , ch-init (fsuc _ fc₁) ⟫ | |
812 ... | ⟪ ua1 , ch-is-sup u u≤x is-sup fc₁ ⟫ = ⟪ proj2 ( mf _ ua1) , ch-is-sup u u≤x is-sup (fsuc _ fc₁) ⟫ | |
805 | 813 no-extension : ¬ xSUP → ZChain A f mf ay x |
830 | 814 no-extension ¬sp=x = record { supf = supf1 ; sup = sup ; supf-mono = {!!} |
815 ; initial = pinit1 ; chain∋init = pcy1 ; sup=u = sup=u ; supf-is-sup = sis ; csupf = {!!} | |
808 | 816 ; chain⊆A = λ lt → proj1 lt ; f-next = pnext1 ; f-total = ptotal1 } where |
821 | 817 UnionCFR⊆ : {z0 z1 : Ordinal} → z0 o≤ z1 → z0 o< x → UnionCF A f mf ay supf1 z0 ⊆' UnionCF A f mf ay supf0 z1 |
818 UnionCFR⊆ {z0} {z1} z0≤1 z0<x ⟪ au , ch-init fc ⟫ = ⟪ au , ch-init fc ⟫ | |
819 UnionCFR⊆ {z0} {z1} z0≤1 z0<x ⟪ au , ch-is-sup u1 {w} u1≤x u1-is-sup fc ⟫ = zc60 fc where | |
811
e09ba00c9b85
nvim-agda bug in zorn.agda
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
810
diff
changeset
|
820 zc60 : {w : Ordinal } → FClosure A f (supf1 u1) w → odef (UnionCF A f mf ay supf0 z1 ) w |
e09ba00c9b85
nvim-agda bug in zorn.agda
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
810
diff
changeset
|
821 zc60 {w} (init asp refl) with trio< u1 px | inspect supf1 u1 |
e09ba00c9b85
nvim-agda bug in zorn.agda
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
810
diff
changeset
|
822 ... | tri< a ¬b ¬c | record { eq = eq1 } = ⟪ A∋fcs _ f mf fc , ch-is-sup u1 (OrdTrans u1≤x z0≤1 ) |
830 | 823 record { fcy<sup = fcy<sup ; order = {!!} ; supu=u = trans (sym eq1) (ChainP.supu=u u1-is-sup) } (init asp refl ) ⟫ where |
811
e09ba00c9b85
nvim-agda bug in zorn.agda
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
810
diff
changeset
|
824 fcy<sup : {z : Ordinal} → FClosure A f y z → (z ≡ supf0 u1) ∨ (z << supf0 u1 ) |
e09ba00c9b85
nvim-agda bug in zorn.agda
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
810
diff
changeset
|
825 fcy<sup {z} fc = subst ( λ k → (z ≡ k) ∨ (z << k )) eq1 ( ChainP.fcy<sup u1-is-sup fc ) |
e09ba00c9b85
nvim-agda bug in zorn.agda
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
810
diff
changeset
|
826 order : {s : Ordinal} {z2 : Ordinal} → s o< u1 → FClosure A f (supf0 s) z2 → |
e09ba00c9b85
nvim-agda bug in zorn.agda
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
810
diff
changeset
|
827 (z2 ≡ supf0 u1) ∨ (z2 << supf0 u1) |
e09ba00c9b85
nvim-agda bug in zorn.agda
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
810
diff
changeset
|
828 order {s} {z2} s<u1 fc with trio< s px | inspect supf1 s |
830 | 829 ... | tri< a ¬b ¬c | record { eq = eq2 } = subst (λ k → (z2 ≡ k) ∨ (z2 << k) ) eq1 ( ChainP.order u1-is-sup {!!} (subst (λ k → FClosure A f k z2) (sym eq2) fc )) |
830 ... | tri≈ ¬a b ¬c | record { eq = eq2 } = subst (λ k → (z2 ≡ k) ∨ (z2 << k) ) eq1 ( ChainP.order u1-is-sup {!!} (subst (λ k → FClosure A f k z2) (sym eq2) {!!} )) | |
811
e09ba00c9b85
nvim-agda bug in zorn.agda
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
810
diff
changeset
|
831 ... | tri> ¬a ¬b px<s | record { eq = eq2 } = ⊥-elim ( o<¬≡ refl (ordtrans px<s (ordtrans s<u1 a) )) -- px o< s < u1 < px |
e09ba00c9b85
nvim-agda bug in zorn.agda
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
810
diff
changeset
|
832 ... | tri≈ ¬a b ¬c | record { eq = eq1 } = ⟪ A∋fcs _ f mf fc , ch-is-sup u1 (OrdTrans u1≤x z0≤1 ) |
830 | 833 record { fcy<sup = fcy<sup ; order = {!!} ; supu=u = trans (sym {!!} ) (ChainP.supu=u u1-is-sup) } (init {!!} {!!} ) ⟫ where |
811
e09ba00c9b85
nvim-agda bug in zorn.agda
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
810
diff
changeset
|
834 fcy<sup : {z : Ordinal} → FClosure A f y z → (z ≡ supf0 u1) ∨ (z << supf0 u1 ) |
830 | 835 fcy<sup {z} fc = subst ( λ k → (z ≡ k) ∨ (z << k )) {!!} ( ChainP.fcy<sup u1-is-sup fc ) |
811
e09ba00c9b85
nvim-agda bug in zorn.agda
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
810
diff
changeset
|
836 order : {s : Ordinal} {z2 : Ordinal} → s o< u1 → FClosure A f (supf0 s) z2 → |
e09ba00c9b85
nvim-agda bug in zorn.agda
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
810
diff
changeset
|
837 (z2 ≡ supf0 u1) ∨ (z2 << supf0 u1) |
e09ba00c9b85
nvim-agda bug in zorn.agda
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
810
diff
changeset
|
838 order {s} {z2} s<u1 fc with trio< s px | inspect supf1 s |
830 | 839 ... | tri< a ¬b ¬c | record { eq = eq2 } = subst (λ k → (z2 ≡ k) ∨ (z2 << k) ) {!!}( ChainP.order u1-is-sup {!!} (subst (λ k → FClosure A f k z2) (sym eq2) fc )) |
840 ... | tri≈ ¬a b ¬c | record { eq = eq2 } = subst (λ k → (z2 ≡ k) ∨ (z2 << k) ) {!!} ( ChainP.order u1-is-sup {!!} (subst (λ k → FClosure A f k z2) (sym eq2) {!!} )) | |
811
e09ba00c9b85
nvim-agda bug in zorn.agda
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
810
diff
changeset
|
841 ... | tri> ¬a ¬b px<s | _ = ⊥-elim ( o<¬≡ refl (ordtrans px<s (subst (λ k → s o< k) b s<u1 ) )) -- px o< s < u1 = px |
e09ba00c9b85
nvim-agda bug in zorn.agda
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
810
diff
changeset
|
842 ... | tri> ¬a ¬b px<u1 | record { eq = eq1 } with trio< z0 px |
e09ba00c9b85
nvim-agda bug in zorn.agda
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
810
diff
changeset
|
843 ... | tri< a ¬b ¬c with osuc-≡< (OrdTrans u1≤x (o<→≤ a) ) |
e09ba00c9b85
nvim-agda bug in zorn.agda
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
810
diff
changeset
|
844 ... | case1 eq = ⊥-elim ( o<¬≡ (sym eq) px<u1 ) |
e09ba00c9b85
nvim-agda bug in zorn.agda
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
810
diff
changeset
|
845 ... | case2 lt = ⊥-elim ( o<> lt px<u1 ) |
822 | 846 zc60 (init asp refl) | tri> ¬a ¬b px<u1 | record { eq = eq1} | tri≈ ¬a' b ¬c with osuc-≡< (OrdTrans u1≤x (o≤-refl0 b) ) |
811
e09ba00c9b85
nvim-agda bug in zorn.agda
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
810
diff
changeset
|
847 ... | case1 eq = ⊥-elim ( o<¬≡ (sym eq) px<u1 ) |
e09ba00c9b85
nvim-agda bug in zorn.agda
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
810
diff
changeset
|
848 ... | case2 lt = ⊥-elim ( o<> lt px<u1 ) |
822 | 849 zc60 (init asp refl) | tri> ¬a ¬b px<u1 | record { eq = eq1} | tri> ¬a' ¬b' px<z0 = ⊥-elim (¬p<x<op ⟪ px<z0 , subst (λ k → z0 o< k ) (sym (Oprev.oprev=x op)) z0<x ⟫ ) |
811
e09ba00c9b85
nvim-agda bug in zorn.agda
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
810
diff
changeset
|
850 zc60 (fsuc w1 fc) with zc60 fc |
e09ba00c9b85
nvim-agda bug in zorn.agda
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
810
diff
changeset
|
851 ... | ⟪ ua1 , ch-init fc₁ ⟫ = ⟪ proj2 ( mf _ ua1) , ch-init (fsuc _ fc₁) ⟫ |
e09ba00c9b85
nvim-agda bug in zorn.agda
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
810
diff
changeset
|
852 ... | ⟪ ua1 , ch-is-sup u u≤x is-sup fc₁ ⟫ = ⟪ proj2 ( mf _ ua1) , ch-is-sup u u≤x is-sup (fsuc _ fc₁) ⟫ |
813 | 853 sup : {z : Ordinal} → z o< x → SUP A (UnionCF A f mf ay supf1 z) |
854 sup {z} z<x with trio< z px | |
822 | 855 ... | tri< a ¬b ¬c = SUP⊆ (UnionCFR⊆ o≤-refl z<x ) ( ZChain.sup zc a ) |
816 | 856 ... | tri≈ ¬a b ¬c = record { sup = SUP.sup sup1 ; as = SUP.as sup1 ; x<sup = zc61 } where |
857 zc61 : {w : HOD} → UnionCF A f mf ay supf1 z ∋ w → (w ≡ SUP.sup sup1) ∨ (w < SUP.sup sup1) | |
830 | 858 zc61 {w} lt = ? -- SUP.x<sup sup1 (UnionCFR⊆ (o<→≤ z<x) z<x lt ) |
814 | 859 ... | tri> ¬a ¬b px<z = ⊥-elim (¬p<x<op ⟪ px<z , subst (λ k → z o< k ) (sym (Oprev.oprev=x op)) z<x ⟫ ) |
803 | 860 sup=u : {b : Ordinal} (ab : odef A b) → |
817 | 861 b o≤ x → IsSup A (UnionCF A f mf ay supf1 b) ab → supf1 b ≡ b |
814 | 862 sup=u {b} ab b≤x is-sup with trio< b px |
825 | 863 ... | tri< a ¬b ¬c = ZChain.sup=u zc ab (o<→≤ a) record { x<sup = λ lt → IsSup.x<sup is-sup (UnionCF⊆ o≤-refl a lt) } |
830 | 864 ... | tri≈ ¬a b ¬c = {!!} -- ZChain.sup=u zc ab (o≤-refl0 b) record { x<sup = λ lt → IsSup.x<sup is-sup (UnionCF⊆ o≤-refl (o≤-refl0 b) lt) } |
819 | 865 ... | tri> ¬a ¬b px<b = ⊥-elim (¬sp=x zcsup ) where |
815 | 866 zc30 : x ≡ b |
867 zc30 with osuc-≡< b≤x | |
868 ... | case1 eq = sym (eq) | |
869 ... | case2 b<x = ⊥-elim (¬p<x<op ⟪ px<b , subst (λ k → b o< k ) (sym (Oprev.oprev=x op)) b<x ⟫ ) | |
818 | 870 zcsup : xSUP |
871 zcsup with zc30 | |
830 | 872 ... | refl = record { ax = ab ; is-sup = record { x<sup = λ lt → IsSup.x<sup is-sup (UnionCF⊆ (pxo≤x op) {!!} lt) } } |
822 | 873 csupf : {b : Ordinal} → b o≤ x → odef (UnionCF A f mf ay supf1 b) (supf1 b) |
820 | 874 csupf {b} b<x with trio< b px | inspect supf1 b |
830 | 875 ... | tri< a ¬b ¬c | _ = UnionCF⊆ o≤-refl a {!!} |
876 ... | tri≈ ¬a refl ¬c | _ = {!!} -- UnionCF⊆ o≤-refl o≤-refl ( ZChain.csupf zc o≤-refl ) | |
877 ... | tri> ¬a ¬b px<b | record { eq = eq1 } = {!!} -- UnionCF⊆ (o<→≤ px<b) o≤-refl ( ZChain.csupf zc o≤-refl ) | |
813 | 878 sis : {z : Ordinal} (z<x : z o< x) → supf1 z ≡ & (SUP.sup (sup z<x)) |
823 | 879 sis {z} z<x with trio< z px |
880 ... | tri< a ¬b ¬c = ZChain.supf-is-sup zc a | |
830 | 881 ... | tri≈ ¬a b ¬c = {!!} |
823 | 882 ... | tri> ¬a ¬b px<z = ⊥-elim (¬p<x<op ⟪ px<z , subst (λ k → z o< k ) (sym (Oprev.oprev=x op)) z<x ⟫ ) |
703 | 883 zc4 : ZChain A f mf ay x |
793 | 884 zc4 with ODC.∋-p O A (* x) |
796 | 885 ... | no noax = no-extension {!!} -- ¬ A ∋ p, just skip |
793 | 886 ... | yes ax with ODC.p∨¬p O ( HasPrev A (ZChain.chain zc ) ax f ) |
703 | 887 -- we have to check adding x preserve is-max ZChain A y f mf x |
796 | 888 ... | case1 pr = no-extension {!!} -- we have previous A ∋ z < x , f z ≡ x, so chain ∋ f z ≡ x because of f-next |
793 | 889 ... | case2 ¬fy<x with ODC.p∨¬p O (IsSup A (ZChain.chain zc ) ax ) |
682 | 890 ... | case1 is-sup = -- x is a sup of zc |
830 | 891 record { supf = psupf1 ; chain⊆A = {!!} ; f-next = {!!} ; f-total = {!!} ; csupf = {!!} ; sup=u = {!!} ; supf-mono = {!!} |
800 | 892 ; initial = {!!} ; chain∋init = {!!} ; sup = {!!} ; supf-is-sup = {!!} } where |
793 | 893 supx : SUP A (UnionCF A f mf ay supf0 x) |
804 | 894 supx = record { sup = * x ; as = subst (λ k → odef A k ) {!!} ax ; x<sup = {!!} } |
793 | 895 spx = & (SUP.sup supx ) |
896 x=spx : x ≡ spx | |
807 | 897 x=spx = sym &iso |
750 | 898 psupf1 : Ordinal → Ordinal |
899 psupf1 z with trio< z x | |
900 ... | tri< a ¬b ¬c = ZChain.supf zc z | |
901 ... | tri≈ ¬a b ¬c = x | |
902 ... | tri> ¬a ¬b c = x | |
822 | 903 csupf : {b : Ordinal} → b o≤ x → odef (UnionCF A f mf ay psupf1 b) (psupf1 b) |
804 | 904 csupf {b} b≤x with trio< b px | inspect psupf1 b |
811
e09ba00c9b85
nvim-agda bug in zorn.agda
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
810
diff
changeset
|
905 ... | tri< a ¬b ¬c | record { eq = eq1 } = ⟪ {!!} , {!!} ⟫ |
808 | 906 ... | tri≈ ¬a b ¬c | record { eq = eq1 } = ⟪ {!!} , {!!} ⟫ |
907 ... | tri> ¬a ¬b c | record { eq = eq1 } = {!!} where -- b ≡ x, supf x ≡ sp | |
804 | 908 zc30 : x ≡ b |
909 zc30 with trio< x b | |
811
e09ba00c9b85
nvim-agda bug in zorn.agda
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
810
diff
changeset
|
910 ... | tri< a ¬b ¬c = {!!} |
e09ba00c9b85
nvim-agda bug in zorn.agda
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
810
diff
changeset
|
911 ... | tri≈ ¬a b ¬c = {!!} |
e09ba00c9b85
nvim-agda bug in zorn.agda
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
810
diff
changeset
|
912 ... | tri> ¬a ¬b c = {!!} |
793 | 913 |
796 | 914 ... | 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
|
915 |
728 | 916 ... | no lim = zc5 where |
726
b2e2cd12e38f
psupf-mono and is-max conflict
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
725
diff
changeset
|
917 |
703 | 918 pzc : (z : Ordinal) → z o< x → ZChain A f mf ay z |
919 pzc z z<x = prev z z<x | |
794 | 920 ysp = & (SUP.sup (ysup f mf ay)) |
726
b2e2cd12e38f
psupf-mono and is-max conflict
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
725
diff
changeset
|
921 |
805 | 922 record SupE ( z : Ordinal ) : Set n where |
923 field | |
924 z<x : z o< x | |
925 z=supfz : z ≡ ZChain.supf (pzc z z<x) z | |
926 | |
703 | 927 psupf0 : (z : Ordinal) → Ordinal |
928 psupf0 z with trio< z x | |
755 | 929 ... | tri< a ¬b ¬c = ZChain.supf (pzc (osuc z) (ob<x lim a)) z |
794 | 930 ... | tri≈ ¬a b ¬c = ysp |
931 ... | tri> ¬a ¬b c = ysp | |
755 | 932 |
933 pchain0 : HOD | |
934 pchain0 = UnionCF A f mf ay psupf0 x | |
935 | |
936 ptotal0 : IsTotalOrderSet pchain0 | |
937 ptotal0 {a} {b} ca cb = subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso uz01 where | |
938 uz01 : Tri (* (& a) < * (& b)) (* (& a) ≡ * (& b)) (* (& b) < * (& a) ) | |
939 uz01 = chain-total A f mf ay psupf0 ( (proj2 ca)) ( (proj2 cb)) | |
940 | |
941 usup : SUP A pchain0 | |
942 usup = supP pchain0 (λ lt → proj1 lt) ptotal0 | |
943 spu = & (SUP.sup usup) | |
944 | |
794 | 945 supf1 : Ordinal → Ordinal |
946 supf1 z with trio< z x | |
755 | 947 ... | tri< a ¬b ¬c = ZChain.supf (pzc (osuc z) (ob<x lim a)) z |
794 | 948 ... | tri≈ ¬a b ¬c = spu |
949 ... | tri> ¬a ¬b c = spu | |
755 | 950 |
704 | 951 pchain : HOD |
794 | 952 pchain = UnionCF A f mf ay supf1 x |
704 | 953 |
954 pchain⊆A : {y : Ordinal} → odef pchain y → odef A y | |
955 pchain⊆A {y} ny = proj1 ny | |
956 pnext : {a : Ordinal} → odef pchain a → odef pchain (f a) | |
750 | 957 pnext {a} ⟪ aa , ch-init fc ⟫ = ⟪ proj2 ( mf a aa ) , ch-init (fsuc _ fc) ⟫ |
794 | 958 pnext {a} ⟪ aa , ch-is-sup u u≤x is-sup fc ⟫ = ⟪ proj2 ( mf a aa ) , ch-is-sup u u≤x is-sup (fsuc _ fc) ⟫ |
704 | 959 pinit : {y₁ : Ordinal} → odef pchain y₁ → * y ≤ * y₁ |
748 | 960 pinit {a} ⟪ aa , ua ⟫ with ua |
961 ... | ch-init fc = s≤fc y f mf fc | |
791 | 962 ... | ch-is-sup u u≤x is-sup fc = ≤-ftrans (<=to≤ zc7) (s≤fc _ f mf fc) where |
794 | 963 zc7 : y <= supf1 _ |
783 | 964 zc7 = ChainP.fcy<sup is-sup (init ay refl) |
704 | 965 pcy : odef pchain y |
783 | 966 pcy = ⟪ ay , ch-init (init ay refl) ⟫ |
755 | 967 ptotal : IsTotalOrderSet pchain |
968 ptotal {a} {b} ca cb = subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso uz01 where | |
969 uz01 : Tri (* (& a) < * (& b)) (* (& a) ≡ * (& b)) (* (& b) < * (& a) ) | |
794 | 970 uz01 = chain-total A f mf ay supf1 ( (proj2 ca)) ( (proj2 cb)) |
754 | 971 |
758
a2947dfff80d
is-max on first transfinite induction is not good
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
757
diff
changeset
|
972 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
|
973 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
|
974 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
|
975 * 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
|
976 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
|
977 ... | ⟪ ab0 , ch-init fc ⟫ = ⟪ ab , ch-init ( subst (λ k → FClosure A f y k) (sym (HasPrev.x=fy has-prev)) (fsuc _ fc )) ⟫ |
791 | 978 ... | ⟪ ab0 , ch-is-sup u u≤x 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
|
979 subst (λ k → UChain A f mf ay supf x k ) |
794 | 980 (sym (HasPrev.x=fy has-prev)) ( ch-is-sup u u≤x 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
|
981 |
805 | 982 record xSUP : Set n where |
983 field | |
984 ax : odef A x | |
985 not-sup : IsSup A (UnionCF A f mf ay psupf0 x) ax | |
986 | |
987 no-extension : ¬ xSUP → ZChain A f mf ay x | |
802 | 988 no-extension ¬sp=x = record { initial = pinit ; chain∋init = pcy ; supf = supf1 ; sup=u = sup=u |
830 | 989 ; sup = sup ; supf-is-sup = sis ; supf-mono = {!!} |
990 ; csupf = {!!} ; chain⊆A = pchain⊆A ; f-next = pnext ; f-total = ptotal } where | |
795
408e7e8a3797
csupf depends on order cyclicly
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
794
diff
changeset
|
991 supfu : {u : Ordinal } → ( a : u o< x ) → (z : Ordinal) → Ordinal |
408e7e8a3797
csupf depends on order cyclicly
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
794
diff
changeset
|
992 supfu {u} a z = ZChain.supf (pzc (osuc u) (ob<x lim a)) z |
802 | 993 UnionCF⊆ : {u : Ordinal} → (a : u o< x ) → UnionCF A f mf ay supf1 u ⊆' UnionCF A f mf ay (supfu a) x |
994 UnionCF⊆ {u} u<x ⟪ au , ch-init fc ⟫ = ⟪ au , ch-init fc ⟫ | |
808 | 995 UnionCF⊆ {u} u<x ⟪ au , ch-is-sup u1 u1≤x u1-is-sup (init au1 refl) ⟫ = ⟪ au , ch-is-sup u1 {!!} {!!} (init {!!} {!!}) ⟫ |
811
e09ba00c9b85
nvim-agda bug in zorn.agda
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
810
diff
changeset
|
996 UnionCF⊆ {u} u<x ⟪ au , ch-is-sup u1 u1≤x u1-is-sup (fsuc xp fcu1) ⟫ = {!!} -- with |
808 | 997 -- UnionCF⊆ {u} u<x ⟪ A∋fc _ f mf fcu1 , ch-is-sup u1 u1≤x u1-is-sup fcu1 ⟫ |
998 -- ... | ⟪ aa , ch-init fc ⟫ = ⟪ proj2 ( mf _ aa ) , ch-init (fsuc _ fc) ⟫ | |
999 -- ... | ⟪ aa , ch-is-sup u u≤x is-sup fc ⟫ = ⟪ proj2 ( mf _ aa ) , ch-is-sup u u≤x is-sup (fsuc _ fc) ⟫ | |
811
e09ba00c9b85
nvim-agda bug in zorn.agda
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
810
diff
changeset
|
1000 UnionCFR⊆ : {z : Ordinal} → (a : z o≤ x ) → UnionCF A f mf ay supf1 z ⊆' UnionCF A f mf ay psupf0 x |
e09ba00c9b85
nvim-agda bug in zorn.agda
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
810
diff
changeset
|
1001 UnionCFR⊆ {u} u<x ⟪ au , ch-init fc ⟫ = ⟪ au , ch-init fc ⟫ |
e09ba00c9b85
nvim-agda bug in zorn.agda
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
810
diff
changeset
|
1002 UnionCFR⊆ {u} u<x ⟪ au , ch-is-sup u1 u1≤x u1-is-sup (init au1 refl) ⟫ = ⟪ au , ch-is-sup u1 {!!} {!!} (init {!!} {!!}) ⟫ |
e09ba00c9b85
nvim-agda bug in zorn.agda
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
810
diff
changeset
|
1003 UnionCFR⊆ {u} u<x ⟪ au , ch-is-sup u1 u1≤x u1-is-sup (fsuc xp fcu1) ⟫ = {!!} -- with |
808 | 1004 -- UnionCF0⊆ {u} u<x ⟪ A∋fc _ f mf fcu1 , ch-is-sup u1 u1≤x u1-is-sup fcu1 ⟫ |
1005 -- ... | ⟪ aa , ch-init fc ⟫ = ⟪ proj2 ( mf _ aa ) , ch-init (fsuc _ fc) ⟫ | |
1006 -- ... | ⟪ aa , ch-is-sup u u≤x is-sup fc ⟫ = ⟪ proj2 ( mf _ aa ) , ch-is-sup u u≤x is-sup (fsuc _ fc) ⟫ | |
813 | 1007 sup : {z : Ordinal} → z o< x → SUP A (UnionCF A f mf ay supf1 z) |
797 | 1008 sup {z} z≤x with trio< z x |
808 | 1009 ... | tri< a ¬b ¬c = SUP⊆ (UnionCF⊆ a) (ZChain.sup (pzc (osuc z) {!!}) {!!} ) |
815 | 1010 ... | tri≈ ¬a b ¬c = {!!} |
1011 ... | tri> ¬a ¬b c = {!!} | |
1012 sis : {z : Ordinal} (x≤z : z o< x) → supf1 z ≡ & (SUP.sup (sup {!!})) | |
813 | 1013 sis {z} z<x with trio< z x |
800 | 1014 ... | tri< a ¬b ¬c = {!!} where |
815 | 1015 zc8 = ZChain.supf-is-sup (pzc z a) {!!} |
1016 ... | tri≈ ¬a b ¬c = {!!} | |
1017 ... | tri> ¬a ¬b c = {!!} | |
817 | 1018 sup=u : {b : Ordinal} (ab : odef A b) → b o≤ x → IsSup A (UnionCF A f mf ay supf1 b) ab → supf1 b ≡ b |
797 | 1019 sup=u {b} ab b<x is-sup with trio< b x |
808 | 1020 ... | tri< a ¬b ¬c = ZChain.sup=u (pzc (osuc b) (ob<x lim a)) ab {!!} record { x<sup = {!!} } |
815 | 1021 ... | tri≈ ¬a b ¬c = {!!} -- ZChain.sup=u (pzc (osuc ?) ?) ab {!!} record { x<sup = {!!} } |
800 | 1022 ... | tri> ¬a ¬b c = {!!} |
822 | 1023 csupf : {z : Ordinal} → z o≤ x → odef (UnionCF A f mf ay supf1 z) (supf1 z) |
804 | 1024 csupf {z} z≤x with trio< z x |
797 | 1025 ... | tri< a ¬b ¬c = zc9 where |
1026 zc9 : odef (UnionCF A f mf ay supf1 z) (ZChain.supf (pzc (osuc z) (ob<x lim a)) z) | |
800 | 1027 zc9 = {!!} |
797 | 1028 zc8 : odef (UnionCF A f mf ay (supfu a) z) (ZChain.supf (pzc (osuc z) (ob<x lim a)) z) |
830 | 1029 zc8 = {!!} -- ZChain.csupf (pzc (osuc z) (ob<x lim a)) ? -- (o<→≤ <-osuc ) |
808 | 1030 ... | tri≈ ¬a b ¬c = {!!} |
830 | 1031 ... | tri> ¬a ¬b x<z = ⊥-elim (o<¬≡ refl (ordtrans<-≤ x<z {!!} )) |
797 | 1032 |
703 | 1033 zc5 : ZChain A f mf ay x |
697 | 1034 zc5 with ODC.∋-p O A (* x) |
796 | 1035 ... | no noax = no-extension {!!} -- ¬ A ∋ p, just skip |
704 | 1036 ... | yes ax with ODC.p∨¬p O ( HasPrev A pchain ax f ) |
703 | 1037 -- we have to check adding x preserve is-max ZChain A y f mf x |
796 | 1038 ... | case1 pr = no-extension {!!} |
704 | 1039 ... | case2 ¬fy<x with ODC.p∨¬p O (IsSup A pchain ax ) |
794 | 1040 ... | case1 is-sup = record { initial = {!!} ; chain∋init = {!!} ; supf = supf1 ; sup=u = {!!} |
830 | 1041 ; sup = {!!} ; supf-is-sup = {!!} ; supf-mono = {!!} |
808 | 1042 ; chain⊆A = {!!} ; f-next = {!!} ; f-total = {!!} ; csupf = {!!} } -- where -- x is a sup of (zc ?) |
796 | 1043 ... | case2 ¬x=sup = no-extension {!!} -- x is not f y' nor sup of former ZChain from y -- no extention |
553 | 1044 |
703 | 1045 SZ : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) → {y : Ordinal} (ay : odef A y) → ZChain A f mf ay (& A) |
1046 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
|
1047 |
551 | 1048 zorn00 : Maximal A |
1049 zorn00 with is-o∅ ( & HasMaximal ) -- we have no Level (suc n) LEM | |
804 | 1050 ... | no not = record { maximal = ODC.minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) ; as = zorn01 ; ¬maximal<x = zorn02 } where |
551 | 1051 -- yes we have the maximal |
1052 zorn03 : odef HasMaximal ( & ( ODC.minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) ) ) | |
606 | 1053 zorn03 = ODC.x∋minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) -- Axiom of choice |
551 | 1054 zorn01 : A ∋ ODC.minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) |
1055 zorn01 = proj1 zorn03 | |
1056 zorn02 : {x : HOD} → A ∋ x → ¬ (ODC.minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) < x) | |
1057 zorn02 {x} ax m<x = proj2 zorn03 (& x) ax (subst₂ (λ j k → j < k) (sym *iso) (sym *iso) m<x ) | |
703 | 1058 ... | yes ¬Maximal = ⊥-elim ( z04 nmx zorn04 total ) where |
551 | 1059 -- if we have no maximal, make ZChain, which contradict SUP condition |
1060 nmx : ¬ Maximal A | |
1061 nmx mx = ∅< {HasMaximal} zc5 ( ≡o∅→=od∅ ¬Maximal ) where | |
1062 zc5 : odef A (& (Maximal.maximal mx)) ∧ (( y : Ordinal ) → odef A y → ¬ (* (& (Maximal.maximal mx)) < * y)) | |
804 | 1063 zc5 = ⟪ Maximal.as 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 | 1064 zorn04 : ZChain A (cf nmx) (cf-is-≤-monotonic nmx) as0 (& A) |
653 | 1065 zorn04 = SZ (cf nmx) (cf-is-≤-monotonic nmx) (subst (λ k → odef A k ) &iso as ) |
634 | 1066 total : IsTotalOrderSet (ZChain.chain zorn04) |
654 | 1067 total {a} {b} = zorn06 where |
1068 zorn06 : odef (ZChain.chain zorn04) (& a) → odef (ZChain.chain zorn04) (& b) → Tri (a < b) (a ≡ b) (b < a) | |
1069 zorn06 = ZChain.f-total (SZ (cf nmx) (cf-is-≤-monotonic nmx) (subst (λ k → odef A k ) &iso as) ) | |
551 | 1070 |
516 | 1071 -- usage (see filter.agda ) |
1072 -- | |
497 | 1073 -- _⊆'_ : ( A B : HOD ) → Set n |
1074 -- _⊆'_ A B = (x : Ordinal ) → odef A x → odef B x | |
482 | 1075 |
497 | 1076 -- MaximumSubset : {L P : HOD} |
1077 -- → o∅ o< & L → o∅ o< & P → P ⊆ L | |
1078 -- → IsPartialOrderSet P _⊆'_ | |
1079 -- → ( (B : HOD) → B ⊆ P → IsTotalOrderSet B _⊆'_ → SUP P B _⊆'_ ) | |
1080 -- → Maximal P (_⊆'_) | |
1081 -- MaximumSubset {L} {P} 0<L 0<P P⊆L PO SP = Zorn-lemma {P} {_⊆'_} 0<P PO SP |