Mercurial > hg > Members > kono > Proof > ZF-in-agda
annotate src/zorn.agda @ 1087:2fa98e3c0fa3
order may come from supf-idem
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 18 Dec 2022 10:32:29 +0900 |
parents | 7ec55b1bdfc2 |
children | 125605b5bf47 |
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 |
1060 | 279 UnionCF : ( A : HOD ) ( f : Ordinal → Ordinal ) {y : Ordinal } (ay : odef A y ) ( supf : Ordinal → Ordinal ) ( x : Ordinal ) → 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
|
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 | |
1061 | 284 -- Union of chain lower than x |
1060 | 285 |
1078 | 286 data IChain {A : HOD} { f : Ordinal → Ordinal } {y : Ordinal } (ay : odef A y ) |
1063 | 287 {x : Ordinal } (supfz : {z : Ordinal } → z o< x → Ordinal) : (z : Ordinal ) → Set n where |
288 ic-init : {z : Ordinal } (fc : FClosure A f y z) → IChain ay supfz z | |
289 ic-isup : {z : Ordinal} (i : Ordinal) (i<x : i o< x) (s<x : supfz i<x o≤ i ) (fc : FClosure A f (supfz i<x) z) → IChain ay supfz z | |
1060 | 290 |
1063 | 291 UnionIC : ( A : HOD ) ( f : Ordinal → Ordinal ) { x : Ordinal } {y : Ordinal } (ay : odef A y ) (supfz : {z : Ordinal } → z o< x → Ordinal) → HOD |
1078 | 292 UnionIC A f ay supfz |
1063 | 293 = record { od = record { def = λ z → odef A z ∧ IChain {A} {f} ay supfz z } ; |
1060 | 294 odmax = & A ; <odmax = λ {y} sy → ∈∧P→o< sy } |
1028 | 295 |
966 | 296 supf-inject0 : {x y : Ordinal } {supf : Ordinal → Ordinal } → (supf-mono : {x y : Ordinal } → x o≤ y → supf x o≤ supf y ) |
297 → supf x o< supf y → x o< y | |
842 | 298 supf-inject0 {x} {y} {supf} supf-mono sx<sy with trio< x y |
299 ... | tri< a ¬b ¬c = a | |
300 ... | tri≈ ¬a refl ¬c = ⊥-elim ( o<¬≡ (cong supf refl) sx<sy ) | |
301 ... | tri> ¬a ¬b y<x with osuc-≡< (supf-mono (o<→≤ y<x) ) | |
302 ... | case1 eq = ⊥-elim ( o<¬≡ (sym eq) sx<sy ) | |
303 ... | case2 lt = ⊥-elim ( o<> sx<sy lt ) | |
304 | |
1031 | 305 record IsMinSUP ( A B : HOD ) (sup : Ordinal) : Set n where |
306 field | |
1032
382680c3e9be
minsup is not obvious in ZChain
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1031
diff
changeset
|
307 as : odef A sup |
1031 | 308 x≤sup : {x : Ordinal } → odef B x → (x ≡ sup ) ∨ (x << sup ) |
309 minsup : { sup1 : Ordinal } → odef A sup1 | |
310 → ( {x : Ordinal } → odef B x → (x ≡ sup1 ) ∨ (x << sup1 )) → sup o≤ sup1 | |
311 | |
879 | 312 record MinSUP ( A B : HOD ) : Set n where |
313 field | |
314 sup : Ordinal | |
1031 | 315 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
|
316 as = IsMinSUP.as isMinSUP |
1031 | 317 x≤sup = IsMinSUP.x≤sup isMinSUP |
318 minsup = IsMinSUP.minsup isMinSUP | |
879 | 319 |
320 z09 : {b : Ordinal } { A : HOD } → odef A b → b o< & A | |
321 z09 {b} {A} ab = subst (λ k → k o< & A) &iso ( c<→o< (subst (λ k → odef A k ) (sym &iso ) ab)) | |
322 | |
880 | 323 M→S : { A : HOD } { f : Ordinal → Ordinal } {mf : ≤-monotonic-f A f} {y : Ordinal} {ay : odef A y} { x : Ordinal } |
324 → (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
|
325 → 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
|
326 → SUP A (UnionCF A f ay supf x) |
966 | 327 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
|
328 ; 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
|
329 ms00 : {z : Ordinal} → odef (UnionCF A f ay supf x) z → (z ≡ & (* (MinSUP.sup ms))) ∨ (z << & (* (MinSUP.sup ms))) |
966 | 330 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
|
331 ... | 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
|
332 ... | case2 lt = case2 (subst (λ k → * z < k ) (sym *iso) lt ) |
880 | 333 |
867 | 334 |
966 | 335 chain-mono : {A : HOD} ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) (supf : Ordinal → Ordinal ) |
919 | 336 (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
|
337 → 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
|
338 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
|
339 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
|
340 |
1038 | 341 record ZChain ( A : HOD ) ( f : Ordinal → Ordinal ) (mf< : <-monotonic-f A f) |
783 | 342 {y : Ordinal} (ay : odef A y) ( z : Ordinal ) : Set (Level.suc n) where |
655 | 343 field |
966 | 344 supf : Ordinal → Ordinal |
1087
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
345 asupf : {x : Ordinal } → odef A (supf x) |
1028 | 346 |
880 | 347 supf-mono : {x y : Ordinal } → x o≤ y → supf x o≤ supf y |
1059 | 348 zo≤sz : {x : Ordinal } → x o≤ z → x o≤ supf x |
1042
912ca4abe806
pxhainx conditon is requied?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1041
diff
changeset
|
349 is-minsup : {x : Ordinal } → (x≤z : x o≤ z) → IsMinSUP A (UnionCF A f ay supf x) (supf x) |
1087
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
350 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 |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
351 supf-idem : {b : Ordinal } → b o≤ z → supf b o≤ z → supf (supf b) ≡ supf b |
994 | 352 |
608
6655f03984f9
mutual tranfinite in zorn
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
607
diff
changeset
|
353 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
|
354 chain = UnionCF A f ay supf z |
861 | 355 chain⊆A : chain ⊆' A |
356 chain⊆A = λ lt → proj1 lt | |
934 | 357 |
1058 | 358 chain∋init : {x : Ordinal } → odef (UnionCF A f ay supf x) y |
359 chain∋init {x} = ⟪ ay , ch-init (init ay refl) ⟫ | |
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
|
360 |
1042
912ca4abe806
pxhainx conditon is requied?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1041
diff
changeset
|
361 mf : ≤-monotonic-f A f |
1040 | 362 mf x ax = ⟪ case2 mf00 , proj2 (mf< x ax ) ⟫ where |
363 mf00 : * x < * (f x) | |
364 mf00 = proj1 ( mf< x ax ) | |
1038 | 365 |
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
|
366 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
|
367 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
|
368 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 | 369 |
966 | 370 supf-inject : {x y : Ordinal } → supf x o< supf y → x o< y |
825 | 371 supf-inject {x} {y} sx<sy with trio< x y |
372 ... | tri< a ¬b ¬c = a | |
373 ... | tri≈ ¬a refl ¬c = ⊥-elim ( o<¬≡ (cong supf refl) sx<sy ) | |
374 ... | tri> ¬a ¬b y<x with osuc-≡< (supf-mono (o<→≤ y<x) ) | |
375 ... | case1 eq = ⊥-elim ( o<¬≡ (sym eq) sx<sy ) | |
376 ... | case2 lt = ⊥-elim ( o<> sx<sy lt ) | |
798 | 377 |
1005 | 378 supf<A : {x : Ordinal } → supf x o< & A |
379 supf<A = z09 asupf | |
380 | |
1038 | 381 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 |
382 csupf {b} sb<sz sb<z = cfcs (supf-inject sb<sz) o≤-refl sb<z (init asupf refl) | |
994 | 383 |
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
|
384 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
|
385 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
|
386 |
382680c3e9be
minsup is not obvious in ZChain
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1031
diff
changeset
|
387 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
|
388 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
|
389 |
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
|
390 -- 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
|
391 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
|
392 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
|
393 , 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
|
394 ... | 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
|
395 ... | 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
|
396 |
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
|
397 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
|
398 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
|
399 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
|
400 |
1087
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
401 supfeq : {a b : Ordinal } → a o≤ z → b o≤ z → UnionCF A f ay supf a ≡ UnionCF A f ay supf b → supf a ≡ supf b |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
402 supfeq {a} {b} a≤z b≤z ua=ub with trio< (supf a) (supf b) |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
403 ... | tri< sa<sb ¬b ¬c = ⊥-elim ( o≤> ( |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
404 IsMinSUP.minsup (is-minsup b≤z) asupf (λ {z} uzb → IsMinSUP.x≤sup (is-minsup a≤z) (subst (λ k → odef k z) (sym ua=ub) uzb)) ) sa<sb ) |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
405 ... | tri≈ ¬a b ¬c = b |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
406 ... | tri> ¬a ¬b sb<sa = ⊥-elim ( o≤> ( |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
407 IsMinSUP.minsup (is-minsup a≤z) asupf (λ {z} uza → IsMinSUP.x≤sup (is-minsup b≤z) (subst (λ k → odef k z) ua=ub uza)) ) sb<sa ) |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
408 |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
409 union-max : {a b : Ordinal } → z o≤ supf a → b o≤ z → supf a o< supf b → UnionCF A f ay supf a ≡ UnionCF A f ay supf b |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
410 union-max {a} {b} z≤sa b≤z sa<sb = ==→o≡ record { eq→ = z47 ; eq← = z48 } where |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
411 z47 : {w : Ordinal } → odef (UnionCF A f ay supf a ) w → odef ( UnionCF A f ay supf b ) w |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
412 z47 {w} ⟪ aw , ch-init fc ⟫ = ⟪ aw , ch-init fc ⟫ |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
413 z47 {w} ⟪ aw , ch-is-sup u u<a su=u fc ⟫ = ⟪ aw , ch-is-sup u u<b su=u fc ⟫ where |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
414 u<b : u o< b |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
415 u<b = ordtrans u<a (supf-inject sa<sb ) |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
416 z48 : {w : Ordinal } → odef (UnionCF A f ay supf b ) w → odef ( UnionCF A f ay supf a ) w |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
417 z48 {w} ⟪ aw , ch-init fc ⟫ = ⟪ aw , ch-init fc ⟫ |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
418 z48 {w} ⟪ aw , ch-is-sup u u<b su=u fc ⟫ = ⟪ aw , ch-is-sup u u<a su=u fc ⟫ where |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
419 u<a : u o< a |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
420 u<a = supf-inject ( osucprev (begin |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
421 osuc (supf u) ≡⟨ cong osuc su=u ⟩ |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
422 osuc u ≤⟨ osucc (ordtrans<-≤ u<b b≤z ) ⟩ |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
423 z ≤⟨ z≤sa ⟩ |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
424 supf a ∎ )) where open o≤-Reasoning O |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
425 |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
426 sup=u : {b : Ordinal} → (ab : odef A b) → b o≤ z |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
427 → IsSUP A (UnionCF A f ay supf b) b → supf b ≡ b |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
428 sup=u {b} ab b≤z is-sup = z50 where |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
429 z48 : supf b o≤ b |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
430 z48 = IsMinSUP.minsup (is-minsup b≤z) ab (λ ux → IsSUP.x≤sup is-sup ux ) |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
431 z50 : supf b ≡ b |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
432 z50 with trio< (supf b) b |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
433 ... | tri< sb<b ¬b ¬c = ⊥-elim ( o≤> z47 sb<b ) where |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
434 z47 : b o≤ supf b |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
435 z47 = zo≤sz b≤z |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
436 ... | tri≈ ¬a b ¬c = b |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
437 ... | tri> ¬a ¬b b<sb = ⊥-elim ( o≤> z48 b<sb ) |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
438 |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
439 x≤supfx : {x : Ordinal } → x o≤ z → supf x o≤ z → x o≤ supf x |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
440 x≤supfx {x} x≤z sx≤z with x<y∨y≤x (supf x) x |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
441 ... | case2 le = le |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
442 ... | case1 spx<px = ⊥-elim ( <<-irr z45 (proj1 ( mf< (supf x) asupf ))) where |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
443 z46 : odef (UnionCF A f ay supf x) (f (supf x)) |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
444 z46 = ⟪ proj2 ( mf (supf x) asupf ) , ch-is-sup (supf x) spx<px z47 (fsuc _ (init asupf z47 )) ⟫ where |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
445 z47 : supf (supf x) ≡ supf x |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
446 z47 = supf-idem x≤z sx≤z |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
447 z45 : f (supf x) ≤ supf x |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
448 z45 = IsMinSUP.x≤sup (is-minsup x≤z ) z46 |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
449 |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
450 order : {a b w : Ordinal } → b o≤ z → supf a o< supf b → FClosure A f (supf a) w → w ≤ supf b |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
451 order {a} {b} {w} b≤z sa<sb fc with x<y∨y≤x (supf a) z |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
452 ... | case2 z≤sa = ⊥-elim ( o<¬≡ z27 sa<sb ) where |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
453 z27 : supf a ≡ supf b |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
454 z27 = supfeq (OrdTrans (o<→≤ (supf-inject sa<sb)) b≤z) b≤z ( union-max z≤sa b≤z sa<sb) |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
455 ... | case1 sa<z = IsMinSUP.x≤sup (is-minsup b≤z) (cfcs (supf-inject sa<sb) b≤z sa<b fc) where |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
456 sa<b : supf a o< b |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
457 sa<b with x<y∨y≤x (supf a) b |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
458 ... | case1 lt = lt |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
459 ... | case2 b≤sa = ⊥-elim ( o≤> b≤sa ( supf-inject ( osucprev ( begin |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
460 osuc (supf (supf a)) ≡⟨ cong osuc (supf-idem (ordtrans (supf-inject sa<sb) b≤z) (o<→≤ sa<z)) ⟩ |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
461 osuc (supf a) ≤⟨ osucc sa<sb ⟩ |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
462 supf b ∎ )))) where open o≤-Reasoning O |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
463 |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
464 supf-mono< : {a b : Ordinal } → b o≤ z → supf a o< supf b → supf a << supf b |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
465 supf-mono< {a} {b} b≤z sa<sb with order {a} {b} b≤z sa<sb (init asupf refl) |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
466 ... | case2 lt = lt |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
467 ... | case1 eq = ⊥-elim ( o<¬≡ eq sa<sb ) |
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
468 |
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
|
469 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
|
470 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 | 471 subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso fc-total where |
472 fc-total : Tri (* (& a) < * (& b)) (* (& a) ≡ * (& b)) (* (& b) < * (& a) ) | |
473 fc-total with trio< ua ub | |
1046 | 474 ... | 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 | 475 ... | case1 eq1 = tri≈ (λ lt → ⊥-elim (<-irr (case1 (sym ct00)) lt)) ct00 (λ lt → ⊥-elim (<-irr (case1 ct00) lt)) where |
476 ct00 : * (& a) ≡ * (& b) | |
1042
912ca4abe806
pxhainx conditon is requied?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1041
diff
changeset
|
477 ct00 = cong (*) eq1 |
912ca4abe806
pxhainx conditon is requied?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1041
diff
changeset
|
478 ... | 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
|
479 fc-total | tri≈ _ refl _ = fcn-cmp _ f mf fca fcb |
1046 | 480 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 | 481 ... | case1 eq1 = tri≈ (λ lt → ⊥-elim (<-irr (case1 (sym ct00)) lt)) ct00 (λ lt → ⊥-elim (<-irr (case1 ct00) lt)) where |
482 ct00 : * (& a) ≡ * (& b) | |
1042
912ca4abe806
pxhainx conditon is requied?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1041
diff
changeset
|
483 ct00 = cong (*) (sym eq1) |
1035 | 484 ... | 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
|
485 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
|
486 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
|
487 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
|
488 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
|
489 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
|
490 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
|
491 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
|
492 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
|
493 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
|
494 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
|
495 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
|
496 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
|
497 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
|
498 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
|
499 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
|
500 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
|
501 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
|
502 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
|
503 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
|
504 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
|
505 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
|
506 subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso (fcn-cmp y f mf fca fcb ) |
825 | 507 |
1038 | 508 record ZChain1 ( A : HOD ) ( f : Ordinal → Ordinal ) (mf< : <-monotonic-f A f) |
509 {y : Ordinal} (ay : odef A y) (zc : ZChain A f mf< ay (& A)) ( z : Ordinal ) : Set (Level.suc n) where | |
1027 | 510 supf = ZChain.supf zc |
511 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
|
512 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
|
513 → 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
|
514 → * a < * b → odef ((UnionCF A f ay supf z)) b |
1027 | 515 |
516 record Maximal ( A : HOD ) : Set (Level.suc n) where | |
517 field | |
518 maximal : HOD | |
519 as : A ∋ maximal | |
520 ¬maximal<x : {x : HOD} → A ∋ x → ¬ maximal < x -- A is Partial, use negative | |
521 | |
522 -- | |
523 -- supf in TransFinite indution may differ each other, but it is the same because of the minimul sup | |
524 -- | |
1038 | 525 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
|
526 {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 | 527 → {z : Ordinal } → z o≤ xa → ZChain.supf za z ≡ ZChain.supf zb z |
1038 | 528 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 | 529 supfa = ZChain.supf za |
530 supfb = ZChain.supf zb | |
531 ind : (x : Ordinal) → ((w : Ordinal) → w o< x → w o≤ xa → supfa w ≡ supfb w) → x o≤ xa → supfa x ≡ supfb x | |
1008 | 532 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
|
533 ma = ZChain.minsup za x≤xa |
1008 | 534 mb = ZChain.minsup zb (OrdTrans x≤xa xa≤xb ) |
535 spa = MinSUP.sup ma | |
536 spb = MinSUP.sup mb | |
537 sax=spa : supfa x ≡ spa | |
1042
912ca4abe806
pxhainx conditon is requied?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1041
diff
changeset
|
538 sax=spa = ZChain.supf-is-minsup za x≤xa |
1008 | 539 sbx=spb : supfb x ≡ spb |
540 sbx=spb = ZChain.supf-is-minsup zb (OrdTrans x≤xa xa≤xb ) | |
1007 | 541 sxa=sxb : supfa x ≡ supfb x |
542 sxa=sxb with trio< (supfa x) (supfb x) | |
543 ... | tri≈ ¬a b ¬c = b | |
544 ... | tri< a ¬b ¬c = ⊥-elim ( o≤> ( | |
545 begin | |
1008 | 546 supfb x ≡⟨ sbx=spb ⟩ |
1032
382680c3e9be
minsup is not obvious in ZChain
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1031
diff
changeset
|
547 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
|
548 spa ≡⟨ sym sax=spa ⟩ |
912ca4abe806
pxhainx conditon is requied?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1041
diff
changeset
|
549 supfa x ∎ ) a ) where |
1008 | 550 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
|
551 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
|
552 z53 ⟪ as , ch-init fc ⟫ = ⟪ as , ch-init fc ⟫ |
1034 | 553 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 |
554 ua=ub : supfa u ≡ supfb u | |
555 ua=ub = prev u u<x (ordtrans u<x x≤xa ) | |
556 z55 : FClosure A f (ZChain.supf za u) z | |
557 z55 = subst (λ k → FClosure A f k z ) (sym ua=ub) fc | |
1007 | 558 ... | tri> ¬a ¬b c = ⊥-elim ( o≤> ( |
559 begin | |
1008 | 560 supfa x ≡⟨ sax=spa ⟩ |
1032
382680c3e9be
minsup is not obvious in ZChain
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1031
diff
changeset
|
561 spa ≤⟨ MinSUP.minsup ma (MinSUP.as mb) (λ uza → MinSUP.x≤sup mb (z53 uza)) ⟩ |
1008 | 562 spb ≡⟨ sym sbx=spb ⟩ |
1042
912ca4abe806
pxhainx conditon is requied?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1041
diff
changeset
|
563 supfb x ∎ ) c ) where |
1009 | 564 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
|
565 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
|
566 z53 ⟪ as , ch-init fc ⟫ = ⟪ as , ch-init fc ⟫ |
1034 | 567 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 |
568 ub=ua : supfb u ≡ supfa u | |
569 ub=ua = sym ( prev u u<x (ordtrans u<x x≤xa )) | |
570 z55 : FClosure A f (ZChain.supf zb u) z | |
571 z55 = subst (λ k → FClosure A f k z ) (sym ub=ua) fc | |
1028 | 572 |
966 | 573 Zorn-lemma : { A : HOD } |
574 → o∅ o< & A | |
568 | 575 → ( ( B : HOD) → (B⊆A : B ⊆' A) → IsTotalOrderSet B → SUP A B ) -- SUP condition |
966 | 576 → Maximal A |
552 | 577 Zorn-lemma {A} 0<A supP = zorn00 where |
571 | 578 <-irr0 : {a b : HOD} → A ∋ a → A ∋ b → (a ≡ b ) ∨ (a < b ) → b < a → ⊥ |
579 <-irr0 {a} {b} A∋a A∋b = <-irr | |
788 | 580 z07 : {y : Ordinal} {A : HOD } → {P : Set n} → odef A y ∧ P → y o< & A |
581 z07 {y} {A} p = subst (λ k → k o< & A) &iso ( c<→o< (subst (λ k → odef A k ) (sym &iso ) (proj1 p ))) | |
530 | 582 s : HOD |
966 | 583 s = ODC.minimal O A (λ eq → ¬x<0 ( subst (λ k → o∅ o< k ) (=od∅→≡o∅ eq) 0<A )) |
568 | 584 as : A ∋ * ( & s ) |
585 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
|
586 as0 : odef A (& s ) |
6655f03984f9
mutual tranfinite in zorn
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
607
diff
changeset
|
587 as0 = subst (λ k → odef A k ) &iso as |
547 | 588 s<A : & s o< & A |
568 | 589 s<A = c<→o< (subst (λ k → odef A (& k) ) *iso as ) |
530 | 590 HasMaximal : HOD |
966 | 591 HasMaximal = record { od = record { def = λ x → odef A x ∧ ( (m : Ordinal) → odef A m → ¬ (* x < * m)) } ; odmax = & A ; <odmax = z07 } |
537 | 592 no-maximum : HasMaximal =h= od∅ → (x : Ordinal) → odef A x ∧ ((m : Ordinal) → odef A m → odef A x ∧ (¬ (* x < * m) )) → ⊥ |
966 | 593 no-maximum nomx x P = ¬x<0 (eq→ nomx {x} ⟪ proj1 P , (λ m ma p → proj2 ( proj2 P m ma ) p ) ⟫ ) |
532 | 594 Gtx : { x : HOD} → A ∋ x → HOD |
966 | 595 Gtx {x} ax = record { od = record { def = λ y → odef A y ∧ (x < (* y)) } ; odmax = & A ; <odmax = z07 } |
537 | 596 z08 : ¬ Maximal A → HasMaximal =h= od∅ |
804 | 597 z08 nmx = record { eq→ = λ {x} lt → ⊥-elim ( nmx record {maximal = * x ; as = subst (λ k → odef A k) (sym &iso) (proj1 lt) |
537 | 598 ; ¬maximal<x = λ {y} ay → subst (λ k → ¬ (* x < k)) *iso (proj2 lt (& y) ay) } ) ; eq← = λ {y} lt → ⊥-elim ( ¬x<0 lt )} |
599 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)) | |
600 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 | |
601 ¬x<m : ¬ (* x < * m) | |
966 | 602 ¬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 | 603 |
1027 | 604 -- |
605 -- we have minsup using LEM, this is similar to the proof of the axiom of choice | |
606 -- | |
966 | 607 minsupP : ( B : HOD) → (B⊆A : B ⊆' A) → IsTotalOrderSet B → MinSUP A B |
879 | 608 minsupP B B⊆A total = m02 where |
609 xsup : (sup : Ordinal ) → Set n | |
610 xsup sup = {w : Ordinal } → odef B w → (w ≡ sup ) ∨ (w << sup ) | |
611 ∀-imply-or : {A : Ordinal → Set n } {B : Set n } | |
612 → ((x : Ordinal ) → A x ∨ B) → ((x : Ordinal ) → A x) ∨ B | |
613 ∀-imply-or {A} {B} ∀AB with ODC.p∨¬p O ((x : Ordinal ) → A x) -- LEM | |
614 ∀-imply-or {A} {B} ∀AB | case1 t = case1 t | |
615 ∀-imply-or {A} {B} ∀AB | case2 x = case2 (lemma (λ not → x not )) where | |
616 lemma : ¬ ((x : Ordinal ) → A x) → B | |
617 lemma not with ODC.p∨¬p O B | |
618 lemma not | case1 b = b | |
619 lemma not | case2 ¬b = ⊥-elim (not (λ x → dont-orb (∀AB x) ¬b )) | |
620 m00 : (x : Ordinal ) → ( ( z : Ordinal) → z o< x → ¬ (odef A z ∧ xsup z) ) ∨ MinSUP A B | |
621 m00 x = TransFinite0 ind x where | |
622 ind : (x : Ordinal) → ((z : Ordinal) → z o< x → ( ( w : Ordinal) → w o< z → ¬ (odef A w ∧ xsup w )) ∨ MinSUP A B) | |
623 → ( ( w : Ordinal) → w o< x → ¬ (odef A w ∧ xsup w) ) ∨ MinSUP A B | |
624 ind x prev = ∀-imply-or m01 where | |
625 m01 : (z : Ordinal) → (z o< x → ¬ (odef A z ∧ xsup z)) ∨ MinSUP A B | |
626 m01 z with trio< z x | |
627 ... | tri≈ ¬a b ¬c = case1 ( λ lt → ⊥-elim ( ¬a lt ) ) | |
628 ... | tri> ¬a ¬b c = case1 ( λ lt → ⊥-elim ( ¬a lt ) ) | |
629 ... | tri< a ¬b ¬c with prev z a | |
630 ... | case2 mins = case2 mins | |
631 ... | 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
|
632 ... | case1 mins = case2 record { sup = z ; isMinSUP = record { as = proj1 mins ; x≤sup = proj2 mins ; minsup = m04 } } where |
879 | 633 m04 : {sup1 : Ordinal} → odef A sup1 → ({w : Ordinal} → odef B w → (w ≡ sup1) ∨ (w << sup1)) → z o≤ sup1 |
634 m04 {s} as lt with trio< z s | |
635 ... | tri< a ¬b ¬c = o<→≤ a | |
636 ... | tri≈ ¬a b ¬c = o≤-refl0 b | |
637 ... | tri> ¬a ¬b s<z = ⊥-elim ( not s s<z ⟪ as , lt ⟫ ) | |
638 ... | case2 notz = case1 (λ _ → notz ) | |
639 m03 : ¬ ((z : Ordinal) → z o< & A → ¬ odef A z ∧ xsup z) | |
1031 | 640 m03 not = ⊥-elim ( not s1 (z09 (SUP.ax S)) ⟪ SUP.ax S , m05 ⟫ ) where |
879 | 641 S : SUP A B |
642 S = supP B B⊆A total | |
643 s1 = & (SUP.sup S) | |
644 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
|
645 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
|
646 ... | 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
|
647 ... | case2 lt = case2 lt |
966 | 648 m02 : MinSUP A B |
879 | 649 m02 = dont-or (m00 (& A)) m03 |
650 | |
560 | 651 -- Uncountable ascending chain by axiom of choice |
530 | 652 cf : ¬ Maximal A → Ordinal → Ordinal |
532 | 653 cf nmx x with ODC.∋-p O A (* x) |
654 ... | no _ = o∅ | |
655 ... | yes ax with is-o∅ (& ( Gtx ax )) | |
538 | 656 ... | yes nogt = -- no larger element, so it is maximal |
657 ⊥-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 | 658 ... | no not = & (ODC.minimal O (Gtx ax) (λ eq → not (=od∅→≡o∅ eq))) |
537 | 659 is-cf : (nmx : ¬ Maximal A ) → {x : Ordinal} → odef A x → odef A (cf nmx x) ∧ ( * x < * (cf nmx x) ) |
660 is-cf nmx {x} ax with ODC.∋-p O A (* x) | |
661 ... | no not = ⊥-elim ( not (subst (λ k → odef A k ) (sym &iso) ax )) | |
662 ... | yes ax with is-o∅ (& ( Gtx ax )) | |
663 ... | 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 ⟫ ) | |
664 ... | no not = ODC.x∋minimal O (Gtx ax) (λ eq → not (=od∅→≡o∅ eq)) | |
606 | 665 |
666 --- | |
667 --- infintie ascention sequence of f | |
668 --- | |
530 | 669 cf-is-<-monotonic : (nmx : ¬ Maximal A ) → (x : Ordinal) → odef A x → ( * x < * (cf nmx x) ) ∧ odef A (cf nmx x ) |
537 | 670 cf-is-<-monotonic nmx x ax = ⟪ proj2 (is-cf nmx ax ) , proj1 (is-cf nmx ax ) ⟫ |
530 | 671 cf-is-≤-monotonic : (nmx : ¬ Maximal A ) → ≤-monotonic-f A ( cf nmx ) |
532 | 672 cf-is-≤-monotonic nmx x ax = ⟪ case2 (proj1 ( cf-is-<-monotonic nmx x ax )) , proj2 ( cf-is-<-monotonic nmx x ax ) ⟫ |
543 | 673 |
803 | 674 -- |
953 | 675 -- maximality of chain |
676 -- | |
677 -- supf is fixed for z ≡ & A , we can prove order and is-max | |
1016 | 678 -- we have supf-unique now, it is provable in the first Tranfinte induction |
803 | 679 |
992 | 680 SZ1 : ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) (mf< : <-monotonic-f A f) |
1038 | 681 {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 | 682 SZ1 f mf mf< {y} ay zc x x≤A = zc1 x x≤A where |
900 | 683 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
|
684 → odef (UnionCF A f ay (ZChain.supf zc) a) c → odef (UnionCF A f ay (ZChain.supf zc) b) c |
919 | 685 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
|
686 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
|
687 → 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
|
688 → * a < * b → odef (UnionCF A f ay (ZChain.supf zc) x) b |
920 | 689 is-max-hp x {a} {b} ua ab has-prev a<b with HasPrev.ay has-prev |
1034 | 690 ... | ⟪ ab0 , ch-init fc ⟫ = ⟪ ab , ch-init ( subst (λ k → FClosure A f y k) (sym (HasPrev.x=fy has-prev)) (fsuc _ fc )) ⟫ |
691 ... | ⟪ ab0 , ch-is-sup u u<x su=u fc ⟫ = ⟪ ab , subst (λ k → UChain ay x k ) | |
692 (sym (HasPrev.x=fy has-prev)) ( ch-is-sup u u<x su=u (fsuc _ fc)) ⟫ | |
693 | |
869 | 694 supf = ZChain.supf zc |
695 | |
1038 | 696 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
|
697 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
|
698 ... | 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
|
699 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
|
700 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
|
701 b o< x → (ab : odef A b) → |
1034 | 702 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
|
703 * 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
|
704 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
|
705 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 | 706 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
|
707 ... | 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
|
708 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
|
709 b<A = z09 ab |
9a85233384f7
is-max and supf b = supf x
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
987
diff
changeset
|
710 m05 : ZChain.supf zc b ≡ b |
1078 | 711 m05 = ZChain.sup=u zc ab (o<→≤ (z09 ab) ) record { ax = ab ; x≤sup = λ {z} uz → IsSUP.x≤sup (proj2 is-sup) uz } |
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 m10 : odef (UnionCF A f ay supf x) b |
1039 | 713 m10 = ZChain.cfcs zc b<x x≤A (subst (λ k → k o< x) (sym m05) b<x) (init (ZChain.asupf zc) m05) |
992 | 714 ... | 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
|
715 m17 : MinSUP A (UnionCF A f ay supf x) -- supf z o< supf ( supf x ) |
992 | 716 m17 = ZChain.minsup zc x≤A |
1042
912ca4abe806
pxhainx conditon is requied?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1041
diff
changeset
|
717 m18 : supf x ≡ MinSUP.sup m17 |
992 | 718 m18 = ZChain.supf-is-minsup zc x≤A |
990 | 719 m10 : f (supf b) ≡ supf b |
720 m10 = fc-stop A f mf (ZChain.asupf zc) m11 sb=sx where | |
721 m11 : {z : Ordinal} → FClosure A f (supf b) z → (z ≡ ZChain.supf zc x) ∨ (z << ZChain.supf zc x) | |
722 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
|
723 m04 : ¬ HasPrev A (UnionCF A f ay supf b) f b |
1019 | 724 m04 nhp = proj1 is-sup ( record { ax = HasPrev.ax nhp ; y = HasPrev.y nhp ; ay = |
725 chain-mono1 (o<→≤ b<x) (HasPrev.ay nhp) ; x=fy = HasPrev.x=fy nhp } ) | |
726 m05 : ZChain.supf zc b ≡ b | |
1078 | 727 m05 = ZChain.sup=u zc ab (o<→≤ (z09 ab) ) record { ax = ab ; x≤sup = λ {z} uz → IsSUP.x≤sup (proj2 is-sup) uz } |
1019 | 728 m14 : ZChain.supf zc b o< x |
729 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
|
730 m13 : odef (UnionCF A f ay supf x) z |
1039 | 731 m13 = ZChain.cfcs zc b<x x≤A m14 fc |
989 | 732 |
1024
ab72526316bd
supf-< and ZChain1.order is removed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1023
diff
changeset
|
733 ... | 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
|
734 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
|
735 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
|
736 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
|
737 * 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
|
738 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
|
739 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 |
1058 | 740 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 ) |
1034 | 741 ... | 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 | 742 ... | 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
|
743 ... | 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
|
744 m09 : b o< & A |
9a85233384f7
is-max and supf b = supf x
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
987
diff
changeset
|
745 m09 = subst (λ k → k o< & A) &iso ( c<→o< (subst (λ k → odef A k ) (sym &iso ) ab)) |
9a85233384f7
is-max and supf b = supf x
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
987
diff
changeset
|
746 m05 : ZChain.supf zc b ≡ b |
1078 | 747 m05 = ZChain.sup=u zc ab (o<→≤ m09) record { ax = ab ; x≤sup = λ lt → IsSUP.x≤sup (proj2 is-sup) 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
|
748 m10 : odef (UnionCF A f ay supf x) b |
1039 | 749 m10 = ZChain.cfcs zc b<x x≤A (subst (λ k → k o< x) (sym m05) b<x) (init (ZChain.asupf zc) m05) |
992 | 750 ... | 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
|
751 m17 : MinSUP A (UnionCF A f ay supf x) -- supf z o< supf ( supf x ) |
992 | 752 m17 = ZChain.minsup zc x≤A |
1042
912ca4abe806
pxhainx conditon is requied?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1041
diff
changeset
|
753 m18 : supf x ≡ MinSUP.sup m17 |
992 | 754 m18 = ZChain.supf-is-minsup zc x≤A |
990 | 755 m10 : f (supf b) ≡ supf b |
756 m10 = fc-stop A f mf (ZChain.asupf zc) m11 sb=sx where | |
757 m11 : {z : Ordinal} → FClosure A f (supf b) z → (z ≡ ZChain.supf zc x) ∨ (z << ZChain.supf zc x) | |
758 m11 {z} fc = subst (λ k → (z ≡ k) ∨ (z << k)) (sym m18) ( MinSUP.x≤sup m17 m13 ) where | |
1078 | 759 m05 = ZChain.sup=u zc ab (o<→≤ (z09 ab) ) record { ax = ab ; x≤sup = λ {z} uz → IsSUP.x≤sup (proj2 is-sup) uz } |
1019 | 760 m14 : ZChain.supf zc b o< x |
761 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
|
762 m13 : odef (UnionCF A f ay supf x) z |
1039 | 763 m13 = ZChain.cfcs zc b<x x≤A m14 fc |
727 | 764 |
757 | 765 uchain : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) → HOD |
966 | 766 uchain f mf {y} ay = record { od = record { def = λ x → FClosure A f y x } ; odmax = & A ; <odmax = |
757 | 767 λ {z} cz → subst (λ k → k o< & A) &iso ( c<→o< (subst (λ k → odef A k ) (sym &iso ) (A∋fc y f mf cz ))) } |
768 | |
966 | 769 utotal : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) |
757 | 770 → IsTotalOrderSet (uchain f mf ay) |
966 | 771 utotal f mf {y} ay {a} {b} ca cb = subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso uz01 where |
757 | 772 uz01 : Tri (* (& a) < * (& b)) (* (& a) ≡ * (& b)) (* (& b) < * (& a) ) |
773 uz01 = fcn-cmp y f mf ca cb | |
774 | |
966 | 775 ysup : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) |
928 | 776 → MinSUP A (uchain f mf ay) |
966 | 777 ysup f mf {y} ay = minsupP (uchain f mf ay) (λ lt → A∋fc y f mf lt) (utotal f mf ay) |
757 | 778 |
965
1c1c6a6ed4fa
removing ch-init is no good because of initialization
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
964
diff
changeset
|
779 |
793 | 780 SUP⊆ : { B C : HOD } → B ⊆' C → SUP A C → SUP A B |
1031 | 781 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 | 782 |
1007 | 783 zc43 : (x sp1 : Ordinal ) → ( x o< sp1 ) ∨ ( sp1 o≤ x ) |
784 zc43 x sp1 with trio< x sp1 | |
785 ... | tri< a ¬b ¬c = case1 a | |
786 ... | tri≈ ¬a b ¬c = case2 (o≤-refl0 (sym b)) | |
787 ... | tri> ¬a ¬b c = case2 (o<→≤ c) | |
788 | |
560 | 789 -- |
547 | 790 -- create all ZChains under o< x |
560 | 791 -- |
608
6655f03984f9
mutual tranfinite in zorn
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
607
diff
changeset
|
792 |
1038 | 793 ind : ( f : Ordinal → Ordinal ) → (mf< : <-monotonic-f A f ) {y : Ordinal} (ay : odef A y) → (x : Ordinal) |
794 → ((z : Ordinal) → z o< x → ZChain A f mf< ay z) → ZChain A f mf< ay x | |
795 ind f mf< {y} ay x prev with Oprev-p x | |
954 | 796 ... | yes op = zc41 where |
682 | 797 -- |
798 -- we have previous ordinal to use induction | |
799 -- | |
800 px = Oprev.oprev op | |
1038 | 801 zc : ZChain A f mf< ay (Oprev.oprev op) |
966 | 802 zc = prev px (subst (λ k → px o< k) (Oprev.oprev=x op) <-osuc ) |
682 | 803 px<x : px o< x |
804 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
|
805 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
|
806 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
|
807 |
709 | 808 zc-b<x : (b : Ordinal ) → b o< x → b o< osuc px |
966 | 809 zc-b<x b lt = subst (λ k → b o< k ) (sym (Oprev.oprev=x op)) lt |
697 | 810 |
754 | 811 supf0 = ZChain.supf zc |
869 | 812 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
|
813 pchain = UnionCF A f ay supf0 px |
835 | 814 |
966 | 815 supf-mono : {a b : Ordinal } → a o≤ b → supf0 a o≤ supf0 b |
857 | 816 supf-mono = ZChain.supf-mono zc |
844 | 817 |
861 | 818 zc04 : {b : Ordinal} → b o≤ x → (b o≤ px ) ∨ (b ≡ x ) |
966 | 819 zc04 {b} b≤x with trio< b px |
861 | 820 ... | tri< a ¬b ¬c = case1 (o<→≤ a) |
821 ... | tri≈ ¬a b ¬c = case1 (o≤-refl0 b) | |
822 ... | tri> ¬a ¬b px<b with osuc-≡< b≤x | |
823 ... | case1 eq = case2 eq | |
966 | 824 ... | case2 b<x = ⊥-elim ( ¬p<x<op ⟪ px<b , subst (λ k → b o< k ) (sym (Oprev.oprev=x op)) b<x ⟫ ) |
840 | 825 |
1042
912ca4abe806
pxhainx conditon is requied?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1041
diff
changeset
|
826 mf : ≤-monotonic-f A f |
1039 | 827 mf x ax = ⟪ case2 mf00 , proj2 (mf< x ax ) ⟫ where |
828 mf00 : * x < * (f x) | |
829 mf00 = proj1 ( mf< x ax ) | |
1038 | 830 |
954 | 831 -- |
832 -- find the next value of supf | |
833 -- | |
834 | |
835 pchainpx : HOD | |
1034 | 836 pchainpx = record { od = record { def = λ z → (odef A z ∧ UChain ay px z ) |
1043 | 837 ∨ (FClosure A f (supf0 px) z ∧ (supf0 px o< x)) } ; odmax = & A ; <odmax = zc00 } where |
838 zc00 : {z : Ordinal } → (odef A z ∧ UChain ay px z ) ∨ (FClosure A f (supf0 px) z ∧ (supf0 px o< x) )→ z o< & A | |
966 | 839 zc00 {z} (case1 lt) = z07 lt |
1043 | 840 zc00 {z} (case2 fc) = z09 ( A∋fc (supf0 px) f mf (proj1 fc) ) |
954 | 841 |
1043 | 842 zc02 : { a b : Ordinal } → odef A a ∧ UChain ay px a → FClosure A f (supf0 px) b ∧ ( supf0 px o< x) → a ≤ b |
843 zc02 {a} {b} ca fb = zc05 (proj1 fb) where | |
1031 | 844 zc05 : {b : Ordinal } → FClosure A f (supf0 px) b → a ≤ b |
954 | 845 zc05 (fsuc b1 fb ) with proj1 ( mf b1 (A∋fc (supf0 px) f mf fb )) |
1034 | 846 ... | case1 eq = subst (λ k → a ≤ k ) eq (zc05 fb) |
1031 | 847 ... | case2 lt = ≤-ftrans (zc05 fb) (case2 lt) |
1034 | 848 zc05 (init b1 refl) = MinSUP.x≤sup (ZChain.minsup zc o≤-refl) ca |
966 | 849 |
954 | 850 ptotal : IsTotalOrderSet pchainpx |
1034 | 851 ptotal (case1 a) (case1 b) = ZChain.f-total zc a b |
954 | 852 ptotal {a0} {b0} (case1 a) (case2 b) with zc02 a b |
853 ... | case1 eq = tri≈ (<-irr (case1 (sym eq1))) eq1 (<-irr (case1 eq1)) where | |
854 eq1 : a0 ≡ b0 | |
855 eq1 = subst₂ (λ j k → j ≡ k ) *iso *iso (cong (*) eq ) | |
856 ... | case2 lt = tri< lt1 (λ eq → <-irr (case1 (sym eq)) lt1) (<-irr (case2 lt1)) where | |
857 lt1 : a0 < b0 | |
858 lt1 = subst₂ (λ j k → j < k ) *iso *iso lt | |
859 ptotal {b0} {a0} (case2 b) (case1 a) with zc02 a b | |
860 ... | case1 eq = tri≈ (<-irr (case1 eq1)) (sym eq1) (<-irr (case1 (sym eq1))) where | |
861 eq1 : a0 ≡ b0 | |
862 eq1 = subst₂ (λ j k → j ≡ k ) *iso *iso (cong (*) eq ) | |
863 ... | case2 lt = tri> (<-irr (case2 lt1)) (λ eq → <-irr (case1 eq) lt1) lt1 where | |
864 lt1 : a0 < b0 | |
865 lt1 = subst₂ (λ j k → j < k ) *iso *iso lt | |
1043 | 866 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 | 867 |
954 | 868 pcha : pchainpx ⊆' A |
869 pcha (case1 lt) = proj1 lt | |
1043 | 870 pcha (case2 fc) = A∋fc _ f mf (proj1 fc) |
966 | 871 |
872 sup1 : MinSUP A pchainpx | |
954 | 873 sup1 = minsupP pchainpx pcha ptotal |
874 sp1 = MinSUP.sup sup1 | |
875 | |
876 -- | |
877 -- supf0 px o≤ sp1 | |
966 | 878 -- |
879 | |
1043 | 880 sfpx≤sp1 : supf0 px o< x → supf0 px ≤ sp1 |
881 sfpx≤sp1 spx<x = MinSUP.x≤sup sup1 (case2 ⟪ init (ZChain.asupf zc {px}) refl , spx<x ⟫ ) | |
1034 | 882 |
1043 | 883 m13 : supf0 px o< x → supf0 px o≤ sp1 |
884 m13 spx<x = IsMinSUP.minsup (ZChain.is-minsup zc o≤-refl ) (MinSUP.as sup1) m14 where | |
1034 | 885 m14 : {z : Ordinal} → odef (UnionCF A f ay (ZChain.supf zc) px) z → (z ≡ sp1) ∨ (z << sp1) |
1046 | 886 m14 {z} uz = MinSUP.x≤sup sup1 (case1 uz) |
1034 | 887 |
1038 | 888 zc41 : ZChain A f mf< ay x |
1078 | 889 zc41 = record { supf = supf1 ; asupf = asupf1 ; supf-mono = supf1-mono ; order = order |
1071 | 890 ; zo≤sz = zo≤sz ; is-minsup = is-minsup ; cfcs = cfcs } where |
883 | 891 |
871 | 892 supf1 : Ordinal → Ordinal |
966 | 893 supf1 z with trio< z px |
871 | 894 ... | tri< a ¬b ¬c = supf0 z |
966 | 895 ... | tri≈ ¬a b ¬c = supf0 z |
901 | 896 ... | tri> ¬a ¬b c = sp1 |
871 | 897 |
886 | 898 sf1=sf0 : {z : Ordinal } → z o≤ px → supf1 z ≡ supf0 z |
901 | 899 sf1=sf0 {z} z≤px with trio< z px |
874 | 900 ... | tri< a ¬b ¬c = refl |
901 | 901 ... | tri≈ ¬a b ¬c = refl |
902 ... | tri> ¬a ¬b c = ⊥-elim ( o≤> z≤px c ) | |
883 | 903 |
901 | 904 sf1=sp1 : {z : Ordinal } → px o< z → supf1 z ≡ sp1 |
905 sf1=sp1 {z} px<z with trio< z px | |
906 ... | tri< a ¬b ¬c = ⊥-elim ( o<> px<z a ) | |
907 ... | tri≈ ¬a b ¬c = ⊥-elim ( o<¬≡ (sym b) px<z ) | |
908 ... | tri> ¬a ¬b c = refl | |
873 | 909 |
968 | 910 sf=eq : { z : Ordinal } → z o< x → supf0 z ≡ supf1 z |
911 sf=eq {z} z<x = sym (sf1=sf0 (subst (λ k → z o< k ) (sym (Oprev.oprev=x op)) z<x )) | |
912 | |
903 | 913 asupf1 : {z : Ordinal } → odef A (supf1 z) |
914 asupf1 {z} with trio< z px | |
966 | 915 ... | tri< a ¬b ¬c = ZChain.asupf zc |
916 ... | 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
|
917 ... | tri> ¬a ¬b c = MinSUP.as sup1 |
903 | 918 |
966 | 919 supf1-mono : {a b : Ordinal } → a o≤ b → supf1 a o≤ supf1 b |
920 supf1-mono {a} {b} a≤b with trio< b px | |
901 | 921 ... | tri< a ¬b ¬c = subst₂ (λ j k → j o≤ k ) (sym (sf1=sf0 (o<→≤ (ordtrans≤-< a≤b a)))) refl ( supf-mono a≤b ) |
922 ... | 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 ) | |
923 supf1-mono {a} {b} a≤b | tri> ¬a ¬b c with trio< a px | |
924 ... | 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
|
925 zc21 : MinSUP A (UnionCF A f ay supf0 a) |
901 | 926 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
|
927 zc24 : {x₁ : Ordinal} → odef (UnionCF A f ay supf0 a) x₁ → (x₁ ≡ sp1) ∨ (x₁ << sp1) |
950 | 928 zc24 {x₁} ux = MinSUP.x≤sup sup1 (case1 (chain-mono f mf ay supf0 (ZChain.supf-mono zc) (o<→≤ a<px) ux ) ) |
966 | 929 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
|
930 zc19 = subst (λ k → k o≤ sp1) (sym (ZChain.supf-is-minsup zc (o<→≤ a<px))) ( MinSUP.minsup zc21 (MinSUP.as sup1) zc24 ) |
901 | 931 ... | 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
|
932 zc21 : MinSUP A (UnionCF A f ay supf0 a) |
901 | 933 zc21 = ZChain.minsup zc (o≤-refl0 b) |
934 zc20 : MinSUP.sup zc21 ≡ supf0 a | |
966 | 935 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
|
936 zc24 : {x₁ : Ordinal} → odef (UnionCF A f ay supf0 a) x₁ → (x₁ ≡ sp1) ∨ (x₁ << sp1) |
950 | 937 zc24 {x₁} ux = MinSUP.x≤sup sup1 (case1 (chain-mono f mf ay supf0 (ZChain.supf-mono zc) (o≤-refl0 b) ux ) ) |
966 | 938 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
|
939 zc18 = subst (λ k → k o≤ sp1) zc20( MinSUP.minsup zc21 (MinSUP.as sup1) zc24 ) |
901 | 940 ... | tri> ¬a ¬b c = o≤-refl |
885 | 941 |
966 | 942 fcup : {u z : Ordinal } → FClosure A f (supf1 u) z → u o≤ px → FClosure A f (supf0 u) z |
903 | 943 fcup {u} {z} fc u≤px = subst (λ k → FClosure A f k z ) (sf1=sf0 u≤px) fc |
966 | 944 fcpu : {u z : Ordinal } → FClosure A f (supf0 u) z → u o≤ px → FClosure A f (supf1 u) z |
903 | 945 fcpu {u} {z} fc u≤px = subst (λ k → FClosure A f k z ) (sym (sf1=sf0 u≤px)) fc |
967 | 946 |
999
3ffbdd53d1ea
fcs<sup requires <-monotonicity
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
998
diff
changeset
|
947 -- 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
|
948 -- |
1042
912ca4abe806
pxhainx conditon is requied?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1041
diff
changeset
|
949 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
|
950 → 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 | 951 cfcs {a} {b} {w} a<b b≤x sa<b fc with zc43 (supf0 a) px |
1012 | 952 ... | case2 px≤sa = z50 where |
1023 | 953 a<x : a o< x |
954 a<x = ordtrans<-≤ a<b b≤x | |
1012 | 955 a≤px : a o≤ px |
956 a≤px = subst (λ k → a o< k) (sym (Oprev.oprev=x op)) (ordtrans<-≤ a<b b≤x) | |
957 -- supf0 a ≡ px we cannot use previous cfcs, it is in the chain because | |
958 -- 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
|
959 z50 : odef (UnionCF A f ay supf1 b) w |
1012 | 960 z50 with osuc-≡< px≤sa |
1034 | 961 ... | case1 px=sa = ⟪ A∋fc {A} _ f mf fc , cp ⟫ where |
1023 | 962 sa≤px : supf0 a o≤ px |
963 sa≤px = subst₂ (λ j k → j o< k) px=sa (sym (Oprev.oprev=x op)) px<x | |
1026 | 964 spx=sa : supf0 px ≡ supf0 a |
965 spx=sa = begin | |
1042
912ca4abe806
pxhainx conditon is requied?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1041
diff
changeset
|
966 supf0 px ≡⟨ cong supf0 px=sa ⟩ |
1039 | 967 supf0 (supf0 a) ≡⟨ ZChain.supf-idem zc a≤px sa≤px ⟩ |
1026 | 968 supf0 a ∎ where open ≡-Reasoning |
1020 | 969 z51 : supf0 px o< b |
1042
912ca4abe806
pxhainx conditon is requied?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1041
diff
changeset
|
970 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
|
971 supf0 a ≡⟨ sym (sf1=sf0 a≤px) ⟩ |
1025 | 972 supf1 a ∎ )) sa<b where open ≡-Reasoning |
1020 | 973 z52 : supf1 a ≡ supf1 (supf0 px) |
1042
912ca4abe806
pxhainx conditon is requied?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1041
diff
changeset
|
974 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
|
975 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
|
976 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
|
977 supf1 (supf0 a) ≡⟨ cong supf1 (sym spx=sa) ⟩ |
1025 | 978 supf1 (supf0 px) ∎ where open ≡-Reasoning |
979 z53 : supf1 (supf0 px) ≡ supf0 px | |
980 z53 = begin | |
1042
912ca4abe806
pxhainx conditon is requied?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1041
diff
changeset
|
981 supf1 (supf0 px) ≡⟨ cong supf1 spx=sa ⟩ |
912ca4abe806
pxhainx conditon is requied?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1041
diff
changeset
|
982 supf1 (supf0 a) ≡⟨ sf1=sf0 sa≤px ⟩ |
912ca4abe806
pxhainx conditon is requied?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1041
diff
changeset
|
983 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
|
984 supf0 px ∎ where open ≡-Reasoning |
1034 | 985 cp : UChain ay b w |
1042
912ca4abe806
pxhainx conditon is requied?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1041
diff
changeset
|
986 cp = ch-is-sup (supf0 px) z51 z53 (subst (λ k → FClosure A f k w) z52 fc) |
1020 | 987 ... | 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 |
988 z53 : supf1 a o< x | |
989 z53 = ordtrans<-≤ sa<b b≤x | |
1012 | 990 ... | case1 sa<px with trio< a px |
996 | 991 ... | 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
|
992 z50 : odef (UnionCF A f ay supf1 b) w |
997 | 993 z50 with osuc-≡< b≤x |
1042
912ca4abe806
pxhainx conditon is requied?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1041
diff
changeset
|
994 ... | 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
|
995 ... | ⟪ az , ch-init fc ⟫ = ⟪ az , ch-init fc ⟫ |
1034 | 996 ... | ⟪ 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 |
997 u≤px : u o≤ px | |
998 u≤px = subst (λ k → u o< k) (sym (Oprev.oprev=x op)) (ordtrans<-≤ u<b b≤x ) | |
999 u<x : u o< x | |
1042
912ca4abe806
pxhainx conditon is requied?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1041
diff
changeset
|
1000 u<x = ordtrans<-≤ u<b b≤x |
912ca4abe806
pxhainx conditon is requied?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1041
diff
changeset
|
1001 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
|
1002 ... | ⟪ az , ch-init fc ⟫ = ⟪ az , ch-init fc ⟫ |
1034 | 1003 ... | ⟪ 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 ? |
1004 u<b : u o< b | |
1005 u<b = subst (λ k → u o< k ) (trans (Oprev.oprev=x op) (sym eq) ) (ordtrans u<px <-osuc ) | |
1006 u<x : u o< x | |
1007 u<x = subst (λ k → u o< k ) (Oprev.oprev=x op) ( ordtrans u<px <-osuc ) | |
1000 | 1008 ... | 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
|
1009 -- a ≡ px , b ≡ x, sp o≤ x |
995 | 1010 px<b : px o< b |
1011 px<b = subst₂ (λ j k → j o< k) a=px refl a<b | |
1012 b=x : b ≡ x | |
1013 b=x with trio< b x | |
996 | 1014 ... | 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 | 1015 ... | tri≈ ¬a b ¬c = b |
996 | 1016 ... | tri> ¬a ¬b c = ⊥-elim ( o≤> b≤x c ) -- x o< b |
997 | 1017 z51 : FClosure A f (supf1 px) w |
1018 z51 = subst (λ k → FClosure A f k w) (sym (trans (cong supf1 (sym a=px)) (sf1=sf0 (o≤-refl0 a=px) ))) fc | |
1001 | 1019 z53 : odef A w |
1020 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
|
1021 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
|
1022 csupf1 with zc43 px (supf0 px) |
912ca4abe806
pxhainx conditon is requied?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1041
diff
changeset
|
1023 ... | 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
|
1024 z54 : supf0 px o< b |
912ca4abe806
pxhainx conditon is requied?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1041
diff
changeset
|
1025 z54 = subst (λ k → supf0 px o< k ) (trans (Oprev.oprev=x op) (sym b=x) ) spx≤px |
1003 | 1026 z52 : supf1 (supf0 px) ≡ supf0 px |
1042
912ca4abe806
pxhainx conditon is requied?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1041
diff
changeset
|
1027 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
|
1028 fc1 : FClosure A f (supf1 (supf0 px)) w |
1004 | 1029 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
|
1030 ... | 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
|
1031 z54 : supf0 px o≤ px |
912ca4abe806
pxhainx conditon is requied?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1041
diff
changeset
|
1032 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
|
1033 |
996 | 1034 ... | 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 | 1035 |
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
|
1036 zc11 : {z : Ordinal} → odef (UnionCF A f ay supf1 x) z → odef pchainpx z |
1034 | 1037 zc11 {z} ⟪ az , ch-init fc ⟫ = case1 ⟪ az , ch-init fc ⟫ |
1038 zc11 {z} ⟪ az , ch-is-sup u u<x su=u fc ⟫ = zc21 fc where | |
1039 zc21 : {z1 : Ordinal } → FClosure A f (supf1 u) z1 → odef pchainpx z1 | |
903 | 1040 zc21 {z1} (fsuc z2 fc ) with zc21 fc |
1034 | 1041 ... | case1 ⟪ ua1 , ch-init fc₁ ⟫ = case1 ⟪ proj2 ( mf _ ua1) , ch-init (fsuc _ fc₁) ⟫ |
1042 ... | 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 | 1043 ... | 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
|
1044 zc21 (init asp refl ) with trio< (supf0 u) (supf0 px) |
1036 | 1045 ... | 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 |
1046 u<px : u o< px | |
1047 u<px = ZChain.supf-inject zc a | |
1048 asp0 : odef A (supf0 u) | |
1049 asp0 = ZChain.asupf zc | |
1043 | 1050 ... | tri≈ ¬a b ¬c = case2 ⟪ (init (subst (λ k → odef A k) b (ZChain.asupf zc) ) |
1044 | 1051 (sym (trans (sf1=sf0 (zc-b<x _ u<x)) b ))) , spx<x ⟫ where |
1052 spx<x : supf0 px o< x | |
1053 spx<x = osucprev ( begin | |
1054 osuc (supf0 px) ≡⟨ cong osuc (sym b) ⟩ | |
1055 osuc (supf0 u) ≡⟨ cong osuc (sym (sf1=sf0 (zc-b<x _ u<x) )) ⟩ | |
1056 osuc (supf1 u) ≡⟨ cong osuc su=u ⟩ | |
1057 osuc u ≤⟨ osucc u<x ⟩ | |
1058 x ∎ ) where open o≤-Reasoning O | |
1036 | 1059 ... | 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 | 1060 |
1035 | 1061 is-minsup : {z : Ordinal} → z o≤ x → IsMinSUP A (UnionCF A f ay supf1 z) (supf1 z) |
1062 is-minsup {z} z≤x with osuc-≡< z≤x | |
1036 | 1063 ... | case1 z=x = record { as = zc22 ; x≤sup = z23 ; minsup = z24 } where |
1064 px<z : px o< z | |
1042
912ca4abe806
pxhainx conditon is requied?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1041
diff
changeset
|
1065 px<z = subst (λ k → px o< k) (sym z=x) px<x |
1036 | 1066 zc22 : odef A (supf1 z) |
1067 zc22 = subst (λ k → odef A k ) (sym (sf1=sp1 px<z )) ( MinSUP.as sup1 ) | |
1068 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
|
1069 z23 {w} uz = subst (λ k → w ≤ k ) (sym (sf1=sp1 px<z)) ( MinSUP.x≤sup sup1 ( |
1078 | 1070 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
|
1071 z24 : {s : Ordinal } → odef A s → ( {w : Ordinal } → odef ( UnionCF A f ay supf1 z ) w → w ≤ s ) |
1036 | 1072 → supf1 z o≤ s |
1073 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
|
1074 z25 : {w : Ordinal } → odef pchainpx w → w ≤ s |
1043 | 1075 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
|
1076 -- z=x , supf0 px o< x |
912ca4abe806
pxhainx conditon is requied?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1041
diff
changeset
|
1077 z28 : supf0 px o< z -- supf0 px ≡ supf1 px o≤ supf1 x ≡ sp1 o≤ x ≡ z |
1044 | 1078 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
|
1079 z29 : supf0 px o≤ px |
1044 | 1080 z29 = zc-b<x _ (proj2 fc) |
1040 | 1081 z27 : supf1 (supf0 px) ≡ supf0 px |
1082 z27 = trans (sf1=sf0 z29) ( ZChain.supf-idem zc o≤-refl z29 ) | |
1083 fc1 : FClosure A f (supf1 (supf0 px)) w | |
1043 | 1084 fc1 = subst (λ k → FClosure A f k w) (sym z27) (proj1 fc) |
1036 | 1085 z25 {w} (case1 ⟪ ua , ch-init fc ⟫) = sup ⟪ ua , ch-init fc ⟫ |
1086 z25 {w} (case1 ⟪ ua , ch-is-sup u u<x su=u fc ⟫) = sup ⟪ ua , ch-is-sup u u<z | |
1087 (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
|
1088 u≤px : u o< osuc px |
912ca4abe806
pxhainx conditon is requied?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1041
diff
changeset
|
1089 u≤px = ordtrans u<x <-osuc |
912ca4abe806
pxhainx conditon is requied?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1041
diff
changeset
|
1090 u<z : u o< z |
912ca4abe806
pxhainx conditon is requied?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1041
diff
changeset
|
1091 u<z = ordtrans u<x (subst (λ k → px o< k ) (sym z=x) px<x ) |
1036 | 1092 ... | case2 z<x = record { as = zc22 ; x≤sup = z23 ; minsup = z24 } where |
1093 z≤px = zc-b<x _ z<x | |
1094 m = ZChain.is-minsup zc z≤px | |
1095 zc22 : odef A (supf1 z) | |
1096 zc22 = subst (λ k → odef A k ) (sym (sf1=sf0 z≤px)) ( IsMinSUP.as m ) | |
1097 z23 : {w : Ordinal } → odef ( UnionCF A f ay supf1 z ) w → w ≤ supf1 z | |
1098 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
|
1099 z23 {w} ⟪ ua , ch-is-sup u u<x su=u fc ⟫ = subst (λ k → w ≤ k ) (sym (sf1=sf0 z≤px)) |
1036 | 1100 (IsMinSUP.x≤sup m ⟪ ua , ch-is-sup u u<x (trans (sym (sf1=sf0 u≤px )) su=u) (fcup fc u≤px ) ⟫ ) where |
1101 u≤px : u o≤ px | |
1102 u≤px = ordtrans u<x z≤px | |
1103 z24 : {s : Ordinal } → odef A s → ( {w : Ordinal } → odef ( UnionCF A f ay supf1 z ) w → w ≤ s ) | |
1104 → supf1 z o≤ s | |
1105 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
|
1106 z25 : {w : Ordinal } → odef ( UnionCF A f ay supf0 z ) w → w ≤ s |
1036 | 1107 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
|
1108 z25 {w} ⟪ ua , ch-is-sup u u<x su=u fc ⟫ = sup ⟪ ua , ch-is-sup u u<x |
1036 | 1109 (trans (sf1=sf0 u≤px) su=u) (fcpu fc u≤px) ⟫ where |
1110 u≤px : u o≤ px | |
1111 u≤px = ordtrans u<x z≤px | |
885 | 1112 |
1059 | 1113 zo≤sz : {z : Ordinal} → z o≤ x → z o≤ supf1 z |
1114 zo≤sz {z} z≤x with osuc-≡< z≤x | |
1115 ... | case2 z<x = subst (λ k → z o≤ k) (sym (sf1=sf0 (zc-b<x _ z<x ))) (ZChain.zo≤sz zc (zc-b<x _ z<x )) | |
1116 ... | case1 refl with osuc-≡< (supf1-mono (o<→≤ (px<x))) -- px o≤ supf1 px o≤ supf1 x ≡ sp1 → x o≤ sp1 | |
1078 | 1117 ... | case2 lt = begin |
1118 x ≡⟨ sym (Oprev.oprev=x op) ⟩ | |
1119 osuc px ≤⟨ osucc (ZChain.zo≤sz zc o≤-refl) ⟩ | |
1120 osuc (supf0 px) ≡⟨ sym (cong osuc (sf1=sf0 o≤-refl )) ⟩ | |
1121 osuc (supf1 px) ≤⟨ osucc lt ⟩ | |
1059 | 1122 supf1 x ∎ where open o≤-Reasoning O |
1123 ... | case1 spx=sx with osuc-≡< ( ZChain.zo≤sz zc o≤-refl ) | |
1124 ... | case2 lt = begin | |
1078 | 1125 x ≡⟨ sym (Oprev.oprev=x op) ⟩ |
1126 osuc px ≤⟨ osucc lt ⟩ | |
1127 supf0 px ≡⟨ sym (sf1=sf0 o≤-refl) ⟩ | |
1128 supf1 px ≤⟨ supf1-mono (o<→≤ px<x) ⟩ | |
1059 | 1129 supf1 x ∎ where open o≤-Reasoning O |
1130 ... | case1 px=spx = ⊥-elim ( <<-irr zc40 (proj1 ( mf< (supf0 px) (ZChain.asupf zc))) ) where | |
1131 zc37 : supf0 px ≡ px | |
1132 zc37 = sym px=spx | |
1133 zc39 : supf0 px ≡ sp1 | |
1134 zc39 = begin | |
1135 supf0 px ≡⟨ sym (sf1=sf0 o≤-refl) ⟩ | |
1136 supf1 px ≡⟨ spx=sx ⟩ | |
1137 supf1 x ≡⟨ sf1=sp1 px<x ⟩ | |
1138 sp1 ∎ where open ≡-Reasoning | |
1078 | 1139 zc40 : f (supf0 px) ≤ supf0 px |
1140 zc40 = subst (λ k → f (supf0 px) ≤ k ) (sym zc39) | |
1059 | 1141 ( MinSUP.x≤sup sup1 (case2 ⟪ fsuc _ (init (ZChain.asupf zc) refl) , subst (λ k → k o< x) (sym zc37) px<x ⟫ )) |
1142 | |
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
|
1143 ... | no lim with trio< x o∅ |
1042
912ca4abe806
pxhainx conditon is requied?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1041
diff
changeset
|
1144 ... | tri< a ¬b ¬c = ⊥-elim ( ¬x<0 a ) |
1083 | 1145 ... | tri≈ ¬a x=0 ¬c = record { supf = λ _ → MinSUP.sup (ysup f mf ay) ; asupf = MinSUP.as (ysup f mf ay) |
1087
2fa98e3c0fa3
order may come from supf-idem
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1084
diff
changeset
|
1146 ; supf-mono = λ _ → o≤-refl |
1081 | 1147 ; zo≤sz = zo≤sz ; is-minsup = is-minsup ; cfcs = λ a<b b≤0 → ⊥-elim ( ¬x<0 (subst (λ k → _ o< k ) x=0 (ordtrans<-≤ a<b b≤0))) } where |
1148 mf : ≤-monotonic-f A f | |
1149 mf x ax = ⟪ case2 mf00 , proj2 (mf< x ax ) ⟫ where | |
1150 mf00 : * x < * (f x) | |
1151 mf00 = proj1 ( mf< x ax ) | |
1152 ym = MinSUP.sup (ysup f mf ay) | |
1083 | 1153 |
1081 | 1154 zo≤sz : {z : Ordinal} → z o≤ x → z o≤ MinSUP.sup (ysup f mf ay) |
1155 zo≤sz {z} z≤x with osuc-≡< z≤x | |
1083 | 1156 ... | case1 refl = subst (λ k → k o≤ _) (sym x=0) o∅≤z |
1081 | 1157 ... | case2 lt = ⊥-elim ( ¬x<0 (subst (λ k → z o< k ) x=0 lt ) ) |
1083 | 1158 |
1081 | 1159 is-minsup : {z : Ordinal} → z o≤ x → |
1160 IsMinSUP A (UnionCF A f ay (λ _ → MinSUP.sup (ysup f mf ay)) z) (MinSUP.sup (ysup f mf ay)) | |
1161 is-minsup {z} z≤x with osuc-≡< z≤x | |
1162 ... | case1 refl = record { as = MinSUP.as (ysup f mf ay) ; x≤sup = λ {w} uw → is00 uw ; minsup = λ {s} as sup → is01 as sup } where | |
1163 is00 : {w : Ordinal } → odef (UnionCF A f ay (λ _ → MinSUP.sup (ysup f mf ay)) x ) w → w ≤ MinSUP.sup (ysup f mf ay) | |
1164 is00 {w} ⟪ aw , ch-init fc ⟫ = MinSUP.x≤sup (ysup f mf ay) fc | |
1165 is00 {w} ⟪ aw , ch-is-sup u u<z su=u fc ⟫ = ⊥-elim (¬x<0 (subst (λ k → u o< k ) x=0 u<z )) | |
1166 is01 : { s : Ordinal } → odef A s → ( {w : Ordinal } → odef (UnionCF A f ay (λ _ → MinSUP.sup (ysup f mf ay)) x ) w → w ≤ s ) | |
1167 → ym o≤ s | |
1168 is01 {s} as sup = MinSUP.minsup (ysup f mf ay) as is02 where | |
1169 is02 : {w : Ordinal } → odef (uchain f mf ay) w → (w ≡ s) ∨ (w << s) | |
1170 is02 fc = sup ⟪ A∋fc _ f mf fc , ch-init fc ⟫ | |
1171 ... | case2 lt = ⊥-elim ( ¬x<0 (subst (λ k → z o< k ) x=0 lt ) ) | |
1083 | 1172 ... | tri> ¬a ¬b 0<x = record { supf = supf1 ; asupf = asupf ; supf-mono = supf-mono ; order = order |
1081 | 1173 ; zo≤sz = zo≤sz ; is-minsup = 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
|
1174 |
1042
912ca4abe806
pxhainx conditon is requied?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1041
diff
changeset
|
1175 mf : ≤-monotonic-f A f |
1039 | 1176 mf x ax = ⟪ case2 mf00 , proj2 (mf< x ax ) ⟫ where |
1177 mf00 : * x < * (f x) | |
1178 mf00 = proj1 ( mf< x ax ) | |
1038 | 1179 |
1039 | 1180 pzc : {z : Ordinal} → z o< x → ZChain A f mf< ay z |
1009 | 1181 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
|
1182 |
928 | 1183 ysp = MinSUP.sup (ysup f mf ay) |
755 | 1184 |
1010
f80d525e6a6b
Recursive record IChain
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1009
diff
changeset
|
1185 supfz : {z : Ordinal } → z o< x → Ordinal |
f80d525e6a6b
Recursive record IChain
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1009
diff
changeset
|
1186 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
|
1187 |
1069 | 1188 pchainU : HOD |
1078 | 1189 pchainU = UnionIC A f ay supfz |
1012 | 1190 |
1042
912ca4abe806
pxhainx conditon is requied?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1041
diff
changeset
|
1191 zeq : {xa xb z : Ordinal } |
912ca4abe806
pxhainx conditon is requied?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1041
diff
changeset
|
1192 → (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
|
1193 → 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
|
1194 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
|
1195 (pzc xa<x) (pzc xb<x) z≤xa |
835 | 1196 |
1042
912ca4abe806
pxhainx conditon is requied?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1041
diff
changeset
|
1197 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
|
1198 iceq refl = cong supfz o<-irr |
1027 | 1199 |
1063 | 1200 IChain-i : {z : Ordinal } → IChain ay supfz z → Ordinal |
1201 IChain-i (ic-init fc) = o∅ | |
1202 IChain-i (ic-isup ia ia<x sa<x fca) = ia | |
1027 | 1203 |
1063 | 1204 pic<x : {z : Ordinal } → (ic : IChain ay supfz z ) → osuc (IChain-i ic) o< x |
1205 pic<x {z} (ic-init fc) = ob<x lim 0<x -- 0<x ∧ lim x → osuc o∅ o< x | |
1078 | 1206 pic<x {z} (ic-isup ia ia<x sa<x fca) = ob<x lim ia<x |
1063 | 1207 |
1069 | 1208 pchainU⊆chain : {z : Ordinal } → (pz : odef pchainU z) → odef (ZChain.chain (pzc (pic<x (proj2 pz)))) z |
1209 pchainU⊆chain {z} ⟪ aw , ic-init fc ⟫ = ⟪ aw , ch-init fc ⟫ | |
1210 pchainU⊆chain {z} ⟪ aw , (ic-isup ia ia<x sa<x fca) ⟫ = ZChain.cfcs (pzc (ob<x lim ia<x) ) <-osuc o≤-refl uz03 fca where | |
1063 | 1211 uz02 : FClosure A f (ZChain.supf (pzc (ob<x lim ia<x)) ia ) z |
1212 uz02 = fca | |
1213 uz03 : ZChain.supf (pzc (ob<x lim ia<x)) ia o≤ ia | |
1214 uz03 = sa<x | |
1062 | 1215 |
1078 | 1216 chain⊆pchainU : {z w : Ordinal } → (oz<x : osuc z o< x) → odef (ZChain.chain (pzc oz<x)) w → odef pchainU w |
1069 | 1217 chain⊆pchainU {z} {w} oz<x ⟪ aw , ch-init fc ⟫ = ⟪ aw , ic-init fc ⟫ |
1078 | 1218 chain⊆pchainU {z} {w} oz<x ⟪ aw , ch-is-sup u u<oz su=u fc ⟫ |
1064 | 1219 = ⟪ aw , ic-isup u u<x (o≤-refl0 su≡u) (subst (λ k → FClosure A f k w ) su=su fc) ⟫ where |
1220 u<x : u o< x | |
1221 u<x = ordtrans u<oz oz<x | |
1222 su=su : ZChain.supf (pzc oz<x) u ≡ supfz u<x | |
1223 su=su = sym ( zeq _ _ (osucc u<oz) (o<→≤ <-osuc) ) | |
1224 su≡u : supfz u<x ≡ u | |
1078 | 1225 su≡u = begin |
1064 | 1226 ZChain.supf (pzc (ob<x lim u<x )) u ≡⟨ sym su=su ⟩ |
1227 ZChain.supf (pzc oz<x) u ≡⟨ su=u ⟩ | |
1078 | 1228 u ∎ where open ≡-Reasoning |
1064 | 1229 |
1078 | 1230 chain⊆pchainU1 : {z w : Ordinal } → (z<x : z o< x) → odef (UnionCF A f ay (ZChain.supf (pzc (ob<x lim z<x))) z) w → odef pchainU w |
1072 | 1231 chain⊆pchainU1 {z} {w} z<x ⟪ aw , ch-init fc ⟫ = ⟪ aw , ic-init fc ⟫ |
1078 | 1232 chain⊆pchainU1 {z} {w} z<x ⟪ aw , ch-is-sup u u<oz su=u fc ⟫ |
1072 | 1233 = ⟪ aw , ic-isup u u<x (o≤-refl0 su≡u) (subst (λ k → FClosure A f k w ) su=su fc) ⟫ where |
1234 u<x : u o< x | |
1235 u<x = ordtrans u<oz z<x | |
1236 su=su : ZChain.supf (pzc (ob<x lim z<x)) u ≡ supfz u<x | |
1237 su=su = sym ( zeq _ _ (o<→≤ (osucc u<oz)) (o<→≤ <-osuc) ) | |
1238 su≡u : supfz u<x ≡ u | |
1078 | 1239 su≡u = begin |
1072 | 1240 ZChain.supf (pzc (ob<x lim u<x )) u ≡⟨ sym su=su ⟩ |
1241 ZChain.supf (pzc (ob<x lim z<x)) u ≡⟨ su=u ⟩ | |
1078 | 1242 u ∎ where open ≡-Reasoning |
1072 | 1243 |
1064 | 1244 ichain-inject : {a b : Ordinal } {ia : IChain ay supfz a } {ib : IChain ay supfz b } |
1245 → ZChain.supf (pzc (pic<x ia)) (IChain-i ia) o< ZChain.supf (pzc (pic<x ib)) (IChain-i ib) | |
1246 → IChain-i ia o< IChain-i ib | |
1065 | 1247 ichain-inject {a} {b} {ia} {ib} sa<sb = uz11 where |
1248 uz11 : IChain-i ia o< IChain-i ib | |
1249 uz11 with trio< (IChain-i ia ) (IChain-i ib) | |
1250 ... | tri< a ¬b ¬c = a | |
1078 | 1251 ... | tri≈ ¬a b ¬c = ⊥-elim ( o<¬≡ (trans (zeq _ _ (o≤-refl0 (cong osuc b)) (o<→≤ <-osuc) ) |
1065 | 1252 ( cong (ZChain.supf (pzc (pic<x ib))) b )) sa<sb ) |
1253 ... | tri> ¬a ¬b c = ⊥-elim ( o≤> ( begin | |
1078 | 1254 ZChain.supf (pzc (pic<x ib)) (IChain-i ib) ≡⟨ zeq _ _ (o<→≤ (osucc c)) (o<→≤ <-osuc) ⟩ |
1255 ZChain.supf (pzc (pic<x ia)) (IChain-i ib) ≤⟨ ZChain.supf-mono (pzc (pic<x ia)) (o<→≤ c) ⟩ | |
1065 | 1256 ZChain.supf (pzc (pic<x ia)) (IChain-i ia) ∎ ) sa<sb ) where open o≤-Reasoning O |
1062 | 1257 |
1068 | 1258 IC⊆ : {a b : Ordinal } (ia : IChain ay supfz a ) (ib : IChain ay supfz b ) |
1083 | 1259 → IChain-i ia o< IChain-i ib → odef (ZChain.chain (pzc (pic<x ib))) a |
1260 IC⊆ {a} {b} (ic-init fc ) ib ia<ib = ⟪ A∋fc _ f mf fc , ch-init fc ⟫ | |
1084 | 1261 IC⊆ {a} {b} (ic-isup i i<x sa<x fc ) (ic-init fcb ) ia<ib = ⊥-elim ( ¬x<0 ia<ib ) |
1083 | 1262 IC⊆ {a} {b} (ic-isup i i<x sa<x fc ) (ic-isup j j<x sb<x fcb ) ia<ib |
1263 = ZChain.cfcs (pzc (ob<x lim j<x) ) (o<→≤ ia<ib) o≤-refl (OrdTrans (ZChain.supf-mono (pzc (ob<x lim j<x)) (o<→≤ ia<ib)) sb<x) | |
1264 (subst (λ k → FClosure A f k a) (zeq _ _ (osucc (o<→≤ ia<ib)) (o<→≤ <-osuc)) fc ) | |
1068 | 1265 |
1069 | 1266 ptotalU : IsTotalOrderSet pchainU |
1267 ptotalU {a} {b} ia ib with trio< (IChain-i (proj2 ia)) (IChain-i (proj2 ib)) | |
1083 | 1268 ... | tri< ia<ib ¬b ¬c = ZChain.f-total (pzc (pic<x (proj2 ib))) (IC⊆ (proj2 ia) (proj2 ib) ia<ib) (pchainU⊆chain ib) |
1269 ... | tri≈ ¬a ia=ib ¬c = subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso ( pcmp (proj2 ia) (proj2 ib) ia=ib ) where | |
1270 pcmp : (ia : IChain ay supfz (& a)) → (ib : IChain ay supfz (& b)) → IChain-i ia ≡ IChain-i ib | |
1271 → Tri (* (& a) < * (& b)) (* (& a) ≡ * (& b)) (* (& b) < * (& a) ) | |
1272 pcmp (ic-init fca) (ic-init fcb) eq = fcn-cmp _ f mf fca fcb | |
1273 pcmp (ic-init fca) (ic-isup i i<x s<x fcb) eq with ZChain.fcy<sup (pzc i<x) o≤-refl fca | |
1274 ... | case1 eq1 = ct22 where | |
1275 ct22 : Tri (* (& a) < * (& b)) (* (& a) ≡ * (& b)) (* (& b) < * (& a) ) | |
1276 ct22 with subst (λ k → k ≤ & b) (sym (zeq _ _ (o<→≤ <-osuc) o≤-refl )) (s≤fc _ f mf fcb ) | |
1277 ... | case1 eq2 = tri≈ (λ lt → ⊥-elim (<-irr (case1 (sym ct00)) lt)) ct00 (λ lt → ⊥-elim (<-irr (case1 ct00) lt)) where | |
1278 ct00 : * (& a) ≡ * (& b) | |
1279 ct00 = cong (*) (trans eq1 eq2) | |
1280 ... | case2 lt = tri< fc11 (λ eq → <-irr (case1 (sym eq)) fc11) (λ lt → <-irr (case2 fc11) lt) where | |
1281 fc11 : * (& a) < * (& b) | |
1282 fc11 = subst (λ k → k < * (& b) ) (cong (*) (sym eq1)) lt | |
1283 ... | case2 lt = tri< fc11 (λ eq → <-irr (case1 (sym eq)) fc11) (λ lt → <-irr (case2 fc11) lt) where | |
1284 fc11 : * (& a) < * (& b) | |
1285 fc11 = ftrans<-≤ lt (subst (λ k → k ≤ & b) (sym (zeq _ _ (o<→≤ <-osuc) o≤-refl )) (s≤fc _ f mf fcb ) ) | |
1286 pcmp (ic-isup i i<x s<x fca) (ic-init fcb) eq with ZChain.fcy<sup (pzc i<x) o≤-refl fcb | |
1287 ... | case1 eq1 = ct22 where | |
1288 ct22 : Tri (* (& a) < * (& b)) (* (& a) ≡ * (& b)) (* (& b) < * (& a) ) | |
1289 ct22 with subst (λ k → k ≤ & a) (sym (zeq _ _ (o<→≤ <-osuc) o≤-refl )) (s≤fc _ f mf fca ) | |
1290 ... | case1 eq2 = tri≈ (λ lt → ⊥-elim (<-irr (case1 (sym ct00)) lt)) ct00 (λ lt → ⊥-elim (<-irr (case1 ct00) lt)) where | |
1291 ct00 : * (& a) ≡ * (& b) | |
1292 ct00 = cong (*) (sym (trans eq1 eq2)) | |
1293 ... | case2 lt = tri> (λ lt → <-irr (case2 fc11) lt) (λ eq → <-irr (case1 eq) fc11) fc11 where | |
1294 fc11 : * (& b) < * (& a) | |
1295 fc11 = subst (λ k → k < * (& a) ) (cong (*) (sym eq1)) lt | |
1296 ... | case2 lt = tri> (λ lt → <-irr (case2 fc12) lt) (λ eq → <-irr (case1 eq) fc12) fc12 where | |
1297 fc12 : * (& b) < * (& a) | |
1298 fc12 = ftrans<-≤ lt (subst (λ k → k ≤ & a) (sym (zeq _ _ (o<→≤ <-osuc) o≤-refl )) (s≤fc _ f mf fca ) ) | |
1299 pcmp (ic-isup i i<x s<x fca) (ic-isup i i<y s<y fcb) refl = fcn-cmp _ f mf fca (subst (λ k → FClosure A f k (& b)) pc01 fcb ) where | |
1300 pc01 : supfz i<y ≡ supfz i<x | |
1301 pc01 = cong supfz o<-irr | |
1302 ... | tri> ¬a ¬b ib<ia = ZChain.f-total (pzc (pic<x (proj2 ia))) (pchainU⊆chain ia) (IC⊆ (proj2 ib) (proj2 ia) ib<ia) | |
1303 | |
1069 | 1304 |
1305 usup : MinSUP A pchainU | |
1306 usup = minsupP pchainU (λ ic → proj1 ic ) ptotalU | |
1307 spu = MinSUP.sup usup | |
1308 | |
1309 | |
1310 pchainS : HOD | |
1311 pchainS = record { od = record { def = λ z → (odef A z ∧ IChain ay supfz z ) | |
1312 ∨ (FClosure A f spu z ∧ (spu o< x)) } ; odmax = & A ; <odmax = zc00 } where | |
1313 zc00 : {z : Ordinal } → (odef A z ∧ IChain ay supfz z ) ∨ (FClosure A f spu z ∧ (spu o< x) )→ z o< & A | |
1314 zc00 {z} (case1 lt) = z07 lt | |
1315 zc00 {z} (case2 fc) = z09 ( A∋fc spu f mf (proj1 fc) ) | |
1316 | |
1317 zc02 : { a b : Ordinal } → odef A a ∧ IChain ay supfz a → FClosure A f spu b ∧ ( spu o< x) → a ≤ b | |
1318 zc02 {a} {b} ca fb = zc05 (proj1 fb) where | |
1319 zc05 : {b : Ordinal } → FClosure A f spu b → a ≤ b | |
1320 zc05 (fsuc b1 fb ) with proj1 ( mf b1 (A∋fc spu f mf fb )) | |
1321 ... | case1 eq = subst (λ k → a ≤ k ) eq (zc05 fb) | |
1322 ... | case2 lt = ≤-ftrans (zc05 fb) (case2 lt) | |
1323 zc05 (init b1 refl) = MinSUP.x≤sup usup ca | |
966 | 1324 |
1069 | 1325 ptotalS : IsTotalOrderSet pchainS |
1326 ptotalS (case1 a) (case1 b) = ptotalU a b | |
1327 ptotalS {a0} {b0} (case1 a) (case2 b) with zc02 a b | |
1328 ... | case1 eq = tri≈ (<-irr (case1 (sym eq1))) eq1 (<-irr (case1 eq1)) where | |
1329 eq1 : a0 ≡ b0 | |
1330 eq1 = subst₂ (λ j k → j ≡ k ) *iso *iso (cong (*) eq ) | |
1331 ... | case2 lt = tri< lt1 (λ eq → <-irr (case1 (sym eq)) lt1) (<-irr (case2 lt1)) where | |
1332 lt1 : a0 < b0 | |
1333 lt1 = subst₂ (λ j k → j < k ) *iso *iso lt | |
1334 ptotalS {b0} {a0} (case2 b) (case1 a) with zc02 a b | |
1335 ... | case1 eq = tri≈ (<-irr (case1 eq1)) (sym eq1) (<-irr (case1 (sym eq1))) where | |
1336 eq1 : a0 ≡ b0 | |
1337 eq1 = subst₂ (λ j k → j ≡ k ) *iso *iso (cong (*) eq ) | |
1338 ... | case2 lt = tri> (<-irr (case2 lt1)) (λ eq → <-irr (case1 eq) lt1) lt1 where | |
1339 lt1 : a0 < b0 | |
1340 lt1 = subst₂ (λ j k → j < k ) *iso *iso lt | |
1341 ptotalS (case2 a) (case2 b) = subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso (fcn-cmp spu f mf (proj1 a) (proj1 b)) | |
1342 | |
1343 S⊆A : pchainS ⊆' A | |
1344 S⊆A (case1 lt) = proj1 lt | |
1345 S⊆A (case2 fc) = A∋fc _ f mf (proj1 fc) | |
1346 | |
1347 ssup : MinSUP A pchainS | |
1348 ssup = minsupP pchainS S⊆A ptotalS | |
1349 | |
1350 sps = MinSUP.sup ssup | |
834 | 1351 |
794 | 1352 supf1 : Ordinal → Ordinal |
835 | 1353 supf1 z with trio< z x |
1069 | 1354 ... | tri< a ¬b ¬c = ZChain.supf (pzc (ob<x lim a)) z -- each sup o< x |
1355 ... | tri≈ ¬a b ¬c = spu -- sup of all sup o< x | |
1078 | 1356 ... | tri> ¬a ¬b c = sps -- sup of spu which o< x |
1069 | 1357 -- if x o< spu, spu is not included in UnionCF x |
1358 -- the chain | |
755 | 1359 |
1010
f80d525e6a6b
Recursive record IChain
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1009
diff
changeset
|
1360 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
|
1361 pchain = UnionCF A f ay supf1 x |
1010
f80d525e6a6b
Recursive record IChain
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1009
diff
changeset
|
1362 |
1069 | 1363 -- pchain ⊆ pchainU ⊆ pchianS |
1009 | 1364 |
1042
912ca4abe806
pxhainx conditon is requied?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1041
diff
changeset
|
1365 sf1=sf : {z : Ordinal } → (a : z o< x ) → supf1 z ≡ ZChain.supf (pzc (ob<x lim a)) z |
1009 | 1366 sf1=sf {z} z<x with trio< z x |
1367 ... | tri< a ¬b ¬c = cong ( λ k → ZChain.supf (pzc (ob<x lim k)) z) o<-irr | |
1368 ... | tri≈ ¬a b ¬c = ⊥-elim (¬a z<x) | |
1369 ... | tri> ¬a ¬b c = ⊥-elim (¬a z<x) | |
1370 | |
1071 | 1371 sf1=spu : {z : Ordinal } → x ≡ z → supf1 z ≡ spu |
1372 sf1=spu {z} eq with trio< z x | |
1078 | 1373 ... | tri< a ¬b ¬c = ⊥-elim (¬b (sym eq)) |
1009 | 1374 ... | tri≈ ¬a b ¬c = refl |
1078 | 1375 ... | tri> ¬a ¬b c = ⊥-elim (¬b (sym eq)) |
1009 | 1376 |
1071 | 1377 sf1=sps : {z : Ordinal } → (a : x o< z ) → supf1 z ≡ sps |
1378 sf1=sps {z} x<z with trio< z x | |
1379 ... | tri< a ¬b ¬c = ⊥-elim (o<> x<z a) | |
1380 ... | tri≈ ¬a b ¬c = ⊥-elim (¬c x<z ) | |
1381 ... | tri> ¬a ¬b c = refl | |
1069 | 1382 |
1057 | 1383 asupf : {z : Ordinal } → odef A (supf1 z) |
1384 asupf {z} with trio< z x | |
1078 | 1385 ... | tri< a ¬b ¬c = ZChain.asupf (pzc (ob<x lim a)) |
1057 | 1386 ... | tri≈ ¬a b ¬c = MinSUP.as usup |
1069 | 1387 ... | tri> ¬a ¬b c = MinSUP.as ssup |
1057 | 1388 |
1389 supf-mono : {z y : Ordinal } → z o≤ y → supf1 z o≤ supf1 y | |
1390 supf-mono {z} {y} z≤y with trio< y x | |
1071 | 1391 ... | tri< y<x ¬b ¬c = zc01 where |
1057 | 1392 open o≤-Reasoning O |
1071 | 1393 zc01 : supf1 z o≤ ZChain.supf (pzc (ob<x lim y<x)) y |
1072 | 1394 zc01 = begin |
1395 supf1 z ≡⟨ sf1=sf (ordtrans≤-< z≤y y<x) ⟩ | |
1396 ZChain.supf (pzc (ob<x lim (ordtrans≤-< z≤y y<x))) z ≡⟨ zeq _ _ (osucc z≤y) (o<→≤ <-osuc) ⟩ | |
1070 | 1397 ZChain.supf (pzc (ob<x lim y<x)) z ≤⟨ ZChain.supf-mono (pzc (ob<x lim y<x)) z≤y ⟩ |
1078 | 1398 ZChain.supf (pzc (ob<x lim y<x)) y ∎ |
1072 | 1399 ... | tri≈ ¬a b ¬c = zc01 where -- supf1 z o≤ spu |
1400 open o≤-Reasoning O | |
1401 zc01 : supf1 z o≤ spu | |
1402 zc01 with osuc-≡< (subst (λ k → z o≤ k) b z≤y) | |
1403 ... | case1 z=x = o≤-refl0 (sf1=spu (sym z=x)) | |
1078 | 1404 ... | case2 z<x = subst (λ k → k o≤ spu ) (sym (sf1=sf z<x)) ( IsMinSUP.minsup (ZChain.is-minsup (pzc (ob<x lim z<x)) (o<→≤ <-osuc) ) |
1072 | 1405 (MinSUP.as usup) (λ uw → MinSUP.x≤sup usup (chain⊆pchainU1 z<x uw)) ) |
1406 ... | tri> ¬a ¬b c = zc01 where -- supf1 z o≤ sps | |
1407 zc01 : supf1 z o≤ sps | |
1408 zc01 with trio< z x | |
1078 | 1409 ... | tri< z<x ¬b ¬c = IsMinSUP.minsup (ZChain.is-minsup (pzc (ob<x lim z<x)) (o<→≤ <-osuc) ) |
1072 | 1410 (MinSUP.as ssup) (λ uw → MinSUP.x≤sup ssup (case1 (chain⊆pchainU1 z<x uw)) ) |
1411 ... | tri≈ ¬a z=x ¬c = MinSUP.minsup usup (MinSUP.as ssup) (λ uw → MinSUP.x≤sup ssup (case1 uw) ) | |
1412 ... | tri> ¬a ¬b c = o≤-refl -- (sf1=sps c) | |
797 | 1413 |
1035 | 1414 is-minsup : {z : Ordinal} → z o≤ x → IsMinSUP A (UnionCF A f ay supf1 z) (supf1 z) |
1073 | 1415 is-minsup {z} z≤x with osuc-≡< z≤x |
1075 | 1416 ... | case1 z=x = record { as = asupf ; x≤sup = zm00 ; minsup = zm01 } where |
1078 | 1417 zm00 : {w : Ordinal } → odef (UnionCF A f ay supf1 z) w → w ≤ supf1 z |
1418 zm00 {w} ⟪ az , ch-init fc ⟫ = subst (λ k → w ≤ k ) (sym (sf1=spu (sym z=x))) ( MinSUP.x≤sup usup ⟪ az , ic-init fc ⟫ ) | |
1419 zm00 {w} ⟪ az , ch-is-sup u u<b su=u fc ⟫ = subst (λ k → w ≤ k ) (sym (sf1=spu (sym z=x))) | |
1076 | 1420 ( MinSUP.x≤sup usup ⟪ az , ic-isup u u<x (o≤-refl0 zm05) (subst (λ k → FClosure A f k w) (sym zm06) fc) ⟫ ) where |
1421 u<x : u o< x | |
1422 u<x = subst (λ k → u o< k) z=x u<b | |
1423 zm06 : supfz (subst (λ k → u o< k) z=x u<b) ≡ supf1 u | |
1424 zm06 = trans (zeq _ _ o≤-refl (o<→≤ <-osuc) ) (sym (sf1=sf u<x )) | |
1078 | 1425 zm05 : supfz (subst (λ k → u o< k) z=x u<b) ≡ u |
1076 | 1426 zm05 = trans zm06 su=u |
1075 | 1427 zm01 : { s : Ordinal } → odef A s → ( {x : Ordinal } → odef (UnionCF A f ay supf1 z) x → x ≤ s ) → supf1 z o≤ s |
1078 | 1428 zm01 {s} as sup = subst (λ k → k o≤ s ) (sym (sf1=spu (sym z=x))) ( MinSUP.minsup usup as zm02 ) where |
1075 | 1429 zm02 : {w : Ordinal } → odef pchainU w → w ≤ s |
1076 | 1430 zm02 {w} uw with pchainU⊆chain uw |
1078 | 1431 ... | ⟪ az , ch-init fc ⟫ = sup ⟪ az , ch-init fc ⟫ |
1076 | 1432 ... | ⟪ az , ch-is-sup u1 u<b su=u fc ⟫ = sup ⟪ az , ch-is-sup u1 (ordtrans u<b zm05) (trans zm03 su=u) zm04 ⟫ where |
1078 | 1433 zm05 : osuc (IChain-i (proj2 uw)) o< z |
1076 | 1434 zm05 = subst (λ k → osuc (IChain-i (proj2 uw)) o< k) (sym z=x) ( pic<x (proj2 uw) ) |
1435 u<x : u1 o< x | |
1436 u<x = subst (λ k → u1 o< k) z=x ( ordtrans u<b zm05 ) | |
1437 zm03 : supf1 u1 ≡ ZChain.supf (prev (osuc (IChain-i (proj2 uw))) (pic<x (proj2 uw))) u1 | |
1438 zm03 = trans (sf1=sf u<x) (zeq _ _ (osucc u<b) (o<→≤ <-osuc) ) | |
1439 zm04 : FClosure A f (supf1 u1) w | |
1440 zm04 = subst (λ k → FClosure A f k w) (sym zm03) fc | |
1073 | 1441 ... | case2 z<x = record { as = asupf ; x≤sup = zm00 ; minsup = zm01 } where |
1078 | 1442 supf0 = ZChain.supf (pzc (ob<x lim z<x)) |
1073 | 1443 msup : IsMinSUP A (UnionCF A f ay supf0 z) (supf0 z) |
1444 msup = ZChain.is-minsup (pzc (ob<x lim z<x)) (o<→≤ <-osuc) | |
1074 | 1445 s1=0 : {u : Ordinal } → u o< z → supf1 u ≡ supf0 u |
1078 | 1446 s1=0 {u} u<z = trans (sf1=sf (ordtrans u<z z<x)) (zeq _ _ (o<→≤ (osucc u<z)) (o<→≤ <-osuc) ) |
1447 zm00 : {w : Ordinal } → odef (UnionCF A f ay supf1 z) w → w ≤ supf1 z | |
1448 zm00 {w} ⟪ az , ch-init fc ⟫ = subst (λ k → w ≤ k ) (sym (sf1=sf z<x)) ( IsMinSUP.x≤sup msup ⟪ az , ch-init fc ⟫ ) | |
1449 zm00 {w} ⟪ az , ch-is-sup u u<b su=u fc ⟫ = subst (λ k → w ≤ k ) (sym (sf1=sf z<x)) | |
1074 | 1450 ( IsMinSUP.x≤sup msup ⟪ az , ch-is-sup u u<b (trans (sym (s1=0 u<b)) su=u) (subst (λ k → FClosure A f k w) (s1=0 u<b) fc) ⟫ ) |
1073 | 1451 zm01 : { s : Ordinal } → odef A s → ( {x : Ordinal } → odef (UnionCF A f ay supf1 z) x → x ≤ s ) → supf1 z o≤ s |
1078 | 1452 zm01 {s} as sup = subst (λ k → k o≤ s ) (sym (sf1=sf z<x)) ( IsMinSUP.minsup msup as zm02 ) where |
1073 | 1453 zm02 : {w : Ordinal } → odef (UnionCF A f ay supf0 z) w → w ≤ s |
1454 zm02 {w} ⟪ az , ch-init fc ⟫ = sup ⟪ az , ch-init fc ⟫ | |
1078 | 1455 zm02 {w} ⟪ az , ch-is-sup u u<b su=u fc ⟫ = sup |
1456 ⟪ az , ch-is-sup u u<b (trans (s1=0 u<b) su=u) (subst (λ k → FClosure A f k w) (sym (s1=0 u<b)) fc) ⟫ | |
1073 | 1457 |
1458 | |
1035 | 1459 |
1039 | 1460 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 |
1461 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
|
1462 ... | case1 b=x with trio< a x |
1016 | 1463 ... | tri< a<x ¬b ¬c = zc40 where |
1464 sa = ZChain.supf (pzc (ob<x lim a<x)) a | |
1020 | 1465 m = omax a sa -- x is limit ordinal, so we have sa o< m o< x |
1016 | 1466 m<x : m o< x |
1467 m<x with trio< a sa | inspect (omax a) sa | |
1020 | 1468 ... | tri< a<sa ¬b ¬c | record { eq = eq } = ob<x lim (ordtrans<-≤ sa<b b≤x ) |
1016 | 1469 ... | tri≈ ¬a a=sa ¬c | record { eq = eq } = subst (λ k → k o< x) eq zc41 where |
1470 zc41 : omax a sa o< x | |
1471 zc41 = osucprev ( begin | |
1472 osuc ( omax a sa ) ≡⟨ cong (λ k → osuc (omax a k)) (sym a=sa) ⟩ | |
1473 osuc ( omax a a ) ≡⟨ cong osuc (omxx _) ⟩ | |
1474 osuc ( osuc a ) ≤⟨ o<→≤ (ob<x lim (ob<x lim a<x)) ⟩ | |
1475 x ∎ ) where open o≤-Reasoning O | |
1476 ... | 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
|
1477 sam = ZChain.supf (pzc (ob<x lim m<x)) a |
1016 | 1478 zc42 : osuc a o≤ osuc m |
1479 zc42 = osucc (o<→≤ ( omax-x _ _ ) ) | |
1480 sam<m : sam o< m | |
1039 | 1481 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 | 1482 fcm : FClosure A f (ZChain.supf (pzc (ob<x lim m<x)) a) w |
1483 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
|
1484 zcm : odef (UnionCF A f ay (ZChain.supf (pzc (ob<x lim m<x))) (osuc (omax a sa))) w |
1039 | 1485 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
|
1486 zc40 : odef (UnionCF A f ay supf1 b) w |
1039 | 1487 zc40 with ZChain.cfcs (pzc (ob<x lim m<x)) (o<→≤ (omax-x _ _)) o≤-refl (o<→≤ sam<m) fcm |
1058 | 1488 ... | ⟪ az , ch-init fc ⟫ = ⟪ az , ch-init fc ⟫ |
1070 | 1489 ... | ⟪ az , ch-is-sup u u<x su=u fc ⟫ = ⟪ az , ch-is-sup u u<b (trans zc45 su=u) zc44 ⟫ where |
1490 u<b : u o< b | |
1491 u<b = osucprev ( begin | |
1492 osuc u ≤⟨ osucc u<x ⟩ | |
1493 osuc m ≤⟨ osucc m<x ⟩ | |
1494 x ≡⟨ sym b=x ⟩ | |
1495 b ∎ ) where open o≤-Reasoning O | |
1078 | 1496 zc45 : supf1 u ≡ ZChain.supf (pzc (ob<x lim m<x)) u |
1070 | 1497 zc45 = begin |
1498 supf1 u ≡⟨ sf1=sf (subst (λ k → u o< k) b=x u<b ) ⟩ | |
1499 ZChain.supf (pzc (ob<x lim (subst (λ k → u o< k) b=x u<b ))) u ≡⟨ zeq _ _ (osucc u<x) (o<→≤ <-osuc) ⟩ | |
1078 | 1500 ZChain.supf (pzc (ob<x lim m<x)) u ∎ where open ≡-Reasoning |
1070 | 1501 zc44 : FClosure A f (supf1 u) w |
1502 zc44 = subst (λ k → FClosure A f k w ) (sym zc45) fc | |
1016 | 1503 ... | tri≈ ¬a b ¬c = ⊥-elim ( ¬a (ordtrans<-≤ a<b b≤x)) |
1504 ... | tri> ¬a ¬b c = ⊥-elim ( ¬a (ordtrans<-≤ a<b b≤x)) | |
1039 | 1505 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
|
1506 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
|
1507 sb=sa : {a : Ordinal } → a o< b → supf1 a ≡ ZChain.supf (pzc (ob<x lim b<x)) a |
1020 | 1508 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
|
1509 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
|
1510 fcb = subst (λ k → FClosure A f k w) (sb=sa a<b) fc |
1020 | 1511 -- 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
|
1512 zcb : odef (UnionCF A f ay supfb b) w |
1039 | 1513 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
|
1514 zc40 : odef (UnionCF A f ay supf1 b) w |
1016 | 1515 zc40 with zcb |
1058 | 1516 ... | ⟪ az , ch-init fc ⟫ = ⟪ az , ch-init fc ⟫ |
1070 | 1517 ... | ⟪ az , ch-is-sup u u<x su=u fc ⟫ = ⟪ az , ch-is-sup u u<x (trans zc45 su=u) zc44 ⟫ where |
1078 | 1518 zc45 : supf1 u ≡ ZChain.supf (pzc (ob<x lim b<x)) u |
1070 | 1519 zc45 = begin |
1520 supf1 u ≡⟨ sf1=sf (ordtrans u<x b<x) ⟩ | |
1521 ZChain.supf (pzc (ob<x lim (ordtrans u<x b<x) )) u ≡⟨ zeq _ _ (o<→≤ (osucc u<x)) (o<→≤ <-osuc) ⟩ | |
1078 | 1522 ZChain.supf (pzc (ob<x lim b<x )) u ∎ where open ≡-Reasoning |
1070 | 1523 zc44 : FClosure A f (supf1 u) w |
1524 zc44 = subst (λ k → FClosure A f k w ) (sym zc45) fc | |
1028 | 1525 |
1079 | 1526 zo≤sz : {z : Ordinal} → z o≤ x → z o≤ supf1 z |
1080 | 1527 zo≤sz {z} z≤x with osuc-≡< z≤x |
1528 ... | case2 z<x = subst (λ k → z o≤ k) (sym (trans (sf1=sf z<x) (sym (zeq _ _ (o<→≤ <-osuc) o≤-refl)))) ( ZChain.zo≤sz (pzc z<x) o≤-refl ) | |
1083 | 1529 ... | case1 refl with x<y∨y≤x (supf1 spu) x |
1530 ... | case2 x≤ssp = z40 where | |
1531 z40 : z o≤ supf1 z | |
1532 z40 with x<y∨y≤x z spu | |
1533 ... | case1 z<spu = o<→≤ ( subst (λ k → z o< k ) (sym (sf1=spu refl)) z<spu ) | |
1534 ... | case2 spu≤z = begin -- x ≡ supf1 spu ≡ spu ≡ supf1 x | |
1535 x ≤⟨ x≤ssp ⟩ | |
1536 supf1 spu ≤⟨ supf-mono spu≤z ⟩ | |
1537 supf1 x ∎ where open o≤-Reasoning O | |
1538 ... | case1 ssp<x = subst (λ k → x o≤ k) (sym (sf1=spu refl)) z47 where | |
1080 | 1539 z47 : x o≤ spu |
1540 z47 with x<y∨y≤x spu x | |
1541 ... | case2 lt = lt | |
1542 ... | case1 spu<x = ⊥-elim ( <<-irr (MinSUP.x≤sup usup z48) (proj1 ( mf< spu (MinSUP.as usup)))) where | |
1083 | 1543 z70 : odef (UnionCF A f ay supf1 z) (supf1 spu) |
1544 z70 = cfcs spu<x o≤-refl ssp<x (init asupf refl ) | |
1545 z73 : IsSUP A (UnionCF A f ay (ZChain.supf (pzc (ob<x lim spu<x))) spu) spu | |
1546 z73 = record { ax = MinSUP.as usup ; x≤sup = λ uw → MinSUP.x≤sup usup (chain⊆pchainU1 spu<x uw ) } | |
1080 | 1547 z49 : supfz spu<x ≡ spu |
1083 | 1548 z49 = begin |
1549 supfz spu<x ≡⟨ ZChain.sup=u (pzc (ob<x lim spu<x)) (MinSUP.as usup) (o<→≤ <-osuc) z73 ⟩ | |
1550 spu ∎ where open ≡-Reasoning | |
1082 | 1551 z50 : supfz spu<x o≤ spu |
1552 z50 = o≤-refl0 z49 | |
1080 | 1553 z48 : odef pchainU (f spu) |
1082 | 1554 z48 = ⟪ proj2 (mf _ (MinSUP.as usup) ) , ic-isup _ (subst (λ k → k o< x) refl spu<x) z50 |
1080 | 1555 (fsuc _ (init (ZChain.asupf (pzc (ob<x lim spu<x))) z49)) ⟫ |
1079 | 1556 |
921 | 1557 --- |
1558 --- the maximum chain has fix point of any ≤-monotonic function | |
1559 --- | |
1560 | |
1039 | 1561 SZ : ( f : Ordinal → Ordinal ) → (mf< : <-monotonic-f A f ) → {y : Ordinal} (ay : odef A y) → (x : Ordinal) → ZChain A f mf< ay x |
1562 SZ f mf< {y} ay x = TransFinite {λ z → ZChain A f mf< ay z } (λ x → ind f mf< ay x ) x | |
921 | 1563 |
1039 | 1564 msp0 : ( f : Ordinal → Ordinal ) → (mf< : <-monotonic-f A f ) {x y : Ordinal} (ay : odef A y) |
1565 → (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
|
1566 → MinSUP A (UnionCF A f ay (ZChain.supf zc) x) |
1039 | 1567 msp0 f mf< {x} ay zc = minsupP (UnionCF A f ay (ZChain.supf zc) x) (ZChain.chain⊆A zc) (ZChain.f-total zc) |
922 | 1568 |
1039 | 1569 fixpoint : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) (mf< : <-monotonic-f A f ) (zc : ZChain A f mf< as0 (& A) ) |
966 | 1570 → (sp1 : MinSUP A (ZChain.chain zc)) |
959 | 1571 → f (MinSUP.sup sp1) ≡ MinSUP.sup sp1 |
992 | 1572 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
|
1573 chain = ZChain.chain zc |
a48dc906796c
supf usp0 instead of supf (& A) ?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
923
diff
changeset
|
1574 supf = ZChain.supf zc |
935
ed711d7be191
mem exhaust fix on fixpoint
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
934
diff
changeset
|
1575 sp : Ordinal |
959 | 1576 sp = MinSUP.sup sp1 |
935
ed711d7be191
mem exhaust fix on fixpoint
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
934
diff
changeset
|
1577 asp : odef A sp |
1032
382680c3e9be
minsup is not obvious in ZChain
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1031
diff
changeset
|
1578 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
|
1579 ay = as0 |
988
9a85233384f7
is-max and supf b = supf x
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
987
diff
changeset
|
1580 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
|
1581 → HasPrev A chain f b ∨ IsSUP A (UnionCF A f ay (ZChain.supf zc) b) b |
921 | 1582 → * a < * b → odef chain b |
993 | 1583 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
|
1584 z22 : sp o< & A |
ed711d7be191
mem exhaust fix on fixpoint
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
934
diff
changeset
|
1585 z22 = z09 asp |
ed711d7be191
mem exhaust fix on fixpoint
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
934
diff
changeset
|
1586 z12 : odef chain sp |
ed711d7be191
mem exhaust fix on fixpoint
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
934
diff
changeset
|
1587 z12 with o≡? (& s) sp |
1058 | 1588 ... | yes eq = subst (λ k → odef chain k) eq ( ZChain.chain∋init zc ) |
1589 ... | 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
|
1590 z13 : * (& s) < * sp |
1058 | 1591 z13 with MinSUP.x≤sup sp1 ( ZChain.chain∋init zc ) |
960 | 1592 ... | case1 eq = ⊥-elim ( ne eq ) |
966 | 1593 ... | 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
|
1594 z19 : IsSUP A (UnionCF A f ay (ZChain.supf zc) sp) sp |
1069 | 1595 z19 = record { ax = asp ; 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
|
1596 z20 : {y : Ordinal} → odef (UnionCF A f ay (ZChain.supf zc) sp) y → (y ≡ sp) ∨ (y << sp) |
966 | 1597 z20 {y} zy with MinSUP.x≤sup sp1 |
961 | 1598 (subst (λ k → odef chain k ) (sym &iso) (chain-mono f mf as0 supf (ZChain.supf-mono zc) (o<→≤ z22) zy )) |
966 | 1599 ... | case1 y=p = case1 (subst (λ k → k ≡ _ ) &iso y=p ) |
960 | 1600 ... | 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
|
1601 z14 : f sp ≡ sp |
960 | 1602 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
|
1603 ... | 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
|
1604 z16 : ⊥ |
1032
382680c3e9be
minsup is not obvious in ZChain
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1031
diff
changeset
|
1605 z16 with proj1 (mf (( MinSUP.sup sp1)) ( MinSUP.as sp1 )) |
1031 | 1606 ... | case1 eq = ⊥-elim (¬b (sym (cong (*) eq ) )) |
966 | 1607 ... | case2 lt = ⊥-elim (¬c lt ) |
1608 ... | 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
|
1609 ... | tri> ¬a ¬b c = ⊥-elim z17 where |
959 | 1610 z15 : (f sp ≡ MinSUP.sup sp1) ∨ (* (f sp) < * (MinSUP.sup sp1) ) |
960 | 1611 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
|
1612 z17 : ⊥ |
a48dc906796c
supf usp0 instead of supf (& A) ?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
923
diff
changeset
|
1613 z17 with z15 |
960 | 1614 ... | case1 eq = ¬b (cong (*) eq) |
1615 ... | case2 lt = ¬a lt | |
924
a48dc906796c
supf usp0 instead of supf (& A) ?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
923
diff
changeset
|
1616 |
921 | 1617 -- ZChain contradicts ¬ Maximal |
1618 -- | |
1619 -- ZChain forces fix point on any ≤-monotonic function (fixpoint) | |
1620 -- ¬ Maximal create cf which is a <-monotonic function by axiom of choice. This contradicts fix point of ZChain | |
1621 -- | |
924
a48dc906796c
supf usp0 instead of supf (& A) ?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
923
diff
changeset
|
1622 |
1039 | 1623 z04 : (nmx : ¬ Maximal A ) → (zc : ZChain A (cf nmx) (cf-is-<-monotonic nmx) as0 (& A)) → ⊥ |
966 | 1624 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
|
1625 (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
|
1626 (subst (λ k → odef A k) (sym &iso) (MinSUP.as msp1) ) |
992 | 1627 (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
|
1628 (proj1 (cf-is-<-monotonic nmx c (MinSUP.as msp1 ))) where -- x < f x |
937 | 1629 |
927 | 1630 supf = ZChain.supf zc |
934 | 1631 msp1 : MinSUP A (ZChain.chain zc) |
1039 | 1632 msp1 = msp0 (cf nmx) (cf-is-<-monotonic nmx) as0 zc |
966 | 1633 c : Ordinal |
1634 c = MinSUP.sup msp1 | |
934 | 1635 |
966 | 1636 zorn00 : Maximal A |
1637 zorn00 with is-o∅ ( & HasMaximal ) -- we have no Level (suc n) LEM | |
804 | 1638 ... | no not = record { maximal = ODC.minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) ; as = zorn01 ; ¬maximal<x = zorn02 } where |
551 | 1639 -- yes we have the maximal |
1640 zorn03 : odef HasMaximal ( & ( ODC.minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) ) ) | |
606 | 1641 zorn03 = ODC.x∋minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) -- Axiom of choice |
551 | 1642 zorn01 : A ∋ ODC.minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) |
966 | 1643 zorn01 = proj1 zorn03 |
551 | 1644 zorn02 : {x : HOD} → A ∋ x → ¬ (ODC.minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) < x) |
1645 zorn02 {x} ax m<x = proj2 zorn03 (& x) ax (subst₂ (λ j k → j < k) (sym *iso) (sym *iso) m<x ) | |
1039 | 1646 ... | yes ¬Maximal = ⊥-elim ( z04 nmx (SZ (cf nmx) (cf-is-<-monotonic nmx) as0 (& A) )) where |
551 | 1647 -- if we have no maximal, make ZChain, which contradict SUP condition |
966 | 1648 nmx : ¬ Maximal A |
551 | 1649 nmx mx = ∅< {HasMaximal} zc5 ( ≡o∅→=od∅ ¬Maximal ) where |
966 | 1650 zc5 : odef A (& (Maximal.maximal mx)) ∧ (( y : Ordinal ) → odef A y → ¬ (* (& (Maximal.maximal mx)) < * y)) |
804 | 1651 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 | 1652 |
516 | 1653 -- usage (see filter.agda ) |
1654 -- | |
497 | 1655 -- _⊆'_ : ( A B : HOD ) → Set n |
1656 -- _⊆'_ A B = (x : Ordinal ) → odef A x → odef B x | |
482 | 1657 |
966 | 1658 -- MaximumSubset : {L P : HOD} |
497 | 1659 -- → o∅ o< & L → o∅ o< & P → P ⊆ L |
1660 -- → IsPartialOrderSet P _⊆'_ | |
1661 -- → ( (B : HOD) → B ⊆ P → IsTotalOrderSet B _⊆'_ → SUP P B _⊆'_ ) | |
1662 -- → Maximal P (_⊆'_) | |
1663 -- MaximumSubset {L} {P} 0<L 0<P P⊆L PO SP = Zorn-lemma {P} {_⊆'_} 0<P PO SP |