Mercurial > hg > Members > kono > Proof > ZF-in-agda
annotate src/zorn.agda @ 912:870a6b57dd39
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 12 Oct 2022 14:03:38 +0900 |
parents | 3105feb3c4e1 |
children | d5293a7c2ec4 |
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 ) |
912 | 410 csupf : {b x : Ordinal } → supf b o< x → x o≤ z → odef (UnionCF A f mf ay supf x) (supf b) -- supf z is not an element of this chain |
880 | 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 |
912 | 459 -- csupf< : {a b : Ordinal } → a o≤ b → odef (UnionCF A f mf ay supf z) (supf a) → odef (UnionCF A f mf ay supf z) (supf b) |
460 -- csupf< = ? | |
461 | |
728 | 462 record ZChain1 ( A : HOD ) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) |
783 | 463 {y : Ordinal} (ay : odef A y) (zc : ZChain A f mf ay (& A)) ( z : Ordinal ) : Set (Level.suc n) where |
869 | 464 supf = ZChain.supf zc |
728 | 465 field |
897 | 466 is-max : {a b : Ordinal } → (ca : odef (UnionCF A f mf ay supf z) a ) → b o< z → (ab : odef A b) |
869 | 467 → HasPrev A (UnionCF A f mf ay supf z) b f ∨ IsSup A (UnionCF A f mf ay supf z) ab |
468 → * a < * b → odef ((UnionCF A f mf ay supf z)) b | |
728 | 469 |
568 | 470 record Maximal ( A : HOD ) : Set (Level.suc n) where |
471 field | |
472 maximal : HOD | |
804 | 473 as : A ∋ maximal |
568 | 474 ¬maximal<x : {x : HOD} → A ∋ x → ¬ maximal < x -- A is Partial, use negative |
567 | 475 |
743 | 476 init-uchain : (A : HOD) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) {y : Ordinal } → (ay : odef A y ) |
477 { supf : Ordinal → Ordinal } { x : Ordinal } → odef (UnionCF A f mf ay supf x) y | |
783 | 478 init-uchain A f mf ay = ⟪ ay , ch-init (init ay refl) ⟫ |
743 | 479 |
497 | 480 Zorn-lemma : { A : HOD } |
464 | 481 → o∅ o< & A |
568 | 482 → ( ( B : HOD) → (B⊆A : B ⊆' A) → IsTotalOrderSet B → SUP A B ) -- SUP condition |
497 | 483 → Maximal A |
552 | 484 Zorn-lemma {A} 0<A supP = zorn00 where |
571 | 485 <-irr0 : {a b : HOD} → A ∋ a → A ∋ b → (a ≡ b ) ∨ (a < b ) → b < a → ⊥ |
486 <-irr0 {a} {b} A∋a A∋b = <-irr | |
788 | 487 z07 : {y : Ordinal} {A : HOD } → {P : Set n} → odef A y ∧ P → y o< & A |
488 z07 {y} {A} p = subst (λ k → k o< & A) &iso ( c<→o< (subst (λ k → odef A k ) (sym &iso ) (proj1 p ))) | |
530 | 489 s : HOD |
490 s = ODC.minimal O A (λ eq → ¬x<0 ( subst (λ k → o∅ o< k ) (=od∅→≡o∅ eq) 0<A )) | |
568 | 491 as : A ∋ * ( & s ) |
492 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
|
493 as0 : odef A (& s ) |
6655f03984f9
mutual tranfinite in zorn
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
607
diff
changeset
|
494 as0 = subst (λ k → odef A k ) &iso as |
547 | 495 s<A : & s o< & A |
568 | 496 s<A = c<→o< (subst (λ k → odef A (& k) ) *iso as ) |
530 | 497 HasMaximal : HOD |
537 | 498 HasMaximal = record { od = record { def = λ x → odef A x ∧ ( (m : Ordinal) → odef A m → ¬ (* x < * m)) } ; odmax = & A ; <odmax = z07 } |
499 no-maximum : HasMaximal =h= od∅ → (x : Ordinal) → odef A x ∧ ((m : Ordinal) → odef A m → odef A x ∧ (¬ (* x < * m) )) → ⊥ | |
500 no-maximum nomx x P = ¬x<0 (eq→ nomx {x} ⟪ proj1 P , (λ m ma p → proj2 ( proj2 P m ma ) p ) ⟫ ) | |
532 | 501 Gtx : { x : HOD} → A ∋ x → HOD |
537 | 502 Gtx {x} ax = record { od = record { def = λ y → odef A y ∧ (x < (* y)) } ; odmax = & A ; <odmax = z07 } |
503 z08 : ¬ Maximal A → HasMaximal =h= od∅ | |
804 | 504 z08 nmx = record { eq→ = λ {x} lt → ⊥-elim ( nmx record {maximal = * x ; as = subst (λ k → odef A k) (sym &iso) (proj1 lt) |
537 | 505 ; ¬maximal<x = λ {y} ay → subst (λ k → ¬ (* x < k)) *iso (proj2 lt (& y) ay) } ) ; eq← = λ {y} lt → ⊥-elim ( ¬x<0 lt )} |
506 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)) | |
507 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 | |
508 ¬x<m : ¬ (* x < * m) | |
509 ¬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 | 510 |
879 | 511 minsupP : ( B : HOD) → (B⊆A : B ⊆' A) → IsTotalOrderSet B → MinSUP A B |
512 minsupP B B⊆A total = m02 where | |
513 xsup : (sup : Ordinal ) → Set n | |
514 xsup sup = {w : Ordinal } → odef B w → (w ≡ sup ) ∨ (w << sup ) | |
515 ∀-imply-or : {A : Ordinal → Set n } {B : Set n } | |
516 → ((x : Ordinal ) → A x ∨ B) → ((x : Ordinal ) → A x) ∨ B | |
517 ∀-imply-or {A} {B} ∀AB with ODC.p∨¬p O ((x : Ordinal ) → A x) -- LEM | |
518 ∀-imply-or {A} {B} ∀AB | case1 t = case1 t | |
519 ∀-imply-or {A} {B} ∀AB | case2 x = case2 (lemma (λ not → x not )) where | |
520 lemma : ¬ ((x : Ordinal ) → A x) → B | |
521 lemma not with ODC.p∨¬p O B | |
522 lemma not | case1 b = b | |
523 lemma not | case2 ¬b = ⊥-elim (not (λ x → dont-orb (∀AB x) ¬b )) | |
524 m00 : (x : Ordinal ) → ( ( z : Ordinal) → z o< x → ¬ (odef A z ∧ xsup z) ) ∨ MinSUP A B | |
525 m00 x = TransFinite0 ind x where | |
526 ind : (x : Ordinal) → ((z : Ordinal) → z o< x → ( ( w : Ordinal) → w o< z → ¬ (odef A w ∧ xsup w )) ∨ MinSUP A B) | |
527 → ( ( w : Ordinal) → w o< x → ¬ (odef A w ∧ xsup w) ) ∨ MinSUP A B | |
528 ind x prev = ∀-imply-or m01 where | |
529 m01 : (z : Ordinal) → (z o< x → ¬ (odef A z ∧ xsup z)) ∨ MinSUP A B | |
530 m01 z with trio< z x | |
531 ... | tri≈ ¬a b ¬c = case1 ( λ lt → ⊥-elim ( ¬a lt ) ) | |
532 ... | tri> ¬a ¬b c = case1 ( λ lt → ⊥-elim ( ¬a lt ) ) | |
533 ... | tri< a ¬b ¬c with prev z a | |
534 ... | case2 mins = case2 mins | |
535 ... | case1 not with ODC.p∨¬p O (odef A z ∧ xsup z) | |
536 ... | case1 mins = case2 record { sup = z ; asm = proj1 mins ; x<sup = proj2 mins ; minsup = m04 } where | |
537 m04 : {sup1 : Ordinal} → odef A sup1 → ({w : Ordinal} → odef B w → (w ≡ sup1) ∨ (w << sup1)) → z o≤ sup1 | |
538 m04 {s} as lt with trio< z s | |
539 ... | tri< a ¬b ¬c = o<→≤ a | |
540 ... | tri≈ ¬a b ¬c = o≤-refl0 b | |
541 ... | tri> ¬a ¬b s<z = ⊥-elim ( not s s<z ⟪ as , lt ⟫ ) | |
542 ... | case2 notz = case1 (λ _ → notz ) | |
543 m03 : ¬ ((z : Ordinal) → z o< & A → ¬ odef A z ∧ xsup z) | |
544 m03 not = ⊥-elim ( not s1 (z09 (SUP.as S)) ⟪ SUP.as S , m05 ⟫ ) where | |
545 S : SUP A B | |
546 S = supP B B⊆A total | |
547 s1 = & (SUP.sup S) | |
548 m05 : {w : Ordinal } → odef B w → (w ≡ s1 ) ∨ (w << s1 ) | |
549 m05 {w} bw with SUP.x<sup S {* w} (subst (λ k → odef B k) (sym &iso) bw ) | |
550 ... | case1 eq = case1 ( subst₂ (λ j k → j ≡ k ) &iso refl (cong (&) eq) ) | |
551 ... | case2 lt = case2 ( subst (λ k → _ < k ) (sym *iso) lt ) | |
552 m02 : MinSUP A B | |
553 m02 = dont-or (m00 (& A)) m03 | |
554 | |
560 | 555 -- Uncountable ascending chain by axiom of choice |
530 | 556 cf : ¬ Maximal A → Ordinal → Ordinal |
532 | 557 cf nmx x with ODC.∋-p O A (* x) |
558 ... | no _ = o∅ | |
559 ... | yes ax with is-o∅ (& ( Gtx ax )) | |
538 | 560 ... | yes nogt = -- no larger element, so it is maximal |
561 ⊥-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 | 562 ... | no not = & (ODC.minimal O (Gtx ax) (λ eq → not (=od∅→≡o∅ eq))) |
537 | 563 is-cf : (nmx : ¬ Maximal A ) → {x : Ordinal} → odef A x → odef A (cf nmx x) ∧ ( * x < * (cf nmx x) ) |
564 is-cf nmx {x} ax with ODC.∋-p O A (* x) | |
565 ... | no not = ⊥-elim ( not (subst (λ k → odef A k ) (sym &iso) ax )) | |
566 ... | yes ax with is-o∅ (& ( Gtx ax )) | |
567 ... | 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 ⟫ ) | |
568 ... | no not = ODC.x∋minimal O (Gtx ax) (λ eq → not (=od∅→≡o∅ eq)) | |
606 | 569 |
570 --- | |
571 --- infintie ascention sequence of f | |
572 --- | |
530 | 573 cf-is-<-monotonic : (nmx : ¬ Maximal A ) → (x : Ordinal) → odef A x → ( * x < * (cf nmx x) ) ∧ odef A (cf nmx x ) |
537 | 574 cf-is-<-monotonic nmx x ax = ⟪ proj2 (is-cf nmx ax ) , proj1 (is-cf nmx ax ) ⟫ |
530 | 575 cf-is-≤-monotonic : (nmx : ¬ Maximal A ) → ≤-monotonic-f A ( cf nmx ) |
532 | 576 cf-is-≤-monotonic nmx x ax = ⟪ case2 (proj1 ( cf-is-<-monotonic nmx x ax )) , proj2 ( cf-is-<-monotonic nmx x ax ) ⟫ |
543 | 577 |
877 | 578 sp0 : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {x y : Ordinal} (ay : odef A y) |
579 (zc : ZChain A f mf ay x ) → SUP A (ZChain.chain zc) | |
580 sp0 f mf ay zc = supP (ZChain.chain zc) (ZChain.chain⊆A zc) ztotal where | |
581 ztotal : IsTotalOrderSet (ZChain.chain zc) | |
582 ztotal {a} {b} ca cb = subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso uz01 where | |
583 uz01 : Tri (* (& a) < * (& b)) (* (& a) ≡ * (& b)) (* (& b) < * (& a) ) | |
584 uz01 = chain-total A f mf ay (ZChain.supf zc) ( (proj2 ca)) ( (proj2 cb)) | |
585 | |
803 | 586 -- |
587 -- Second TransFinite Pass for maximality | |
588 -- | |
589 | |
793 | 590 SZ1 : ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) |
728 | 591 {init : Ordinal} (ay : odef A init) (zc : ZChain A f mf ay (& A)) (x : Ordinal) → ZChain1 A f mf ay zc x |
793 | 592 SZ1 f mf {y} ay zc x = TransFinite { λ x → ZChain1 A f mf ay zc x } zc1 x where |
900 | 593 chain-mono1 : {a b c : Ordinal} → a o≤ b |
788 | 594 → odef (UnionCF A f mf ay (ZChain.supf zc) a) c → odef (UnionCF A f mf ay (ZChain.supf zc) b) c |
793 | 595 chain-mono1 {a} {b} {c} a≤b = chain-mono f mf ay (ZChain.supf zc) a≤b |
735 | 596 is-max-hp : (x : Ordinal) {a : Ordinal} {b : Ordinal} → odef (UnionCF A f mf ay (ZChain.supf zc) x) a → |
897 | 597 b o< x → (ab : odef A b) → |
836 | 598 HasPrev A (UnionCF A f mf ay (ZChain.supf zc) x) b f → |
735 | 599 * a < * b → odef (UnionCF A f mf ay (ZChain.supf zc) x) b |
749 | 600 is-max-hp x {a} {b} ua b<x ab has-prev a<b with HasPrev.ay has-prev |
601 ... | ⟪ ab0 , ch-init fc ⟫ = ⟪ ab , ch-init ( subst (λ k → FClosure A f y k) (sym (HasPrev.x=fy has-prev)) (fsuc _ fc )) ⟫ | |
894 | 602 ... | ⟪ ab0 , ch-is-sup u u≤x is-sup fc ⟫ = ⟪ ab , subst (λ k → UChain A f mf ay (ZChain.supf zc) x k ) |
791 | 603 (sym (HasPrev.x=fy has-prev)) ( ch-is-sup u u≤x is-sup (fsuc _ fc)) ⟫ |
868 | 604 |
869 | 605 supf = ZChain.supf zc |
606 | |
607 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 | |
608 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 | |
609 s<b : s o< b | |
610 s<b = ZChain.supf-inject zc ss<sb | |
611 s≤<z : s o≤ & A | |
612 s≤<z = ordtrans s<b b≤z | |
870 | 613 zc04 : odef (UnionCF A f mf ay supf (& A)) (supf s) |
912 | 614 zc04 = ZChain.csupf zc (z09 (ZChain.asupf zc)) o≤-refl |
869 | 615 zc05 : odef (UnionCF A f mf ay supf b) (supf s) |
616 zc05 with zc04 | |
617 ... | ⟪ as , ch-init fc ⟫ = ⟪ as , ch-init fc ⟫ | |
900 | 618 ... | ⟪ 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 | 619 zc07 : FClosure A f (supf u) (supf s) -- supf u ≤ supf s → supf u o≤ supf s |
620 zc07 = fc | |
869 | 621 zc06 : supf u ≡ u |
622 zc06 = ChainP.supu=u is-sup | |
894 | 623 zc08 : supf u o< supf b |
624 zc08 = ordtrans≤-< (ZChain.supf-<= zc (≤to<= ( s≤fc _ f mf fc ))) ss<sb | |
869 | 625 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 |
626 zc04 : odef (UnionCF A f mf ay supf b) (f x) | |
627 zc04 with subst (λ k → odef (UnionCF A f mf ay supf b) k ) &iso (csupf-fc b<z ss≤sb fc ) | |
628 ... | ⟪ as , ch-init fc ⟫ = ⟪ proj2 (mf _ as) , ch-init (fsuc _ fc) ⟫ | |
629 ... | ⟪ as , ch-is-sup u u≤x is-sup fc ⟫ = ⟪ proj2 (mf _ as) , ch-is-sup u u≤x is-sup (fsuc _ fc) ⟫ | |
630 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) | |
631 order {b} {s} {z1} b<z ss<sb fc = zc04 where | |
891 | 632 zc00 : ( z1 ≡ MinSUP.sup (ZChain.minsup zc (o<→≤ b<z) )) ∨ ( z1 << MinSUP.sup ( ZChain.minsup zc (o<→≤ b<z) ) ) |
892 | 633 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 | 634 -- supf (supf b) ≡ supf b |
869 | 635 zc04 : (z1 ≡ supf b) ∨ (z1 << supf b) |
636 zc04 with zc00 | |
892 | 637 ... | case1 eq = case1 (subst₂ (λ j k → j ≡ k ) refl (sym (ZChain.supf-is-minsup zc (o<→≤ b<z)) ) eq ) |
638 ... | case2 lt = case2 (subst₂ (λ j k → j < * k ) refl (sym (ZChain.supf-is-minsup zc (o<→≤ b<z) )) lt ) | |
868 | 639 |
728 | 640 zc1 : (x : Ordinal) → ((y₁ : Ordinal) → y₁ o< x → ZChain1 A f mf ay zc y₁) → ZChain1 A f mf ay zc x |
900 | 641 zc1 x prev with Oprev-p x -- prev is not used now.... |
756 | 642 ... | 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
|
643 px = Oprev.oprev op |
789 | 644 zc-b<x : {b : Ordinal } → b o< x → b o< osuc px |
645 zc-b<x {b} lt = subst (λ k → b o< k ) (sym (Oprev.oprev=x op)) lt | |
894 | 646 is-max : {a : Ordinal} {b : Ordinal} → odef (UnionCF A f mf ay supf x) a → |
897 | 647 b o< x → (ab : odef A b) → |
869 | 648 HasPrev A (UnionCF A f mf ay supf x) b f ∨ IsSup A (UnionCF A f mf ay supf x) ab → |
649 * 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
|
650 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
|
651 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
|
652 is-max {a} {b} ua b<x ab P a<b | case2 is-sup |
900 | 653 = ⟪ 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
|
654 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
|
655 b<A = z09 ab |
869 | 656 m04 : ¬ HasPrev A (UnionCF A f mf ay supf b) b f |
894 | 657 m04 nhp = proj1 is-sup ( record { ax = HasPrev.ax nhp ; y = HasPrev.y nhp ; ay = |
900 | 658 chain-mono1 (o<→≤ b<x) (HasPrev.ay nhp) ; x=fy = HasPrev.x=fy nhp } ) |
859 | 659 m05 : ZChain.supf zc b ≡ b |
660 m05 = ZChain.sup=u zc ab (o<→≤ (z09 ab) ) | |
900 | 661 ⟪ 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
|
662 m08 : {z : Ordinal} → (fcz : FClosure A f y z ) → z <= ZChain.supf zc b |
872 | 663 m08 {z} fcz = ZChain.fcy<sup zc (o<→≤ b<A) fcz |
828 | 664 m09 : {s z1 : Ordinal} → ZChain.supf zc s o< ZChain.supf zc b |
825 | 665 → FClosure A f (ZChain.supf zc s) z1 → z1 <= ZChain.supf zc b |
869 | 666 m09 {s} {z} s<b fcz = order b<A s<b fcz |
667 m06 : ChainP A f mf ay supf b | |
859 | 668 m06 = record { fcy<sup = m08 ; order = m09 ; supu=u = m05 } |
756 | 669 ... | no lim = record { is-max = is-max } where |
869 | 670 is-max : {a : Ordinal} {b : Ordinal} → odef (UnionCF A f mf ay supf x) a → |
897 | 671 b o< x → (ab : odef A b) → |
869 | 672 HasPrev A (UnionCF A f mf ay supf x) b f ∨ IsSup A (UnionCF A f mf ay supf x) ab → |
673 * 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
|
674 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
|
675 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
|
676 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 | 677 ... | 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 | 678 ... | 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
|
679 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
|
680 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
|
681 m07 : {z : Ordinal} → FClosure A f y z → z <= ZChain.supf zc b |
872 | 682 m07 {z} fc = ZChain.fcy<sup zc (o<→≤ m09) fc |
828 | 683 m08 : {s z1 : Ordinal} → ZChain.supf zc s o< ZChain.supf zc b |
825 | 684 → FClosure A f (ZChain.supf zc s) z1 → z1 <= ZChain.supf zc b |
869 | 685 m08 {s} {z1} s<b fc = order m09 s<b fc |
686 m04 : ¬ HasPrev A (UnionCF A f mf ay supf b) b f | |
894 | 687 m04 nhp = proj1 is-sup ( record { ax = HasPrev.ax nhp ; y = HasPrev.y nhp ; ay = |
900 | 688 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
|
689 ; x=fy = HasPrev.x=fy nhp } ) |
859 | 690 m05 : ZChain.supf zc b ≡ b |
691 m05 = ZChain.sup=u zc ab (o<→≤ m09) | |
900 | 692 ⟪ record { x<sup = λ lt → IsSup.x<sup (proj2 is-sup) (chain-mono1 (o<→≤ b<x) lt )} , m04 ⟫ -- ZChain on x |
869 | 693 m06 : ChainP A f mf ay supf b |
859 | 694 m06 = record { fcy<sup = m07 ; order = m08 ; supu=u = m05 } |
727 | 695 |
543 | 696 --- |
560 | 697 --- the maximum chain has fix point of any ≤-monotonic function |
543 | 698 --- |
703 | 699 fixpoint : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) (zc : ZChain A f mf as0 (& A) ) |
877 | 700 → f (& (SUP.sup (sp0 f mf as0 zc ))) ≡ & (SUP.sup (sp0 f mf as0 zc )) |
701 fixpoint f mf zc = z14 where | |
538 | 702 chain = ZChain.chain zc |
894 | 703 supf = ZChain.supf zc |
895 | 704 sp1 : SUP A chain |
877 | 705 sp1 = sp0 f mf as0 zc |
897 | 706 z10 : {a b : Ordinal } → (ca : odef chain a ) → b o< & A → (ab : odef A b ) |
894 | 707 → HasPrev A chain b f ∨ IsSup A chain {b} ab |
538 | 708 → * a < * b → odef chain b |
793 | 709 z10 = ZChain1.is-max (SZ1 f mf as0 zc (& A) ) |
897 | 710 z21 : & (SUP.sup sp1) o< & A |
711 z21 = c<→o< (SUP.as sp1 ) | |
712 -- z21 : supf (& (SUP.sup sp1)) o< & A | |
713 -- z21 = subst (λ k → k o< & A) &iso ( c<→o< (subst (λ k → odef A k) (sym &iso) (ZChain.asupf zc ) )) | |
538 | 714 z12 : odef chain (& (SUP.sup sp1)) |
715 z12 with o≡? (& s) (& (SUP.sup sp1)) | |
653 | 716 ... | yes eq = subst (λ k → odef chain k) eq ( ZChain.chain∋init zc ) |
891 | 717 ... | no ne = z10 {& s} {& (SUP.sup sp1)} ( ZChain.chain∋init zc ) z21 (SUP.as sp1) |
570 | 718 (case2 z19 ) z13 where |
538 | 719 z13 : * (& s) < * (& (SUP.sup sp1)) |
653 | 720 z13 with SUP.x<sup sp1 ( ZChain.chain∋init zc ) |
538 | 721 ... | case1 eq = ⊥-elim ( ne (cong (&) eq) ) |
722 ... | case2 lt = subst₂ (λ j k → j < k ) (sym *iso) (sym *iso) lt | |
804 | 723 z19 : IsSup A chain {& (SUP.sup sp1)} (SUP.as sp1) |
571 | 724 z19 = record { x<sup = z20 } where |
725 z20 : {y : Ordinal} → odef chain y → (y ≡ & (SUP.sup sp1)) ∨ (y << & (SUP.sup sp1)) | |
726 z20 {y} zy with SUP.x<sup sp1 (subst (λ k → odef chain k ) (sym &iso) zy) | |
570 | 727 ... | case1 y=p = case1 (subst (λ k → k ≡ _ ) &iso ( cong (&) y=p )) |
728 ... | case2 y<p = case2 (subst (λ k → * y < k ) (sym *iso) y<p ) | |
877 | 729 ztotal : IsTotalOrderSet (ZChain.chain zc) |
730 ztotal {a} {b} ca cb = subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso uz01 where | |
731 uz01 : Tri (* (& a) < * (& b)) (* (& a) ≡ * (& b)) (* (& b) < * (& a) ) | |
894 | 732 uz01 = chain-total A f mf as0 supf ( (proj2 ca)) ( (proj2 cb)) |
877 | 733 |
734 z14 : f (& (SUP.sup (sp0 f mf as0 zc ))) ≡ & (SUP.sup (sp0 f mf as0 zc )) | |
735 z14 with ztotal (subst (λ k → odef chain k) (sym &iso) (ZChain.f-next zc z12 )) z12 | |
631 | 736 ... | tri< a ¬b ¬c = ⊥-elim z16 where |
737 z16 : ⊥ | |
804 | 738 z16 with proj1 (mf (& ( SUP.sup sp1)) ( SUP.as sp1 )) |
631 | 739 ... | case1 eq = ⊥-elim (¬b (subst₂ (λ j k → j ≡ k ) refl *iso (sym eq) )) |
740 ... | case2 lt = ⊥-elim (¬c (subst₂ (λ j k → k < j ) refl *iso lt )) | |
741 ... | tri≈ ¬a b ¬c = subst ( λ k → k ≡ & (SUP.sup sp1) ) &iso ( cong (&) b ) | |
742 ... | tri> ¬a ¬b c = ⊥-elim z17 where | |
743 z15 : (* (f ( & ( SUP.sup sp1 ))) ≡ SUP.sup sp1) ∨ (* (f ( & ( SUP.sup sp1 ))) < SUP.sup sp1) | |
744 z15 = SUP.x<sup sp1 (subst (λ k → odef chain k ) (sym &iso) (ZChain.f-next zc z12 )) | |
745 z17 : ⊥ | |
746 z17 with z15 | |
747 ... | case1 eq = ¬b eq | |
748 ... | case2 lt = ¬a lt | |
560 | 749 |
750 -- ZChain contradicts ¬ Maximal | |
751 -- | |
571 | 752 -- ZChain forces fix point on any ≤-monotonic function (fixpoint) |
560 | 753 -- ¬ Maximal create cf which is a <-monotonic function by axiom of choice. This contradicts fix point of ZChain |
754 -- | |
877 | 755 z04 : (nmx : ¬ Maximal A ) → (zc : ZChain A (cf nmx) (cf-is-≤-monotonic nmx) as0 (& A)) → ⊥ |
756 z04 nmx zc = <-irr0 {* (cf nmx c)} {* c} (subst (λ k → odef A k ) (sym &iso) (proj1 (is-cf nmx (SUP.as sp1 )))) | |
804 | 757 (subst (λ k → odef A (& k)) (sym *iso) (SUP.as sp1) ) |
877 | 758 (case1 ( cong (*)( fixpoint (cf nmx) (cf-is-≤-monotonic nmx ) zc ))) -- x ≡ f x ̄ |
804 | 759 (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
|
760 sp1 : SUP A (ZChain.chain zc) |
877 | 761 sp1 = sp0 (cf nmx) (cf-is-≤-monotonic nmx) as0 zc |
538 | 762 c = & (SUP.sup sp1) |
548 | 763 |
757 | 764 uchain : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) → HOD |
765 uchain f mf {y} ay = record { od = record { def = λ x → FClosure A f y x } ; odmax = & A ; <odmax = | |
766 λ {z} cz → subst (λ k → k o< & A) &iso ( c<→o< (subst (λ k → odef A k ) (sym &iso ) (A∋fc y f mf cz ))) } | |
767 | |
768 utotal : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) | |
769 → IsTotalOrderSet (uchain f mf ay) | |
770 utotal f mf {y} ay {a} {b} ca cb = subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso uz01 where | |
771 uz01 : Tri (* (& a) < * (& b)) (* (& a) ≡ * (& b)) (* (& b) < * (& a) ) | |
772 uz01 = fcn-cmp y f mf ca cb | |
773 | |
774 ysup : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) | |
775 → SUP A (uchain f mf ay) | |
776 ysup f mf {y} ay = supP (uchain f mf ay) (λ lt → A∋fc y f mf lt) (utotal f mf ay) | |
777 | |
793 | 778 SUP⊆ : { B C : HOD } → B ⊆' C → SUP A C → SUP A B |
804 | 779 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 | 780 |
833 | 781 record xSUP (B : HOD) (x : Ordinal) : Set n where |
782 field | |
783 ax : odef A x | |
784 is-sup : IsSup A B ax | |
785 | |
560 | 786 -- |
547 | 787 -- create all ZChains under o< x |
560 | 788 -- |
608
6655f03984f9
mutual tranfinite in zorn
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
607
diff
changeset
|
789 |
674 | 790 ind : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) → (x : Ordinal) |
703 | 791 → ((z : Ordinal) → z o< x → ZChain A f mf ay z) → ZChain A f mf ay x |
707 | 792 ind f mf {y} ay x prev with Oprev-p x |
697 | 793 ... | yes op = zc4 where |
682 | 794 -- |
795 -- we have previous ordinal to use induction | |
796 -- | |
797 px = Oprev.oprev op | |
703 | 798 zc : ZChain A f mf ay (Oprev.oprev op) |
682 | 799 zc = prev px (subst (λ k → px o< k) (Oprev.oprev=x op) <-osuc ) |
800 px<x : px o< x | |
801 px<x = subst (λ k → px o< k) (Oprev.oprev=x op) <-osuc | |
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-< = ? | |
912 | 822 ; supfmax = ? ; minsup = ? ; supf-is-minsup = ? ; csupf = csupfp } where |
901 | 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 | |
912 | 1020 csupf17 (init as refl ) = ZChain.csupf zc sf<px o≤-refl |
905 | 1021 csupf17 (fsuc x fc) = ZChain.f-next zc (csupf17 fc) |
1022 | |
912 | 1023 ... | case2 sfp<px with ZChain.csupf zc sfp<px o≤-refl -- odef (UnionCF A f mf ay supf0 px) (supf0 px) |
905 | 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 | |
1082 psz1≤px = subst (λ k → supf1 z1 o< k ) (sym (Oprev.oprev=x op)) sz1<x | |
909 | 1083 cs01 : supf0 px o< px → odef (UnionCF A f mf ay supf0 px) (supf0 px) |
912 | 1084 cs01 spx<px = ZChain.csupf zc spx<px o≤-refl |
906 | 1085 csupf2 : odef (UnionCF A f mf ay supf1 x) (supf1 z1) |
907 | 1086 csupf2 with trio< z1 px | inspect supf1 z1 |
1087 csupf2 | tri< a ¬b ¬c | record { eq = eq1 } with osuc-≡< psz1≤px | |
909 | 1088 ... | case2 lt = zc12 (case1 cs03) where |
1089 cs03 : odef (UnionCF A f mf ay supf0 px) (supf0 z1) | |
912 | 1090 cs03 = ZChain.csupf zc (subst (λ k → k o< px) (sf1=sf0 (o<→≤ a)) lt ) o≤-refl |
910 | 1091 ... | case1 sfz=px with osuc-≡< ( supf1-mono (o<→≤ a) ) |
1092 ... | case1 sfz=sfpx = zc12 (case2 (init (ZChain.asupf zc) cs04 )) where | |
1093 supu=u : supf1 (supf1 z1) ≡ supf1 z1 | |
1094 supu=u = trans (cong supf1 sfz=px) (sym sfz=sfpx) | |
1095 cs04 : supf0 px ≡ supf0 z1 | |
1096 cs04 = begin | |
911 | 1097 supf0 px ≡⟨ sym (sf1=sf0 o≤-refl) ⟩ |
1098 supf1 px ≡⟨ sym sfz=sfpx ⟩ | |
1099 supf1 z1 ≡⟨ sf1=sf0 (o<→≤ a) ⟩ | |
1100 supf0 z1 ∎ where open ≡-Reasoning | |
910 | 1101 ... | case2 sfz<sfpx = ? --- supf0 z1 o< supf0 px |
909 | 1102 csupf2 | tri≈ ¬a b ¬c | record { eq = eq1 } = zc12 (case2 (init (ZChain.asupf zc) (cong supf0 (sym b)))) |
910 | 1103 csupf2 | tri> ¬a ¬b px<z1 | record { eq = eq1 } with trio< sp1 px |
912 | 1104 ... | tri< sp1<px ¬b ¬c = ? -- sp1 o< px, supf0 sp1 o≤ px, supf0 sp1 o≤ supf0 px, sp1 o< z1 |
910 | 1105 ... | tri≈ ¬a sp1=px ¬c = ⟪ MinSUP.asm sup1 , ch-is-sup (supf1 z1) (subst (λ k → k o< x) (sym eq1) sz1<x) |
907 | 1106 record { fcy<sup = ? ; order = ? ; supu=u = supu=u } (init asupf1 (trans supu=u eq1) ) ⟫ where |
910 | 1107 -- supf1 z1 ≡ sp1, px o< z1, sp1 o< x -- sp1 o< z1 |
1108 -- supf1 sp1 o≤ supf1 z1 ≡ sp1 o< z1 | |
908
d917831fb607
supf (supf x) ≡ supf x is bad
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
907
diff
changeset
|
1109 asm : odef A (supf1 z1) |
910 | 1110 asm = subst (λ k → odef A k ) (sym (sf1=sp1 px<z1)) ( MinSUP.asm sup1) |
911 | 1111 cs05 : odef (UnionCF A f mf ay supf1 x) (supf1 sp1) |
1112 cs05 = zc12 (case2 (init (ZChain.asupf zc) ( begin | |
1113 supf0 px ≡⟨ sym (sf1=sf0 o≤-refl ) ⟩ | |
1114 supf1 px ≡⟨ cong supf1 (sym sp1=px) ⟩ | |
1115 supf1 sp1 ∎ ))) where open ≡-Reasoning | |
907 | 1116 supu=u : supf1 (supf1 z1) ≡ supf1 z1 |
1117 supu=u = ? | |
910 | 1118 ... | tri> ¬a ¬b px<sp1 = ⊥-elim (¬p<x<op ⟪ px<sp1 , subst (λ k → sp1 o< k) (sym (Oprev.oprev=x op)) sz1<x ⟫ ) |
877 | 1119 |
912 | 1120 csupfp : {w z : Ordinal } → supf1 w o< z → z o≤ x → odef (UnionCF A f mf ay supf1 z) (supf1 w) |
1121 csupfp {w} {z} sw1<z z≤x with osuc-≡< z≤x | |
1122 ... | case1 eq = ? | |
1123 ... | case2 lt = ? where | |
1124 csupfpx : odef (UnionCF A f mf ay supf0 z) (supf0 w) | |
1125 csupfpx = ZChain.csupf zc ? ? | |
1126 | |
904 | 1127 zc4 : ZChain A f mf ay x --- x o≤ supf px |
901 | 1128 zc4 with trio< x (supf0 px) |
904 | 1129 ... | tri> ¬a ¬b c = zc41 c |
1130 ... | tri≈ ¬a b ¬c = ? | |
901 | 1131 ... | tri< a ¬b ¬c = record { supf = supf0 ; sup=u = ? ; asupf = ? ; supf-mono = ? ; supf-< = ? |
1132 ; supfmax = ? ; minsup = ? ; supf-is-minsup = ? ; csupf = ? } where | |
883 | 1133 |
901 | 1134 -- supf0 px not is included by the chain |
1135 -- supf1 x ≡ supf0 px because of supfmax | |
883 | 1136 |
872 | 1137 supf1 : Ordinal → Ordinal |
1138 supf1 z with trio< z px | |
871 | 1139 ... | tri< a ¬b ¬c = supf0 z |
872 | 1140 ... | tri≈ ¬a b ¬c = supf0 px |
871 | 1141 ... | tri> ¬a ¬b c = supf0 px |
1142 | |
886 | 1143 sf1=sf0 : {z : Ordinal } → z o< px → supf1 z ≡ supf0 z |
1144 sf1=sf0 {z} z<px with trio< z px | |
874 | 1145 ... | tri< a ¬b ¬c = refl |
1146 ... | tri≈ ¬a b ¬c = ⊥-elim ( ¬a z<px ) | |
1147 ... | tri> ¬a ¬b c = ⊥-elim ( ¬a z<px ) | |
1148 | |
1149 zc17 : {z : Ordinal } → supf0 z o≤ supf0 px | |
1150 zc17 = ? -- px o< z, px o< supf0 px | |
1151 | |
1152 supf-mono1 : {z w : Ordinal } → z o≤ w → supf1 z o≤ supf1 w | |
1153 supf-mono1 {z} {w} z≤w with trio< w px | |
886 | 1154 ... | tri< a ¬b ¬c = subst₂ (λ j k → j o≤ k ) (sym (sf1=sf0 (ordtrans≤-< z≤w a))) refl ( supf-mono z≤w ) |
874 | 1155 ... | tri≈ ¬a refl ¬c with trio< z px |
1156 ... | tri< a ¬b ¬c = zc17 | |
1157 ... | tri≈ ¬a refl ¬c = o≤-refl | |
1158 ... | tri> ¬a ¬b c = o≤-refl | |
1159 supf-mono1 {z} {w} z≤w | tri> ¬a ¬b c with trio< z px | |
1160 ... | tri< a ¬b ¬c = zc17 | |
1161 ... | tri≈ ¬a b ¬c = o≤-refl | |
1162 ... | tri> ¬a ¬b c = o≤-refl | |
1163 | |
872 | 1164 pchain1 : HOD |
1165 pchain1 = UnionCF A f mf ay supf1 x | |
871 | 1166 |
863 | 1167 zc10 : {z : Ordinal} → OD.def (od pchain) z → OD.def (od pchain1) z |
1168 zc10 {z} ⟪ az , ch-init fc ⟫ = ⟪ az , ch-init fc ⟫ | |
894 | 1169 zc10 {z} ⟪ az , ch-is-sup u1 u1<x u1-is-sup fc ⟫ = ⟪ az , ch-is-sup u1 ? ? ? ⟫ |
873 | 1170 |
1171 zc111 : {z : Ordinal} → z o< px → OD.def (od pchain1) z → OD.def (od pchain) z | |
1172 zc111 {z} z<px ⟪ az , ch-init fc ⟫ = ⟪ az , ch-init fc ⟫ | |
894 | 1173 zc111 {z} z<px ⟪ az , ch-is-sup u1 u1<x u1-is-sup fc ⟫ = ⟪ az , ch-is-sup u1 ? ? ? ⟫ |
873 | 1174 |
863 | 1175 zc11 : (¬ xSUP (UnionCF A f mf ay supf0 px) x ) ∨ (HasPrev A pchain x f ) |
864 | 1176 → {z : Ordinal} → OD.def (od pchain1) z → OD.def (od pchain) z ∨ ( (supf0 px ≡ px) ∧ FClosure A f px z ) |
863 | 1177 zc11 P {z} ⟪ az , ch-init fc ⟫ = case1 ⟪ az , ch-init fc ⟫ |
1178 zc11 P {z} ⟪ az , ch-is-sup u1 u1<x u1-is-sup fc ⟫ with trio< u1 px | |
890 | 1179 ... | tri< u1<px ¬b ¬c = case1 ⟪ az , ch-is-sup u1 ? ? fc ⟫ |
872 | 1180 ... | tri≈ ¬a eq ¬c = case2 ⟪ subst (λ k → supf0 k ≡ k) eq s1u=u , subst (λ k → FClosure A f k z) zc12 ? ⟫ where |
863 | 1181 s1u=u : supf0 u1 ≡ u1 |
872 | 1182 s1u=u = ? -- ChainP.supu=u u1-is-sup |
864 | 1183 zc12 : supf0 u1 ≡ px |
872 | 1184 zc12 = trans s1u=u eq |
863 | 1185 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 |
1186 eq : u1 ≡ x | |
1187 eq with trio< u1 x | |
1188 ... | tri< a ¬b ¬c = ⊥-elim ( ¬p<x<op ⟪ px<u , subst (λ k → u1 o< k ) (sym (Oprev.oprev=x op )) a ⟫ ) | |
1189 ... | tri≈ ¬a b ¬c = b | |
890 | 1190 ... | tri> ¬a ¬b c = ⊥-elim ( o<> u1<x ? ) |
863 | 1191 s1u=x : supf0 u1 ≡ x |
872 | 1192 s1u=x = trans ? eq |
863 | 1193 zc13 : osuc px o< osuc u1 |
1194 zc13 = o≤-refl0 ( trans (Oprev.oprev=x op) (sym eq ) ) | |
1195 x<sup : {w : Ordinal} → odef (UnionCF A f mf ay supf0 px) w → (w ≡ x) ∨ (w << x) | |
872 | 1196 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
|
1197 x<sup {w} ⟪ az , ch-is-sup u u≤x is-sup fc ⟫ with osuc-≡< ( supf-mono (ordtrans (o<→≤ u≤x) ? )) |
890 | 1198 ... | case1 eq1 = ⊥-elim ( o<¬≡ zc14 ? ) where |
851 | 1199 zc14 : u ≡ osuc px |
1200 zc14 = begin | |
1201 u ≡⟨ sym ( ChainP.supu=u is-sup) ⟩ | |
894 | 1202 supf0 u ≡⟨ ? ⟩ |
857 | 1203 supf0 u1 ≡⟨ s1u=x ⟩ |
851 | 1204 x ≡⟨ sym (Oprev.oprev=x op) ⟩ |
1205 osuc px ∎ where open ≡-Reasoning | |
872 | 1206 ... | case2 lt = subst (λ k → (w ≡ k) ∨ (w << k)) s1u=x ? |
863 | 1207 zc12 : supf0 x ≡ u1 |
872 | 1208 zc12 = subst (λ k → supf0 k ≡ u1) eq ? |
863 | 1209 zcsup : xSUP (UnionCF A f mf ay supf0 px) x |
868 | 1210 zcsup = record { ax = subst (λ k → odef A k) (trans zc12 eq) (ZChain.asupf zc) |
851 | 1211 ; is-sup = record { x<sup = x<sup } } |
872 | 1212 zc11 (case2 hp) {z} ⟪ az , ch-is-sup u1 u1<x u1-is-sup fc ⟫ | tri> ¬a ¬b px<u = case1 ? where |
863 | 1213 eq : u1 ≡ x |
864 | 1214 eq with trio< u1 x |
1215 ... | tri< a ¬b ¬c = ⊥-elim ( ¬p<x<op ⟪ px<u , subst (λ k → u1 o< k ) (sym (Oprev.oprev=x op )) a ⟫ ) | |
1216 ... | tri≈ ¬a b ¬c = b | |
890 | 1217 ... | tri> ¬a ¬b c = ⊥-elim ( o<> u1<x ? ) |
858 | 1218 zc20 : {z : Ordinal} → FClosure A f (supf0 u1) z → OD.def (od pchain) z |
1219 zc20 {z} (init asu su=z ) = zc13 where | |
1220 zc14 : x ≡ z | |
1221 zc14 = begin | |
1222 x ≡⟨ sym eq ⟩ | |
872 | 1223 u1 ≡⟨ sym ? ⟩ |
858 | 1224 supf0 u1 ≡⟨ su=z ⟩ |
1225 z ∎ where open ≡-Reasoning | |
1226 zc13 : odef pchain z | |
1227 zc13 = subst (λ k → odef pchain k) (trans (sym (HasPrev.x=fy hp)) zc14) ( ZChain.f-next zc (HasPrev.ay hp) ) | |
1228 zc20 {.(f w)} (fsuc w fc) = ZChain.f-next zc (zc20 fc) | |
891 | 1229 |
857 | 1230 record STMP {z : Ordinal} (z≤x : z o≤ x ) : Set (Level.suc n) where |
1231 field | |
891 | 1232 tsup : MinSUP A (UnionCF A f mf ay supf1 z) |
1233 tsup=sup : supf1 z ≡ MinSUP.sup tsup | |
1234 | |
857 | 1235 sup : {z : Ordinal} → (z≤x : z o≤ x ) → STMP z≤x |
1236 sup {z} z≤x with trio< z px | |
891 | 1237 ... | tri< a ¬b ¬c = ? -- jrecord { tsup = ZChain.minsup zc (o<→≤ a) ; tsup=sup = ZChain.supf-is-minsup zc (o<→≤ a) } |
1238 ... | tri≈ ¬a b ¬c = ? -- record { tsup = ZChain.minsup zc (o≤-refl0 b) ; tsup=sup = ZChain.supf-is-minsup zc (o≤-refl0 b) } | |
865 | 1239 ... | tri> ¬a ¬b px<z = zc35 where |
840 | 1240 zc30 : z ≡ x |
1241 zc30 with osuc-≡< z≤x | |
1242 ... | case1 eq = eq | |
1243 ... | case2 z<x = ⊥-elim (¬p<x<op ⟪ px<z , subst (λ k → z o< k ) (sym (Oprev.oprev=x op)) z<x ⟫ ) | |
865 | 1244 zc32 = ZChain.sup zc o≤-refl |
1245 zc34 : ¬ (supf0 px ≡ px) → {w : HOD} → UnionCF A f mf ay supf0 z ∋ w → (w ≡ SUP.sup zc32) ∨ (w < SUP.sup zc32) | |
882 | 1246 zc34 ne {w} lt with zc11 ? ⟪ proj1 lt , ? ⟫ |
864 | 1247 ... | case1 lt = SUP.x<sup zc32 lt |
865 | 1248 ... | case2 ⟪ spx=px , fc ⟫ = ⊥-elim ( ne spx=px ) |
857 | 1249 zc33 : supf0 z ≡ & (SUP.sup zc32) |
891 | 1250 zc33 = ? -- trans (sym (supfx (o≤-refl0 (sym zc30)))) ( ZChain.supf-is-minsup zc o≤-refl ) |
865 | 1251 zc36 : ¬ (supf0 px ≡ px) → STMP z≤x |
891 | 1252 zc36 ne = ? -- record { tsup = record { sup = SUP.sup zc32 ; as = SUP.as zc32 ; x<sup = zc34 ne } ; tsup=sup = zc33 } |
865 | 1253 zc35 : STMP z≤x |
1254 zc35 with trio< (supf0 px) px | |
1255 ... | tri< a ¬b ¬c = zc36 ¬b | |
1256 ... | tri> ¬a ¬b c = zc36 ¬b | |
891 | 1257 ... | tri≈ ¬a b ¬c = record { tsup = ? ; tsup=sup = ? } where |
1258 zc37 : MinSUP A (UnionCF A f mf ay supf0 z) | |
1259 zc37 = record { sup = ? ; asm = ? ; x<sup = ? } | |
803 | 1260 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
|
1261 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 | 1262 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
|
1263 ... | 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
|
1264 ... | 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 | 1265 ... | tri> ¬a ¬b px<b = zc31 ? where |
815 | 1266 zc30 : x ≡ b |
1267 zc30 with osuc-≡< b≤x | |
1268 ... | case1 eq = sym (eq) | |
1269 ... | case2 b<x = ⊥-elim (¬p<x<op ⟪ px<b , subst (λ k → b o< k ) (sym (Oprev.oprev=x op)) b<x ⟫ ) | |
859 | 1270 zcsup : xSUP (UnionCF A f mf ay supf0 px) x |
1271 zcsup with zc30 | |
1272 ... | refl = record { ax = ab ; is-sup = record { x<sup = λ {w} lt → | |
872 | 1273 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
|
1274 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
|
1275 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
|
1276 ... | refl = ⊥-elim (¬sp=x zcsup ) |
105f8d6c51fb
no-extension on immidate ordinal passed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
859
diff
changeset
|
1277 zc31 (case2 hasPrev ) with zc30 |
863 | 1278 ... | refl = ⊥-elim ( proj2 is-sup record { ax = HasPrev.ax hasPrev ; y = HasPrev.y hasPrev |
872 | 1279 ; ay = ? ; x=fy = HasPrev.x=fy hasPrev } ) |
833 | 1280 |
728 | 1281 ... | no lim = zc5 where |
726
b2e2cd12e38f
psupf-mono and is-max conflict
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
725
diff
changeset
|
1282 |
703 | 1283 pzc : (z : Ordinal) → z o< x → ZChain A f mf ay z |
1284 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
|
1285 |
835 | 1286 ysp = & (SUP.sup (ysup f mf ay)) |
755 | 1287 |
835 | 1288 supf0 : Ordinal → Ordinal |
1289 supf0 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 = ysp |
1292 ... | tri> ¬a ¬b c = ysp | |
835 | 1293 |
838 | 1294 pchain : HOD |
1295 pchain = UnionCF A f mf ay supf0 x | |
835 | 1296 |
838 | 1297 ptotal0 : IsTotalOrderSet pchain |
835 | 1298 ptotal0 {a} {b} ca cb = subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso uz01 where |
1299 uz01 : Tri (* (& a) < * (& b)) (* (& a) ≡ * (& b)) (* (& b) < * (& a) ) | |
1300 uz01 = chain-total A f mf ay supf0 ( (proj2 ca)) ( (proj2 cb)) | |
844 | 1301 |
880 | 1302 usup : MinSUP A pchain |
1303 usup = minsupP pchain (λ lt → proj1 lt) ptotal0 | |
1304 spu = MinSUP.sup usup | |
834 | 1305 |
794 | 1306 supf1 : Ordinal → Ordinal |
835 | 1307 supf1 z with trio< z x |
1308 ... | tri< a ¬b ¬c = ZChain.supf (pzc (osuc z) (ob<x lim a)) z | |
836 | 1309 ... | tri≈ ¬a b ¬c = spu |
1310 ... | tri> ¬a ¬b c = spu | |
755 | 1311 |
838 | 1312 pchain1 : HOD |
1313 pchain1 = UnionCF A f mf ay supf1 x | |
704 | 1314 |
758
a2947dfff80d
is-max on first transfinite induction is not good
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
757
diff
changeset
|
1315 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
|
1316 b o< x → (ab : odef A b) → |
836 | 1317 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
|
1318 * 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
|
1319 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
|
1320 ... | ⟪ ab0 , ch-init fc ⟫ = ⟪ ab , ch-init ( subst (λ k → FClosure A f y k) (sym (HasPrev.x=fy has-prev)) (fsuc _ fc )) ⟫ |
890 | 1321 ... | ⟪ ab0 , ch-is-sup u u≤x is-sup fc ⟫ = ? -- ⟪ ab , |
1322 -- subst (λ k → UChain A f mf ay supf x k ) | |
1323 -- (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
|
1324 |
844 | 1325 zc70 : HasPrev A pchain x f → ¬ xSUP pchain x |
1326 zc70 pr xsup = ? | |
1327 | |
1328 no-extension : ¬ ( xSUP (UnionCF A f mf ay supf0 x) x ) → ZChain A f mf ay x | |
879 | 1329 no-extension ¬sp=x = ? where -- record { supf = supf1 ; sup=u = sup=u |
1330 -- ; 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
|
1331 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
|
1332 supfu {u} a z = ZChain.supf (pzc (osuc u) (ob<x lim a)) z |
838 | 1333 pchain0=1 : pchain ≡ pchain1 |
1334 pchain0=1 = ==→o≡ record { eq→ = zc10 ; eq← = zc11 } where | |
1335 zc10 : {z : Ordinal} → OD.def (od pchain) z → OD.def (od pchain1) z | |
1336 zc10 {z} ⟪ az , ch-init fc ⟫ = ⟪ az , ch-init fc ⟫ | |
1337 zc10 {z} ⟪ az , ch-is-sup u u≤x is-sup fc ⟫ = zc12 fc where | |
1338 zc12 : {z : Ordinal} → FClosure A f (supf0 u) z → odef pchain1 z | |
1339 zc12 (fsuc x fc) with zc12 fc | |
1340 ... | ⟪ ua1 , ch-init fc₁ ⟫ = ⟪ proj2 ( mf _ ua1) , ch-init (fsuc _ fc₁) ⟫ | |
1341 ... | ⟪ ua1 , ch-is-sup u u≤x is-sup fc₁ ⟫ = ⟪ proj2 ( mf _ ua1) , ch-is-sup u u≤x is-sup (fsuc _ fc₁) ⟫ | |
890 | 1342 zc12 (init asu su=z ) = ⟪ subst (λ k → odef A k) su=z asu , ch-is-sup u ? ? (init ? ? ) ⟫ |
838 | 1343 zc11 : {z : Ordinal} → OD.def (od pchain1) z → OD.def (od pchain) z |
1344 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
|
1345 zc11 {z} ⟪ az , ch-is-sup u u≤x is-sup fc ⟫ = zc13 fc where |
838 | 1346 zc13 : {z : Ordinal} → FClosure A f (supf1 u) z → odef pchain z |
1347 zc13 (fsuc x fc) with zc13 fc | |
1348 ... | ⟪ 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
|
1349 ... | ⟪ ua1 , ch-is-sup u u≤x is-sup fc₁ ⟫ = ⟪ proj2 ( mf _ ua1) , ch-is-sup u u≤x is-sup (fsuc _ fc₁) ⟫ |
838 | 1350 zc13 (init asu su=z ) with trio< u x |
890 | 1351 ... | tri< a ¬b ¬c = ⟪ ? , ch-is-sup u ? ? (init ? ? ) ⟫ |
838 | 1352 ... | 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
|
1353 ... | tri> ¬a ¬b c = ? -- ⊥-elim ( o≤> u≤x c ) |
832 | 1354 sup : {z : Ordinal} → z o≤ x → SUP A (UnionCF A f mf ay supf1 z) |
797 | 1355 sup {z} z≤x with trio< z x |
838 | 1356 ... | tri< a ¬b ¬c = SUP⊆ ? (ZChain.sup (pzc (osuc z) {!!}) {!!} ) |
815 | 1357 ... | tri≈ ¬a b ¬c = {!!} |
843 | 1358 ... | tri> ¬a ¬b x<z = ⊥-elim (o<¬≡ refl (ordtrans<-≤ x<z z≤x )) |
832 | 1359 sis : {z : Ordinal} (x≤z : z o≤ x) → supf1 z ≡ & (SUP.sup (sup {!!})) |
843 | 1360 sis {z} z≤x with trio< z x |
800 | 1361 ... | tri< a ¬b ¬c = {!!} where |
891 | 1362 zc8 = ZChain.supf-is-minsup (pzc z a) {!!} |
815 | 1363 ... | tri≈ ¬a b ¬c = {!!} |
843 | 1364 ... | 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
|
1365 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 | 1366 sup=u {z} ab z≤x is-sup with trio< z x |
833 | 1367 ... | tri< a ¬b ¬c = ? -- ZChain.sup=u (pzc (osuc b) (ob<x lim a)) ab {!!} record { x<sup = {!!} } |
815 | 1368 ... | tri≈ ¬a b ¬c = {!!} -- ZChain.sup=u (pzc (osuc ?) ?) ab {!!} record { x<sup = {!!} } |
843 | 1369 ... | tri> ¬a ¬b x<z = ⊥-elim (o<¬≡ refl (ordtrans<-≤ x<z z≤x )) |
797 | 1370 |
703 | 1371 zc5 : ZChain A f mf ay x |
697 | 1372 zc5 with ODC.∋-p O A (* x) |
796 | 1373 ... | no noax = no-extension {!!} -- ¬ A ∋ p, just skip |
836 | 1374 ... | yes ax with ODC.p∨¬p O ( HasPrev A pchain x f ) |
703 | 1375 -- we have to check adding x preserve is-max ZChain A y f mf x |
796 | 1376 ... | case1 pr = no-extension {!!} |
704 | 1377 ... | case2 ¬fy<x with ODC.p∨¬p O (IsSup A pchain ax ) |
879 | 1378 ... | case1 is-sup = ? -- record { supf = supf1 ; sup=u = {!!} |
1379 -- ; sup = {!!} ; supf-is-sup = {!!} ; supf-mono = {!!}; asupf = {!!} } -- where -- x is a sup of (zc ?) | |
796 | 1380 ... | case2 ¬x=sup = no-extension {!!} -- x is not f y' nor sup of former ZChain from y -- no extention |
553 | 1381 |
703 | 1382 SZ : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) → {y : Ordinal} (ay : odef A y) → ZChain A f mf ay (& A) |
1383 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
|
1384 |
551 | 1385 zorn00 : Maximal A |
1386 zorn00 with is-o∅ ( & HasMaximal ) -- we have no Level (suc n) LEM | |
804 | 1387 ... | no not = record { maximal = ODC.minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) ; as = zorn01 ; ¬maximal<x = zorn02 } where |
551 | 1388 -- yes we have the maximal |
1389 zorn03 : odef HasMaximal ( & ( ODC.minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) ) ) | |
606 | 1390 zorn03 = ODC.x∋minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) -- Axiom of choice |
551 | 1391 zorn01 : A ∋ ODC.minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) |
1392 zorn01 = proj1 zorn03 | |
1393 zorn02 : {x : HOD} → A ∋ x → ¬ (ODC.minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) < x) | |
1394 zorn02 {x} ax m<x = proj2 zorn03 (& x) ax (subst₂ (λ j k → j < k) (sym *iso) (sym *iso) m<x ) | |
877 | 1395 ... | yes ¬Maximal = ⊥-elim ( z04 nmx zorn04 ) where |
551 | 1396 -- if we have no maximal, make ZChain, which contradict SUP condition |
1397 nmx : ¬ Maximal A | |
1398 nmx mx = ∅< {HasMaximal} zc5 ( ≡o∅→=od∅ ¬Maximal ) where | |
1399 zc5 : odef A (& (Maximal.maximal mx)) ∧ (( y : Ordinal ) → odef A y → ¬ (* (& (Maximal.maximal mx)) < * y)) | |
804 | 1400 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 | 1401 zorn04 : ZChain A (cf nmx) (cf-is-≤-monotonic nmx) as0 (& A) |
653 | 1402 zorn04 = SZ (cf nmx) (cf-is-≤-monotonic nmx) (subst (λ k → odef A k ) &iso as ) |
551 | 1403 |
516 | 1404 -- usage (see filter.agda ) |
1405 -- | |
497 | 1406 -- _⊆'_ : ( A B : HOD ) → Set n |
1407 -- _⊆'_ A B = (x : Ordinal ) → odef A x → odef B x | |
482 | 1408 |
497 | 1409 -- MaximumSubset : {L P : HOD} |
1410 -- → o∅ o< & L → o∅ o< & P → P ⊆ L | |
1411 -- → IsPartialOrderSet P _⊆'_ | |
1412 -- → ( (B : HOD) → B ⊆ P → IsTotalOrderSet B _⊆'_ → SUP P B _⊆'_ ) | |
1413 -- → Maximal P (_⊆'_) | |
1414 -- MaximumSubset {L} {P} 0<L 0<P P⊆L PO SP = Zorn-lemma {P} {_⊆'_} 0<P PO SP |