|
| 1 | +/- |
| 2 | +Copyright (c) 2023 Jon Eugster. All rights reserved. |
| 3 | +Released under Apache 2.0 license as described in the file LICENSE. |
| 4 | +Authors: Dagur Asgeirsson, Boris Bolvig Kjær, Jon Eugster, Sina Hazratpour, Nima Rasekh |
| 5 | +-/ |
| 6 | +import Mathlib.Topology.Category.Stonean.Limits |
| 7 | +import Mathlib.Topology.Category.CompHaus.EffectiveEpi |
| 8 | + |
| 9 | +/-! |
| 10 | +# Effective epimorphic families in `Stonean` |
| 11 | +
|
| 12 | +Let `π a : X a ⟶ B` be a family of morphisms in `Stonean` indexed by a finite type `α`. |
| 13 | +In this file, we show that the following are all equivalent: |
| 14 | +- The family `π` is effective epimorphic. |
| 15 | +- The induced map `∐ X ⟶ B` is epimorphic. |
| 16 | +- The family `π` is jointly surjective. |
| 17 | +
|
| 18 | +## Main results |
| 19 | +- `Stonean.effectiveEpiFamily_tfae`: characterise being an effective epimorphic family. |
| 20 | +- `Stonean.instPrecoherent`: `Stonean` is precoherent. |
| 21 | +
|
| 22 | +## Implementation notes |
| 23 | +The entire section `EffectiveEpiFamily` comprises exclusively a technical construction for |
| 24 | +the main proof and does not contain any statements that would be useful in other contexts. |
| 25 | +
|
| 26 | +-/ |
| 27 | + |
| 28 | +universe u |
| 29 | + |
| 30 | +open CategoryTheory Limits |
| 31 | + |
| 32 | +namespace Stonean |
| 33 | + |
| 34 | +/- Assume we have a family `X a → B` which is jointly surjective. -/ |
| 35 | +variable {α : Type} [Fintype α] {B : Stonean} |
| 36 | + {X : α → Stonean} (π : (a : α) → (X a ⟶ B)) |
| 37 | + (surj : ∀ b : B, ∃ (a : α) (x : X a), π a x = b) |
| 38 | + |
| 39 | +/-- |
| 40 | +`Fin 2` as an extremally disconnected space. |
| 41 | +Implementation: This is only used in the proof below. |
| 42 | +-/ |
| 43 | +protected |
| 44 | +def two : Stonean where |
| 45 | + compHaus := CompHaus.of <| ULift <| Fin 2 |
| 46 | + extrDisc := by |
| 47 | + dsimp |
| 48 | + constructor |
| 49 | + intro U _ |
| 50 | + apply isOpen_discrete (closure U) |
| 51 | + |
| 52 | +lemma epi_iff_surjective {X Y : Stonean} (f : X ⟶ Y) : |
| 53 | + Epi f ↔ Function.Surjective f := by |
| 54 | + constructor |
| 55 | + · dsimp [Function.Surjective] |
| 56 | + contrapose! |
| 57 | + rintro ⟨y, hy⟩ h |
| 58 | + let C := Set.range f |
| 59 | + have hC : IsClosed C := (isCompact_range f.continuous).isClosed |
| 60 | + let U := Cᶜ |
| 61 | + have hyU : y ∈ U := by |
| 62 | + refine' Set.mem_compl _ |
| 63 | + rintro ⟨y', hy'⟩ |
| 64 | + exact hy y' hy' |
| 65 | + have hUy : U ∈ nhds y := hC.compl_mem_nhds hyU |
| 66 | + haveI : TotallyDisconnectedSpace ((forget CompHaus).obj (toCompHaus.obj Y)) := |
| 67 | + show TotallyDisconnectedSpace Y from inferInstance |
| 68 | + obtain ⟨V, hV, hyV, hVU⟩ := isTopologicalBasis_clopen.mem_nhds_iff.mp hUy |
| 69 | + classical |
| 70 | + let g : Y ⟶ Stonean.two := |
| 71 | + ⟨(LocallyConstant.ofClopen hV).map ULift.up, LocallyConstant.continuous _⟩ |
| 72 | + let h : Y ⟶ Stonean.two := ⟨fun _ => ⟨1⟩, continuous_const⟩ |
| 73 | + have H : h = g := by |
| 74 | + rw [← cancel_epi f] |
| 75 | + apply ContinuousMap.ext |
| 76 | + intro x |
| 77 | + apply ULift.ext |
| 78 | + change 1 = _ |
| 79 | + dsimp [LocallyConstant.ofClopen] |
| 80 | + -- BUG: Should not have to provide instance `(Stonean.instTopologicalSpace Y)` explicitely |
| 81 | + rw [comp_apply, @ContinuousMap.coe_mk _ _ (Stonean.instTopologicalSpace Y), |
| 82 | + Function.comp_apply, if_neg] |
| 83 | + refine mt (hVU ·) ?_ |
| 84 | + simp only [Set.mem_compl_iff, Set.mem_range, not_exists, not_forall, not_not] |
| 85 | + exact ⟨x, rfl⟩ |
| 86 | + apply_fun fun e => (e y).down at H |
| 87 | + dsimp only [LocallyConstant.ofClopen] at H |
| 88 | + change 1 = ite _ _ _ at H |
| 89 | + rw [if_pos hyV] at H |
| 90 | + exact top_ne_bot H |
| 91 | + · intro (h : Function.Surjective (toCompHaus.map f)) |
| 92 | + rw [← CompHaus.epi_iff_surjective] at h |
| 93 | + constructor |
| 94 | + intro W a b h |
| 95 | + apply Functor.map_injective toCompHaus |
| 96 | + apply_fun toCompHaus.map at h |
| 97 | + simp only [Functor.map_comp] at h |
| 98 | + rwa [← cancel_epi (toCompHaus.map f)] |
| 99 | + |
| 100 | +/-! |
| 101 | +This section contains exclusively technical definitions and results that are used |
| 102 | +in the proof of `Stonean.effectiveEpiFamily_of_jointly_surjective`. |
| 103 | +-/ |
| 104 | +namespace EffectiveEpiFamily |
| 105 | + |
| 106 | +/-- Implementation: Abbreviation for the fully faithful functor `Stonean ⥤ CompHaus`. -/ |
| 107 | +abbrev F := Stonean.toCompHaus |
| 108 | + |
| 109 | +open CompHaus in |
| 110 | +/-- Implementation: A helper lemma lifting the condition |
| 111 | +
|
| 112 | +``` |
| 113 | +∀ {Z : Stonean} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), |
| 114 | + g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂) |
| 115 | +``` |
| 116 | +
|
| 117 | +from `Z : Stonean` to `Z : CompHaus`. |
| 118 | +
|
| 119 | +The descent `EffectiveEpiFamily.dec` along an effective epi family in a category `C` |
| 120 | +takes this condition (for all `Z` in `C`) as an assumption. |
| 121 | +
|
| 122 | +In the construction in this file we start with this descent condition for all `Z : Stonean` but |
| 123 | +to apply the analogue result on `CompHaus` we need extend this condition to all |
| 124 | +`Z : CompHaus`. We do this by considering the Stone-Czech compactification `βZ → Z` |
| 125 | +which is an epi in `CompHaus` covering `Z` where `βZ` lies in the image of `Stonean`. |
| 126 | +-/ |
| 127 | +lemma lift_desc_condition {W : Stonean} {e : (a : α) → X a ⟶ W} |
| 128 | + (h : ∀ {Z : Stonean} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), |
| 129 | + g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂) |
| 130 | + : ∀ {Z : CompHaus} (a₁ a₂ : α) (g₁ : Z ⟶ F.obj (X a₁)) (g₂ : Z ⟶ F.obj (X a₂)), |
| 131 | + g₁ ≫ (π a₁) = g₂ ≫ (π a₂) → g₁ ≫ e a₁ = g₂ ≫ e a₂ := by |
| 132 | + intro Z a₁ a₂ g₁ g₂ hg |
| 133 | + -- The Stone-Cech-compactification `βZ` of `Z : CompHaus` is in `Stonean` |
| 134 | + let βZ := Z.presentation |
| 135 | + let g₁' := F.preimage (presentation.π Z ≫ g₁ : F.obj βZ ⟶ F.obj (X a₁)) |
| 136 | + let g₂' := F.preimage (presentation.π Z ≫ g₂ : F.obj βZ ⟶ F.obj (X a₂)) |
| 137 | + -- Use that `βZ → Z` is an epi |
| 138 | + apply Epi.left_cancellation (f := presentation.π Z) |
| 139 | + -- By definition `g₁' = presentationπ ≫ g₁` and `g₂' = presentationπ ≫ g₂` |
| 140 | + change g₁' ≫ e a₁ = g₂' ≫ e a₂ |
| 141 | + -- use the condition in `Stonean` |
| 142 | + apply h |
| 143 | + change presentation.π Z ≫ g₁ ≫ π a₁ = presentation.π Z ≫ g₂ ≫ π a₂ |
| 144 | + simp [hg] |
| 145 | + |
| 146 | +/-- Implementation: The structure for the `EffectiveEpiFamily X π`. -/ |
| 147 | +noncomputable |
| 148 | +def struct : EffectiveEpiFamilyStruct X π where |
| 149 | + desc := fun {W} e h => Stonean.toCompHaus.preimage <| |
| 150 | + -- Use the `EffectiveEpiFamily F(X) F(π)` on `CompHaus` |
| 151 | + (CompHaus.effectiveEpiFamily_of_jointly_surjective (F.obj <| X ·) π surj).desc |
| 152 | + (fun (a : α) => F.map (e a)) (lift_desc_condition π h) |
| 153 | + fac := by |
| 154 | + -- The `EffectiveEpiFamily F(X) F(π)` on `CompHaus` |
| 155 | + let fam : EffectiveEpiFamily (F.obj <| X ·) π := |
| 156 | + CompHaus.effectiveEpiFamily_of_jointly_surjective (F.obj <| X ·) π surj |
| 157 | + intro W e he a |
| 158 | + -- The `fac` on `CompHaus` |
| 159 | + have fac₁ : F.map (π a ≫ _) = F.map (e a) := |
| 160 | + EffectiveEpiFamily.fac (F.obj <| X ·) π e (lift_desc_condition π he) a |
| 161 | + replace fac₁ := Faithful.map_injective fac₁ |
| 162 | + exact fac₁ |
| 163 | + uniq := by |
| 164 | + -- The `EffectiveEpiFamily F(X) F(π)` on `CompHaus` |
| 165 | + let fam : EffectiveEpiFamily (F.obj <| X ·) π := |
| 166 | + CompHaus.effectiveEpiFamily_of_jointly_surjective (F.obj <| X ·) π surj |
| 167 | + intro W e he m hm |
| 168 | + have Fhm : ∀ (a : α), π a ≫ F.map m = e a |
| 169 | + · intro a |
| 170 | + simp_all only [toCompHaus_map] |
| 171 | + have uniq₁ : F.map m = F.map _ := |
| 172 | + EffectiveEpiFamily.uniq (F.obj <| X ·) π e (lift_desc_condition π he) (F.map m) Fhm |
| 173 | + replace uniq₁ := Faithful.map_injective uniq₁ |
| 174 | + exact uniq₁ |
| 175 | + |
| 176 | +end EffectiveEpiFamily |
| 177 | + |
| 178 | +section JointlySurjective |
| 179 | + |
| 180 | +/-- One direction of `effectiveEpiFamily_tfae`. -/ |
| 181 | +theorem effectiveEpiFamily_of_jointly_surjective |
| 182 | + {α : Type} [Fintype α] {B : Stonean} |
| 183 | + (X : α → Stonean) (π : (a : α) → (X a ⟶ B)) |
| 184 | + (surj : ∀ b : B, ∃ (a : α) (x : X a), π a x = b) : |
| 185 | + EffectiveEpiFamily X π := |
| 186 | + ⟨⟨Stonean.EffectiveEpiFamily.struct π surj⟩⟩ |
| 187 | + |
| 188 | +open List in |
| 189 | +/-- |
| 190 | +For a finite family of extremally spaces `π a : X a → B` the following are equivalent: |
| 191 | +* `π` is an effective epimorphic family |
| 192 | +* the map `∐ π a ⟶ B` is an epimorphism |
| 193 | +* `π` is jointly surjective |
| 194 | +-/ |
| 195 | +theorem effectiveEpiFamily_tfae {α : Type} [Fintype α] {B : Stonean} |
| 196 | + (X : α → Stonean) (π : (a : α) → (X a ⟶ B)) : |
| 197 | + TFAE [ |
| 198 | + EffectiveEpiFamily X π, |
| 199 | + Epi (Limits.Sigma.desc π), |
| 200 | + ∀ (b : B), ∃ (a : α) (x : X a), π a x = b ] := by |
| 201 | + tfae_have 1 → 2 |
| 202 | + · intro |
| 203 | + infer_instance |
| 204 | + tfae_have 1 → 2 |
| 205 | + · intro |
| 206 | + infer_instance |
| 207 | + tfae_have 2 → 3 |
| 208 | + · intro e |
| 209 | + rw [epi_iff_surjective] at e |
| 210 | + intro b |
| 211 | + obtain ⟨t, rfl⟩ := e b |
| 212 | + let q := (coproductIsoCoproduct X).inv t |
| 213 | + refine ⟨q.1, q.2, ?_⟩ |
| 214 | + rw [← (coproductIsoCoproduct X).inv_hom_id_apply t] |
| 215 | + show _ = ((coproductIsoCoproduct X).hom ≫ Sigma.desc π) ((coproductIsoCoproduct X).inv t) |
| 216 | + suffices : (coproductIsoCoproduct X).hom ≫ Sigma.desc π = finiteCoproduct.desc X π |
| 217 | + · rw [this] |
| 218 | + rfl |
| 219 | + apply Eq.symm |
| 220 | + rw [← Iso.inv_comp_eq] |
| 221 | + apply colimit.hom_ext |
| 222 | + rintro ⟨a⟩ |
| 223 | + simp only [Discrete.functor_obj, colimit.ι_desc, Cofan.mk_pt, Cofan.mk_ι_app, |
| 224 | + coproductIsoCoproduct, colimit.comp_coconePointUniqueUpToIso_inv_assoc] |
| 225 | + ext |
| 226 | + rfl |
| 227 | + tfae_have 3 → 1 |
| 228 | + · apply effectiveEpiFamily_of_jointly_surjective |
| 229 | + tfae_finish |
| 230 | + |
| 231 | +end JointlySurjective |
| 232 | + |
| 233 | +section Coherent |
| 234 | + |
| 235 | +open CompHaus Functor |
| 236 | + |
| 237 | +theorem _root_.CategoryTheory.EffectiveEpiFamily.toCompHaus |
| 238 | + {α : Type} [Fintype α] {B : Stonean.{u}} |
| 239 | + {X : α → Stonean.{u}} {π : (a : α) → (X a ⟶ B)} (H : EffectiveEpiFamily X π) : |
| 240 | + EffectiveEpiFamily (toCompHaus.obj <| X ·) (toCompHaus.map <| π ·) := by |
| 241 | + refine' ((CompHaus.effectiveEpiFamily_tfae _ _).out 0 2).2 (fun b => _) |
| 242 | + exact (((effectiveEpiFamily_tfae _ _).out 0 2).1 H : ∀ _, ∃ _, _) _ |
| 243 | + |
| 244 | +instance instPrecoherent: Precoherent Stonean.{u} := by |
| 245 | + constructor |
| 246 | + intro B₁ B₂ f α _ X₁ π₁ h₁ |
| 247 | + refine ⟨α, inferInstance, fun a => (pullback f (π₁ a)).presentation, fun a => |
| 248 | + toCompHaus.preimage (presentation.π _ ≫ (pullback.fst _ _)), ?_, id, fun a => |
| 249 | + toCompHaus.preimage (presentation.π _ ≫ (pullback.snd _ _ )), fun a => ?_⟩ |
| 250 | + · refine ((effectiveEpiFamily_tfae _ _).out 0 2).2 (fun b => ?_) |
| 251 | + have h₁' := ((CompHaus.effectiveEpiFamily_tfae _ _).out 0 2).1 h₁.toCompHaus |
| 252 | + obtain ⟨a, x, h⟩ := h₁' (f b) |
| 253 | + obtain ⟨c, hc⟩ := (CompHaus.epi_iff_surjective _).1 |
| 254 | + (presentation.epi_π (CompHaus.pullback f (π₁ a))) ⟨⟨b, x⟩, h.symm⟩ |
| 255 | + refine ⟨a, c, ?_⟩ |
| 256 | + change toCompHaus.map (toCompHaus.preimage _) _ = _ |
| 257 | + simp only [image_preimage, toCompHaus_obj, comp_apply, hc] |
| 258 | + rfl |
| 259 | + · apply map_injective toCompHaus |
| 260 | + simp only [map_comp, image_preimage, Category.assoc] |
| 261 | + congr 1 |
| 262 | + ext ⟨⟨_, _⟩, h⟩ |
| 263 | + exact h.symm |
| 264 | + |
| 265 | +end Coherent |
| 266 | + |
| 267 | +end Stonean |
0 commit comments