Mercurial > hg > Members > kono > Proof > ZF-in-agda
annotate src/zorn.agda @ 874:852bdf4a2df3
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 17 Sep 2022 10:11:54 +0900 |
parents | 27bab3f65064 |
children | 7f03e1d24961 |
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 | |
872 | 55 _<<_ : (x y : Ordinal ) → Set n |
570 | 56 x << y = * x < * y |
57 | |
872 | 58 _<=_ : (x y : Ordinal ) → Set n -- we can't use * x ≡ * y, it is Set (Level.suc n). Level (suc n) troubles Chain |
765 | 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 |
836 | 228 record HasPrev (A B : HOD) (x : Ordinal ) ( f : Ordinal → Ordinal ) : Set n where |
533 | 229 field |
836 | 230 ax : odef A x |
534 | 231 y : Ordinal |
541 | 232 ay : odef B y |
534 | 233 x=fy : x ≡ f y |
529 | 234 |
570 | 235 record IsSup (A B : HOD) {x : Ordinal } (xa : odef A x) : Set n where |
654 | 236 field |
779 | 237 x<sup : {y : Ordinal} → odef B y → (y ≡ x ) ∨ (y << x ) |
568 | 238 |
656 | 239 record SUP ( A B : HOD ) : Set (Level.suc n) where |
240 field | |
241 sup : HOD | |
804 | 242 as : A ∋ sup |
656 | 243 x<sup : {x : HOD} → B ∋ x → (x ≡ sup ) ∨ (x < sup ) -- B is Total, use positive |
244 | |
690 | 245 -- |
246 -- sup and its fclosure is in a chain HOD | |
247 -- chain HOD is sorted by sup as Ordinal and <-ordered | |
248 -- whole chain is a union of separated Chain | |
803 | 249 -- minimum index is sup of y not ϕ |
690 | 250 -- |
251 | |
787 | 252 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 | 253 field |
765 | 254 fcy<sup : {z : Ordinal } → FClosure A f y z → (z ≡ supf u) ∨ ( z << supf u ) |
828 | 255 order : {s z1 : Ordinal} → (lt : supf s o< supf u ) → FClosure A f (supf s ) z1 → (z1 ≡ supf u ) ∨ ( z1 << supf u ) |
256 supu=u : supf u ≡ u | |
694 | 257 |
748 | 258 data UChain ( A : HOD ) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) {y : Ordinal } (ay : odef A y ) |
259 (supf : Ordinal → Ordinal) (x : Ordinal) : (z : Ordinal) → Set n where | |
260 ch-init : {z : Ordinal } (fc : FClosure A f y z) → UChain A f mf ay supf x z | |
863 | 261 ch-is-sup : (u : Ordinal) {z : Ordinal } (u<x : u o< x) ( is-sup : ChainP A f mf ay supf u ) |
748 | 262 ( fc : FClosure A f (supf u) z ) → UChain A f mf ay supf x z |
694 | 263 |
861 | 264 -- data UChain is total |
265 | |
266 chain-total : (A : HOD ) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) {y : Ordinal} (ay : odef A y) (supf : Ordinal → Ordinal ) | |
267 {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 ) | |
268 chain-total A f mf {y} ay supf {xa} {xb} {a} {b} ca cb = ct-ind xa xb ca cb where | |
269 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) | |
270 ct-ind xa xb {a} {b} (ch-init fca) (ch-init fcb) = fcn-cmp y f mf fca fcb | |
271 ct-ind xa xb {a} {b} (ch-init fca) (ch-is-sup ub u≤x supb fcb) with ChainP.fcy<sup supb fca | |
272 ... | case1 eq with s≤fc (supf ub) f mf fcb | |
273 ... | case1 eq1 = tri≈ (λ lt → ⊥-elim (<-irr (case1 (sym ct00)) lt)) ct00 (λ lt → ⊥-elim (<-irr (case1 ct00) lt)) where | |
274 ct00 : * a ≡ * b | |
275 ct00 = trans (cong (*) eq) eq1 | |
276 ... | case2 lt = tri< ct01 (λ eq → <-irr (case1 (sym eq)) ct01) (λ lt → <-irr (case2 ct01) lt) where | |
277 ct01 : * a < * b | |
278 ct01 = subst (λ k → * k < * b ) (sym eq) lt | |
279 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 | |
280 ct00 : * a < * (supf ub) | |
281 ct00 = lt | |
282 ct01 : * a < * b | |
283 ct01 with s≤fc (supf ub) f mf fcb | |
284 ... | case1 eq = subst (λ k → * a < k ) eq ct00 | |
285 ... | case2 lt = IsStrictPartialOrder.trans POO ct00 lt | |
286 ct-ind xa xb {a} {b} (ch-is-sup ua u≤x supa fca) (ch-init fcb) with ChainP.fcy<sup supa fcb | |
287 ... | case1 eq with s≤fc (supf ua) f mf fca | |
288 ... | case1 eq1 = tri≈ (λ lt → ⊥-elim (<-irr (case1 (sym ct00)) lt)) ct00 (λ lt → ⊥-elim (<-irr (case1 ct00) lt)) where | |
289 ct00 : * a ≡ * b | |
290 ct00 = sym (trans (cong (*) eq) eq1 ) | |
291 ... | case2 lt = tri> (λ lt → <-irr (case2 ct01) lt) (λ eq → <-irr (case1 eq) ct01) ct01 where | |
292 ct01 : * b < * a | |
293 ct01 = subst (λ k → * k < * a ) (sym eq) lt | |
294 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 | |
295 ct00 : * b < * (supf ua) | |
296 ct00 = lt | |
297 ct01 : * b < * a | |
298 ct01 with s≤fc (supf ua) f mf fca | |
299 ... | case1 eq = subst (λ k → * b < k ) eq ct00 | |
300 ... | case2 lt = IsStrictPartialOrder.trans POO ct00 lt | |
301 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 | |
302 ... | 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 | |
303 ... | case1 eq with s≤fc (supf ub) f mf fcb | |
304 ... | case1 eq1 = tri≈ (λ lt → ⊥-elim (<-irr (case1 (sym ct00)) lt)) ct00 (λ lt → ⊥-elim (<-irr (case1 ct00) lt)) where | |
305 ct00 : * a ≡ * b | |
306 ct00 = trans (cong (*) eq) eq1 | |
307 ... | case2 lt = tri< ct02 (λ eq → <-irr (case1 (sym eq)) ct02) (λ lt → <-irr (case2 ct02) lt) where | |
308 ct02 : * a < * b | |
309 ct02 = subst (λ k → * k < * b ) (sym eq) lt | |
310 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 | |
311 ct03 : * a < * (supf ub) | |
312 ct03 = lt | |
313 ct02 : * a < * b | |
314 ct02 with s≤fc (supf ub) f mf fcb | |
315 ... | case1 eq = subst (λ k → * a < k ) eq ct03 | |
316 ... | case2 lt = IsStrictPartialOrder.trans POO ct03 lt | |
317 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 | |
318 = fcn-cmp (supf ua) f mf fca (subst (λ k → FClosure A f k b ) (cong supf (sym eq)) fcb ) | |
319 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 | |
320 ... | case1 eq with s≤fc (supf ua) f mf fca | |
321 ... | case1 eq1 = tri≈ (λ lt → ⊥-elim (<-irr (case1 (sym ct00)) lt)) ct00 (λ lt → ⊥-elim (<-irr (case1 ct00) lt)) where | |
322 ct00 : * a ≡ * b | |
323 ct00 = sym (trans (cong (*) eq) eq1) | |
324 ... | case2 lt = tri> (λ lt → <-irr (case2 ct02) lt) (λ eq → <-irr (case1 eq) ct02) ct02 where | |
325 ct02 : * b < * a | |
326 ct02 = subst (λ k → * k < * a ) (sym eq) lt | |
327 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 | |
328 ct05 : * b < * (supf ua) | |
329 ct05 = lt | |
330 ct04 : * b < * a | |
331 ct04 with s≤fc (supf ua) f mf fca | |
332 ... | case1 eq = subst (λ k → * b < k ) eq ct05 | |
333 ... | case2 lt = IsStrictPartialOrder.trans POO ct05 lt | |
334 | |
694 | 335 ∈∧P→o< : {A : HOD } {y : Ordinal} → {P : Set n} → odef A y ∧ P → y o< & A |
336 ∈∧P→o< {A } {y} p = subst (λ k → k o< & A) &iso ( c<→o< (subst (λ k → odef A k ) (sym &iso ) (proj1 p ))) | |
337 | |
803 | 338 -- Union of supf z which o< x |
339 -- | |
694 | 340 UnionCF : ( A : HOD ) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) {y : Ordinal } (ay : odef A y ) |
341 ( supf : Ordinal → Ordinal ) ( x : Ordinal ) → HOD | |
342 UnionCF A f mf ay supf x | |
343 = 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 | 344 |
842 | 345 supf-inject0 : {x y : Ordinal } {supf : Ordinal → Ordinal } → (supf-mono : {x y : Ordinal } → x o≤ y → supf x o≤ supf y ) |
346 → supf x o< supf y → x o< y | |
347 supf-inject0 {x} {y} {supf} supf-mono sx<sy with trio< x y | |
348 ... | tri< a ¬b ¬c = a | |
349 ... | tri≈ ¬a refl ¬c = ⊥-elim ( o<¬≡ (cong supf refl) sx<sy ) | |
350 ... | tri> ¬a ¬b y<x with osuc-≡< (supf-mono (o<→≤ y<x) ) | |
351 ... | case1 eq = ⊥-elim ( o<¬≡ (sym eq) sx<sy ) | |
352 ... | case2 lt = ⊥-elim ( o<> sx<sy lt ) | |
353 | |
867 | 354 -- |
355 -- f (f ( ... (sup y))) f (f ( ... (sup z1))) | |
356 -- / | / | | |
357 -- / | / | | |
358 -- sup y < sup z1 < sup z2 | |
359 -- o< o< | |
360 | |
703 | 361 record ZChain ( A : HOD ) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) |
783 | 362 {y : Ordinal} (ay : odef A y) ( z : Ordinal ) : Set (Level.suc n) where |
655 | 363 field |
694 | 364 supf : Ordinal → Ordinal |
868 | 365 asupf : {x : Ordinal } → odef A (supf x) |
608
6655f03984f9
mutual tranfinite in zorn
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
607
diff
changeset
|
366 chain : HOD |
703 | 367 chain = UnionCF A f mf ay supf z |
861 | 368 chain⊆A : chain ⊆' A |
369 chain⊆A = λ lt → proj1 lt | |
568 | 370 field |
832 | 371 sup : {x : Ordinal } → x o≤ z → SUP A (UnionCF A f mf ay supf x) |
860
105f8d6c51fb
no-extension on immidate ordinal passed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
859
diff
changeset
|
372 sup=u : {b : Ordinal} → (ab : odef A b) → b o≤ z |
105f8d6c51fb
no-extension on immidate ordinal passed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
859
diff
changeset
|
373 → IsSup A (UnionCF A f mf ay supf b) ab ∧ (¬ HasPrev A (UnionCF A f mf ay supf b) b f) → supf b ≡ b |
832 | 374 supf-is-sup : {x : Ordinal } → (x≤z : x o≤ z) → supf x ≡ & (SUP.sup (sup x≤z) ) |
825 | 375 supf-mono : {x y : Ordinal } → x o≤ y → supf x o≤ supf y |
874 | 376 supf-max : {x : Ordinal } → supf x o≤ supf z |
871 | 377 supf-< : {x y : Ordinal } → supf x o< supf y → supf x << supf y |
874 | 378 csupf : {b : Ordinal } → supf b o< z → odef (UnionCF A f mf ay supf z) (supf b) |
861 | 379 chain∋init : odef chain y |
380 chain∋init = ⟪ ay , ch-init (init ay refl) ⟫ | |
381 f-next : {a : Ordinal} → odef chain a → odef chain (f a) | |
382 f-next {a} ⟪ aa , ch-init fc ⟫ = ⟪ proj2 (mf a aa) , ch-init (fsuc _ fc) ⟫ | |
383 f-next {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 ) ⟫ | |
384 initial : {z : Ordinal } → odef chain z → * y ≤ * z | |
385 initial {a} ⟪ aa , ua ⟫ with ua | |
386 ... | ch-init fc = s≤fc y f mf fc | |
387 ... | ch-is-sup u u≤x is-sup fc = ≤-ftrans (<=to≤ zc7) (s≤fc _ f mf fc) where | |
388 zc7 : y <= supf u | |
389 zc7 = ChainP.fcy<sup is-sup (init ay refl) | |
390 f-total : IsTotalOrderSet chain | |
391 f-total {a} {b} ca cb = subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso uz01 where | |
392 uz01 : Tri (* (& a) < * (& b)) (* (& a) ≡ * (& b)) (* (& b) < * (& a) ) | |
393 uz01 = chain-total A f mf ay supf ( (proj2 ca)) ( (proj2 cb)) | |
394 | |
871 | 395 supf-<= : {x y : Ordinal } → supf x <= supf y → supf x o≤ supf y |
396 supf-<= {x} {y} (case1 sx=sy) = o≤-refl0 sx=sy | |
397 supf-<= {x} {y} (case2 sx<sy) with trio< (supf x) (supf y) | |
398 ... | tri< a ¬b ¬c = o<→≤ a | |
399 ... | tri≈ ¬a b ¬c = o≤-refl0 b | |
400 ... | tri> ¬a ¬b c = ⊥-elim (<-irr (case2 sx<sy ) (supf-< c) ) | |
401 | |
825 | 402 supf-inject : {x y : Ordinal } → supf x o< supf y → x o< y |
403 supf-inject {x} {y} sx<sy with trio< x y | |
404 ... | tri< a ¬b ¬c = a | |
405 ... | tri≈ ¬a refl ¬c = ⊥-elim ( o<¬≡ (cong supf refl) sx<sy ) | |
406 ... | tri> ¬a ¬b y<x with osuc-≡< (supf-mono (o<→≤ y<x) ) | |
407 ... | case1 eq = ⊥-elim ( o<¬≡ (sym eq) sx<sy ) | |
408 ... | case2 lt = ⊥-elim ( o<> sx<sy lt ) | |
798 | 409 |
871 | 410 supf-idem : {x : Ordinal } → supf (supf x) ≡ supf x |
411 supf-idem = ? | |
412 | |
872 | 413 x≤supfx : (x : Ordinal ) → x o≤ supf x |
871 | 414 x≤supfx = ? |
803 | 415 |
845
ef7c721b32dc
csupf in not come from ZChain itself
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
844
diff
changeset
|
416 supf∈A : {b : Ordinal} → b o≤ z → odef A (supf b) |
ef7c721b32dc
csupf in not come from ZChain itself
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
844
diff
changeset
|
417 supf∈A {b} b≤z = subst (λ k → odef A k ) (sym (supf-is-sup b≤z)) ( SUP.as ( sup b≤z ) ) |
ef7c721b32dc
csupf in not come from ZChain itself
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
844
diff
changeset
|
418 |
872 | 419 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 |
420 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 | 421 , ch-init (subst (λ k → FClosure A f y k) (sym &iso) fc ) ⟫ |
872 | 422 ... | case1 eq = case1 (subst (λ k → k ≡ supf u ) &iso (trans (cong (&) eq) (sym (supf-is-sup u≤z ) ) )) |
423 ... | case2 lt = case2 (subst (λ k → * w < k ) (subst (λ k → k ≡ _ ) *iso (cong (*) (sym (supf-is-sup u≤z ))) ) lt ) | |
825 | 424 |
874 | 425 csupf1 : {b : Ordinal } → supf b o< z → odef (UnionCF A f mf ay supf z) (supf b) |
426 csupf1 {b} sb<z = ⟪ ? , ch-is-sup (supf b) ? record { fcy<sup = fcy<sup ? ; order = ? ; supu=u = ? } (init ? ? ) ⟫ | |
427 | |
871 | 428 -- ordering is not proved here but in ZChain1 |
756 | 429 |
728 | 430 record ZChain1 ( A : HOD ) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) |
783 | 431 {y : Ordinal} (ay : odef A y) (zc : ZChain A f mf ay (& A)) ( z : Ordinal ) : Set (Level.suc n) where |
869 | 432 supf = ZChain.supf zc |
728 | 433 field |
869 | 434 is-max : {a b : Ordinal } → (ca : odef (UnionCF A f mf ay supf z) a ) → b o< z → (ab : odef A b) |
435 → HasPrev A (UnionCF A f mf ay supf z) b f ∨ IsSup A (UnionCF A f mf ay supf z) ab | |
436 → * a < * b → odef ((UnionCF A f mf ay supf z)) b | |
728 | 437 |
568 | 438 record Maximal ( A : HOD ) : Set (Level.suc n) where |
439 field | |
440 maximal : HOD | |
804 | 441 as : A ∋ maximal |
568 | 442 ¬maximal<x : {x : HOD} → A ∋ x → ¬ maximal < x -- A is Partial, use negative |
567 | 443 |
743 | 444 init-uchain : (A : HOD) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) {y : Ordinal } → (ay : odef A y ) |
445 { supf : Ordinal → Ordinal } { x : Ordinal } → odef (UnionCF A f mf ay supf x) y | |
783 | 446 init-uchain A f mf ay = ⟪ ay , ch-init (init ay refl) ⟫ |
743 | 447 |
497 | 448 Zorn-lemma : { A : HOD } |
464 | 449 → o∅ o< & A |
568 | 450 → ( ( B : HOD) → (B⊆A : B ⊆' A) → IsTotalOrderSet B → SUP A B ) -- SUP condition |
497 | 451 → Maximal A |
552 | 452 Zorn-lemma {A} 0<A supP = zorn00 where |
571 | 453 <-irr0 : {a b : HOD} → A ∋ a → A ∋ b → (a ≡ b ) ∨ (a < b ) → b < a → ⊥ |
454 <-irr0 {a} {b} A∋a A∋b = <-irr | |
788 | 455 z07 : {y : Ordinal} {A : HOD } → {P : Set n} → odef A y ∧ P → y o< & A |
456 z07 {y} {A} p = subst (λ k → k o< & A) &iso ( c<→o< (subst (λ k → odef A k ) (sym &iso ) (proj1 p ))) | |
760 | 457 z09 : {b : Ordinal } { A : HOD } → odef A b → b o< & A |
458 z09 {b} {A} ab = subst (λ k → k o< & A) &iso ( c<→o< (subst (λ k → odef A k ) (sym &iso ) ab)) | |
530 | 459 s : HOD |
460 s = ODC.minimal O A (λ eq → ¬x<0 ( subst (λ k → o∅ o< k ) (=od∅→≡o∅ eq) 0<A )) | |
568 | 461 as : A ∋ * ( & s ) |
462 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
|
463 as0 : odef A (& s ) |
6655f03984f9
mutual tranfinite in zorn
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
607
diff
changeset
|
464 as0 = subst (λ k → odef A k ) &iso as |
547 | 465 s<A : & s o< & A |
568 | 466 s<A = c<→o< (subst (λ k → odef A (& k) ) *iso as ) |
530 | 467 HasMaximal : HOD |
537 | 468 HasMaximal = record { od = record { def = λ x → odef A x ∧ ( (m : Ordinal) → odef A m → ¬ (* x < * m)) } ; odmax = & A ; <odmax = z07 } |
469 no-maximum : HasMaximal =h= od∅ → (x : Ordinal) → odef A x ∧ ((m : Ordinal) → odef A m → odef A x ∧ (¬ (* x < * m) )) → ⊥ | |
470 no-maximum nomx x P = ¬x<0 (eq→ nomx {x} ⟪ proj1 P , (λ m ma p → proj2 ( proj2 P m ma ) p ) ⟫ ) | |
532 | 471 Gtx : { x : HOD} → A ∋ x → HOD |
537 | 472 Gtx {x} ax = record { od = record { def = λ y → odef A y ∧ (x < (* y)) } ; odmax = & A ; <odmax = z07 } |
473 z08 : ¬ Maximal A → HasMaximal =h= od∅ | |
804 | 474 z08 nmx = record { eq→ = λ {x} lt → ⊥-elim ( nmx record {maximal = * x ; as = subst (λ k → odef A k) (sym &iso) (proj1 lt) |
537 | 475 ; ¬maximal<x = λ {y} ay → subst (λ k → ¬ (* x < k)) *iso (proj2 lt (& y) ay) } ) ; eq← = λ {y} lt → ⊥-elim ( ¬x<0 lt )} |
476 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)) | |
477 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 | |
478 ¬x<m : ¬ (* x < * m) | |
479 ¬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 | 480 |
560 | 481 -- Uncountable ascending chain by axiom of choice |
530 | 482 cf : ¬ Maximal A → Ordinal → Ordinal |
532 | 483 cf nmx x with ODC.∋-p O A (* x) |
484 ... | no _ = o∅ | |
485 ... | yes ax with is-o∅ (& ( Gtx ax )) | |
538 | 486 ... | yes nogt = -- no larger element, so it is maximal |
487 ⊥-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 | 488 ... | no not = & (ODC.minimal O (Gtx ax) (λ eq → not (=od∅→≡o∅ eq))) |
537 | 489 is-cf : (nmx : ¬ Maximal A ) → {x : Ordinal} → odef A x → odef A (cf nmx x) ∧ ( * x < * (cf nmx x) ) |
490 is-cf nmx {x} ax with ODC.∋-p O A (* x) | |
491 ... | no not = ⊥-elim ( not (subst (λ k → odef A k ) (sym &iso) ax )) | |
492 ... | yes ax with is-o∅ (& ( Gtx ax )) | |
493 ... | 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 ⟫ ) | |
494 ... | no not = ODC.x∋minimal O (Gtx ax) (λ eq → not (=od∅→≡o∅ eq)) | |
606 | 495 |
496 --- | |
497 --- infintie ascention sequence of f | |
498 --- | |
530 | 499 cf-is-<-monotonic : (nmx : ¬ Maximal A ) → (x : Ordinal) → odef A x → ( * x < * (cf nmx x) ) ∧ odef A (cf nmx x ) |
537 | 500 cf-is-<-monotonic nmx x ax = ⟪ proj2 (is-cf nmx ax ) , proj1 (is-cf nmx ax ) ⟫ |
530 | 501 cf-is-≤-monotonic : (nmx : ¬ Maximal A ) → ≤-monotonic-f A ( cf nmx ) |
532 | 502 cf-is-≤-monotonic nmx x ax = ⟪ case2 (proj1 ( cf-is-<-monotonic nmx x ax )) , proj2 ( cf-is-<-monotonic nmx x ax ) ⟫ |
543 | 503 |
793 | 504 chain-mono : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) (supf : Ordinal → Ordinal ) |
505 {a b c : Ordinal} → a o≤ b | |
506 → odef (UnionCF A f mf ay supf a) c → odef (UnionCF A f mf ay supf b) c | |
507 chain-mono f mf ay supf {a} {b} {c} a≤b ⟪ ua , ch-init fc ⟫ = | |
508 ⟪ ua , ch-init fc ⟫ | |
509 chain-mono f mf ay supf {a} {b} {c} a≤b ⟪ uaa , ch-is-sup ua ua<x is-sup fc ⟫ = | |
863 | 510 ⟪ uaa , ch-is-sup ua (ordtrans<-≤ ua<x a≤b ) is-sup fc ⟫ |
793 | 511 |
703 | 512 sp0 : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) (zc : ZChain A f mf as0 (& A) ) |
653 | 513 (total : IsTotalOrderSet (ZChain.chain zc) ) → SUP A (ZChain.chain zc) |
703 | 514 sp0 f mf zc total = supP (ZChain.chain zc) (ZChain.chain⊆A zc) total |
543 | 515 zc< : {x y z : Ordinal} → {P : Set n} → (x o< y → P) → x o< z → z o< y → P |
516 zc< {x} {y} {z} {P} prev x<z z<y = prev (ordtrans x<z z<y) | |
517 | |
803 | 518 -- |
519 -- Second TransFinite Pass for maximality | |
520 -- | |
521 | |
793 | 522 SZ1 : ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) |
728 | 523 {init : Ordinal} (ay : odef A init) (zc : ZChain A f mf ay (& A)) (x : Ordinal) → ZChain1 A f mf ay zc x |
793 | 524 SZ1 f mf {y} ay zc x = TransFinite { λ x → ZChain1 A f mf ay zc x } zc1 x where |
525 chain-mono1 : {a b c : Ordinal} → a o≤ b | |
788 | 526 → odef (UnionCF A f mf ay (ZChain.supf zc) a) c → odef (UnionCF A f mf ay (ZChain.supf zc) b) c |
793 | 527 chain-mono1 {a} {b} {c} a≤b = chain-mono f mf ay (ZChain.supf zc) a≤b |
735 | 528 is-max-hp : (x : Ordinal) {a : Ordinal} {b : Ordinal} → odef (UnionCF A f mf ay (ZChain.supf zc) x) a → |
529 b o< x → (ab : odef A b) → | |
836 | 530 HasPrev A (UnionCF A f mf ay (ZChain.supf zc) x) b f → |
735 | 531 * a < * b → odef (UnionCF A f mf ay (ZChain.supf zc) x) b |
749 | 532 is-max-hp x {a} {b} ua b<x ab has-prev a<b with HasPrev.ay has-prev |
533 ... | ⟪ ab0 , ch-init fc ⟫ = ⟪ ab , ch-init ( subst (λ k → FClosure A f y k) (sym (HasPrev.x=fy has-prev)) (fsuc _ fc )) ⟫ | |
791 | 534 ... | ⟪ ab0 , ch-is-sup u u≤x is-sup fc ⟫ = ⟪ ab , |
749 | 535 subst (λ k → UChain A f mf ay (ZChain.supf zc) x k ) |
791 | 536 (sym (HasPrev.x=fy has-prev)) ( ch-is-sup u u≤x is-sup (fsuc _ fc)) ⟫ |
868 | 537 |
869 | 538 supf = ZChain.supf zc |
539 | |
540 csupf-fc : {b s z1 : Ordinal} → b o≤ & A → supf s o< supf b → FClosure A f (supf s) z1 → UnionCF A f mf ay supf b ∋ * z1 | |
541 csupf-fc {b} {s} {z1} b≤z ss<sb (init x refl ) = subst (λ k → odef (UnionCF A f mf ay supf b) k ) (sym &iso) zc05 where | |
542 s<b : s o< b | |
543 s<b = ZChain.supf-inject zc ss<sb | |
544 s≤<z : s o≤ & A | |
545 s≤<z = ordtrans s<b b≤z | |
870 | 546 zc04 : odef (UnionCF A f mf ay supf (& A)) (supf s) |
874 | 547 zc04 = ZChain.csupf zc (z09 (ZChain.asupf zc)) |
869 | 548 zc05 : odef (UnionCF A f mf ay supf b) (supf s) |
549 zc05 with zc04 | |
550 ... | ⟪ as , ch-init fc ⟫ = ⟪ as , ch-init fc ⟫ | |
871 | 551 ... | ⟪ as , ch-is-sup u u<x is-sup fc ⟫ = ⟪ as , ch-is-sup u (zc09 zc08) is-sup fc ⟫ where |
870 | 552 zc07 : FClosure A f (supf u) (supf s) -- supf u ≤ supf s → supf u o≤ supf s |
553 zc07 = fc | |
869 | 554 zc06 : supf u ≡ u |
555 zc06 = ChainP.supu=u is-sup | |
871 | 556 zc08 : u o≤ supf s |
557 zc08 = subst (λ k → k o≤ supf s) zc06 (ZChain.supf-<= zc (≤to<= ( s≤fc _ f mf fc ))) | |
870 | 558 zc09 : u o≤ supf s → u o< b |
559 zc09 u≤s with osuc-≡< u≤s | |
560 ... | case1 u=ss = ZChain.supf-inject zc (subst (λ k → k o< supf b) (sym (trans zc06 u=ss)) ss<sb ) | |
561 ... | case2 u<ss = ordtrans (ZChain.supf-inject zc (subst (λ k → k o< supf s) (sym zc06) u<ss)) s<b | |
869 | 562 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 |
563 zc04 : odef (UnionCF A f mf ay supf b) (f x) | |
564 zc04 with subst (λ k → odef (UnionCF A f mf ay supf b) k ) &iso (csupf-fc b<z ss≤sb fc ) | |
565 ... | ⟪ as , ch-init fc ⟫ = ⟪ proj2 (mf _ as) , ch-init (fsuc _ fc) ⟫ | |
566 ... | ⟪ as , ch-is-sup u u≤x is-sup fc ⟫ = ⟪ proj2 (mf _ as) , ch-is-sup u u≤x is-sup (fsuc _ fc) ⟫ | |
567 order : {b s z1 : Ordinal} → b o< & A → supf s o< supf b → FClosure A f (supf s) z1 → (z1 ≡ supf b) ∨ (z1 << supf b) | |
568 order {b} {s} {z1} b<z ss<sb fc = zc04 where | |
569 zc00 : ( * z1 ≡ SUP.sup (ZChain.sup zc (o<→≤ b<z) )) ∨ ( * z1 < SUP.sup ( ZChain.sup zc (o<→≤ b<z) ) ) | |
570 zc00 = SUP.x<sup (ZChain.sup zc (o<→≤ b<z) ) (csupf-fc (o<→≤ b<z) ss<sb fc ) | |
870 | 571 -- supf (supf b) ≡ supf b |
869 | 572 zc04 : (z1 ≡ supf b) ∨ (z1 << supf b) |
573 zc04 with zc00 | |
574 ... | case1 eq = case1 (subst₂ (λ j k → j ≡ k ) &iso (sym (ZChain.supf-is-sup zc (o<→≤ b<z)) ) (cong (&) eq) ) | |
575 ... | case2 lt = case2 (subst₂ (λ j k → j < k ) refl (subst₂ (λ j k → j ≡ k ) *iso refl (cong (*) (sym (ZChain.supf-is-sup zc (o<→≤ b<z) ) ))) lt ) | |
868 | 576 |
728 | 577 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
|
578 zc1 x prev with Oprev-p x |
756 | 579 ... | 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
|
580 px = Oprev.oprev op |
789 | 581 zc-b<x : {b : Ordinal } → b o< x → b o< osuc px |
582 zc-b<x {b} lt = subst (λ k → b o< k ) (sym (Oprev.oprev=x op)) lt | |
728 | 583 is-max : {a : Ordinal} {b : Ordinal} → odef (UnionCF A f mf ay (ZChain.supf zc) x) a → |
584 b o< x → (ab : odef A b) → | |
869 | 585 HasPrev A (UnionCF A f mf ay supf x) b f ∨ IsSup A (UnionCF A f mf ay supf x) ab → |
586 * a < * b → odef (UnionCF A f mf ay supf x) b | |
860
105f8d6c51fb
no-extension on immidate ordinal passed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
859
diff
changeset
|
587 is-max {a} {b} ua b<x ab P a<b with ODC.or-exclude O P |
105f8d6c51fb
no-extension on immidate ordinal passed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
859
diff
changeset
|
588 is-max {a} {b} ua b<x ab P a<b | case1 has-prev = is-max-hp x {a} {b} ua b<x ab has-prev a<b |
105f8d6c51fb
no-extension on immidate ordinal passed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
859
diff
changeset
|
589 is-max {a} {b} ua b<x ab P a<b | case2 is-sup |
863 | 590 = ⟪ ab , ch-is-sup b b<x m06 (subst (λ k → FClosure A f k b) (sym m05) (init ab refl)) ⟫ where |
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 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
|
592 b<A = z09 ab |
869 | 593 m04 : ¬ HasPrev A (UnionCF A f mf ay supf b) b f |
860
105f8d6c51fb
no-extension on immidate ordinal passed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
859
diff
changeset
|
594 m04 nhp = proj1 is-sup ( record { ax = HasPrev.ax nhp ; y = HasPrev.y nhp ; ay = chain-mono1 (o<→≤ b<x) (HasPrev.ay nhp) |
105f8d6c51fb
no-extension on immidate ordinal passed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
859
diff
changeset
|
595 ; x=fy = HasPrev.x=fy nhp } ) |
859 | 596 m05 : ZChain.supf zc b ≡ b |
597 m05 = ZChain.sup=u zc ab (o<→≤ (z09 ab) ) | |
860
105f8d6c51fb
no-extension on immidate ordinal passed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
859
diff
changeset
|
598 ⟪ record { x<sup = λ {z} uz → IsSup.x<sup (proj2 is-sup) (chain-mono1 (o<→≤ b<x) uz ) } , m04 ⟫ |
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
|
599 m08 : {z : Ordinal} → (fcz : FClosure A f y z ) → z <= ZChain.supf zc b |
872 | 600 m08 {z} fcz = ZChain.fcy<sup zc (o<→≤ b<A) fcz |
828 | 601 m09 : {s z1 : Ordinal} → ZChain.supf zc s o< ZChain.supf zc b |
825 | 602 → FClosure A f (ZChain.supf zc s) z1 → z1 <= ZChain.supf zc b |
869 | 603 m09 {s} {z} s<b fcz = order b<A s<b fcz |
604 m06 : ChainP A f mf ay supf b | |
859 | 605 m06 = record { fcy<sup = m08 ; order = m09 ; supu=u = m05 } |
756 | 606 ... | no lim = record { is-max = is-max } where |
869 | 607 is-max : {a : Ordinal} {b : Ordinal} → odef (UnionCF A f mf ay supf x) a → |
734 | 608 b o< x → (ab : odef A b) → |
869 | 609 HasPrev A (UnionCF A f mf ay supf x) b f ∨ IsSup A (UnionCF A f mf ay supf x) ab → |
610 * a < * b → odef (UnionCF A f mf ay supf x) b | |
860
105f8d6c51fb
no-extension on immidate ordinal passed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
859
diff
changeset
|
611 is-max {a} {b} ua b<x ab P a<b with ODC.or-exclude O P |
105f8d6c51fb
no-extension on immidate ordinal passed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
859
diff
changeset
|
612 is-max {a} {b} ua b<x ab P a<b | case1 has-prev = is-max-hp x {a} {b} ua b<x ab has-prev a<b |
105f8d6c51fb
no-extension on immidate ordinal passed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
859
diff
changeset
|
613 is-max {a} {b} ua b<x ab P a<b | case2 is-sup with IsSup.x<sup (proj2 is-sup) (init-uchain A f mf ay ) |
789 | 614 ... | 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 | 615 ... | case2 y<b = chain-mono1 (osucc b<x) |
863 | 616 ⟪ ab , ch-is-sup b <-osuc m06 (subst (λ k → FClosure A f k b) (sym m05) (init ab refl)) ⟫ where |
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
|
617 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
|
618 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
|
619 m07 : {z : Ordinal} → FClosure A f y z → z <= ZChain.supf zc b |
872 | 620 m07 {z} fc = ZChain.fcy<sup zc (o<→≤ m09) fc |
828 | 621 m08 : {s z1 : Ordinal} → ZChain.supf zc s o< ZChain.supf zc b |
825 | 622 → FClosure A f (ZChain.supf zc s) z1 → z1 <= ZChain.supf zc b |
869 | 623 m08 {s} {z1} s<b fc = order m09 s<b fc |
624 m04 : ¬ HasPrev A (UnionCF A f mf ay supf b) b f | |
860
105f8d6c51fb
no-extension on immidate ordinal passed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
859
diff
changeset
|
625 m04 nhp = proj1 is-sup ( record { ax = HasPrev.ax nhp ; y = HasPrev.y nhp ; ay = chain-mono1 (o<→≤ b<x) (HasPrev.ay nhp) |
105f8d6c51fb
no-extension on immidate ordinal passed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
859
diff
changeset
|
626 ; x=fy = HasPrev.x=fy nhp } ) |
859 | 627 m05 : ZChain.supf zc b ≡ b |
628 m05 = ZChain.sup=u zc ab (o<→≤ m09) | |
860
105f8d6c51fb
no-extension on immidate ordinal passed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
859
diff
changeset
|
629 ⟪ record { x<sup = λ lt → IsSup.x<sup (proj2 is-sup) (chain-mono1 (o<→≤ b<x) lt )} , m04 ⟫ -- ZChain on x |
869 | 630 m06 : ChainP A f mf ay supf b |
859 | 631 m06 = record { fcy<sup = m07 ; order = m08 ; supu=u = m05 } |
727 | 632 |
543 | 633 --- |
560 | 634 --- the maximum chain has fix point of any ≤-monotonic function |
543 | 635 --- |
703 | 636 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
|
637 → (total : IsTotalOrderSet (ZChain.chain zc) ) |
703 | 638 → f (& (SUP.sup (sp0 f mf zc total ))) ≡ & (SUP.sup (sp0 f mf zc total)) |
639 fixpoint f mf zc total = z14 where | |
538 | 640 chain = ZChain.chain zc |
703 | 641 sp1 = sp0 f mf zc total |
712 | 642 z10 : {a b : Ordinal } → (ca : odef chain a ) → b o< & A → (ab : odef A b ) |
836 | 643 → HasPrev A chain b f ∨ IsSup A chain {b} ab -- (supO chain (ZChain.chain⊆A zc) (ZChain.f-total zc) ≡ b ) |
538 | 644 → * a < * b → odef chain b |
793 | 645 z10 = ZChain1.is-max (SZ1 f mf as0 zc (& A) ) |
543 | 646 z11 : & (SUP.sup sp1) o< & A |
804 | 647 z11 = c<→o< ( SUP.as sp1) |
538 | 648 z12 : odef chain (& (SUP.sup sp1)) |
649 z12 with o≡? (& s) (& (SUP.sup sp1)) | |
653 | 650 ... | yes eq = subst (λ k → odef chain k) eq ( ZChain.chain∋init zc ) |
804 | 651 ... | no ne = z10 {& s} {& (SUP.sup sp1)} ( ZChain.chain∋init zc ) z11 (SUP.as sp1) |
570 | 652 (case2 z19 ) z13 where |
538 | 653 z13 : * (& s) < * (& (SUP.sup sp1)) |
653 | 654 z13 with SUP.x<sup sp1 ( ZChain.chain∋init zc ) |
538 | 655 ... | case1 eq = ⊥-elim ( ne (cong (&) eq) ) |
656 ... | case2 lt = subst₂ (λ j k → j < k ) (sym *iso) (sym *iso) lt | |
804 | 657 z19 : IsSup A chain {& (SUP.sup sp1)} (SUP.as sp1) |
571 | 658 z19 = record { x<sup = z20 } where |
659 z20 : {y : Ordinal} → odef chain y → (y ≡ & (SUP.sup sp1)) ∨ (y << & (SUP.sup sp1)) | |
660 z20 {y} zy with SUP.x<sup sp1 (subst (λ k → odef chain k ) (sym &iso) zy) | |
570 | 661 ... | case1 y=p = case1 (subst (λ k → k ≡ _ ) &iso ( cong (&) y=p )) |
662 ... | case2 y<p = case2 (subst (λ k → * y < k ) (sym *iso) y<p ) | |
663 -- λ {y} zy → subst (λ k → (y ≡ & k ) ∨ (y << & k)) ? (SUP.x<sup sp1 ? ) } | |
703 | 664 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
|
665 z14 with total (subst (λ k → odef chain k) (sym &iso) (ZChain.f-next zc z12 )) z12 |
631 | 666 ... | tri< a ¬b ¬c = ⊥-elim z16 where |
667 z16 : ⊥ | |
804 | 668 z16 with proj1 (mf (& ( SUP.sup sp1)) ( SUP.as sp1 )) |
631 | 669 ... | case1 eq = ⊥-elim (¬b (subst₂ (λ j k → j ≡ k ) refl *iso (sym eq) )) |
670 ... | case2 lt = ⊥-elim (¬c (subst₂ (λ j k → k < j ) refl *iso lt )) | |
671 ... | tri≈ ¬a b ¬c = subst ( λ k → k ≡ & (SUP.sup sp1) ) &iso ( cong (&) b ) | |
672 ... | tri> ¬a ¬b c = ⊥-elim z17 where | |
673 z15 : (* (f ( & ( SUP.sup sp1 ))) ≡ SUP.sup sp1) ∨ (* (f ( & ( SUP.sup sp1 ))) < SUP.sup sp1) | |
674 z15 = SUP.x<sup sp1 (subst (λ k → odef chain k ) (sym &iso) (ZChain.f-next zc z12 )) | |
675 z17 : ⊥ | |
676 z17 with z15 | |
677 ... | case1 eq = ¬b eq | |
678 ... | case2 lt = ¬a lt | |
560 | 679 |
680 -- ZChain contradicts ¬ Maximal | |
681 -- | |
571 | 682 -- ZChain forces fix point on any ≤-monotonic function (fixpoint) |
560 | 683 -- ¬ Maximal create cf which is a <-monotonic function by axiom of choice. This contradicts fix point of ZChain |
684 -- | |
697 | 685 z04 : (nmx : ¬ Maximal A ) |
703 | 686 → (zc : ZChain A (cf nmx) (cf-is-≤-monotonic nmx) as0 (& A)) |
664 | 687 → IsTotalOrderSet (ZChain.chain zc) → ⊥ |
804 | 688 z04 nmx zc total = <-irr0 {* (cf nmx c)} {* c} (subst (λ k → odef A k ) (sym &iso) (proj1 (is-cf nmx (SUP.as sp1 )))) |
689 (subst (λ k → odef A (& k)) (sym *iso) (SUP.as sp1) ) | |
703 | 690 (case1 ( cong (*)( fixpoint (cf nmx) (cf-is-≤-monotonic nmx ) zc total ))) -- x ≡ f x ̄ |
804 | 691 (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
|
692 sp1 : SUP A (ZChain.chain zc) |
703 | 693 sp1 = sp0 (cf nmx) (cf-is-≤-monotonic nmx) zc total |
538 | 694 c = & (SUP.sup sp1) |
548 | 695 |
757 | 696 uchain : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) → HOD |
697 uchain f mf {y} ay = record { od = record { def = λ x → FClosure A f y x } ; odmax = & A ; <odmax = | |
698 λ {z} cz → subst (λ k → k o< & A) &iso ( c<→o< (subst (λ k → odef A k ) (sym &iso ) (A∋fc y f mf cz ))) } | |
699 | |
700 utotal : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) | |
701 → IsTotalOrderSet (uchain f mf ay) | |
702 utotal f mf {y} ay {a} {b} ca cb = subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso uz01 where | |
703 uz01 : Tri (* (& a) < * (& b)) (* (& a) ≡ * (& b)) (* (& b) < * (& a) ) | |
704 uz01 = fcn-cmp y f mf ca cb | |
705 | |
706 ysup : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) | |
707 → SUP A (uchain f mf ay) | |
708 ysup f mf {y} ay = supP (uchain f mf ay) (λ lt → A∋fc y f mf lt) (utotal f mf ay) | |
709 | |
793 | 710 SUP⊆ : { B C : HOD } → B ⊆' C → SUP A C → SUP A B |
804 | 711 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 | 712 |
833 | 713 record xSUP (B : HOD) (x : Ordinal) : Set n where |
714 field | |
715 ax : odef A x | |
716 is-sup : IsSup A B ax | |
717 | |
560 | 718 -- |
547 | 719 -- create all ZChains under o< x |
560 | 720 -- |
608
6655f03984f9
mutual tranfinite in zorn
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
607
diff
changeset
|
721 |
674 | 722 ind : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) → (x : Ordinal) |
703 | 723 → ((z : Ordinal) → z o< x → ZChain A f mf ay z) → ZChain A f mf ay x |
707 | 724 ind f mf {y} ay x prev with Oprev-p x |
697 | 725 ... | yes op = zc4 where |
682 | 726 -- |
727 -- we have previous ordinal to use induction | |
728 -- | |
729 px = Oprev.oprev op | |
703 | 730 zc : ZChain A f mf ay (Oprev.oprev op) |
682 | 731 zc = prev px (subst (λ k → px o< k) (Oprev.oprev=x op) <-osuc ) |
732 px<x : px o< x | |
733 px<x = subst (λ k → px o< k) (Oprev.oprev=x op) <-osuc | |
709 | 734 zc-b<x : (b : Ordinal ) → b o< x → b o< osuc px |
735 zc-b<x b lt = subst (λ k → b o< k ) (sym (Oprev.oprev=x op)) lt | |
697 | 736 |
754 | 737 supf0 = ZChain.supf zc |
869 | 738 pchain : HOD |
739 pchain = UnionCF A f mf ay supf0 px | |
835 | 740 |
871 | 741 -- ¬ supf0 px ≡ px → UnionCF supf0 px ≡ UnionCF supf1 x |
742 -- supf1 x ≡ supf0 px | |
743 -- supf0 px ≡ px → ( UnionCF A f mf ay supf0 px ∪ FClosure px ) ≡ UnionCF supf1 x | |
744 -- supf1 x ≡ sup of ( UnionCF A f mf ay supf0 px ∪ FClosure px (= UnionCF supf1 x))) ≥ supf0 px | |
844 | 745 |
857 | 746 supf-mono : {a b : Ordinal } → a o≤ b → supf0 a o≤ supf0 b |
747 supf-mono = ZChain.supf-mono zc | |
844 | 748 |
861 | 749 zc04 : {b : Ordinal} → b o≤ x → (b o≤ px ) ∨ (b ≡ x ) |
750 zc04 {b} b≤x with trio< b px | |
751 ... | tri< a ¬b ¬c = case1 (o<→≤ a) | |
752 ... | tri≈ ¬a b ¬c = case1 (o≤-refl0 b) | |
753 ... | tri> ¬a ¬b px<b with osuc-≡< b≤x | |
754 ... | case1 eq = case2 eq | |
755 ... | case2 b<x = ⊥-elim ( ¬p<x<op ⟪ px<b , subst (λ k → b o< k ) (sym (Oprev.oprev=x op)) b<x ⟫ ) | |
840 | 756 |
611 | 757 -- if previous chain satisfies maximality, we caan reuse it |
758 -- | |
863 | 759 -- UninCF supf0 px previous chain u o< px, supf0 px is not included |
760 -- UninCF supf0 x supf0 px is included | |
761 -- supf0 px ≡ px | |
762 -- supf0 px ≡ supf0 x | |
805 | 763 |
858 | 764 no-extension : ( (¬ xSUP (UnionCF A f mf ay supf0 px) x ) ∨ HasPrev A pchain x f) → ZChain A f mf ay x |
872 | 765 no-extension P with osuc-≡< (ZChain.x≤supfx zc px) |
766 ... | case1 sfpx=px = ? where | |
871 | 767 pchainpx : HOD |
872 | 768 pchainpx = record { od = record { def = λ z → (odef A z ∧ UChain A f mf ay supf0 px z ) ∨ FClosure A f px z } ; odmax = & A ; <odmax = zc00 } where |
769 zc00 : {z : Ordinal } → (odef A z ∧ UChain A f mf ay supf0 px z ) ∨ FClosure A f px z → z o< & A | |
770 zc00 {z} (case1 lt) = z07 lt | |
771 zc00 {z} (case2 fc) = z09 ( A∋fc px f mf fc ) | |
772 zc01 : {z : Ordinal } → (odef A z ∧ UChain A f mf ay supf0 px z ) ∨ FClosure A f px z → odef A z | |
773 zc01 {z} (case1 lt) = proj1 lt | |
774 zc01 {z} (case2 fc) = ( A∋fc px f mf fc ) | |
775 | |
776 zc02 : { a b : Ordinal } → odef A a ∧ UChain A f mf ay supf0 px a → FClosure A f px b → a <= b | |
777 zc02 {a} {b} ca fb = zc05 fb where | |
778 zc06 : & (SUP.sup (ZChain.sup zc o≤-refl)) ≡ px | |
779 zc06 = trans (sym ( ZChain.supf-is-sup zc o≤-refl )) (sym sfpx=px) | |
780 zc05 : {b : Ordinal } → FClosure A f px b → a <= b | |
781 zc05 (fsuc b1 fb ) with proj1 ( mf b1 (A∋fc px f mf fb )) | |
782 ... | case1 eq = subst (λ k → a <= k ) (subst₂ (λ j k → j ≡ k) &iso &iso (cong (&) eq)) (zc05 fb) | |
783 ... | case2 lt = <-ftrans (zc05 fb) (case2 lt) | |
784 zc05 (init b1 refl) with SUP.x<sup (ZChain.sup zc o≤-refl) | |
785 (subst (λ k → odef A k ∧ UChain A f mf ay supf0 px k) (sym &iso) ca ) | |
786 ... | case1 eq = case1 (subst₂ (λ j k → j ≡ k ) &iso zc06 (cong (&) eq)) | |
787 ... | case2 lt = case2 (subst (λ k → (* a) < k ) (trans (sym *iso) (cong (*) zc06)) lt) | |
871 | 788 |
872 | 789 ptotal : IsTotalOrderSet pchainpx |
790 ptotal (case1 a) (case1 b) = subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso | |
791 (chain-total A f mf ay supf0 (proj2 a) (proj2 b)) | |
792 ptotal {a0} {b0} (case1 a) (case2 b) with zc02 a b | |
793 ... | case1 eq = tri≈ (<-irr (case1 (sym eq1))) eq1 (<-irr (case1 eq1)) where | |
794 eq1 : a0 ≡ b0 | |
795 eq1 = subst₂ (λ j k → j ≡ k ) *iso *iso (cong (*) eq ) | |
796 ... | case2 lt = tri< lt1 (λ eq → <-irr (case1 (sym eq)) lt1) (<-irr (case2 lt1)) where | |
797 lt1 : a0 < b0 | |
798 lt1 = subst₂ (λ j k → j < k ) *iso *iso lt | |
799 ptotal {b0} {a0} (case2 b) (case1 a) with zc02 a b | |
800 ... | case1 eq = tri≈ (<-irr (case1 eq1)) (sym eq1) (<-irr (case1 (sym eq1))) where | |
801 eq1 : a0 ≡ b0 | |
802 eq1 = subst₂ (λ j k → j ≡ k ) *iso *iso (cong (*) eq ) | |
803 ... | case2 lt = tri> (<-irr (case2 lt1)) (λ eq → <-irr (case1 eq) lt1) lt1 where | |
804 lt1 : a0 < b0 | |
805 lt1 = subst₂ (λ j k → j < k ) *iso *iso lt | |
806 ptotal (case2 a) (case2 b) = subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso (fcn-cmp px f mf a b) | |
807 | |
808 sup1 : SUP A pchainpx | |
809 sup1 = supP pchainpx zc01 ptotal | |
871 | 810 |
811 sp1 : Ordinal | |
872 | 812 sp1 = & (SUP.sup sup1 ) |
871 | 813 |
814 supf1 : Ordinal → Ordinal | |
815 supf1 z with trio< z px | |
816 ... | tri< a ¬b ¬c = supf0 z | |
872 | 817 ... | tri≈ ¬a b ¬c = px |
818 ... | tri> ¬a ¬b c = sp1 | |
871 | 819 |
820 pchainp : HOD | |
872 | 821 pchainp = UnionCF A f mf ay supf1 x |
871 | 822 |
874 | 823 zc16 : {z : Ordinal } → z o< px → supf1 z ≡ supf0 z |
824 zc16 {z} z<px with trio< z px | |
825 ... | tri< a ¬b ¬c = refl | |
826 ... | tri≈ ¬a b ¬c = ⊥-elim ( ¬a z<px ) | |
827 ... | tri> ¬a ¬b c = ⊥-elim ( ¬a z<px ) | |
828 | |
829 supf-mono1 : {z w : Ordinal } → z o≤ w → supf1 z o≤ supf1 w | |
830 supf-mono1 {z} {w} z≤w with trio< w px | |
831 ... | tri< a ¬b ¬c = subst₂ (λ j k → j o≤ k ) (sym (zc16 (ordtrans≤-< z≤w a))) refl ( supf-mono z≤w ) | |
832 ... | tri≈ ¬a refl ¬c with osuc-≡< z≤w | |
833 ... | case1 refl = o≤-refl0 zc17 where | |
834 zc17 : supf1 px ≡ px | |
835 zc17 with trio< px px | |
836 ... | tri< a ¬b ¬c = ⊥-elim ( ¬b refl ) | |
837 ... | tri≈ ¬a b ¬c = refl | |
838 ... | tri> ¬a ¬b c = ⊥-elim ( ¬b refl ) | |
839 ... | case2 lt = subst₂ (λ j k → j o≤ k ) (sym (zc16 lt)) (sym sfpx=px) ( supf-mono z≤w ) | |
840 supf-mono1 {z} {w} z≤w | tri> ¬a ¬b c with trio< z px | |
841 ... | tri< a ¬b ¬c = zc19 where | |
842 zc19 : supf0 z o≤ sp1 | |
843 zc19 = ? | |
844 ... | tri≈ ¬a b ¬c = zc18 where | |
845 zc18 : px o≤ sp1 | |
846 zc18 = ? | |
847 ... | tri> ¬a ¬b c = o≤-refl | |
848 | |
873 | 849 zc10 : {z : Ordinal} → OD.def (od pchain) z → OD.def (od pchainp) z |
850 zc10 {z} ⟪ az , ch-init fc ⟫ = ⟪ az , ch-init fc ⟫ | |
874 | 851 zc10 {z} ⟪ az , ch-is-sup u1 u1<x u1-is-sup fc ⟫ = ⟪ az , ch-is-sup u1 (ordtrans u1<x (pxo<x op)) zc15 zc14 ⟫ where |
852 zc14 : FClosure A f (supf1 u1) z | |
853 zc14 = subst (λ k → FClosure A f k z) (sym (zc16 u1<x)) fc | |
854 zc15 : ChainP A f mf ay supf1 u1 | |
855 zc15 = record { fcy<sup = λ {z} fcy → subst (λ k → (z ≡ k) ∨ ( z << k ) ) (sym (zc16 u1<x)) (ChainP.fcy<sup u1-is-sup fcy) | |
856 ; order = λ {s} {z1} lt fc1 → subst (λ k → (z1 ≡ k) ∨ ( z1 << k ) ) (sym (zc16 u1<x)) ( | |
857 ChainP.order u1-is-sup (subst₂ (λ j k → j o< k) (zc17 u1<x lt) (zc16 u1<x) lt) (subst (λ k → FClosure A f k z1) (zc17 u1<x lt) fc1) ) | |
858 ; supu=u = trans (zc16 u1<x) (ChainP.supu=u u1-is-sup) } where | |
859 zc17 : {s u : Ordinal } → u o< px → supf1 s o< supf1 u → supf1 s ≡ supf0 s | |
860 zc17 u1<x lt = zc16 (ordtrans ( supf-inject0 supf-mono1 lt) u1<x) | |
873 | 861 |
862 zc11 : {z : Ordinal} → z o< px → OD.def (od pchainp) z → OD.def (od pchain) z | |
863 zc11 {z} z<px ⟪ az , ch-init fc ⟫ = ⟪ az , ch-init fc ⟫ | |
864 zc11 {z} z<px ⟪ az , ch-is-sup u1 u1<x u1-is-sup fc ⟫ = ⟪ az , ch-is-sup u1 (ordtrans u1<x ?) ? ? ⟫ | |
865 | |
866 zc12 : {z : Ordinal} → OD.def (od pchainp) z → OD.def (od pchainpx) z | |
867 zc12 {z} ⟪ az , ch-init fc ⟫ = case1 ⟪ az , ch-init fc ⟫ | |
868 zc12 {z} ⟪ az , ch-is-sup u1 u1<x u1-is-sup fc ⟫ = ? | |
869 | |
870 zc13 : {z : Ordinal} → OD.def (od pchainpx) z → OD.def (od pchainp) z | |
871 zc13 {z} (case1 ⟪ az , ch-init fc ⟫ ) = ⟪ az , ch-init fc ⟫ | |
872 zc13 {z} (case1 ⟪ az , ch-is-sup u1 u1<x u1-is-sup fc ⟫ ) = ⟪ az , ch-is-sup u1 (ordtrans u1<x (pxo<x op)) ? ? ⟫ | |
873 zc13 {z} (case2 fc) = ⟪ ? , ch-is-sup ? ? ? ? ⟫ | |
874 | |
875 record STMP {z : Ordinal} (z≤x : z o≤ x ) : Set (Level.suc n) where | |
876 field | |
877 tsup : SUP A (UnionCF A f mf ay supf1 z) | |
878 tsup=sup : supf1 z ≡ & (SUP.sup tsup ) | |
879 | |
880 sup : {z : Ordinal} → (z≤x : z o≤ x ) → STMP z≤x | |
881 sup {z} z≤x with trio< z px | |
882 ... | tri< a ¬b ¬c = record { tsup = ? ; tsup=sup = ? } | |
883 ... | tri≈ ¬a b ¬c = record { tsup = ? ; tsup=sup = ? } | |
884 ... | tri> ¬a ¬b px<z = record { tsup = ? ; tsup=sup = ? } | |
871 | 885 |
886 ... | case2 px<spfx = record { supf = supf0 ; asupf = ZChain.asupf zc ; sup = λ lt → STMP.tsup (sup lt ) ; supf-mono = supf-mono | |
887 ; supf-< = ? ; sup=u = sup=u ; supf-is-sup = λ lt → STMP.tsup=sup (sup lt) } where | |
888 | |
872 | 889 supf1 : Ordinal → Ordinal |
890 supf1 z with trio< z px | |
871 | 891 ... | tri< a ¬b ¬c = supf0 z |
872 | 892 ... | tri≈ ¬a b ¬c = supf0 px |
871 | 893 ... | tri> ¬a ¬b c = supf0 px |
894 | |
874 | 895 zc16 : {z : Ordinal } → z o< px → supf1 z ≡ supf0 z |
896 zc16 {z} z<px with trio< z px | |
897 ... | tri< a ¬b ¬c = refl | |
898 ... | tri≈ ¬a b ¬c = ⊥-elim ( ¬a z<px ) | |
899 ... | tri> ¬a ¬b c = ⊥-elim ( ¬a z<px ) | |
900 | |
901 zc17 : {z : Ordinal } → supf0 z o≤ supf0 px | |
902 zc17 = ? -- px o< z, px o< supf0 px | |
903 | |
904 supf-mono1 : {z w : Ordinal } → z o≤ w → supf1 z o≤ supf1 w | |
905 supf-mono1 {z} {w} z≤w with trio< w px | |
906 ... | tri< a ¬b ¬c = subst₂ (λ j k → j o≤ k ) (sym (zc16 (ordtrans≤-< z≤w a))) refl ( supf-mono z≤w ) | |
907 ... | tri≈ ¬a refl ¬c with trio< z px | |
908 ... | tri< a ¬b ¬c = zc17 | |
909 ... | tri≈ ¬a refl ¬c = o≤-refl | |
910 ... | tri> ¬a ¬b c = o≤-refl | |
911 supf-mono1 {z} {w} z≤w | tri> ¬a ¬b c with trio< z px | |
912 ... | tri< a ¬b ¬c = zc17 | |
913 ... | tri≈ ¬a b ¬c = o≤-refl | |
914 ... | tri> ¬a ¬b c = o≤-refl | |
915 | |
872 | 916 pchain1 : HOD |
917 pchain1 = UnionCF A f mf ay supf1 x | |
871 | 918 |
863 | 919 zc10 : {z : Ordinal} → OD.def (od pchain) z → OD.def (od pchain1) z |
920 zc10 {z} ⟪ az , ch-init fc ⟫ = ⟪ az , ch-init fc ⟫ | |
872 | 921 zc10 {z} ⟪ az , ch-is-sup u1 u1<x u1-is-sup fc ⟫ = ⟪ az , ch-is-sup u1 (ordtrans u1<x (pxo<x op)) ? ? ⟫ |
873 | 922 |
923 zc111 : {z : Ordinal} → z o< px → OD.def (od pchain1) z → OD.def (od pchain) z | |
924 zc111 {z} z<px ⟪ az , ch-init fc ⟫ = ⟪ az , ch-init fc ⟫ | |
925 zc111 {z} z<px ⟪ az , ch-is-sup u1 u1<x u1-is-sup fc ⟫ = ⟪ az , ch-is-sup u1 (ordtrans u1<x ?) ? ? ⟫ | |
926 | |
863 | 927 zc11 : (¬ xSUP (UnionCF A f mf ay supf0 px) x ) ∨ (HasPrev A pchain x f ) |
864 | 928 → {z : Ordinal} → OD.def (od pchain1) z → OD.def (od pchain) z ∨ ( (supf0 px ≡ px) ∧ FClosure A f px z ) |
863 | 929 zc11 P {z} ⟪ az , ch-init fc ⟫ = case1 ⟪ az , ch-init fc ⟫ |
930 zc11 P {z} ⟪ az , ch-is-sup u1 u1<x u1-is-sup fc ⟫ with trio< u1 px | |
872 | 931 ... | tri< u1<px ¬b ¬c = case1 ⟪ az , ch-is-sup u1 u1<px ? fc ⟫ |
932 ... | tri≈ ¬a eq ¬c = case2 ⟪ subst (λ k → supf0 k ≡ k) eq s1u=u , subst (λ k → FClosure A f k z) zc12 ? ⟫ where | |
863 | 933 s1u=u : supf0 u1 ≡ u1 |
872 | 934 s1u=u = ? -- ChainP.supu=u u1-is-sup |
864 | 935 zc12 : supf0 u1 ≡ px |
872 | 936 zc12 = trans s1u=u eq |
863 | 937 zc11 (case1 ¬sp=x) {z} ⟪ az , ch-is-sup u1 u1<x u1-is-sup fc ⟫ | tri> ¬a ¬b px<u = ⊥-elim (¬sp=x zcsup) where |
938 eq : u1 ≡ x | |
939 eq with trio< u1 x | |
940 ... | tri< a ¬b ¬c = ⊥-elim ( ¬p<x<op ⟪ px<u , subst (λ k → u1 o< k ) (sym (Oprev.oprev=x op )) a ⟫ ) | |
941 ... | tri≈ ¬a b ¬c = b | |
942 ... | tri> ¬a ¬b c = ⊥-elim ( o<> u1<x c ) | |
943 s1u=x : supf0 u1 ≡ x | |
872 | 944 s1u=x = trans ? eq |
863 | 945 zc13 : osuc px o< osuc u1 |
946 zc13 = o≤-refl0 ( trans (Oprev.oprev=x op) (sym eq ) ) | |
947 x<sup : {w : Ordinal} → odef (UnionCF A f mf ay supf0 px) w → (w ≡ x) ∨ (w << x) | |
872 | 948 x<sup {w} ⟪ az , ch-init {w} fc ⟫ = subst (λ k → (w ≡ k) ∨ (w << k)) s1u=x ? |
863 | 949 x<sup {w} ⟪ az , ch-is-sup u u<x is-sup fc ⟫ with osuc-≡< ( supf-mono (ordtrans (o<→≤ u<x) zc13 )) |
950 ... | case1 eq1 = ⊥-elim ( o<¬≡ zc14 (o<→≤ u<x) ) where | |
851 | 951 zc14 : u ≡ osuc px |
952 zc14 = begin | |
953 u ≡⟨ sym ( ChainP.supu=u is-sup) ⟩ | |
857 | 954 supf0 u ≡⟨ eq1 ⟩ |
955 supf0 u1 ≡⟨ s1u=x ⟩ | |
851 | 956 x ≡⟨ sym (Oprev.oprev=x op) ⟩ |
957 osuc px ∎ where open ≡-Reasoning | |
872 | 958 ... | case2 lt = subst (λ k → (w ≡ k) ∨ (w << k)) s1u=x ? |
863 | 959 zc12 : supf0 x ≡ u1 |
872 | 960 zc12 = subst (λ k → supf0 k ≡ u1) eq ? |
863 | 961 zcsup : xSUP (UnionCF A f mf ay supf0 px) x |
868 | 962 zcsup = record { ax = subst (λ k → odef A k) (trans zc12 eq) (ZChain.asupf zc) |
851 | 963 ; is-sup = record { x<sup = x<sup } } |
872 | 964 zc11 (case2 hp) {z} ⟪ az , ch-is-sup u1 u1<x u1-is-sup fc ⟫ | tri> ¬a ¬b px<u = case1 ? where |
863 | 965 eq : u1 ≡ x |
864 | 966 eq with trio< u1 x |
967 ... | tri< a ¬b ¬c = ⊥-elim ( ¬p<x<op ⟪ px<u , subst (λ k → u1 o< k ) (sym (Oprev.oprev=x op )) a ⟫ ) | |
968 ... | tri≈ ¬a b ¬c = b | |
969 ... | tri> ¬a ¬b c = ⊥-elim ( o<> u1<x c ) | |
858 | 970 zc20 : {z : Ordinal} → FClosure A f (supf0 u1) z → OD.def (od pchain) z |
971 zc20 {z} (init asu su=z ) = zc13 where | |
972 zc14 : x ≡ z | |
973 zc14 = begin | |
974 x ≡⟨ sym eq ⟩ | |
872 | 975 u1 ≡⟨ sym ? ⟩ |
858 | 976 supf0 u1 ≡⟨ su=z ⟩ |
977 z ∎ where open ≡-Reasoning | |
978 zc13 : odef pchain z | |
979 zc13 = subst (λ k → odef pchain k) (trans (sym (HasPrev.x=fy hp)) zc14) ( ZChain.f-next zc (HasPrev.ay hp) ) | |
980 zc20 {.(f w)} (fsuc w fc) = ZChain.f-next zc (zc20 fc) | |
857 | 981 record STMP {z : Ordinal} (z≤x : z o≤ x ) : Set (Level.suc n) where |
982 field | |
983 tsup : SUP A (UnionCF A f mf ay supf0 z) | |
984 tsup=sup : supf0 z ≡ & (SUP.sup tsup ) | |
985 sup : {z : Ordinal} → (z≤x : z o≤ x ) → STMP z≤x | |
986 sup {z} z≤x with trio< z px | |
987 ... | tri< a ¬b ¬c = record { tsup = ZChain.sup zc (o<→≤ a) ; tsup=sup = ZChain.supf-is-sup zc (o<→≤ a) } | |
988 ... | tri≈ ¬a b ¬c = record { tsup = ZChain.sup zc (o≤-refl0 b) ; tsup=sup = ZChain.supf-is-sup zc (o≤-refl0 b) } | |
865 | 989 ... | tri> ¬a ¬b px<z = zc35 where |
840 | 990 zc30 : z ≡ x |
991 zc30 with osuc-≡< z≤x | |
992 ... | case1 eq = eq | |
993 ... | case2 z<x = ⊥-elim (¬p<x<op ⟪ px<z , subst (λ k → z o< k ) (sym (Oprev.oprev=x op)) z<x ⟫ ) | |
865 | 994 zc32 = ZChain.sup zc o≤-refl |
995 zc34 : ¬ (supf0 px ≡ px) → {w : HOD} → UnionCF A f mf ay supf0 z ∋ w → (w ≡ SUP.sup zc32) ∨ (w < SUP.sup zc32) | |
872 | 996 zc34 ne {w} lt with zc11 P ? |
864 | 997 ... | case1 lt = SUP.x<sup zc32 lt |
865 | 998 ... | case2 ⟪ spx=px , fc ⟫ = ⊥-elim ( ne spx=px ) |
857 | 999 zc33 : supf0 z ≡ & (SUP.sup zc32) |
868 | 1000 zc33 = ? -- trans (sym (supfx (o≤-refl0 (sym zc30)))) ( ZChain.supf-is-sup zc o≤-refl ) |
865 | 1001 zc36 : ¬ (supf0 px ≡ px) → STMP z≤x |
1002 zc36 ne = record { tsup = record { sup = SUP.sup zc32 ; as = SUP.as zc32 ; x<sup = zc34 ne } ; tsup=sup = zc33 } | |
1003 zc35 : STMP z≤x | |
1004 zc35 with trio< (supf0 px) px | |
1005 ... | tri< a ¬b ¬c = zc36 ¬b | |
1006 ... | tri> ¬a ¬b c = zc36 ¬b | |
1007 ... | tri≈ ¬a b ¬c = record { tsup = zc37 ; tsup=sup = ? } where | |
1008 zc37 : SUP A (UnionCF A f mf ay supf0 z) | |
1009 zc37 = record { sup = ? ; as = ? ; x<sup = ? } | |
803 | 1010 sup=u : {b : Ordinal} (ab : odef A b) → |
860
105f8d6c51fb
no-extension on immidate ordinal passed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
859
diff
changeset
|
1011 b o≤ x → IsSup A (UnionCF A f mf ay supf0 b) ab ∧ (¬ HasPrev A (UnionCF A f mf ay supf0 b) b f ) → supf0 b ≡ b |
814 | 1012 sup=u {b} ab b≤x is-sup with trio< b px |
860
105f8d6c51fb
no-extension on immidate ordinal passed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
859
diff
changeset
|
1013 ... | tri< a ¬b ¬c = ZChain.sup=u zc ab (o<→≤ a) ⟪ record { x<sup = λ lt → IsSup.x<sup (proj1 is-sup) lt } , proj2 is-sup ⟫ |
105f8d6c51fb
no-extension on immidate ordinal passed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
859
diff
changeset
|
1014 ... | tri≈ ¬a b ¬c = ZChain.sup=u zc ab (o≤-refl0 b) ⟪ record { x<sup = λ lt → IsSup.x<sup (proj1 is-sup) lt } , proj2 is-sup ⟫ |
858 | 1015 ... | tri> ¬a ¬b px<b = zc31 P where |
815 | 1016 zc30 : x ≡ b |
1017 zc30 with osuc-≡< b≤x | |
1018 ... | case1 eq = sym (eq) | |
1019 ... | case2 b<x = ⊥-elim (¬p<x<op ⟪ px<b , subst (λ k → b o< k ) (sym (Oprev.oprev=x op)) b<x ⟫ ) | |
859 | 1020 zcsup : xSUP (UnionCF A f mf ay supf0 px) x |
1021 zcsup with zc30 | |
1022 ... | refl = record { ax = ab ; is-sup = record { x<sup = λ {w} lt → | |
872 | 1023 IsSup.x<sup (proj1 is-sup) ?} } |
860
105f8d6c51fb
no-extension on immidate ordinal passed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
859
diff
changeset
|
1024 zc31 : ( (¬ xSUP (UnionCF A f mf ay supf0 px) x ) ∨ HasPrev A (UnionCF A f mf ay supf0 px) x f) → supf0 b ≡ b |
105f8d6c51fb
no-extension on immidate ordinal passed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
859
diff
changeset
|
1025 zc31 (case1 ¬sp=x) with zc30 |
105f8d6c51fb
no-extension on immidate ordinal passed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
859
diff
changeset
|
1026 ... | refl = ⊥-elim (¬sp=x zcsup ) |
105f8d6c51fb
no-extension on immidate ordinal passed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
859
diff
changeset
|
1027 zc31 (case2 hasPrev ) with zc30 |
863 | 1028 ... | refl = ⊥-elim ( proj2 is-sup record { ax = HasPrev.ax hasPrev ; y = HasPrev.y hasPrev |
872 | 1029 ; ay = ? ; x=fy = HasPrev.x=fy hasPrev } ) |
833 | 1030 |
703 | 1031 zc4 : ZChain A f mf ay x |
793 | 1032 zc4 with ODC.∋-p O A (* x) |
860
105f8d6c51fb
no-extension on immidate ordinal passed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
859
diff
changeset
|
1033 ... | no noax = no-extension (case1 ( λ s → noax (subst (λ k → odef A k ) (sym &iso) (xSUP.ax s) ))) -- ¬ A ∋ p, just skip |
836 | 1034 ... | yes ax with ODC.p∨¬p O ( HasPrev A (ZChain.chain zc ) x f ) |
703 | 1035 -- we have to check adding x preserve is-max ZChain A y f mf x |
860
105f8d6c51fb
no-extension on immidate ordinal passed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
859
diff
changeset
|
1036 ... | case1 pr = no-extension (case2 pr) -- we have previous A ∋ z < x , f z ≡ x, so chain ∋ f z ≡ x because of f-next |
793 | 1037 ... | case2 ¬fy<x with ODC.p∨¬p O (IsSup A (ZChain.chain zc ) ax ) |
872 | 1038 ... | case1 is-sup = ? -- x is a sup of zc |
860
105f8d6c51fb
no-extension on immidate ordinal passed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
859
diff
changeset
|
1039 ... | case2 ¬x=sup = no-extension (case1 nsup) where -- px is not f y' nor sup of former ZChain from y -- no extention |
105f8d6c51fb
no-extension on immidate ordinal passed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
859
diff
changeset
|
1040 nsup : ¬ xSUP (UnionCF A f mf ay supf0 px) x |
105f8d6c51fb
no-extension on immidate ordinal passed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
859
diff
changeset
|
1041 nsup s = ¬x=sup z12 where |
105f8d6c51fb
no-extension on immidate ordinal passed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
859
diff
changeset
|
1042 z12 : IsSup A (UnionCF A f mf ay supf0 px) ax |
105f8d6c51fb
no-extension on immidate ordinal passed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
859
diff
changeset
|
1043 z12 = record { x<sup = λ {z} lt → subst (λ k → (z ≡ k) ∨ (z << k )) (sym &iso) ( IsSup.x<sup ( xSUP.is-sup s ) lt ) } |
758
a2947dfff80d
is-max on first transfinite induction is not good
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
757
diff
changeset
|
1044 |
728 | 1045 ... | no lim = zc5 where |
726
b2e2cd12e38f
psupf-mono and is-max conflict
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
725
diff
changeset
|
1046 |
703 | 1047 pzc : (z : Ordinal) → z o< x → ZChain A f mf ay z |
1048 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
|
1049 |
835 | 1050 ysp = & (SUP.sup (ysup f mf ay)) |
755 | 1051 |
835 | 1052 supf0 : Ordinal → Ordinal |
1053 supf0 z with trio< z x | |
1054 ... | tri< a ¬b ¬c = ZChain.supf (pzc (osuc z) (ob<x lim a)) z | |
836 | 1055 ... | tri≈ ¬a b ¬c = ysp |
1056 ... | tri> ¬a ¬b c = ysp | |
835 | 1057 |
838 | 1058 pchain : HOD |
1059 pchain = UnionCF A f mf ay supf0 x | |
835 | 1060 |
838 | 1061 ptotal0 : IsTotalOrderSet pchain |
835 | 1062 ptotal0 {a} {b} ca cb = subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso uz01 where |
1063 uz01 : Tri (* (& a) < * (& b)) (* (& a) ≡ * (& b)) (* (& b) < * (& a) ) | |
1064 uz01 = chain-total A f mf ay supf0 ( (proj2 ca)) ( (proj2 cb)) | |
844 | 1065 |
838 | 1066 usup : SUP A pchain |
1067 usup = supP pchain (λ lt → proj1 lt) ptotal0 | |
835 | 1068 spu = & (SUP.sup usup) |
834 | 1069 |
794 | 1070 supf1 : Ordinal → Ordinal |
835 | 1071 supf1 z with trio< z x |
1072 ... | tri< a ¬b ¬c = ZChain.supf (pzc (osuc z) (ob<x lim a)) z | |
836 | 1073 ... | tri≈ ¬a b ¬c = spu |
1074 ... | tri> ¬a ¬b c = spu | |
755 | 1075 |
838 | 1076 pchain1 : HOD |
1077 pchain1 = UnionCF A f mf ay supf1 x | |
704 | 1078 |
758
a2947dfff80d
is-max on first transfinite induction is not good
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
757
diff
changeset
|
1079 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
|
1080 b o< x → (ab : odef A b) → |
836 | 1081 HasPrev A (UnionCF A f mf ay supf x) b f → |
758
a2947dfff80d
is-max on first transfinite induction is not good
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
757
diff
changeset
|
1082 * 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
|
1083 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
|
1084 ... | ⟪ ab0 , ch-init fc ⟫ = ⟪ ab , ch-init ( subst (λ k → FClosure A f y k) (sym (HasPrev.x=fy has-prev)) (fsuc _ fc )) ⟫ |
791 | 1085 ... | ⟪ 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
|
1086 subst (λ k → UChain A f mf ay supf x k ) |
794 | 1087 (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
|
1088 |
844 | 1089 zc70 : HasPrev A pchain x f → ¬ xSUP pchain x |
1090 zc70 pr xsup = ? | |
1091 | |
1092 no-extension : ¬ ( xSUP (UnionCF A f mf ay supf0 x) x ) → ZChain A f mf ay x | |
870 | 1093 no-extension ¬sp=x = record { supf = supf1 ; sup=u = sup=u |
868 | 1094 ; sup = sup ; supf-is-sup = sis ; supf-mono = {!!} ; asupf = ? } where |
795
408e7e8a3797
csupf depends on order cyclicly
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
794
diff
changeset
|
1095 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
|
1096 supfu {u} a z = ZChain.supf (pzc (osuc u) (ob<x lim a)) z |
838 | 1097 pchain0=1 : pchain ≡ pchain1 |
1098 pchain0=1 = ==→o≡ record { eq→ = zc10 ; eq← = zc11 } where | |
1099 zc10 : {z : Ordinal} → OD.def (od pchain) z → OD.def (od pchain1) z | |
1100 zc10 {z} ⟪ az , ch-init fc ⟫ = ⟪ az , ch-init fc ⟫ | |
1101 zc10 {z} ⟪ az , ch-is-sup u u≤x is-sup fc ⟫ = zc12 fc where | |
1102 zc12 : {z : Ordinal} → FClosure A f (supf0 u) z → odef pchain1 z | |
1103 zc12 (fsuc x fc) with zc12 fc | |
1104 ... | ⟪ ua1 , ch-init fc₁ ⟫ = ⟪ proj2 ( mf _ ua1) , ch-init (fsuc _ fc₁) ⟫ | |
1105 ... | ⟪ ua1 , ch-is-sup u u≤x is-sup fc₁ ⟫ = ⟪ proj2 ( mf _ ua1) , ch-is-sup u u≤x is-sup (fsuc _ fc₁) ⟫ | |
1106 zc12 (init asu su=z ) = ⟪ subst (λ k → odef A k) su=z asu , ch-is-sup u u≤x ? (init ? ? ) ⟫ | |
1107 zc11 : {z : Ordinal} → OD.def (od pchain1) z → OD.def (od pchain) z | |
1108 zc11 {z} ⟪ az , ch-init fc ⟫ = ⟪ az , ch-init fc ⟫ | |
863 | 1109 zc11 {z} ⟪ az , ch-is-sup u u<x is-sup fc ⟫ = zc13 fc where |
838 | 1110 zc13 : {z : Ordinal} → FClosure A f (supf1 u) z → odef pchain z |
1111 zc13 (fsuc x fc) with zc13 fc | |
1112 ... | ⟪ ua1 , ch-init fc₁ ⟫ = ⟪ proj2 ( mf _ ua1) , ch-init (fsuc _ fc₁) ⟫ | |
863 | 1113 ... | ⟪ ua1 , ch-is-sup u u<x is-sup fc₁ ⟫ = ⟪ proj2 ( mf _ ua1) , ch-is-sup u u<x is-sup (fsuc _ fc₁) ⟫ |
838 | 1114 zc13 (init asu su=z ) with trio< u x |
863 | 1115 ... | tri< a ¬b ¬c = ⟪ ? , ch-is-sup u u<x ? (init ? ? ) ⟫ |
838 | 1116 ... | tri≈ ¬a b ¬c = ? |
863 | 1117 ... | tri> ¬a ¬b c = ? -- ⊥-elim ( o≤> u<x c ) |
832 | 1118 sup : {z : Ordinal} → z o≤ x → SUP A (UnionCF A f mf ay supf1 z) |
797 | 1119 sup {z} z≤x with trio< z x |
838 | 1120 ... | tri< a ¬b ¬c = SUP⊆ ? (ZChain.sup (pzc (osuc z) {!!}) {!!} ) |
815 | 1121 ... | tri≈ ¬a b ¬c = {!!} |
843 | 1122 ... | tri> ¬a ¬b x<z = ⊥-elim (o<¬≡ refl (ordtrans<-≤ x<z z≤x )) |
832 | 1123 sis : {z : Ordinal} (x≤z : z o≤ x) → supf1 z ≡ & (SUP.sup (sup {!!})) |
843 | 1124 sis {z} z≤x with trio< z x |
800 | 1125 ... | tri< a ¬b ¬c = {!!} where |
815 | 1126 zc8 = ZChain.supf-is-sup (pzc z a) {!!} |
1127 ... | tri≈ ¬a b ¬c = {!!} | |
843 | 1128 ... | tri> ¬a ¬b x<z = ⊥-elim (o<¬≡ refl (ordtrans<-≤ x<z z≤x )) |
860
105f8d6c51fb
no-extension on immidate ordinal passed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
859
diff
changeset
|
1129 sup=u : {b : Ordinal} (ab : odef A b) → b o≤ x → IsSup A (UnionCF A f mf ay supf1 b) ab ∧ (¬ HasPrev A (UnionCF A f mf ay supf1 b) b f ) → supf1 b ≡ b |
843 | 1130 sup=u {z} ab z≤x is-sup with trio< z x |
833 | 1131 ... | tri< a ¬b ¬c = ? -- ZChain.sup=u (pzc (osuc b) (ob<x lim a)) ab {!!} record { x<sup = {!!} } |
815 | 1132 ... | tri≈ ¬a b ¬c = {!!} -- ZChain.sup=u (pzc (osuc ?) ?) ab {!!} record { x<sup = {!!} } |
843 | 1133 ... | tri> ¬a ¬b x<z = ⊥-elim (o<¬≡ refl (ordtrans<-≤ x<z z≤x )) |
797 | 1134 |
703 | 1135 zc5 : ZChain A f mf ay x |
697 | 1136 zc5 with ODC.∋-p O A (* x) |
796 | 1137 ... | no noax = no-extension {!!} -- ¬ A ∋ p, just skip |
836 | 1138 ... | yes ax with ODC.p∨¬p O ( HasPrev A pchain x f ) |
703 | 1139 -- we have to check adding x preserve is-max ZChain A y f mf x |
796 | 1140 ... | case1 pr = no-extension {!!} |
704 | 1141 ... | case2 ¬fy<x with ODC.p∨¬p O (IsSup A pchain ax ) |
861 | 1142 ... | case1 is-sup = record { supf = supf1 ; sup=u = {!!} |
868 | 1143 ; sup = {!!} ; supf-is-sup = {!!} ; supf-mono = {!!}; asupf = {!!} } -- where -- x is a sup of (zc ?) |
796 | 1144 ... | case2 ¬x=sup = no-extension {!!} -- x is not f y' nor sup of former ZChain from y -- no extention |
553 | 1145 |
703 | 1146 SZ : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) → {y : Ordinal} (ay : odef A y) → ZChain A f mf ay (& A) |
1147 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
|
1148 |
551 | 1149 zorn00 : Maximal A |
1150 zorn00 with is-o∅ ( & HasMaximal ) -- we have no Level (suc n) LEM | |
804 | 1151 ... | no not = record { maximal = ODC.minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) ; as = zorn01 ; ¬maximal<x = zorn02 } where |
551 | 1152 -- yes we have the maximal |
1153 zorn03 : odef HasMaximal ( & ( ODC.minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) ) ) | |
606 | 1154 zorn03 = ODC.x∋minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) -- Axiom of choice |
551 | 1155 zorn01 : A ∋ ODC.minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) |
1156 zorn01 = proj1 zorn03 | |
1157 zorn02 : {x : HOD} → A ∋ x → ¬ (ODC.minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) < x) | |
1158 zorn02 {x} ax m<x = proj2 zorn03 (& x) ax (subst₂ (λ j k → j < k) (sym *iso) (sym *iso) m<x ) | |
703 | 1159 ... | yes ¬Maximal = ⊥-elim ( z04 nmx zorn04 total ) where |
551 | 1160 -- if we have no maximal, make ZChain, which contradict SUP condition |
1161 nmx : ¬ Maximal A | |
1162 nmx mx = ∅< {HasMaximal} zc5 ( ≡o∅→=od∅ ¬Maximal ) where | |
1163 zc5 : odef A (& (Maximal.maximal mx)) ∧ (( y : Ordinal ) → odef A y → ¬ (* (& (Maximal.maximal mx)) < * y)) | |
804 | 1164 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 | 1165 zorn04 : ZChain A (cf nmx) (cf-is-≤-monotonic nmx) as0 (& A) |
653 | 1166 zorn04 = SZ (cf nmx) (cf-is-≤-monotonic nmx) (subst (λ k → odef A k ) &iso as ) |
634 | 1167 total : IsTotalOrderSet (ZChain.chain zorn04) |
654 | 1168 total {a} {b} = zorn06 where |
1169 zorn06 : odef (ZChain.chain zorn04) (& a) → odef (ZChain.chain zorn04) (& b) → Tri (a < b) (a ≡ b) (b < a) | |
1170 zorn06 = ZChain.f-total (SZ (cf nmx) (cf-is-≤-monotonic nmx) (subst (λ k → odef A k ) &iso as) ) | |
551 | 1171 |
516 | 1172 -- usage (see filter.agda ) |
1173 -- | |
497 | 1174 -- _⊆'_ : ( A B : HOD ) → Set n |
1175 -- _⊆'_ A B = (x : Ordinal ) → odef A x → odef B x | |
482 | 1176 |
497 | 1177 -- MaximumSubset : {L P : HOD} |
1178 -- → o∅ o< & L → o∅ o< & P → P ⊆ L | |
1179 -- → IsPartialOrderSet P _⊆'_ | |
1180 -- → ( (B : HOD) → B ⊆ P → IsTotalOrderSet B _⊆'_ → SUP P B _⊆'_ ) | |
1181 -- → Maximal P (_⊆'_) | |
1182 -- MaximumSubset {L} {P} 0<L 0<P P⊆L PO SP = Zorn-lemma {P} {_⊆'_} 0<P PO SP |