Mercurial > hg > Members > kono > Proof > ZF-in-agda
annotate src/zorn1.agda @ 931:307ad8807963
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 24 Oct 2022 04:30:41 +0900 |
parents | 0e0608b1953b |
children | b1899e33e2c7 |
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 |
930 | 8 module zorn1 {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 | |
919 | 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 |
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 ) |
919 | 389 (supf-mono : {x y : Ordinal } → x o≤ y → supf x o≤ supf y ) {a b c : Ordinal} → a o≤ b |
908
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 |
919 | 391 chain-mono f mf ay supf supf-mono {a} {b} {c} a≤b ⟪ ua , ch-init fc ⟫ = |
908
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 ⟫ |
919 | 393 chain-mono f mf ay supf supf-mono {a} {b} {c} a≤b ⟪ uaa , ch-is-sup ua ua<x is-sup fc ⟫ = |
394 ⟪ uaa , ch-is-sup ua (ordtrans<-≤ ua<x (supf-mono a≤b ) ) is-sup fc ⟫ | |
908
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 |
919 | 463 is-max : {a b : Ordinal } → (ca : odef (UnionCF A f mf ay supf z) a ) → supf b o< supf 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 |
803 | 575 -- |
576 -- Second TransFinite Pass for maximality | |
577 -- | |
578 | |
793 | 579 SZ1 : ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) |
728 | 580 {init : Ordinal} (ay : odef A init) (zc : ZChain A f mf ay (& A)) (x : Ordinal) → ZChain1 A f mf ay zc x |
930 | 581 SZ1 f mf {y} ay zc x = ? |
727 | 582 |
757 | 583 uchain : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) → HOD |
584 uchain f mf {y} ay = record { od = record { def = λ x → FClosure A f y x } ; odmax = & A ; <odmax = | |
585 λ {z} cz → subst (λ k → k o< & A) &iso ( c<→o< (subst (λ k → odef A k ) (sym &iso ) (A∋fc y f mf cz ))) } | |
586 | |
587 utotal : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) | |
588 → IsTotalOrderSet (uchain f mf ay) | |
589 utotal f mf {y} ay {a} {b} ca cb = subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso uz01 where | |
590 uz01 : Tri (* (& a) < * (& b)) (* (& a) ≡ * (& b)) (* (& b) < * (& a) ) | |
591 uz01 = fcn-cmp y f mf ca cb | |
592 | |
593 ysup : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) | |
928 | 594 → MinSUP A (uchain f mf ay) |
595 ysup f mf {y} ay = minsupP (uchain f mf ay) (λ lt → A∋fc y f mf lt) (utotal f mf ay) | |
757 | 596 |
793 | 597 SUP⊆ : { B C : HOD } → B ⊆' C → SUP A C → SUP A B |
804 | 598 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 | 599 |
833 | 600 record xSUP (B : HOD) (x : Ordinal) : Set n where |
601 field | |
602 ax : odef A x | |
603 is-sup : IsSup A B ax | |
604 | |
560 | 605 -- |
547 | 606 -- create all ZChains under o< x |
560 | 607 -- |
608
6655f03984f9
mutual tranfinite in zorn
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
607
diff
changeset
|
608 |
674 | 609 ind : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) → (x : Ordinal) |
703 | 610 → ((z : Ordinal) → z o< x → ZChain A f mf ay z) → ZChain A f mf ay x |
930 | 611 ind f mf {y} ay x prev = ? |
553 | 612 |
921 | 613 --- |
614 --- the maximum chain has fix point of any ≤-monotonic function | |
615 --- | |
616 | |
617 SZ : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) → {y : Ordinal} (ay : odef A y) → (x : Ordinal) → ZChain A f mf ay x | |
618 SZ f mf {y} ay x = TransFinite {λ z → ZChain A f mf ay z } (λ x → ind f mf ay x ) x | |
619 | |
923
85f6238a38db
use supf of zchain for (nmx : ¬ Maximal A ) → ⊥
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
922
diff
changeset
|
620 data ZChainP ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) {y : Ordinal} (ay : odef A y) |
85f6238a38db
use supf of zchain for (nmx : ¬ Maximal A ) → ⊥
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
922
diff
changeset
|
621 ( supf : Ordinal → Ordinal ) (z : Ordinal) : Set n where |
85f6238a38db
use supf of zchain for (nmx : ¬ Maximal A ) → ⊥
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
922
diff
changeset
|
622 zchain : (uz : Ordinal ) → odef (UnionCF A f mf ay supf uz) z → ZChainP f mf ay supf z |
925 | 623 |
624 auzc : ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) {y : Ordinal} (ay : odef A y) | |
625 (supf : Ordinal → Ordinal ) → {x : Ordinal } → ZChainP f mf ay supf x → odef A x | |
626 auzc f mf {y} ay supf {x} (zchain uz ucf) = proj1 ucf | |
627 | |
926 | 628 zp-uz : ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) {y : Ordinal} (ay : odef A y) |
629 (supf : Ordinal → Ordinal ) → {x : Ordinal } → ZChainP f mf ay supf x → Ordinal | |
630 zp-uz f mf ay supf (zchain uz _) = uz | |
631 | |
632 uzc⊆zc : ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) {y : Ordinal} (ay : odef A y) | |
633 (supf : Ordinal → Ordinal ) → {x : Ordinal } → (zp : ZChainP f mf ay supf x ) → UChain A f mf ay supf (zp-uz f mf ay supf zp) x | |
634 uzc⊆zc f mf {y} ay supf {x} (zchain uz ⟪ ua , ch-init fc ⟫) = ch-init fc | |
635 uzc⊆zc f mf {y} ay supf {x} (zchain uz ⟪ ua , ch-is-sup u u<x is-sup fc ⟫) with ChainP.supu=u is-sup | |
636 ... | eq = ch-is-sup u u<x is-sup fc | |
637 | |
923
85f6238a38db
use supf of zchain for (nmx : ¬ Maximal A ) → ⊥
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
922
diff
changeset
|
638 UnionZF : ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) {y : Ordinal} (ay : odef A y) |
85f6238a38db
use supf of zchain for (nmx : ¬ Maximal A ) → ⊥
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
922
diff
changeset
|
639 (supf : Ordinal → Ordinal ) → HOD |
85f6238a38db
use supf of zchain for (nmx : ¬ Maximal A ) → ⊥
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
922
diff
changeset
|
640 UnionZF f mf {y} ay supf = record { od = record { def = λ x → ZChainP f mf ay supf x } |
925 | 641 ; odmax = & A ; <odmax = λ lt → ∈∧P→o< ⟪ auzc f mf ay supf lt , lift true ⟫ } |
921 | 642 |
925 | 643 uzctotal : ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) {y : Ordinal} (ay : odef A y) |
923
85f6238a38db
use supf of zchain for (nmx : ¬ Maximal A ) → ⊥
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
922
diff
changeset
|
644 → ( supf : Ordinal → Ordinal ) |
85f6238a38db
use supf of zchain for (nmx : ¬ Maximal A ) → ⊥
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
922
diff
changeset
|
645 → IsTotalOrderSet (UnionZF f mf ay supf ) |
926 | 646 uzctotal f mf ay supf {a} {b} ca cb = subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso (uz01 ca cb) where |
647 uz01 : {ua ub : Ordinal } → ZChainP f mf ay supf ua → ZChainP f mf ay supf ub | |
648 → Tri (* ua < * ub) (* ua ≡ * ub) (* ub < * ua ) | |
649 uz01 {ua} {ub} (zchain uza uca) (zchain uzb ucb) = chain-total A f mf ay supf (proj2 uca) (proj2 ucb) | |
921 | 650 |
927 | 651 usp0 : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) |
923
85f6238a38db
use supf of zchain for (nmx : ¬ Maximal A ) → ⊥
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
922
diff
changeset
|
652 → ( supf : Ordinal → Ordinal ) |
85f6238a38db
use supf of zchain for (nmx : ¬ Maximal A ) → ⊥
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
922
diff
changeset
|
653 → SUP A (UnionZF f mf ay supf ) |
927 | 654 usp0 f mf ay supf = supP (UnionZF f mf ay supf ) (λ lt → auzc f mf ay supf lt ) (uzctotal f mf ay supf ) |
922 | 655 |
931 | 656 msp0 : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {x y : Ordinal} (ay : odef A y) |
923
85f6238a38db
use supf of zchain for (nmx : ¬ Maximal A ) → ⊥
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
922
diff
changeset
|
657 → (zc : ZChain A f mf ay x ) |
931 | 658 → MinSUP A (UnionCF A f mf ay (ZChain.supf zc) x) |
659 msp0 f mf {x} ay zc = minsupP (UnionCF A f mf ay (ZChain.supf zc) x) (ZChain.chain⊆A zc) ztotal where | |
922 | 660 ztotal : IsTotalOrderSet (ZChain.chain zc) |
661 ztotal {a} {b} ca cb = subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso uz01 where | |
662 uz01 : Tri (* (& a) < * (& b)) (* (& a) ≡ * (& b)) (* (& b) < * (& a) ) | |
663 uz01 = chain-total A f mf ay (ZChain.supf zc) ( (proj2 ca)) ( (proj2 cb)) | |
921 | 664 |
931 | 665 sp0 : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {x y : Ordinal} (ay : odef A y) |
666 → (zc : ZChain A f mf ay x ) | |
667 → SUP A (UnionCF A f mf ay (ZChain.supf zc) x) | |
668 sp0 f mf ay zc = M→S (ZChain.supf zc) (msp0 f mf ay zc ) | |
669 | |
924
a48dc906796c
supf usp0 instead of supf (& A) ?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
923
diff
changeset
|
670 fixpoint : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) (zc : ZChain A f mf as0 (& A) ) |
927 | 671 → ZChain.supf zc (& (SUP.sup (sp0 f mf as0 zc))) o< ZChain.supf zc (& A) |
924
a48dc906796c
supf usp0 instead of supf (& A) ?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
923
diff
changeset
|
672 → f (& (SUP.sup (sp0 f mf as0 zc ))) ≡ & (SUP.sup (sp0 f mf as0 zc )) |
930 | 673 fixpoint f mf zc ss<sa = ? |
924
a48dc906796c
supf usp0 instead of supf (& A) ?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
923
diff
changeset
|
674 |
921 | 675 |
676 -- ZChain contradicts ¬ Maximal | |
677 -- | |
678 -- ZChain forces fix point on any ≤-monotonic function (fixpoint) | |
679 -- ¬ Maximal create cf which is a <-monotonic function by axiom of choice. This contradicts fix point of ZChain | |
680 -- | |
924
a48dc906796c
supf usp0 instead of supf (& A) ?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
923
diff
changeset
|
681 |
a48dc906796c
supf usp0 instead of supf (& A) ?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
923
diff
changeset
|
682 z04 : (nmx : ¬ Maximal A ) → (zc : ZChain A (cf nmx) (cf-is-≤-monotonic nmx) as0 (& A)) → ⊥ |
a48dc906796c
supf usp0 instead of supf (& A) ?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
923
diff
changeset
|
683 z04 nmx zc = <-irr0 {* (cf nmx c)} {* c} (subst (λ k → odef A k ) (sym &iso) (proj1 (is-cf nmx (SUP.as sp1 )))) |
a48dc906796c
supf usp0 instead of supf (& A) ?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
923
diff
changeset
|
684 (subst (λ k → odef A (& k)) (sym *iso) (SUP.as sp1) ) |
927 | 685 (case1 ( cong (*)( fixpoint (cf nmx) (cf-is-≤-monotonic nmx ) zc ss<sa ))) -- x ≡ f x ̄ |
924
a48dc906796c
supf usp0 instead of supf (& A) ?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
923
diff
changeset
|
686 (proj1 (cf-is-<-monotonic nmx c (SUP.as sp1 ))) where -- x < f x |
927 | 687 supf = ZChain.supf zc |
931 | 688 msp1 : MinSUP A (ZChain.chain zc) |
689 msp1 = msp0 (cf nmx) (cf-is-≤-monotonic nmx) as0 zc | |
924
a48dc906796c
supf usp0 instead of supf (& A) ?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
923
diff
changeset
|
690 sp1 : SUP A (ZChain.chain zc) |
a48dc906796c
supf usp0 instead of supf (& A) ?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
923
diff
changeset
|
691 sp1 = sp0 (cf nmx) (cf-is-≤-monotonic nmx) as0 zc |
931 | 692 c : Ordinal |
693 c = & ( SUP.sup sp1 ) | |
694 mc = MinSUP.sup msp1 | |
695 z20 : mc << cf nmx mc | |
696 z20 = proj1 (cf-is-<-monotonic nmx mc (MinSUP.asm msp1) ) | |
697 asc : odef A (supf mc) | |
928 | 698 asc = ZChain.asupf zc |
699 spd : MinSUP A (uchain (cf nmx) (cf-is-≤-monotonic nmx) asc ) | |
700 spd = ysup (cf nmx) (cf-is-≤-monotonic nmx) asc | |
701 d = MinSUP.sup spd | |
702 d<A : d o< & A | |
703 d<A = ∈∧P→o< ⟪ MinSUP.asm spd , lift true ⟫ | |
929 | 704 msup : MinSUP A (UnionCF A (cf nmx) (cf-is-≤-monotonic nmx) as0 supf d) |
705 msup = ZChain.minsup zc (o<→≤ d<A) | |
928 | 706 sd=ms : supf d ≡ MinSUP.sup ( ZChain.minsup zc (o<→≤ d<A) ) |
707 sd=ms = ZChain.supf-is-minsup zc (o<→≤ d<A) | |
930 | 708 -- z26 : {x : Ordinal } → odef (UnionCF A (cf nmx) (cf-is-≤-monotonic nmx) as0 (ZChain.supf zc) d) x |
709 -- → odef (UnionCF A (cf nmx) (cf-is-≤-monotonic nmx) as0 (ZChain.supf zc) c) x ∨ odef (uchain (cf nmx) (cf-is-≤-monotonic nmx) asc ) x | |
710 -- z26 = ? | |
929 | 711 is-sup : IsSup A (UnionCF A (cf nmx) (cf-is-≤-monotonic nmx) as0 (ZChain.supf zc) d) (MinSUP.asm spd) |
712 is-sup = record { x<sup = z22 } where | |
713 z23 : {z : Ordinal } → odef (uchain (cf nmx) (cf-is-≤-monotonic nmx) asc) z → (z ≡ MinSUP.sup spd) ∨ (z << MinSUP.sup spd) | |
714 z23 lt = MinSUP.x<sup spd lt | |
715 z22 : {y : Ordinal} → odef (UnionCF A (cf nmx) (cf-is-≤-monotonic nmx) as0 (ZChain.supf zc) d) y → | |
716 (y ≡ MinSUP.sup spd) ∨ (y << MinSUP.sup spd) | |
930 | 717 z22 {a} ⟪ aa , ch-init fc ⟫ = ? |
718 z22 {a} ⟪ aa , ch-is-sup u u<x is-sup fc ⟫ = ? | |
719 -- u<x : ZChain.supf zc u o< ZChain.supf zc d | |
720 -- supf u o< spuf c → order | |
929 | 721 not-hasprev : ¬ HasPrev A (UnionCF A (cf nmx) (cf-is-≤-monotonic nmx) as0 (ZChain.supf zc) d) d (cf nmx) |
722 not-hasprev hp = ? where | |
723 y : Ordinal | |
724 y = HasPrev.y hp | |
725 z24 : y << d | |
726 z24 = subst (λ k → y << k) (sym (HasPrev.x=fy hp)) ( proj1 (cf-is-<-monotonic nmx y (proj1 (HasPrev.ay hp) ) )) | |
930 | 727 -- z26 : {x : Ordinal } → odef (uchain (cf nmx) (cf-is-≤-monotonic nmx) asc ) x → (x ≡ d ) ∨ (x << d ) |
728 -- z26 lt with MinSUP.x<sup spd (subst (λ k → odef _ k ) ? lt) | |
729 -- ... | case1 eq = ? | |
730 -- ... | case2 lt = ? | |
731 -- z25 : {x : Ordinal } → odef (uchain (cf nmx) (cf-is-≤-monotonic nmx) asc ) x → (x ≡ y ) ∨ (x << y ) | |
732 -- z25 {x} (init au eq ) = ? -- sup c = x, cf y ≡ d, sup c =< d | |
733 -- z25 (fsuc x lt) = ? -- cf (sup c) | |
928 | 734 sd=d : supf d ≡ d |
929 | 735 sd=d = ZChain.sup=u zc (MinSUP.asm spd) (o<→≤ d<A) ⟪ is-sup , not-hasprev ⟫ |
931 | 736 sc<<sd : supf mc << supf d |
737 sc<<sd = ? | |
930 | 738 -- z21 = proj1 ( cf-is-<-monotonic nmx ? ? ) |
931 | 739 sc<sd : supf mc o< supf d |
740 sc<sd with osuc-≡< ( ZChain.supf-<= zc (case2 sc<<sd ) ) | |
741 -- ... | case1 eq = ⊥-elim ( <-irr (case1 (subst₂ (λ j k → j ≡ k ) ? ? (cong (*) eq) )) sc<<sd ) | |
742 ... | case1 eq = ⊥-elim ( <-irr (case1 (cong (*) eq)) sc<<sd ) | |
743 ... | case2 lt = lt | |
744 | |
745 sms<sa : supf mc o< supf (& A) | |
746 sms<sa with osuc-≡< ( ZChain.supf-mono zc (o<→≤ ( ∈∧P→o< ⟪ MinSUP.asm msp1 , lift true ⟫) )) | |
747 ... | case2 lt = lt | |
748 ... | case1 eq = ⊥-elim ( o<¬≡ eq ( ordtrans<-≤ sc<sd ( ZChain.supf-mono zc (o<→≤ d<A )))) | |
928 | 749 |
927 | 750 ss<sa : supf c o< supf (& A) |
931 | 751 ss<sa = ? |
752 | |
551 | 753 zorn00 : Maximal A |
754 zorn00 with is-o∅ ( & HasMaximal ) -- we have no Level (suc n) LEM | |
804 | 755 ... | no not = record { maximal = ODC.minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) ; as = zorn01 ; ¬maximal<x = zorn02 } where |
551 | 756 -- yes we have the maximal |
757 zorn03 : odef HasMaximal ( & ( ODC.minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) ) ) | |
606 | 758 zorn03 = ODC.x∋minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) -- Axiom of choice |
551 | 759 zorn01 : A ∋ ODC.minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) |
760 zorn01 = proj1 zorn03 | |
761 zorn02 : {x : HOD} → A ∋ x → ¬ (ODC.minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) < x) | |
762 zorn02 {x} ax m<x = proj2 zorn03 (& x) ax (subst₂ (λ j k → j < k) (sym *iso) (sym *iso) m<x ) | |
927 | 763 ... | yes ¬Maximal = ⊥-elim ( z04 nmx (SZ (cf nmx) (cf-is-≤-monotonic nmx) as0 (& A) )) where |
551 | 764 -- if we have no maximal, make ZChain, which contradict SUP condition |
765 nmx : ¬ Maximal A | |
766 nmx mx = ∅< {HasMaximal} zc5 ( ≡o∅→=od∅ ¬Maximal ) where | |
767 zc5 : odef A (& (Maximal.maximal mx)) ∧ (( y : Ordinal ) → odef A y → ¬ (* (& (Maximal.maximal mx)) < * y)) | |
804 | 768 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) ) ⟫ |
551 | 769 |
516 | 770 -- usage (see filter.agda ) |
771 -- | |
497 | 772 -- _⊆'_ : ( A B : HOD ) → Set n |
773 -- _⊆'_ A B = (x : Ordinal ) → odef A x → odef B x | |
482 | 774 |
497 | 775 -- MaximumSubset : {L P : HOD} |
776 -- → o∅ o< & L → o∅ o< & P → P ⊆ L | |
777 -- → IsPartialOrderSet P _⊆'_ | |
778 -- → ( (B : HOD) → B ⊆ P → IsTotalOrderSet B _⊆'_ → SUP P B _⊆'_ ) | |
779 -- → Maximal P (_⊆'_) | |
780 -- MaximumSubset {L} {P} 0<L 0<P P⊆L PO SP = Zorn-lemma {P} {_⊆'_} 0<P PO SP |