Mercurial > hg > Members > kono > Proof > ZF-in-agda
annotate src/zorn.agda @ 897:f52c610cca06
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 06 Oct 2022 18:44:18 +0900 |
parents | 1f3a93bb4229 |
children | 37ddab37e189 |
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 | |
894 | 265 ch-is-sup : (u : Ordinal) {z : Ordinal } (u<x : supf u o< supf 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 ) |
890 | 574 {a b c : Ordinal} → supf a o≤ supf 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 ⟫ = | |
863 | 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 | |
878 | 589 |
803 | 590 -- |
591 -- Second TransFinite Pass for maximality | |
592 -- | |
593 | |
793 | 594 SZ1 : ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) |
728 | 595 {init : Ordinal} (ay : odef A init) (zc : ZChain A f mf ay (& A)) (x : Ordinal) → ZChain1 A f mf ay zc x |
793 | 596 SZ1 f mf {y} ay zc x = TransFinite { λ x → ZChain1 A f mf ay zc x } zc1 x where |
890 | 597 chain-mono1 : {a b c : Ordinal} → (ZChain.supf zc a) o≤ (ZChain.supf zc b) |
788 | 598 → odef (UnionCF A f mf ay (ZChain.supf zc) a) c → odef (UnionCF A f mf ay (ZChain.supf zc) b) c |
793 | 599 chain-mono1 {a} {b} {c} a≤b = chain-mono f mf ay (ZChain.supf zc) a≤b |
735 | 600 is-max-hp : (x : Ordinal) {a : Ordinal} {b : Ordinal} → odef (UnionCF A f mf ay (ZChain.supf zc) x) a → |
897 | 601 b o< x → (ab : odef A b) → |
836 | 602 HasPrev A (UnionCF A f mf ay (ZChain.supf zc) x) b f → |
735 | 603 * a < * b → odef (UnionCF A f mf ay (ZChain.supf zc) x) b |
749 | 604 is-max-hp x {a} {b} ua b<x ab has-prev a<b with HasPrev.ay has-prev |
605 ... | ⟪ ab0 , ch-init fc ⟫ = ⟪ ab , ch-init ( subst (λ k → FClosure A f y k) (sym (HasPrev.x=fy has-prev)) (fsuc _ fc )) ⟫ | |
894 | 606 ... | ⟪ ab0 , ch-is-sup u u≤x is-sup fc ⟫ = ⟪ ab , subst (λ k → UChain A f mf ay (ZChain.supf zc) x k ) |
791 | 607 (sym (HasPrev.x=fy has-prev)) ( ch-is-sup u u≤x is-sup (fsuc _ fc)) ⟫ |
868 | 608 |
869 | 609 supf = ZChain.supf zc |
610 | |
611 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 | |
612 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 | |
613 s<b : s o< b | |
614 s<b = ZChain.supf-inject zc ss<sb | |
615 s≤<z : s o≤ & A | |
616 s≤<z = ordtrans s<b b≤z | |
870 | 617 zc04 : odef (UnionCF A f mf ay supf (& A)) (supf s) |
874 | 618 zc04 = ZChain.csupf zc (z09 (ZChain.asupf zc)) |
869 | 619 zc05 : odef (UnionCF A f mf ay supf b) (supf s) |
620 zc05 with zc04 | |
621 ... | ⟪ as , ch-init fc ⟫ = ⟪ as , ch-init fc ⟫ | |
894 | 622 ... | ⟪ as , ch-is-sup u u<x is-sup fc ⟫ = ⟪ as , ch-is-sup u zc08 is-sup fc ⟫ where |
870 | 623 zc07 : FClosure A f (supf u) (supf s) -- supf u ≤ supf s → supf u o≤ supf s |
624 zc07 = fc | |
869 | 625 zc06 : supf u ≡ u |
626 zc06 = ChainP.supu=u is-sup | |
894 | 627 zc08 : supf u o< supf b |
628 zc08 = ordtrans≤-< (ZChain.supf-<= zc (≤to<= ( s≤fc _ f mf fc ))) ss<sb | |
869 | 629 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 |
630 zc04 : odef (UnionCF A f mf ay supf b) (f x) | |
631 zc04 with subst (λ k → odef (UnionCF A f mf ay supf b) k ) &iso (csupf-fc b<z ss≤sb fc ) | |
632 ... | ⟪ as , ch-init fc ⟫ = ⟪ proj2 (mf _ as) , ch-init (fsuc _ fc) ⟫ | |
633 ... | ⟪ as , ch-is-sup u u≤x is-sup fc ⟫ = ⟪ proj2 (mf _ as) , ch-is-sup u u≤x is-sup (fsuc _ fc) ⟫ | |
634 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) | |
635 order {b} {s} {z1} b<z ss<sb fc = zc04 where | |
891 | 636 zc00 : ( z1 ≡ MinSUP.sup (ZChain.minsup zc (o<→≤ b<z) )) ∨ ( z1 << MinSUP.sup ( ZChain.minsup zc (o<→≤ b<z) ) ) |
892 | 637 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 | 638 -- supf (supf b) ≡ supf b |
869 | 639 zc04 : (z1 ≡ supf b) ∨ (z1 << supf b) |
640 zc04 with zc00 | |
892 | 641 ... | case1 eq = case1 (subst₂ (λ j k → j ≡ k ) refl (sym (ZChain.supf-is-minsup zc (o<→≤ b<z)) ) eq ) |
642 ... | case2 lt = case2 (subst₂ (λ j k → j < * k ) refl (sym (ZChain.supf-is-minsup zc (o<→≤ b<z) )) lt ) | |
868 | 643 |
728 | 644 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
|
645 zc1 x prev with Oprev-p x |
756 | 646 ... | 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
|
647 px = Oprev.oprev op |
789 | 648 zc-b<x : {b : Ordinal } → b o< x → b o< osuc px |
649 zc-b<x {b} lt = subst (λ k → b o< k ) (sym (Oprev.oprev=x op)) lt | |
894 | 650 is-max : {a : Ordinal} {b : Ordinal} → odef (UnionCF A f mf ay supf x) a → |
897 | 651 b o< x → (ab : odef A b) → |
869 | 652 HasPrev A (UnionCF A f mf ay supf x) b f ∨ IsSup A (UnionCF A f mf ay supf x) ab → |
653 * 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
|
654 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
|
655 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
|
656 is-max {a} {b} ua b<x ab P a<b | case2 is-sup |
896 | 657 = ⟪ ab , ch-is-sup b sb<sx 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
|
658 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
|
659 b<A = z09 ab |
869 | 660 m04 : ¬ HasPrev A (UnionCF A f mf ay supf b) b f |
894 | 661 m04 nhp = proj1 is-sup ( record { ax = HasPrev.ax nhp ; y = HasPrev.y nhp ; ay = |
896 | 662 chain-mono1 ? (HasPrev.ay nhp) |
860
105f8d6c51fb
no-extension on immidate ordinal passed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
859
diff
changeset
|
663 ; x=fy = HasPrev.x=fy nhp } ) |
859 | 664 m05 : ZChain.supf zc b ≡ b |
665 m05 = ZChain.sup=u zc ab (o<→≤ (z09 ab) ) | |
896 | 666 ⟪ record { x<sup = λ {z} uz → IsSup.x<sup (proj2 is-sup) (chain-mono1 ? 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
|
667 m08 : {z : Ordinal} → (fcz : FClosure A f y z ) → z <= ZChain.supf zc b |
872 | 668 m08 {z} fcz = ZChain.fcy<sup zc (o<→≤ b<A) fcz |
828 | 669 m09 : {s z1 : Ordinal} → ZChain.supf zc s o< ZChain.supf zc b |
825 | 670 → FClosure A f (ZChain.supf zc s) z1 → z1 <= ZChain.supf zc b |
869 | 671 m09 {s} {z} s<b fcz = order b<A s<b fcz |
672 m06 : ChainP A f mf ay supf b | |
859 | 673 m06 = record { fcy<sup = m08 ; order = m09 ; supu=u = m05 } |
897 | 674 sb<sx : supf b o< supf x |
675 sb<sx with osuc-≡< ( ZChain.supf-mono zc (o<→≤ b<x ) ) | |
676 ... | case2 lt = lt | |
677 ... | case1 eq = ⊥-elim ( <-irr (case1 (sym m11)) m12 ) where | |
678 --- supf b ≡ supf x * ( supf x ) ≤ * a < * b , * (supf x) ≡ * (supf b) ≡ * b | |
679 m10 : {a : Ordinal} → odef (UnionCF A f mf ay supf x) a → * ( supf x ) ≤ * a | |
680 m10 {a} ⟪ ua , ch-init fc ⟫ = ? | |
681 m10 {a} ⟪ ua , ch-is-sup u u<x is-sup fc ⟫ = ? | |
682 m12 : * ( supf x ) < * b | |
683 m12 = ? | |
684 m11 : * ( supf x ) ≡ * b | |
685 m11 = ? | |
756 | 686 ... | no lim = record { is-max = is-max } where |
869 | 687 is-max : {a : Ordinal} {b : Ordinal} → odef (UnionCF A f mf ay supf x) a → |
897 | 688 b o< x → (ab : odef A b) → |
869 | 689 HasPrev A (UnionCF A f mf ay supf x) b f ∨ IsSup A (UnionCF A f mf ay supf x) ab → |
690 * 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
|
691 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
|
692 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
|
693 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 | 694 ... | 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 )) ⟫ |
896 | 695 ... | case2 y<b = ⟪ ab , ch-is-sup b ? 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
|
696 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
|
697 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
|
698 m07 : {z : Ordinal} → FClosure A f y z → z <= ZChain.supf zc b |
872 | 699 m07 {z} fc = ZChain.fcy<sup zc (o<→≤ m09) fc |
828 | 700 m08 : {s z1 : Ordinal} → ZChain.supf zc s o< ZChain.supf zc b |
825 | 701 → FClosure A f (ZChain.supf zc s) z1 → z1 <= ZChain.supf zc b |
869 | 702 m08 {s} {z1} s<b fc = order m09 s<b fc |
703 m04 : ¬ HasPrev A (UnionCF A f mf ay supf b) b f | |
894 | 704 m04 nhp = proj1 is-sup ( record { ax = HasPrev.ax nhp ; y = HasPrev.y nhp ; ay = |
896 | 705 chain-mono1 ? (HasPrev.ay nhp) |
860
105f8d6c51fb
no-extension on immidate ordinal passed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
859
diff
changeset
|
706 ; x=fy = HasPrev.x=fy nhp } ) |
859 | 707 m05 : ZChain.supf zc b ≡ b |
708 m05 = ZChain.sup=u zc ab (o<→≤ m09) | |
896 | 709 ⟪ record { x<sup = λ lt → IsSup.x<sup (proj2 is-sup) (chain-mono1 ? lt )} , m04 ⟫ -- ZChain on x |
869 | 710 m06 : ChainP A f mf ay supf b |
859 | 711 m06 = record { fcy<sup = m07 ; order = m08 ; supu=u = m05 } |
727 | 712 |
543 | 713 --- |
560 | 714 --- the maximum chain has fix point of any ≤-monotonic function |
543 | 715 --- |
703 | 716 fixpoint : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) (zc : ZChain A f mf as0 (& A) ) |
877 | 717 → f (& (SUP.sup (sp0 f mf as0 zc ))) ≡ & (SUP.sup (sp0 f mf as0 zc )) |
718 fixpoint f mf zc = z14 where | |
538 | 719 chain = ZChain.chain zc |
894 | 720 supf = ZChain.supf zc |
895 | 721 sp1 : SUP A chain |
877 | 722 sp1 = sp0 f mf as0 zc |
897 | 723 z10 : {a b : Ordinal } → (ca : odef chain a ) → b o< & A → (ab : odef A b ) |
894 | 724 → HasPrev A chain b f ∨ IsSup A chain {b} ab |
538 | 725 → * a < * b → odef chain b |
793 | 726 z10 = ZChain1.is-max (SZ1 f mf as0 zc (& A) ) |
897 | 727 z21 : & (SUP.sup sp1) o< & A |
728 z21 = c<→o< (SUP.as sp1 ) | |
729 -- z21 : supf (& (SUP.sup sp1)) o< & A | |
730 -- z21 = subst (λ k → k o< & A) &iso ( c<→o< (subst (λ k → odef A k) (sym &iso) (ZChain.asupf zc ) )) | |
538 | 731 z12 : odef chain (& (SUP.sup sp1)) |
732 z12 with o≡? (& s) (& (SUP.sup sp1)) | |
653 | 733 ... | yes eq = subst (λ k → odef chain k) eq ( ZChain.chain∋init zc ) |
891 | 734 ... | no ne = z10 {& s} {& (SUP.sup sp1)} ( ZChain.chain∋init zc ) z21 (SUP.as sp1) |
570 | 735 (case2 z19 ) z13 where |
538 | 736 z13 : * (& s) < * (& (SUP.sup sp1)) |
653 | 737 z13 with SUP.x<sup sp1 ( ZChain.chain∋init zc ) |
538 | 738 ... | case1 eq = ⊥-elim ( ne (cong (&) eq) ) |
739 ... | case2 lt = subst₂ (λ j k → j < k ) (sym *iso) (sym *iso) lt | |
804 | 740 z19 : IsSup A chain {& (SUP.sup sp1)} (SUP.as sp1) |
571 | 741 z19 = record { x<sup = z20 } where |
742 z20 : {y : Ordinal} → odef chain y → (y ≡ & (SUP.sup sp1)) ∨ (y << & (SUP.sup sp1)) | |
743 z20 {y} zy with SUP.x<sup sp1 (subst (λ k → odef chain k ) (sym &iso) zy) | |
570 | 744 ... | case1 y=p = case1 (subst (λ k → k ≡ _ ) &iso ( cong (&) y=p )) |
745 ... | case2 y<p = case2 (subst (λ k → * y < k ) (sym *iso) y<p ) | |
877 | 746 ztotal : IsTotalOrderSet (ZChain.chain zc) |
747 ztotal {a} {b} ca cb = subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso uz01 where | |
748 uz01 : Tri (* (& a) < * (& b)) (* (& a) ≡ * (& b)) (* (& b) < * (& a) ) | |
894 | 749 uz01 = chain-total A f mf as0 supf ( (proj2 ca)) ( (proj2 cb)) |
877 | 750 |
751 z14 : f (& (SUP.sup (sp0 f mf as0 zc ))) ≡ & (SUP.sup (sp0 f mf as0 zc )) | |
752 z14 with ztotal (subst (λ k → odef chain k) (sym &iso) (ZChain.f-next zc z12 )) z12 | |
631 | 753 ... | tri< a ¬b ¬c = ⊥-elim z16 where |
754 z16 : ⊥ | |
804 | 755 z16 with proj1 (mf (& ( SUP.sup sp1)) ( SUP.as sp1 )) |
631 | 756 ... | case1 eq = ⊥-elim (¬b (subst₂ (λ j k → j ≡ k ) refl *iso (sym eq) )) |
757 ... | case2 lt = ⊥-elim (¬c (subst₂ (λ j k → k < j ) refl *iso lt )) | |
758 ... | tri≈ ¬a b ¬c = subst ( λ k → k ≡ & (SUP.sup sp1) ) &iso ( cong (&) b ) | |
759 ... | tri> ¬a ¬b c = ⊥-elim z17 where | |
760 z15 : (* (f ( & ( SUP.sup sp1 ))) ≡ SUP.sup sp1) ∨ (* (f ( & ( SUP.sup sp1 ))) < SUP.sup sp1) | |
761 z15 = SUP.x<sup sp1 (subst (λ k → odef chain k ) (sym &iso) (ZChain.f-next zc z12 )) | |
762 z17 : ⊥ | |
763 z17 with z15 | |
764 ... | case1 eq = ¬b eq | |
765 ... | case2 lt = ¬a lt | |
560 | 766 |
767 -- ZChain contradicts ¬ Maximal | |
768 -- | |
571 | 769 -- ZChain forces fix point on any ≤-monotonic function (fixpoint) |
560 | 770 -- ¬ Maximal create cf which is a <-monotonic function by axiom of choice. This contradicts fix point of ZChain |
771 -- | |
877 | 772 z04 : (nmx : ¬ Maximal A ) → (zc : ZChain A (cf nmx) (cf-is-≤-monotonic nmx) as0 (& A)) → ⊥ |
773 z04 nmx zc = <-irr0 {* (cf nmx c)} {* c} (subst (λ k → odef A k ) (sym &iso) (proj1 (is-cf nmx (SUP.as sp1 )))) | |
804 | 774 (subst (λ k → odef A (& k)) (sym *iso) (SUP.as sp1) ) |
877 | 775 (case1 ( cong (*)( fixpoint (cf nmx) (cf-is-≤-monotonic nmx ) zc ))) -- x ≡ f x ̄ |
804 | 776 (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
|
777 sp1 : SUP A (ZChain.chain zc) |
877 | 778 sp1 = sp0 (cf nmx) (cf-is-≤-monotonic nmx) as0 zc |
538 | 779 c = & (SUP.sup sp1) |
548 | 780 |
757 | 781 uchain : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) → HOD |
782 uchain f mf {y} ay = record { od = record { def = λ x → FClosure A f y x } ; odmax = & A ; <odmax = | |
783 λ {z} cz → subst (λ k → k o< & A) &iso ( c<→o< (subst (λ k → odef A k ) (sym &iso ) (A∋fc y f mf cz ))) } | |
784 | |
785 utotal : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) | |
786 → IsTotalOrderSet (uchain f mf ay) | |
787 utotal f mf {y} ay {a} {b} ca cb = subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso uz01 where | |
788 uz01 : Tri (* (& a) < * (& b)) (* (& a) ≡ * (& b)) (* (& b) < * (& a) ) | |
789 uz01 = fcn-cmp y f mf ca cb | |
790 | |
791 ysup : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) | |
792 → SUP A (uchain f mf ay) | |
793 ysup f mf {y} ay = supP (uchain f mf ay) (λ lt → A∋fc y f mf lt) (utotal f mf ay) | |
794 | |
793 | 795 SUP⊆ : { B C : HOD } → B ⊆' C → SUP A C → SUP A B |
804 | 796 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 | 797 |
833 | 798 record xSUP (B : HOD) (x : Ordinal) : Set n where |
799 field | |
800 ax : odef A x | |
801 is-sup : IsSup A B ax | |
802 | |
560 | 803 -- |
547 | 804 -- create all ZChains under o< x |
560 | 805 -- |
608
6655f03984f9
mutual tranfinite in zorn
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
607
diff
changeset
|
806 |
674 | 807 ind : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) → (x : Ordinal) |
703 | 808 → ((z : Ordinal) → z o< x → ZChain A f mf ay z) → ZChain A f mf ay x |
707 | 809 ind f mf {y} ay x prev with Oprev-p x |
697 | 810 ... | yes op = zc4 where |
682 | 811 -- |
812 -- we have previous ordinal to use induction | |
813 -- | |
814 px = Oprev.oprev op | |
703 | 815 zc : ZChain A f mf ay (Oprev.oprev op) |
682 | 816 zc = prev px (subst (λ k → px o< k) (Oprev.oprev=x op) <-osuc ) |
817 px<x : px o< x | |
818 px<x = subst (λ k → px o< k) (Oprev.oprev=x op) <-osuc | |
709 | 819 zc-b<x : (b : Ordinal ) → b o< x → b o< osuc px |
820 zc-b<x b lt = subst (λ k → b o< k ) (sym (Oprev.oprev=x op)) lt | |
697 | 821 |
754 | 822 supf0 = ZChain.supf zc |
869 | 823 pchain : HOD |
824 pchain = UnionCF A f mf ay supf0 px | |
835 | 825 |
890 | 826 -- px o< supf0 px → UnionCF supf0 px ≡ UnionCF supf1 x |
871 | 827 -- supf1 x ≡ supf0 px |
890 | 828 -- px ≡ supf0 px → ( UnionCF A f mf ay supf0 px ∪ FClosure (supf0 px) ) ≡ UnionCF supf1 x |
829 -- supf1 x ≡ sup of ( UnionCF A f mf ay supf0 px ∪ FClosure (supf0 px) (= UnionCF supf1 x))) -- nsup ≥ supf0 px | |
830 -- supf0 px o< px → ( UnionCF A f mf ay supf0 px ∪ FClosure (supf0 px) ) ≡ UnionCF supf1 x | |
831 -- nsup o≥ supf0 px → supf1 x ≡ nsup | |
832 -- nsup o< supf0 px → ? | |
844 | 833 |
857 | 834 supf-mono : {a b : Ordinal } → a o≤ b → supf0 a o≤ supf0 b |
835 supf-mono = ZChain.supf-mono zc | |
844 | 836 |
861 | 837 zc04 : {b : Ordinal} → b o≤ x → (b o≤ px ) ∨ (b ≡ x ) |
838 zc04 {b} b≤x with trio< b px | |
839 ... | tri< a ¬b ¬c = case1 (o<→≤ a) | |
840 ... | tri≈ ¬a b ¬c = case1 (o≤-refl0 b) | |
841 ... | tri> ¬a ¬b px<b with osuc-≡< b≤x | |
842 ... | case1 eq = case2 eq | |
843 ... | case2 b<x = ⊥-elim ( ¬p<x<op ⟪ px<b , subst (λ k → b o< k ) (sym (Oprev.oprev=x op)) b<x ⟫ ) | |
840 | 844 |
894 | 845 zc4 : ZChain A f mf ay x --- supf px ≤ supf x |
893 | 846 zc4 with osuc-≡< ? |
883 | 847 ... | case1 sfpx=px = record { supf = supf1 ; sup=u = ? ; asupf = asupf1 ; supf-mono = supf-mono1 ; supf-< = supf-<1 |
893 | 848 ; supfmax = ? ; minsup = ? ; supf-is-minsup = ? ; csupf = ? } where |
883 | 849 |
850 -- we are going to determine (supf x), which is not specified in previous zc | |
851 -- case1 : supf px ≡ px | |
852 -- supf px is MinSUP of previous chain , supf x ≡ MinSUP of Union of UChain and FClosure px | |
853 | |
871 | 854 pchainpx : HOD |
894 | 855 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 |
856 zc00 : {z : Ordinal } → (odef A z ∧ UChain A f mf ay supf0 px z ) ∨ FClosure A f px z → z o< & A | |
872 | 857 zc00 {z} (case1 lt) = z07 lt |
858 zc00 {z} (case2 fc) = z09 ( A∋fc px f mf fc ) | |
894 | 859 zc01 : {z : Ordinal } → (odef A z ∧ UChain A f mf ay supf0 px z ) ∨ FClosure A f px z → odef A z |
872 | 860 zc01 {z} (case1 lt) = proj1 lt |
861 zc01 {z} (case2 fc) = ( A∋fc px f mf fc ) | |
862 | |
894 | 863 zc02 : { a b : Ordinal } → odef A a ∧ UChain A f mf ay supf0 px a → FClosure A f px b → a <= b |
872 | 864 zc02 {a} {b} ca fb = zc05 fb where |
891 | 865 zc06 : MinSUP.sup (ZChain.minsup zc o≤-refl) ≡ px |
866 zc06 = trans (sym ( ZChain.supf-is-minsup zc o≤-refl )) (sym sfpx=px) | |
872 | 867 zc05 : {b : Ordinal } → FClosure A f px b → a <= b |
868 zc05 (fsuc b1 fb ) with proj1 ( mf b1 (A∋fc px f mf fb )) | |
869 ... | case1 eq = subst (λ k → a <= k ) (subst₂ (λ j k → j ≡ k) &iso &iso (cong (&) eq)) (zc05 fb) | |
870 ... | case2 lt = <-ftrans (zc05 fb) (case2 lt) | |
894 | 871 zc05 (init b1 refl) with MinSUP.x<sup (ZChain.minsup zc o≤-refl) ? -- |
872 -- (subst (λ k → odef A k ∧ UChain A f mf ay supf0 (supf0 px) k) (sym &iso) ca ) | |
892 | 873 ... | case1 eq = case1 (subst₂ (λ j k → j ≡ k ) &iso zc06 eq ) |
874 ... | case2 lt = case2 (subst₂ (λ j k → j < k ) *iso (cong (*) zc06) lt ) | |
871 | 875 |
872 | 876 ptotal : IsTotalOrderSet pchainpx |
877 ptotal (case1 a) (case1 b) = subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso | |
878 (chain-total A f mf ay supf0 (proj2 a) (proj2 b)) | |
879 ptotal {a0} {b0} (case1 a) (case2 b) with zc02 a b | |
880 ... | case1 eq = tri≈ (<-irr (case1 (sym eq1))) eq1 (<-irr (case1 eq1)) where | |
881 eq1 : a0 ≡ b0 | |
882 eq1 = subst₂ (λ j k → j ≡ k ) *iso *iso (cong (*) eq ) | |
883 ... | case2 lt = tri< lt1 (λ eq → <-irr (case1 (sym eq)) lt1) (<-irr (case2 lt1)) where | |
884 lt1 : a0 < b0 | |
885 lt1 = subst₂ (λ j k → j < k ) *iso *iso lt | |
886 ptotal {b0} {a0} (case2 b) (case1 a) with zc02 a b | |
887 ... | case1 eq = tri≈ (<-irr (case1 eq1)) (sym eq1) (<-irr (case1 (sym eq1))) where | |
888 eq1 : a0 ≡ b0 | |
889 eq1 = subst₂ (λ j k → j ≡ k ) *iso *iso (cong (*) eq ) | |
890 ... | case2 lt = tri> (<-irr (case2 lt1)) (λ eq → <-irr (case1 eq) lt1) lt1 where | |
891 lt1 : a0 < b0 | |
892 lt1 = subst₂ (λ j k → j < k ) *iso *iso lt | |
893 ptotal (case2 a) (case2 b) = subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso (fcn-cmp px f mf a b) | |
894 | |
880 | 895 sup1 : MinSUP A pchainpx |
896 sup1 = minsupP pchainpx zc01 ptotal | |
871 | 897 |
898 sp1 : Ordinal | |
880 | 899 sp1 = MinSUP.sup sup1 |
871 | 900 |
901 supf1 : Ordinal → Ordinal | |
902 supf1 z with trio< z px | |
903 ... | tri< a ¬b ¬c = supf0 z | |
879 | 904 ... | tri≈ ¬a b ¬c = px --- supf px ≡ px |
883 | 905 ... | tri> ¬a ¬b c = sp1 --- this may equal or larger then x, and sp1 ≡ supf x, is not included in UniofCF |
871 | 906 |
884 | 907 apx : odef A px |
908 apx = subst (λ k → odef A k ) (sym sfpx=px) ( ZChain.asupf zc ) | |
909 | |
883 | 910 asupf1 : {z : Ordinal } → odef A (supf1 z ) |
911 asupf1 {z} with trio< z px | |
912 ... | tri< a ¬b ¬c = ZChain.asupf zc | |
913 ... | tri≈ ¬a b ¬c = subst (λ k → odef A k ) (trans (cong supf0 b) (sym sfpx=px)) ( ZChain.asupf zc ) | |
914 ... | tri> ¬a ¬b c = MinSUP.asm sup1 | |
871 | 915 |
886 | 916 sf1=sf0 : {z : Ordinal } → z o≤ px → supf1 z ≡ supf0 z |
917 sf1=sf0 {z} z<px with trio< z px | |
874 | 918 ... | tri< a ¬b ¬c = refl |
883 | 919 ... | tri≈ ¬a b ¬c = trans sfpx=px (cong supf0 (sym b)) |
920 ... | tri> ¬a ¬b c = ⊥-elim ( o≤> z<px c ) | |
921 | |
874 | 922 supf-mono1 : {z w : Ordinal } → z o≤ w → supf1 z o≤ supf1 w |
923 supf-mono1 {z} {w} z≤w with trio< w px | |
886 | 924 ... | tri< a ¬b ¬c = subst₂ (λ j k → j o≤ k ) (sym (sf1=sf0 (o<→≤ (ordtrans≤-< z≤w a)))) refl ( supf-mono z≤w ) |
874 | 925 ... | tri≈ ¬a refl ¬c with osuc-≡< z≤w |
926 ... | case1 refl = o≤-refl0 zc17 where | |
927 zc17 : supf1 px ≡ px | |
928 zc17 with trio< px px | |
929 ... | tri< a ¬b ¬c = ⊥-elim ( ¬b refl ) | |
930 ... | tri≈ ¬a b ¬c = refl | |
931 ... | tri> ¬a ¬b c = ⊥-elim ( ¬b refl ) | |
886 | 932 ... | case2 lt = subst₂ (λ j k → j o≤ k ) (sym (sf1=sf0 (o<→≤ lt))) (sym sfpx=px) ( supf-mono z≤w ) |
874 | 933 supf-mono1 {z} {w} z≤w | tri> ¬a ¬b c with trio< z px |
934 ... | tri< a ¬b ¬c = zc19 where | |
881 | 935 zc21 : MinSUP A (UnionCF A f mf ay supf0 z) |
892 | 936 zc21 = ZChain.minsup zc (o<→≤ a) |
881 | 937 zc24 : {x₁ : Ordinal} → odef (UnionCF A f mf ay supf0 z) x₁ → (x₁ ≡ sp1) ∨ (x₁ << sp1) |
892 | 938 zc24 {x₁} ux = MinSUP.x<sup sup1 (case1 (chain-mono f mf ay supf0 (ZChain.supf-mono zc (o<→≤ a)) ux)) |
881 | 939 zc19 : supf0 z o≤ sp1 |
883 | 940 zc19 = subst (λ k → k o≤ sp1) (sym (ZChain.supf-is-minsup zc (o<→≤ a))) ( MinSUP.minsup zc21 (MinSUP.asm sup1) zc24 ) |
874 | 941 ... | tri≈ ¬a b ¬c = zc18 where |
881 | 942 zc21 : MinSUP A (UnionCF A f mf ay supf0 z) |
943 zc21 = ZChain.minsup zc (o≤-refl0 b) | |
883 | 944 zc20 : MinSUP.sup zc21 ≡ px |
945 zc20 = begin | |
946 MinSUP.sup zc21 ≡⟨ sym (ZChain.supf-is-minsup zc (o≤-refl0 b)) ⟩ | |
947 supf0 z ≡⟨ cong supf0 b ⟩ | |
948 supf0 px ≡⟨ sym sfpx=px ⟩ | |
949 px ∎ where open ≡-Reasoning | |
950 zc24 : {x₁ : Ordinal} → odef (UnionCF A f mf ay supf0 z) x₁ → (x₁ ≡ sp1) ∨ (x₁ << sp1) | |
892 | 951 zc24 {x₁} ux = MinSUP.x<sup sup1 (case1 (chain-mono f mf ay supf0 (ZChain.supf-mono zc (o≤-refl0 b)) ux)) |
881 | 952 zc18 : px o≤ sp1 -- supf0 z ≡ px |
883 | 953 zc18 = subst (λ k → k o≤ sp1) zc20 ( MinSUP.minsup zc21 (MinSUP.asm sup1) zc24 ) |
874 | 954 ... | tri> ¬a ¬b c = o≤-refl |
955 | |
883 | 956 supf-<1 : {z0 z1 : Ordinal} → supf1 z0 o< supf1 z1 → supf1 z0 << supf1 z1 |
957 supf-<1 {z0} {z1} sz0<sz1 = zc21 where | |
958 z0<z1 : z0 o< z1 | |
959 z0<z1 = supf-inject0 supf-mono1 sz0<sz1 | |
960 zc26 : supf0 px <= sp1 | |
961 zc26 with MinSUP.x<sup sup1 (case2 (init (subst (λ k → odef A k) (sym sfpx=px) (ZChain.asupf zc) ) refl )) | |
962 ... | case1 eq = case1 (trans (sym sfpx=px) eq ) | |
963 ... | case2 lt = case2 (subst (λ k → k << sp1 ) sfpx=px lt) | |
964 zc22 : ¬ px ≡ sp1 → supf0 px << sp1 | |
965 zc22 not with MinSUP.x<sup sup1 (case2 (init (subst (λ k → odef A k) (sym sfpx=px) (ZChain.asupf zc) ) refl )) | |
966 ... | case1 eq = ⊥-elim ( not eq ) -- px ≡ sp1 | |
967 ... | case2 lt = subst (λ k → k << sp1 ) sfpx=px lt | |
968 zc21 : supf1 z0 << supf1 z1 | |
969 zc21 with trio< z1 px | |
886 | 970 ... | tri< a ¬b ¬c = subst (λ k → k << supf0 z1) (sym (sf1=sf0 (o<→≤ (ordtrans z0<z1 a)))) |
971 ( ZChain.supf-< zc (subst (λ k → k o< supf0 z1) (sf1=sf0 (o<→≤ (ordtrans z0<z1 a))) sz0<sz1 )) | |
972 ... | tri≈ ¬a b ¬c = subst₂ (λ j k → j << k ) (sym (sf1=sf0 (o<→≤ (subst (λ k → z0 o< k) b z0<z1 )))) (sym sfpx=px) | |
973 ( 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 | 974 ... | tri> ¬a ¬b px<z1 with trio< z0 px --- supf1 z1 ≡ sp1 |
975 ... | tri< a ¬b ¬c = zc23 where | |
976 zc23 : supf0 z0 << sp1 | |
977 zc23 with osuc-≡< ( ZChain.supf-mono zc (o<→≤ a) ) | |
978 ... | case1 eq = subst (λ k → k << sp1 ) (sym eq) (zc22 zc24) where | |
979 zc25 : px ≡ sp1 → supf0 z0 ≡ sp1 | |
980 zc25 px=sp1 = begin supf0 z0 ≡⟨ eq ⟩ | |
981 supf0 px ≡⟨ sym ( sfpx=px ) ⟩ | |
982 px ≡⟨ px=sp1 ⟩ | |
983 sp1 ∎ where open ≡-Reasoning | |
984 zc24 : ¬ px ≡ sp1 | |
985 zc24 eq1 = ⊥-elim (o<¬≡ (zc25 eq1) sz0<sz1 ) | |
986 ... | case2 lt with zc26 | |
987 ... | case1 eq = subst (λ k → supf0 z0 << k ) eq (ZChain.supf-< zc lt) | |
988 ... | case2 lt1 = ptrans (ZChain.supf-< zc lt) lt1 | |
989 ... | tri≈ ¬a b ¬c = subst (λ k → k << sp1 ) (sym sfpx=px) (zc22 zc23 ) where | |
990 zc23 : ¬ px ≡ sp1 | |
991 zc23 eq = ⊥-elim (o<¬≡ eq sz0<sz1 ) | |
992 ... | tri> ¬a ¬b c = ⊥-elim ( o<¬≡ refl sz0<sz1 ) | |
873 | 993 |
885 | 994 ch1x=pchainpx : UnionCF A f mf ay supf1 x ≡ pchainpx |
995 ch1x=pchainpx = ==→o≡ record { eq→ = zc11 ; eq← = zc12 } where | |
996 fcup : {u z : Ordinal } → FClosure A f (supf1 u) z → u o≤ px → FClosure A f (supf0 u) z | |
886 | 997 fcup {u} {z} fc u≤px = subst (λ k → FClosure A f k z ) (sf1=sf0 u≤px) fc |
885 | 998 fcpu : {u z : Ordinal } → FClosure A f (supf0 u) z → u o≤ px → FClosure A f (supf1 u) z |
886 | 999 fcpu {u} {z} fc u≤px = subst (λ k → FClosure A f k z ) (sym (sf1=sf0 u≤px)) fc |
885 | 1000 zc11 : {z : Ordinal} → odef (UnionCF A f mf ay supf1 x) z → odef pchainpx z |
1001 zc11 {z} ⟪ az , ch-init fc ⟫ = case1 ⟪ az , ch-init fc ⟫ | |
886 | 1002 zc11 {z} ⟪ az , ch-is-sup u u<x is-sup fc ⟫ = zc21 fc where |
885 | 1003 zc21 : {z1 : Ordinal } → FClosure A f (supf1 u) z1 → odef pchainpx z1 |
1004 zc21 {z1} (fsuc z2 fc ) with zc21 fc | |
1005 ... | case1 ⟪ ua1 , ch-init fc₁ ⟫ = case1 ⟪ proj2 ( mf _ ua1) , ch-init (fsuc _ fc₁) ⟫ | |
886 | 1006 ... | 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₁) ⟫ |
1007 ... | case2 fc = case2 (fsuc _ fc) | |
885 | 1008 zc21 (init asp refl ) with trio< u px | inspect supf1 u |
890 | 1009 ... | tri< a ¬b ¬c | _ = case1 ⟪ asp , ch-is-sup u ? record {fcy<sup = zc13 ; order = zc17 |
886 | 1010 ; supu=u = trans (sym (sf1=sf0 (o<→≤ a))) (ChainP.supu=u is-sup) } (init asp refl) ⟫ where |
1011 zc17 : {s : Ordinal} {z1 : Ordinal} → supf0 s o< supf0 u → | |
1012 FClosure A f (supf0 s) z1 → (z1 ≡ supf0 u) ∨ (z1 << supf0 u) | |
1013 zc17 {s} {z1} ss<spx fc = subst (λ k → (z1 ≡ k) ∨ (z1 << k)) ((sf1=sf0 zc19)) ( ChainP.order is-sup | |
1014 (subst₂ (λ j k → j o< k ) (sym (sf1=sf0 zc18)) (sym (sf1=sf0 zc19)) ss<spx) (fcpu fc zc18) ) where | |
1015 zc19 : u o≤ px | |
892 | 1016 zc19 = o<→≤ a |
886 | 1017 zc18 : s o≤ px |
1018 zc18 = ordtrans (ZChain.supf-inject zc ss<spx) zc19 | |
1019 zc13 : {z : Ordinal } → FClosure A f y z → (z ≡ supf0 u) ∨ ( z << supf0 u ) | |
1020 zc13 {z} fc = subst (λ k → (z ≡ k) ∨ ( z << k )) (sf1=sf0 (o<→≤ a)) ( ChainP.fcy<sup is-sup fc ) | |
1021 ... | tri≈ ¬a b ¬c | _ = case2 (init apx refl ) | |
890 | 1022 ... | tri> ¬a ¬b c | _ = ⊥-elim ( ¬p<x<op ⟪ c , subst (λ k → u o< k ) (sym (Oprev.oprev=x op)) ? ⟫ ) |
885 | 1023 zc12 : {z : Ordinal} → odef pchainpx z → odef (UnionCF A f mf ay supf1 x) z |
1024 zc12 {z} (case1 ⟪ az , ch-init fc ⟫ ) = ⟪ az , ch-init fc ⟫ | |
1025 zc12 {z} (case1 ⟪ az , ch-is-sup u u<x is-sup fc ⟫ ) = zc21 fc where | |
1026 zc21 : {z1 : Ordinal } → FClosure A f (supf0 u) z1 → odef (UnionCF A f mf ay supf1 x) z1 | |
1027 zc21 {z1} (fsuc z2 fc ) with zc21 fc | |
1028 ... | ⟪ ua1 , ch-init fc₁ ⟫ = ⟪ proj2 ( mf _ ua1) , ch-init (fsuc _ fc₁) ⟫ | |
1029 ... | ⟪ 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₁) ⟫ | |
1030 zc21 (init asp refl ) with trio< u px | inspect supf1 u | |
1031 ... | tri< a ¬b ¬c | _ = ⟪ asp , ch-is-sup u | |
890 | 1032 ? -- (subst (λ k → u o< k) (Oprev.oprev=x op) ?) |
1033 record {fcy<sup = zc13 ; order = zc17 ; supu=u = trans ((sf1=sf0 ?)) (ChainP.supu=u is-sup) } zc14 ⟫ where | |
886 | 1034 zc17 : {s : Ordinal} {z1 : Ordinal} → supf1 s o< supf1 u → |
1035 FClosure A f (supf1 s) z1 → (z1 ≡ supf1 u) ∨ (z1 << supf1 u) | |
890 | 1036 zc17 {s} {z1} ss<spx fc = subst (λ k → (z1 ≡ k) ∨ (z1 << k)) (sym (sf1=sf0 ?)) ( ChainP.order is-sup |
1037 (subst₂ (λ j k → j o< k ) (sf1=sf0 s≤px) (sf1=sf0 ?) ss<spx) (fcup fc s≤px) ) where | |
886 | 1038 s≤px : s o≤ px |
890 | 1039 s≤px = ? -- ordtrans ( supf-inject0 supf-mono1 ss<spx ) (o<→≤ u<x) |
886 | 1040 zc14 : FClosure A f (supf1 u) (supf0 u) |
890 | 1041 zc14 = init (subst (λ k → odef A k ) (sym (sf1=sf0 ?)) asp) (sf1=sf0 ?) |
885 | 1042 zc13 : {z : Ordinal } → FClosure A f y z → (z ≡ supf1 u) ∨ ( z << supf1 u ) |
890 | 1043 zc13 {z} fc = subst (λ k → (z ≡ k) ∨ ( z << k )) (sym (sf1=sf0 ?)) ( ChainP.fcy<sup is-sup fc ) |
1044 ... | tri≈ ¬a b ¬c | _ = ⟪ asp , ch-is-sup px ? record { fcy<sup = zc13 | |
886 | 1045 ; order = zc17 ; supu=u = zc18 } (init asupf1 (trans (sf1=sf0 o≤-refl ) (cong supf0 (sym b))) ) ⟫ where |
1046 zc13 : {z : Ordinal } → FClosure A f y z → (z ≡ supf1 px) ∨ ( z << supf1 px ) | |
1047 zc13 {z} fc = subst (λ k → (z ≡ k) ∨ (z << k)) (trans (cong supf0 b) (sym (sf1=sf0 o≤-refl))) (ChainP.fcy<sup is-sup fc ) | |
1048 zc18 : supf1 px ≡ px | |
1049 zc18 = begin | |
1050 supf1 px ≡⟨ sf1=sf0 o≤-refl ⟩ | |
1051 supf0 px ≡⟨ cong supf0 (sym b) ⟩ | |
1052 supf0 u ≡⟨ ChainP.supu=u is-sup ⟩ | |
1053 u ≡⟨ b ⟩ | |
1054 px ∎ where open ≡-Reasoning | |
1055 zc17 : {s : Ordinal} {z1 : Ordinal} → supf1 s o< supf1 px → | |
1056 FClosure A f (supf1 s) z1 → (z1 ≡ supf1 px) ∨ (z1 << supf1 px) | |
1057 zc17 {s} {z1} ss<spx fc = subst (λ k → (z1 ≡ k) ∨ (z1 << k)) (trans (cong supf0 b) (sym (sf1=sf0 o≤-refl))) | |
887 | 1058 ( ChainP.order is-sup (subst₂ (λ j k → j o< k) (sf1=sf0 s≤px) zc19 ss<spx) (fcup fc s≤px) ) where |
1059 zc19 : supf1 px ≡ supf0 u | |
1060 zc19 = trans (sf1=sf0 o≤-refl) (cong supf0 (sym b)) | |
886 | 1061 s≤px : s o≤ px |
887 | 1062 s≤px = o<→≤ (supf-inject0 supf-mono1 ss<spx) |
890 | 1063 ... | tri> ¬a ¬b c | _ = ⊥-elim ( ¬p<x<op ⟪ c , ? ⟫ ) |
885 | 1064 zc12 {z} (case2 fc) = zc21 fc where |
1065 zc21 : {z1 : Ordinal } → FClosure A f px z1 → odef (UnionCF A f mf ay supf1 x) z1 | |
1066 zc21 {z1} (fsuc z2 fc ) with zc21 fc | |
1067 ... | ⟪ ua1 , ch-init fc₁ ⟫ = ⟪ proj2 ( mf _ ua1) , ch-init (fsuc _ fc₁) ⟫ | |
1068 ... | ⟪ 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 | 1069 zc21 (init asp refl ) = ⟪ asp , ch-is-sup px ? |
886 | 1070 record {fcy<sup = zc13 ; order = zc17 ; supu=u = zc15 } zc14 ⟫ where |
1071 zc15 : supf1 px ≡ px | |
1072 zc15 = trans (sf1=sf0 o≤-refl ) (sym sfpx=px) | |
1073 zc14 : FClosure A f (supf1 px) px | |
1074 zc14 = init (subst (λ k → odef A k) (sym zc15) asp) zc15 | |
885 | 1075 zc13 : {z : Ordinal } → FClosure A f y z → (z ≡ supf1 px ) ∨ ( z << supf1 px ) |
886 | 1076 zc13 {z} fc = subst (λ k → (z ≡ k) ∨ ( z << k )) (sym (sf1=sf0 o≤-refl)) ( ZChain.fcy<sup zc o≤-refl fc ) |
1077 zc17 : {s : Ordinal} {z1 : Ordinal} → supf1 s o< supf1 px → | |
1078 FClosure A f (supf1 s) z1 → (z1 ≡ supf1 px) ∨ (z1 << supf1 px) | |
887 | 1079 zc17 {s} {z1} ss<spx fc = subst (λ k → (z1 ≡ k) ∨ (z1 << k )) mins-is-spx |
1080 (MinSUP.x<sup mins (csupf17 (fcup fc (o<→≤ s<px) )) ) where | |
1081 mins : MinSUP A (UnionCF A f mf ay supf0 px) | |
1082 mins = ZChain.minsup zc o≤-refl | |
1083 mins-is-spx : MinSUP.sup mins ≡ supf1 px | |
1084 mins-is-spx = trans (sym ( ZChain.supf-is-minsup zc o≤-refl ) ) (sym (sf1=sf0 o≤-refl )) | |
1085 s<px : s o< px | |
1086 s<px = supf-inject0 supf-mono1 ss<spx | |
1087 sf<px : supf0 s o< px | |
1088 sf<px = subst₂ (λ j k → j o< k ) (sf1=sf0 (o<→≤ s<px)) (trans (sf1=sf0 o≤-refl) (sym sfpx=px)) ss<spx | |
1089 -- (sf1=sf0 ?) (trans ? sfpx=px ) ss<spx | |
1090 csupf17 : {z1 : Ordinal } → FClosure A f (supf0 s) z1 → odef (UnionCF A f mf ay supf0 px) z1 | |
1091 csupf17 (init as refl ) = ZChain.csupf zc sf<px | |
893 | 1092 csupf17 (fsuc x fc) = ZChain.f-next zc (csupf17 fc) |
885 | 1093 |
1094 record STMP {z : Ordinal} (z≤x : z o≤ x ) : Set (Level.suc n) where | |
1095 field | |
1096 tsup : MinSUP A (UnionCF A f mf ay supf1 z) | |
1097 tsup=sup : supf1 z ≡ MinSUP.sup tsup | |
1098 | |
1099 sup : {z : Ordinal} → (z≤x : z o≤ x ) → STMP z≤x | |
1100 sup {z} z≤x with trio< z px | |
1101 ... | tri< a ¬b ¬c = record { tsup = record { sup = MinSUP.sup m ; asm = MinSUP.asm m | |
886 | 1102 ; x<sup = ? ; minsup = ? } ; tsup=sup = trans (sf1=sf0 (o<→≤ a)) (ZChain.supf-is-minsup zc (o<→≤ a)) } where |
885 | 1103 m = ZChain.minsup zc (o<→≤ a) |
1104 ... | tri≈ ¬a b ¬c = record { tsup = record { sup = MinSUP.sup m ; asm = MinSUP.asm m | |
886 | 1105 ; x<sup = ? ; minsup = ? } ; tsup=sup = trans (sf1=sf0 (o≤-refl0 b)) (ZChain.supf-is-minsup zc (o≤-refl0 b)) } where |
885 | 1106 m = ZChain.minsup zc (o≤-refl0 b) |
1107 ... | tri> ¬a ¬b px<z = record { tsup = record { sup = sp1 ; asm = MinSUP.asm sup1 | |
1108 ; x<sup = ? ; minsup = ? } ; tsup=sup = ? } | |
1109 | |
887 | 1110 csupf1 : {z1 : Ordinal } → supf1 z1 o< x → odef (UnionCF A f mf ay supf1 x) (supf1 z1) |
1111 csupf1 {z1} sz1<x with trio< (supf0 z1) px | |
1112 ... | tri< a ¬b ¬c = subst₂ (λ j k → odef j k ) (sym ch1x=pchainpx) (sym (sf1=sf0 z1≤px)) (case1 (ZChain.csupf zc a )) where | |
1113 z1≤px : z1 o≤ px | |
1114 z1≤px = o<→≤ ( ZChain.supf-inject zc (subst (λ k → supf0 z1 o< k ) sfpx=px a )) | |
1115 ... | tri≈ ¬a b ¬c = subst₂ (λ j k → odef j k ) (sym ch1x=pchainpx) zc20 (case2 (init apx sfpx=px )) where | |
889 | 1116 z1≤px : z1 o≤ px -- z1 o≤ supf1 z1 ≡ px |
893 | 1117 z1≤px = subst (λ k → z1 o< k) (sym (Oprev.oprev=x op)) (supf-inject0 supf-mono1 (ordtrans<-≤ sz1<x ? )) |
887 | 1118 zc20 : supf0 px ≡ supf1 z1 |
1119 zc20 = begin | |
888 | 1120 supf0 px ≡⟨ sym sfpx=px ⟩ |
1121 px ≡⟨ sym b ⟩ | |
1122 supf0 z1 ≡⟨ sym (sf1=sf0 z1≤px) ⟩ | |
887 | 1123 supf1 z1 ∎ where open ≡-Reasoning |
889 | 1124 ... | tri> ¬a ¬b c = ⊥-elim ( ¬p<x<op ⟪ zc21 , subst (λ k → z1 o< k ) (sym (Oprev.oprev=x op)) zc22 ⟫ ) where |
888 | 1125 zc21 : px o< z1 |
1126 zc21 = ZChain.supf-inject zc (subst (λ k → k o< supf0 z1) sfpx=px c ) | |
889 | 1127 zc22 : z1 o< x -- c : px o< supf0 z1 |
893 | 1128 zc22 = supf-inject0 supf-mono1 (ordtrans<-≤ sz1<x ? ) |
888 | 1129 -- c : px ≡ spuf0 px o< supf0 z1 , px o< z1 o≤ supf1 z1 o< x |
877 | 1130 |
879 | 1131 ... | case2 px<spfx = ? where |
883 | 1132 |
1133 -- case2 : px o< supf px | |
1134 -- supf px is not MinSUP of previous chain , supf x ≡ supf px | |
1135 | |
879 | 1136 -- record { supf = supf0 ; asupf = ZChain.asupf zc ; sup = λ lt → STMP.tsup (sup lt ) ; supf-mono = supf-mono |
1137 -- ; supf-< = ? ; sup=u = sup=u ; supf-is-sup = λ lt → STMP.tsup=sup (sup lt) } where | |
872 | 1138 supf1 : Ordinal → Ordinal |
1139 supf1 z with trio< z px | |
871 | 1140 ... | tri< a ¬b ¬c = supf0 z |
872 | 1141 ... | tri≈ ¬a b ¬c = supf0 px |
871 | 1142 ... | tri> ¬a ¬b c = supf0 px |
1143 | |
886 | 1144 sf1=sf0 : {z : Ordinal } → z o< px → supf1 z ≡ supf0 z |
1145 sf1=sf0 {z} z<px with trio< z px | |
874 | 1146 ... | tri< a ¬b ¬c = refl |
1147 ... | tri≈ ¬a b ¬c = ⊥-elim ( ¬a z<px ) | |
1148 ... | tri> ¬a ¬b c = ⊥-elim ( ¬a z<px ) | |
1149 | |
1150 zc17 : {z : Ordinal } → supf0 z o≤ supf0 px | |
1151 zc17 = ? -- px o< z, px o< supf0 px | |
1152 | |
1153 supf-mono1 : {z w : Ordinal } → z o≤ w → supf1 z o≤ supf1 w | |
1154 supf-mono1 {z} {w} z≤w with trio< w px | |
886 | 1155 ... | tri< a ¬b ¬c = subst₂ (λ j k → j o≤ k ) (sym (sf1=sf0 (ordtrans≤-< z≤w a))) refl ( supf-mono z≤w ) |
874 | 1156 ... | tri≈ ¬a refl ¬c with trio< z px |
1157 ... | tri< a ¬b ¬c = zc17 | |
1158 ... | tri≈ ¬a refl ¬c = o≤-refl | |
1159 ... | tri> ¬a ¬b c = o≤-refl | |
1160 supf-mono1 {z} {w} z≤w | tri> ¬a ¬b c with trio< z px | |
1161 ... | tri< a ¬b ¬c = zc17 | |
1162 ... | tri≈ ¬a b ¬c = o≤-refl | |
1163 ... | tri> ¬a ¬b c = o≤-refl | |
1164 | |
872 | 1165 pchain1 : HOD |
1166 pchain1 = UnionCF A f mf ay supf1 x | |
871 | 1167 |
863 | 1168 zc10 : {z : Ordinal} → OD.def (od pchain) z → OD.def (od pchain1) z |
1169 zc10 {z} ⟪ az , ch-init fc ⟫ = ⟪ az , ch-init fc ⟫ | |
894 | 1170 zc10 {z} ⟪ az , ch-is-sup u1 u1<x u1-is-sup fc ⟫ = ⟪ az , ch-is-sup u1 ? ? ? ⟫ |
873 | 1171 |
1172 zc111 : {z : Ordinal} → z o< px → OD.def (od pchain1) z → OD.def (od pchain) z | |
1173 zc111 {z} z<px ⟪ az , ch-init fc ⟫ = ⟪ az , ch-init fc ⟫ | |
894 | 1174 zc111 {z} z<px ⟪ az , ch-is-sup u1 u1<x u1-is-sup fc ⟫ = ⟪ az , ch-is-sup u1 ? ? ? ⟫ |
873 | 1175 |
863 | 1176 zc11 : (¬ xSUP (UnionCF A f mf ay supf0 px) x ) ∨ (HasPrev A pchain x f ) |
864 | 1177 → {z : Ordinal} → OD.def (od pchain1) z → OD.def (od pchain) z ∨ ( (supf0 px ≡ px) ∧ FClosure A f px z ) |
863 | 1178 zc11 P {z} ⟪ az , ch-init fc ⟫ = case1 ⟪ az , ch-init fc ⟫ |
1179 zc11 P {z} ⟪ az , ch-is-sup u1 u1<x u1-is-sup fc ⟫ with trio< u1 px | |
890 | 1180 ... | tri< u1<px ¬b ¬c = case1 ⟪ az , ch-is-sup u1 ? ? fc ⟫ |
872 | 1181 ... | tri≈ ¬a eq ¬c = case2 ⟪ subst (λ k → supf0 k ≡ k) eq s1u=u , subst (λ k → FClosure A f k z) zc12 ? ⟫ where |
863 | 1182 s1u=u : supf0 u1 ≡ u1 |
872 | 1183 s1u=u = ? -- ChainP.supu=u u1-is-sup |
864 | 1184 zc12 : supf0 u1 ≡ px |
872 | 1185 zc12 = trans s1u=u eq |
863 | 1186 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 |
1187 eq : u1 ≡ x | |
1188 eq with trio< u1 x | |
1189 ... | tri< a ¬b ¬c = ⊥-elim ( ¬p<x<op ⟪ px<u , subst (λ k → u1 o< k ) (sym (Oprev.oprev=x op )) a ⟫ ) | |
1190 ... | tri≈ ¬a b ¬c = b | |
890 | 1191 ... | tri> ¬a ¬b c = ⊥-elim ( o<> u1<x ? ) |
863 | 1192 s1u=x : supf0 u1 ≡ x |
872 | 1193 s1u=x = trans ? eq |
863 | 1194 zc13 : osuc px o< osuc u1 |
1195 zc13 = o≤-refl0 ( trans (Oprev.oprev=x op) (sym eq ) ) | |
1196 x<sup : {w : Ordinal} → odef (UnionCF A f mf ay supf0 px) w → (w ≡ x) ∨ (w << x) | |
872 | 1197 x<sup {w} ⟪ az , ch-init {w} fc ⟫ = subst (λ k → (w ≡ k) ∨ (w << k)) s1u=x ? |
890 | 1198 x<sup {w} ⟪ az , ch-is-sup u u<x is-sup fc ⟫ with osuc-≡< ( supf-mono (ordtrans (o<→≤ u<x) ? )) |
1199 ... | case1 eq1 = ⊥-elim ( o<¬≡ zc14 ? ) where | |
851 | 1200 zc14 : u ≡ osuc px |
1201 zc14 = begin | |
1202 u ≡⟨ sym ( ChainP.supu=u is-sup) ⟩ | |
894 | 1203 supf0 u ≡⟨ ? ⟩ |
857 | 1204 supf0 u1 ≡⟨ s1u=x ⟩ |
851 | 1205 x ≡⟨ sym (Oprev.oprev=x op) ⟩ |
1206 osuc px ∎ where open ≡-Reasoning | |
872 | 1207 ... | case2 lt = subst (λ k → (w ≡ k) ∨ (w << k)) s1u=x ? |
863 | 1208 zc12 : supf0 x ≡ u1 |
872 | 1209 zc12 = subst (λ k → supf0 k ≡ u1) eq ? |
863 | 1210 zcsup : xSUP (UnionCF A f mf ay supf0 px) x |
868 | 1211 zcsup = record { ax = subst (λ k → odef A k) (trans zc12 eq) (ZChain.asupf zc) |
851 | 1212 ; is-sup = record { x<sup = x<sup } } |
872 | 1213 zc11 (case2 hp) {z} ⟪ az , ch-is-sup u1 u1<x u1-is-sup fc ⟫ | tri> ¬a ¬b px<u = case1 ? where |
863 | 1214 eq : u1 ≡ x |
864 | 1215 eq with trio< u1 x |
1216 ... | tri< a ¬b ¬c = ⊥-elim ( ¬p<x<op ⟪ px<u , subst (λ k → u1 o< k ) (sym (Oprev.oprev=x op )) a ⟫ ) | |
1217 ... | tri≈ ¬a b ¬c = b | |
890 | 1218 ... | tri> ¬a ¬b c = ⊥-elim ( o<> u1<x ? ) |
858 | 1219 zc20 : {z : Ordinal} → FClosure A f (supf0 u1) z → OD.def (od pchain) z |
1220 zc20 {z} (init asu su=z ) = zc13 where | |
1221 zc14 : x ≡ z | |
1222 zc14 = begin | |
1223 x ≡⟨ sym eq ⟩ | |
872 | 1224 u1 ≡⟨ sym ? ⟩ |
858 | 1225 supf0 u1 ≡⟨ su=z ⟩ |
1226 z ∎ where open ≡-Reasoning | |
1227 zc13 : odef pchain z | |
1228 zc13 = subst (λ k → odef pchain k) (trans (sym (HasPrev.x=fy hp)) zc14) ( ZChain.f-next zc (HasPrev.ay hp) ) | |
1229 zc20 {.(f w)} (fsuc w fc) = ZChain.f-next zc (zc20 fc) | |
891 | 1230 |
857 | 1231 record STMP {z : Ordinal} (z≤x : z o≤ x ) : Set (Level.suc n) where |
1232 field | |
891 | 1233 tsup : MinSUP A (UnionCF A f mf ay supf1 z) |
1234 tsup=sup : supf1 z ≡ MinSUP.sup tsup | |
1235 | |
857 | 1236 sup : {z : Ordinal} → (z≤x : z o≤ x ) → STMP z≤x |
1237 sup {z} z≤x with trio< z px | |
891 | 1238 ... | tri< a ¬b ¬c = ? -- jrecord { tsup = ZChain.minsup zc (o<→≤ a) ; tsup=sup = ZChain.supf-is-minsup zc (o<→≤ a) } |
1239 ... | tri≈ ¬a b ¬c = ? -- record { tsup = ZChain.minsup zc (o≤-refl0 b) ; tsup=sup = ZChain.supf-is-minsup zc (o≤-refl0 b) } | |
865 | 1240 ... | tri> ¬a ¬b px<z = zc35 where |
840 | 1241 zc30 : z ≡ x |
1242 zc30 with osuc-≡< z≤x | |
1243 ... | case1 eq = eq | |
1244 ... | case2 z<x = ⊥-elim (¬p<x<op ⟪ px<z , subst (λ k → z o< k ) (sym (Oprev.oprev=x op)) z<x ⟫ ) | |
865 | 1245 zc32 = ZChain.sup zc o≤-refl |
1246 zc34 : ¬ (supf0 px ≡ px) → {w : HOD} → UnionCF A f mf ay supf0 z ∋ w → (w ≡ SUP.sup zc32) ∨ (w < SUP.sup zc32) | |
882 | 1247 zc34 ne {w} lt with zc11 ? ⟪ proj1 lt , ? ⟫ |
864 | 1248 ... | case1 lt = SUP.x<sup zc32 lt |
865 | 1249 ... | case2 ⟪ spx=px , fc ⟫ = ⊥-elim ( ne spx=px ) |
857 | 1250 zc33 : supf0 z ≡ & (SUP.sup zc32) |
891 | 1251 zc33 = ? -- trans (sym (supfx (o≤-refl0 (sym zc30)))) ( ZChain.supf-is-minsup zc o≤-refl ) |
865 | 1252 zc36 : ¬ (supf0 px ≡ px) → STMP z≤x |
891 | 1253 zc36 ne = ? -- record { tsup = record { sup = SUP.sup zc32 ; as = SUP.as zc32 ; x<sup = zc34 ne } ; tsup=sup = zc33 } |
865 | 1254 zc35 : STMP z≤x |
1255 zc35 with trio< (supf0 px) px | |
1256 ... | tri< a ¬b ¬c = zc36 ¬b | |
1257 ... | tri> ¬a ¬b c = zc36 ¬b | |
891 | 1258 ... | tri≈ ¬a b ¬c = record { tsup = ? ; tsup=sup = ? } where |
1259 zc37 : MinSUP A (UnionCF A f mf ay supf0 z) | |
1260 zc37 = record { sup = ? ; asm = ? ; x<sup = ? } | |
803 | 1261 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
|
1262 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 | 1263 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
|
1264 ... | 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
|
1265 ... | 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 | 1266 ... | tri> ¬a ¬b px<b = zc31 ? where |
815 | 1267 zc30 : x ≡ b |
1268 zc30 with osuc-≡< b≤x | |
1269 ... | case1 eq = sym (eq) | |
1270 ... | case2 b<x = ⊥-elim (¬p<x<op ⟪ px<b , subst (λ k → b o< k ) (sym (Oprev.oprev=x op)) b<x ⟫ ) | |
859 | 1271 zcsup : xSUP (UnionCF A f mf ay supf0 px) x |
1272 zcsup with zc30 | |
1273 ... | refl = record { ax = ab ; is-sup = record { x<sup = λ {w} lt → | |
872 | 1274 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
|
1275 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
|
1276 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
|
1277 ... | refl = ⊥-elim (¬sp=x zcsup ) |
105f8d6c51fb
no-extension on immidate ordinal passed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
859
diff
changeset
|
1278 zc31 (case2 hasPrev ) with zc30 |
863 | 1279 ... | refl = ⊥-elim ( proj2 is-sup record { ax = HasPrev.ax hasPrev ; y = HasPrev.y hasPrev |
872 | 1280 ; ay = ? ; x=fy = HasPrev.x=fy hasPrev } ) |
833 | 1281 |
728 | 1282 ... | no lim = zc5 where |
726
b2e2cd12e38f
psupf-mono and is-max conflict
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
725
diff
changeset
|
1283 |
703 | 1284 pzc : (z : Ordinal) → z o< x → ZChain A f mf ay z |
1285 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
|
1286 |
835 | 1287 ysp = & (SUP.sup (ysup f mf ay)) |
755 | 1288 |
835 | 1289 supf0 : Ordinal → Ordinal |
1290 supf0 z with trio< z x | |
1291 ... | tri< a ¬b ¬c = ZChain.supf (pzc (osuc z) (ob<x lim a)) z | |
836 | 1292 ... | tri≈ ¬a b ¬c = ysp |
1293 ... | tri> ¬a ¬b c = ysp | |
835 | 1294 |
838 | 1295 pchain : HOD |
1296 pchain = UnionCF A f mf ay supf0 x | |
835 | 1297 |
838 | 1298 ptotal0 : IsTotalOrderSet pchain |
835 | 1299 ptotal0 {a} {b} ca cb = subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso uz01 where |
1300 uz01 : Tri (* (& a) < * (& b)) (* (& a) ≡ * (& b)) (* (& b) < * (& a) ) | |
1301 uz01 = chain-total A f mf ay supf0 ( (proj2 ca)) ( (proj2 cb)) | |
844 | 1302 |
880 | 1303 usup : MinSUP A pchain |
1304 usup = minsupP pchain (λ lt → proj1 lt) ptotal0 | |
1305 spu = MinSUP.sup usup | |
834 | 1306 |
794 | 1307 supf1 : Ordinal → Ordinal |
835 | 1308 supf1 z with trio< z x |
1309 ... | tri< a ¬b ¬c = ZChain.supf (pzc (osuc z) (ob<x lim a)) z | |
836 | 1310 ... | tri≈ ¬a b ¬c = spu |
1311 ... | tri> ¬a ¬b c = spu | |
755 | 1312 |
838 | 1313 pchain1 : HOD |
1314 pchain1 = UnionCF A f mf ay supf1 x | |
704 | 1315 |
758
a2947dfff80d
is-max on first transfinite induction is not good
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
757
diff
changeset
|
1316 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
|
1317 b o< x → (ab : odef A b) → |
836 | 1318 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
|
1319 * 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
|
1320 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
|
1321 ... | ⟪ ab0 , ch-init fc ⟫ = ⟪ ab , ch-init ( subst (λ k → FClosure A f y k) (sym (HasPrev.x=fy has-prev)) (fsuc _ fc )) ⟫ |
890 | 1322 ... | ⟪ ab0 , ch-is-sup u u≤x is-sup fc ⟫ = ? -- ⟪ ab , |
1323 -- subst (λ k → UChain A f mf ay supf x k ) | |
1324 -- (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
|
1325 |
844 | 1326 zc70 : HasPrev A pchain x f → ¬ xSUP pchain x |
1327 zc70 pr xsup = ? | |
1328 | |
1329 no-extension : ¬ ( xSUP (UnionCF A f mf ay supf0 x) x ) → ZChain A f mf ay x | |
879 | 1330 no-extension ¬sp=x = ? where -- record { supf = supf1 ; sup=u = sup=u |
1331 -- ; 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
|
1332 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
|
1333 supfu {u} a z = ZChain.supf (pzc (osuc u) (ob<x lim a)) z |
838 | 1334 pchain0=1 : pchain ≡ pchain1 |
1335 pchain0=1 = ==→o≡ record { eq→ = zc10 ; eq← = zc11 } where | |
1336 zc10 : {z : Ordinal} → OD.def (od pchain) z → OD.def (od pchain1) z | |
1337 zc10 {z} ⟪ az , ch-init fc ⟫ = ⟪ az , ch-init fc ⟫ | |
1338 zc10 {z} ⟪ az , ch-is-sup u u≤x is-sup fc ⟫ = zc12 fc where | |
1339 zc12 : {z : Ordinal} → FClosure A f (supf0 u) z → odef pchain1 z | |
1340 zc12 (fsuc x fc) with zc12 fc | |
1341 ... | ⟪ ua1 , ch-init fc₁ ⟫ = ⟪ proj2 ( mf _ ua1) , ch-init (fsuc _ fc₁) ⟫ | |
1342 ... | ⟪ ua1 , ch-is-sup u u≤x is-sup fc₁ ⟫ = ⟪ proj2 ( mf _ ua1) , ch-is-sup u u≤x is-sup (fsuc _ fc₁) ⟫ | |
890 | 1343 zc12 (init asu su=z ) = ⟪ subst (λ k → odef A k) su=z asu , ch-is-sup u ? ? (init ? ? ) ⟫ |
838 | 1344 zc11 : {z : Ordinal} → OD.def (od pchain1) z → OD.def (od pchain) z |
1345 zc11 {z} ⟪ az , ch-init fc ⟫ = ⟪ az , ch-init fc ⟫ | |
863 | 1346 zc11 {z} ⟪ az , ch-is-sup u u<x is-sup fc ⟫ = zc13 fc where |
838 | 1347 zc13 : {z : Ordinal} → FClosure A f (supf1 u) z → odef pchain z |
1348 zc13 (fsuc x fc) with zc13 fc | |
1349 ... | ⟪ ua1 , ch-init fc₁ ⟫ = ⟪ proj2 ( mf _ ua1) , ch-init (fsuc _ fc₁) ⟫ | |
863 | 1350 ... | ⟪ ua1 , ch-is-sup u u<x is-sup fc₁ ⟫ = ⟪ proj2 ( mf _ ua1) , ch-is-sup u u<x is-sup (fsuc _ fc₁) ⟫ |
838 | 1351 zc13 (init asu su=z ) with trio< u x |
890 | 1352 ... | tri< a ¬b ¬c = ⟪ ? , ch-is-sup u ? ? (init ? ? ) ⟫ |
838 | 1353 ... | tri≈ ¬a b ¬c = ? |
863 | 1354 ... | tri> ¬a ¬b c = ? -- ⊥-elim ( o≤> u<x c ) |
832 | 1355 sup : {z : Ordinal} → z o≤ x → SUP A (UnionCF A f mf ay supf1 z) |
797 | 1356 sup {z} z≤x with trio< z x |
838 | 1357 ... | tri< a ¬b ¬c = SUP⊆ ? (ZChain.sup (pzc (osuc z) {!!}) {!!} ) |
815 | 1358 ... | tri≈ ¬a b ¬c = {!!} |
843 | 1359 ... | tri> ¬a ¬b x<z = ⊥-elim (o<¬≡ refl (ordtrans<-≤ x<z z≤x )) |
832 | 1360 sis : {z : Ordinal} (x≤z : z o≤ x) → supf1 z ≡ & (SUP.sup (sup {!!})) |
843 | 1361 sis {z} z≤x with trio< z x |
800 | 1362 ... | tri< a ¬b ¬c = {!!} where |
891 | 1363 zc8 = ZChain.supf-is-minsup (pzc z a) {!!} |
815 | 1364 ... | tri≈ ¬a b ¬c = {!!} |
843 | 1365 ... | 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
|
1366 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 | 1367 sup=u {z} ab z≤x is-sup with trio< z x |
833 | 1368 ... | tri< a ¬b ¬c = ? -- ZChain.sup=u (pzc (osuc b) (ob<x lim a)) ab {!!} record { x<sup = {!!} } |
815 | 1369 ... | tri≈ ¬a b ¬c = {!!} -- ZChain.sup=u (pzc (osuc ?) ?) ab {!!} record { x<sup = {!!} } |
843 | 1370 ... | tri> ¬a ¬b x<z = ⊥-elim (o<¬≡ refl (ordtrans<-≤ x<z z≤x )) |
797 | 1371 |
703 | 1372 zc5 : ZChain A f mf ay x |
697 | 1373 zc5 with ODC.∋-p O A (* x) |
796 | 1374 ... | no noax = no-extension {!!} -- ¬ A ∋ p, just skip |
836 | 1375 ... | yes ax with ODC.p∨¬p O ( HasPrev A pchain x f ) |
703 | 1376 -- we have to check adding x preserve is-max ZChain A y f mf x |
796 | 1377 ... | case1 pr = no-extension {!!} |
704 | 1378 ... | case2 ¬fy<x with ODC.p∨¬p O (IsSup A pchain ax ) |
879 | 1379 ... | case1 is-sup = ? -- record { supf = supf1 ; sup=u = {!!} |
1380 -- ; sup = {!!} ; supf-is-sup = {!!} ; supf-mono = {!!}; asupf = {!!} } -- where -- x is a sup of (zc ?) | |
796 | 1381 ... | case2 ¬x=sup = no-extension {!!} -- x is not f y' nor sup of former ZChain from y -- no extention |
553 | 1382 |
703 | 1383 SZ : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) → {y : Ordinal} (ay : odef A y) → ZChain A f mf ay (& A) |
1384 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
|
1385 |
551 | 1386 zorn00 : Maximal A |
1387 zorn00 with is-o∅ ( & HasMaximal ) -- we have no Level (suc n) LEM | |
804 | 1388 ... | no not = record { maximal = ODC.minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) ; as = zorn01 ; ¬maximal<x = zorn02 } where |
551 | 1389 -- yes we have the maximal |
1390 zorn03 : odef HasMaximal ( & ( ODC.minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) ) ) | |
606 | 1391 zorn03 = ODC.x∋minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) -- Axiom of choice |
551 | 1392 zorn01 : A ∋ ODC.minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) |
1393 zorn01 = proj1 zorn03 | |
1394 zorn02 : {x : HOD} → A ∋ x → ¬ (ODC.minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) < x) | |
1395 zorn02 {x} ax m<x = proj2 zorn03 (& x) ax (subst₂ (λ j k → j < k) (sym *iso) (sym *iso) m<x ) | |
877 | 1396 ... | yes ¬Maximal = ⊥-elim ( z04 nmx zorn04 ) where |
551 | 1397 -- if we have no maximal, make ZChain, which contradict SUP condition |
1398 nmx : ¬ Maximal A | |
1399 nmx mx = ∅< {HasMaximal} zc5 ( ≡o∅→=od∅ ¬Maximal ) where | |
1400 zc5 : odef A (& (Maximal.maximal mx)) ∧ (( y : Ordinal ) → odef A y → ¬ (* (& (Maximal.maximal mx)) < * y)) | |
804 | 1401 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 | 1402 zorn04 : ZChain A (cf nmx) (cf-is-≤-monotonic nmx) as0 (& A) |
653 | 1403 zorn04 = SZ (cf nmx) (cf-is-≤-monotonic nmx) (subst (λ k → odef A k ) &iso as ) |
551 | 1404 |
516 | 1405 -- usage (see filter.agda ) |
1406 -- | |
497 | 1407 -- _⊆'_ : ( A B : HOD ) → Set n |
1408 -- _⊆'_ A B = (x : Ordinal ) → odef A x → odef B x | |
482 | 1409 |
497 | 1410 -- MaximumSubset : {L P : HOD} |
1411 -- → o∅ o< & L → o∅ o< & P → P ⊆ L | |
1412 -- → IsPartialOrderSet P _⊆'_ | |
1413 -- → ( (B : HOD) → B ⊆ P → IsTotalOrderSet B _⊆'_ → SUP P B _⊆'_ ) | |
1414 -- → Maximal P (_⊆'_) | |
1415 -- MaximumSubset {L} {P} 0<L 0<P P⊆L PO SP = Zorn-lemma {P} {_⊆'_} 0<P PO SP |