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