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