Mercurial > hg > Members > kono > Proof > ZF-in-agda
annotate src/zorn.agda @ 791:f4450bc95699
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 03 Aug 2022 16:04:51 +0900 |
parents | 201b66da4e69 |
children | 150e1c7097ce |
rev | line source |
---|---|
478 | 1 {-# OPTIONS --allow-unsolved-metas #-} |
508 | 2 open import Level hiding ( suc ; zero ) |
431 | 3 open import Ordinals |
552 | 4 open import Relation.Binary |
5 open import Relation.Binary.Core | |
6 open import Relation.Binary.PropositionalEquality | |
497 | 7 import OD |
552 | 8 module zorn {n : Level } (O : Ordinals {n}) (_<_ : (x y : OD.HOD O ) → Set n ) (PO : IsStrictPartialOrder _≡_ _<_ ) where |
431 | 9 |
560 | 10 -- |
11 -- Zorn-lemma : { A : HOD } | |
12 -- → o∅ o< & A | |
13 -- → ( ( B : HOD) → (B⊆A : B ⊆ A) → IsTotalOrderSet B → SUP A B ) -- SUP condition | |
14 -- → Maximal A | |
15 -- | |
16 | |
431 | 17 open import zf |
477 | 18 open import logic |
19 -- open import partfunc {n} O | |
20 | |
21 open import Relation.Nullary | |
22 open import Data.Empty | |
23 import BAlgbra | |
431 | 24 |
555 | 25 open import Data.Nat hiding ( _<_ ; _≤_ ) |
26 open import Data.Nat.Properties | |
27 open import nat | |
28 | |
431 | 29 |
30 open inOrdinal O | |
31 open OD O | |
32 open OD.OD | |
33 open ODAxiom odAxiom | |
477 | 34 import OrdUtil |
35 import ODUtil | |
431 | 36 open Ordinals.Ordinals O |
37 open Ordinals.IsOrdinals isOrdinal | |
38 open Ordinals.IsNext isNext | |
39 open OrdUtil O | |
477 | 40 open ODUtil O |
41 | |
42 | |
43 import ODC | |
44 | |
45 open _∧_ | |
46 open _∨_ | |
47 open Bool | |
431 | 48 |
49 open HOD | |
50 | |
560 | 51 -- |
52 -- Partial Order on HOD ( possibly limited in A ) | |
53 -- | |
54 | |
571 | 55 _<<_ : (x y : Ordinal ) → Set n -- Set n order |
570 | 56 x << y = * x < * y |
57 | |
765 | 58 _<=_ : (x y : Ordinal ) → Set n -- Set n order |
59 x <= y = (x ≡ y ) ∨ ( * x < * y ) | |
60 | |
570 | 61 POO : IsStrictPartialOrder _≡_ _<<_ |
62 POO = record { isEquivalence = record { refl = refl ; sym = sym ; trans = trans } | |
63 ; trans = IsStrictPartialOrder.trans PO | |
64 ; irrefl = λ x=y x<y → IsStrictPartialOrder.irrefl PO (cong (*) x=y) x<y | |
65 ; <-resp-≈ = record { fst = λ {x} {y} {y1} y=y1 xy1 → subst (λ k → x << k ) y=y1 xy1 ; snd = λ {x} {x1} {y} x=x1 x1y → subst (λ k → k << x ) x=x1 x1y } } | |
66 | |
528
8facdd7cc65a
TransitiveClosure with x <= f x is possible
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
527
diff
changeset
|
67 _≤_ : (x y : HOD) → Set (Level.suc n) |
8facdd7cc65a
TransitiveClosure with x <= f x is possible
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
527
diff
changeset
|
68 x ≤ y = ( x ≡ y ) ∨ ( x < y ) |
8facdd7cc65a
TransitiveClosure with x <= f x is possible
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
527
diff
changeset
|
69 |
554 | 70 ≤-ftrans : {x y z : HOD} → x ≤ y → y ≤ z → x ≤ z |
71 ≤-ftrans {x} {y} {z} (case1 refl ) (case1 refl ) = case1 refl | |
72 ≤-ftrans {x} {y} {z} (case1 refl ) (case2 y<z) = case2 y<z | |
73 ≤-ftrans {x} {_} {z} (case2 x<y ) (case1 refl ) = case2 x<y | |
74 ≤-ftrans {x} {y} {z} (case2 x<y) (case2 y<z) = case2 ( IsStrictPartialOrder.trans PO x<y y<z ) | |
75 | |
779 | 76 <-ftrans : {x y z : Ordinal } → x <= y → y <= z → x <= z |
77 <-ftrans {x} {y} {z} (case1 refl ) (case1 refl ) = case1 refl | |
78 <-ftrans {x} {y} {z} (case1 refl ) (case2 y<z) = case2 y<z | |
79 <-ftrans {x} {_} {z} (case2 x<y ) (case1 refl ) = case2 x<y | |
80 <-ftrans {x} {y} {z} (case2 x<y) (case2 y<z) = case2 ( IsStrictPartialOrder.trans PO x<y y<z ) | |
81 | |
770 | 82 <=to≤ : {x y : Ordinal } → x <= y → * x ≤ * y |
83 <=to≤ (case1 eq) = case1 (cong (*) eq) | |
84 <=to≤ (case2 lt) = case2 lt | |
85 | |
779 | 86 ≤to<= : {x y : Ordinal } → * x ≤ * y → x <= y |
87 ≤to<= (case1 eq) = case1 ( subst₂ (λ j k → j ≡ k ) &iso &iso (cong (&) eq) ) | |
88 ≤to<= (case2 lt) = case2 lt | |
89 | |
556 | 90 <-irr : {a b : HOD} → (a ≡ b ) ∨ (a < b ) → b < a → ⊥ |
91 <-irr {a} {b} (case1 a=b) b<a = IsStrictPartialOrder.irrefl PO (sym a=b) b<a | |
92 <-irr {a} {b} (case2 a<b) b<a = IsStrictPartialOrder.irrefl PO refl | |
93 (IsStrictPartialOrder.trans PO b<a a<b) | |
490 | 94 |
561 | 95 ptrans = IsStrictPartialOrder.trans PO |
96 | |
492 | 97 open _==_ |
98 open _⊆_ | |
99 | |
530 | 100 -- |
560 | 101 -- Closure of ≤-monotonic function f has total order |
530 | 102 -- |
103 | |
104 ≤-monotonic-f : (A : HOD) → ( Ordinal → Ordinal ) → Set (Level.suc n) | |
105 ≤-monotonic-f A f = (x : Ordinal ) → odef A x → ( * x ≤ * (f x) ) ∧ odef A (f x ) | |
106 | |
551 | 107 data FClosure (A : HOD) (f : Ordinal → Ordinal ) (s : Ordinal) : Ordinal → Set n where |
783 | 108 init : {s1 : Ordinal } → odef A s → s ≡ s1 → FClosure A f s s1 |
555 | 109 fsuc : (x : Ordinal) ( p : FClosure A f s x ) → FClosure A f s (f x) |
554 | 110 |
556 | 111 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 | 112 A∋fc {A} s f mf (init as refl ) = as |
556 | 113 A∋fc {A} s f mf (fsuc y fcy) = proj2 (mf y ( A∋fc {A} s f mf fcy ) ) |
555 | 114 |
714 | 115 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 | 116 A∋fcs {A} s f mf (init as refl) = as |
714 | 117 A∋fcs {A} s f mf (fsuc y fcy) = A∋fcs {A} s f mf fcy |
118 | |
556 | 119 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 | 120 s≤fc {A} s {.s} f mf (init x refl ) = case1 refl |
556 | 121 s≤fc {A} s {.(f x)} f mf (fsuc x fcy) with proj1 (mf x (A∋fc s f mf fcy ) ) |
122 ... | case1 x=fx = subst (λ k → * s ≤ * k ) (*≡*→≡ x=fx) ( s≤fc {A} s f mf fcy ) | |
123 ... | case2 x<fx with s≤fc {A} s f mf fcy | |
124 ... | case1 s≡x = case2 ( subst₂ (λ j k → j < k ) (sym s≡x) refl x<fx ) | |
125 ... | case2 s<x = case2 ( IsStrictPartialOrder.trans PO s<x x<fx ) | |
555 | 126 |
557 | 127 fcn : {A : HOD} (s : Ordinal) { x : Ordinal} {f : Ordinal → Ordinal} → (mf : ≤-monotonic-f A f) → FClosure A f s x → ℕ |
783 | 128 fcn s mf (init as refl) = zero |
558 | 129 fcn {A} s {x} {f} mf (fsuc y p) with proj1 (mf y (A∋fc s f mf p)) |
130 ... | case1 eq = fcn s mf p | |
131 ... | case2 y<fy = suc (fcn s mf p ) | |
557 | 132 |
558 | 133 fcn-inject : {A : HOD} (s : Ordinal) { x y : Ordinal} {f : Ordinal → Ordinal} → (mf : ≤-monotonic-f A f) |
134 → (cx : FClosure A f s x ) (cy : FClosure A f s y ) → fcn s mf cx ≡ fcn s mf cy → * x ≡ * y | |
559 | 135 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 |
136 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 | |
783 | 137 fc00 zero zero refl (init _ refl) (init x₁ refl) i=x i=y = refl |
138 fc00 zero zero refl (init as refl) (fsuc y cy) i=x i=y with proj1 (mf y (A∋fc s f mf cy ) ) | |
139 ... | case1 y=fy = subst (λ k → * s ≡ k ) y=fy ( fc00 zero zero refl (init as refl) cy i=x i=y ) | |
140 fc00 zero zero refl (fsuc x cx) (init as refl) i=x i=y with proj1 (mf x (A∋fc s f mf cx ) ) | |
141 ... | case1 x=fx = subst (λ k → k ≡ * s ) x=fx ( fc00 zero zero refl cx (init as refl) i=x i=y ) | |
559 | 142 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 ) ) |
143 ... | 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 ) | |
144 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 ) ) | |
145 ... | 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 ) | |
146 ... | case1 x=fx | case2 y<fy = subst (λ k → k ≡ * (f y)) x=fx (fc02 x cx i=x) where | |
147 fc02 : (x1 : Ordinal) → (cx1 : FClosure A f s x1 ) → suc i ≡ fcn s mf cx1 → * x1 ≡ * (f y) | |
148 fc02 .(f x1) (fsuc x1 cx1) i=x1 with proj1 (mf x1 (A∋fc s f mf cx1 ) ) | |
560 | 149 ... | case1 eq = trans (sym eq) ( fc02 x1 cx1 i=x1 ) -- derefence while f x ≡ x |
559 | 150 ... | case2 lt = subst₂ (λ j k → * (f j) ≡ * (f k )) &iso &iso ( cong (λ k → * ( f (& k ))) fc04) where |
151 fc04 : * x1 ≡ * y | |
152 fc04 = fc00 i j (cong pred i=j) cx1 cy (cong pred i=x1) (cong pred j=y) | |
153 ... | case2 x<fx | case1 y=fy = subst (λ k → * (f x) ≡ k ) y=fy (fc03 y cy j=y) where | |
154 fc03 : (y1 : Ordinal) → (cy1 : FClosure A f s y1 ) → suc j ≡ fcn s mf cy1 → * (f x) ≡ * y1 | |
155 fc03 .(f y1) (fsuc y1 cy1) j=y1 with proj1 (mf y1 (A∋fc s f mf cy1 ) ) | |
156 ... | case1 eq = trans ( fc03 y1 cy1 j=y1 ) eq | |
157 ... | case2 lt = subst₂ (λ j k → * (f j) ≡ * (f k )) &iso &iso ( cong (λ k → * ( f (& k ))) fc05) where | |
158 fc05 : * x ≡ * y1 | |
159 fc05 = fc00 i j (cong pred i=j) cx cy1 (cong pred i=x) (cong pred j=y1) | |
160 ... | 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))) | |
557 | 161 |
600 | 162 |
557 | 163 fcn-< : {A : HOD} (s : Ordinal ) { x y : Ordinal} {f : Ordinal → Ordinal} → (mf : ≤-monotonic-f A f) |
164 → (cx : FClosure A f s x ) (cy : FClosure A f s y ) → fcn s mf cx Data.Nat.< fcn s mf cy → * x < * y | |
558 | 165 fcn-< {A} s {x} {y} {f} mf cx cy x<y = fc01 (fcn s mf cy) cx cy refl x<y where |
166 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 | |
167 fc01 (suc i) {y} cx (fsuc y1 cy) i=y (s≤s x<i) with proj1 (mf y1 (A∋fc s f mf cy ) ) | |
168 ... | case1 y=fy = subst (λ k → * x < k ) y=fy ( fc01 (suc i) {y1} cx cy i=y (s≤s x<i) ) | |
169 ... | case2 y<fy with <-cmp (fcn s mf cx ) i | |
170 ... | tri> ¬a ¬b c = ⊥-elim ( nat-≤> x<i c ) | |
171 ... | tri≈ ¬a b ¬c = subst (λ k → k < * (f y1) ) (fcn-inject s mf cy cx (sym (trans b (cong pred i=y) ))) y<fy | |
172 ... | tri< a ¬b ¬c = IsStrictPartialOrder.trans PO fc02 y<fy where | |
173 fc03 : suc i ≡ suc (fcn s mf cy) → i ≡ fcn s mf cy | |
174 fc03 eq = cong pred eq | |
175 fc02 : * x < * y1 | |
176 fc02 = fc01 i cx cy (fc03 i=y ) a | |
557 | 177 |
559 | 178 fcn-cmp : {A : HOD} (s : Ordinal) { x y : Ordinal } (f : Ordinal → Ordinal) (mf : ≤-monotonic-f A f) |
554 | 179 → (cx : FClosure A f s x) → (cy : FClosure A f s y ) → Tri (* x < * y) (* x ≡ * y) (* y < * x ) |
559 | 180 fcn-cmp {A} s {x} {y} f mf cx cy with <-cmp ( fcn s mf cx ) (fcn s mf cy ) |
181 ... | tri< a ¬b ¬c = tri< fc11 (λ eq → <-irr (case1 (sym eq)) fc11) (λ lt → <-irr (case2 fc11) lt) where | |
182 fc11 : * x < * y | |
183 fc11 = fcn-< {A} s {x} {y} {f} mf cx cy a | |
184 ... | tri≈ ¬a b ¬c = tri≈ (λ lt → <-irr (case1 (sym fc10)) lt) fc10 (λ lt → <-irr (case1 fc10) lt) where | |
185 fc10 : * x ≡ * y | |
186 fc10 = fcn-inject {A} s {x} {y} {f} mf cx cy b | |
187 ... | tri> ¬a ¬b c = tri> (λ lt → <-irr (case2 fc12) lt) (λ eq → <-irr (case1 eq) fc12) fc12 where | |
188 fc12 : * y < * x | |
189 fc12 = fcn-< {A} s {y} {x} {f} mf cy cx c | |
190 | |
600 | 191 |
562 | 192 fcn-imm : {A : HOD} (s : Ordinal) { x y : Ordinal } (f : Ordinal → Ordinal) (mf : ≤-monotonic-f A f) |
193 → (cx : FClosure A f s x) → (cy : FClosure A f s y ) → ¬ ( ( * x < * y ) ∧ ( * y < * (f x )) ) | |
563 | 194 fcn-imm {A} s {x} {y} f mf cx cy ⟪ x<y , y<fx ⟫ = fc21 where |
195 fc20 : fcn s mf cy Data.Nat.< suc (fcn s mf cx) → (fcn s mf cy ≡ fcn s mf cx) ∨ ( fcn s mf cy Data.Nat.< fcn s mf cx ) | |
196 fc20 y<sx with <-cmp ( fcn s mf cy ) (fcn s mf cx ) | |
197 ... | tri< a ¬b ¬c = case2 a | |
198 ... | tri≈ ¬a b ¬c = case1 b | |
199 ... | tri> ¬a ¬b c = ⊥-elim ( nat-≤> y<sx (s≤s c)) | |
200 fc17 : {x y : Ordinal } → (cx : FClosure A f s x) → (cy : FClosure A f s y ) → suc (fcn s mf cx) ≡ fcn s mf cy → * (f x ) ≡ * y | |
201 fc17 {x} {y} cx cy sx=y = fc18 (fcn s mf cy) cx cy refl sx=y where | |
202 fc18 : (i : ℕ ) → {y : Ordinal } → (cx : FClosure A f s x ) (cy : FClosure A f s y ) → (i ≡ fcn s mf cy ) → suc (fcn s mf cx) ≡ i → * (f x) ≡ * y | |
203 fc18 (suc i) {y} cx (fsuc y1 cy) i=y sx=i with proj1 (mf y1 (A∋fc s f mf cy ) ) | |
204 ... | case1 y=fy = subst (λ k → * (f x) ≡ k ) y=fy ( fc18 (suc i) {y1} cx cy i=y sx=i) -- dereference | |
205 ... | case2 y<fy = subst₂ (λ j k → * (f j) ≡ * (f k) ) &iso &iso (cong (λ k → * (f (& k) ) ) fc19) where | |
206 fc19 : * x ≡ * y1 | |
207 fc19 = fcn-inject s mf cx cy (cong pred ( trans sx=i i=y )) | |
208 fc21 : ⊥ | |
209 fc21 with <-cmp (suc ( fcn s mf cx )) (fcn s mf cy ) | |
210 ... | tri< a ¬b ¬c = <-irr (case2 y<fx) (fc22 a) where -- suc ncx < ncy | |
211 cxx : FClosure A f s (f x) | |
212 cxx = fsuc x cx | |
213 fc16 : (x : Ordinal ) → (cx : FClosure A f s x) → (fcn s mf cx ≡ fcn s mf (fsuc x cx)) ∨ ( suc (fcn s mf cx ) ≡ fcn s mf (fsuc x cx)) | |
783 | 214 fc16 x (init as refl) with proj1 (mf s as ) |
563 | 215 ... | case1 _ = case1 refl |
216 ... | case2 _ = case2 refl | |
217 fc16 .(f x) (fsuc x cx ) with proj1 (mf (f x) (A∋fc s f mf (fsuc x cx)) ) | |
218 ... | case1 _ = case1 refl | |
219 ... | case2 _ = case2 refl | |
220 fc22 : (suc ( fcn s mf cx )) Data.Nat.< (fcn s mf cy ) → * (f x) < * y | |
221 fc22 a with fc16 x cx | |
222 ... | case1 eq = fcn-< s mf cxx cy (subst (λ k → k Data.Nat.< fcn s mf cy ) eq (<-trans a<sa a)) | |
223 ... | case2 eq = fcn-< s mf cxx cy (subst (λ k → k Data.Nat.< fcn s mf cy ) eq a ) | |
224 ... | tri≈ ¬a b ¬c = <-irr (case1 (fc17 cx cy b)) y<fx | |
225 ... | tri> ¬a ¬b c with fc20 c -- ncy < suc ncx | |
226 ... | case1 y=x = <-irr (case1 ( fcn-inject s mf cy cx y=x )) x<y | |
227 ... | case2 y<x = <-irr (case2 x<y) (fcn-< s mf cy cx y<x ) | |
228 | |
729 | 229 fc-conv : (A : HOD ) (f : Ordinal → Ordinal) {b u : Ordinal } |
230 → {p0 p1 : Ordinal → Ordinal} | |
231 → p0 u ≡ p1 u | |
232 → FClosure A f (p0 u) b → FClosure A f (p1 u) b | |
783 | 233 fc-conv A f {.(p0 u)} {u} {p0} {p1} p0u=p1u (init ap0u refl) = subst (λ k → FClosure A f (p1 u) k) (sym p0u=p1u) |
234 ( init (subst (λ k → odef A k) p0u=p1u ap0u ) refl) | |
729 | 235 fc-conv A f {_} {u} {p0} {p1} p0u=p1u (fsuc z fc) = fsuc z (fc-conv A f {_} {u} {p0} {p1} p0u=p1u fc) |
236 | |
560 | 237 -- open import Relation.Binary.Properties.Poset as Poset |
238 | |
239 IsTotalOrderSet : ( A : HOD ) → Set (Level.suc n) | |
240 IsTotalOrderSet A = {a b : HOD} → odef A (& a) → odef A (& b) → Tri (a < b) (a ≡ b) (b < a ) | |
241 | |
567 | 242 ⊆-IsTotalOrderSet : { A B : HOD } → B ⊆ A → IsTotalOrderSet A → IsTotalOrderSet B |
568 | 243 ⊆-IsTotalOrderSet {A} {B} B⊆A T ax ay = T (incl B⊆A ax) (incl B⊆A ay) |
567 | 244 |
568 | 245 _⊆'_ : ( A B : HOD ) → Set n |
246 _⊆'_ A B = {x : Ordinal } → odef A x → odef B x | |
560 | 247 |
248 -- | |
249 -- inductive maxmum tree from x | |
250 -- tree structure | |
251 -- | |
554 | 252 |
567 | 253 record HasPrev (A B : HOD) {x : Ordinal } (xa : odef A x) ( f : Ordinal → Ordinal ) : Set n where |
533 | 254 field |
534 | 255 y : Ordinal |
541 | 256 ay : odef B y |
534 | 257 x=fy : x ≡ f y |
529 | 258 |
570 | 259 record IsSup (A B : HOD) {x : Ordinal } (xa : odef A x) : Set n where |
654 | 260 field |
779 | 261 x<sup : {y : Ordinal} → odef B y → (y ≡ x ) ∨ (y << x ) |
568 | 262 |
656 | 263 record SUP ( A B : HOD ) : Set (Level.suc n) where |
264 field | |
265 sup : HOD | |
266 A∋maximal : A ∋ sup | |
267 x<sup : {x : HOD} → B ∋ x → (x ≡ sup ) ∨ (x < sup ) -- B is Total, use positive | |
268 | |
690 | 269 -- |
270 -- sup and its fclosure is in a chain HOD | |
271 -- chain HOD is sorted by sup as Ordinal and <-ordered | |
272 -- whole chain is a union of separated Chain | |
273 -- minimum index is y not ϕ | |
274 -- | |
275 | |
787 | 276 record ChainP (A : HOD ) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) {y : Ordinal} (ay : odef A y) (supf : Ordinal → Ordinal) (u : Ordinal) : Set n where |
690 | 277 field |
765 | 278 fcy<sup : {z : Ordinal } → FClosure A f y z → (z ≡ supf u) ∨ ( z << supf u ) |
769 | 279 order : {sup1 z1 : Ordinal} → (lt : supf sup1 o< supf u ) → FClosure A f (supf sup1 ) z1 → (z1 ≡ supf u ) ∨ ( z1 << supf u ) |
694 | 280 |
281 -- Union of supf z which o< x | |
282 -- | |
690 | 283 |
748 | 284 data UChain ( A : HOD ) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) {y : Ordinal } (ay : odef A y ) |
285 (supf : Ordinal → Ordinal) (x : Ordinal) : (z : Ordinal) → Set n where | |
286 ch-init : {z : Ordinal } (fc : FClosure A f y z) → UChain A f mf ay supf x z | |
791 | 287 ch-is-sup : (u : Ordinal) {z : Ordinal } (u≤x : u o≤ x) ( is-sup : ChainP A f mf ay supf u ) |
748 | 288 ( fc : FClosure A f (supf u) z ) → UChain A f mf ay supf x z |
694 | 289 |
290 ∈∧P→o< : {A : HOD } {y : Ordinal} → {P : Set n} → odef A y ∧ P → y o< & A | |
291 ∈∧P→o< {A } {y} p = subst (λ k → k o< & A) &iso ( c<→o< (subst (λ k → odef A k ) (sym &iso ) (proj1 p ))) | |
292 | |
293 UnionCF : ( A : HOD ) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) {y : Ordinal } (ay : odef A y ) | |
294 ( supf : Ordinal → Ordinal ) ( x : Ordinal ) → HOD | |
295 UnionCF A f mf ay supf x | |
296 = record { od = record { def = λ z → odef A z ∧ UChain A f mf ay supf x z } ; odmax = & A ; <odmax = λ {y} sy → ∈∧P→o< sy } | |
662 | 297 |
703 | 298 record ZChain ( A : HOD ) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) |
783 | 299 {y : Ordinal} (ay : odef A y) ( z : Ordinal ) : Set (Level.suc n) where |
655 | 300 field |
694 | 301 supf : Ordinal → Ordinal |
608
6655f03984f9
mutual tranfinite in zorn
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
607
diff
changeset
|
302 chain : HOD |
703 | 303 chain = UnionCF A f mf ay supf z |
568 | 304 field |
305 chain⊆A : chain ⊆' A | |
783 | 306 chain∋init : odef chain y |
307 initial : {z : Ordinal } → odef chain z → * y ≤ * z | |
568 | 308 f-next : {a : Ordinal } → odef chain a → odef chain (f a) |
654 | 309 f-total : IsTotalOrderSet chain |
756 | 310 |
791 | 311 sup : {x : Ordinal } → x o≤ z → SUP A (UnionCF A f mf ay supf x) |
312 supf-is-sup : {x : Ordinal } → (x<z : x o≤ z) → supf x ≡ & (SUP.sup (sup x<z) ) | |
761 | 313 sup=u : {b : Ordinal} → (ab : odef A b) → b o< z → IsSup A (UnionCF A f mf ay supf (osuc b)) ab → supf b ≡ b |
785 | 314 csupf : {b : Ordinal } → b o≤ z → odef (UnionCF A f mf ay supf b) (supf b) |
315 supf-mono : {x y : Ordinal } → x o< y → supf x o≤ supf y | |
784 | 316 fcy<sup : {u w : Ordinal } → u o< z → FClosure A f y w → (w ≡ supf u ) ∨ ( w << supf u ) -- different from order because y o< supf |
791 | 317 fcy<sup {u} {w} u<z fc with SUP.x<sup (sup (o<→≤ u<z)) ⟪ subst (λ k → odef A k ) (sym &iso) (A∋fc {A} y f mf fc) |
785 | 318 , ch-init (subst (λ k → FClosure A f y k) (sym &iso) fc ) ⟫ |
791 | 319 ... | case1 eq = case1 (subst (λ k → k ≡ supf u ) &iso (trans (cong (&) eq) (sym (supf-is-sup (o<→≤ u<z) ) ) )) |
320 ... | case2 lt = case2 (subst (λ k → * w < k ) (subst (λ k → k ≡ _ ) *iso (cong (*) (sym (supf-is-sup (o<→≤ u<z) ))) ) lt ) | |
784 | 321 order : {b s z1 : Ordinal} → b o< z → supf s o< supf b → FClosure A f (supf s) z1 → (z1 ≡ supf b) ∨ (z1 << supf b) |
785 | 322 order {b} {s} {z1} b<z sf<sb fc = zc04 where |
323 zc01 : {z1 : Ordinal } → FClosure A f (supf s) z1 → UnionCF A f mf ay supf b ∋ * z1 | |
324 zc01 (init x refl ) = subst (λ k → odef (UnionCF A f mf ay supf b) k ) (sym &iso) zc03 where | |
788 | 325 s<b : s o< b |
326 s<b with trio< s b | |
785 | 327 ... | tri< a ¬b ¬c = a |
788 | 328 ... | tri≈ ¬a b ¬c = ⊥-elim ( o<¬≡ (cong supf b) sf<sb ) |
785 | 329 ... | tri> ¬a ¬b c with osuc-≡< ( supf-mono c ) |
788 | 330 ... | case1 eq = ⊥-elim ( o<¬≡ (sym eq) sf<sb ) |
331 ... | case2 lt = ⊥-elim ( o<> lt sf<sb ) | |
332 s<z : s o< z | |
333 s<z = ordtrans s<b b<z | |
785 | 334 zc03 : odef (UnionCF A f mf ay supf b) (supf s) |
335 zc03 with csupf (o<→≤ s<z) | |
336 ... | ⟪ as , ch-init fc ⟫ = ⟪ as , ch-init fc ⟫ | |
791 | 337 ... | ⟪ as , ch-is-sup u u≤x is-sup fc ⟫ = ⟪ as , ch-is-sup u (ordtrans u≤x (osucc s<b)) is-sup fc ⟫ |
785 | 338 zc01 (fsuc x fc) = subst (λ k → odef (UnionCF A f mf ay supf b) k ) (sym &iso) zc04 where |
339 zc04 : odef (UnionCF A f mf ay supf b) (f x) | |
340 zc04 with subst (λ k → odef (UnionCF A f mf ay supf b) k ) &iso (zc01 fc ) | |
341 ... | ⟪ as , ch-init fc ⟫ = ⟪ proj2 (mf _ as) , ch-init (fsuc _ fc) ⟫ | |
791 | 342 ... | ⟪ as , ch-is-sup u u≤x is-sup fc ⟫ = ⟪ proj2 (mf _ as) , ch-is-sup u u≤x is-sup (fsuc _ fc) ⟫ |
343 zc00 : ( * z1 ≡ SUP.sup (sup (o<→≤ b<z) )) ∨ ( * z1 < SUP.sup ( sup (o<→≤ b<z) ) ) | |
344 zc00 = SUP.x<sup (sup (o<→≤ b<z)) (zc01 fc ) | |
785 | 345 zc04 : (z1 ≡ supf b) ∨ (z1 << supf b) |
346 zc04 with zc00 | |
791 | 347 ... | case1 eq = case1 (subst₂ (λ j k → j ≡ k ) &iso (sym (supf-is-sup (o<→≤ b<z) ) ) (cong (&) eq) ) |
348 ... | case2 lt = case2 (subst₂ (λ j k → j < k ) refl (subst₂ (λ j k → j ≡ k ) *iso refl (cong (*) (sym (supf-is-sup (o<→≤ b<z) ) ))) lt ) | |
756 | 349 |
653 | 350 |
728 | 351 record ZChain1 ( A : HOD ) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) |
783 | 352 {y : Ordinal} (ay : odef A y) (zc : ZChain A f mf ay (& A)) ( z : Ordinal ) : Set (Level.suc n) where |
728 | 353 field |
354 is-max : {a b : Ordinal } → (ca : odef (UnionCF A f mf ay (ZChain.supf zc) z) a ) → b o< z → (ab : odef A b) | |
355 → HasPrev A (UnionCF A f mf ay (ZChain.supf zc) z) ab f ∨ IsSup A (UnionCF A f mf ay (ZChain.supf zc) z) ab | |
356 → * a < * b → odef ((UnionCF A f mf ay (ZChain.supf zc) z)) b | |
357 | |
568 | 358 record Maximal ( A : HOD ) : Set (Level.suc n) where |
359 field | |
360 maximal : HOD | |
361 A∋maximal : A ∋ maximal | |
362 ¬maximal<x : {x : HOD} → A ∋ x → ¬ maximal < x -- A is Partial, use negative | |
567 | 363 |
748 | 364 -- data UChain is total |
684
822fce8af579
no transfinite on data Chain trichotomos
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
683
diff
changeset
|
365 |
694 | 366 chain-total : (A : HOD ) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) {y : Ordinal} (ay : odef A y) (supf : Ordinal → Ordinal ) |
748 | 367 {s s1 a b : Ordinal } ( ca : UChain A f mf ay supf s a ) ( cb : UChain A f mf ay supf s1 b ) → Tri (* a < * b) (* a ≡ * b) (* b < * a ) |
694 | 368 chain-total A f mf {y} ay supf {xa} {xb} {a} {b} ca cb = ct-ind xa xb ca cb where |
748 | 369 ct-ind : (xa xb : Ordinal) → {a b : Ordinal} → UChain A f mf ay supf xa a → UChain A f mf ay supf xb b → Tri (* a < * b) (* a ≡ * b) (* b < * a) |
370 ct-ind xa xb {a} {b} (ch-init fca) (ch-init fcb) = fcn-cmp y f mf fca fcb | |
791 | 371 ct-ind xa xb {a} {b} (ch-init fca) (ch-is-sup ub u≤x supb fcb) with ChainP.fcy<sup supb fca |
766 | 372 ... | case1 eq with s≤fc (supf ub) f mf fcb |
373 ... | case1 eq1 = tri≈ (λ lt → ⊥-elim (<-irr (case1 (sym ct00)) lt)) ct00 (λ lt → ⊥-elim (<-irr (case1 ct00) lt)) where | |
374 ct00 : * a ≡ * b | |
375 ct00 = trans (cong (*) eq) eq1 | |
765 | 376 ... | case2 lt = tri< ct01 (λ eq → <-irr (case1 (sym eq)) ct01) (λ lt → <-irr (case2 ct01) lt) where |
766 | 377 ct01 : * a < * b |
378 ct01 = subst (λ k → * k < * b ) (sym eq) lt | |
791 | 379 ct-ind xa xb {a} {b} (ch-init fca) (ch-is-sup ub u≤x supb fcb) | case2 lt = tri< ct01 (λ eq → <-irr (case1 (sym eq)) ct01) (λ lt → <-irr (case2 ct01) lt) where |
748 | 380 ct00 : * a < * (supf ub) |
765 | 381 ct00 = lt |
689
34650e39e553
Chain is not strictly positive
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
688
diff
changeset
|
382 ct01 : * a < * b |
748 | 383 ct01 with s≤fc (supf ub) f mf fcb |
689
34650e39e553
Chain is not strictly positive
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
688
diff
changeset
|
384 ... | case1 eq = subst (λ k → * a < k ) eq ct00 |
34650e39e553
Chain is not strictly positive
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
688
diff
changeset
|
385 ... | case2 lt = IsStrictPartialOrder.trans POO ct00 lt |
791 | 386 ct-ind xa xb {a} {b} (ch-is-sup ua u≤x supa fca) (ch-init fcb) with ChainP.fcy<sup supa fcb |
766 | 387 ... | case1 eq with s≤fc (supf ua) f mf fca |
388 ... | case1 eq1 = tri≈ (λ lt → ⊥-elim (<-irr (case1 (sym ct00)) lt)) ct00 (λ lt → ⊥-elim (<-irr (case1 ct00) lt)) where | |
389 ct00 : * a ≡ * b | |
390 ct00 = sym (trans (cong (*) eq) eq1 ) | |
765 | 391 ... | case2 lt = tri> (λ lt → <-irr (case2 ct01) lt) (λ eq → <-irr (case1 eq) ct01) ct01 where |
766 | 392 ct01 : * b < * a |
393 ct01 = subst (λ k → * k < * a ) (sym eq) lt | |
791 | 394 ct-ind xa xb {a} {b} (ch-is-sup ua u≤x supa fca) (ch-init fcb) | case2 lt = tri> (λ lt → <-irr (case2 ct01) lt) (λ eq → <-irr (case1 eq) ct01) ct01 where |
749 | 395 ct00 : * b < * (supf ua) |
765 | 396 ct00 = lt |
689
34650e39e553
Chain is not strictly positive
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
688
diff
changeset
|
397 ct01 : * b < * a |
749 | 398 ct01 with s≤fc (supf ua) f mf fca |
689
34650e39e553
Chain is not strictly positive
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
688
diff
changeset
|
399 ... | case1 eq = subst (λ k → * b < k ) eq ct00 |
34650e39e553
Chain is not strictly positive
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
688
diff
changeset
|
400 ... | case2 lt = IsStrictPartialOrder.trans POO ct00 lt |
788 | 401 ct-ind xa xb {a} {b} (ch-is-sup ua ua<x supa fca) (ch-is-sup ub ub<x supb fcb) with trio< (supf ua) (supf ub) |
775 | 402 ... | tri< a₁ ¬b ¬c with ChainP.order supb a₁ fca |
766 | 403 ... | case1 eq with s≤fc (supf ub) f mf fcb |
404 ... | case1 eq1 = tri≈ (λ lt → ⊥-elim (<-irr (case1 (sym ct00)) lt)) ct00 (λ lt → ⊥-elim (<-irr (case1 ct00) lt)) where | |
405 ct00 : * a ≡ * b | |
406 ct00 = trans (cong (*) eq) eq1 | |
407 ... | case2 lt = tri< ct02 (λ eq → <-irr (case1 (sym eq)) ct02) (λ lt → <-irr (case2 ct02) lt) where | |
408 ct02 : * a < * b | |
409 ct02 = subst (λ k → * k < * b ) (sym eq) lt | |
788 | 410 ct-ind xa xb {a} {b} (ch-is-sup ua ua<x supa fca) (ch-is-sup ub ub<x supb fcb) | tri< a₁ ¬b ¬c | case2 lt = tri< ct02 (λ eq → <-irr (case1 (sym eq)) ct02) (λ lt → <-irr (case2 ct02) lt) where |
748 | 411 ct03 : * a < * (supf ub) |
765 | 412 ct03 = lt |
689
34650e39e553
Chain is not strictly positive
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
688
diff
changeset
|
413 ct02 : * a < * b |
748 | 414 ct02 with s≤fc (supf ub) f mf fcb |
689
34650e39e553
Chain is not strictly positive
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
688
diff
changeset
|
415 ... | case1 eq = subst (λ k → * a < k ) eq ct03 |
34650e39e553
Chain is not strictly positive
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
688
diff
changeset
|
416 ... | case2 lt = IsStrictPartialOrder.trans POO ct03 lt |
788 | 417 ct-ind xa xb {a} {b} (ch-is-sup ua ua<x supa fca) (ch-is-sup ub ub<x supb fcb) | tri≈ ¬a eq ¬c |
769 | 418 = fcn-cmp (supf ua) f mf fca (subst (λ k → FClosure A f k b ) (sym eq) fcb ) |
788 | 419 ct-ind xa xb {a} {b} (ch-is-sup ua ua<x supa fca) (ch-is-sup ub ub<x supb fcb) | tri> ¬a ¬b c with ChainP.order supa c fcb |
766 | 420 ... | case1 eq with s≤fc (supf ua) f mf fca |
421 ... | case1 eq1 = tri≈ (λ lt → ⊥-elim (<-irr (case1 (sym ct00)) lt)) ct00 (λ lt → ⊥-elim (<-irr (case1 ct00) lt)) where | |
422 ct00 : * a ≡ * b | |
423 ct00 = sym (trans (cong (*) eq) eq1) | |
424 ... | case2 lt = tri> (λ lt → <-irr (case2 ct02) lt) (λ eq → <-irr (case1 eq) ct02) ct02 where | |
425 ct02 : * b < * a | |
426 ct02 = subst (λ k → * k < * a ) (sym eq) lt | |
788 | 427 ct-ind xa xb {a} {b} (ch-is-sup ua ua<x supa fca) (ch-is-sup ub ub<x supb fcb) | tri> ¬a ¬b c | case2 lt = tri> (λ lt → <-irr (case2 ct04) lt) (λ eq → <-irr (case1 (eq)) ct04) ct04 where |
749 | 428 ct05 : * b < * (supf ua) |
765 | 429 ct05 = lt |
689
34650e39e553
Chain is not strictly positive
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
688
diff
changeset
|
430 ct04 : * b < * a |
749 | 431 ct04 with s≤fc (supf ua) f mf fca |
689
34650e39e553
Chain is not strictly positive
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
688
diff
changeset
|
432 ... | case1 eq = subst (λ k → * b < k ) eq ct05 |
34650e39e553
Chain is not strictly positive
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
688
diff
changeset
|
433 ... | case2 lt = IsStrictPartialOrder.trans POO ct05 lt |
684
822fce8af579
no transfinite on data Chain trichotomos
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
683
diff
changeset
|
434 |
743 | 435 init-uchain : (A : HOD) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) {y : Ordinal } → (ay : odef A y ) |
436 { supf : Ordinal → Ordinal } { x : Ordinal } → odef (UnionCF A f mf ay supf x) y | |
783 | 437 init-uchain A f mf ay = ⟪ ay , ch-init (init ay refl) ⟫ |
743 | 438 |
497 | 439 Zorn-lemma : { A : HOD } |
464 | 440 → o∅ o< & A |
568 | 441 → ( ( B : HOD) → (B⊆A : B ⊆' A) → IsTotalOrderSet B → SUP A B ) -- SUP condition |
497 | 442 → Maximal A |
552 | 443 Zorn-lemma {A} 0<A supP = zorn00 where |
571 | 444 <-irr0 : {a b : HOD} → A ∋ a → A ∋ b → (a ≡ b ) ∨ (a < b ) → b < a → ⊥ |
445 <-irr0 {a} {b} A∋a A∋b = <-irr | |
788 | 446 z07 : {y : Ordinal} {A : HOD } → {P : Set n} → odef A y ∧ P → y o< & A |
447 z07 {y} {A} p = subst (λ k → k o< & A) &iso ( c<→o< (subst (λ k → odef A k ) (sym &iso ) (proj1 p ))) | |
760 | 448 z09 : {b : Ordinal } { A : HOD } → odef A b → b o< & A |
449 z09 {b} {A} ab = subst (λ k → k o< & A) &iso ( c<→o< (subst (λ k → odef A k ) (sym &iso ) ab)) | |
530 | 450 s : HOD |
451 s = ODC.minimal O A (λ eq → ¬x<0 ( subst (λ k → o∅ o< k ) (=od∅→≡o∅ eq) 0<A )) | |
568 | 452 as : A ∋ * ( & s ) |
453 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
|
454 as0 : odef A (& s ) |
6655f03984f9
mutual tranfinite in zorn
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
607
diff
changeset
|
455 as0 = subst (λ k → odef A k ) &iso as |
547 | 456 s<A : & s o< & A |
568 | 457 s<A = c<→o< (subst (λ k → odef A (& k) ) *iso as ) |
530 | 458 HasMaximal : HOD |
537 | 459 HasMaximal = record { od = record { def = λ x → odef A x ∧ ( (m : Ordinal) → odef A m → ¬ (* x < * m)) } ; odmax = & A ; <odmax = z07 } |
460 no-maximum : HasMaximal =h= od∅ → (x : Ordinal) → odef A x ∧ ((m : Ordinal) → odef A m → odef A x ∧ (¬ (* x < * m) )) → ⊥ | |
461 no-maximum nomx x P = ¬x<0 (eq→ nomx {x} ⟪ proj1 P , (λ m ma p → proj2 ( proj2 P m ma ) p ) ⟫ ) | |
532 | 462 Gtx : { x : HOD} → A ∋ x → HOD |
537 | 463 Gtx {x} ax = record { od = record { def = λ y → odef A y ∧ (x < (* y)) } ; odmax = & A ; <odmax = z07 } |
464 z08 : ¬ Maximal A → HasMaximal =h= od∅ | |
465 z08 nmx = record { eq→ = λ {x} lt → ⊥-elim ( nmx record {maximal = * x ; A∋maximal = subst (λ k → odef A k) (sym &iso) (proj1 lt) | |
466 ; ¬maximal<x = λ {y} ay → subst (λ k → ¬ (* x < k)) *iso (proj2 lt (& y) ay) } ) ; eq← = λ {y} lt → ⊥-elim ( ¬x<0 lt )} | |
467 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)) | |
468 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 | |
469 ¬x<m : ¬ (* x < * m) | |
470 ¬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 | 471 |
560 | 472 -- Uncountable ascending chain by axiom of choice |
530 | 473 cf : ¬ Maximal A → Ordinal → Ordinal |
532 | 474 cf nmx x with ODC.∋-p O A (* x) |
475 ... | no _ = o∅ | |
476 ... | yes ax with is-o∅ (& ( Gtx ax )) | |
538 | 477 ... | yes nogt = -- no larger element, so it is maximal |
478 ⊥-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 | 479 ... | no not = & (ODC.minimal O (Gtx ax) (λ eq → not (=od∅→≡o∅ eq))) |
537 | 480 is-cf : (nmx : ¬ Maximal A ) → {x : Ordinal} → odef A x → odef A (cf nmx x) ∧ ( * x < * (cf nmx x) ) |
481 is-cf nmx {x} ax with ODC.∋-p O A (* x) | |
482 ... | no not = ⊥-elim ( not (subst (λ k → odef A k ) (sym &iso) ax )) | |
483 ... | yes ax with is-o∅ (& ( Gtx ax )) | |
484 ... | 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 ⟫ ) | |
485 ... | no not = ODC.x∋minimal O (Gtx ax) (λ eq → not (=od∅→≡o∅ eq)) | |
606 | 486 |
487 --- | |
488 --- infintie ascention sequence of f | |
489 --- | |
530 | 490 cf-is-<-monotonic : (nmx : ¬ Maximal A ) → (x : Ordinal) → odef A x → ( * x < * (cf nmx x) ) ∧ odef A (cf nmx x ) |
537 | 491 cf-is-<-monotonic nmx x ax = ⟪ proj2 (is-cf nmx ax ) , proj1 (is-cf nmx ax ) ⟫ |
530 | 492 cf-is-≤-monotonic : (nmx : ¬ Maximal A ) → ≤-monotonic-f A ( cf nmx ) |
532 | 493 cf-is-≤-monotonic nmx x ax = ⟪ case2 (proj1 ( cf-is-<-monotonic nmx x ax )) , proj2 ( cf-is-<-monotonic nmx x ax ) ⟫ |
543 | 494 |
703 | 495 sp0 : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) (zc : ZChain A f mf as0 (& A) ) |
653 | 496 (total : IsTotalOrderSet (ZChain.chain zc) ) → SUP A (ZChain.chain zc) |
703 | 497 sp0 f mf zc total = supP (ZChain.chain zc) (ZChain.chain⊆A zc) total |
543 | 498 zc< : {x y z : Ordinal} → {P : Set n} → (x o< y → P) → x o< z → z o< y → P |
499 zc< {x} {y} {z} {P} prev x<z z<y = prev (ordtrans x<z z<y) | |
500 | |
728 | 501 SZ1 :( A : HOD ) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) |
502 {init : Ordinal} (ay : odef A init) (zc : ZChain A f mf ay (& A)) (x : Ordinal) → ZChain1 A f mf ay zc x | |
503 SZ1 A f mf {y} ay zc x = TransFinite { λ x → ZChain1 A f mf ay zc x } zc1 x where | |
788 | 504 chain-mono1 : (x : Ordinal) {a b c : Ordinal} → a o≤ b |
505 → odef (UnionCF A f mf ay (ZChain.supf zc) a) c → odef (UnionCF A f mf ay (ZChain.supf zc) b) c | |
506 chain-mono1 x {a} {b} {c} a≤b ⟪ ua , ch-init fc ⟫ = | |
748 | 507 ⟪ ua , ch-init fc ⟫ |
788 | 508 chain-mono1 x {a} {b} {c} a≤b ⟪ uaa , ch-is-sup ua ua<x is-sup fc ⟫ = |
789 | 509 ⟪ uaa , ch-is-sup ua (ordtrans<-≤ ua<x (osucc a≤b )) is-sup fc ⟫ |
735 | 510 is-max-hp : (x : Ordinal) {a : Ordinal} {b : Ordinal} → odef (UnionCF A f mf ay (ZChain.supf zc) x) a → |
511 b o< x → (ab : odef A b) → | |
512 HasPrev A (UnionCF A f mf ay (ZChain.supf zc) x) ab f → | |
513 * a < * b → odef (UnionCF A f mf ay (ZChain.supf zc) x) b | |
749 | 514 is-max-hp x {a} {b} ua b<x ab has-prev a<b with HasPrev.ay has-prev |
515 ... | ⟪ ab0 , ch-init fc ⟫ = ⟪ ab , ch-init ( subst (λ k → FClosure A f y k) (sym (HasPrev.x=fy has-prev)) (fsuc _ fc )) ⟫ | |
791 | 516 ... | ⟪ ab0 , ch-is-sup u u≤x is-sup fc ⟫ = ⟪ ab , |
749 | 517 subst (λ k → UChain A f mf ay (ZChain.supf zc) x k ) |
791 | 518 (sym (HasPrev.x=fy has-prev)) ( ch-is-sup u u≤x is-sup (fsuc _ fc)) ⟫ |
728 | 519 zc1 : (x : Ordinal) → ((y₁ : Ordinal) → y₁ o< x → ZChain1 A f mf ay zc y₁) → ZChain1 A f mf ay zc x |
732
ddeb107b6f71
bchain can be reached from upwords by f. so it is worng.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
729
diff
changeset
|
520 zc1 x prev with Oprev-p x |
756 | 521 ... | yes op = record { is-max = is-max } where |
732
ddeb107b6f71
bchain can be reached from upwords by f. so it is worng.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
729
diff
changeset
|
522 px = Oprev.oprev op |
789 | 523 zc-b<x : {b : Ordinal } → b o< x → b o< osuc px |
524 zc-b<x {b} lt = subst (λ k → b o< k ) (sym (Oprev.oprev=x op)) lt | |
728 | 525 is-max : {a : Ordinal} {b : Ordinal} → odef (UnionCF A f mf ay (ZChain.supf zc) x) a → |
526 b o< x → (ab : odef A b) → | |
527 HasPrev A (UnionCF A f mf ay (ZChain.supf zc) x) ab f ∨ IsSup A (UnionCF A f mf ay (ZChain.supf zc) x) ab → | |
528 * a < * b → odef (UnionCF A f mf ay (ZChain.supf zc) x) b | |
735 | 529 is-max {a} {b} ua b<x ab (case1 has-prev) a<b = is-max-hp x {a} {b} ua b<x ab has-prev a<b |
790
201b66da4e69
remove unnesesary part in SZ1 the second TransFinite induction for is-max
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
789
diff
changeset
|
530 is-max {a} {b} ua b<x ab (case2 is-sup) a<b |
201b66da4e69
remove unnesesary part in SZ1 the second TransFinite induction for is-max
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
789
diff
changeset
|
531 = ⟪ ab , ch-is-sup b (o<→≤ b<x) m06 (subst (λ k → FClosure A f k b) m05 (init ab refl)) ⟫ where |
201b66da4e69
remove unnesesary part in SZ1 the second TransFinite induction for is-max
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
789
diff
changeset
|
532 b<A : b o< & A |
201b66da4e69
remove unnesesary part in SZ1 the second TransFinite induction for is-max
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
789
diff
changeset
|
533 b<A = z09 ab |
201b66da4e69
remove unnesesary part in SZ1 the second TransFinite induction for is-max
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
789
diff
changeset
|
534 m05 : b ≡ ZChain.supf zc b |
201b66da4e69
remove unnesesary part in SZ1 the second TransFinite induction for is-max
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
789
diff
changeset
|
535 m05 = sym ( ZChain.sup=u zc ab (z09 ab) |
789 | 536 record { x<sup = λ {z} uz → IsSup.x<sup is-sup (chain-mono1 x (osucc b<x) uz ) } ) |
790
201b66da4e69
remove unnesesary part in SZ1 the second TransFinite induction for is-max
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
789
diff
changeset
|
537 m08 : {z : Ordinal} → (fcz : FClosure A f y z ) → z <= ZChain.supf zc b |
201b66da4e69
remove unnesesary part in SZ1 the second TransFinite induction for is-max
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
789
diff
changeset
|
538 m08 {z} fcz = ZChain.fcy<sup zc b<A fcz |
201b66da4e69
remove unnesesary part in SZ1 the second TransFinite induction for is-max
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
789
diff
changeset
|
539 m09 : {sup1 z1 : Ordinal} → (ZChain.supf zc sup1) o< (ZChain.supf zc b) |
769 | 540 → FClosure A f (ZChain.supf zc sup1) z1 → z1 <= ZChain.supf zc b |
790
201b66da4e69
remove unnesesary part in SZ1 the second TransFinite induction for is-max
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
789
diff
changeset
|
541 m09 {sup1} {z} s<b fcz = ZChain.order zc b<A s<b fcz |
201b66da4e69
remove unnesesary part in SZ1 the second TransFinite induction for is-max
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
789
diff
changeset
|
542 m06 : ChainP A f mf ay (ZChain.supf zc) b |
201b66da4e69
remove unnesesary part in SZ1 the second TransFinite induction for is-max
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
789
diff
changeset
|
543 m06 = record { fcy<sup = m08 ; order = m09 } |
756 | 544 ... | no lim = record { is-max = is-max } where |
734 | 545 is-max : {a : Ordinal} {b : Ordinal} → odef (UnionCF A f mf ay (ZChain.supf zc) x) a → |
546 b o< x → (ab : odef A b) → | |
547 HasPrev A (UnionCF A f mf ay (ZChain.supf zc) x) ab f ∨ IsSup A (UnionCF A f mf ay (ZChain.supf zc) x) ab → | |
548 * a < * b → odef (UnionCF A f mf ay (ZChain.supf zc) x) b | |
735 | 549 is-max {a} {b} ua b<x ab (case1 has-prev) a<b = is-max-hp x {a} {b} ua b<x ab has-prev a<b |
743 | 550 is-max {a} {b} ua b<x ab (case2 is-sup) a<b with IsSup.x<sup is-sup (init-uchain A f mf ay ) |
789 | 551 ... | 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 )) ⟫ |
790
201b66da4e69
remove unnesesary part in SZ1 the second TransFinite induction for is-max
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
789
diff
changeset
|
552 ... | case2 y<b = chain-mono1 x (osucc b<x) |
201b66da4e69
remove unnesesary part in SZ1 the second TransFinite induction for is-max
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
789
diff
changeset
|
553 ⟪ ab , ch-is-sup b (ordtrans o≤-refl <-osuc ) m06 (subst (λ k → FClosure A f k b) m05 (init ab refl)) ⟫ where |
201b66da4e69
remove unnesesary part in SZ1 the second TransFinite induction for is-max
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
789
diff
changeset
|
554 m09 : b o< & A |
201b66da4e69
remove unnesesary part in SZ1 the second TransFinite induction for is-max
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
789
diff
changeset
|
555 m09 = subst (λ k → k o< & A) &iso ( c<→o< (subst (λ k → odef A k ) (sym &iso ) ab)) |
201b66da4e69
remove unnesesary part in SZ1 the second TransFinite induction for is-max
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
789
diff
changeset
|
556 m07 : {z : Ordinal} → FClosure A f y z → z <= ZChain.supf zc b |
201b66da4e69
remove unnesesary part in SZ1 the second TransFinite induction for is-max
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
789
diff
changeset
|
557 m07 {z} fc = ZChain.fcy<sup zc m09 fc |
201b66da4e69
remove unnesesary part in SZ1 the second TransFinite induction for is-max
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
789
diff
changeset
|
558 m08 : {sup1 z1 : Ordinal} → (ZChain.supf zc sup1) o< (ZChain.supf zc b) |
769 | 559 → FClosure A f (ZChain.supf zc sup1) z1 → z1 <= ZChain.supf zc b |
790
201b66da4e69
remove unnesesary part in SZ1 the second TransFinite induction for is-max
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
789
diff
changeset
|
560 m08 {sup1} {z1} s<b fc = ZChain.order zc m09 s<b fc |
201b66da4e69
remove unnesesary part in SZ1 the second TransFinite induction for is-max
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
789
diff
changeset
|
561 m05 : b ≡ ZChain.supf zc b |
201b66da4e69
remove unnesesary part in SZ1 the second TransFinite induction for is-max
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
789
diff
changeset
|
562 m05 = sym (ZChain.sup=u zc ab m09 |
789 | 563 record { x<sup = λ lt → IsSup.x<sup is-sup (chain-mono1 x (osucc b<x) lt )} ) -- ZChain on x |
790
201b66da4e69
remove unnesesary part in SZ1 the second TransFinite induction for is-max
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
789
diff
changeset
|
564 m06 : ChainP A f mf ay (ZChain.supf zc) b |
201b66da4e69
remove unnesesary part in SZ1 the second TransFinite induction for is-max
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
789
diff
changeset
|
565 m06 = record { fcy<sup = m07 ; order = m08 } |
727 | 566 |
543 | 567 --- |
560 | 568 --- the maximum chain has fix point of any ≤-monotonic function |
543 | 569 --- |
703 | 570 fixpoint : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) (zc : ZChain A f mf as0 (& A) ) |
633
6cd4a483122c
ZChain1 is not strictly positive
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
631
diff
changeset
|
571 → (total : IsTotalOrderSet (ZChain.chain zc) ) |
703 | 572 → f (& (SUP.sup (sp0 f mf zc total ))) ≡ & (SUP.sup (sp0 f mf zc total)) |
573 fixpoint f mf zc total = z14 where | |
538 | 574 chain = ZChain.chain zc |
703 | 575 sp1 = sp0 f mf zc total |
712 | 576 z10 : {a b : Ordinal } → (ca : odef chain a ) → b o< & A → (ab : odef A b ) |
570 | 577 → HasPrev A chain ab f ∨ IsSup A chain {b} ab -- (supO chain (ZChain.chain⊆A zc) (ZChain.f-total zc) ≡ b ) |
538 | 578 → * a < * b → odef chain b |
728 | 579 z10 = ZChain1.is-max (SZ1 A f mf as0 zc (& A) ) |
543 | 580 z11 : & (SUP.sup sp1) o< & A |
581 z11 = c<→o< ( SUP.A∋maximal sp1) | |
538 | 582 z12 : odef chain (& (SUP.sup sp1)) |
583 z12 with o≡? (& s) (& (SUP.sup sp1)) | |
653 | 584 ... | yes eq = subst (λ k → odef chain k) eq ( ZChain.chain∋init zc ) |
712 | 585 ... | no ne = z10 {& s} {& (SUP.sup sp1)} ( ZChain.chain∋init zc ) z11 (SUP.A∋maximal sp1) |
570 | 586 (case2 z19 ) z13 where |
538 | 587 z13 : * (& s) < * (& (SUP.sup sp1)) |
653 | 588 z13 with SUP.x<sup sp1 ( ZChain.chain∋init zc ) |
538 | 589 ... | case1 eq = ⊥-elim ( ne (cong (&) eq) ) |
590 ... | case2 lt = subst₂ (λ j k → j < k ) (sym *iso) (sym *iso) lt | |
570 | 591 z19 : IsSup A chain {& (SUP.sup sp1)} (SUP.A∋maximal sp1) |
571 | 592 z19 = record { x<sup = z20 } where |
593 z20 : {y : Ordinal} → odef chain y → (y ≡ & (SUP.sup sp1)) ∨ (y << & (SUP.sup sp1)) | |
594 z20 {y} zy with SUP.x<sup sp1 (subst (λ k → odef chain k ) (sym &iso) zy) | |
570 | 595 ... | case1 y=p = case1 (subst (λ k → k ≡ _ ) &iso ( cong (&) y=p )) |
596 ... | case2 y<p = case2 (subst (λ k → * y < k ) (sym *iso) y<p ) | |
597 -- λ {y} zy → subst (λ k → (y ≡ & k ) ∨ (y << & k)) ? (SUP.x<sup sp1 ? ) } | |
703 | 598 z14 : f (& (SUP.sup (sp0 f mf zc total ))) ≡ & (SUP.sup (sp0 f mf zc total )) |
633
6cd4a483122c
ZChain1 is not strictly positive
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
631
diff
changeset
|
599 z14 with total (subst (λ k → odef chain k) (sym &iso) (ZChain.f-next zc z12 )) z12 |
631 | 600 ... | tri< a ¬b ¬c = ⊥-elim z16 where |
601 z16 : ⊥ | |
602 z16 with proj1 (mf (& ( SUP.sup sp1)) ( SUP.A∋maximal sp1 )) | |
603 ... | case1 eq = ⊥-elim (¬b (subst₂ (λ j k → j ≡ k ) refl *iso (sym eq) )) | |
604 ... | case2 lt = ⊥-elim (¬c (subst₂ (λ j k → k < j ) refl *iso lt )) | |
605 ... | tri≈ ¬a b ¬c = subst ( λ k → k ≡ & (SUP.sup sp1) ) &iso ( cong (&) b ) | |
606 ... | tri> ¬a ¬b c = ⊥-elim z17 where | |
607 z15 : (* (f ( & ( SUP.sup sp1 ))) ≡ SUP.sup sp1) ∨ (* (f ( & ( SUP.sup sp1 ))) < SUP.sup sp1) | |
608 z15 = SUP.x<sup sp1 (subst (λ k → odef chain k ) (sym &iso) (ZChain.f-next zc z12 )) | |
609 z17 : ⊥ | |
610 z17 with z15 | |
611 ... | case1 eq = ¬b eq | |
612 ... | case2 lt = ¬a lt | |
560 | 613 |
614 -- ZChain contradicts ¬ Maximal | |
615 -- | |
571 | 616 -- ZChain forces fix point on any ≤-monotonic function (fixpoint) |
560 | 617 -- ¬ Maximal create cf which is a <-monotonic function by axiom of choice. This contradicts fix point of ZChain |
618 -- | |
697 | 619 z04 : (nmx : ¬ Maximal A ) |
703 | 620 → (zc : ZChain A (cf nmx) (cf-is-≤-monotonic nmx) as0 (& A)) |
664 | 621 → IsTotalOrderSet (ZChain.chain zc) → ⊥ |
703 | 622 z04 nmx zc total = <-irr0 {* (cf nmx c)} {* c} (subst (λ k → odef A k ) (sym &iso) (proj1 (is-cf nmx (SUP.A∋maximal sp1 )))) |
571 | 623 (subst (λ k → odef A (& k)) (sym *iso) (SUP.A∋maximal sp1) ) |
703 | 624 (case1 ( cong (*)( fixpoint (cf nmx) (cf-is-≤-monotonic nmx ) zc total ))) -- x ≡ f x ̄ |
633
6cd4a483122c
ZChain1 is not strictly positive
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
631
diff
changeset
|
625 (proj1 (cf-is-<-monotonic nmx c (SUP.A∋maximal sp1 ))) where -- x < f x |
6cd4a483122c
ZChain1 is not strictly positive
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
631
diff
changeset
|
626 sp1 : SUP A (ZChain.chain zc) |
703 | 627 sp1 = sp0 (cf nmx) (cf-is-≤-monotonic nmx) zc total |
538 | 628 c = & (SUP.sup sp1) |
548 | 629 |
757 | 630 uchain : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) → HOD |
631 uchain f mf {y} ay = record { od = record { def = λ x → FClosure A f y x } ; odmax = & A ; <odmax = | |
632 λ {z} cz → subst (λ k → k o< & A) &iso ( c<→o< (subst (λ k → odef A k ) (sym &iso ) (A∋fc y f mf cz ))) } | |
633 | |
634 utotal : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) | |
635 → IsTotalOrderSet (uchain f mf ay) | |
636 utotal f mf {y} ay {a} {b} ca cb = subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso uz01 where | |
637 uz01 : Tri (* (& a) < * (& b)) (* (& a) ≡ * (& b)) (* (& b) < * (& a) ) | |
638 uz01 = fcn-cmp y f mf ca cb | |
639 | |
640 ysup : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) | |
641 → SUP A (uchain f mf ay) | |
642 ysup f mf {y} ay = supP (uchain f mf ay) (λ lt → A∋fc y f mf lt) (utotal f mf ay) | |
643 | |
711 | 644 inititalChain : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) → ZChain A f mf ay o∅ |
791 | 645 inititalChain f mf {y} ay = record { supf = isupf ; chain⊆A = λ lt → proj1 lt ; chain∋init = cy ; sup = ? ; supf-is-sup = ? |
786 | 646 ; initial = isy ; f-next = inext ; f-total = itotal ; sup=u = λ _ b<0 → ⊥-elim (¬x<0 b<0) ; supf-mono = mono ; csupf = csupf } where |
764 | 647 spi = & (SUP.sup (ysup f mf ay)) |
711 | 648 isupf : Ordinal → Ordinal |
768 | 649 isupf z = spi |
763 | 650 sp = ysup f mf ay |
767 | 651 asi = SUP.A∋maximal sp |
711 | 652 cy : odef (UnionCF A f mf ay isupf o∅) y |
783 | 653 cy = ⟪ ay , ch-init (init ay refl) ⟫ |
759 | 654 y<sup : * y ≤ SUP.sup (ysup f mf ay) |
783 | 655 y<sup = SUP.x<sup (ysup f mf ay) (subst (λ k → FClosure A f y k ) (sym &iso) (init ay refl)) |
786 | 656 sup : {x : Ordinal} → x o< o∅ → SUP A (UnionCF A f mf ay isupf x) |
657 sup {x} lt = ⊥-elim ( ¬x<0 lt ) | |
711 | 658 isy : {z : Ordinal } → odef (UnionCF A f mf ay isupf o∅) z → * y ≤ * z |
748 | 659 isy {z} ⟪ az , uz ⟫ with uz |
660 ... | ch-init fc = s≤fc y f mf fc | |
791 | 661 ... | ch-is-sup u u≤x is-sup fc = ≤-ftrans (subst (λ k → * y ≤ k) (sym *iso) y<sup) (s≤fc (& (SUP.sup (ysup f mf ay))) f mf fc ) |
711 | 662 inext : {a : Ordinal} → odef (UnionCF A f mf ay isupf o∅) a → odef (UnionCF A f mf ay isupf o∅) (f a) |
748 | 663 inext {a} ua with (proj2 ua) |
664 ... | ch-init fc = ⟪ proj2 (mf _ (proj1 ua)) , ch-init (fsuc _ fc ) ⟫ | |
791 | 665 ... | ch-is-sup u u≤x is-sup fc = ⟪ proj2 (mf _ (proj1 ua)) , ch-is-sup u u≤x is-sup (fsuc _ fc) ⟫ |
711 | 666 itotal : IsTotalOrderSet (UnionCF A f mf ay isupf o∅) |
667 itotal {a} {b} ca cb = subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso uz01 where | |
668 uz01 : Tri (* (& a) < * (& b)) (* (& a) ≡ * (& b)) (* (& b) < * (& a) ) | |
763 | 669 uz01 = chain-total A f mf ay isupf (proj2 ca) (proj2 cb) |
786 | 670 mono : {x : Ordinal} {z : Ordinal} → x o< z → isupf x o≤ isupf z |
671 mono {x} {z} x<z = o≤-refl | |
672 csupf : {z : Ordinal} → z o≤ o∅ → odef (UnionCF A f mf ay isupf z ) (isupf z) | |
789 | 673 csupf {z} z≤0 = ⟪ asi , ch-is-sup o∅ o∅≤z uz02 (init asi refl) ⟫ where |
768 | 674 uz03 : {z : Ordinal } → FClosure A f y z → (z ≡ isupf spi) ∨ (z << isupf spi) |
767 | 675 uz03 {z} fc with SUP.x<sup sp (subst (λ k → FClosure A f y k ) (sym &iso) fc ) |
676 ... | case1 eq = case1 ( begin | |
677 z ≡⟨ sym &iso ⟩ | |
678 & (* z) ≡⟨ cong (&) eq ⟩ | |
679 spi ∎ ) where open ≡-Reasoning | |
680 ... | case2 lt = case2 (subst (λ k → * z < k ) (sym *iso) lt ) | |
769 | 681 uz04 : {sup1 z1 : Ordinal} → isupf sup1 o< isupf spi → FClosure A f (isupf sup1) z1 → (z1 ≡ isupf spi) ∨ (z1 << isupf spi) |
682 uz04 {s} {z} s<spi fcz = ⊥-elim ( o<¬≡ refl s<spi ) | |
789 | 683 uz02 : ChainP A f mf ay isupf o∅ |
775 | 684 uz02 = record { fcy<sup = uz03 ; order = λ {s} {z} → uz04 {s} {z} } |
767 | 685 |
711 | 686 |
560 | 687 -- |
547 | 688 -- create all ZChains under o< x |
560 | 689 -- |
608
6655f03984f9
mutual tranfinite in zorn
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
607
diff
changeset
|
690 |
674 | 691 ind : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) → (x : Ordinal) |
703 | 692 → ((z : Ordinal) → z o< x → ZChain A f mf ay z) → ZChain A f mf ay x |
707 | 693 ind f mf {y} ay x prev with Oprev-p x |
697 | 694 ... | yes op = zc4 where |
682 | 695 -- |
696 -- we have previous ordinal to use induction | |
697 -- | |
698 px = Oprev.oprev op | |
703 | 699 zc : ZChain A f mf ay (Oprev.oprev op) |
682 | 700 zc = prev px (subst (λ k → px o< k) (Oprev.oprev=x op) <-osuc ) |
701 px<x : px o< x | |
702 px<x = subst (λ k → px o< k) (Oprev.oprev=x op) <-osuc | |
709 | 703 zc-b<x : (b : Ordinal ) → b o< x → b o< osuc px |
704 zc-b<x b lt = subst (λ k → b o< k ) (sym (Oprev.oprev=x op)) lt | |
697 | 705 |
703 | 706 pchain : HOD |
707 pchain = UnionCF A f mf ay (ZChain.supf zc) x | |
708 ptotal : IsTotalOrderSet pchain | |
709 ptotal {a} {b} ca cb = subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso uz01 where | |
710 uz01 : Tri (* (& a) < * (& b)) (* (& a) ≡ * (& b)) (* (& b) < * (& a) ) | |
748 | 711 uz01 = chain-total A f mf ay (ZChain.supf zc) ( (proj2 ca)) ( (proj2 cb)) |
704 | 712 pchain⊆A : {y : Ordinal} → odef pchain y → odef A y |
713 pchain⊆A {y} ny = proj1 ny | |
714 pnext : {a : Ordinal} → odef pchain a → odef pchain (f a) | |
749 | 715 pnext {a} ⟪ aa , ch-init fc ⟫ = ⟪ proj2 (mf a aa) , ch-init (fsuc _ fc) ⟫ |
791 | 716 pnext {a} ⟪ aa , ch-is-sup u u≤x is-sup fc ⟫ = ⟪ proj2 (mf a aa) , ch-is-sup u ? is-sup (fsuc _ fc ) ⟫ |
704 | 717 pinit : {y₁ : Ordinal} → odef pchain y₁ → * y ≤ * y₁ |
748 | 718 pinit {a} ⟪ aa , ua ⟫ with ua |
719 ... | ch-init fc = s≤fc y f mf fc | |
791 | 720 ... | ch-is-sup u u≤x is-sup fc = ≤-ftrans (<=to≤ zc7) (s≤fc _ f mf fc) where |
765 | 721 zc7 : y <= (ZChain.supf zc) u |
783 | 722 zc7 = ChainP.fcy<sup is-sup (init ay refl) |
704 | 723 pcy : odef pchain y |
783 | 724 pcy = ⟪ ay , ch-init (init ay refl) ⟫ |
703 | 725 |
754 | 726 supf0 = ZChain.supf zc |
727 | |
611 | 728 -- if previous chain satisfies maximality, we caan reuse it |
729 -- | |
791 | 730 -- supf0 px is sup of UnionCF px , supf0 x is sup of UnionCF x |
727 | 731 no-extension : ZChain A f mf ay x |
791 | 732 no-extension = record { supf = supf1 ; supf-mono = ? ; sup = sup |
733 ; initial = ? ; chain∋init = ? ; sup=u = {!!} ; supf-is-sup = ? ; csupf = ? | |
734 ; chain⊆A = ? ; f-next = ? ; f-total = ? } where | |
735 sup1 : SUP A (UnionCF A f mf ay supf0 x) | |
736 sup1 = supP pchain pchain⊆A ptotal | |
737 sp1 = & (SUP.sup sup1 ) | |
738 supf1 : Ordinal → Ordinal | |
739 supf1 z with trio< z px | |
740 ... | tri< a ¬b ¬c = ZChain.supf zc z | |
741 ... | tri≈ ¬a b ¬c = ZChain.supf zc z | |
742 ... | tri> ¬a ¬b c = sp1 | |
743 UnionCF⊆ : UnionCF A f mf ay supf1 x ⊆' UnionCF A f mf ay supf0 x | |
744 UnionCF⊆ ⟪ as , ch-init fc ⟫ = UnionCF⊆ ⟪ as , ch-init fc ⟫ | |
745 UnionCF⊆ ⟪ as , ch-is-sup u {z} u≤x record { fcy<sup = f1 ; order = o1 } fc ⟫ with trio< u px | |
746 ... | tri< a ¬b ¬c = ⟪ as , ch-is-sup u {z} u≤x record { fcy<sup = f1 ; order = order0 } fc ⟫ where | |
747 order1 : {s z1 : Ordinal} → supf1 s o< supf0 u → FClosure A f (supf1 s) z1 | |
748 → (z1 ≡ supf0 u) ∨ (z1 << (supf0 u)) | |
749 order1 {s} {z1} = o1 {s} {z1} | |
750 order0 : {s z1 : Ordinal} → supf0 s o< supf0 u → FClosure A f (supf0 s) z1 | |
751 → (z1 ≡ supf0 u) ∨ (z1 << supf0 u) | |
752 order0 {s} {z1} with trio< s px | |
753 ... | tri< a ¬b ¬c = o1 {s} {z1} | |
754 ... | tri≈ ¬a b ¬c = o1 {s} {z1} | |
755 ... | tri> ¬a ¬b c = ? | |
756 ... | tri≈ ¬a b ¬c = ⟪ as , ch-is-sup u {z} u≤x record { fcy<sup = f1 ; order = ? } fc ⟫ | |
757 ... | tri> ¬a ¬b c = ⟪ as , ch-is-sup u {z} u≤x record { fcy<sup = fcy<sup ; order = order } fc0 ⟫ where | |
758 -- px o< u , u o< osuc x → u ≡ x | |
759 -- supf0 x ≡ sp1 ≡ x | |
760 -- u≤x → supf0 u < x | |
761 fc1 : FClosure A f sp1 z | |
762 fc1 = fc | |
763 fc0 : FClosure A f (supf0 u) z | |
764 fc0 = ? | |
765 fcy<sup : {z : Ordinal} → FClosure A f y z → (z ≡ supf0 u) ∨ (z << supf0 u) | |
766 fcy<sup {z} fc = ? | |
767 order : {s z1 : Ordinal} → supf0 s o< supf0 u → FClosure A f (supf0 s) z1 → (z1 ≡ supf0 u) ∨ (z1 << supf0 u) | |
768 order = ? | |
769 sup : {z : Ordinal} → z o≤ x → SUP A (UnionCF A f mf ay supf1 z) | |
770 sup {z} z≤x with trio< z px | |
771 ... | tri< a ¬b ¬c = ? -- ZChain.sup zc (o<→≤ a) | |
772 ... | tri≈ ¬a b ¬c = ? -- ZChain.sup zc (o≤-refl0 b) | |
773 ... | tri> ¬a ¬b c = ? -- sp1 | |
709 | 774 |
703 | 775 zc4 : ZChain A f mf ay x |
713 | 776 zc4 with ODC.∋-p O A (* px) |
727 | 777 ... | no noapx = no-extension -- ¬ A ∋ p, just skip |
713 | 778 ... | yes apx with ODC.p∨¬p O ( HasPrev A (ZChain.chain zc ) apx f ) |
703 | 779 -- we have to check adding x preserve is-max ZChain A y f mf x |
727 | 780 ... | case1 pr = no-extension -- we have previous A ∋ z < x , f z ≡ x, so chain ∋ f z ≡ x because of f-next |
713 | 781 ... | case2 ¬fy<x with ODC.p∨¬p O (IsSup A (ZChain.chain zc ) apx ) |
682 | 782 ... | case1 is-sup = -- x is a sup of zc |
786 | 783 record { supf = psupf1 ; chain⊆A = {!!} ; f-next = {!!} ; f-total = {!!} ; csupf = {!!} ; sup=u = {!!} |
784 ; supf-mono = {!!} ; initial = {!!} ; chain∋init = {!!} ; sup = ? ; supf-is-sup = ? ; supf-mono = ? } where | |
750 | 785 psupf1 : Ordinal → Ordinal |
786 psupf1 z with trio< z x | |
787 ... | tri< a ¬b ¬c = ZChain.supf zc z | |
788 ... | tri≈ ¬a b ¬c = x | |
789 ... | tri> ¬a ¬b c = x | |
727 | 790 ... | case2 ¬x=sup = no-extension -- px is not f y' nor sup of former ZChain from y -- no extention |
758
a2947dfff80d
is-max on first transfinite induction is not good
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
757
diff
changeset
|
791 |
728 | 792 ... | no lim = zc5 where |
726
b2e2cd12e38f
psupf-mono and is-max conflict
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
725
diff
changeset
|
793 |
703 | 794 pzc : (z : Ordinal) → z o< x → ZChain A f mf ay z |
795 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
|
796 |
703 | 797 psupf0 : (z : Ordinal) → Ordinal |
798 psupf0 z with trio< z x | |
755 | 799 ... | tri< a ¬b ¬c = ZChain.supf (pzc (osuc z) (ob<x lim a)) z |
800 ... | tri≈ ¬a b ¬c = & A -- Sup of FClosure A f y z ? | |
801 ... | tri> ¬a ¬b c = & A -- | |
802 | |
803 pchain0 : HOD | |
804 pchain0 = UnionCF A f mf ay psupf0 x | |
805 | |
806 ptotal0 : IsTotalOrderSet pchain0 | |
807 ptotal0 {a} {b} ca cb = subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso uz01 where | |
808 uz01 : Tri (* (& a) < * (& b)) (* (& a) ≡ * (& b)) (* (& b) < * (& a) ) | |
809 uz01 = chain-total A f mf ay psupf0 ( (proj2 ca)) ( (proj2 cb)) | |
810 | |
811 usup : SUP A pchain0 | |
812 usup = supP pchain0 (λ lt → proj1 lt) ptotal0 | |
813 spu = & (SUP.sup usup) | |
814 | |
815 psupf : Ordinal → Ordinal | |
816 psupf z with trio< z x | |
817 ... | tri< a ¬b ¬c = ZChain.supf (pzc (osuc z) (ob<x lim a)) z | |
776 | 818 ... | tri≈ ¬a b ¬c = spu -- ^^ this z dependcy have to be removed |
775 | 819 ... | tri> ¬a ¬b c = spu ---- ∀ z o< x , max (supf (pzc (osuc z) (ob<x lim a))) |
755 | 820 |
774 | 821 psupf<z : {z : Ordinal } → ( a : z o< x ) → psupf z ≡ ZChain.supf (pzc (osuc z) (ob<x lim a)) z |
822 psupf<z {z} z<x with trio< z x | |
823 ... | tri< a ¬b ¬c = cong (λ k → ZChain.supf (pzc (osuc z) (ob<x lim k)) z) ( o<-irr _ _ ) | |
824 ... | tri≈ ¬a b ¬c = ⊥-elim ( ¬a z<x) | |
825 ... | tri> ¬a ¬b c = ⊥-elim ( ¬a z<x) | |
755 | 826 |
827 psupf=x : spu ≡ psupf x | |
828 psupf=x = zc20 refl where | |
829 zc20 : {z : Ordinal } → z ≡ x → spu ≡ psupf x | |
830 zc20 {z} z=x with trio< z x | inspect psupf z | |
831 ... | tri< a ¬b ¬c | _ = ⊥-elim ( ¬b z=x) | |
832 ... | tri≈ ¬a b ¬c | record { eq = eq1 } = subst (λ k → spu ≡ psupf k) b (sym eq1) | |
833 ... | tri> ¬a ¬b c | _ = ⊥-elim ( ¬b z=x) | |
834 | |
785 | 835 csupf : (z : Ordinal) → odef (UnionCF A f mf ay psupf x) (psupf z) |
836 csupf z with trio< z x | inspect psupf z | |
837 ... | tri< z<x ¬b ¬c | record { eq = eq1 } = zc11 where | |
838 ozc = pzc (osuc z) (ob<x lim z<x) | |
786 | 839 zc13 : odef A (ZChain.supf ozc z) ∧ UChain A f mf ay (ZChain.supf ozc) z (ZChain.supf ozc z) |
840 zc13 = ZChain.csupf ozc (ordtrans o≤-refl <-osuc ) | |
785 | 841 zc12 : odef A (ZChain.supf ozc z) ∧ UChain A f mf ay (ZChain.supf ozc) (osuc z) (ZChain.supf ozc z) |
786 | 842 zc12 = ? |
785 | 843 zc11 : odef A (ZChain.supf ozc z) ∧ UChain A f mf ay psupf x (ZChain.supf ozc z) |
789 | 844 zc11 = ⟪ az , ch-is-sup z ? cp1 (subst (λ k → FClosure A f k _) (sym eq1) (init az refl) ) ⟫ where |
785 | 845 az : odef A ( ZChain.supf ozc z ) |
846 az = proj1 zc12 | |
847 zc20 : {z1 : Ordinal} → FClosure A f y z1 → (z1 ≡ psupf z) ∨ (z1 << psupf z) | |
848 zc20 {z1} fc with ZChain.fcy<sup ozc <-osuc fc | |
849 ... | case1 eq = case1 (trans eq (sym eq1) ) | |
850 ... | case2 lt = case2 (subst ( λ k → z1 << k ) (sym eq1) lt) | |
787 | 851 cp1 : ChainP A f mf ay psupf z |
785 | 852 cp1 = record { fcy<sup = zc20 ; order = ? } |
853 --- u = supf u = supf z | |
788 | 854 ... | tri≈ ¬a b ¬c | record { eq = eq1 } = ⟪ sa , ch-is-sup ? {!!} {!!} {!!} ⟫ where |
785 | 855 sa = SUP.A∋maximal usup |
856 ... | tri> ¬a ¬b c | record { eq = eq1 } = {!!} | |
782 | 857 |
781 | 858 fcy<sup : {u w : Ordinal} → u o< x → FClosure A f y w → (w ≡ psupf u) ∨ (w << psupf u) |
859 fcy<sup {u} {w} u<x fc with trio< u x | |
860 ... | tri< a ¬b ¬c = ZChain.fcy<sup uzc <-osuc fc where | |
861 uzc = pzc (osuc u) (ob<x lim a) | |
862 ... | tri≈ ¬a b ¬c = ⊥-elim (¬a u<x) | |
863 ... | tri> ¬a ¬b c = ⊥-elim (¬a u<x) | |
726
b2e2cd12e38f
psupf-mono and is-max conflict
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
725
diff
changeset
|
864 |
704 | 865 pchain : HOD |
755 | 866 pchain = UnionCF A f mf ay psupf x |
704 | 867 |
868 pchain⊆A : {y : Ordinal} → odef pchain y → odef A y | |
869 pchain⊆A {y} ny = proj1 ny | |
870 pnext : {a : Ordinal} → odef pchain a → odef pchain (f a) | |
750 | 871 pnext {a} ⟪ aa , ch-init fc ⟫ = ⟪ proj2 ( mf a aa ) , ch-init (fsuc _ fc) ⟫ |
791 | 872 pnext {a} ⟪ aa , ch-is-sup u u≤x is-sup fc ⟫ = ⟪ proj2 ( mf a aa ) , ch-is-sup u ? is-sup (fsuc _ fc) ⟫ |
704 | 873 pinit : {y₁ : Ordinal} → odef pchain y₁ → * y ≤ * y₁ |
748 | 874 pinit {a} ⟪ aa , ua ⟫ with ua |
875 ... | ch-init fc = s≤fc y f mf fc | |
791 | 876 ... | ch-is-sup u u≤x is-sup fc = ≤-ftrans (<=to≤ zc7) (s≤fc _ f mf fc) where |
765 | 877 zc7 : y <= psupf _ |
783 | 878 zc7 = ChainP.fcy<sup is-sup (init ay refl) |
704 | 879 pcy : odef pchain y |
783 | 880 pcy = ⟪ ay , ch-init (init ay refl) ⟫ |
755 | 881 ptotal : IsTotalOrderSet pchain |
882 ptotal {a} {b} ca cb = subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso uz01 where | |
883 uz01 : Tri (* (& a) < * (& b)) (* (& a) ≡ * (& b)) (* (& b) < * (& a) ) | |
884 uz01 = chain-total A f mf ay psupf ( (proj2 ca)) ( (proj2 cb)) | |
754 | 885 |
758
a2947dfff80d
is-max on first transfinite induction is not good
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
757
diff
changeset
|
886 is-max-hp : (supf : Ordinal → Ordinal) (x : Ordinal) {a : Ordinal} {b : Ordinal} → odef (UnionCF A f mf ay supf x) a → |
a2947dfff80d
is-max on first transfinite induction is not good
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
757
diff
changeset
|
887 b o< x → (ab : odef A b) → |
a2947dfff80d
is-max on first transfinite induction is not good
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
757
diff
changeset
|
888 HasPrev A (UnionCF A f mf ay supf x) ab f → |
a2947dfff80d
is-max on first transfinite induction is not good
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
757
diff
changeset
|
889 * a < * b → odef (UnionCF A f mf ay supf x) b |
a2947dfff80d
is-max on first transfinite induction is not good
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
757
diff
changeset
|
890 is-max-hp supf x {a} {b} ua b<x ab has-prev a<b with HasPrev.ay has-prev |
a2947dfff80d
is-max on first transfinite induction is not good
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
757
diff
changeset
|
891 ... | ⟪ ab0 , ch-init fc ⟫ = ⟪ ab , ch-init ( subst (λ k → FClosure A f y k) (sym (HasPrev.x=fy has-prev)) (fsuc _ fc )) ⟫ |
791 | 892 ... | ⟪ ab0 , ch-is-sup u u≤x is-sup fc ⟫ = ⟪ ab , |
758
a2947dfff80d
is-max on first transfinite induction is not good
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
757
diff
changeset
|
893 subst (λ k → UChain A f mf ay supf x k ) |
788 | 894 (sym (HasPrev.x=fy has-prev)) ( ch-is-sup u ? is-sup (fsuc _ fc)) ⟫ |
758
a2947dfff80d
is-max on first transfinite induction is not good
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
757
diff
changeset
|
895 |
754 | 896 no-extension : ZChain A f mf ay x |
784 | 897 no-extension = record { initial = pinit ; chain∋init = pcy ; supf = psupf ; sup=u = {!!} |
785 | 898 ; chain⊆A = pchain⊆A ; f-next = pnext ; f-total = ptotal } |
789 | 899 |
703 | 900 zc5 : ZChain A f mf ay x |
697 | 901 zc5 with ODC.∋-p O A (* x) |
732
ddeb107b6f71
bchain can be reached from upwords by f. so it is worng.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
729
diff
changeset
|
902 ... | no noax = no-extension -- ¬ A ∋ p, just skip |
704 | 903 ... | yes ax with ODC.p∨¬p O ( HasPrev A pchain ax f ) |
703 | 904 -- we have to check adding x preserve is-max ZChain A y f mf x |
727 | 905 ... | case1 pr = no-extension |
704 | 906 ... | case2 ¬fy<x with ODC.p∨¬p O (IsSup A pchain ax ) |
785 | 907 ... | case1 is-sup = record { initial = {!!} ; chain∋init = {!!} ; supf = psupf1 ; sup=u = {!!} |
908 ; chain⊆A = {!!} ; f-next = {!!} ; f-total = {!!} } where -- x is a sup of (zc ?) | |
728 | 909 psupf1 : Ordinal → Ordinal |
910 psupf1 z with trio< z x | |
911 ... | tri< a ¬b ¬c = ZChain.supf (pzc z a) z | |
912 ... | tri≈ ¬a b ¬c = x | |
913 ... | tri> ¬a ¬b c = x | |
727 | 914 ... | case2 ¬x=sup = no-extension -- x is not f y' nor sup of former ZChain from y -- no extention |
553 | 915 |
703 | 916 SZ : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) → {y : Ordinal} (ay : odef A y) → ZChain A f mf ay (& A) |
917 SZ f mf {y} ay = TransFinite {λ z → ZChain A f mf ay z } (λ x → ind f mf ay x ) (& A) | |
608
6655f03984f9
mutual tranfinite in zorn
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
607
diff
changeset
|
918 |
551 | 919 zorn00 : Maximal A |
920 zorn00 with is-o∅ ( & HasMaximal ) -- we have no Level (suc n) LEM | |
921 ... | no not = record { maximal = ODC.minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) ; A∋maximal = zorn01 ; ¬maximal<x = zorn02 } where | |
922 -- yes we have the maximal | |
923 zorn03 : odef HasMaximal ( & ( ODC.minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) ) ) | |
606 | 924 zorn03 = ODC.x∋minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) -- Axiom of choice |
551 | 925 zorn01 : A ∋ ODC.minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) |
926 zorn01 = proj1 zorn03 | |
927 zorn02 : {x : HOD} → A ∋ x → ¬ (ODC.minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) < x) | |
928 zorn02 {x} ax m<x = proj2 zorn03 (& x) ax (subst₂ (λ j k → j < k) (sym *iso) (sym *iso) m<x ) | |
703 | 929 ... | yes ¬Maximal = ⊥-elim ( z04 nmx zorn04 total ) where |
551 | 930 -- if we have no maximal, make ZChain, which contradict SUP condition |
931 nmx : ¬ Maximal A | |
932 nmx mx = ∅< {HasMaximal} zc5 ( ≡o∅→=od∅ ¬Maximal ) where | |
933 zc5 : odef A (& (Maximal.maximal mx)) ∧ (( y : Ordinal ) → odef A y → ¬ (* (& (Maximal.maximal mx)) < * y)) | |
934 zc5 = ⟪ Maximal.A∋maximal mx , (λ y ay mx<y → Maximal.¬maximal<x mx (subst (λ k → odef A k ) (sym &iso) ay) (subst (λ k → k < * y) *iso mx<y) ) ⟫ | |
703 | 935 zorn04 : ZChain A (cf nmx) (cf-is-≤-monotonic nmx) as0 (& A) |
653 | 936 zorn04 = SZ (cf nmx) (cf-is-≤-monotonic nmx) (subst (λ k → odef A k ) &iso as ) |
634 | 937 total : IsTotalOrderSet (ZChain.chain zorn04) |
654 | 938 total {a} {b} = zorn06 where |
939 zorn06 : odef (ZChain.chain zorn04) (& a) → odef (ZChain.chain zorn04) (& b) → Tri (a < b) (a ≡ b) (b < a) | |
940 zorn06 = ZChain.f-total (SZ (cf nmx) (cf-is-≤-monotonic nmx) (subst (λ k → odef A k ) &iso as) ) | |
551 | 941 |
516 | 942 -- usage (see filter.agda ) |
943 -- | |
497 | 944 -- _⊆'_ : ( A B : HOD ) → Set n |
945 -- _⊆'_ A B = (x : Ordinal ) → odef A x → odef B x | |
482 | 946 |
497 | 947 -- MaximumSubset : {L P : HOD} |
948 -- → o∅ o< & L → o∅ o< & P → P ⊆ L | |
949 -- → IsPartialOrderSet P _⊆'_ | |
950 -- → ( (B : HOD) → B ⊆ P → IsTotalOrderSet B _⊆'_ → SUP P B _⊆'_ ) | |
951 -- → Maximal P (_⊆'_) | |
952 -- MaximumSubset {L} {P} 0<L 0<P P⊆L PO SP = Zorn-lemma {P} {_⊆'_} 0<P PO SP |