|
| 1 | +/- |
| 2 | +Copyright (c) 2025 Joël Riou. All rights reserved. |
| 3 | +Released under Apache 2.0 license as described in the file LICENSE. |
| 4 | +Authors: Joël Riou |
| 5 | +-/ |
| 6 | +import Mathlib.CategoryTheory.ObjectProperty.LimitsOfShape |
| 7 | +import Mathlib.CategoryTheory.ObjectProperty.CompleteLattice |
| 8 | +import Mathlib.Order.TransfiniteIteration |
| 9 | +import Mathlib.SetTheory.Cardinal.HasCardinalLT |
| 10 | + |
| 11 | +/-! |
| 12 | +# Closure of a property of objects under limits of certain shapes |
| 13 | +
|
| 14 | +In this file, given a property `P` of objects in a category `C` and |
| 15 | +family of categories `J : α → Type _`, we introduce the closure |
| 16 | +`P.limitsClosure J` of `P` under limits of shapes `J a` for all `a : α`, |
| 17 | +and under certain smallness assumptions, we show that its essentially small. |
| 18 | +
|
| 19 | +-/ |
| 20 | +universe w w' t v' u' v u |
| 21 | + |
| 22 | +namespace CategoryTheory.ObjectProperty |
| 23 | + |
| 24 | +open Limits |
| 25 | + |
| 26 | +variable {C : Type u} [Category.{v} C] (P : ObjectProperty C) |
| 27 | + {α : Type t} (J : α → Type u') [∀ a, Category.{v'} (J a)] |
| 28 | + |
| 29 | +/-- The closure of property of objects of a category under limits of |
| 30 | +shape `J a` for a family of categories `J`. -/ |
| 31 | +inductive limitsClosure : ObjectProperty C |
| 32 | + | of_mem (X : C) (hX : P X) : limitsClosure X |
| 33 | + | of_isoClosure {X Y : C} (e : X ≅ Y) (hX : limitsClosure X) : limitsClosure Y |
| 34 | + | of_limitPresentation {X : C} {a : α} (pres : LimitPresentation (J a) X) |
| 35 | + (h : ∀ j, limitsClosure (pres.diag.obj j)) : limitsClosure X |
| 36 | + |
| 37 | +@[simp] |
| 38 | +lemma le_limitsClosure : P ≤ P.limitsClosure J := |
| 39 | + fun X hX ↦ .of_mem X hX |
| 40 | + |
| 41 | +instance : (P.limitsClosure J).IsClosedUnderIsomorphisms where |
| 42 | + of_iso e hX := .of_isoClosure e hX |
| 43 | + |
| 44 | +instance (a : α) : (P.limitsClosure J).IsClosedUnderLimitsOfShape (J a) where |
| 45 | + limitsOfShape_le := by |
| 46 | + rintro X ⟨hX⟩ |
| 47 | + exact .of_limitPresentation hX.toLimitPresentation hX.prop_diag_obj |
| 48 | + |
| 49 | +variable {P J} in |
| 50 | +lemma limitsClosure_le {Q : ObjectProperty C} [Q.IsClosedUnderIsomorphisms] |
| 51 | + [∀ (a : α), Q.IsClosedUnderLimitsOfShape (J a)] (h : P ≤ Q) : |
| 52 | + P.limitsClosure J ≤ Q := by |
| 53 | + intro X hX |
| 54 | + induction hX with |
| 55 | + | of_mem X hX => exact h _ hX |
| 56 | + | of_isoClosure e hX hX' => exact Q.prop_of_iso e hX' |
| 57 | + | of_limitPresentation pres h h' => exact Q.prop_of_isLimit pres.isLimit h' |
| 58 | + |
| 59 | +variable {P} in |
| 60 | +lemma limitsClosure_monotone {Q : ObjectProperty C} (h : P ≤ Q) : |
| 61 | + P.limitsClosure J ≤ Q.limitsClosure J := |
| 62 | + limitsClosure_le (h.trans (Q.le_limitsClosure J)) |
| 63 | + |
| 64 | +lemma limitsClosure_isoClosure : |
| 65 | + P.isoClosure.limitsClosure J = P.limitsClosure J := by |
| 66 | + refine le_antisymm (limitsClosure_le ?_) |
| 67 | + (limitsClosure_monotone _ P.le_isoClosure) |
| 68 | + rw [isoClosure_le_iff] |
| 69 | + exact le_limitsClosure P J |
| 70 | + |
| 71 | +/-- Given `P : ObjectProperty C` and a family of categories `J : α → Type _`, |
| 72 | +this property objects contains `P` and all objects that are equal to `lim F` |
| 73 | +for some functor `F : J a ⥤ C` such that `F.obj j` satisfies `P` for any `j`. -/ |
| 74 | +def strictLimitsClosureStep : ObjectProperty C := |
| 75 | + P ⊔ (⨆ (a : α), P.strictLimitsOfShape (J a)) |
| 76 | + |
| 77 | +@[simp] |
| 78 | +lemma le_strictLimitsClosureStep : P ≤ P.strictLimitsClosureStep J := le_sup_left |
| 79 | + |
| 80 | +variable {P} in |
| 81 | +lemma strictLimitsClosureStep_monotone {Q : ObjectProperty C} (h : P ≤ Q) : |
| 82 | + P.strictLimitsClosureStep J ≤ Q.strictLimitsClosureStep J := by |
| 83 | + dsimp [strictLimitsClosureStep] |
| 84 | + simp only [sup_le_iff, iSup_le_iff] |
| 85 | + exact ⟨h.trans le_sup_left, fun a ↦ (strictLimitsOfShape_monotone (J a) h).trans |
| 86 | + (le_trans (by rfl) ((le_iSup _ a).trans le_sup_right))⟩ |
| 87 | + |
| 88 | +section |
| 89 | + |
| 90 | +variable {β : Type w'} [LinearOrder β] [OrderBot β] [SuccOrder β] [WellFoundedLT β] |
| 91 | + |
| 92 | +/-- Given `P : ObjectProperty C`, a family of categories `J a`, this |
| 93 | +is the transfinite iteration of `Q ↦ Q.strictLimitsClosureStep J`. -/ |
| 94 | +abbrev strictLimitsClosureIter (b : β) : ObjectProperty C := |
| 95 | + transfiniteIterate (φ := fun Q ↦ Q.strictLimitsClosureStep J) b P |
| 96 | + |
| 97 | +lemma le_strictLimitsClosureIter (b : β) : |
| 98 | + P ≤ P.strictLimitsClosureIter J b := |
| 99 | + le_of_eq_of_le (transfiniteIterate_bot _ _).symm |
| 100 | + (monotone_transfiniteIterate _ _ (fun _ ↦ le_strictLimitsClosureStep _ _) bot_le) |
| 101 | + |
| 102 | +lemma strictLimitsClosureIter_le_limitsClosure (b : β) : |
| 103 | + P.strictLimitsClosureIter J b ≤ P.limitsClosure J := by |
| 104 | + induction b using SuccOrder.limitRecOn with |
| 105 | + | isMin b hb => |
| 106 | + obtain rfl := hb.eq_bot |
| 107 | + simp |
| 108 | + | succ b hb hb' => |
| 109 | + rw [strictLimitsClosureIter, transfiniteIterate_succ _ _ _ hb, |
| 110 | + strictLimitsClosureStep, sup_le_iff, iSup_le_iff] |
| 111 | + exact ⟨hb', fun a ↦ ((strictLimitsOfShape_le_limitsOfShape _ _).trans |
| 112 | + (limitsOfShape_monotone _ hb')).trans (limitsOfShape_le _ _)⟩ |
| 113 | + | isSuccLimit b hb hb' => |
| 114 | + simp only [transfiniteIterate_limit _ _ _ hb, |
| 115 | + iSup_le_iff, Subtype.forall, Set.mem_Iio] |
| 116 | + intro c hc |
| 117 | + exact hb' _ hc |
| 118 | + |
| 119 | +instance [ObjectProperty.Small.{w} P] [LocallySmall.{w} C] [Small.{w} α] |
| 120 | + [∀ a, Small.{w} (J a)] [∀ a, LocallySmall.{w} (J a)] (b : β) |
| 121 | + [hb₀ : Small.{w} (Set.Iio b)] : |
| 122 | + ObjectProperty.Small.{w} (P.strictLimitsClosureIter J b) := by |
| 123 | + have H {b c : β} (hbc : b ≤ c) [Small.{w} (Set.Iio c)] : Small.{w} (Set.Iio b) := |
| 124 | + small_of_injective (f := fun x ↦ (⟨x.1, lt_of_lt_of_le x.2 hbc⟩ : Set.Iio c)) |
| 125 | + (fun _ _ _ ↦ by aesop) |
| 126 | + induction b using SuccOrder.limitRecOn generalizing hb₀ with |
| 127 | + | isMin b hb => |
| 128 | + obtain rfl := hb.eq_bot |
| 129 | + simp only [transfiniteIterate_bot] |
| 130 | + infer_instance |
| 131 | + | succ b hb hb' => |
| 132 | + have := H (Order.le_succ b) |
| 133 | + rw [strictLimitsClosureIter, transfiniteIterate_succ _ _ _ hb, |
| 134 | + strictLimitsClosureStep] |
| 135 | + infer_instance |
| 136 | + | isSuccLimit b hb hb' => |
| 137 | + simp only [transfiniteIterate_limit _ _ _ hb] |
| 138 | + have (c : Set.Iio b) : ObjectProperty.Small.{w} |
| 139 | + (transfiniteIterate (fun Q ↦ Q.strictLimitsClosureStep J) c.1 P) := by |
| 140 | + have := H c.2.le |
| 141 | + exact hb' c.1 c.2 |
| 142 | + infer_instance |
| 143 | + |
| 144 | +end |
| 145 | + |
| 146 | +section |
| 147 | + |
| 148 | +variable (κ : Cardinal.{w}) [Fact κ.IsRegular] (h : ∀ (a : α), HasCardinalLT (J a) κ) |
| 149 | + |
| 150 | +include h |
| 151 | + |
| 152 | +lemma strictLimitsClosureStep_strictLimitsClosureIter_eq_self : |
| 153 | + (P.strictLimitsClosureIter J κ.ord).strictLimitsClosureStep J = |
| 154 | + (P.strictLimitsClosureIter J κ.ord) := by |
| 155 | + have hκ : κ.IsRegular := Fact.out |
| 156 | + have (a : α) := (h a).small |
| 157 | + refine le_antisymm (fun X hX ↦ ?_) (le_strictLimitsClosureStep _ _) |
| 158 | + simp only [strictLimitsClosureStep, prop_sup_iff, prop_iSup_iff] at hX |
| 159 | + obtain (hX | ⟨a, F, hF⟩) := hX |
| 160 | + · exact hX |
| 161 | + · simp only [strictLimitsClosureIter, transfiniteIterate_limit _ _ _ |
| 162 | + (Cardinal.isSuccLimit_ord hκ.aleph0_le), prop_iSup_iff, |
| 163 | + Subtype.exists, Set.mem_Iio, exists_prop] at hF |
| 164 | + choose o ho ho' using hF |
| 165 | + obtain ⟨m, hm, hm'⟩ : ∃ (m : Ordinal.{w}) (hm : m < κ.ord), ∀ (j : J a), o j ≤ m := by |
| 166 | + refine ⟨⨆ j, o ((equivShrink.{w} (J a)).symm j), |
| 167 | + Ordinal.iSup_lt_ord ?_ (fun _ ↦ ho _), fun j ↦ ?_⟩ |
| 168 | + · rw [hκ.cof_eq, ← hasCardinalLT_iff_cardinal_mk_lt _ κ, |
| 169 | + ← hasCardinalLT_iff_of_equiv (equivShrink.{w} (J a))] |
| 170 | + exact h a |
| 171 | + · obtain ⟨j, rfl⟩ := (equivShrink.{w} (J a)).symm.surjective j |
| 172 | + exact le_ciSup (Ordinal.bddAbove_range _) _ |
| 173 | + refine monotone_transfiniteIterate _ _ |
| 174 | + (fun (Q : ObjectProperty C) ↦ Q.le_strictLimitsClosureStep J) (Order.succ_le_iff.2 hm) _ ?_ |
| 175 | + dsimp |
| 176 | + rw [transfiniteIterate_succ _ _ _ (by simp)] |
| 177 | + simp only [strictLimitsClosureStep, prop_sup_iff, prop_iSup_iff] |
| 178 | + exact Or.inr ⟨a, ⟨_, fun j ↦ monotone_transfiniteIterate _ _ |
| 179 | + (fun (Q : ObjectProperty C) ↦ Q.le_strictLimitsClosureStep J) (hm' j) _ (ho' j)⟩⟩ |
| 180 | + |
| 181 | +lemma isoClosure_strictLimitsClosureIter_eq_limitsClosure : |
| 182 | + (P.strictLimitsClosureIter J κ.ord).isoClosure = P.limitsClosure J := by |
| 183 | + refine le_antisymm ?_ ?_ |
| 184 | + · rw [isoClosure_le_iff] |
| 185 | + exact P.strictLimitsClosureIter_le_limitsClosure J κ.ord |
| 186 | + · have (a : α) : |
| 187 | + (P.strictLimitsClosureIter J κ.ord).isoClosure.IsClosedUnderLimitsOfShape (J a) := ⟨by |
| 188 | + conv_rhs => rw [← P.strictLimitsClosureStep_strictLimitsClosureIter_eq_self J κ h] |
| 189 | + rw [limitsOfShape_isoClosure, ← isoClosure_strictLimitsOfShape, |
| 190 | + strictLimitsClosureStep] |
| 191 | + exact monotone_isoClosure ((le_trans (by rfl) (le_iSup _ a)).trans le_sup_right)⟩ |
| 192 | + refine limitsClosure_le |
| 193 | + ((P.le_strictLimitsClosureIter J κ.ord).trans (le_isoClosure _)) |
| 194 | + |
| 195 | +lemma isEssentiallySmall_limitsClosure |
| 196 | + [ObjectProperty.EssentiallySmall.{w} P] [LocallySmall.{w} C] [Small.{w} α] |
| 197 | + [∀ a, Small.{w} (J a)] [∀ a, LocallySmall.{w} (J a)] : |
| 198 | + ObjectProperty.EssentiallySmall.{w} (P.limitsClosure J) := by |
| 199 | + obtain ⟨Q, hQ, hQ₁, hQ₂⟩ := EssentiallySmall.exists_small_le.{w} P |
| 200 | + have : ObjectProperty.EssentiallySmall.{w} (Q.isoClosure.limitsClosure J) := by |
| 201 | + rw [limitsClosure_isoClosure, |
| 202 | + ← Q.isoClosure_strictLimitsClosureIter_eq_limitsClosure J κ h] |
| 203 | + infer_instance |
| 204 | + exact .of_le (limitsClosure_monotone J hQ₂) |
| 205 | + |
| 206 | +end |
| 207 | + |
| 208 | +instance [ObjectProperty.EssentiallySmall.{w} P] [LocallySmall.{w} C] [Small.{w} α] |
| 209 | + [∀ a, Small.{w} (J a)] [∀ a, LocallySmall.{w} (J a)] : |
| 210 | + ObjectProperty.EssentiallySmall.{w} (P.limitsClosure J) := by |
| 211 | + obtain ⟨κ, h₁, h₂⟩ := HasCardinalLT.exists_regular_cardinal_forall J |
| 212 | + have : Fact κ.IsRegular := ⟨h₁⟩ |
| 213 | + exact isEssentiallySmall_limitsClosure P J κ h₂ |
| 214 | + |
| 215 | +end CategoryTheory.ObjectProperty |
0 commit comments