|
| 1 | +/- |
| 2 | +Copyright (c) 2022 Violeta Hernández Palacios. All rights reserved. |
| 3 | +Released under Apache 2.0 license as described in the file LICENSE. |
| 4 | +Authors: Violeta Hernández Palacios |
| 5 | +-/ |
| 6 | +import set_theory.ordinal_arithmetic |
| 7 | +import topology.algebra.order.basic |
| 8 | + |
| 9 | +/-! |
| 10 | +### Topology of ordinals |
| 11 | +
|
| 12 | +We prove some miscellaneous results involving the order topology of ordinals. |
| 13 | +
|
| 14 | +### Main results |
| 15 | +
|
| 16 | +* `ordinal.is_closed_iff_sup` / `ordinal.is_closed_iff_bsup`: A set of ordinals is closed iff it's |
| 17 | + closed under suprema. |
| 18 | +* `ordinal.is_normal_iff_strict_mono_and_continuous`: A characterization of normal ordinal |
| 19 | + functions. |
| 20 | +* `ordinal.enum_ord_is_normal_iff_is_closed`: The function enumerating the ordinals of a set is |
| 21 | + normal iff the set is closed. |
| 22 | +-/ |
| 23 | + |
| 24 | +noncomputable theory |
| 25 | + |
| 26 | +universes u v |
| 27 | + |
| 28 | +open cardinal |
| 29 | + |
| 30 | +namespace ordinal |
| 31 | + |
| 32 | +instance : topological_space ordinal.{u} := |
| 33 | +preorder.topology ordinal.{u} |
| 34 | + |
| 35 | +instance : order_topology ordinal.{u} := |
| 36 | +⟨rfl⟩ |
| 37 | + |
| 38 | +theorem is_open_singleton_iff {o : ordinal} : is_open ({o} : set ordinal) ↔ ¬ is_limit o := |
| 39 | +begin |
| 40 | + refine ⟨λ h ho, _, λ ho, _⟩, |
| 41 | + { obtain ⟨a, b, hab, hab'⟩ := (mem_nhds_iff_exists_Ioo_subset' |
| 42 | + ⟨0, ordinal.pos_iff_ne_zero.2 ho.1⟩ ⟨_, lt_succ_self o⟩).1 (h.mem_nhds rfl), |
| 43 | + have hao := ho.2 a hab.1, |
| 44 | + exact hao.ne (hab' ⟨lt_succ_self a, hao.trans hab.2⟩) }, |
| 45 | + { rcases zero_or_succ_or_limit o with rfl | ⟨a, ha⟩ | ho', |
| 46 | + { convert is_open_gt' (1 : ordinal), |
| 47 | + ext, |
| 48 | + exact ordinal.lt_one_iff_zero.symm }, |
| 49 | + { convert @is_open_Ioo _ _ _ _ a (o + 1), |
| 50 | + ext b, |
| 51 | + refine ⟨λ hb, _, _⟩, |
| 52 | + { rw set.mem_singleton_iff.1 hb, |
| 53 | + refine ⟨_, lt_succ_self o⟩, |
| 54 | + rw ha, |
| 55 | + exact lt_succ_self a }, |
| 56 | + { rintro ⟨hb, hb'⟩, |
| 57 | + apply le_antisymm (lt_succ.1 hb'), |
| 58 | + rw ha, |
| 59 | + exact ordinal.succ_le.2 hb } }, |
| 60 | + { exact (ho ho').elim } } |
| 61 | +end |
| 62 | + |
| 63 | +theorem is_open_iff (s : set ordinal) : |
| 64 | + is_open s ↔ (∀ o ∈ s, is_limit o → ∃ a < o, set.Ioo a o ⊆ s) := |
| 65 | +begin |
| 66 | + classical, |
| 67 | + refine ⟨_, λ h, _⟩, |
| 68 | + { rw is_open_iff_generate_intervals, |
| 69 | + intros h o hos ho, |
| 70 | + have ho₀ := ordinal.pos_iff_ne_zero.2 ho.1, |
| 71 | + induction h with t ht t u ht hu ht' hu' t ht H, |
| 72 | + { rcases ht with ⟨a, rfl | rfl⟩, |
| 73 | + { exact ⟨a, hos, λ b hb, hb.1⟩ }, |
| 74 | + { exact ⟨0, ho₀, λ b hb, hb.2.trans hos⟩ } }, |
| 75 | + { exact ⟨0, ho₀, λ b _, set.mem_univ b⟩ }, |
| 76 | + { rcases ht' hos.1 with ⟨a, ha, ha'⟩, |
| 77 | + rcases hu' hos.2 with ⟨b, hb, hb'⟩, |
| 78 | + exact ⟨_, max_lt ha hb, λ c hc, ⟨ |
| 79 | + ha' ⟨(le_max_left a b).trans_lt hc.1, hc.2⟩, |
| 80 | + hb' ⟨(le_max_right a b).trans_lt hc.1, hc.2⟩⟩⟩ }, |
| 81 | + { rcases hos with ⟨u, hu, hu'⟩, |
| 82 | + rcases H u hu hu' with ⟨a, ha, ha'⟩, |
| 83 | + exact ⟨a, ha, λ b hb, ⟨u, hu, ha' hb⟩⟩ } }, |
| 84 | + { let f : s → set ordinal := λ o, |
| 85 | + if ho : is_limit o.val |
| 86 | + then set.Ioo (classical.some (h o.val o.prop ho)) (o + 1) |
| 87 | + else {o.val}, |
| 88 | + have : ∀ a, is_open (f a) := λ a, begin |
| 89 | + change is_open (dite _ _ _), |
| 90 | + split_ifs, |
| 91 | + { exact is_open_Ioo }, |
| 92 | + { rwa is_open_singleton_iff } |
| 93 | + end, |
| 94 | + convert is_open_Union this, |
| 95 | + ext o, |
| 96 | + refine ⟨λ ho, set.mem_Union.2 ⟨⟨o, ho⟩, _⟩, _⟩, |
| 97 | + { split_ifs with ho', |
| 98 | + { refine ⟨_, lt_succ_self o⟩, |
| 99 | + cases classical.some_spec (h o ho ho') with H, |
| 100 | + exact H }, |
| 101 | + { exact set.mem_singleton o } }, |
| 102 | + { rintro ⟨t, ⟨a, ht⟩, hoa⟩, |
| 103 | + change dite _ _ _ = t at ht, |
| 104 | + split_ifs at ht with ha; |
| 105 | + subst ht, |
| 106 | + { cases classical.some_spec (h a.val a.prop ha) with H has, |
| 107 | + rcases lt_or_eq_of_le (lt_succ.1 hoa.2) with hoa' | rfl, |
| 108 | + { exact has ⟨hoa.1, hoa'⟩ }, |
| 109 | + { exact a.prop } }, |
| 110 | + { convert a.prop } } } |
| 111 | +end |
| 112 | + |
| 113 | +theorem mem_closure_iff_sup {s : set ordinal.{u}} {a : ordinal.{u}} : |
| 114 | + a ∈ closure s ↔ ∃ {ι : Type u} [nonempty ι] (f : ι → ordinal.{u}), |
| 115 | + (∀ i, f i ∈ s) ∧ sup.{u u} f = a := |
| 116 | +begin |
| 117 | + refine mem_closure_iff.trans ⟨λ h, _, _⟩, |
| 118 | + { by_cases has : a ∈ s, |
| 119 | + { exact ⟨punit, by apply_instance, λ _, a, λ _, has, sup_const a⟩ }, |
| 120 | + { have H := λ b (hba : b < a), h _ (@is_open_Ioo _ _ _ _ b (a + 1)) ⟨hba, lt_succ_self a⟩, |
| 121 | + let f : a.out.α → ordinal := λ i, classical.some (H (typein (<) i) (typein_lt_self i)), |
| 122 | + have hf : ∀ i, f i ∈ set.Ioo (typein (<) i) (a + 1) ∩ s := |
| 123 | + λ i, classical.some_spec (H _ _), |
| 124 | + rcases eq_zero_or_pos a with rfl | ha₀, |
| 125 | + { rcases h _ (is_open_singleton_iff.2 not_zero_is_limit) rfl with ⟨b, hb, hb'⟩, |
| 126 | + rw set.mem_singleton_iff.1 hb at *, |
| 127 | + exact (has hb').elim }, |
| 128 | + refine ⟨_, out_nonempty_iff_ne_zero.2 (ordinal.pos_iff_ne_zero.1 ha₀), f, |
| 129 | + λ i, (hf i).2, le_antisymm (sup_le.2 (λ i, lt_succ.1 (hf i).1.2)) _⟩, |
| 130 | + by_contra' h, |
| 131 | + cases H _ h with b hb, |
| 132 | + rcases eq_or_lt_of_le (lt_succ.1 hb.1.2) with rfl | hba, |
| 133 | + { exact has hb.2 }, |
| 134 | + { have : b < f (enum (<) b (by rwa type_lt)) := begin |
| 135 | + have := (hf (enum (<) b (by rwa type_lt))).1.1, |
| 136 | + rwa typein_enum at this |
| 137 | + end, |
| 138 | + have : b ≤ sup.{u u} f := this.le.trans (le_sup f _), |
| 139 | + exact this.not_lt hb.1.1 } } }, |
| 140 | + { rintro ⟨ι, ⟨i⟩, f, hf, rfl⟩ t ht hat, |
| 141 | + cases eq_zero_or_pos (sup.{u u} f) with ha₀ ha₀, |
| 142 | + { rw ha₀ at hat, |
| 143 | + use [0, hat], |
| 144 | + convert hf i, |
| 145 | + exact (sup_eq_zero_iff.1 ha₀ i).symm }, |
| 146 | + rcases (mem_nhds_iff_exists_Ioo_subset' ⟨0, ha₀⟩ ⟨_, lt_succ_self _⟩).1 (ht.mem_nhds hat) with |
| 147 | + ⟨b, c, ⟨hab, hac⟩, hbct⟩, |
| 148 | + cases lt_sup.1 hab with i hi, |
| 149 | + exact ⟨_, hbct ⟨hi, (le_sup.{u u} f i).trans_lt hac⟩, hf i⟩ } |
| 150 | +end |
| 151 | + |
| 152 | +theorem mem_closed_iff_sup {s : set ordinal.{u}} {a : ordinal.{u}} (hs : is_closed s) : |
| 153 | + a ∈ s ↔ ∃ {ι : Type u} (hι : nonempty ι) (f : ι → ordinal.{u}), |
| 154 | + (∀ i, f i ∈ s) ∧ sup.{u u} f = a := |
| 155 | +by rw [←mem_closure_iff_sup, hs.closure_eq] |
| 156 | + |
| 157 | +theorem mem_closure_iff_bsup {s : set ordinal.{u}} {a : ordinal.{u}} : |
| 158 | + a ∈ closure s ↔ ∃ {o : ordinal} (ho : o ≠ 0) (f : Π a < o, ordinal.{u}), |
| 159 | + (∀ i hi, f i hi ∈ s) ∧ bsup.{u u} o f = a := |
| 160 | +mem_closure_iff_sup.trans ⟨ |
| 161 | + λ ⟨ι, ⟨i⟩, f, hf, ha⟩, ⟨_, λ h, (type_eq_zero_iff_is_empty.1 h).elim i, bfamily_of_family f, |
| 162 | + λ i hi, hf _, by rwa bsup_eq_sup⟩, |
| 163 | + λ ⟨o, ho, f, hf, ha⟩, ⟨_, out_nonempty_iff_ne_zero.2 ho, family_of_bfamily o f, |
| 164 | + λ i, hf _ _, by rwa sup_eq_bsup⟩⟩ |
| 165 | + |
| 166 | +theorem mem_closed_iff_bsup {s : set ordinal.{u}} {a : ordinal.{u}} (hs : is_closed s) : |
| 167 | + a ∈ s ↔ ∃ {o : ordinal} (ho : o ≠ 0) (f : Π a < o, ordinal.{u}), |
| 168 | + (∀ i hi, f i hi ∈ s) ∧ bsup.{u u} o f = a := |
| 169 | +by rw [←mem_closure_iff_bsup, hs.closure_eq] |
| 170 | + |
| 171 | +theorem is_closed_iff_sup {s : set ordinal.{u}} : |
| 172 | + is_closed s ↔ ∀ {ι : Type u} (hι : nonempty ι) (f : ι → ordinal.{u}), |
| 173 | + (∀ i, f i ∈ s) → sup.{u u} f ∈ s := |
| 174 | +begin |
| 175 | + use λ hs ι hι f hf, (mem_closed_iff_sup hs).2 ⟨ι, hι, f, hf, rfl⟩, |
| 176 | + rw ←closure_subset_iff_is_closed, |
| 177 | + intros h x hx, |
| 178 | + rcases mem_closure_iff_sup.1 hx with ⟨ι, hι, f, hf, rfl⟩, |
| 179 | + exact h hι f hf |
| 180 | +end |
| 181 | + |
| 182 | +theorem is_closed_iff_bsup {s : set ordinal.{u}} : |
| 183 | + is_closed s ↔ ∀ {o : ordinal.{u}} (ho : o ≠ 0) (f : Π a < o, ordinal.{u}), |
| 184 | + (∀ i hi, f i hi ∈ s) → bsup.{u u} o f ∈ s := |
| 185 | +begin |
| 186 | + rw is_closed_iff_sup, |
| 187 | + refine ⟨λ H o ho f hf, H (out_nonempty_iff_ne_zero.2 ho) _ _, λ H ι hι f hf, _⟩, |
| 188 | + { exact λ i, hf _ _ }, |
| 189 | + { rw ←bsup_eq_sup, |
| 190 | + apply H (type_ne_zero_iff_nonempty.2 hι), |
| 191 | + exact λ i hi, hf _ } |
| 192 | +end |
| 193 | + |
| 194 | +theorem is_limit_of_mem_frontier {s : set ordinal} {o : ordinal} (ho : o ∈ frontier s) : |
| 195 | + is_limit o := |
| 196 | +begin |
| 197 | + simp only [frontier_eq_closure_inter_closure, set.mem_inter_iff, mem_closure_iff] at ho, |
| 198 | + by_contra h, |
| 199 | + rw ←is_open_singleton_iff at h, |
| 200 | + rcases ho.1 _ h rfl with ⟨a, ha, ha'⟩, |
| 201 | + rcases ho.2 _ h rfl with ⟨b, hb, hb'⟩, |
| 202 | + rw set.mem_singleton_iff at *, |
| 203 | + subst ha, subst hb, |
| 204 | + exact hb' ha' |
| 205 | +end |
| 206 | + |
| 207 | +theorem is_normal_iff_strict_mono_and_continuous (f : ordinal.{u} → ordinal.{u}) : |
| 208 | + is_normal f ↔ (strict_mono f ∧ continuous f) := |
| 209 | +begin |
| 210 | + refine ⟨λ h, ⟨h.strict_mono, _⟩, _⟩, |
| 211 | + { rw continuous_def, |
| 212 | + intros s hs, |
| 213 | + rw is_open_iff at *, |
| 214 | + intros o ho ho', |
| 215 | + rcases hs _ ho (h.is_limit ho') with ⟨a, ha, has⟩, |
| 216 | + rw [←is_normal.bsup_eq.{u u} h ho', lt_bsup] at ha, |
| 217 | + rcases ha with ⟨b, hb, hab⟩, |
| 218 | + exact ⟨b, hb, λ c hc, |
| 219 | + set.mem_preimage.2 (has ⟨hab.trans (h.strict_mono hc.1), h.strict_mono hc.2⟩)⟩ }, |
| 220 | + { rw is_normal_iff_strict_mono_limit, |
| 221 | + rintro ⟨h, h'⟩, |
| 222 | + refine ⟨h, λ o ho a h, _⟩, |
| 223 | + suffices : o ∈ (f ⁻¹' set.Iic a), from set.mem_preimage.1 this, |
| 224 | + rw mem_closed_iff_sup (is_closed.preimage h' (@is_closed_Iic _ _ _ _ a)), |
| 225 | + exact ⟨_, out_nonempty_iff_ne_zero.2 ho.1, typein (<), |
| 226 | + λ i, h _ (typein_lt_self i), sup_typein_limit ho.2⟩ } |
| 227 | +end |
| 228 | + |
| 229 | +theorem enum_ord_is_normal_iff_is_closed {S : set ordinal.{u}} (hS : S.unbounded (<)) : |
| 230 | + is_normal (enum_ord S) ↔ is_closed S := |
| 231 | +begin |
| 232 | + have HS := enum_ord_strict_mono hS, |
| 233 | + refine ⟨λ h, is_closed_iff_sup.2 (λ ι hι f hf, _), |
| 234 | + λ h, (is_normal_iff_strict_mono_limit _).2 ⟨HS, λ a ha o H, _⟩⟩, |
| 235 | + { let g : ι → ordinal.{u} := λ i, (enum_ord_order_iso hS).symm ⟨_, hf i⟩, |
| 236 | + suffices : enum_ord S (sup.{u u} g) = sup.{u u} f, |
| 237 | + { rw ←this, exact enum_ord_mem hS _ }, |
| 238 | + rw is_normal.sup.{u u u} h g hι, |
| 239 | + congr, ext, |
| 240 | + change ((enum_ord_order_iso hS) _).val = f x, |
| 241 | + rw order_iso.apply_symm_apply }, |
| 242 | + { rw is_closed_iff_bsup at h, |
| 243 | + suffices : enum_ord S a ≤ bsup.{u u} a (λ b < a, enum_ord S b), from this.trans (bsup_le.2 H), |
| 244 | + cases enum_ord_surjective hS _ (h ha.1 (λ b hb, enum_ord S b) (λ b hb, enum_ord_mem hS b)) |
| 245 | + with b hb, |
| 246 | + rw ←hb, |
| 247 | + apply HS.monotone, |
| 248 | + by_contra' hba, |
| 249 | + apply (HS (lt_succ_self b)).not_le, |
| 250 | + rw hb, |
| 251 | + exact le_bsup.{u u} _ _ (ha.2 _ hba) } |
| 252 | +end |
| 253 | + |
| 254 | +end ordinal |
0 commit comments