Mercurial > hg > Members > kono > Proof > ZF-in-agda
annotate src/zorn.agda @ 918:4c33f8383d7d
supf px o< px is in csupf
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 15 Oct 2022 20:05:34 +0900 |
parents | 3105feb3c4e1 |
children | 213f12f27003 |
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 |
908
d917831fb607
supf (supf x) ≡ supf x is bad
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
907
diff
changeset
|
388 chain-mono : {A : HOD} ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) (supf : Ordinal → Ordinal ) |
d917831fb607
supf (supf x) ≡ supf x is bad
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
907
diff
changeset
|
389 {a b c : Ordinal} → a o≤ b |
d917831fb607
supf (supf x) ≡ supf x is bad
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
907
diff
changeset
|
390 → odef (UnionCF A f mf ay supf a) c → odef (UnionCF A f mf ay supf b) c |
d917831fb607
supf (supf x) ≡ supf x is bad
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
907
diff
changeset
|
391 chain-mono f mf ay supf {a} {b} {c} a≤b ⟪ ua , ch-init fc ⟫ = |
d917831fb607
supf (supf x) ≡ supf x is bad
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
907
diff
changeset
|
392 ⟪ ua , ch-init fc ⟫ |
d917831fb607
supf (supf x) ≡ supf x is bad
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
907
diff
changeset
|
393 chain-mono f mf ay supf {a} {b} {c} a≤b ⟪ uaa , ch-is-sup ua ua<x is-sup fc ⟫ = |
d917831fb607
supf (supf x) ≡ supf x is bad
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
907
diff
changeset
|
394 ⟪ uaa , ch-is-sup ua (ordtrans<-≤ ua<x a≤b ) is-sup fc ⟫ |
d917831fb607
supf (supf x) ≡ supf x is bad
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
907
diff
changeset
|
395 |
703 | 396 record ZChain ( A : HOD ) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) |
783 | 397 {y : Ordinal} (ay : odef A y) ( z : Ordinal ) : Set (Level.suc n) where |
655 | 398 field |
694 | 399 supf : Ordinal → Ordinal |
880 | 400 sup=u : {b : Ordinal} → (ab : odef A b) → b o≤ z |
401 → IsSup A (UnionCF A f mf ay supf b) ab ∧ (¬ HasPrev A (UnionCF A f mf ay supf b) b f) → supf b ≡ b | |
402 | |
868 | 403 asupf : {x : Ordinal } → odef A (supf x) |
880 | 404 supf-mono : {x y : Ordinal } → x o≤ y → supf x o≤ supf y |
405 supf-< : {x y : Ordinal } → supf x o< supf y → supf x << supf y | |
891 | 406 supfmax : {x : Ordinal } → z o< x → supf x ≡ supf z |
880 | 407 |
408 minsup : {x : Ordinal } → x o≤ z → MinSUP A (UnionCF A f mf ay supf x) | |
891 | 409 supf-is-minsup : {x : Ordinal } → (x≤z : x o≤ z) → supf x ≡ MinSUP.sup ( minsup x≤z ) |
880 | 410 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 |
411 | |
608
6655f03984f9
mutual tranfinite in zorn
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
607
diff
changeset
|
412 chain : HOD |
703 | 413 chain = UnionCF A f mf ay supf z |
861 | 414 chain⊆A : chain ⊆' A |
415 chain⊆A = λ lt → proj1 lt | |
879 | 416 sup : {x : Ordinal } → x o≤ z → SUP A (UnionCF A f mf ay supf x) |
880 | 417 sup {x} x≤z = M→S supf (minsup x≤z) |
891 | 418 -- supf-sup<minsup : {x : Ordinal } → (x≤z : x o≤ z) → & (SUP.sup (M→S supf (minsup x≤z) )) o≤ supf x ... supf-mono |
878 | 419 |
861 | 420 chain∋init : odef chain y |
421 chain∋init = ⟪ ay , ch-init (init ay refl) ⟫ | |
908
d917831fb607
supf (supf x) ≡ supf x is bad
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
907
diff
changeset
|
422 f-next : {a z : Ordinal} → odef (UnionCF A f mf ay supf z) a → odef (UnionCF A f mf ay supf z) (f a) |
861 | 423 f-next {a} ⟪ aa , ch-init fc ⟫ = ⟪ proj2 (mf a aa) , ch-init (fsuc _ fc) ⟫ |
424 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 ) ⟫ | |
425 initial : {z : Ordinal } → odef chain z → * y ≤ * z | |
426 initial {a} ⟪ aa , ua ⟫ with ua | |
427 ... | ch-init fc = s≤fc y f mf fc | |
428 ... | ch-is-sup u u≤x is-sup fc = ≤-ftrans (<=to≤ zc7) (s≤fc _ f mf fc) where | |
429 zc7 : y <= supf u | |
430 zc7 = ChainP.fcy<sup is-sup (init ay refl) | |
431 f-total : IsTotalOrderSet chain | |
432 f-total {a} {b} ca cb = subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso uz01 where | |
433 uz01 : Tri (* (& a) < * (& b)) (* (& a) ≡ * (& b)) (* (& b) < * (& a) ) | |
434 uz01 = chain-total A f mf ay supf ( (proj2 ca)) ( (proj2 cb)) | |
435 | |
871 | 436 supf-<= : {x y : Ordinal } → supf x <= supf y → supf x o≤ supf y |
437 supf-<= {x} {y} (case1 sx=sy) = o≤-refl0 sx=sy | |
438 supf-<= {x} {y} (case2 sx<sy) with trio< (supf x) (supf y) | |
439 ... | tri< a ¬b ¬c = o<→≤ a | |
440 ... | tri≈ ¬a b ¬c = o≤-refl0 b | |
441 ... | tri> ¬a ¬b c = ⊥-elim (<-irr (case2 sx<sy ) (supf-< c) ) | |
442 | |
825 | 443 supf-inject : {x y : Ordinal } → supf x o< supf y → x o< y |
444 supf-inject {x} {y} sx<sy with trio< x y | |
445 ... | tri< a ¬b ¬c = a | |
446 ... | tri≈ ¬a refl ¬c = ⊥-elim ( o<¬≡ (cong supf refl) sx<sy ) | |
447 ... | tri> ¬a ¬b y<x with osuc-≡< (supf-mono (o<→≤ y<x) ) | |
448 ... | case1 eq = ⊥-elim ( o<¬≡ (sym eq) sx<sy ) | |
449 ... | case2 lt = ⊥-elim ( o<> sx<sy lt ) | |
798 | 450 |
872 | 451 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 | 452 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 | 453 , ch-init (subst (λ k → FClosure A f y k) (sym &iso) fc ) ⟫ |
892 | 454 ... | case1 eq = case1 (subst (λ k → k ≡ supf u ) &iso (trans eq (sym (supf-is-minsup u≤z ) ) )) |
455 ... | case2 lt = case2 (subst₂ (λ j k → j << k ) &iso (sym (supf-is-minsup u≤z )) lt ) | |
825 | 456 |
871 | 457 -- ordering is not proved here but in ZChain1 |
756 | 458 |
728 | 459 record ZChain1 ( A : HOD ) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) |
783 | 460 {y : Ordinal} (ay : odef A y) (zc : ZChain A f mf ay (& A)) ( z : Ordinal ) : Set (Level.suc n) where |
869 | 461 supf = ZChain.supf zc |
728 | 462 field |
897 | 463 is-max : {a b : Ordinal } → (ca : odef (UnionCF A f mf ay supf z) a ) → b o< z → (ab : odef A b) |
869 | 464 → HasPrev A (UnionCF A f mf ay supf z) b f ∨ IsSup A (UnionCF A f mf ay supf z) ab |
465 → * a < * b → odef ((UnionCF A f mf ay supf z)) b | |
728 | 466 |
568 | 467 record Maximal ( A : HOD ) : Set (Level.suc n) where |
468 field | |
469 maximal : HOD | |
804 | 470 as : A ∋ maximal |
568 | 471 ¬maximal<x : {x : HOD} → A ∋ x → ¬ maximal < x -- A is Partial, use negative |
567 | 472 |
743 | 473 init-uchain : (A : HOD) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) {y : Ordinal } → (ay : odef A y ) |
474 { supf : Ordinal → Ordinal } { x : Ordinal } → odef (UnionCF A f mf ay supf x) y | |
783 | 475 init-uchain A f mf ay = ⟪ ay , ch-init (init ay refl) ⟫ |
743 | 476 |
497 | 477 Zorn-lemma : { A : HOD } |
464 | 478 → o∅ o< & A |
568 | 479 → ( ( B : HOD) → (B⊆A : B ⊆' A) → IsTotalOrderSet B → SUP A B ) -- SUP condition |
497 | 480 → Maximal A |
552 | 481 Zorn-lemma {A} 0<A supP = zorn00 where |
571 | 482 <-irr0 : {a b : HOD} → A ∋ a → A ∋ b → (a ≡ b ) ∨ (a < b ) → b < a → ⊥ |
483 <-irr0 {a} {b} A∋a A∋b = <-irr | |
788 | 484 z07 : {y : Ordinal} {A : HOD } → {P : Set n} → odef A y ∧ P → y o< & A |
485 z07 {y} {A} p = subst (λ k → k o< & A) &iso ( c<→o< (subst (λ k → odef A k ) (sym &iso ) (proj1 p ))) | |
530 | 486 s : HOD |
487 s = ODC.minimal O A (λ eq → ¬x<0 ( subst (λ k → o∅ o< k ) (=od∅→≡o∅ eq) 0<A )) | |
568 | 488 as : A ∋ * ( & s ) |
489 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
|
490 as0 : odef A (& s ) |
6655f03984f9
mutual tranfinite in zorn
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
607
diff
changeset
|
491 as0 = subst (λ k → odef A k ) &iso as |
547 | 492 s<A : & s o< & A |
568 | 493 s<A = c<→o< (subst (λ k → odef A (& k) ) *iso as ) |
530 | 494 HasMaximal : HOD |
537 | 495 HasMaximal = record { od = record { def = λ x → odef A x ∧ ( (m : Ordinal) → odef A m → ¬ (* x < * m)) } ; odmax = & A ; <odmax = z07 } |
496 no-maximum : HasMaximal =h= od∅ → (x : Ordinal) → odef A x ∧ ((m : Ordinal) → odef A m → odef A x ∧ (¬ (* x < * m) )) → ⊥ | |
497 no-maximum nomx x P = ¬x<0 (eq→ nomx {x} ⟪ proj1 P , (λ m ma p → proj2 ( proj2 P m ma ) p ) ⟫ ) | |
532 | 498 Gtx : { x : HOD} → A ∋ x → HOD |
537 | 499 Gtx {x} ax = record { od = record { def = λ y → odef A y ∧ (x < (* y)) } ; odmax = & A ; <odmax = z07 } |
500 z08 : ¬ Maximal A → HasMaximal =h= od∅ | |
804 | 501 z08 nmx = record { eq→ = λ {x} lt → ⊥-elim ( nmx record {maximal = * x ; as = subst (λ k → odef A k) (sym &iso) (proj1 lt) |
537 | 502 ; ¬maximal<x = λ {y} ay → subst (λ k → ¬ (* x < k)) *iso (proj2 lt (& y) ay) } ) ; eq← = λ {y} lt → ⊥-elim ( ¬x<0 lt )} |
503 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)) | |
504 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 | |
505 ¬x<m : ¬ (* x < * m) | |
506 ¬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 | 507 |
879 | 508 minsupP : ( B : HOD) → (B⊆A : B ⊆' A) → IsTotalOrderSet B → MinSUP A B |
509 minsupP B B⊆A total = m02 where | |
510 xsup : (sup : Ordinal ) → Set n | |
511 xsup sup = {w : Ordinal } → odef B w → (w ≡ sup ) ∨ (w << sup ) | |
512 ∀-imply-or : {A : Ordinal → Set n } {B : Set n } | |
513 → ((x : Ordinal ) → A x ∨ B) → ((x : Ordinal ) → A x) ∨ B | |
514 ∀-imply-or {A} {B} ∀AB with ODC.p∨¬p O ((x : Ordinal ) → A x) -- LEM | |
515 ∀-imply-or {A} {B} ∀AB | case1 t = case1 t | |
516 ∀-imply-or {A} {B} ∀AB | case2 x = case2 (lemma (λ not → x not )) where | |
517 lemma : ¬ ((x : Ordinal ) → A x) → B | |
518 lemma not with ODC.p∨¬p O B | |
519 lemma not | case1 b = b | |
520 lemma not | case2 ¬b = ⊥-elim (not (λ x → dont-orb (∀AB x) ¬b )) | |
521 m00 : (x : Ordinal ) → ( ( z : Ordinal) → z o< x → ¬ (odef A z ∧ xsup z) ) ∨ MinSUP A B | |
522 m00 x = TransFinite0 ind x where | |
523 ind : (x : Ordinal) → ((z : Ordinal) → z o< x → ( ( w : Ordinal) → w o< z → ¬ (odef A w ∧ xsup w )) ∨ MinSUP A B) | |
524 → ( ( w : Ordinal) → w o< x → ¬ (odef A w ∧ xsup w) ) ∨ MinSUP A B | |
525 ind x prev = ∀-imply-or m01 where | |
526 m01 : (z : Ordinal) → (z o< x → ¬ (odef A z ∧ xsup z)) ∨ MinSUP A B | |
527 m01 z with trio< z x | |
528 ... | tri≈ ¬a b ¬c = case1 ( λ lt → ⊥-elim ( ¬a lt ) ) | |
529 ... | tri> ¬a ¬b c = case1 ( λ lt → ⊥-elim ( ¬a lt ) ) | |
530 ... | tri< a ¬b ¬c with prev z a | |
531 ... | case2 mins = case2 mins | |
532 ... | case1 not with ODC.p∨¬p O (odef A z ∧ xsup z) | |
533 ... | case1 mins = case2 record { sup = z ; asm = proj1 mins ; x<sup = proj2 mins ; minsup = m04 } where | |
534 m04 : {sup1 : Ordinal} → odef A sup1 → ({w : Ordinal} → odef B w → (w ≡ sup1) ∨ (w << sup1)) → z o≤ sup1 | |
535 m04 {s} as lt with trio< z s | |
536 ... | tri< a ¬b ¬c = o<→≤ a | |
537 ... | tri≈ ¬a b ¬c = o≤-refl0 b | |
538 ... | tri> ¬a ¬b s<z = ⊥-elim ( not s s<z ⟪ as , lt ⟫ ) | |
539 ... | case2 notz = case1 (λ _ → notz ) | |
540 m03 : ¬ ((z : Ordinal) → z o< & A → ¬ odef A z ∧ xsup z) | |
541 m03 not = ⊥-elim ( not s1 (z09 (SUP.as S)) ⟪ SUP.as S , m05 ⟫ ) where | |
542 S : SUP A B | |
543 S = supP B B⊆A total | |
544 s1 = & (SUP.sup S) | |
545 m05 : {w : Ordinal } → odef B w → (w ≡ s1 ) ∨ (w << s1 ) | |
546 m05 {w} bw with SUP.x<sup S {* w} (subst (λ k → odef B k) (sym &iso) bw ) | |
547 ... | case1 eq = case1 ( subst₂ (λ j k → j ≡ k ) &iso refl (cong (&) eq) ) | |
548 ... | case2 lt = case2 ( subst (λ k → _ < k ) (sym *iso) lt ) | |
549 m02 : MinSUP A B | |
550 m02 = dont-or (m00 (& A)) m03 | |
551 | |
560 | 552 -- Uncountable ascending chain by axiom of choice |
530 | 553 cf : ¬ Maximal A → Ordinal → Ordinal |
532 | 554 cf nmx x with ODC.∋-p O A (* x) |
555 ... | no _ = o∅ | |
556 ... | yes ax with is-o∅ (& ( Gtx ax )) | |
538 | 557 ... | yes nogt = -- no larger element, so it is maximal |
558 ⊥-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 | 559 ... | no not = & (ODC.minimal O (Gtx ax) (λ eq → not (=od∅→≡o∅ eq))) |
537 | 560 is-cf : (nmx : ¬ Maximal A ) → {x : Ordinal} → odef A x → odef A (cf nmx x) ∧ ( * x < * (cf nmx x) ) |
561 is-cf nmx {x} ax with ODC.∋-p O A (* x) | |
562 ... | no not = ⊥-elim ( not (subst (λ k → odef A k ) (sym &iso) ax )) | |
563 ... | yes ax with is-o∅ (& ( Gtx ax )) | |
564 ... | 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 ⟫ ) | |
565 ... | no not = ODC.x∋minimal O (Gtx ax) (λ eq → not (=od∅→≡o∅ eq)) | |
606 | 566 |
567 --- | |
568 --- infintie ascention sequence of f | |
569 --- | |
530 | 570 cf-is-<-monotonic : (nmx : ¬ Maximal A ) → (x : Ordinal) → odef A x → ( * x < * (cf nmx x) ) ∧ odef A (cf nmx x ) |
537 | 571 cf-is-<-monotonic nmx x ax = ⟪ proj2 (is-cf nmx ax ) , proj1 (is-cf nmx ax ) ⟫ |
530 | 572 cf-is-≤-monotonic : (nmx : ¬ Maximal A ) → ≤-monotonic-f A ( cf nmx ) |
532 | 573 cf-is-≤-monotonic nmx x ax = ⟪ case2 (proj1 ( cf-is-<-monotonic nmx x ax )) , proj2 ( cf-is-<-monotonic nmx x ax ) ⟫ |
543 | 574 |
877 | 575 sp0 : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {x y : Ordinal} (ay : odef A y) |
576 (zc : ZChain A f mf ay x ) → SUP A (ZChain.chain zc) | |
577 sp0 f mf ay zc = supP (ZChain.chain zc) (ZChain.chain⊆A zc) ztotal where | |
578 ztotal : IsTotalOrderSet (ZChain.chain zc) | |
579 ztotal {a} {b} ca cb = subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso uz01 where | |
580 uz01 : Tri (* (& a) < * (& b)) (* (& a) ≡ * (& b)) (* (& b) < * (& a) ) | |
581 uz01 = chain-total A f mf ay (ZChain.supf zc) ( (proj2 ca)) ( (proj2 cb)) | |
582 | |
803 | 583 -- |
584 -- Second TransFinite Pass for maximality | |
585 -- | |
586 | |
793 | 587 SZ1 : ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) |
728 | 588 {init : Ordinal} (ay : odef A init) (zc : ZChain A f mf ay (& A)) (x : Ordinal) → ZChain1 A f mf ay zc x |
793 | 589 SZ1 f mf {y} ay zc x = TransFinite { λ x → ZChain1 A f mf ay zc x } zc1 x where |
900 | 590 chain-mono1 : {a b c : Ordinal} → a o≤ b |
788 | 591 → odef (UnionCF A f mf ay (ZChain.supf zc) a) c → odef (UnionCF A f mf ay (ZChain.supf zc) b) c |
793 | 592 chain-mono1 {a} {b} {c} a≤b = chain-mono f mf ay (ZChain.supf zc) a≤b |
735 | 593 is-max-hp : (x : Ordinal) {a : Ordinal} {b : Ordinal} → odef (UnionCF A f mf ay (ZChain.supf zc) x) a → |
897 | 594 b o< x → (ab : odef A b) → |
836 | 595 HasPrev A (UnionCF A f mf ay (ZChain.supf zc) x) b f → |
735 | 596 * a < * b → odef (UnionCF A f mf ay (ZChain.supf zc) x) b |
749 | 597 is-max-hp x {a} {b} ua b<x ab has-prev a<b with HasPrev.ay has-prev |
598 ... | ⟪ ab0 , ch-init fc ⟫ = ⟪ ab , ch-init ( subst (λ k → FClosure A f y k) (sym (HasPrev.x=fy has-prev)) (fsuc _ fc )) ⟫ | |
894 | 599 ... | ⟪ ab0 , ch-is-sup u u≤x is-sup fc ⟫ = ⟪ ab , subst (λ k → UChain A f mf ay (ZChain.supf zc) x k ) |
791 | 600 (sym (HasPrev.x=fy has-prev)) ( ch-is-sup u u≤x is-sup (fsuc _ fc)) ⟫ |
868 | 601 |
869 | 602 supf = ZChain.supf zc |
603 | |
604 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 | |
605 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 | |
606 s<b : s o< b | |
607 s<b = ZChain.supf-inject zc ss<sb | |
608 s≤<z : s o≤ & A | |
609 s≤<z = ordtrans s<b b≤z | |
870 | 610 zc04 : odef (UnionCF A f mf ay supf (& A)) (supf s) |
874 | 611 zc04 = ZChain.csupf zc (z09 (ZChain.asupf zc)) |
869 | 612 zc05 : odef (UnionCF A f mf ay supf b) (supf s) |
613 zc05 with zc04 | |
614 ... | ⟪ as , ch-init fc ⟫ = ⟪ as , ch-init fc ⟫ | |
900 | 615 ... | ⟪ 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 | 616 zc07 : FClosure A f (supf u) (supf s) -- supf u ≤ supf s → supf u o≤ supf s |
617 zc07 = fc | |
869 | 618 zc06 : supf u ≡ u |
619 zc06 = ChainP.supu=u is-sup | |
894 | 620 zc08 : supf u o< supf b |
621 zc08 = ordtrans≤-< (ZChain.supf-<= zc (≤to<= ( s≤fc _ f mf fc ))) ss<sb | |
869 | 622 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 |
623 zc04 : odef (UnionCF A f mf ay supf b) (f x) | |
624 zc04 with subst (λ k → odef (UnionCF A f mf ay supf b) k ) &iso (csupf-fc b<z ss≤sb fc ) | |
625 ... | ⟪ as , ch-init fc ⟫ = ⟪ proj2 (mf _ as) , ch-init (fsuc _ fc) ⟫ | |
626 ... | ⟪ as , ch-is-sup u u≤x is-sup fc ⟫ = ⟪ proj2 (mf _ as) , ch-is-sup u u≤x is-sup (fsuc _ fc) ⟫ | |
627 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) | |
628 order {b} {s} {z1} b<z ss<sb fc = zc04 where | |
891 | 629 zc00 : ( z1 ≡ MinSUP.sup (ZChain.minsup zc (o<→≤ b<z) )) ∨ ( z1 << MinSUP.sup ( ZChain.minsup zc (o<→≤ b<z) ) ) |
892 | 630 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 | 631 -- supf (supf b) ≡ supf b |
869 | 632 zc04 : (z1 ≡ supf b) ∨ (z1 << supf b) |
633 zc04 with zc00 | |
892 | 634 ... | case1 eq = case1 (subst₂ (λ j k → j ≡ k ) refl (sym (ZChain.supf-is-minsup zc (o<→≤ b<z)) ) eq ) |
635 ... | case2 lt = case2 (subst₂ (λ j k → j < * k ) refl (sym (ZChain.supf-is-minsup zc (o<→≤ b<z) )) lt ) | |
868 | 636 |
728 | 637 zc1 : (x : Ordinal) → ((y₁ : Ordinal) → y₁ o< x → ZChain1 A f mf ay zc y₁) → ZChain1 A f mf ay zc x |
900 | 638 zc1 x prev with Oprev-p x -- prev is not used now.... |
756 | 639 ... | 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
|
640 px = Oprev.oprev op |
789 | 641 zc-b<x : {b : Ordinal } → b o< x → b o< osuc px |
642 zc-b<x {b} lt = subst (λ k → b o< k ) (sym (Oprev.oprev=x op)) lt | |
894 | 643 is-max : {a : Ordinal} {b : Ordinal} → odef (UnionCF A f mf ay supf x) a → |
897 | 644 b o< x → (ab : odef A b) → |
869 | 645 HasPrev A (UnionCF A f mf ay supf x) b f ∨ IsSup A (UnionCF A f mf ay supf x) ab → |
646 * 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
|
647 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
|
648 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
|
649 is-max {a} {b} ua b<x ab P a<b | case2 is-sup |
900 | 650 = ⟪ 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
|
651 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
|
652 b<A = z09 ab |
869 | 653 m04 : ¬ HasPrev A (UnionCF A f mf ay supf b) b f |
894 | 654 m04 nhp = proj1 is-sup ( record { ax = HasPrev.ax nhp ; y = HasPrev.y nhp ; ay = |
900 | 655 chain-mono1 (o<→≤ b<x) (HasPrev.ay nhp) ; x=fy = HasPrev.x=fy nhp } ) |
859 | 656 m05 : ZChain.supf zc b ≡ b |
657 m05 = ZChain.sup=u zc ab (o<→≤ (z09 ab) ) | |
900 | 658 ⟪ 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
|
659 m08 : {z : Ordinal} → (fcz : FClosure A f y z ) → z <= ZChain.supf zc b |
872 | 660 m08 {z} fcz = ZChain.fcy<sup zc (o<→≤ b<A) fcz |
828 | 661 m09 : {s z1 : Ordinal} → ZChain.supf zc s o< ZChain.supf zc b |
825 | 662 → FClosure A f (ZChain.supf zc s) z1 → z1 <= ZChain.supf zc b |
869 | 663 m09 {s} {z} s<b fcz = order b<A s<b fcz |
664 m06 : ChainP A f mf ay supf b | |
859 | 665 m06 = record { fcy<sup = m08 ; order = m09 ; supu=u = m05 } |
756 | 666 ... | no lim = record { is-max = is-max } where |
869 | 667 is-max : {a : Ordinal} {b : Ordinal} → odef (UnionCF A f mf ay supf x) a → |
897 | 668 b o< x → (ab : odef A b) → |
869 | 669 HasPrev A (UnionCF A f mf ay supf x) b f ∨ IsSup A (UnionCF A f mf ay supf x) ab → |
670 * 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
|
671 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
|
672 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
|
673 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 | 674 ... | 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 | 675 ... | case2 y<b = ⟪ 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
|
676 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
|
677 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
|
678 m07 : {z : Ordinal} → FClosure A f y z → z <= ZChain.supf zc b |
872 | 679 m07 {z} fc = ZChain.fcy<sup zc (o<→≤ m09) fc |
828 | 680 m08 : {s z1 : Ordinal} → ZChain.supf zc s o< ZChain.supf zc b |
825 | 681 → FClosure A f (ZChain.supf zc s) z1 → z1 <= ZChain.supf zc b |
869 | 682 m08 {s} {z1} s<b fc = order m09 s<b fc |
683 m04 : ¬ HasPrev A (UnionCF A f mf ay supf b) b f | |
894 | 684 m04 nhp = proj1 is-sup ( record { ax = HasPrev.ax nhp ; y = HasPrev.y nhp ; ay = |
900 | 685 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
|
686 ; x=fy = HasPrev.x=fy nhp } ) |
859 | 687 m05 : ZChain.supf zc b ≡ b |
688 m05 = ZChain.sup=u zc ab (o<→≤ m09) | |
900 | 689 ⟪ record { x<sup = λ lt → IsSup.x<sup (proj2 is-sup) (chain-mono1 (o<→≤ b<x) lt )} , m04 ⟫ -- ZChain on x |
869 | 690 m06 : ChainP A f mf ay supf b |
859 | 691 m06 = record { fcy<sup = m07 ; order = m08 ; supu=u = m05 } |
727 | 692 |
543 | 693 --- |
560 | 694 --- the maximum chain has fix point of any ≤-monotonic function |
543 | 695 --- |
703 | 696 fixpoint : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) (zc : ZChain A f mf as0 (& A) ) |
877 | 697 → f (& (SUP.sup (sp0 f mf as0 zc ))) ≡ & (SUP.sup (sp0 f mf as0 zc )) |
698 fixpoint f mf zc = z14 where | |
538 | 699 chain = ZChain.chain zc |
894 | 700 supf = ZChain.supf zc |
895 | 701 sp1 : SUP A chain |
877 | 702 sp1 = sp0 f mf as0 zc |
897 | 703 z10 : {a b : Ordinal } → (ca : odef chain a ) → b o< & A → (ab : odef A b ) |
894 | 704 → HasPrev A chain b f ∨ IsSup A chain {b} ab |
538 | 705 → * a < * b → odef chain b |
793 | 706 z10 = ZChain1.is-max (SZ1 f mf as0 zc (& A) ) |
897 | 707 z21 : & (SUP.sup sp1) o< & A |
708 z21 = c<→o< (SUP.as sp1 ) | |
709 -- z21 : supf (& (SUP.sup sp1)) o< & A | |
710 -- z21 = subst (λ k → k o< & A) &iso ( c<→o< (subst (λ k → odef A k) (sym &iso) (ZChain.asupf zc ) )) | |
538 | 711 z12 : odef chain (& (SUP.sup sp1)) |
712 z12 with o≡? (& s) (& (SUP.sup sp1)) | |
653 | 713 ... | yes eq = subst (λ k → odef chain k) eq ( ZChain.chain∋init zc ) |
891 | 714 ... | no ne = z10 {& s} {& (SUP.sup sp1)} ( ZChain.chain∋init zc ) z21 (SUP.as sp1) |
570 | 715 (case2 z19 ) z13 where |
538 | 716 z13 : * (& s) < * (& (SUP.sup sp1)) |
653 | 717 z13 with SUP.x<sup sp1 ( ZChain.chain∋init zc ) |
538 | 718 ... | case1 eq = ⊥-elim ( ne (cong (&) eq) ) |
719 ... | case2 lt = subst₂ (λ j k → j < k ) (sym *iso) (sym *iso) lt | |
804 | 720 z19 : IsSup A chain {& (SUP.sup sp1)} (SUP.as sp1) |
571 | 721 z19 = record { x<sup = z20 } where |
722 z20 : {y : Ordinal} → odef chain y → (y ≡ & (SUP.sup sp1)) ∨ (y << & (SUP.sup sp1)) | |
723 z20 {y} zy with SUP.x<sup sp1 (subst (λ k → odef chain k ) (sym &iso) zy) | |
570 | 724 ... | case1 y=p = case1 (subst (λ k → k ≡ _ ) &iso ( cong (&) y=p )) |
725 ... | case2 y<p = case2 (subst (λ k → * y < k ) (sym *iso) y<p ) | |
877 | 726 ztotal : IsTotalOrderSet (ZChain.chain zc) |
727 ztotal {a} {b} ca cb = subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso uz01 where | |
728 uz01 : Tri (* (& a) < * (& b)) (* (& a) ≡ * (& b)) (* (& b) < * (& a) ) | |
894 | 729 uz01 = chain-total A f mf as0 supf ( (proj2 ca)) ( (proj2 cb)) |
877 | 730 |
731 z14 : f (& (SUP.sup (sp0 f mf as0 zc ))) ≡ & (SUP.sup (sp0 f mf as0 zc )) | |
732 z14 with ztotal (subst (λ k → odef chain k) (sym &iso) (ZChain.f-next zc z12 )) z12 | |
631 | 733 ... | tri< a ¬b ¬c = ⊥-elim z16 where |
734 z16 : ⊥ | |
804 | 735 z16 with proj1 (mf (& ( SUP.sup sp1)) ( SUP.as sp1 )) |
631 | 736 ... | case1 eq = ⊥-elim (¬b (subst₂ (λ j k → j ≡ k ) refl *iso (sym eq) )) |
737 ... | case2 lt = ⊥-elim (¬c (subst₂ (λ j k → k < j ) refl *iso lt )) | |
738 ... | tri≈ ¬a b ¬c = subst ( λ k → k ≡ & (SUP.sup sp1) ) &iso ( cong (&) b ) | |
739 ... | tri> ¬a ¬b c = ⊥-elim z17 where | |
740 z15 : (* (f ( & ( SUP.sup sp1 ))) ≡ SUP.sup sp1) ∨ (* (f ( & ( SUP.sup sp1 ))) < SUP.sup sp1) | |
741 z15 = SUP.x<sup sp1 (subst (λ k → odef chain k ) (sym &iso) (ZChain.f-next zc z12 )) | |
742 z17 : ⊥ | |
743 z17 with z15 | |
744 ... | case1 eq = ¬b eq | |
745 ... | case2 lt = ¬a lt | |
560 | 746 |
747 -- ZChain contradicts ¬ Maximal | |
748 -- | |
571 | 749 -- ZChain forces fix point on any ≤-monotonic function (fixpoint) |
560 | 750 -- ¬ Maximal create cf which is a <-monotonic function by axiom of choice. This contradicts fix point of ZChain |
751 -- | |
877 | 752 z04 : (nmx : ¬ Maximal A ) → (zc : ZChain A (cf nmx) (cf-is-≤-monotonic nmx) as0 (& A)) → ⊥ |
753 z04 nmx zc = <-irr0 {* (cf nmx c)} {* c} (subst (λ k → odef A k ) (sym &iso) (proj1 (is-cf nmx (SUP.as sp1 )))) | |
804 | 754 (subst (λ k → odef A (& k)) (sym *iso) (SUP.as sp1) ) |
877 | 755 (case1 ( cong (*)( fixpoint (cf nmx) (cf-is-≤-monotonic nmx ) zc ))) -- x ≡ f x ̄ |
804 | 756 (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
|
757 sp1 : SUP A (ZChain.chain zc) |
877 | 758 sp1 = sp0 (cf nmx) (cf-is-≤-monotonic nmx) as0 zc |
538 | 759 c = & (SUP.sup sp1) |
548 | 760 |
757 | 761 uchain : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) → HOD |
762 uchain f mf {y} ay = record { od = record { def = λ x → FClosure A f y x } ; odmax = & A ; <odmax = | |
763 λ {z} cz → subst (λ k → k o< & A) &iso ( c<→o< (subst (λ k → odef A k ) (sym &iso ) (A∋fc y f mf cz ))) } | |
764 | |
765 utotal : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) | |
766 → IsTotalOrderSet (uchain f mf ay) | |
767 utotal f mf {y} ay {a} {b} ca cb = subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso uz01 where | |
768 uz01 : Tri (* (& a) < * (& b)) (* (& a) ≡ * (& b)) (* (& b) < * (& a) ) | |
769 uz01 = fcn-cmp y f mf ca cb | |
770 | |
771 ysup : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) | |
772 → SUP A (uchain f mf ay) | |
773 ysup f mf {y} ay = supP (uchain f mf ay) (λ lt → A∋fc y f mf lt) (utotal f mf ay) | |
774 | |
793 | 775 SUP⊆ : { B C : HOD } → B ⊆' C → SUP A C → SUP A B |
804 | 776 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 | 777 |
833 | 778 record xSUP (B : HOD) (x : Ordinal) : Set n where |
779 field | |
780 ax : odef A x | |
781 is-sup : IsSup A B ax | |
782 | |
560 | 783 -- |
547 | 784 -- create all ZChains under o< x |
560 | 785 -- |
608
6655f03984f9
mutual tranfinite in zorn
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
607
diff
changeset
|
786 |
674 | 787 ind : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) → (x : Ordinal) |
703 | 788 → ((z : Ordinal) → z o< x → ZChain A f mf ay z) → ZChain A f mf ay x |
707 | 789 ind f mf {y} ay x prev with Oprev-p x |
697 | 790 ... | yes op = zc4 where |
682 | 791 -- |
792 -- we have previous ordinal to use induction | |
793 -- | |
794 px = Oprev.oprev op | |
703 | 795 zc : ZChain A f mf ay (Oprev.oprev op) |
682 | 796 zc = prev px (subst (λ k → px o< k) (Oprev.oprev=x op) <-osuc ) |
797 px<x : px o< x | |
798 px<x = subst (λ k → px o< k) (Oprev.oprev=x op) <-osuc | |
918
4c33f8383d7d
supf px o< px is in csupf
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
911
diff
changeset
|
799 opx=x : osuc px ≡ x |
4c33f8383d7d
supf px o< px is in csupf
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
911
diff
changeset
|
800 opx=x = Oprev.oprev=x op |
4c33f8383d7d
supf px o< px is in csupf
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
911
diff
changeset
|
801 |
709 | 802 zc-b<x : (b : Ordinal ) → b o< x → b o< osuc px |
803 zc-b<x b lt = subst (λ k → b o< k ) (sym (Oprev.oprev=x op)) lt | |
697 | 804 |
754 | 805 supf0 = ZChain.supf zc |
869 | 806 pchain : HOD |
807 pchain = UnionCF A f mf ay supf0 px | |
835 | 808 |
857 | 809 supf-mono : {a b : Ordinal } → a o≤ b → supf0 a o≤ supf0 b |
810 supf-mono = ZChain.supf-mono zc | |
844 | 811 |
861 | 812 zc04 : {b : Ordinal} → b o≤ x → (b o≤ px ) ∨ (b ≡ x ) |
813 zc04 {b} b≤x with trio< b px | |
814 ... | tri< a ¬b ¬c = case1 (o<→≤ a) | |
815 ... | tri≈ ¬a b ¬c = case1 (o≤-refl0 b) | |
816 ... | tri> ¬a ¬b px<b with osuc-≡< b≤x | |
817 ... | case1 eq = case2 eq | |
818 ... | case2 b<x = ⊥-elim ( ¬p<x<op ⟪ px<b , subst (λ k → b o< k ) (sym (Oprev.oprev=x op)) b<x ⟫ ) | |
840 | 819 |
904 | 820 zc41 : supf0 px o< x → ZChain A f mf ay x |
821 zc41 sfpx<x = record { supf = supf1 ; sup=u = ? ; asupf = ? ; supf-mono = supf1-mono ; supf-< = ? | |
901 | 822 ; supfmax = ? ; minsup = ? ; supf-is-minsup = ? ; csupf = csupf1 } where |
823 -- supf0 px is included by the chain | |
824 -- ( UnionCF A f mf ay supf0 px ∪ FClosure (supf0 px) ) ≡ UnionCF supf1 x | |
825 -- supf1 x ≡ sp1, which is not included now | |
883 | 826 |
871 | 827 pchainpx : HOD |
902 | 828 pchainpx = record { od = record { def = λ z → (odef A z ∧ UChain A f mf ay supf0 px z ) |
829 ∨ FClosure A f (supf0 px) z } ; odmax = & A ; <odmax = zc00 } where | |
830 zc00 : {z : Ordinal } → (odef A z ∧ UChain A f mf ay supf0 px z ) ∨ FClosure A f (supf0 px) z → z o< & A | |
872 | 831 zc00 {z} (case1 lt) = z07 lt |
902 | 832 zc00 {z} (case2 fc) = z09 ( A∋fc (supf0 px) f mf fc ) |
833 zc01 : {z : Ordinal } → (odef A z ∧ UChain A f mf ay supf0 px z ) ∨ FClosure A f (supf0 px) z → odef A z | |
872 | 834 zc01 {z} (case1 lt) = proj1 lt |
902 | 835 zc01 {z} (case2 fc) = ( A∋fc (supf0 px) f mf fc ) |
872 | 836 |
902 | 837 zc02 : { a b : Ordinal } → odef A a ∧ UChain A f mf ay supf0 px a → FClosure A f (supf0 px) b → a <= b |
872 | 838 zc02 {a} {b} ca fb = zc05 fb where |
903 | 839 zc06 : MinSUP.sup (ZChain.minsup zc o≤-refl) ≡ supf0 px |
840 zc06 = trans (sym ( ZChain.supf-is-minsup zc o≤-refl )) refl | |
902 | 841 zc05 : {b : Ordinal } → FClosure A f (supf0 px) b → a <= b |
842 zc05 (fsuc b1 fb ) with proj1 ( mf b1 (A∋fc (supf0 px) f mf fb )) | |
872 | 843 ... | case1 eq = subst (λ k → a <= k ) (subst₂ (λ j k → j ≡ k) &iso &iso (cong (&) eq)) (zc05 fb) |
844 ... | case2 lt = <-ftrans (zc05 fb) (case2 lt) | |
903 | 845 zc05 (init b1 refl) with MinSUP.x<sup (ZChain.minsup zc o≤-refl) |
846 (subst (λ k → odef A k ∧ UChain A f mf ay supf0 px k) (sym &iso) ca ) | |
892 | 847 ... | case1 eq = case1 (subst₂ (λ j k → j ≡ k ) &iso zc06 eq ) |
848 ... | case2 lt = case2 (subst₂ (λ j k → j < k ) *iso (cong (*) zc06) lt ) | |
871 | 849 |
872 | 850 ptotal : IsTotalOrderSet pchainpx |
851 ptotal (case1 a) (case1 b) = subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso | |
852 (chain-total A f mf ay supf0 (proj2 a) (proj2 b)) | |
853 ptotal {a0} {b0} (case1 a) (case2 b) with zc02 a b | |
854 ... | case1 eq = tri≈ (<-irr (case1 (sym eq1))) eq1 (<-irr (case1 eq1)) where | |
855 eq1 : a0 ≡ b0 | |
856 eq1 = subst₂ (λ j k → j ≡ k ) *iso *iso (cong (*) eq ) | |
857 ... | case2 lt = tri< lt1 (λ eq → <-irr (case1 (sym eq)) lt1) (<-irr (case2 lt1)) where | |
858 lt1 : a0 < b0 | |
859 lt1 = subst₂ (λ j k → j < k ) *iso *iso lt | |
860 ptotal {b0} {a0} (case2 b) (case1 a) with zc02 a b | |
861 ... | case1 eq = tri≈ (<-irr (case1 eq1)) (sym eq1) (<-irr (case1 (sym eq1))) where | |
862 eq1 : a0 ≡ b0 | |
863 eq1 = subst₂ (λ j k → j ≡ k ) *iso *iso (cong (*) eq ) | |
864 ... | case2 lt = tri> (<-irr (case2 lt1)) (λ eq → <-irr (case1 eq) lt1) lt1 where | |
865 lt1 : a0 < b0 | |
866 lt1 = subst₂ (λ j k → j < k ) *iso *iso lt | |
903 | 867 ptotal (case2 a) (case2 b) = subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso (fcn-cmp (supf0 px) f mf a b) |
872 | 868 |
901 | 869 pcha : pchainpx ⊆' A |
870 pcha (case1 lt) = proj1 lt | |
871 pcha (case2 fc) = A∋fc _ f mf fc | |
871 | 872 |
901 | 873 sup1 : MinSUP A pchainpx |
874 sup1 = minsupP pchainpx pcha ptotal | |
875 sp1 = MinSUP.sup sup1 | |
871 | 876 |
877 supf1 : Ordinal → Ordinal | |
878 supf1 z with trio< z px | |
879 ... | tri< a ¬b ¬c = supf0 z | |
901 | 880 ... | tri≈ ¬a b ¬c = supf0 z |
881 ... | tri> ¬a ¬b c = sp1 | |
871 | 882 |
886 | 883 sf1=sf0 : {z : Ordinal } → z o≤ px → supf1 z ≡ supf0 z |
901 | 884 sf1=sf0 {z} z≤px with trio< z px |
874 | 885 ... | tri< a ¬b ¬c = refl |
901 | 886 ... | tri≈ ¬a b ¬c = refl |
887 ... | tri> ¬a ¬b c = ⊥-elim ( o≤> z≤px c ) | |
883 | 888 |
901 | 889 sf1=sp1 : {z : Ordinal } → px o< z → supf1 z ≡ sp1 |
890 sf1=sp1 {z} px<z with trio< z px | |
891 ... | tri< a ¬b ¬c = ⊥-elim ( o<> px<z a ) | |
892 ... | tri≈ ¬a b ¬c = ⊥-elim ( o<¬≡ (sym b) px<z ) | |
893 ... | tri> ¬a ¬b c = refl | |
873 | 894 |
903 | 895 asupf1 : {z : Ordinal } → odef A (supf1 z) |
896 asupf1 {z} with trio< z px | |
897 ... | tri< a ¬b ¬c = ZChain.asupf zc | |
898 ... | tri≈ ¬a b ¬c = ZChain.asupf zc | |
899 ... | tri> ¬a ¬b c = MinSUP.asm sup1 | |
900 | |
901 | 901 supf1-mono : {a b : Ordinal } → a o≤ b → supf1 a o≤ supf1 b |
902 supf1-mono {a} {b} a≤b with trio< b px | |
903 ... | tri< a ¬b ¬c = subst₂ (λ j k → j o≤ k ) (sym (sf1=sf0 (o<→≤ (ordtrans≤-< a≤b a)))) refl ( supf-mono a≤b ) | |
904 ... | tri≈ ¬a b ¬c = subst₂ (λ j k → j o≤ k ) (sym (sf1=sf0 (subst (λ k → a o≤ k) b a≤b))) refl ( supf-mono a≤b ) | |
905 supf1-mono {a} {b} a≤b | tri> ¬a ¬b c with trio< a px | |
906 ... | tri< a<px ¬b ¬c = zc19 where | |
907 zc21 : MinSUP A (UnionCF A f mf ay supf0 a) | |
908 zc21 = ZChain.minsup zc (o<→≤ a<px) | |
909 zc24 : {x₁ : Ordinal} → odef (UnionCF A f mf ay supf0 a) x₁ → (x₁ ≡ sp1) ∨ (x₁ << sp1) | |
910 zc24 {x₁} ux = MinSUP.x<sup sup1 (case1 (chain-mono f mf ay supf0 (o<→≤ a<px) ux ) ) | |
911 zc19 : supf0 a o≤ sp1 | |
912 zc19 = subst (λ k → k o≤ sp1) (sym (ZChain.supf-is-minsup zc (o<→≤ a<px))) ( MinSUP.minsup zc21 (MinSUP.asm sup1) zc24 ) | |
913 ... | tri≈ ¬a b ¬c = zc18 where | |
914 zc21 : MinSUP A (UnionCF A f mf ay supf0 a) | |
915 zc21 = ZChain.minsup zc (o≤-refl0 b) | |
916 zc20 : MinSUP.sup zc21 ≡ supf0 a | |
917 zc20 = sym (ZChain.supf-is-minsup zc (o≤-refl0 b)) | |
918 zc24 : {x₁ : Ordinal} → odef (UnionCF A f mf ay supf0 a) x₁ → (x₁ ≡ sp1) ∨ (x₁ << sp1) | |
919 zc24 {x₁} ux = MinSUP.x<sup sup1 (case1 (chain-mono f mf ay supf0 (o≤-refl0 b) ux ) ) | |
920 zc18 : supf0 a o≤ sp1 | |
921 zc18 = subst (λ k → k o≤ sp1) zc20( MinSUP.minsup zc21 (MinSUP.asm sup1) zc24 ) | |
922 ... | tri> ¬a ¬b c = o≤-refl | |
885 | 923 |
903 | 924 |
925 fcup : {u z : Ordinal } → FClosure A f (supf1 u) z → u o≤ px → FClosure A f (supf0 u) z | |
926 fcup {u} {z} fc u≤px = subst (λ k → FClosure A f k z ) (sf1=sf0 u≤px) fc | |
927 fcpu : {u z : Ordinal } → FClosure A f (supf0 u) z → u o≤ px → FClosure A f (supf1 u) z | |
928 fcpu {u} {z} fc u≤px = subst (λ k → FClosure A f k z ) (sym (sf1=sf0 u≤px)) fc | |
929 zc11 : {z : Ordinal} → odef (UnionCF A f mf ay supf1 x) z → odef pchainpx z | |
930 zc11 {z} ⟪ az , ch-init fc ⟫ = case1 ⟪ az , ch-init fc ⟫ | |
931 zc11 {z} ⟪ az , ch-is-sup u u<x is-sup fc ⟫ = zc21 fc where | |
932 zc21 : {z1 : Ordinal } → FClosure A f (supf1 u) z1 → odef pchainpx z1 | |
933 zc21 {z1} (fsuc z2 fc ) with zc21 fc | |
934 ... | case1 ⟪ ua1 , ch-init fc₁ ⟫ = case1 ⟪ proj2 ( mf _ ua1) , ch-init (fsuc _ fc₁) ⟫ | |
935 ... | 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₁) ⟫ | |
936 ... | case2 fc = case2 (fsuc _ fc) | |
937 zc21 (init asp refl ) with trio< u px | inspect supf1 u | |
938 ... | tri< a ¬b ¬c | _ = case1 ⟪ asp , ch-is-sup u a record {fcy<sup = zc13 ; order = zc17 | |
939 ; supu=u = trans (sym (sf1=sf0 (o<→≤ a))) (ChainP.supu=u is-sup) } (init asp refl) ⟫ where | |
940 zc17 : {s : Ordinal} {z1 : Ordinal} → supf0 s o< supf0 u → | |
941 FClosure A f (supf0 s) z1 → (z1 ≡ supf0 u) ∨ (z1 << supf0 u) | |
942 zc17 {s} {z1} ss<spx fc = subst (λ k → (z1 ≡ k) ∨ (z1 << k)) ((sf1=sf0 zc19)) ( ChainP.order is-sup | |
943 (subst₂ (λ j k → j o< k ) (sym (sf1=sf0 zc18)) (sym (sf1=sf0 zc19)) ss<spx) (fcpu fc zc18) ) where | |
944 zc19 : u o≤ px | |
945 zc19 = o<→≤ a | |
946 zc18 : s o≤ px | |
947 zc18 = ordtrans (ZChain.supf-inject zc ss<spx) zc19 | |
948 zc13 : {z : Ordinal } → FClosure A f y z → (z ≡ supf0 u) ∨ ( z << supf0 u ) | |
949 zc13 {z} fc = subst (λ k → (z ≡ k) ∨ ( z << k )) (sf1=sf0 (o<→≤ a)) ( ChainP.fcy<sup is-sup fc ) | |
950 ... | tri≈ ¬a b ¬c | _ = case2 (init (subst (λ k → odef A k) (cong supf0 b) asp ) (cong supf0 (sym b)) ) | |
951 ... | tri> ¬a ¬b c | _ = ⊥-elim ( ¬p<x<op ⟪ c , subst (λ k → u o< k ) (sym (Oprev.oprev=x op)) u<x ⟫ ) | |
952 zc12 : {z : Ordinal} → odef pchainpx z → odef (UnionCF A f mf ay supf1 x) z | |
953 zc12 {z} (case1 ⟪ az , ch-init fc ⟫ ) = ⟪ az , ch-init fc ⟫ | |
954 zc12 {z} (case1 ⟪ az , ch-is-sup u u<x is-sup fc ⟫ ) = zc21 fc where | |
955 zc21 : {z1 : Ordinal } → FClosure A f (supf0 u) z1 → odef (UnionCF A f mf ay supf1 x) z1 | |
956 zc21 {z1} (fsuc z2 fc ) with zc21 fc | |
957 ... | ⟪ ua1 , ch-init fc₁ ⟫ = ⟪ proj2 ( mf _ ua1) , ch-init (fsuc _ fc₁) ⟫ | |
958 ... | ⟪ 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₁) ⟫ | |
959 zc21 (init asp refl ) with trio< u px | inspect supf1 u | |
960 ... | tri< a ¬b ¬c | _ = ⟪ asp , ch-is-sup u | |
961 (subst (λ k → u o< k) (Oprev.oprev=x op) (ordtrans u<x <-osuc)) | |
962 record {fcy<sup = zc13 ; order = zc17 ; supu=u = trans (sf1=sf0 (o<→≤ u<x)) (ChainP.supu=u is-sup) } zc14 ⟫ where | |
963 zc17 : {s : Ordinal} {z1 : Ordinal} → supf1 s o< supf1 u → | |
964 FClosure A f (supf1 s) z1 → (z1 ≡ supf1 u) ∨ (z1 << supf1 u) | |
965 zc17 {s} {z1} ss<spx fc = subst (λ k → (z1 ≡ k) ∨ (z1 << k)) (sym (sf1=sf0 (o<→≤ u<x))) ( ChainP.order is-sup | |
966 (subst₂ (λ j k → j o< k ) (sf1=sf0 s≤px) (sf1=sf0 (o<→≤ u<x)) ss<spx) (fcup fc s≤px) ) where | |
967 s≤px : s o≤ px | |
968 s≤px = ordtrans ( supf-inject0 supf1-mono ss<spx ) (o<→≤ u<x) | |
969 zc14 : FClosure A f (supf1 u) (supf0 u) | |
970 zc14 = init (subst (λ k → odef A k ) (sym (sf1=sf0 (o<→≤ u<x))) asp) (sf1=sf0 (o<→≤ u<x)) | |
971 zc13 : {z : Ordinal } → FClosure A f y z → (z ≡ supf1 u) ∨ ( z << supf1 u ) | |
972 zc13 {z} fc = subst (λ k → (z ≡ k) ∨ ( z << k )) (sym (sf1=sf0 (o<→≤ u<x))) ( ChainP.fcy<sup is-sup fc ) | |
973 ... | tri≈ ¬a b ¬c | _ = ⟪ asp , ch-is-sup px (pxo<x op) record { fcy<sup = zc13 | |
974 ; order = zc17 ; supu=u = zc18 } (init asupf1 (trans (sf1=sf0 o≤-refl ) (cong supf0 (sym b))) ) ⟫ where | |
975 zc13 : {z : Ordinal } → FClosure A f y z → (z ≡ supf1 px) ∨ ( z << supf1 px ) | |
976 zc13 {z} fc = subst (λ k → (z ≡ k) ∨ (z << k)) (trans (cong supf0 b) (sym (sf1=sf0 o≤-refl))) (ChainP.fcy<sup is-sup fc ) | |
977 zc18 : supf1 px ≡ px | |
978 zc18 = begin | |
979 supf1 px ≡⟨ sf1=sf0 o≤-refl ⟩ | |
980 supf0 px ≡⟨ cong supf0 (sym b) ⟩ | |
981 supf0 u ≡⟨ ChainP.supu=u is-sup ⟩ | |
982 u ≡⟨ b ⟩ | |
983 px ∎ where open ≡-Reasoning | |
984 zc17 : {s : Ordinal} {z1 : Ordinal} → supf1 s o< supf1 px → | |
985 FClosure A f (supf1 s) z1 → (z1 ≡ supf1 px) ∨ (z1 << supf1 px) | |
986 zc17 {s} {z1} ss<spx fc = subst (λ k → (z1 ≡ k) ∨ (z1 << k)) (trans (cong supf0 b) (sym (sf1=sf0 o≤-refl))) | |
987 ( ChainP.order is-sup (subst₂ (λ j k → j o< k) (sf1=sf0 s≤px) zc19 ss<spx) (fcup fc s≤px) ) where | |
988 zc19 : supf1 px ≡ supf0 u | |
989 zc19 = trans (sf1=sf0 o≤-refl) (cong supf0 (sym b)) | |
990 s≤px : s o≤ px | |
991 s≤px = o<→≤ (supf-inject0 supf1-mono ss<spx) | |
992 ... | tri> ¬a ¬b c | _ = ⊥-elim ( ¬p<x<op ⟪ c , o<→≤ u<x ⟫ ) | |
993 zc12 {z} (case2 fc) = zc21 fc where | |
994 zc21 : {z1 : Ordinal } → FClosure A f (supf0 px) z1 → odef (UnionCF A f mf ay supf1 x) z1 | |
995 zc21 {z1} (fsuc z2 fc ) with zc21 fc | |
996 ... | ⟪ ua1 , ch-init fc₁ ⟫ = ⟪ proj2 ( mf _ ua1) , ch-init (fsuc _ fc₁) ⟫ | |
997 ... | ⟪ 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₁) ⟫ | |
905 | 998 zc21 (init asp refl ) with osuc-≡< ( subst (λ k → supf0 px o< k ) (sym (Oprev.oprev=x op)) sfpx<x ) |
999 ... | case1 sfpx=px = ⟪ asp , ch-is-sup px (pxo<x op) | |
1000 record {fcy<sup = zc13 ; order = zc17 ; supu=u = zc15 } zc14 ⟫ where | |
1001 zc15 : supf1 px ≡ px | |
1002 zc15 = trans (sf1=sf0 o≤-refl ) (sfpx=px) | |
1003 zc14 : FClosure A f (supf1 px) (supf0 px) | |
1004 zc14 = init (subst (λ k → odef A k) (sym (sf1=sf0 o≤-refl)) asp) (sf1=sf0 o≤-refl) | |
1005 zc13 : {z : Ordinal } → FClosure A f y z → (z ≡ supf1 px ) ∨ ( z << supf1 px ) | |
1006 zc13 {z} fc = subst (λ k → (z ≡ k) ∨ ( z << k )) (sym (sf1=sf0 o≤-refl)) ( ZChain.fcy<sup zc o≤-refl fc ) | |
1007 zc17 : {s : Ordinal} {z1 : Ordinal} → supf1 s o< supf1 px → | |
1008 FClosure A f (supf1 s) z1 → (z1 ≡ supf1 px) ∨ (z1 << supf1 px) | |
1009 zc17 {s} {z1} ss<spx fc = subst (λ k → (z1 ≡ k) ∨ (z1 << k )) mins-is-spx | |
1010 (MinSUP.x<sup mins (csupf17 (fcup fc (o<→≤ s<px) )) ) where | |
1011 mins : MinSUP A (UnionCF A f mf ay supf0 px) | |
1012 mins = ZChain.minsup zc o≤-refl | |
1013 mins-is-spx : MinSUP.sup mins ≡ supf1 px | |
1014 mins-is-spx = trans (sym ( ZChain.supf-is-minsup zc o≤-refl ) ) (sym (sf1=sf0 o≤-refl )) | |
1015 s<px : s o< px | |
1016 s<px = supf-inject0 supf1-mono ss<spx | |
1017 sf<px : supf0 s o< px | |
1018 sf<px = subst₂ (λ j k → j o< k ) (sf1=sf0 (o<→≤ s<px)) (trans (sf1=sf0 o≤-refl) (sfpx=px)) ss<spx | |
1019 csupf17 : {z1 : Ordinal } → FClosure A f (supf0 s) z1 → odef (UnionCF A f mf ay supf0 px) z1 | |
1020 csupf17 (init as refl ) = ZChain.csupf zc sf<px | |
1021 csupf17 (fsuc x fc) = ZChain.f-next zc (csupf17 fc) | |
1022 | |
1023 ... | case2 sfp<px with ZChain.csupf zc sfp<px -- odef (UnionCF A f mf ay supf0 px) (supf0 px) | |
1024 ... | ⟪ ua1 , ch-init fc₁ ⟫ = ⟪ ua1 , ch-init fc₁ ⟫ | |
1025 ... | ⟪ ua1 , ch-is-sup u u≤x is-sup fc₁ ⟫ = ⟪ ua1 , ch-is-sup u (ordtrans u≤x px<x) | |
1026 record { fcy<sup = z10 ; order = z11 ; supu=u = z12 } (fcpu fc₁ (o<→≤ u≤x) ) ⟫ where | |
1027 z10 : {z : Ordinal } → FClosure A f y z → (z ≡ supf1 u) ∨ ( z << supf1 u ) | |
1028 z10 {z} fc = subst (λ k → (z ≡ k) ∨ ( z << k )) (sym (sf1=sf0 (o<→≤ u≤x))) (ChainP.fcy<sup is-sup fc) | |
1029 z11 : {s z1 : Ordinal} → (lt : supf1 s o< supf1 u ) → FClosure A f (supf1 s ) z1 | |
1030 → (z1 ≡ supf1 u ) ∨ ( z1 << supf1 u ) | |
1031 z11 {s} {z} lt fc = subst (λ k → (z ≡ k) ∨ ( z << k )) (sym (sf1=sf0 (o<→≤ u≤x))) | |
1032 (ChainP.order is-sup lt0 (fcup fc s≤px )) where | |
1033 s<u : s o< u | |
1034 s<u = supf-inject0 supf1-mono lt | |
1035 s≤px : s o≤ px | |
1036 s≤px = ordtrans s<u (o<→≤ u≤x) | |
1037 lt0 : supf0 s o< supf0 u | |
1038 lt0 = subst₂ (λ j k → j o< k ) (sf1=sf0 s≤px) (sf1=sf0 (o<→≤ u≤x)) lt | |
1039 z12 : supf1 u ≡ u | |
1040 z12 = trans (sf1=sf0 (o<→≤ u≤x)) (ChainP.supu=u is-sup) | |
1041 | |
903 | 1042 |
1043 | |
885 | 1044 record STMP {z : Ordinal} (z≤x : z o≤ x ) : Set (Level.suc n) where |
1045 field | |
907 | 1046 tsup : MinSUP A (UnionCF A f mf ay supf1 z) |
885 | 1047 tsup=sup : supf1 z ≡ MinSUP.sup tsup |
1048 | |
1049 sup : {z : Ordinal} → (z≤x : z o≤ x ) → STMP z≤x | |
1050 sup {z} z≤x with trio< z px | |
1051 ... | tri< a ¬b ¬c = record { tsup = record { sup = MinSUP.sup m ; asm = MinSUP.asm m | |
907 | 1052 ; x<sup = ms00 ; minsup = ms01 } ; tsup=sup = trans (sf1=sf0 (o<→≤ a) ) (ZChain.supf-is-minsup zc (o<→≤ a)) } where |
885 | 1053 m = ZChain.minsup zc (o<→≤ a) |
907 | 1054 ms00 : {x : Ordinal} → odef (UnionCF A f mf ay supf1 z) x → (x ≡ MinSUP.sup m) ∨ (x << MinSUP.sup m) |
1055 ms00 {x} ux = MinSUP.x<sup m ? | |
1056 ms01 : {sup2 : Ordinal} → odef A sup2 → ({x : Ordinal} → | |
1057 odef (UnionCF A f mf ay supf1 z) x → (x ≡ sup2) ∨ (x << sup2)) → MinSUP.sup m o≤ sup2 | |
1058 ms01 {sup2} us P = MinSUP.minsup m ? ? | |
885 | 1059 ... | tri≈ ¬a b ¬c = record { tsup = record { sup = MinSUP.sup m ; asm = MinSUP.asm m |
907 | 1060 ; x<sup = ms00 ; minsup = ms01 } ; tsup=sup = trans (sf1=sf0 (o≤-refl0 b) ) (ZChain.supf-is-minsup zc (o≤-refl0 b)) } where |
885 | 1061 m = ZChain.minsup zc (o≤-refl0 b) |
907 | 1062 ms00 : {x : Ordinal} → odef (UnionCF A f mf ay supf1 z) x → (x ≡ MinSUP.sup m) ∨ (x << MinSUP.sup m) |
1063 ms00 {x} ux = MinSUP.x<sup m ? | |
1064 ms01 : {sup2 : Ordinal} → odef A sup2 → ({x : Ordinal} → | |
1065 odef (UnionCF A f mf ay supf1 z) x → (x ≡ sup2) ∨ (x << sup2)) → MinSUP.sup m o≤ sup2 | |
1066 ms01 {sup2} us P = MinSUP.minsup m ? ? | |
901 | 1067 ... | tri> ¬a ¬b px<z = record { tsup = record { sup = sp1 ; asm = MinSUP.asm sup1 |
907 | 1068 ; x<sup = ms00 ; minsup = ms01 } ; tsup=sup = sf1=sp1 px<z } where |
1069 m = sup1 | |
1070 ms00 : {x : Ordinal} → odef (UnionCF A f mf ay supf1 z) x → (x ≡ MinSUP.sup m) ∨ (x << MinSUP.sup m) | |
1071 ms00 {x} ux = MinSUP.x<sup m ? | |
1072 ms01 : {sup2 : Ordinal} → odef A sup2 → ({x : Ordinal} → | |
1073 odef (UnionCF A f mf ay supf1 z) x → (x ≡ sup2) ∨ (x << sup2)) → MinSUP.sup m o≤ sup2 | |
1074 ms01 {sup2} us P = MinSUP.minsup m ? ? | |
885 | 1075 |
887 | 1076 csupf1 : {z1 : Ordinal } → supf1 z1 o< x → odef (UnionCF A f mf ay supf1 x) (supf1 z1) |
906 | 1077 csupf1 {z1} sz1<x = csupf2 where |
1078 -- z1 o< px → supf1 z1 ≡ supf0 z1 | |
1079 -- z1 ≡ px , supf0 px o< px .. px o< z1, x o≤ z1 ... supf1 z1 ≡ sp1 | |
1080 -- z1 ≡ px , supf0 px ≡ px | |
1081 psz1≤px : supf1 z1 o≤ px | |
918
4c33f8383d7d
supf px o< px is in csupf
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
911
diff
changeset
|
1082 psz1≤px = subst (λ k → supf1 z1 o< k ) (sym opx=x) sz1<x |
906 | 1083 csupf2 : odef (UnionCF A f mf ay supf1 x) (supf1 z1) |
907 | 1084 csupf2 with trio< z1 px | inspect supf1 z1 |
1085 csupf2 | tri< a ¬b ¬c | record { eq = eq1 } with osuc-≡< psz1≤px | |
909 | 1086 ... | case2 lt = zc12 (case1 cs03) where |
1087 cs03 : odef (UnionCF A f mf ay supf0 px) (supf0 z1) | |
1088 cs03 = ZChain.csupf zc (subst (λ k → k o< px) (sf1=sf0 (o<→≤ a)) lt ) | |
910 | 1089 ... | case1 sfz=px with osuc-≡< ( supf1-mono (o<→≤ a) ) |
1090 ... | case1 sfz=sfpx = zc12 (case2 (init (ZChain.asupf zc) cs04 )) where | |
1091 supu=u : supf1 (supf1 z1) ≡ supf1 z1 | |
1092 supu=u = trans (cong supf1 sfz=px) (sym sfz=sfpx) | |
1093 cs04 : supf0 px ≡ supf0 z1 | |
1094 cs04 = begin | |
911 | 1095 supf0 px ≡⟨ sym (sf1=sf0 o≤-refl) ⟩ |
1096 supf1 px ≡⟨ sym sfz=sfpx ⟩ | |
1097 supf1 z1 ≡⟨ sf1=sf0 (o<→≤ a) ⟩ | |
1098 supf0 z1 ∎ where open ≡-Reasoning | |
918
4c33f8383d7d
supf px o< px is in csupf
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
911
diff
changeset
|
1099 ... | case2 sfz<sfpx = ⊥-elim ( ¬p<x<op ⟪ cs05 , cs06 ⟫ ) where |
4c33f8383d7d
supf px o< px is in csupf
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
911
diff
changeset
|
1100 --- supf1 z1 ≡ px , z1 o< px , px ≡ supf0 z1 o< supf0 px o< x |
4c33f8383d7d
supf px o< px is in csupf
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
911
diff
changeset
|
1101 cs05 : px o< supf0 px |
4c33f8383d7d
supf px o< px is in csupf
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
911
diff
changeset
|
1102 cs05 = subst₂ ( λ j k → j o< k ) sfz=px (sf1=sf0 o≤-refl ) sfz<sfpx |
4c33f8383d7d
supf px o< px is in csupf
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
911
diff
changeset
|
1103 cs06 : supf0 px o< osuc px |
4c33f8383d7d
supf px o< px is in csupf
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
911
diff
changeset
|
1104 cs06 = subst (λ k → supf0 px o< k ) (sym opx=x) sfpx<x |
909 | 1105 csupf2 | tri≈ ¬a b ¬c | record { eq = eq1 } = zc12 (case2 (init (ZChain.asupf zc) (cong supf0 (sym b)))) |
918
4c33f8383d7d
supf px o< px is in csupf
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
911
diff
changeset
|
1106 csupf2 | tri> ¬a ¬b px<z1 | record { eq = eq1 } = ? -- ⊥-elim ( ¬p<x<op ⟪ px<z1 , subst (λ k → z1 o< k) (sym opx=x) z1<x ⟫ ) |
4c33f8383d7d
supf px o< px is in csupf
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
911
diff
changeset
|
1107 |
877 | 1108 |
904 | 1109 zc4 : ZChain A f mf ay x --- x o≤ supf px |
901 | 1110 zc4 with trio< x (supf0 px) |
904 | 1111 ... | tri> ¬a ¬b c = zc41 c |
1112 ... | tri≈ ¬a b ¬c = ? | |
901 | 1113 ... | tri< a ¬b ¬c = record { supf = supf0 ; sup=u = ? ; asupf = ? ; supf-mono = ? ; supf-< = ? |
1114 ; supfmax = ? ; minsup = ? ; supf-is-minsup = ? ; csupf = ? } where | |
883 | 1115 |
901 | 1116 -- supf0 px not is included by the chain |
1117 -- supf1 x ≡ supf0 px because of supfmax | |
883 | 1118 |
872 | 1119 supf1 : Ordinal → Ordinal |
1120 supf1 z with trio< z px | |
871 | 1121 ... | tri< a ¬b ¬c = supf0 z |
872 | 1122 ... | tri≈ ¬a b ¬c = supf0 px |
871 | 1123 ... | tri> ¬a ¬b c = supf0 px |
1124 | |
886 | 1125 sf1=sf0 : {z : Ordinal } → z o< px → supf1 z ≡ supf0 z |
1126 sf1=sf0 {z} z<px with trio< z px | |
874 | 1127 ... | tri< a ¬b ¬c = refl |
1128 ... | tri≈ ¬a b ¬c = ⊥-elim ( ¬a z<px ) | |
1129 ... | tri> ¬a ¬b c = ⊥-elim ( ¬a z<px ) | |
1130 | |
1131 zc17 : {z : Ordinal } → supf0 z o≤ supf0 px | |
1132 zc17 = ? -- px o< z, px o< supf0 px | |
1133 | |
1134 supf-mono1 : {z w : Ordinal } → z o≤ w → supf1 z o≤ supf1 w | |
1135 supf-mono1 {z} {w} z≤w with trio< w px | |
886 | 1136 ... | tri< a ¬b ¬c = subst₂ (λ j k → j o≤ k ) (sym (sf1=sf0 (ordtrans≤-< z≤w a))) refl ( supf-mono z≤w ) |
874 | 1137 ... | tri≈ ¬a refl ¬c with trio< z px |
1138 ... | tri< a ¬b ¬c = zc17 | |
1139 ... | tri≈ ¬a refl ¬c = o≤-refl | |
1140 ... | tri> ¬a ¬b c = o≤-refl | |
1141 supf-mono1 {z} {w} z≤w | tri> ¬a ¬b c with trio< z px | |
1142 ... | tri< a ¬b ¬c = zc17 | |
1143 ... | tri≈ ¬a b ¬c = o≤-refl | |
1144 ... | tri> ¬a ¬b c = o≤-refl | |
1145 | |
872 | 1146 pchain1 : HOD |
1147 pchain1 = UnionCF A f mf ay supf1 x | |
871 | 1148 |
863 | 1149 zc10 : {z : Ordinal} → OD.def (od pchain) z → OD.def (od pchain1) z |
1150 zc10 {z} ⟪ az , ch-init fc ⟫ = ⟪ az , ch-init fc ⟫ | |
894 | 1151 zc10 {z} ⟪ az , ch-is-sup u1 u1<x u1-is-sup fc ⟫ = ⟪ az , ch-is-sup u1 ? ? ? ⟫ |
873 | 1152 |
1153 zc111 : {z : Ordinal} → z o< px → OD.def (od pchain1) z → OD.def (od pchain) z | |
1154 zc111 {z} z<px ⟪ az , ch-init fc ⟫ = ⟪ az , ch-init fc ⟫ | |
894 | 1155 zc111 {z} z<px ⟪ az , ch-is-sup u1 u1<x u1-is-sup fc ⟫ = ⟪ az , ch-is-sup u1 ? ? ? ⟫ |
873 | 1156 |
863 | 1157 zc11 : (¬ xSUP (UnionCF A f mf ay supf0 px) x ) ∨ (HasPrev A pchain x f ) |
864 | 1158 → {z : Ordinal} → OD.def (od pchain1) z → OD.def (od pchain) z ∨ ( (supf0 px ≡ px) ∧ FClosure A f px z ) |
863 | 1159 zc11 P {z} ⟪ az , ch-init fc ⟫ = case1 ⟪ az , ch-init fc ⟫ |
1160 zc11 P {z} ⟪ az , ch-is-sup u1 u1<x u1-is-sup fc ⟫ with trio< u1 px | |
890 | 1161 ... | tri< u1<px ¬b ¬c = case1 ⟪ az , ch-is-sup u1 ? ? fc ⟫ |
872 | 1162 ... | tri≈ ¬a eq ¬c = case2 ⟪ subst (λ k → supf0 k ≡ k) eq s1u=u , subst (λ k → FClosure A f k z) zc12 ? ⟫ where |
863 | 1163 s1u=u : supf0 u1 ≡ u1 |
872 | 1164 s1u=u = ? -- ChainP.supu=u u1-is-sup |
864 | 1165 zc12 : supf0 u1 ≡ px |
872 | 1166 zc12 = trans s1u=u eq |
863 | 1167 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 |
1168 eq : u1 ≡ x | |
1169 eq with trio< u1 x | |
1170 ... | tri< a ¬b ¬c = ⊥-elim ( ¬p<x<op ⟪ px<u , subst (λ k → u1 o< k ) (sym (Oprev.oprev=x op )) a ⟫ ) | |
1171 ... | tri≈ ¬a b ¬c = b | |
890 | 1172 ... | tri> ¬a ¬b c = ⊥-elim ( o<> u1<x ? ) |
863 | 1173 s1u=x : supf0 u1 ≡ x |
872 | 1174 s1u=x = trans ? eq |
863 | 1175 zc13 : osuc px o< osuc u1 |
1176 zc13 = o≤-refl0 ( trans (Oprev.oprev=x op) (sym eq ) ) | |
1177 x<sup : {w : Ordinal} → odef (UnionCF A f mf ay supf0 px) w → (w ≡ x) ∨ (w << x) | |
872 | 1178 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
|
1179 x<sup {w} ⟪ az , ch-is-sup u u≤x is-sup fc ⟫ with osuc-≡< ( supf-mono (ordtrans (o<→≤ u≤x) ? )) |
890 | 1180 ... | case1 eq1 = ⊥-elim ( o<¬≡ zc14 ? ) where |
851 | 1181 zc14 : u ≡ osuc px |
1182 zc14 = begin | |
1183 u ≡⟨ sym ( ChainP.supu=u is-sup) ⟩ | |
894 | 1184 supf0 u ≡⟨ ? ⟩ |
857 | 1185 supf0 u1 ≡⟨ s1u=x ⟩ |
851 | 1186 x ≡⟨ sym (Oprev.oprev=x op) ⟩ |
1187 osuc px ∎ where open ≡-Reasoning | |
872 | 1188 ... | case2 lt = subst (λ k → (w ≡ k) ∨ (w << k)) s1u=x ? |
863 | 1189 zc12 : supf0 x ≡ u1 |
872 | 1190 zc12 = subst (λ k → supf0 k ≡ u1) eq ? |
863 | 1191 zcsup : xSUP (UnionCF A f mf ay supf0 px) x |
868 | 1192 zcsup = record { ax = subst (λ k → odef A k) (trans zc12 eq) (ZChain.asupf zc) |
851 | 1193 ; is-sup = record { x<sup = x<sup } } |
872 | 1194 zc11 (case2 hp) {z} ⟪ az , ch-is-sup u1 u1<x u1-is-sup fc ⟫ | tri> ¬a ¬b px<u = case1 ? where |
863 | 1195 eq : u1 ≡ x |
864 | 1196 eq with trio< u1 x |
1197 ... | tri< a ¬b ¬c = ⊥-elim ( ¬p<x<op ⟪ px<u , subst (λ k → u1 o< k ) (sym (Oprev.oprev=x op )) a ⟫ ) | |
1198 ... | tri≈ ¬a b ¬c = b | |
890 | 1199 ... | tri> ¬a ¬b c = ⊥-elim ( o<> u1<x ? ) |
858 | 1200 zc20 : {z : Ordinal} → FClosure A f (supf0 u1) z → OD.def (od pchain) z |
1201 zc20 {z} (init asu su=z ) = zc13 where | |
1202 zc14 : x ≡ z | |
1203 zc14 = begin | |
1204 x ≡⟨ sym eq ⟩ | |
872 | 1205 u1 ≡⟨ sym ? ⟩ |
858 | 1206 supf0 u1 ≡⟨ su=z ⟩ |
1207 z ∎ where open ≡-Reasoning | |
1208 zc13 : odef pchain z | |
1209 zc13 = subst (λ k → odef pchain k) (trans (sym (HasPrev.x=fy hp)) zc14) ( ZChain.f-next zc (HasPrev.ay hp) ) | |
1210 zc20 {.(f w)} (fsuc w fc) = ZChain.f-next zc (zc20 fc) | |
891 | 1211 |
857 | 1212 record STMP {z : Ordinal} (z≤x : z o≤ x ) : Set (Level.suc n) where |
1213 field | |
891 | 1214 tsup : MinSUP A (UnionCF A f mf ay supf1 z) |
1215 tsup=sup : supf1 z ≡ MinSUP.sup tsup | |
1216 | |
857 | 1217 sup : {z : Ordinal} → (z≤x : z o≤ x ) → STMP z≤x |
1218 sup {z} z≤x with trio< z px | |
891 | 1219 ... | tri< a ¬b ¬c = ? -- jrecord { tsup = ZChain.minsup zc (o<→≤ a) ; tsup=sup = ZChain.supf-is-minsup zc (o<→≤ a) } |
1220 ... | tri≈ ¬a b ¬c = ? -- record { tsup = ZChain.minsup zc (o≤-refl0 b) ; tsup=sup = ZChain.supf-is-minsup zc (o≤-refl0 b) } | |
865 | 1221 ... | tri> ¬a ¬b px<z = zc35 where |
840 | 1222 zc30 : z ≡ x |
1223 zc30 with osuc-≡< z≤x | |
1224 ... | case1 eq = eq | |
1225 ... | case2 z<x = ⊥-elim (¬p<x<op ⟪ px<z , subst (λ k → z o< k ) (sym (Oprev.oprev=x op)) z<x ⟫ ) | |
865 | 1226 zc32 = ZChain.sup zc o≤-refl |
1227 zc34 : ¬ (supf0 px ≡ px) → {w : HOD} → UnionCF A f mf ay supf0 z ∋ w → (w ≡ SUP.sup zc32) ∨ (w < SUP.sup zc32) | |
882 | 1228 zc34 ne {w} lt with zc11 ? ⟪ proj1 lt , ? ⟫ |
864 | 1229 ... | case1 lt = SUP.x<sup zc32 lt |
865 | 1230 ... | case2 ⟪ spx=px , fc ⟫ = ⊥-elim ( ne spx=px ) |
857 | 1231 zc33 : supf0 z ≡ & (SUP.sup zc32) |
891 | 1232 zc33 = ? -- trans (sym (supfx (o≤-refl0 (sym zc30)))) ( ZChain.supf-is-minsup zc o≤-refl ) |
865 | 1233 zc36 : ¬ (supf0 px ≡ px) → STMP z≤x |
891 | 1234 zc36 ne = ? -- record { tsup = record { sup = SUP.sup zc32 ; as = SUP.as zc32 ; x<sup = zc34 ne } ; tsup=sup = zc33 } |
865 | 1235 zc35 : STMP z≤x |
1236 zc35 with trio< (supf0 px) px | |
1237 ... | tri< a ¬b ¬c = zc36 ¬b | |
1238 ... | tri> ¬a ¬b c = zc36 ¬b | |
891 | 1239 ... | tri≈ ¬a b ¬c = record { tsup = ? ; tsup=sup = ? } where |
1240 zc37 : MinSUP A (UnionCF A f mf ay supf0 z) | |
1241 zc37 = record { sup = ? ; asm = ? ; x<sup = ? } | |
803 | 1242 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
|
1243 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 | 1244 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
|
1245 ... | 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
|
1246 ... | 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 | 1247 ... | tri> ¬a ¬b px<b = zc31 ? where |
815 | 1248 zc30 : x ≡ b |
1249 zc30 with osuc-≡< b≤x | |
1250 ... | case1 eq = sym (eq) | |
1251 ... | case2 b<x = ⊥-elim (¬p<x<op ⟪ px<b , subst (λ k → b o< k ) (sym (Oprev.oprev=x op)) b<x ⟫ ) | |
859 | 1252 zcsup : xSUP (UnionCF A f mf ay supf0 px) x |
1253 zcsup with zc30 | |
1254 ... | refl = record { ax = ab ; is-sup = record { x<sup = λ {w} lt → | |
872 | 1255 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
|
1256 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
|
1257 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
|
1258 ... | refl = ⊥-elim (¬sp=x zcsup ) |
105f8d6c51fb
no-extension on immidate ordinal passed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
859
diff
changeset
|
1259 zc31 (case2 hasPrev ) with zc30 |
863 | 1260 ... | refl = ⊥-elim ( proj2 is-sup record { ax = HasPrev.ax hasPrev ; y = HasPrev.y hasPrev |
872 | 1261 ; ay = ? ; x=fy = HasPrev.x=fy hasPrev } ) |
833 | 1262 |
728 | 1263 ... | no lim = zc5 where |
726
b2e2cd12e38f
psupf-mono and is-max conflict
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
725
diff
changeset
|
1264 |
703 | 1265 pzc : (z : Ordinal) → z o< x → ZChain A f mf ay z |
1266 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
|
1267 |
835 | 1268 ysp = & (SUP.sup (ysup f mf ay)) |
755 | 1269 |
835 | 1270 supf0 : Ordinal → Ordinal |
1271 supf0 z with trio< z x | |
1272 ... | tri< a ¬b ¬c = ZChain.supf (pzc (osuc z) (ob<x lim a)) z | |
836 | 1273 ... | tri≈ ¬a b ¬c = ysp |
1274 ... | tri> ¬a ¬b c = ysp | |
835 | 1275 |
838 | 1276 pchain : HOD |
1277 pchain = UnionCF A f mf ay supf0 x | |
835 | 1278 |
838 | 1279 ptotal0 : IsTotalOrderSet pchain |
835 | 1280 ptotal0 {a} {b} ca cb = subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso uz01 where |
1281 uz01 : Tri (* (& a) < * (& b)) (* (& a) ≡ * (& b)) (* (& b) < * (& a) ) | |
1282 uz01 = chain-total A f mf ay supf0 ( (proj2 ca)) ( (proj2 cb)) | |
844 | 1283 |
880 | 1284 usup : MinSUP A pchain |
1285 usup = minsupP pchain (λ lt → proj1 lt) ptotal0 | |
1286 spu = MinSUP.sup usup | |
834 | 1287 |
794 | 1288 supf1 : Ordinal → Ordinal |
835 | 1289 supf1 z with trio< z x |
1290 ... | tri< a ¬b ¬c = ZChain.supf (pzc (osuc z) (ob<x lim a)) z | |
836 | 1291 ... | tri≈ ¬a b ¬c = spu |
1292 ... | tri> ¬a ¬b c = spu | |
755 | 1293 |
838 | 1294 pchain1 : HOD |
1295 pchain1 = UnionCF A f mf ay supf1 x | |
704 | 1296 |
758
a2947dfff80d
is-max on first transfinite induction is not good
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
757
diff
changeset
|
1297 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
|
1298 b o< x → (ab : odef A b) → |
836 | 1299 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
|
1300 * 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
|
1301 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
|
1302 ... | ⟪ ab0 , ch-init fc ⟫ = ⟪ ab , ch-init ( subst (λ k → FClosure A f y k) (sym (HasPrev.x=fy has-prev)) (fsuc _ fc )) ⟫ |
890 | 1303 ... | ⟪ ab0 , ch-is-sup u u≤x is-sup fc ⟫ = ? -- ⟪ ab , |
1304 -- subst (λ k → UChain A f mf ay supf x k ) | |
1305 -- (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
|
1306 |
844 | 1307 zc70 : HasPrev A pchain x f → ¬ xSUP pchain x |
1308 zc70 pr xsup = ? | |
1309 | |
1310 no-extension : ¬ ( xSUP (UnionCF A f mf ay supf0 x) x ) → ZChain A f mf ay x | |
879 | 1311 no-extension ¬sp=x = ? where -- record { supf = supf1 ; sup=u = sup=u |
1312 -- ; 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
|
1313 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
|
1314 supfu {u} a z = ZChain.supf (pzc (osuc u) (ob<x lim a)) z |
838 | 1315 pchain0=1 : pchain ≡ pchain1 |
1316 pchain0=1 = ==→o≡ record { eq→ = zc10 ; eq← = zc11 } where | |
1317 zc10 : {z : Ordinal} → OD.def (od pchain) z → OD.def (od pchain1) z | |
1318 zc10 {z} ⟪ az , ch-init fc ⟫ = ⟪ az , ch-init fc ⟫ | |
1319 zc10 {z} ⟪ az , ch-is-sup u u≤x is-sup fc ⟫ = zc12 fc where | |
1320 zc12 : {z : Ordinal} → FClosure A f (supf0 u) z → odef pchain1 z | |
1321 zc12 (fsuc x fc) with zc12 fc | |
1322 ... | ⟪ ua1 , ch-init fc₁ ⟫ = ⟪ proj2 ( mf _ ua1) , ch-init (fsuc _ fc₁) ⟫ | |
1323 ... | ⟪ ua1 , ch-is-sup u u≤x is-sup fc₁ ⟫ = ⟪ proj2 ( mf _ ua1) , ch-is-sup u u≤x is-sup (fsuc _ fc₁) ⟫ | |
890 | 1324 zc12 (init asu su=z ) = ⟪ subst (λ k → odef A k) su=z asu , ch-is-sup u ? ? (init ? ? ) ⟫ |
838 | 1325 zc11 : {z : Ordinal} → OD.def (od pchain1) z → OD.def (od pchain) z |
1326 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
|
1327 zc11 {z} ⟪ az , ch-is-sup u u≤x is-sup fc ⟫ = zc13 fc where |
838 | 1328 zc13 : {z : Ordinal} → FClosure A f (supf1 u) z → odef pchain z |
1329 zc13 (fsuc x fc) with zc13 fc | |
1330 ... | ⟪ 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
|
1331 ... | ⟪ ua1 , ch-is-sup u u≤x is-sup fc₁ ⟫ = ⟪ proj2 ( mf _ ua1) , ch-is-sup u u≤x is-sup (fsuc _ fc₁) ⟫ |
838 | 1332 zc13 (init asu su=z ) with trio< u x |
890 | 1333 ... | tri< a ¬b ¬c = ⟪ ? , ch-is-sup u ? ? (init ? ? ) ⟫ |
838 | 1334 ... | 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
|
1335 ... | tri> ¬a ¬b c = ? -- ⊥-elim ( o≤> u≤x c ) |
832 | 1336 sup : {z : Ordinal} → z o≤ x → SUP A (UnionCF A f mf ay supf1 z) |
797 | 1337 sup {z} z≤x with trio< z x |
838 | 1338 ... | tri< a ¬b ¬c = SUP⊆ ? (ZChain.sup (pzc (osuc z) {!!}) {!!} ) |
815 | 1339 ... | tri≈ ¬a b ¬c = {!!} |
843 | 1340 ... | tri> ¬a ¬b x<z = ⊥-elim (o<¬≡ refl (ordtrans<-≤ x<z z≤x )) |
832 | 1341 sis : {z : Ordinal} (x≤z : z o≤ x) → supf1 z ≡ & (SUP.sup (sup {!!})) |
843 | 1342 sis {z} z≤x with trio< z x |
800 | 1343 ... | tri< a ¬b ¬c = {!!} where |
891 | 1344 zc8 = ZChain.supf-is-minsup (pzc z a) {!!} |
815 | 1345 ... | tri≈ ¬a b ¬c = {!!} |
843 | 1346 ... | 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
|
1347 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 | 1348 sup=u {z} ab z≤x is-sup with trio< z x |
833 | 1349 ... | tri< a ¬b ¬c = ? -- ZChain.sup=u (pzc (osuc b) (ob<x lim a)) ab {!!} record { x<sup = {!!} } |
815 | 1350 ... | tri≈ ¬a b ¬c = {!!} -- ZChain.sup=u (pzc (osuc ?) ?) ab {!!} record { x<sup = {!!} } |
843 | 1351 ... | tri> ¬a ¬b x<z = ⊥-elim (o<¬≡ refl (ordtrans<-≤ x<z z≤x )) |
797 | 1352 |
703 | 1353 zc5 : ZChain A f mf ay x |
697 | 1354 zc5 with ODC.∋-p O A (* x) |
796 | 1355 ... | no noax = no-extension {!!} -- ¬ A ∋ p, just skip |
836 | 1356 ... | yes ax with ODC.p∨¬p O ( HasPrev A pchain x f ) |
703 | 1357 -- we have to check adding x preserve is-max ZChain A y f mf x |
796 | 1358 ... | case1 pr = no-extension {!!} |
704 | 1359 ... | case2 ¬fy<x with ODC.p∨¬p O (IsSup A pchain ax ) |
879 | 1360 ... | case1 is-sup = ? -- record { supf = supf1 ; sup=u = {!!} |
1361 -- ; sup = {!!} ; supf-is-sup = {!!} ; supf-mono = {!!}; asupf = {!!} } -- where -- x is a sup of (zc ?) | |
796 | 1362 ... | case2 ¬x=sup = no-extension {!!} -- x is not f y' nor sup of former ZChain from y -- no extention |
553 | 1363 |
703 | 1364 SZ : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) → {y : Ordinal} (ay : odef A y) → ZChain A f mf ay (& A) |
1365 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
|
1366 |
551 | 1367 zorn00 : Maximal A |
1368 zorn00 with is-o∅ ( & HasMaximal ) -- we have no Level (suc n) LEM | |
804 | 1369 ... | no not = record { maximal = ODC.minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) ; as = zorn01 ; ¬maximal<x = zorn02 } where |
551 | 1370 -- yes we have the maximal |
1371 zorn03 : odef HasMaximal ( & ( ODC.minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) ) ) | |
606 | 1372 zorn03 = ODC.x∋minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) -- Axiom of choice |
551 | 1373 zorn01 : A ∋ ODC.minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) |
1374 zorn01 = proj1 zorn03 | |
1375 zorn02 : {x : HOD} → A ∋ x → ¬ (ODC.minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) < x) | |
1376 zorn02 {x} ax m<x = proj2 zorn03 (& x) ax (subst₂ (λ j k → j < k) (sym *iso) (sym *iso) m<x ) | |
877 | 1377 ... | yes ¬Maximal = ⊥-elim ( z04 nmx zorn04 ) where |
551 | 1378 -- if we have no maximal, make ZChain, which contradict SUP condition |
1379 nmx : ¬ Maximal A | |
1380 nmx mx = ∅< {HasMaximal} zc5 ( ≡o∅→=od∅ ¬Maximal ) where | |
1381 zc5 : odef A (& (Maximal.maximal mx)) ∧ (( y : Ordinal ) → odef A y → ¬ (* (& (Maximal.maximal mx)) < * y)) | |
804 | 1382 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 | 1383 zorn04 : ZChain A (cf nmx) (cf-is-≤-monotonic nmx) as0 (& A) |
653 | 1384 zorn04 = SZ (cf nmx) (cf-is-≤-monotonic nmx) (subst (λ k → odef A k ) &iso as ) |
551 | 1385 |
516 | 1386 -- usage (see filter.agda ) |
1387 -- | |
497 | 1388 -- _⊆'_ : ( A B : HOD ) → Set n |
1389 -- _⊆'_ A B = (x : Ordinal ) → odef A x → odef B x | |
482 | 1390 |
497 | 1391 -- MaximumSubset : {L P : HOD} |
1392 -- → o∅ o< & L → o∅ o< & P → P ⊆ L | |
1393 -- → IsPartialOrderSet P _⊆'_ | |
1394 -- → ( (B : HOD) → B ⊆ P → IsTotalOrderSet B _⊆'_ → SUP P B _⊆'_ ) | |
1395 -- → Maximal P (_⊆'_) | |
1396 -- MaximumSubset {L} {P} 0<L 0<P P⊆L PO SP = Zorn-lemma {P} {_⊆'_} 0<P PO SP |