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