Mercurial > hg > Members > kono > Proof > ZF-in-agda
annotate src/zorn.agda @ 900:ac4daa43ef2a
roll back to u<x
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 07 Oct 2022 17:13:41 +0900 |
parents | 37a09244cebd |
children | 6146d75131f5 |
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 | |
879 | 100 -- <-TransFinite : {A x : HOD} → {P : HOD → Set n} → x ∈ A |
101 -- → ({x : HOD} → A ∋ x → ({y : HOD} → A ∋ y → y < x → P y ) → P x) → P x | |
102 -- <-TransFinite = ? | |
103 | |
530 | 104 -- |
560 | 105 -- Closure of ≤-monotonic function f has total order |
530 | 106 -- |
107 | |
108 ≤-monotonic-f : (A : HOD) → ( Ordinal → Ordinal ) → Set (Level.suc n) | |
109 ≤-monotonic-f A f = (x : Ordinal ) → odef A x → ( * x ≤ * (f x) ) ∧ odef A (f x ) | |
110 | |
551 | 111 data FClosure (A : HOD) (f : Ordinal → Ordinal ) (s : Ordinal) : Ordinal → Set n where |
783 | 112 init : {s1 : Ordinal } → odef A s → s ≡ s1 → FClosure A f s s1 |
555 | 113 fsuc : (x : Ordinal) ( p : FClosure A f s x ) → FClosure A f s (f x) |
554 | 114 |
556 | 115 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 | 116 A∋fc {A} s f mf (init as refl ) = as |
556 | 117 A∋fc {A} s f mf (fsuc y fcy) = proj2 (mf y ( A∋fc {A} s f mf fcy ) ) |
555 | 118 |
714 | 119 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 | 120 A∋fcs {A} s f mf (init as refl) = as |
714 | 121 A∋fcs {A} s f mf (fsuc y fcy) = A∋fcs {A} s f mf fcy |
122 | |
556 | 123 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 | 124 s≤fc {A} s {.s} f mf (init x refl ) = case1 refl |
556 | 125 s≤fc {A} s {.(f x)} f mf (fsuc x fcy) with proj1 (mf x (A∋fc s f mf fcy ) ) |
126 ... | case1 x=fx = subst (λ k → * s ≤ * k ) (*≡*→≡ x=fx) ( s≤fc {A} s f mf fcy ) | |
127 ... | case2 x<fx with s≤fc {A} s f mf fcy | |
128 ... | case1 s≡x = case2 ( subst₂ (λ j k → j < k ) (sym s≡x) refl x<fx ) | |
129 ... | case2 s<x = case2 ( IsStrictPartialOrder.trans PO s<x x<fx ) | |
555 | 130 |
800 | 131 fcn : {A : HOD} (s : Ordinal) { x : Ordinal} {f : Ordinal → Ordinal} → (mf : ≤-monotonic-f A f) → FClosure A f s x → ℕ |
132 fcn s mf (init as refl) = zero | |
133 fcn {A} s {x} {f} mf (fsuc y p) with proj1 (mf y (A∋fc s f mf p)) | |
134 ... | case1 eq = fcn s mf p | |
135 ... | case2 y<fy = suc (fcn s mf p ) | |
136 | |
137 fcn-inject : {A : HOD} (s : Ordinal) { x y : Ordinal} {f : Ordinal → Ordinal} → (mf : ≤-monotonic-f A f) | |
138 → (cx : FClosure A f s x ) (cy : FClosure A f s y ) → fcn s mf cx ≡ fcn s mf cy → * x ≡ * y | |
139 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 | |
140 fc06 : {y : Ordinal } { as : odef A s } (eq : s ≡ y ) { j : ℕ } → ¬ suc j ≡ fcn {A} s {y} {f} mf (init as eq ) | |
141 fc06 {x} {y} refl {j} not = fc08 not where | |
142 fc08 : {j : ℕ} → ¬ suc j ≡ 0 | |
143 fc08 () | |
144 fc07 : {x : Ordinal } (cx : FClosure A f s x ) → 0 ≡ fcn s mf cx → * s ≡ * x | |
145 fc07 {x} (init as refl) eq = refl | |
146 fc07 {.(f x)} (fsuc x cx) eq with proj1 (mf x (A∋fc s f mf cx ) ) | |
147 ... | case1 x=fx = subst (λ k → * s ≡ k ) x=fx ( fc07 cx eq ) | |
148 -- ... | case2 x<fx = ? | |
149 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 | |
150 fc00 (suc i) (suc j) x cx (init x₃ x₄) x₁ x₂ = ⊥-elim ( fc06 x₄ x₂ ) | |
151 fc00 (suc i) (suc j) x (init x₃ x₄) (fsuc x₅ cy) x₁ x₂ = ⊥-elim ( fc06 x₄ x₁ ) | |
152 fc00 zero zero refl (init _ refl) (init x₁ refl) i=x i=y = refl | |
153 fc00 zero zero refl (init as refl) (fsuc y cy) i=x i=y with proj1 (mf y (A∋fc s f mf cy ) ) | |
154 ... | 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 ) | |
155 fc00 zero zero refl (fsuc x cx) (init as refl) i=x i=y with proj1 (mf x (A∋fc s f mf cx ) ) | |
156 ... | 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 ) | |
157 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 ) ) | |
158 ... | 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 ) | |
159 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 ) ) | |
160 ... | 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 ) | |
161 ... | case1 x=fx | case2 y<fy = subst (λ k → k ≡ * (f y)) x=fx (fc02 x cx i=x) where | |
162 fc02 : (x1 : Ordinal) → (cx1 : FClosure A f s x1 ) → suc i ≡ fcn s mf cx1 → * x1 ≡ * (f y) | |
163 fc02 x1 (init x₁ x₂) x = ⊥-elim (fc06 x₂ x) | |
164 fc02 .(f x1) (fsuc x1 cx1) i=x1 with proj1 (mf x1 (A∋fc s f mf cx1 ) ) | |
165 ... | case1 eq = trans (sym eq) ( fc02 x1 cx1 i=x1 ) -- derefence while f x ≡ x | |
166 ... | case2 lt = subst₂ (λ j k → * (f j) ≡ * (f k )) &iso &iso ( cong (λ k → * ( f (& k ))) fc04) where | |
167 fc04 : * x1 ≡ * y | |
168 fc04 = fc00 i j (cong pred i=j) cx1 cy (cong pred i=x1) (cong pred j=y) | |
169 ... | case2 x<fx | case1 y=fy = subst (λ k → * (f x) ≡ k ) y=fy (fc03 y cy j=y) where | |
170 fc03 : (y1 : Ordinal) → (cy1 : FClosure A f s y1 ) → suc j ≡ fcn s mf cy1 → * (f x) ≡ * y1 | |
171 fc03 y1 (init x₁ x₂) x = ⊥-elim (fc06 x₂ x) | |
172 fc03 .(f y1) (fsuc y1 cy1) j=y1 with proj1 (mf y1 (A∋fc s f mf cy1 ) ) | |
173 ... | case1 eq = trans ( fc03 y1 cy1 j=y1 ) eq | |
174 ... | case2 lt = subst₂ (λ j k → * (f j) ≡ * (f k )) &iso &iso ( cong (λ k → * ( f (& k ))) fc05) where | |
175 fc05 : * x ≡ * y1 | |
176 fc05 = fc00 i j (cong pred i=j) cx cy1 (cong pred i=x) (cong pred j=y1) | |
177 ... | 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))) | |
178 | |
179 | |
180 fcn-< : {A : HOD} (s : Ordinal ) { x y : Ordinal} {f : Ordinal → Ordinal} → (mf : ≤-monotonic-f A f) | |
181 → (cx : FClosure A f s x ) (cy : FClosure A f s y ) → fcn s mf cx Data.Nat.< fcn s mf cy → * x < * y | |
182 fcn-< {A} s {x} {y} {f} mf cx cy x<y = fc01 (fcn s mf cy) cx cy refl x<y where | |
183 fc06 : {y : Ordinal } { as : odef A s } (eq : s ≡ y ) { j : ℕ } → ¬ suc j ≡ fcn {A} s {y} {f} mf (init as eq ) | |
184 fc06 {x} {y} refl {j} not = fc08 not where | |
185 fc08 : {j : ℕ} → ¬ suc j ≡ 0 | |
186 fc08 () | |
187 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 | |
188 fc01 (suc i) cx (init x₁ x₂) x (s≤s x₃) = ⊥-elim (fc06 x₂ x) | |
189 fc01 (suc i) {y} cx (fsuc y1 cy) i=y (s≤s x<i) with proj1 (mf y1 (A∋fc s f mf cy ) ) | |
190 ... | case1 y=fy = subst (λ k → * x < k ) y=fy ( fc01 (suc i) {y1} cx cy i=y (s≤s x<i) ) | |
191 ... | case2 y<fy with <-cmp (fcn s mf cx ) i | |
192 ... | tri> ¬a ¬b c = ⊥-elim ( nat-≤> x<i c ) | |
193 ... | tri≈ ¬a b ¬c = subst (λ k → k < * (f y1) ) (fcn-inject s mf cy cx (sym (trans b (cong pred i=y) ))) y<fy | |
194 ... | tri< a ¬b ¬c = IsStrictPartialOrder.trans PO fc02 y<fy where | |
195 fc03 : suc i ≡ suc (fcn s mf cy) → i ≡ fcn s mf cy | |
196 fc03 eq = cong pred eq | |
197 fc02 : * x < * y1 | |
198 fc02 = fc01 i cx cy (fc03 i=y ) a | |
199 | |
557 | 200 |
559 | 201 fcn-cmp : {A : HOD} (s : Ordinal) { x y : Ordinal } (f : Ordinal → Ordinal) (mf : ≤-monotonic-f A f) |
554 | 202 → (cx : FClosure A f s x) → (cy : FClosure A f s y ) → Tri (* x < * y) (* x ≡ * y) (* y < * x ) |
800 | 203 fcn-cmp {A} s {x} {y} f mf cx cy with <-cmp ( fcn s mf cx ) (fcn s mf cy ) |
204 ... | tri< a ¬b ¬c = tri< fc11 (λ eq → <-irr (case1 (sym eq)) fc11) (λ lt → <-irr (case2 fc11) lt) where | |
205 fc11 : * x < * y | |
206 fc11 = fcn-< {A} s {x} {y} {f} mf cx cy a | |
207 ... | tri≈ ¬a b ¬c = tri≈ (λ lt → <-irr (case1 (sym fc10)) lt) fc10 (λ lt → <-irr (case1 fc10) lt) where | |
208 fc10 : * x ≡ * y | |
209 fc10 = fcn-inject {A} s {x} {y} {f} mf cx cy b | |
210 ... | tri> ¬a ¬b c = tri> (λ lt → <-irr (case2 fc12) lt) (λ eq → <-irr (case1 eq) fc12) fc12 where | |
211 fc12 : * y < * x | |
212 fc12 = fcn-< {A} s {y} {x} {f} mf cy cx c | |
600 | 213 |
563 | 214 |
729 | 215 |
560 | 216 -- open import Relation.Binary.Properties.Poset as Poset |
217 | |
218 IsTotalOrderSet : ( A : HOD ) → Set (Level.suc n) | |
219 IsTotalOrderSet A = {a b : HOD} → odef A (& a) → odef A (& b) → Tri (a < b) (a ≡ b) (b < a ) | |
220 | |
567 | 221 ⊆-IsTotalOrderSet : { A B : HOD } → B ⊆ A → IsTotalOrderSet A → IsTotalOrderSet B |
568 | 222 ⊆-IsTotalOrderSet {A} {B} B⊆A T ax ay = T (incl B⊆A ax) (incl B⊆A ay) |
567 | 223 |
568 | 224 _⊆'_ : ( A B : HOD ) → Set n |
225 _⊆'_ A B = {x : Ordinal } → odef A x → odef B x | |
560 | 226 |
227 -- | |
228 -- inductive maxmum tree from x | |
229 -- tree structure | |
230 -- | |
554 | 231 |
836 | 232 record HasPrev (A B : HOD) (x : Ordinal ) ( f : Ordinal → Ordinal ) : Set n where |
533 | 233 field |
836 | 234 ax : odef A x |
534 | 235 y : Ordinal |
541 | 236 ay : odef B y |
534 | 237 x=fy : x ≡ f y |
529 | 238 |
570 | 239 record IsSup (A B : HOD) {x : Ordinal } (xa : odef A x) : Set n where |
654 | 240 field |
779 | 241 x<sup : {y : Ordinal} → odef B y → (y ≡ x ) ∨ (y << x ) |
568 | 242 |
656 | 243 record SUP ( A B : HOD ) : Set (Level.suc n) where |
244 field | |
245 sup : HOD | |
804 | 246 as : A ∋ sup |
656 | 247 x<sup : {x : HOD} → B ∋ x → (x ≡ sup ) ∨ (x < sup ) -- B is Total, use positive |
248 | |
690 | 249 -- |
250 -- sup and its fclosure is in a chain HOD | |
251 -- chain HOD is sorted by sup as Ordinal and <-ordered | |
252 -- whole chain is a union of separated Chain | |
803 | 253 -- minimum index is sup of y not ϕ |
690 | 254 -- |
255 | |
787 | 256 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 | 257 field |
765 | 258 fcy<sup : {z : Ordinal } → FClosure A f y z → (z ≡ supf u) ∨ ( z << supf u ) |
828 | 259 order : {s z1 : Ordinal} → (lt : supf s o< supf u ) → FClosure A f (supf s ) z1 → (z1 ≡ supf u ) ∨ ( z1 << supf u ) |
260 supu=u : supf u ≡ u | |
694 | 261 |
748 | 262 data UChain ( A : HOD ) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) {y : Ordinal } (ay : odef A y ) |
263 (supf : Ordinal → Ordinal) (x : Ordinal) : (z : Ordinal) → Set n where | |
264 ch-init : {z : Ordinal } (fc : FClosure A f y z) → UChain A f mf ay supf x z | |
900 | 265 ch-is-sup : (u : Ordinal) {z : Ordinal } (u≤x : u o< x) ( is-sup : ChainP A f mf ay supf u ) |
748 | 266 ( fc : FClosure A f (supf u) z ) → UChain A f mf ay supf x z |
694 | 267 |
878 | 268 -- |
269 -- f (f ( ... (sup y))) f (f ( ... (sup z1))) | |
270 -- / | / | | |
271 -- / | / | | |
272 -- sup y < sup z1 < sup z2 | |
273 -- o< o< | |
861 | 274 -- data UChain is total |
275 | |
276 chain-total : (A : HOD ) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) {y : Ordinal} (ay : odef A y) (supf : Ordinal → Ordinal ) | |
277 {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 ) | |
278 chain-total A f mf {y} ay supf {xa} {xb} {a} {b} ca cb = ct-ind xa xb ca cb where | |
279 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) | |
280 ct-ind xa xb {a} {b} (ch-init fca) (ch-init fcb) = fcn-cmp y f mf fca fcb | |
281 ct-ind xa xb {a} {b} (ch-init fca) (ch-is-sup ub u≤x supb fcb) with ChainP.fcy<sup supb fca | |
282 ... | case1 eq with s≤fc (supf ub) f mf fcb | |
283 ... | case1 eq1 = tri≈ (λ lt → ⊥-elim (<-irr (case1 (sym ct00)) lt)) ct00 (λ lt → ⊥-elim (<-irr (case1 ct00) lt)) where | |
284 ct00 : * a ≡ * b | |
285 ct00 = trans (cong (*) eq) eq1 | |
286 ... | case2 lt = tri< ct01 (λ eq → <-irr (case1 (sym eq)) ct01) (λ lt → <-irr (case2 ct01) lt) where | |
287 ct01 : * a < * b | |
288 ct01 = subst (λ k → * k < * b ) (sym eq) lt | |
289 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 | |
290 ct00 : * a < * (supf ub) | |
291 ct00 = lt | |
292 ct01 : * a < * b | |
293 ct01 with s≤fc (supf ub) f mf fcb | |
294 ... | case1 eq = subst (λ k → * a < k ) eq ct00 | |
295 ... | case2 lt = IsStrictPartialOrder.trans POO ct00 lt | |
296 ct-ind xa xb {a} {b} (ch-is-sup ua u≤x supa fca) (ch-init fcb) with ChainP.fcy<sup supa fcb | |
297 ... | case1 eq with s≤fc (supf ua) f mf fca | |
298 ... | case1 eq1 = tri≈ (λ lt → ⊥-elim (<-irr (case1 (sym ct00)) lt)) ct00 (λ lt → ⊥-elim (<-irr (case1 ct00) lt)) where | |
299 ct00 : * a ≡ * b | |
300 ct00 = sym (trans (cong (*) eq) eq1 ) | |
301 ... | case2 lt = tri> (λ lt → <-irr (case2 ct01) lt) (λ eq → <-irr (case1 eq) ct01) ct01 where | |
302 ct01 : * b < * a | |
303 ct01 = subst (λ k → * k < * a ) (sym eq) lt | |
304 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 | |
305 ct00 : * b < * (supf ua) | |
306 ct00 = lt | |
307 ct01 : * b < * a | |
308 ct01 with s≤fc (supf ua) f mf fca | |
309 ... | case1 eq = subst (λ k → * b < k ) eq ct00 | |
310 ... | case2 lt = IsStrictPartialOrder.trans POO ct00 lt | |
311 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 | |
312 ... | 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 | |
313 ... | case1 eq with s≤fc (supf ub) f mf fcb | |
314 ... | case1 eq1 = tri≈ (λ lt → ⊥-elim (<-irr (case1 (sym ct00)) lt)) ct00 (λ lt → ⊥-elim (<-irr (case1 ct00) lt)) where | |
315 ct00 : * a ≡ * b | |
316 ct00 = trans (cong (*) eq) eq1 | |
317 ... | case2 lt = tri< ct02 (λ eq → <-irr (case1 (sym eq)) ct02) (λ lt → <-irr (case2 ct02) lt) where | |
318 ct02 : * a < * b | |
319 ct02 = subst (λ k → * k < * b ) (sym eq) lt | |
320 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 | |
321 ct03 : * a < * (supf ub) | |
322 ct03 = lt | |
323 ct02 : * a < * b | |
324 ct02 with s≤fc (supf ub) f mf fcb | |
325 ... | case1 eq = subst (λ k → * a < k ) eq ct03 | |
326 ... | case2 lt = IsStrictPartialOrder.trans POO ct03 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 eq ¬c | |
328 = fcn-cmp (supf ua) f mf fca (subst (λ k → FClosure A f k b ) (cong supf (sym eq)) fcb ) | |
329 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 | |
330 ... | case1 eq with s≤fc (supf ua) f mf fca | |
331 ... | case1 eq1 = tri≈ (λ lt → ⊥-elim (<-irr (case1 (sym ct00)) lt)) ct00 (λ lt → ⊥-elim (<-irr (case1 ct00) lt)) where | |
332 ct00 : * a ≡ * b | |
333 ct00 = sym (trans (cong (*) eq) eq1) | |
334 ... | case2 lt = tri> (λ lt → <-irr (case2 ct02) lt) (λ eq → <-irr (case1 eq) ct02) ct02 where | |
335 ct02 : * b < * a | |
336 ct02 = subst (λ k → * k < * a ) (sym eq) lt | |
337 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 | |
338 ct05 : * b < * (supf ua) | |
339 ct05 = lt | |
340 ct04 : * b < * a | |
341 ct04 with s≤fc (supf ua) f mf fca | |
342 ... | case1 eq = subst (λ k → * b < k ) eq ct05 | |
343 ... | case2 lt = IsStrictPartialOrder.trans POO ct05 lt | |
344 | |
694 | 345 ∈∧P→o< : {A : HOD } {y : Ordinal} → {P : Set n} → odef A y ∧ P → y o< & A |
346 ∈∧P→o< {A } {y} p = subst (λ k → k o< & A) &iso ( c<→o< (subst (λ k → odef A k ) (sym &iso ) (proj1 p ))) | |
347 | |
803 | 348 -- Union of supf z which o< x |
349 -- | |
694 | 350 UnionCF : ( A : HOD ) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) {y : Ordinal } (ay : odef A y ) |
351 ( supf : Ordinal → Ordinal ) ( x : Ordinal ) → HOD | |
352 UnionCF A f mf ay supf x | |
894 | 353 = 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 | 354 |
842 | 355 supf-inject0 : {x y : Ordinal } {supf : Ordinal → Ordinal } → (supf-mono : {x y : Ordinal } → x o≤ y → supf x o≤ supf y ) |
356 → supf x o< supf y → x o< y | |
357 supf-inject0 {x} {y} {supf} supf-mono sx<sy with trio< x y | |
358 ... | tri< a ¬b ¬c = a | |
359 ... | tri≈ ¬a refl ¬c = ⊥-elim ( o<¬≡ (cong supf refl) sx<sy ) | |
360 ... | tri> ¬a ¬b y<x with osuc-≡< (supf-mono (o<→≤ y<x) ) | |
361 ... | case1 eq = ⊥-elim ( o<¬≡ (sym eq) sx<sy ) | |
362 ... | case2 lt = ⊥-elim ( o<> sx<sy lt ) | |
363 | |
879 | 364 record MinSUP ( A B : HOD ) : Set n where |
365 field | |
366 sup : Ordinal | |
367 asm : odef A sup | |
368 x<sup : {x : Ordinal } → odef B x → (x ≡ sup ) ∨ (x << sup ) | |
369 minsup : { sup1 : Ordinal } → odef A sup1 | |
370 → ( {x : Ordinal } → odef B x → (x ≡ sup1 ) ∨ (x << sup1 )) → sup o≤ sup1 | |
371 | |
372 z09 : {b : Ordinal } { A : HOD } → odef A b → b o< & A | |
373 z09 {b} {A} ab = subst (λ k → k o< & A) &iso ( c<→o< (subst (λ k → odef A k ) (sym &iso ) ab)) | |
374 | |
880 | 375 M→S : { A : HOD } { f : Ordinal → Ordinal } {mf : ≤-monotonic-f A f} {y : Ordinal} {ay : odef A y} { x : Ordinal } |
376 → (supf : Ordinal → Ordinal ) | |
377 → MinSUP A (UnionCF A f mf ay supf x) | |
378 → SUP A (UnionCF A f mf ay supf x) | |
379 M→S {A} {f} {mf} {y} {ay} {x} supf ms = record { sup = * (MinSUP.sup ms) | |
380 ; as = subst (λ k → odef A k) (sym &iso) (MinSUP.asm ms) ; x<sup = ms00 } where | |
381 msup = MinSUP.sup ms | |
382 ms00 : {z : HOD} → UnionCF A f mf ay supf x ∋ z → (z ≡ * msup) ∨ (z < * msup) | |
383 ms00 {z} uz with MinSUP.x<sup ms uz | |
384 ... | case1 eq = case1 (subst (λ k → k ≡ _) *iso ( cong (*) eq)) | |
385 ... | case2 lt = case2 (subst₂ (λ j k → j < k ) *iso refl lt ) | |
386 | |
867 | 387 |
703 | 388 record ZChain ( A : HOD ) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) |
783 | 389 {y : Ordinal} (ay : odef A y) ( z : Ordinal ) : Set (Level.suc n) where |
655 | 390 field |
694 | 391 supf : Ordinal → Ordinal |
880 | 392 sup=u : {b : Ordinal} → (ab : odef A b) → b o≤ z |
393 → IsSup A (UnionCF A f mf ay supf b) ab ∧ (¬ HasPrev A (UnionCF A f mf ay supf b) b f) → supf b ≡ b | |
394 | |
868 | 395 asupf : {x : Ordinal } → odef A (supf x) |
880 | 396 supf-mono : {x y : Ordinal } → x o≤ y → supf x o≤ supf y |
397 supf-< : {x y : Ordinal } → supf x o< supf y → supf x << supf y | |
891 | 398 supfmax : {x : Ordinal } → z o< x → supf x ≡ supf z |
880 | 399 |
400 minsup : {x : Ordinal } → x o≤ z → MinSUP A (UnionCF A f mf ay supf x) | |
891 | 401 supf-is-minsup : {x : Ordinal } → (x≤z : x o≤ z) → supf x ≡ MinSUP.sup ( minsup x≤z ) |
880 | 402 csupf : {b : Ordinal } → supf b o< z → odef (UnionCF A f mf ay supf z) (supf b) -- supf z is not an element of this chain |
403 | |
608
6655f03984f9
mutual tranfinite in zorn
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
607
diff
changeset
|
404 chain : HOD |
703 | 405 chain = UnionCF A f mf ay supf z |
861 | 406 chain⊆A : chain ⊆' A |
407 chain⊆A = λ lt → proj1 lt | |
879 | 408 sup : {x : Ordinal } → x o≤ z → SUP A (UnionCF A f mf ay supf x) |
880 | 409 sup {x} x≤z = M→S supf (minsup x≤z) |
891 | 410 -- supf-sup<minsup : {x : Ordinal } → (x≤z : x o≤ z) → & (SUP.sup (M→S supf (minsup x≤z) )) o≤ supf x ... supf-mono |
878 | 411 |
861 | 412 chain∋init : odef chain y |
413 chain∋init = ⟪ ay , ch-init (init ay refl) ⟫ | |
414 f-next : {a : Ordinal} → odef chain a → odef chain (f a) | |
415 f-next {a} ⟪ aa , ch-init fc ⟫ = ⟪ proj2 (mf a aa) , ch-init (fsuc _ fc) ⟫ | |
416 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 ) ⟫ | |
417 initial : {z : Ordinal } → odef chain z → * y ≤ * z | |
418 initial {a} ⟪ aa , ua ⟫ with ua | |
419 ... | ch-init fc = s≤fc y f mf fc | |
420 ... | ch-is-sup u u≤x is-sup fc = ≤-ftrans (<=to≤ zc7) (s≤fc _ f mf fc) where | |
421 zc7 : y <= supf u | |
422 zc7 = ChainP.fcy<sup is-sup (init ay refl) | |
423 f-total : IsTotalOrderSet chain | |
424 f-total {a} {b} ca cb = subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso uz01 where | |
425 uz01 : Tri (* (& a) < * (& b)) (* (& a) ≡ * (& b)) (* (& b) < * (& a) ) | |
426 uz01 = chain-total A f mf ay supf ( (proj2 ca)) ( (proj2 cb)) | |
427 | |
871 | 428 supf-<= : {x y : Ordinal } → supf x <= supf y → supf x o≤ supf y |
429 supf-<= {x} {y} (case1 sx=sy) = o≤-refl0 sx=sy | |
430 supf-<= {x} {y} (case2 sx<sy) with trio< (supf x) (supf y) | |
431 ... | tri< a ¬b ¬c = o<→≤ a | |
432 ... | tri≈ ¬a b ¬c = o≤-refl0 b | |
433 ... | tri> ¬a ¬b c = ⊥-elim (<-irr (case2 sx<sy ) (supf-< c) ) | |
434 | |
825 | 435 supf-inject : {x y : Ordinal } → supf x o< supf y → x o< y |
436 supf-inject {x} {y} sx<sy with trio< x y | |
437 ... | tri< a ¬b ¬c = a | |
438 ... | tri≈ ¬a refl ¬c = ⊥-elim ( o<¬≡ (cong supf refl) sx<sy ) | |
439 ... | tri> ¬a ¬b y<x with osuc-≡< (supf-mono (o<→≤ y<x) ) | |
440 ... | case1 eq = ⊥-elim ( o<¬≡ (sym eq) sx<sy ) | |
441 ... | case2 lt = ⊥-elim ( o<> sx<sy lt ) | |
798 | 442 |
845
ef7c721b32dc
csupf in not come from ZChain itself
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
844
diff
changeset
|
443 supf∈A : {b : Ordinal} → b o≤ z → odef A (supf b) |
891 | 444 supf∈A {b} b≤z = subst (λ k → odef A k ) (sym (supf-is-minsup b≤z)) ( MinSUP.asm ( minsup b≤z ) ) |
845
ef7c721b32dc
csupf in not come from ZChain itself
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
844
diff
changeset
|
445 |
879 | 446 -- supf-idem : {x : Ordinal } → supf x o≤ z → supf (supf x) ≡ supf x |
447 -- supf-idem {x} sx≤z = sup=u (supf∈A ?) sx≤z ? | |
448 | |
872 | 449 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 |
891 | 450 fcy<sup {u} {w} u≤z fc with MinSUP.x<sup (minsup u≤z) ⟪ subst (λ k → odef A k ) (sym &iso) (A∋fc {A} y f mf fc) |
798 | 451 , ch-init (subst (λ k → FClosure A f y k) (sym &iso) fc ) ⟫ |
892 | 452 ... | case1 eq = case1 (subst (λ k → k ≡ supf u ) &iso (trans eq (sym (supf-is-minsup u≤z ) ) )) |
453 ... | case2 lt = case2 (subst₂ (λ j k → j << k ) &iso (sym (supf-is-minsup u≤z )) lt ) | |
825 | 454 |
871 | 455 -- ordering is not proved here but in ZChain1 |
756 | 456 |
728 | 457 record ZChain1 ( A : HOD ) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) |
783 | 458 {y : Ordinal} (ay : odef A y) (zc : ZChain A f mf ay (& A)) ( z : Ordinal ) : Set (Level.suc n) where |
869 | 459 supf = ZChain.supf zc |
728 | 460 field |
897 | 461 is-max : {a b : Ordinal } → (ca : odef (UnionCF A f mf ay supf z) a ) → b o< z → (ab : odef A b) |
869 | 462 → HasPrev A (UnionCF A f mf ay supf z) b f ∨ IsSup A (UnionCF A f mf ay supf z) ab |
463 → * a < * b → odef ((UnionCF A f mf ay supf z)) b | |
728 | 464 |
568 | 465 record Maximal ( A : HOD ) : Set (Level.suc n) where |
466 field | |
467 maximal : HOD | |
804 | 468 as : A ∋ maximal |
568 | 469 ¬maximal<x : {x : HOD} → A ∋ x → ¬ maximal < x -- A is Partial, use negative |
567 | 470 |
743 | 471 init-uchain : (A : HOD) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) {y : Ordinal } → (ay : odef A y ) |
472 { supf : Ordinal → Ordinal } { x : Ordinal } → odef (UnionCF A f mf ay supf x) y | |
783 | 473 init-uchain A f mf ay = ⟪ ay , ch-init (init ay refl) ⟫ |
743 | 474 |
497 | 475 Zorn-lemma : { A : HOD } |
464 | 476 → o∅ o< & A |
568 | 477 → ( ( B : HOD) → (B⊆A : B ⊆' A) → IsTotalOrderSet B → SUP A B ) -- SUP condition |
497 | 478 → Maximal A |
552 | 479 Zorn-lemma {A} 0<A supP = zorn00 where |
571 | 480 <-irr0 : {a b : HOD} → A ∋ a → A ∋ b → (a ≡ b ) ∨ (a < b ) → b < a → ⊥ |
481 <-irr0 {a} {b} A∋a A∋b = <-irr | |
788 | 482 z07 : {y : Ordinal} {A : HOD } → {P : Set n} → odef A y ∧ P → y o< & A |
483 z07 {y} {A} p = subst (λ k → k o< & A) &iso ( c<→o< (subst (λ k → odef A k ) (sym &iso ) (proj1 p ))) | |
530 | 484 s : HOD |
485 s = ODC.minimal O A (λ eq → ¬x<0 ( subst (λ k → o∅ o< k ) (=od∅→≡o∅ eq) 0<A )) | |
568 | 486 as : A ∋ * ( & s ) |
487 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
|
488 as0 : odef A (& s ) |
6655f03984f9
mutual tranfinite in zorn
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
607
diff
changeset
|
489 as0 = subst (λ k → odef A k ) &iso as |
547 | 490 s<A : & s o< & A |
568 | 491 s<A = c<→o< (subst (λ k → odef A (& k) ) *iso as ) |
530 | 492 HasMaximal : HOD |
537 | 493 HasMaximal = record { od = record { def = λ x → odef A x ∧ ( (m : Ordinal) → odef A m → ¬ (* x < * m)) } ; odmax = & A ; <odmax = z07 } |
494 no-maximum : HasMaximal =h= od∅ → (x : Ordinal) → odef A x ∧ ((m : Ordinal) → odef A m → odef A x ∧ (¬ (* x < * m) )) → ⊥ | |
495 no-maximum nomx x P = ¬x<0 (eq→ nomx {x} ⟪ proj1 P , (λ m ma p → proj2 ( proj2 P m ma ) p ) ⟫ ) | |
532 | 496 Gtx : { x : HOD} → A ∋ x → HOD |
537 | 497 Gtx {x} ax = record { od = record { def = λ y → odef A y ∧ (x < (* y)) } ; odmax = & A ; <odmax = z07 } |
498 z08 : ¬ Maximal A → HasMaximal =h= od∅ | |
804 | 499 z08 nmx = record { eq→ = λ {x} lt → ⊥-elim ( nmx record {maximal = * x ; as = subst (λ k → odef A k) (sym &iso) (proj1 lt) |
537 | 500 ; ¬maximal<x = λ {y} ay → subst (λ k → ¬ (* x < k)) *iso (proj2 lt (& y) ay) } ) ; eq← = λ {y} lt → ⊥-elim ( ¬x<0 lt )} |
501 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)) | |
502 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 | |
503 ¬x<m : ¬ (* x < * m) | |
504 ¬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 | 505 |
879 | 506 minsupP : ( B : HOD) → (B⊆A : B ⊆' A) → IsTotalOrderSet B → MinSUP A B |
507 minsupP B B⊆A total = m02 where | |
508 xsup : (sup : Ordinal ) → Set n | |
509 xsup sup = {w : Ordinal } → odef B w → (w ≡ sup ) ∨ (w << sup ) | |
510 ∀-imply-or : {A : Ordinal → Set n } {B : Set n } | |
511 → ((x : Ordinal ) → A x ∨ B) → ((x : Ordinal ) → A x) ∨ B | |
512 ∀-imply-or {A} {B} ∀AB with ODC.p∨¬p O ((x : Ordinal ) → A x) -- LEM | |
513 ∀-imply-or {A} {B} ∀AB | case1 t = case1 t | |
514 ∀-imply-or {A} {B} ∀AB | case2 x = case2 (lemma (λ not → x not )) where | |
515 lemma : ¬ ((x : Ordinal ) → A x) → B | |
516 lemma not with ODC.p∨¬p O B | |
517 lemma not | case1 b = b | |
518 lemma not | case2 ¬b = ⊥-elim (not (λ x → dont-orb (∀AB x) ¬b )) | |
519 m00 : (x : Ordinal ) → ( ( z : Ordinal) → z o< x → ¬ (odef A z ∧ xsup z) ) ∨ MinSUP A B | |
520 m00 x = TransFinite0 ind x where | |
521 ind : (x : Ordinal) → ((z : Ordinal) → z o< x → ( ( w : Ordinal) → w o< z → ¬ (odef A w ∧ xsup w )) ∨ MinSUP A B) | |
522 → ( ( w : Ordinal) → w o< x → ¬ (odef A w ∧ xsup w) ) ∨ MinSUP A B | |
523 ind x prev = ∀-imply-or m01 where | |
524 m01 : (z : Ordinal) → (z o< x → ¬ (odef A z ∧ xsup z)) ∨ MinSUP A B | |
525 m01 z with trio< z x | |
526 ... | tri≈ ¬a b ¬c = case1 ( λ lt → ⊥-elim ( ¬a lt ) ) | |
527 ... | tri> ¬a ¬b c = case1 ( λ lt → ⊥-elim ( ¬a lt ) ) | |
528 ... | tri< a ¬b ¬c with prev z a | |
529 ... | case2 mins = case2 mins | |
530 ... | case1 not with ODC.p∨¬p O (odef A z ∧ xsup z) | |
531 ... | case1 mins = case2 record { sup = z ; asm = proj1 mins ; x<sup = proj2 mins ; minsup = m04 } where | |
532 m04 : {sup1 : Ordinal} → odef A sup1 → ({w : Ordinal} → odef B w → (w ≡ sup1) ∨ (w << sup1)) → z o≤ sup1 | |
533 m04 {s} as lt with trio< z s | |
534 ... | tri< a ¬b ¬c = o<→≤ a | |
535 ... | tri≈ ¬a b ¬c = o≤-refl0 b | |
536 ... | tri> ¬a ¬b s<z = ⊥-elim ( not s s<z ⟪ as , lt ⟫ ) | |
537 ... | case2 notz = case1 (λ _ → notz ) | |
538 m03 : ¬ ((z : Ordinal) → z o< & A → ¬ odef A z ∧ xsup z) | |
539 m03 not = ⊥-elim ( not s1 (z09 (SUP.as S)) ⟪ SUP.as S , m05 ⟫ ) where | |
540 S : SUP A B | |
541 S = supP B B⊆A total | |
542 s1 = & (SUP.sup S) | |
543 m05 : {w : Ordinal } → odef B w → (w ≡ s1 ) ∨ (w << s1 ) | |
544 m05 {w} bw with SUP.x<sup S {* w} (subst (λ k → odef B k) (sym &iso) bw ) | |
545 ... | case1 eq = case1 ( subst₂ (λ j k → j ≡ k ) &iso refl (cong (&) eq) ) | |
546 ... | case2 lt = case2 ( subst (λ k → _ < k ) (sym *iso) lt ) | |
547 m02 : MinSUP A B | |
548 m02 = dont-or (m00 (& A)) m03 | |
549 | |
560 | 550 -- Uncountable ascending chain by axiom of choice |
530 | 551 cf : ¬ Maximal A → Ordinal → Ordinal |
532 | 552 cf nmx x with ODC.∋-p O A (* x) |
553 ... | no _ = o∅ | |
554 ... | yes ax with is-o∅ (& ( Gtx ax )) | |
538 | 555 ... | yes nogt = -- no larger element, so it is maximal |
556 ⊥-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 | 557 ... | no not = & (ODC.minimal O (Gtx ax) (λ eq → not (=od∅→≡o∅ eq))) |
537 | 558 is-cf : (nmx : ¬ Maximal A ) → {x : Ordinal} → odef A x → odef A (cf nmx x) ∧ ( * x < * (cf nmx x) ) |
559 is-cf nmx {x} ax with ODC.∋-p O A (* x) | |
560 ... | no not = ⊥-elim ( not (subst (λ k → odef A k ) (sym &iso) ax )) | |
561 ... | yes ax with is-o∅ (& ( Gtx ax )) | |
562 ... | 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 ⟫ ) | |
563 ... | no not = ODC.x∋minimal O (Gtx ax) (λ eq → not (=od∅→≡o∅ eq)) | |
606 | 564 |
565 --- | |
566 --- infintie ascention sequence of f | |
567 --- | |
530 | 568 cf-is-<-monotonic : (nmx : ¬ Maximal A ) → (x : Ordinal) → odef A x → ( * x < * (cf nmx x) ) ∧ odef A (cf nmx x ) |
537 | 569 cf-is-<-monotonic nmx x ax = ⟪ proj2 (is-cf nmx ax ) , proj1 (is-cf nmx ax ) ⟫ |
530 | 570 cf-is-≤-monotonic : (nmx : ¬ Maximal A ) → ≤-monotonic-f A ( cf nmx ) |
532 | 571 cf-is-≤-monotonic nmx x ax = ⟪ case2 (proj1 ( cf-is-<-monotonic nmx x ax )) , proj2 ( cf-is-<-monotonic nmx x ax ) ⟫ |
543 | 572 |
793 | 573 chain-mono : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) (supf : Ordinal → Ordinal ) |
900 | 574 {a b c : Ordinal} → a o≤ b |
793 | 575 → odef (UnionCF A f mf ay supf a) c → odef (UnionCF A f mf ay supf b) c |
576 chain-mono f mf ay supf {a} {b} {c} a≤b ⟪ ua , ch-init fc ⟫ = | |
577 ⟪ ua , ch-init fc ⟫ | |
578 chain-mono f mf ay supf {a} {b} {c} a≤b ⟪ uaa , ch-is-sup ua ua<x is-sup fc ⟫ = | |
900 | 579 ⟪ uaa , ch-is-sup ua (ordtrans<-≤ ua<x a≤b ) is-sup fc ⟫ |
793 | 580 |
877 | 581 sp0 : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {x y : Ordinal} (ay : odef A y) |
582 (zc : ZChain A f mf ay x ) → SUP A (ZChain.chain zc) | |
583 sp0 f mf ay zc = supP (ZChain.chain zc) (ZChain.chain⊆A zc) ztotal where | |
584 ztotal : IsTotalOrderSet (ZChain.chain zc) | |
585 ztotal {a} {b} ca cb = subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso uz01 where | |
586 uz01 : Tri (* (& a) < * (& b)) (* (& a) ≡ * (& b)) (* (& b) < * (& a) ) | |
587 uz01 = chain-total A f mf ay (ZChain.supf zc) ( (proj2 ca)) ( (proj2 cb)) | |
588 | |
803 | 589 -- |
590 -- Second TransFinite Pass for maximality | |
591 -- | |
592 | |
793 | 593 SZ1 : ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) |
728 | 594 {init : Ordinal} (ay : odef A init) (zc : ZChain A f mf ay (& A)) (x : Ordinal) → ZChain1 A f mf ay zc x |
793 | 595 SZ1 f mf {y} ay zc x = TransFinite { λ x → ZChain1 A f mf ay zc x } zc1 x where |
900 | 596 chain-mono1 : {a b c : Ordinal} → a o≤ b |
788 | 597 → odef (UnionCF A f mf ay (ZChain.supf zc) a) c → odef (UnionCF A f mf ay (ZChain.supf zc) b) c |
793 | 598 chain-mono1 {a} {b} {c} a≤b = chain-mono f mf ay (ZChain.supf zc) a≤b |
735 | 599 is-max-hp : (x : Ordinal) {a : Ordinal} {b : Ordinal} → odef (UnionCF A f mf ay (ZChain.supf zc) x) a → |
897 | 600 b o< x → (ab : odef A b) → |
836 | 601 HasPrev A (UnionCF A f mf ay (ZChain.supf zc) x) b f → |
735 | 602 * a < * b → odef (UnionCF A f mf ay (ZChain.supf zc) x) b |
749 | 603 is-max-hp x {a} {b} ua b<x ab has-prev a<b with HasPrev.ay has-prev |
604 ... | ⟪ ab0 , ch-init fc ⟫ = ⟪ ab , ch-init ( subst (λ k → FClosure A f y k) (sym (HasPrev.x=fy has-prev)) (fsuc _ fc )) ⟫ | |
894 | 605 ... | ⟪ ab0 , ch-is-sup u u≤x is-sup fc ⟫ = ⟪ ab , subst (λ k → UChain A f mf ay (ZChain.supf zc) x k ) |
791 | 606 (sym (HasPrev.x=fy has-prev)) ( ch-is-sup u u≤x is-sup (fsuc _ fc)) ⟫ |
868 | 607 |
869 | 608 supf = ZChain.supf zc |
609 | |
610 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 | |
611 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 | |
612 s<b : s o< b | |
613 s<b = ZChain.supf-inject zc ss<sb | |
614 s≤<z : s o≤ & A | |
615 s≤<z = ordtrans s<b b≤z | |
870 | 616 zc04 : odef (UnionCF A f mf ay supf (& A)) (supf s) |
874 | 617 zc04 = ZChain.csupf zc (z09 (ZChain.asupf zc)) |
869 | 618 zc05 : odef (UnionCF A f mf ay supf b) (supf s) |
619 zc05 with zc04 | |
620 ... | ⟪ as , ch-init fc ⟫ = ⟪ as , ch-init fc ⟫ | |
900 | 621 ... | ⟪ as , ch-is-sup u u≤x is-sup fc ⟫ = ⟪ as , ch-is-sup u (ZChain.supf-inject zc zc08) is-sup fc ⟫ where |
870 | 622 zc07 : FClosure A f (supf u) (supf s) -- supf u ≤ supf s → supf u o≤ supf s |
623 zc07 = fc | |
869 | 624 zc06 : supf u ≡ u |
625 zc06 = ChainP.supu=u is-sup | |
894 | 626 zc08 : supf u o< supf b |
627 zc08 = ordtrans≤-< (ZChain.supf-<= zc (≤to<= ( s≤fc _ f mf fc ))) ss<sb | |
869 | 628 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 |
629 zc04 : odef (UnionCF A f mf ay supf b) (f x) | |
630 zc04 with subst (λ k → odef (UnionCF A f mf ay supf b) k ) &iso (csupf-fc b<z ss≤sb fc ) | |
631 ... | ⟪ as , ch-init fc ⟫ = ⟪ proj2 (mf _ as) , ch-init (fsuc _ fc) ⟫ | |
632 ... | ⟪ as , ch-is-sup u u≤x is-sup fc ⟫ = ⟪ proj2 (mf _ as) , ch-is-sup u u≤x is-sup (fsuc _ fc) ⟫ | |
633 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) | |
634 order {b} {s} {z1} b<z ss<sb fc = zc04 where | |
891 | 635 zc00 : ( z1 ≡ MinSUP.sup (ZChain.minsup zc (o<→≤ b<z) )) ∨ ( z1 << MinSUP.sup ( ZChain.minsup zc (o<→≤ b<z) ) ) |
892 | 636 zc00 = MinSUP.x<sup (ZChain.minsup zc (o<→≤ b<z) ) (subst (λ k → odef (UnionCF A f mf ay (ZChain.supf zc) b) k ) &iso (csupf-fc (o<→≤ b<z) ss<sb fc )) |
870 | 637 -- supf (supf b) ≡ supf b |
869 | 638 zc04 : (z1 ≡ supf b) ∨ (z1 << supf b) |
639 zc04 with zc00 | |
892 | 640 ... | case1 eq = case1 (subst₂ (λ j k → j ≡ k ) refl (sym (ZChain.supf-is-minsup zc (o<→≤ b<z)) ) eq ) |
641 ... | case2 lt = case2 (subst₂ (λ j k → j < * k ) refl (sym (ZChain.supf-is-minsup zc (o<→≤ b<z) )) lt ) | |
868 | 642 |
728 | 643 zc1 : (x : Ordinal) → ((y₁ : Ordinal) → y₁ o< x → ZChain1 A f mf ay zc y₁) → ZChain1 A f mf ay zc x |
900 | 644 zc1 x prev with Oprev-p x -- prev is not used now.... |
756 | 645 ... | 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
|
646 px = Oprev.oprev op |
789 | 647 zc-b<x : {b : Ordinal } → b o< x → b o< osuc px |
648 zc-b<x {b} lt = subst (λ k → b o< k ) (sym (Oprev.oprev=x op)) lt | |
894 | 649 is-max : {a : Ordinal} {b : Ordinal} → odef (UnionCF A f mf ay supf x) a → |
897 | 650 b o< x → (ab : odef A b) → |
869 | 651 HasPrev A (UnionCF A f mf ay supf x) b f ∨ IsSup A (UnionCF A f mf ay supf x) ab → |
652 * 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
|
653 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
|
654 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
|
655 is-max {a} {b} ua b<x ab P a<b | case2 is-sup |
900 | 656 = ⟪ 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
|
657 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
|
658 b<A = z09 ab |
899
37a09244cebd
UChain u<x to u≤x again
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
898
diff
changeset
|
659 sb≤sx : supf b o≤ supf x |
37a09244cebd
UChain u<x to u≤x again
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
898
diff
changeset
|
660 sb≤sx = ZChain.supf-mono zc (o<→≤ b<x ) |
900 | 661 sb<sx : supf b o< supf x |
662 sb<sx with osuc-≡< sb≤sx | |
663 ... | case2 lt = lt | |
664 ... | case1 sb=sx = ? where | |
665 -- b ≡ x | |
666 -- b o< px → a < * b → odef (UnionCF A f mf ay supf px) b | |
869 | 667 m04 : ¬ HasPrev A (UnionCF A f mf ay supf b) b f |
894 | 668 m04 nhp = proj1 is-sup ( record { ax = HasPrev.ax nhp ; y = HasPrev.y nhp ; ay = |
900 | 669 chain-mono1 (o<→≤ b<x) (HasPrev.ay nhp) ; x=fy = HasPrev.x=fy nhp } ) |
859 | 670 m05 : ZChain.supf zc b ≡ b |
671 m05 = ZChain.sup=u zc ab (o<→≤ (z09 ab) ) | |
900 | 672 ⟪ 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
|
673 m08 : {z : Ordinal} → (fcz : FClosure A f y z ) → z <= ZChain.supf zc b |
872 | 674 m08 {z} fcz = ZChain.fcy<sup zc (o<→≤ b<A) fcz |
828 | 675 m09 : {s z1 : Ordinal} → ZChain.supf zc s o< ZChain.supf zc b |
825 | 676 → FClosure A f (ZChain.supf zc s) z1 → z1 <= ZChain.supf zc b |
869 | 677 m09 {s} {z} s<b fcz = order b<A s<b fcz |
678 m06 : ChainP A f mf ay supf b | |
859 | 679 m06 = record { fcy<sup = m08 ; order = m09 ; supu=u = m05 } |
756 | 680 ... | no lim = record { is-max = is-max } where |
869 | 681 is-max : {a : Ordinal} {b : Ordinal} → odef (UnionCF A f mf ay supf x) a → |
897 | 682 b o< x → (ab : odef A b) → |
869 | 683 HasPrev A (UnionCF A f mf ay supf x) b f ∨ IsSup A (UnionCF A f mf ay supf x) ab → |
684 * 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
|
685 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
|
686 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
|
687 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 | 688 ... | 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 )) ⟫ |
900 | 689 ... | case2 y<b = ⟪ ab , ch-is-sup b b<x m06 (subst (λ k → FClosure A f k b) (sym m05) (init ab refl)) ⟫ where |
899
37a09244cebd
UChain u<x to u≤x again
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
898
diff
changeset
|
690 sb≤sx : supf b o≤ supf x |
37a09244cebd
UChain u<x to u≤x again
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
898
diff
changeset
|
691 sb≤sx = ZChain.supf-mono zc (o<→≤ b<x ) |
900 | 692 sb<sx : supf b o< supf x |
693 sb<sx = ? | |
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
|
694 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
|
695 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
|
696 m07 : {z : Ordinal} → FClosure A f y z → z <= ZChain.supf zc b |
872 | 697 m07 {z} fc = ZChain.fcy<sup zc (o<→≤ m09) fc |
828 | 698 m08 : {s z1 : Ordinal} → ZChain.supf zc s o< ZChain.supf zc b |
825 | 699 → FClosure A f (ZChain.supf zc s) z1 → z1 <= ZChain.supf zc b |
869 | 700 m08 {s} {z1} s<b fc = order m09 s<b fc |
701 m04 : ¬ HasPrev A (UnionCF A f mf ay supf b) b f | |
894 | 702 m04 nhp = proj1 is-sup ( record { ax = HasPrev.ax nhp ; y = HasPrev.y nhp ; ay = |
900 | 703 chain-mono1 (o<→≤ b<x) (HasPrev.ay nhp) |
860
105f8d6c51fb
no-extension on immidate ordinal passed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
859
diff
changeset
|
704 ; x=fy = HasPrev.x=fy nhp } ) |
859 | 705 m05 : ZChain.supf zc b ≡ b |
706 m05 = ZChain.sup=u zc ab (o<→≤ m09) | |
900 | 707 ⟪ record { x<sup = λ lt → IsSup.x<sup (proj2 is-sup) (chain-mono1 (o<→≤ b<x) lt )} , m04 ⟫ -- ZChain on x |
869 | 708 m06 : ChainP A f mf ay supf b |
859 | 709 m06 = record { fcy<sup = m07 ; order = m08 ; supu=u = m05 } |
727 | 710 |
543 | 711 --- |
560 | 712 --- the maximum chain has fix point of any ≤-monotonic function |
543 | 713 --- |
703 | 714 fixpoint : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) (zc : ZChain A f mf as0 (& A) ) |
877 | 715 → f (& (SUP.sup (sp0 f mf as0 zc ))) ≡ & (SUP.sup (sp0 f mf as0 zc )) |
716 fixpoint f mf zc = z14 where | |
538 | 717 chain = ZChain.chain zc |
894 | 718 supf = ZChain.supf zc |
895 | 719 sp1 : SUP A chain |
877 | 720 sp1 = sp0 f mf as0 zc |
897 | 721 z10 : {a b : Ordinal } → (ca : odef chain a ) → b o< & A → (ab : odef A b ) |
894 | 722 → HasPrev A chain b f ∨ IsSup A chain {b} ab |
538 | 723 → * a < * b → odef chain b |
793 | 724 z10 = ZChain1.is-max (SZ1 f mf as0 zc (& A) ) |
897 | 725 z21 : & (SUP.sup sp1) o< & A |
726 z21 = c<→o< (SUP.as sp1 ) | |
727 -- z21 : supf (& (SUP.sup sp1)) o< & A | |
728 -- z21 = subst (λ k → k o< & A) &iso ( c<→o< (subst (λ k → odef A k) (sym &iso) (ZChain.asupf zc ) )) | |
538 | 729 z12 : odef chain (& (SUP.sup sp1)) |
730 z12 with o≡? (& s) (& (SUP.sup sp1)) | |
653 | 731 ... | yes eq = subst (λ k → odef chain k) eq ( ZChain.chain∋init zc ) |
891 | 732 ... | no ne = z10 {& s} {& (SUP.sup sp1)} ( ZChain.chain∋init zc ) z21 (SUP.as sp1) |
570 | 733 (case2 z19 ) z13 where |
538 | 734 z13 : * (& s) < * (& (SUP.sup sp1)) |
653 | 735 z13 with SUP.x<sup sp1 ( ZChain.chain∋init zc ) |
538 | 736 ... | case1 eq = ⊥-elim ( ne (cong (&) eq) ) |
737 ... | case2 lt = subst₂ (λ j k → j < k ) (sym *iso) (sym *iso) lt | |
804 | 738 z19 : IsSup A chain {& (SUP.sup sp1)} (SUP.as sp1) |
571 | 739 z19 = record { x<sup = z20 } where |
740 z20 : {y : Ordinal} → odef chain y → (y ≡ & (SUP.sup sp1)) ∨ (y << & (SUP.sup sp1)) | |
741 z20 {y} zy with SUP.x<sup sp1 (subst (λ k → odef chain k ) (sym &iso) zy) | |
570 | 742 ... | case1 y=p = case1 (subst (λ k → k ≡ _ ) &iso ( cong (&) y=p )) |
743 ... | case2 y<p = case2 (subst (λ k → * y < k ) (sym *iso) y<p ) | |
877 | 744 ztotal : IsTotalOrderSet (ZChain.chain zc) |
745 ztotal {a} {b} ca cb = subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso uz01 where | |
746 uz01 : Tri (* (& a) < * (& b)) (* (& a) ≡ * (& b)) (* (& b) < * (& a) ) | |
894 | 747 uz01 = chain-total A f mf as0 supf ( (proj2 ca)) ( (proj2 cb)) |
877 | 748 |
749 z14 : f (& (SUP.sup (sp0 f mf as0 zc ))) ≡ & (SUP.sup (sp0 f mf as0 zc )) | |
750 z14 with ztotal (subst (λ k → odef chain k) (sym &iso) (ZChain.f-next zc z12 )) z12 | |
631 | 751 ... | tri< a ¬b ¬c = ⊥-elim z16 where |
752 z16 : ⊥ | |
804 | 753 z16 with proj1 (mf (& ( SUP.sup sp1)) ( SUP.as sp1 )) |
631 | 754 ... | case1 eq = ⊥-elim (¬b (subst₂ (λ j k → j ≡ k ) refl *iso (sym eq) )) |
755 ... | case2 lt = ⊥-elim (¬c (subst₂ (λ j k → k < j ) refl *iso lt )) | |
756 ... | tri≈ ¬a b ¬c = subst ( λ k → k ≡ & (SUP.sup sp1) ) &iso ( cong (&) b ) | |
757 ... | tri> ¬a ¬b c = ⊥-elim z17 where | |
758 z15 : (* (f ( & ( SUP.sup sp1 ))) ≡ SUP.sup sp1) ∨ (* (f ( & ( SUP.sup sp1 ))) < SUP.sup sp1) | |
759 z15 = SUP.x<sup sp1 (subst (λ k → odef chain k ) (sym &iso) (ZChain.f-next zc z12 )) | |
760 z17 : ⊥ | |
761 z17 with z15 | |
762 ... | case1 eq = ¬b eq | |
763 ... | case2 lt = ¬a lt | |
560 | 764 |
765 -- ZChain contradicts ¬ Maximal | |
766 -- | |
571 | 767 -- ZChain forces fix point on any ≤-monotonic function (fixpoint) |
560 | 768 -- ¬ Maximal create cf which is a <-monotonic function by axiom of choice. This contradicts fix point of ZChain |
769 -- | |
877 | 770 z04 : (nmx : ¬ Maximal A ) → (zc : ZChain A (cf nmx) (cf-is-≤-monotonic nmx) as0 (& A)) → ⊥ |
771 z04 nmx zc = <-irr0 {* (cf nmx c)} {* c} (subst (λ k → odef A k ) (sym &iso) (proj1 (is-cf nmx (SUP.as sp1 )))) | |
804 | 772 (subst (λ k → odef A (& k)) (sym *iso) (SUP.as sp1) ) |
877 | 773 (case1 ( cong (*)( fixpoint (cf nmx) (cf-is-≤-monotonic nmx ) zc ))) -- x ≡ f x ̄ |
804 | 774 (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
|
775 sp1 : SUP A (ZChain.chain zc) |
877 | 776 sp1 = sp0 (cf nmx) (cf-is-≤-monotonic nmx) as0 zc |
538 | 777 c = & (SUP.sup sp1) |
548 | 778 |
757 | 779 uchain : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) → HOD |
780 uchain f mf {y} ay = record { od = record { def = λ x → FClosure A f y x } ; odmax = & A ; <odmax = | |
781 λ {z} cz → subst (λ k → k o< & A) &iso ( c<→o< (subst (λ k → odef A k ) (sym &iso ) (A∋fc y f mf cz ))) } | |
782 | |
783 utotal : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) | |
784 → IsTotalOrderSet (uchain f mf ay) | |
785 utotal f mf {y} ay {a} {b} ca cb = subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso uz01 where | |
786 uz01 : Tri (* (& a) < * (& b)) (* (& a) ≡ * (& b)) (* (& b) < * (& a) ) | |
787 uz01 = fcn-cmp y f mf ca cb | |
788 | |
789 ysup : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) | |
790 → SUP A (uchain f mf ay) | |
791 ysup f mf {y} ay = supP (uchain f mf ay) (λ lt → A∋fc y f mf lt) (utotal f mf ay) | |
792 | |
793 | 793 SUP⊆ : { B C : HOD } → B ⊆' C → SUP A C → SUP A B |
804 | 794 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 | 795 |
833 | 796 record xSUP (B : HOD) (x : Ordinal) : Set n where |
797 field | |
798 ax : odef A x | |
799 is-sup : IsSup A B ax | |
800 | |
560 | 801 -- |
547 | 802 -- create all ZChains under o< x |
560 | 803 -- |
608
6655f03984f9
mutual tranfinite in zorn
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
607
diff
changeset
|
804 |
674 | 805 ind : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) → (x : Ordinal) |
703 | 806 → ((z : Ordinal) → z o< x → ZChain A f mf ay z) → ZChain A f mf ay x |
707 | 807 ind f mf {y} ay x prev with Oprev-p x |
697 | 808 ... | yes op = zc4 where |
682 | 809 -- |
810 -- we have previous ordinal to use induction | |
811 -- | |
812 px = Oprev.oprev op | |
703 | 813 zc : ZChain A f mf ay (Oprev.oprev op) |
682 | 814 zc = prev px (subst (λ k → px o< k) (Oprev.oprev=x op) <-osuc ) |
815 px<x : px o< x | |
816 px<x = subst (λ k → px o< k) (Oprev.oprev=x op) <-osuc | |
709 | 817 zc-b<x : (b : Ordinal ) → b o< x → b o< osuc px |
818 zc-b<x b lt = subst (λ k → b o< k ) (sym (Oprev.oprev=x op)) lt | |
697 | 819 |
754 | 820 supf0 = ZChain.supf zc |
869 | 821 pchain : HOD |
822 pchain = UnionCF A f mf ay supf0 px | |
835 | 823 |
890 | 824 -- px o< supf0 px → UnionCF supf0 px ≡ UnionCF supf1 x |
871 | 825 -- supf1 x ≡ supf0 px |
890 | 826 -- px ≡ supf0 px → ( UnionCF A f mf ay supf0 px ∪ FClosure (supf0 px) ) ≡ UnionCF supf1 x |
827 -- supf1 x ≡ sup of ( UnionCF A f mf ay supf0 px ∪ FClosure (supf0 px) (= UnionCF supf1 x))) -- nsup ≥ supf0 px | |
828 -- supf0 px o< px → ( UnionCF A f mf ay supf0 px ∪ FClosure (supf0 px) ) ≡ UnionCF supf1 x | |
829 -- nsup o≥ supf0 px → supf1 x ≡ nsup | |
830 -- nsup o< supf0 px → ? | |
844 | 831 |
857 | 832 supf-mono : {a b : Ordinal } → a o≤ b → supf0 a o≤ supf0 b |
833 supf-mono = ZChain.supf-mono zc | |
844 | 834 |
861 | 835 zc04 : {b : Ordinal} → b o≤ x → (b o≤ px ) ∨ (b ≡ x ) |
836 zc04 {b} b≤x with trio< b px | |
837 ... | tri< a ¬b ¬c = case1 (o<→≤ a) | |
838 ... | tri≈ ¬a b ¬c = case1 (o≤-refl0 b) | |
839 ... | tri> ¬a ¬b px<b with osuc-≡< b≤x | |
840 ... | case1 eq = case2 eq | |
841 ... | case2 b<x = ⊥-elim ( ¬p<x<op ⟪ px<b , subst (λ k → b o< k ) (sym (Oprev.oprev=x op)) b<x ⟫ ) | |
840 | 842 |
894 | 843 zc4 : ZChain A f mf ay x --- supf px ≤ supf x |
900 | 844 zc4 with trio< x (supf0 px) |
845 ... | tri> ¬a ¬b c = record { supf = supf0 ; sup=u = ? ; asupf = ? ; supf-mono = ? ; supf-< = ? | |
893 | 846 ; supfmax = ? ; minsup = ? ; supf-is-minsup = ? ; csupf = ? } where |
900 | 847 ... | tri≈ ¬a b ¬c = ? where |
848 -- ... | case1 sfpx=px = record { supf = supf1 ; sup=u = ? ; asupf = asupf1 ; supf-mono = supf-mono1 ; supf-< = supf-<1 | |
849 -- ; supfmax = ? ; minsup = ? ; supf-is-minsup = ? ; csupf = ? } where | |
850 | |
883 | 851 -- we are going to determine (supf x), which is not specified in previous zc |
852 -- case1 : supf px ≡ px | |
853 -- supf px is MinSUP of previous chain , supf x ≡ MinSUP of Union of UChain and FClosure px | |
900 | 854 sfpx=px = ? |
883 | 855 |
871 | 856 pchainpx : HOD |
894 | 857 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 |
858 zc00 : {z : Ordinal } → (odef A z ∧ UChain A f mf ay supf0 px z ) ∨ FClosure A f px z → z o< & A | |
872 | 859 zc00 {z} (case1 lt) = z07 lt |
860 zc00 {z} (case2 fc) = z09 ( A∋fc px f mf fc ) | |
894 | 861 zc01 : {z : Ordinal } → (odef A z ∧ UChain A f mf ay supf0 px z ) ∨ FClosure A f px z → odef A z |
872 | 862 zc01 {z} (case1 lt) = proj1 lt |
863 zc01 {z} (case2 fc) = ( A∋fc px f mf fc ) | |
864 | |
894 | 865 zc02 : { a b : Ordinal } → odef A a ∧ UChain A f mf ay supf0 px a → FClosure A f px b → a <= b |
872 | 866 zc02 {a} {b} ca fb = zc05 fb where |
891 | 867 zc06 : MinSUP.sup (ZChain.minsup zc o≤-refl) ≡ px |
868 zc06 = trans (sym ( ZChain.supf-is-minsup zc o≤-refl )) (sym sfpx=px) | |
872 | 869 zc05 : {b : Ordinal } → FClosure A f px b → a <= b |
870 zc05 (fsuc b1 fb ) with proj1 ( mf b1 (A∋fc px f mf fb )) | |
871 ... | case1 eq = subst (λ k → a <= k ) (subst₂ (λ j k → j ≡ k) &iso &iso (cong (&) eq)) (zc05 fb) | |
872 ... | case2 lt = <-ftrans (zc05 fb) (case2 lt) | |
894 | 873 zc05 (init b1 refl) with MinSUP.x<sup (ZChain.minsup zc o≤-refl) ? -- |
874 -- (subst (λ k → odef A k ∧ UChain A f mf ay supf0 (supf0 px) k) (sym &iso) ca ) | |
892 | 875 ... | case1 eq = case1 (subst₂ (λ j k → j ≡ k ) &iso zc06 eq ) |
876 ... | case2 lt = case2 (subst₂ (λ j k → j < k ) *iso (cong (*) zc06) lt ) | |
871 | 877 |
872 | 878 ptotal : IsTotalOrderSet pchainpx |
879 ptotal (case1 a) (case1 b) = subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso | |
880 (chain-total A f mf ay supf0 (proj2 a) (proj2 b)) | |
881 ptotal {a0} {b0} (case1 a) (case2 b) with zc02 a b | |
882 ... | case1 eq = tri≈ (<-irr (case1 (sym eq1))) eq1 (<-irr (case1 eq1)) where | |
883 eq1 : a0 ≡ b0 | |
884 eq1 = subst₂ (λ j k → j ≡ k ) *iso *iso (cong (*) eq ) | |
885 ... | case2 lt = tri< lt1 (λ eq → <-irr (case1 (sym eq)) lt1) (<-irr (case2 lt1)) where | |
886 lt1 : a0 < b0 | |
887 lt1 = subst₂ (λ j k → j < k ) *iso *iso lt | |
888 ptotal {b0} {a0} (case2 b) (case1 a) with zc02 a b | |
889 ... | case1 eq = tri≈ (<-irr (case1 eq1)) (sym eq1) (<-irr (case1 (sym eq1))) where | |
890 eq1 : a0 ≡ b0 | |
891 eq1 = subst₂ (λ j k → j ≡ k ) *iso *iso (cong (*) eq ) | |
892 ... | case2 lt = tri> (<-irr (case2 lt1)) (λ eq → <-irr (case1 eq) lt1) lt1 where | |
893 lt1 : a0 < b0 | |
894 lt1 = subst₂ (λ j k → j < k ) *iso *iso lt | |
895 ptotal (case2 a) (case2 b) = subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso (fcn-cmp px f mf a b) | |
896 | |
880 | 897 sup1 : MinSUP A pchainpx |
898 sup1 = minsupP pchainpx zc01 ptotal | |
871 | 899 |
900 sp1 : Ordinal | |
880 | 901 sp1 = MinSUP.sup sup1 |
871 | 902 |
903 supf1 : Ordinal → Ordinal | |
904 supf1 z with trio< z px | |
905 ... | tri< a ¬b ¬c = supf0 z | |
879 | 906 ... | tri≈ ¬a b ¬c = px --- supf px ≡ px |
883 | 907 ... | tri> ¬a ¬b c = sp1 --- this may equal or larger then x, and sp1 ≡ supf x, is not included in UniofCF |
871 | 908 |
884 | 909 apx : odef A px |
910 apx = subst (λ k → odef A k ) (sym sfpx=px) ( ZChain.asupf zc ) | |
911 | |
883 | 912 asupf1 : {z : Ordinal } → odef A (supf1 z ) |
913 asupf1 {z} with trio< z px | |
914 ... | tri< a ¬b ¬c = ZChain.asupf zc | |
915 ... | tri≈ ¬a b ¬c = subst (λ k → odef A k ) (trans (cong supf0 b) (sym sfpx=px)) ( ZChain.asupf zc ) | |
916 ... | tri> ¬a ¬b c = MinSUP.asm sup1 | |
871 | 917 |
886 | 918 sf1=sf0 : {z : Ordinal } → z o≤ px → supf1 z ≡ supf0 z |
919 sf1=sf0 {z} z<px with trio< z px | |
874 | 920 ... | tri< a ¬b ¬c = refl |
883 | 921 ... | tri≈ ¬a b ¬c = trans sfpx=px (cong supf0 (sym b)) |
922 ... | tri> ¬a ¬b c = ⊥-elim ( o≤> z<px c ) | |
923 | |
874 | 924 supf-mono1 : {z w : Ordinal } → z o≤ w → supf1 z o≤ supf1 w |
925 supf-mono1 {z} {w} z≤w with trio< w px | |
886 | 926 ... | tri< a ¬b ¬c = subst₂ (λ j k → j o≤ k ) (sym (sf1=sf0 (o<→≤ (ordtrans≤-< z≤w a)))) refl ( supf-mono z≤w ) |
874 | 927 ... | tri≈ ¬a refl ¬c with osuc-≡< z≤w |
928 ... | case1 refl = o≤-refl0 zc17 where | |
929 zc17 : supf1 px ≡ px | |
930 zc17 with trio< px px | |
931 ... | tri< a ¬b ¬c = ⊥-elim ( ¬b refl ) | |
932 ... | tri≈ ¬a b ¬c = refl | |
933 ... | tri> ¬a ¬b c = ⊥-elim ( ¬b refl ) | |
886 | 934 ... | case2 lt = subst₂ (λ j k → j o≤ k ) (sym (sf1=sf0 (o<→≤ lt))) (sym sfpx=px) ( supf-mono z≤w ) |
874 | 935 supf-mono1 {z} {w} z≤w | tri> ¬a ¬b c with trio< z px |
936 ... | tri< a ¬b ¬c = zc19 where | |
881 | 937 zc21 : MinSUP A (UnionCF A f mf ay supf0 z) |
892 | 938 zc21 = ZChain.minsup zc (o<→≤ a) |
881 | 939 zc24 : {x₁ : Ordinal} → odef (UnionCF A f mf ay supf0 z) x₁ → (x₁ ≡ sp1) ∨ (x₁ << sp1) |
900 | 940 zc24 {x₁} ux = MinSUP.x<sup sup1 (case1 (chain-mono f mf ay supf0 (o<→≤ a) ux)) |
881 | 941 zc19 : supf0 z o≤ sp1 |
883 | 942 zc19 = subst (λ k → k o≤ sp1) (sym (ZChain.supf-is-minsup zc (o<→≤ a))) ( MinSUP.minsup zc21 (MinSUP.asm sup1) zc24 ) |
874 | 943 ... | tri≈ ¬a b ¬c = zc18 where |
881 | 944 zc21 : MinSUP A (UnionCF A f mf ay supf0 z) |
945 zc21 = ZChain.minsup zc (o≤-refl0 b) | |
883 | 946 zc20 : MinSUP.sup zc21 ≡ px |
947 zc20 = begin | |
948 MinSUP.sup zc21 ≡⟨ sym (ZChain.supf-is-minsup zc (o≤-refl0 b)) ⟩ | |
949 supf0 z ≡⟨ cong supf0 b ⟩ | |
950 supf0 px ≡⟨ sym sfpx=px ⟩ | |
951 px ∎ where open ≡-Reasoning | |
952 zc24 : {x₁ : Ordinal} → odef (UnionCF A f mf ay supf0 z) x₁ → (x₁ ≡ sp1) ∨ (x₁ << sp1) | |
900 | 953 zc24 {x₁} ux = MinSUP.x<sup sup1 (case1 (chain-mono f mf ay supf0 ? ux)) |
881 | 954 zc18 : px o≤ sp1 -- supf0 z ≡ px |
883 | 955 zc18 = subst (λ k → k o≤ sp1) zc20 ( MinSUP.minsup zc21 (MinSUP.asm sup1) zc24 ) |
874 | 956 ... | tri> ¬a ¬b c = o≤-refl |
957 | |
883 | 958 supf-<1 : {z0 z1 : Ordinal} → supf1 z0 o< supf1 z1 → supf1 z0 << supf1 z1 |
959 supf-<1 {z0} {z1} sz0<sz1 = zc21 where | |
960 z0<z1 : z0 o< z1 | |
961 z0<z1 = supf-inject0 supf-mono1 sz0<sz1 | |
962 zc26 : supf0 px <= sp1 | |
963 zc26 with MinSUP.x<sup sup1 (case2 (init (subst (λ k → odef A k) (sym sfpx=px) (ZChain.asupf zc) ) refl )) | |
964 ... | case1 eq = case1 (trans (sym sfpx=px) eq ) | |
965 ... | case2 lt = case2 (subst (λ k → k << sp1 ) sfpx=px lt) | |
966 zc22 : ¬ px ≡ sp1 → supf0 px << sp1 | |
967 zc22 not with MinSUP.x<sup sup1 (case2 (init (subst (λ k → odef A k) (sym sfpx=px) (ZChain.asupf zc) ) refl )) | |
968 ... | case1 eq = ⊥-elim ( not eq ) -- px ≡ sp1 | |
969 ... | case2 lt = subst (λ k → k << sp1 ) sfpx=px lt | |
970 zc21 : supf1 z0 << supf1 z1 | |
971 zc21 with trio< z1 px | |
886 | 972 ... | tri< a ¬b ¬c = subst (λ k → k << supf0 z1) (sym (sf1=sf0 (o<→≤ (ordtrans z0<z1 a)))) |
973 ( ZChain.supf-< zc (subst (λ k → k o< supf0 z1) (sf1=sf0 (o<→≤ (ordtrans z0<z1 a))) sz0<sz1 )) | |
974 ... | tri≈ ¬a b ¬c = subst₂ (λ j k → j << k ) (sym (sf1=sf0 (o<→≤ (subst (λ k → z0 o< k) b z0<z1 )))) (sym sfpx=px) | |
975 ( ZChain.supf-< zc (subst₂ (λ j k → j o< k ) (sf1=sf0 (o<→≤ (subst (λ k → z0 o< k) b z0<z1 ))) sfpx=px sz0<sz1 )) | |
883 | 976 ... | tri> ¬a ¬b px<z1 with trio< z0 px --- supf1 z1 ≡ sp1 |
977 ... | tri< a ¬b ¬c = zc23 where | |
978 zc23 : supf0 z0 << sp1 | |
979 zc23 with osuc-≡< ( ZChain.supf-mono zc (o<→≤ a) ) | |
980 ... | case1 eq = subst (λ k → k << sp1 ) (sym eq) (zc22 zc24) where | |
981 zc25 : px ≡ sp1 → supf0 z0 ≡ sp1 | |
982 zc25 px=sp1 = begin supf0 z0 ≡⟨ eq ⟩ | |
983 supf0 px ≡⟨ sym ( sfpx=px ) ⟩ | |
984 px ≡⟨ px=sp1 ⟩ | |
985 sp1 ∎ where open ≡-Reasoning | |
986 zc24 : ¬ px ≡ sp1 | |
987 zc24 eq1 = ⊥-elim (o<¬≡ (zc25 eq1) sz0<sz1 ) | |
988 ... | case2 lt with zc26 | |
989 ... | case1 eq = subst (λ k → supf0 z0 << k ) eq (ZChain.supf-< zc lt) | |
990 ... | case2 lt1 = ptrans (ZChain.supf-< zc lt) lt1 | |
991 ... | tri≈ ¬a b ¬c = subst (λ k → k << sp1 ) (sym sfpx=px) (zc22 zc23 ) where | |
992 zc23 : ¬ px ≡ sp1 | |
993 zc23 eq = ⊥-elim (o<¬≡ eq sz0<sz1 ) | |
994 ... | tri> ¬a ¬b c = ⊥-elim ( o<¬≡ refl sz0<sz1 ) | |
873 | 995 |
885 | 996 ch1x=pchainpx : UnionCF A f mf ay supf1 x ≡ pchainpx |
997 ch1x=pchainpx = ==→o≡ record { eq→ = zc11 ; eq← = zc12 } where | |
998 fcup : {u z : Ordinal } → FClosure A f (supf1 u) z → u o≤ px → FClosure A f (supf0 u) z | |
886 | 999 fcup {u} {z} fc u≤px = subst (λ k → FClosure A f k z ) (sf1=sf0 u≤px) fc |
885 | 1000 fcpu : {u z : Ordinal } → FClosure A f (supf0 u) z → u o≤ px → FClosure A f (supf1 u) z |
886 | 1001 fcpu {u} {z} fc u≤px = subst (λ k → FClosure A f k z ) (sym (sf1=sf0 u≤px)) fc |
885 | 1002 zc11 : {z : Ordinal} → odef (UnionCF A f mf ay supf1 x) z → odef pchainpx z |
1003 zc11 {z} ⟪ az , ch-init fc ⟫ = case1 ⟪ az , ch-init fc ⟫ | |
899
37a09244cebd
UChain u<x to u≤x again
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
898
diff
changeset
|
1004 zc11 {z} ⟪ az , ch-is-sup u u≤x is-sup fc ⟫ = zc21 fc where |
885 | 1005 zc21 : {z1 : Ordinal } → FClosure A f (supf1 u) z1 → odef pchainpx z1 |
1006 zc21 {z1} (fsuc z2 fc ) with zc21 fc | |
1007 ... | case1 ⟪ ua1 , ch-init fc₁ ⟫ = case1 ⟪ proj2 ( mf _ ua1) , ch-init (fsuc _ fc₁) ⟫ | |
899
37a09244cebd
UChain u<x to u≤x again
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
898
diff
changeset
|
1008 ... | case1 ⟪ ua1 , ch-is-sup u u≤x u1-is-sup fc₁ ⟫ = case1 ⟪ proj2 ( mf _ ua1) , ch-is-sup u u≤x u1-is-sup (fsuc _ fc₁) ⟫ |
886 | 1009 ... | case2 fc = case2 (fsuc _ fc) |
885 | 1010 zc21 (init asp refl ) with trio< u px | inspect supf1 u |
890 | 1011 ... | tri< a ¬b ¬c | _ = case1 ⟪ asp , ch-is-sup u ? record {fcy<sup = zc13 ; order = zc17 |
886 | 1012 ; supu=u = trans (sym (sf1=sf0 (o<→≤ a))) (ChainP.supu=u is-sup) } (init asp refl) ⟫ where |
1013 zc17 : {s : Ordinal} {z1 : Ordinal} → supf0 s o< supf0 u → | |
1014 FClosure A f (supf0 s) z1 → (z1 ≡ supf0 u) ∨ (z1 << supf0 u) | |
1015 zc17 {s} {z1} ss<spx fc = subst (λ k → (z1 ≡ k) ∨ (z1 << k)) ((sf1=sf0 zc19)) ( ChainP.order is-sup | |
1016 (subst₂ (λ j k → j o< k ) (sym (sf1=sf0 zc18)) (sym (sf1=sf0 zc19)) ss<spx) (fcpu fc zc18) ) where | |
1017 zc19 : u o≤ px | |
892 | 1018 zc19 = o<→≤ a |
886 | 1019 zc18 : s o≤ px |
1020 zc18 = ordtrans (ZChain.supf-inject zc ss<spx) zc19 | |
1021 zc13 : {z : Ordinal } → FClosure A f y z → (z ≡ supf0 u) ∨ ( z << supf0 u ) | |
1022 zc13 {z} fc = subst (λ k → (z ≡ k) ∨ ( z << k )) (sf1=sf0 (o<→≤ a)) ( ChainP.fcy<sup is-sup fc ) | |
1023 ... | tri≈ ¬a b ¬c | _ = case2 (init apx refl ) | |
890 | 1024 ... | tri> ¬a ¬b c | _ = ⊥-elim ( ¬p<x<op ⟪ c , subst (λ k → u o< k ) (sym (Oprev.oprev=x op)) ? ⟫ ) |
885 | 1025 zc12 : {z : Ordinal} → odef pchainpx z → odef (UnionCF A f mf ay supf1 x) z |
1026 zc12 {z} (case1 ⟪ az , ch-init fc ⟫ ) = ⟪ az , ch-init fc ⟫ | |
899
37a09244cebd
UChain u<x to u≤x again
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
898
diff
changeset
|
1027 zc12 {z} (case1 ⟪ az , ch-is-sup u u≤x is-sup fc ⟫ ) = zc21 fc where |
885 | 1028 zc21 : {z1 : Ordinal } → FClosure A f (supf0 u) z1 → odef (UnionCF A f mf ay supf1 x) z1 |
1029 zc21 {z1} (fsuc z2 fc ) with zc21 fc | |
1030 ... | ⟪ ua1 , ch-init fc₁ ⟫ = ⟪ proj2 ( mf _ ua1) , ch-init (fsuc _ fc₁) ⟫ | |
1031 ... | ⟪ ua1 , ch-is-sup u u≤x u1-is-sup fc₁ ⟫ = ⟪ proj2 ( mf _ ua1) , ch-is-sup u u≤x u1-is-sup (fsuc _ fc₁) ⟫ | |
1032 zc21 (init asp refl ) with trio< u px | inspect supf1 u | |
1033 ... | tri< a ¬b ¬c | _ = ⟪ asp , ch-is-sup u | |
890 | 1034 ? -- (subst (λ k → u o< k) (Oprev.oprev=x op) ?) |
1035 record {fcy<sup = zc13 ; order = zc17 ; supu=u = trans ((sf1=sf0 ?)) (ChainP.supu=u is-sup) } zc14 ⟫ where | |
886 | 1036 zc17 : {s : Ordinal} {z1 : Ordinal} → supf1 s o< supf1 u → |
1037 FClosure A f (supf1 s) z1 → (z1 ≡ supf1 u) ∨ (z1 << supf1 u) | |
890 | 1038 zc17 {s} {z1} ss<spx fc = subst (λ k → (z1 ≡ k) ∨ (z1 << k)) (sym (sf1=sf0 ?)) ( ChainP.order is-sup |
1039 (subst₂ (λ j k → j o< k ) (sf1=sf0 s≤px) (sf1=sf0 ?) ss<spx) (fcup fc s≤px) ) where | |
886 | 1040 s≤px : s o≤ px |
899
37a09244cebd
UChain u<x to u≤x again
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
898
diff
changeset
|
1041 s≤px = ? -- ordtrans ( supf-inject0 supf-mono1 ss<spx ) (o<→≤ u≤x) |
886 | 1042 zc14 : FClosure A f (supf1 u) (supf0 u) |
890 | 1043 zc14 = init (subst (λ k → odef A k ) (sym (sf1=sf0 ?)) asp) (sf1=sf0 ?) |
885 | 1044 zc13 : {z : Ordinal } → FClosure A f y z → (z ≡ supf1 u) ∨ ( z << supf1 u ) |
890 | 1045 zc13 {z} fc = subst (λ k → (z ≡ k) ∨ ( z << k )) (sym (sf1=sf0 ?)) ( ChainP.fcy<sup is-sup fc ) |
1046 ... | tri≈ ¬a b ¬c | _ = ⟪ asp , ch-is-sup px ? record { fcy<sup = zc13 | |
886 | 1047 ; order = zc17 ; supu=u = zc18 } (init asupf1 (trans (sf1=sf0 o≤-refl ) (cong supf0 (sym b))) ) ⟫ where |
1048 zc13 : {z : Ordinal } → FClosure A f y z → (z ≡ supf1 px) ∨ ( z << supf1 px ) | |
1049 zc13 {z} fc = subst (λ k → (z ≡ k) ∨ (z << k)) (trans (cong supf0 b) (sym (sf1=sf0 o≤-refl))) (ChainP.fcy<sup is-sup fc ) | |
1050 zc18 : supf1 px ≡ px | |
1051 zc18 = begin | |
1052 supf1 px ≡⟨ sf1=sf0 o≤-refl ⟩ | |
1053 supf0 px ≡⟨ cong supf0 (sym b) ⟩ | |
1054 supf0 u ≡⟨ ChainP.supu=u is-sup ⟩ | |
1055 u ≡⟨ b ⟩ | |
1056 px ∎ where open ≡-Reasoning | |
1057 zc17 : {s : Ordinal} {z1 : Ordinal} → supf1 s o< supf1 px → | |
1058 FClosure A f (supf1 s) z1 → (z1 ≡ supf1 px) ∨ (z1 << supf1 px) | |
1059 zc17 {s} {z1} ss<spx fc = subst (λ k → (z1 ≡ k) ∨ (z1 << k)) (trans (cong supf0 b) (sym (sf1=sf0 o≤-refl))) | |
887 | 1060 ( ChainP.order is-sup (subst₂ (λ j k → j o< k) (sf1=sf0 s≤px) zc19 ss<spx) (fcup fc s≤px) ) where |
1061 zc19 : supf1 px ≡ supf0 u | |
1062 zc19 = trans (sf1=sf0 o≤-refl) (cong supf0 (sym b)) | |
886 | 1063 s≤px : s o≤ px |
887 | 1064 s≤px = o<→≤ (supf-inject0 supf-mono1 ss<spx) |
890 | 1065 ... | tri> ¬a ¬b c | _ = ⊥-elim ( ¬p<x<op ⟪ c , ? ⟫ ) |
885 | 1066 zc12 {z} (case2 fc) = zc21 fc where |
1067 zc21 : {z1 : Ordinal } → FClosure A f px z1 → odef (UnionCF A f mf ay supf1 x) z1 | |
1068 zc21 {z1} (fsuc z2 fc ) with zc21 fc | |
1069 ... | ⟪ ua1 , ch-init fc₁ ⟫ = ⟪ proj2 ( mf _ ua1) , ch-init (fsuc _ fc₁) ⟫ | |
1070 ... | ⟪ ua1 , ch-is-sup u u≤x u1-is-sup fc₁ ⟫ = ⟪ proj2 ( mf _ ua1) , ch-is-sup u u≤x u1-is-sup (fsuc _ fc₁) ⟫ | |
890 | 1071 zc21 (init asp refl ) = ⟪ asp , ch-is-sup px ? |
886 | 1072 record {fcy<sup = zc13 ; order = zc17 ; supu=u = zc15 } zc14 ⟫ where |
1073 zc15 : supf1 px ≡ px | |
1074 zc15 = trans (sf1=sf0 o≤-refl ) (sym sfpx=px) | |
1075 zc14 : FClosure A f (supf1 px) px | |
1076 zc14 = init (subst (λ k → odef A k) (sym zc15) asp) zc15 | |
885 | 1077 zc13 : {z : Ordinal } → FClosure A f y z → (z ≡ supf1 px ) ∨ ( z << supf1 px ) |
886 | 1078 zc13 {z} fc = subst (λ k → (z ≡ k) ∨ ( z << k )) (sym (sf1=sf0 o≤-refl)) ( ZChain.fcy<sup zc o≤-refl fc ) |
1079 zc17 : {s : Ordinal} {z1 : Ordinal} → supf1 s o< supf1 px → | |
1080 FClosure A f (supf1 s) z1 → (z1 ≡ supf1 px) ∨ (z1 << supf1 px) | |
887 | 1081 zc17 {s} {z1} ss<spx fc = subst (λ k → (z1 ≡ k) ∨ (z1 << k )) mins-is-spx |
1082 (MinSUP.x<sup mins (csupf17 (fcup fc (o<→≤ s<px) )) ) where | |
1083 mins : MinSUP A (UnionCF A f mf ay supf0 px) | |
1084 mins = ZChain.minsup zc o≤-refl | |
1085 mins-is-spx : MinSUP.sup mins ≡ supf1 px | |
1086 mins-is-spx = trans (sym ( ZChain.supf-is-minsup zc o≤-refl ) ) (sym (sf1=sf0 o≤-refl )) | |
1087 s<px : s o< px | |
1088 s<px = supf-inject0 supf-mono1 ss<spx | |
1089 sf<px : supf0 s o< px | |
1090 sf<px = subst₂ (λ j k → j o< k ) (sf1=sf0 (o<→≤ s<px)) (trans (sf1=sf0 o≤-refl) (sym sfpx=px)) ss<spx | |
1091 -- (sf1=sf0 ?) (trans ? sfpx=px ) ss<spx | |
1092 csupf17 : {z1 : Ordinal } → FClosure A f (supf0 s) z1 → odef (UnionCF A f mf ay supf0 px) z1 | |
1093 csupf17 (init as refl ) = ZChain.csupf zc sf<px | |
893 | 1094 csupf17 (fsuc x fc) = ZChain.f-next zc (csupf17 fc) |
885 | 1095 |
1096 record STMP {z : Ordinal} (z≤x : z o≤ x ) : Set (Level.suc n) where | |
1097 field | |
1098 tsup : MinSUP A (UnionCF A f mf ay supf1 z) | |
1099 tsup=sup : supf1 z ≡ MinSUP.sup tsup | |
1100 | |
1101 sup : {z : Ordinal} → (z≤x : z o≤ x ) → STMP z≤x | |
1102 sup {z} z≤x with trio< z px | |
1103 ... | tri< a ¬b ¬c = record { tsup = record { sup = MinSUP.sup m ; asm = MinSUP.asm m | |
886 | 1104 ; x<sup = ? ; minsup = ? } ; tsup=sup = trans (sf1=sf0 (o<→≤ a)) (ZChain.supf-is-minsup zc (o<→≤ a)) } where |
885 | 1105 m = ZChain.minsup zc (o<→≤ a) |
1106 ... | tri≈ ¬a b ¬c = record { tsup = record { sup = MinSUP.sup m ; asm = MinSUP.asm m | |
886 | 1107 ; x<sup = ? ; minsup = ? } ; tsup=sup = trans (sf1=sf0 (o≤-refl0 b)) (ZChain.supf-is-minsup zc (o≤-refl0 b)) } where |
885 | 1108 m = ZChain.minsup zc (o≤-refl0 b) |
1109 ... | tri> ¬a ¬b px<z = record { tsup = record { sup = sp1 ; asm = MinSUP.asm sup1 | |
1110 ; x<sup = ? ; minsup = ? } ; tsup=sup = ? } | |
1111 | |
887 | 1112 csupf1 : {z1 : Ordinal } → supf1 z1 o< x → odef (UnionCF A f mf ay supf1 x) (supf1 z1) |
1113 csupf1 {z1} sz1<x with trio< (supf0 z1) px | |
1114 ... | tri< a ¬b ¬c = subst₂ (λ j k → odef j k ) (sym ch1x=pchainpx) (sym (sf1=sf0 z1≤px)) (case1 (ZChain.csupf zc a )) where | |
1115 z1≤px : z1 o≤ px | |
1116 z1≤px = o<→≤ ( ZChain.supf-inject zc (subst (λ k → supf0 z1 o< k ) sfpx=px a )) | |
1117 ... | tri≈ ¬a b ¬c = subst₂ (λ j k → odef j k ) (sym ch1x=pchainpx) zc20 (case2 (init apx sfpx=px )) where | |
889 | 1118 z1≤px : z1 o≤ px -- z1 o≤ supf1 z1 ≡ px |
893 | 1119 z1≤px = subst (λ k → z1 o< k) (sym (Oprev.oprev=x op)) (supf-inject0 supf-mono1 (ordtrans<-≤ sz1<x ? )) |
887 | 1120 zc20 : supf0 px ≡ supf1 z1 |
1121 zc20 = begin | |
888 | 1122 supf0 px ≡⟨ sym sfpx=px ⟩ |
1123 px ≡⟨ sym b ⟩ | |
1124 supf0 z1 ≡⟨ sym (sf1=sf0 z1≤px) ⟩ | |
887 | 1125 supf1 z1 ∎ where open ≡-Reasoning |
889 | 1126 ... | tri> ¬a ¬b c = ⊥-elim ( ¬p<x<op ⟪ zc21 , subst (λ k → z1 o< k ) (sym (Oprev.oprev=x op)) zc22 ⟫ ) where |
888 | 1127 zc21 : px o< z1 |
1128 zc21 = ZChain.supf-inject zc (subst (λ k → k o< supf0 z1) sfpx=px c ) | |
889 | 1129 zc22 : z1 o< x -- c : px o< supf0 z1 |
893 | 1130 zc22 = supf-inject0 supf-mono1 (ordtrans<-≤ sz1<x ? ) |
888 | 1131 -- c : px ≡ spuf0 px o< supf0 z1 , px o< z1 o≤ supf1 z1 o< x |
877 | 1132 |
900 | 1133 ... | tri< a ¬b ¬c = ? where |
883 | 1134 |
1135 -- case2 : px o< supf px | |
1136 -- supf px is not MinSUP of previous chain , supf x ≡ supf px | |
1137 | |
879 | 1138 -- record { supf = supf0 ; asupf = ZChain.asupf zc ; sup = λ lt → STMP.tsup (sup lt ) ; supf-mono = supf-mono |
1139 -- ; supf-< = ? ; sup=u = sup=u ; supf-is-sup = λ lt → STMP.tsup=sup (sup lt) } where | |
872 | 1140 supf1 : Ordinal → Ordinal |
1141 supf1 z with trio< z px | |
871 | 1142 ... | tri< a ¬b ¬c = supf0 z |
872 | 1143 ... | tri≈ ¬a b ¬c = supf0 px |
871 | 1144 ... | tri> ¬a ¬b c = supf0 px |
1145 | |
886 | 1146 sf1=sf0 : {z : Ordinal } → z o< px → supf1 z ≡ supf0 z |
1147 sf1=sf0 {z} z<px with trio< z px | |
874 | 1148 ... | tri< a ¬b ¬c = refl |
1149 ... | tri≈ ¬a b ¬c = ⊥-elim ( ¬a z<px ) | |
1150 ... | tri> ¬a ¬b c = ⊥-elim ( ¬a z<px ) | |
1151 | |
1152 zc17 : {z : Ordinal } → supf0 z o≤ supf0 px | |
1153 zc17 = ? -- px o< z, px o< supf0 px | |
1154 | |
1155 supf-mono1 : {z w : Ordinal } → z o≤ w → supf1 z o≤ supf1 w | |
1156 supf-mono1 {z} {w} z≤w with trio< w px | |
886 | 1157 ... | tri< a ¬b ¬c = subst₂ (λ j k → j o≤ k ) (sym (sf1=sf0 (ordtrans≤-< z≤w a))) refl ( supf-mono z≤w ) |
874 | 1158 ... | tri≈ ¬a refl ¬c with trio< z px |
1159 ... | tri< a ¬b ¬c = zc17 | |
1160 ... | tri≈ ¬a refl ¬c = o≤-refl | |
1161 ... | tri> ¬a ¬b c = o≤-refl | |
1162 supf-mono1 {z} {w} z≤w | tri> ¬a ¬b c with trio< z px | |
1163 ... | tri< a ¬b ¬c = zc17 | |
1164 ... | tri≈ ¬a b ¬c = o≤-refl | |
1165 ... | tri> ¬a ¬b c = o≤-refl | |
1166 | |
872 | 1167 pchain1 : HOD |
1168 pchain1 = UnionCF A f mf ay supf1 x | |
871 | 1169 |
863 | 1170 zc10 : {z : Ordinal} → OD.def (od pchain) z → OD.def (od pchain1) z |
1171 zc10 {z} ⟪ az , ch-init fc ⟫ = ⟪ az , ch-init fc ⟫ | |
894 | 1172 zc10 {z} ⟪ az , ch-is-sup u1 u1<x u1-is-sup fc ⟫ = ⟪ az , ch-is-sup u1 ? ? ? ⟫ |
873 | 1173 |
1174 zc111 : {z : Ordinal} → z o< px → OD.def (od pchain1) z → OD.def (od pchain) z | |
1175 zc111 {z} z<px ⟪ az , ch-init fc ⟫ = ⟪ az , ch-init fc ⟫ | |
894 | 1176 zc111 {z} z<px ⟪ az , ch-is-sup u1 u1<x u1-is-sup fc ⟫ = ⟪ az , ch-is-sup u1 ? ? ? ⟫ |
873 | 1177 |
863 | 1178 zc11 : (¬ xSUP (UnionCF A f mf ay supf0 px) x ) ∨ (HasPrev A pchain x f ) |
864 | 1179 → {z : Ordinal} → OD.def (od pchain1) z → OD.def (od pchain) z ∨ ( (supf0 px ≡ px) ∧ FClosure A f px z ) |
863 | 1180 zc11 P {z} ⟪ az , ch-init fc ⟫ = case1 ⟪ az , ch-init fc ⟫ |
1181 zc11 P {z} ⟪ az , ch-is-sup u1 u1<x u1-is-sup fc ⟫ with trio< u1 px | |
890 | 1182 ... | tri< u1<px ¬b ¬c = case1 ⟪ az , ch-is-sup u1 ? ? fc ⟫ |
872 | 1183 ... | tri≈ ¬a eq ¬c = case2 ⟪ subst (λ k → supf0 k ≡ k) eq s1u=u , subst (λ k → FClosure A f k z) zc12 ? ⟫ where |
863 | 1184 s1u=u : supf0 u1 ≡ u1 |
872 | 1185 s1u=u = ? -- ChainP.supu=u u1-is-sup |
864 | 1186 zc12 : supf0 u1 ≡ px |
872 | 1187 zc12 = trans s1u=u eq |
863 | 1188 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 |
1189 eq : u1 ≡ x | |
1190 eq with trio< u1 x | |
1191 ... | tri< a ¬b ¬c = ⊥-elim ( ¬p<x<op ⟪ px<u , subst (λ k → u1 o< k ) (sym (Oprev.oprev=x op )) a ⟫ ) | |
1192 ... | tri≈ ¬a b ¬c = b | |
890 | 1193 ... | tri> ¬a ¬b c = ⊥-elim ( o<> u1<x ? ) |
863 | 1194 s1u=x : supf0 u1 ≡ x |
872 | 1195 s1u=x = trans ? eq |
863 | 1196 zc13 : osuc px o< osuc u1 |
1197 zc13 = o≤-refl0 ( trans (Oprev.oprev=x op) (sym eq ) ) | |
1198 x<sup : {w : Ordinal} → odef (UnionCF A f mf ay supf0 px) w → (w ≡ x) ∨ (w << x) | |
872 | 1199 x<sup {w} ⟪ az , ch-init {w} fc ⟫ = subst (λ k → (w ≡ k) ∨ (w << k)) s1u=x ? |
899
37a09244cebd
UChain u<x to u≤x again
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
898
diff
changeset
|
1200 x<sup {w} ⟪ az , ch-is-sup u u≤x is-sup fc ⟫ with osuc-≡< ( supf-mono (ordtrans (o<→≤ u≤x) ? )) |
890 | 1201 ... | case1 eq1 = ⊥-elim ( o<¬≡ zc14 ? ) where |
851 | 1202 zc14 : u ≡ osuc px |
1203 zc14 = begin | |
1204 u ≡⟨ sym ( ChainP.supu=u is-sup) ⟩ | |
894 | 1205 supf0 u ≡⟨ ? ⟩ |
857 | 1206 supf0 u1 ≡⟨ s1u=x ⟩ |
851 | 1207 x ≡⟨ sym (Oprev.oprev=x op) ⟩ |
1208 osuc px ∎ where open ≡-Reasoning | |
872 | 1209 ... | case2 lt = subst (λ k → (w ≡ k) ∨ (w << k)) s1u=x ? |
863 | 1210 zc12 : supf0 x ≡ u1 |
872 | 1211 zc12 = subst (λ k → supf0 k ≡ u1) eq ? |
863 | 1212 zcsup : xSUP (UnionCF A f mf ay supf0 px) x |
868 | 1213 zcsup = record { ax = subst (λ k → odef A k) (trans zc12 eq) (ZChain.asupf zc) |
851 | 1214 ; is-sup = record { x<sup = x<sup } } |
872 | 1215 zc11 (case2 hp) {z} ⟪ az , ch-is-sup u1 u1<x u1-is-sup fc ⟫ | tri> ¬a ¬b px<u = case1 ? where |
863 | 1216 eq : u1 ≡ x |
864 | 1217 eq with trio< u1 x |
1218 ... | tri< a ¬b ¬c = ⊥-elim ( ¬p<x<op ⟪ px<u , subst (λ k → u1 o< k ) (sym (Oprev.oprev=x op )) a ⟫ ) | |
1219 ... | tri≈ ¬a b ¬c = b | |
890 | 1220 ... | tri> ¬a ¬b c = ⊥-elim ( o<> u1<x ? ) |
858 | 1221 zc20 : {z : Ordinal} → FClosure A f (supf0 u1) z → OD.def (od pchain) z |
1222 zc20 {z} (init asu su=z ) = zc13 where | |
1223 zc14 : x ≡ z | |
1224 zc14 = begin | |
1225 x ≡⟨ sym eq ⟩ | |
872 | 1226 u1 ≡⟨ sym ? ⟩ |
858 | 1227 supf0 u1 ≡⟨ su=z ⟩ |
1228 z ∎ where open ≡-Reasoning | |
1229 zc13 : odef pchain z | |
1230 zc13 = subst (λ k → odef pchain k) (trans (sym (HasPrev.x=fy hp)) zc14) ( ZChain.f-next zc (HasPrev.ay hp) ) | |
1231 zc20 {.(f w)} (fsuc w fc) = ZChain.f-next zc (zc20 fc) | |
891 | 1232 |
857 | 1233 record STMP {z : Ordinal} (z≤x : z o≤ x ) : Set (Level.suc n) where |
1234 field | |
891 | 1235 tsup : MinSUP A (UnionCF A f mf ay supf1 z) |
1236 tsup=sup : supf1 z ≡ MinSUP.sup tsup | |
1237 | |
857 | 1238 sup : {z : Ordinal} → (z≤x : z o≤ x ) → STMP z≤x |
1239 sup {z} z≤x with trio< z px | |
891 | 1240 ... | tri< a ¬b ¬c = ? -- jrecord { tsup = ZChain.minsup zc (o<→≤ a) ; tsup=sup = ZChain.supf-is-minsup zc (o<→≤ a) } |
1241 ... | tri≈ ¬a b ¬c = ? -- record { tsup = ZChain.minsup zc (o≤-refl0 b) ; tsup=sup = ZChain.supf-is-minsup zc (o≤-refl0 b) } | |
865 | 1242 ... | tri> ¬a ¬b px<z = zc35 where |
840 | 1243 zc30 : z ≡ x |
1244 zc30 with osuc-≡< z≤x | |
1245 ... | case1 eq = eq | |
1246 ... | case2 z<x = ⊥-elim (¬p<x<op ⟪ px<z , subst (λ k → z o< k ) (sym (Oprev.oprev=x op)) z<x ⟫ ) | |
865 | 1247 zc32 = ZChain.sup zc o≤-refl |
1248 zc34 : ¬ (supf0 px ≡ px) → {w : HOD} → UnionCF A f mf ay supf0 z ∋ w → (w ≡ SUP.sup zc32) ∨ (w < SUP.sup zc32) | |
882 | 1249 zc34 ne {w} lt with zc11 ? ⟪ proj1 lt , ? ⟫ |
864 | 1250 ... | case1 lt = SUP.x<sup zc32 lt |
865 | 1251 ... | case2 ⟪ spx=px , fc ⟫ = ⊥-elim ( ne spx=px ) |
857 | 1252 zc33 : supf0 z ≡ & (SUP.sup zc32) |
891 | 1253 zc33 = ? -- trans (sym (supfx (o≤-refl0 (sym zc30)))) ( ZChain.supf-is-minsup zc o≤-refl ) |
865 | 1254 zc36 : ¬ (supf0 px ≡ px) → STMP z≤x |
891 | 1255 zc36 ne = ? -- record { tsup = record { sup = SUP.sup zc32 ; as = SUP.as zc32 ; x<sup = zc34 ne } ; tsup=sup = zc33 } |
865 | 1256 zc35 : STMP z≤x |
1257 zc35 with trio< (supf0 px) px | |
1258 ... | tri< a ¬b ¬c = zc36 ¬b | |
1259 ... | tri> ¬a ¬b c = zc36 ¬b | |
891 | 1260 ... | tri≈ ¬a b ¬c = record { tsup = ? ; tsup=sup = ? } where |
1261 zc37 : MinSUP A (UnionCF A f mf ay supf0 z) | |
1262 zc37 = record { sup = ? ; asm = ? ; x<sup = ? } | |
803 | 1263 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
|
1264 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 | 1265 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
|
1266 ... | 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
|
1267 ... | 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 ⟫ |
882 | 1268 ... | tri> ¬a ¬b px<b = zc31 ? where |
815 | 1269 zc30 : x ≡ b |
1270 zc30 with osuc-≡< b≤x | |
1271 ... | case1 eq = sym (eq) | |
1272 ... | case2 b<x = ⊥-elim (¬p<x<op ⟪ px<b , subst (λ k → b o< k ) (sym (Oprev.oprev=x op)) b<x ⟫ ) | |
859 | 1273 zcsup : xSUP (UnionCF A f mf ay supf0 px) x |
1274 zcsup with zc30 | |
1275 ... | refl = record { ax = ab ; is-sup = record { x<sup = λ {w} lt → | |
872 | 1276 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
|
1277 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
|
1278 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
|
1279 ... | refl = ⊥-elim (¬sp=x zcsup ) |
105f8d6c51fb
no-extension on immidate ordinal passed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
859
diff
changeset
|
1280 zc31 (case2 hasPrev ) with zc30 |
863 | 1281 ... | refl = ⊥-elim ( proj2 is-sup record { ax = HasPrev.ax hasPrev ; y = HasPrev.y hasPrev |
872 | 1282 ; ay = ? ; x=fy = HasPrev.x=fy hasPrev } ) |
833 | 1283 |
728 | 1284 ... | no lim = zc5 where |
726
b2e2cd12e38f
psupf-mono and is-max conflict
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
725
diff
changeset
|
1285 |
703 | 1286 pzc : (z : Ordinal) → z o< x → ZChain A f mf ay z |
1287 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
|
1288 |
835 | 1289 ysp = & (SUP.sup (ysup f mf ay)) |
755 | 1290 |
835 | 1291 supf0 : Ordinal → Ordinal |
1292 supf0 z with trio< z x | |
1293 ... | tri< a ¬b ¬c = ZChain.supf (pzc (osuc z) (ob<x lim a)) z | |
836 | 1294 ... | tri≈ ¬a b ¬c = ysp |
1295 ... | tri> ¬a ¬b c = ysp | |
835 | 1296 |
838 | 1297 pchain : HOD |
1298 pchain = UnionCF A f mf ay supf0 x | |
835 | 1299 |
838 | 1300 ptotal0 : IsTotalOrderSet pchain |
835 | 1301 ptotal0 {a} {b} ca cb = subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso uz01 where |
1302 uz01 : Tri (* (& a) < * (& b)) (* (& a) ≡ * (& b)) (* (& b) < * (& a) ) | |
1303 uz01 = chain-total A f mf ay supf0 ( (proj2 ca)) ( (proj2 cb)) | |
844 | 1304 |
880 | 1305 usup : MinSUP A pchain |
1306 usup = minsupP pchain (λ lt → proj1 lt) ptotal0 | |
1307 spu = MinSUP.sup usup | |
834 | 1308 |
794 | 1309 supf1 : Ordinal → Ordinal |
835 | 1310 supf1 z with trio< z x |
1311 ... | tri< a ¬b ¬c = ZChain.supf (pzc (osuc z) (ob<x lim a)) z | |
836 | 1312 ... | tri≈ ¬a b ¬c = spu |
1313 ... | tri> ¬a ¬b c = spu | |
755 | 1314 |
838 | 1315 pchain1 : HOD |
1316 pchain1 = UnionCF A f mf ay supf1 x | |
704 | 1317 |
758
a2947dfff80d
is-max on first transfinite induction is not good
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
757
diff
changeset
|
1318 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
|
1319 b o< x → (ab : odef A b) → |
836 | 1320 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
|
1321 * 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
|
1322 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
|
1323 ... | ⟪ ab0 , ch-init fc ⟫ = ⟪ ab , ch-init ( subst (λ k → FClosure A f y k) (sym (HasPrev.x=fy has-prev)) (fsuc _ fc )) ⟫ |
890 | 1324 ... | ⟪ ab0 , ch-is-sup u u≤x is-sup fc ⟫ = ? -- ⟪ ab , |
1325 -- subst (λ k → UChain A f mf ay supf x k ) | |
1326 -- (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
|
1327 |
844 | 1328 zc70 : HasPrev A pchain x f → ¬ xSUP pchain x |
1329 zc70 pr xsup = ? | |
1330 | |
1331 no-extension : ¬ ( xSUP (UnionCF A f mf ay supf0 x) x ) → ZChain A f mf ay x | |
879 | 1332 no-extension ¬sp=x = ? where -- record { supf = supf1 ; sup=u = sup=u |
1333 -- ; 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
|
1334 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
|
1335 supfu {u} a z = ZChain.supf (pzc (osuc u) (ob<x lim a)) z |
838 | 1336 pchain0=1 : pchain ≡ pchain1 |
1337 pchain0=1 = ==→o≡ record { eq→ = zc10 ; eq← = zc11 } where | |
1338 zc10 : {z : Ordinal} → OD.def (od pchain) z → OD.def (od pchain1) z | |
1339 zc10 {z} ⟪ az , ch-init fc ⟫ = ⟪ az , ch-init fc ⟫ | |
1340 zc10 {z} ⟪ az , ch-is-sup u u≤x is-sup fc ⟫ = zc12 fc where | |
1341 zc12 : {z : Ordinal} → FClosure A f (supf0 u) z → odef pchain1 z | |
1342 zc12 (fsuc x fc) with zc12 fc | |
1343 ... | ⟪ ua1 , ch-init fc₁ ⟫ = ⟪ proj2 ( mf _ ua1) , ch-init (fsuc _ fc₁) ⟫ | |
1344 ... | ⟪ ua1 , ch-is-sup u u≤x is-sup fc₁ ⟫ = ⟪ proj2 ( mf _ ua1) , ch-is-sup u u≤x is-sup (fsuc _ fc₁) ⟫ | |
890 | 1345 zc12 (init asu su=z ) = ⟪ subst (λ k → odef A k) su=z asu , ch-is-sup u ? ? (init ? ? ) ⟫ |
838 | 1346 zc11 : {z : Ordinal} → OD.def (od pchain1) z → OD.def (od pchain) z |
1347 zc11 {z} ⟪ az , ch-init fc ⟫ = ⟪ az , ch-init fc ⟫ | |
899
37a09244cebd
UChain u<x to u≤x again
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
898
diff
changeset
|
1348 zc11 {z} ⟪ az , ch-is-sup u u≤x is-sup fc ⟫ = zc13 fc where |
838 | 1349 zc13 : {z : Ordinal} → FClosure A f (supf1 u) z → odef pchain z |
1350 zc13 (fsuc x fc) with zc13 fc | |
1351 ... | ⟪ ua1 , ch-init fc₁ ⟫ = ⟪ proj2 ( mf _ ua1) , ch-init (fsuc _ fc₁) ⟫ | |
899
37a09244cebd
UChain u<x to u≤x again
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
898
diff
changeset
|
1352 ... | ⟪ ua1 , ch-is-sup u u≤x is-sup fc₁ ⟫ = ⟪ proj2 ( mf _ ua1) , ch-is-sup u u≤x is-sup (fsuc _ fc₁) ⟫ |
838 | 1353 zc13 (init asu su=z ) with trio< u x |
890 | 1354 ... | tri< a ¬b ¬c = ⟪ ? , ch-is-sup u ? ? (init ? ? ) ⟫ |
838 | 1355 ... | tri≈ ¬a b ¬c = ? |
899
37a09244cebd
UChain u<x to u≤x again
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
898
diff
changeset
|
1356 ... | tri> ¬a ¬b c = ? -- ⊥-elim ( o≤> u≤x c ) |
832 | 1357 sup : {z : Ordinal} → z o≤ x → SUP A (UnionCF A f mf ay supf1 z) |
797 | 1358 sup {z} z≤x with trio< z x |
838 | 1359 ... | tri< a ¬b ¬c = SUP⊆ ? (ZChain.sup (pzc (osuc z) {!!}) {!!} ) |
815 | 1360 ... | tri≈ ¬a b ¬c = {!!} |
843 | 1361 ... | tri> ¬a ¬b x<z = ⊥-elim (o<¬≡ refl (ordtrans<-≤ x<z z≤x )) |
832 | 1362 sis : {z : Ordinal} (x≤z : z o≤ x) → supf1 z ≡ & (SUP.sup (sup {!!})) |
843 | 1363 sis {z} z≤x with trio< z x |
800 | 1364 ... | tri< a ¬b ¬c = {!!} where |
891 | 1365 zc8 = ZChain.supf-is-minsup (pzc z a) {!!} |
815 | 1366 ... | tri≈ ¬a b ¬c = {!!} |
843 | 1367 ... | 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
|
1368 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 | 1369 sup=u {z} ab z≤x is-sup with trio< z x |
833 | 1370 ... | tri< a ¬b ¬c = ? -- ZChain.sup=u (pzc (osuc b) (ob<x lim a)) ab {!!} record { x<sup = {!!} } |
815 | 1371 ... | tri≈ ¬a b ¬c = {!!} -- ZChain.sup=u (pzc (osuc ?) ?) ab {!!} record { x<sup = {!!} } |
843 | 1372 ... | tri> ¬a ¬b x<z = ⊥-elim (o<¬≡ refl (ordtrans<-≤ x<z z≤x )) |
797 | 1373 |
703 | 1374 zc5 : ZChain A f mf ay x |
697 | 1375 zc5 with ODC.∋-p O A (* x) |
796 | 1376 ... | no noax = no-extension {!!} -- ¬ A ∋ p, just skip |
836 | 1377 ... | yes ax with ODC.p∨¬p O ( HasPrev A pchain x f ) |
703 | 1378 -- we have to check adding x preserve is-max ZChain A y f mf x |
796 | 1379 ... | case1 pr = no-extension {!!} |
704 | 1380 ... | case2 ¬fy<x with ODC.p∨¬p O (IsSup A pchain ax ) |
879 | 1381 ... | case1 is-sup = ? -- record { supf = supf1 ; sup=u = {!!} |
1382 -- ; sup = {!!} ; supf-is-sup = {!!} ; supf-mono = {!!}; asupf = {!!} } -- where -- x is a sup of (zc ?) | |
796 | 1383 ... | case2 ¬x=sup = no-extension {!!} -- x is not f y' nor sup of former ZChain from y -- no extention |
553 | 1384 |
703 | 1385 SZ : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) → {y : Ordinal} (ay : odef A y) → ZChain A f mf ay (& A) |
1386 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
|
1387 |
551 | 1388 zorn00 : Maximal A |
1389 zorn00 with is-o∅ ( & HasMaximal ) -- we have no Level (suc n) LEM | |
804 | 1390 ... | no not = record { maximal = ODC.minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) ; as = zorn01 ; ¬maximal<x = zorn02 } where |
551 | 1391 -- yes we have the maximal |
1392 zorn03 : odef HasMaximal ( & ( ODC.minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) ) ) | |
606 | 1393 zorn03 = ODC.x∋minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) -- Axiom of choice |
551 | 1394 zorn01 : A ∋ ODC.minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) |
1395 zorn01 = proj1 zorn03 | |
1396 zorn02 : {x : HOD} → A ∋ x → ¬ (ODC.minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) < x) | |
1397 zorn02 {x} ax m<x = proj2 zorn03 (& x) ax (subst₂ (λ j k → j < k) (sym *iso) (sym *iso) m<x ) | |
877 | 1398 ... | yes ¬Maximal = ⊥-elim ( z04 nmx zorn04 ) where |
551 | 1399 -- if we have no maximal, make ZChain, which contradict SUP condition |
1400 nmx : ¬ Maximal A | |
1401 nmx mx = ∅< {HasMaximal} zc5 ( ≡o∅→=od∅ ¬Maximal ) where | |
1402 zc5 : odef A (& (Maximal.maximal mx)) ∧ (( y : Ordinal ) → odef A y → ¬ (* (& (Maximal.maximal mx)) < * y)) | |
804 | 1403 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 | 1404 zorn04 : ZChain A (cf nmx) (cf-is-≤-monotonic nmx) as0 (& A) |
653 | 1405 zorn04 = SZ (cf nmx) (cf-is-≤-monotonic nmx) (subst (λ k → odef A k ) &iso as ) |
551 | 1406 |
516 | 1407 -- usage (see filter.agda ) |
1408 -- | |
497 | 1409 -- _⊆'_ : ( A B : HOD ) → Set n |
1410 -- _⊆'_ A B = (x : Ordinal ) → odef A x → odef B x | |
482 | 1411 |
497 | 1412 -- MaximumSubset : {L P : HOD} |
1413 -- → o∅ o< & L → o∅ o< & P → P ⊆ L | |
1414 -- → IsPartialOrderSet P _⊆'_ | |
1415 -- → ( (B : HOD) → B ⊆ P → IsTotalOrderSet B _⊆'_ → SUP P B _⊆'_ ) | |
1416 -- → Maximal P (_⊆'_) | |
1417 -- MaximumSubset {L} {P} 0<L 0<P P⊆L PO SP = Zorn-lemma {P} {_⊆'_} 0<P PO SP |