Skip to content

Commit 06f1f22

Browse files
committed
chore(CategoryTheory/Limits): rename mkFanLimit to Fan.IsLimit.mk (#39580)
This change makes `Fan` follow the `ConeType.IsLimit.mk` naming scheme that we use elsewhere. We do the same for `Cofan`s.
1 parent c669471 commit 06f1f22

15 files changed

Lines changed: 34 additions & 28 deletions

File tree

Mathlib/CategoryTheory/Galois/Decomposition.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,15 @@ non-trivial subobjects which have strictly smaller fiber and conclude by the ind
6262
private lemma has_decomp_connected_components_aux_conn (X : C) [IsConnected X] :
6363
∃ (ι : Type) (f : ι → C) (g : (i : ι) → (f i) ⟶ X) (_ : IsColimit (Cofan.mk X g)),
6464
(∀ i, IsConnected (f i)) ∧ Finite ι := by
65-
refine ⟨Unit, fun _ ↦ X, fun _ ↦ 𝟙 X, mkCofanColimit _ (fun s ↦ s.inj ()), ?_⟩
65+
refine ⟨Unit, fun _ ↦ X, fun _ ↦ 𝟙 X, Cofan.IsColimit.mk _ (fun s ↦ s.inj ()), ?_⟩
6666
exact ⟨fun _ ↦ inferInstance, inferInstance⟩
6767

6868
/-- The trivial case if `X` is initial. -/
6969
private lemma has_decomp_connected_components_aux_initial (X : C) (h : IsInitial X) :
7070
∃ (ι : Type) (f : ι → C) (g : (i : ι) → (f i) ⟶ X) (_ : IsColimit (Cofan.mk X g)),
7171
(∀ i, IsConnected (f i)) ∧ Finite ι := by
7272
refine ⟨Empty, fun _ ↦ X, fun _ ↦ 𝟙 X, ?_⟩
73-
use mkCofanColimit _ (fun s ↦ IsInitial.to h s.pt) (fun s ↦ by simp)
73+
use Cofan.IsColimit.mk _ (fun s ↦ IsInitial.to h s.pt) (fun s ↦ by simp)
7474
(fun s m _ ↦ IsInitial.hom_ext h m _)
7575
exact ⟨by simp only [IsEmpty.forall_iff], inferInstance⟩
7676

Mathlib/CategoryTheory/GradedObject.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ the point of this latter cofan computes the coproduct of the `X i` such that `r
450450
@[simp]
451451
def isColimitCofanMapObjComp :
452452
IsColimit (cofanMapObjComp X p q r hpqr k c c') :=
453-
mkCofanColimit _
453+
Cofan.IsColimit.mk _
454454
(fun s => Cofan.IsColimit.desc hc'
455455
(fun ⟨j, (hj : q j = k)⟩ => Cofan.IsColimit.desc (hc j hj)
456456
(fun ⟨i, (hi : p i = j)⟩ => s.inj ⟨i, by

Mathlib/CategoryTheory/GradedObject/Unitor.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ set_option backward.isDefEq.respectTransparency false in
7575
/-- The cofan `mapBifunctorLeftUnitorCofan F X e p hp Y j` is a colimit. -/
7676
noncomputable def mapBifunctorLeftUnitorCofanIsColimit (j : J) :
7777
IsColimit (mapBifunctorLeftUnitorCofan F X e p hp Y j) :=
78-
mkCofanColimit _
78+
Cofan.IsColimit.mk _
7979
(fun s => e.inv.app (Y j) ≫
8080
(F.map (singleObjApplyIso (0 : I) X).inv).app (Y j) ≫ s.inj ⟨⟨0, j⟩, hp j⟩)
8181
(fun s => by
@@ -190,7 +190,7 @@ set_option backward.isDefEq.respectTransparency false in
190190
/-- The cofan `mapBifunctorRightUnitorCofan F Y e p hp X j` is a colimit. -/
191191
noncomputable def mapBifunctorRightUnitorCofanIsColimit (j : J) :
192192
IsColimit (mapBifunctorRightUnitorCofan F Y e p hp X j) :=
193-
mkCofanColimit _
193+
Cofan.IsColimit.mk _
194194
(fun s => e.inv.app (X j) ≫
195195
(F.obj (X j)).map (singleObjApplyIso (0 : I) Y).inv ≫ s.inj ⟨⟨j, 0⟩, hp j⟩)
196196
(fun s => by

Mathlib/CategoryTheory/Groupoid/Grpd/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def piLimitFan ⦃J : Type u⦄ (F : J → Grpd.{u, u}) : Limits.Fan F :=
103103
set_option backward.isDefEq.respectTransparency false in
104104
/-- The product fan over an indexed family of groupoids, is a limit cone. -/
105105
def piLimitFanIsLimit ⦃J : Type u⦄ (F : J → Grpd.{u, u}) : Limits.IsLimit (piLimitFan F) :=
106-
Limits.mkFanLimit (piLimitFan F) (fun s => Functor.pi' fun j => s.proj j)
106+
Limits.Fan.IsLimit.mk (piLimitFan F) (fun s => Functor.pi' fun j => s.proj j)
107107
(by
108108
intros
109109
dsimp only [piLimitFan]

Mathlib/CategoryTheory/Limits/FormalCoproducts/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ maps from each component, which is the universal property of coproducts. -/
187187

188188
/-- `cofan 𝒜 f` is a coproduct of `f`. -/
189189
@[simps!] def isColimitCofan : IsColimit (cofan 𝒜 f) :=
190-
mkCofanColimit (cofan 𝒜 f) (fun t ↦ (cofanHomEquiv _ _ _).symm t.inj)
190+
Cofan.IsColimit.mk (cofan 𝒜 f) (fun t ↦ (cofanHomEquiv _ _ _).symm t.inj)
191191
(fun t i ↦ congrFun ((cofanHomEquiv _ _ _).right_inv t.inj) i)
192192
(fun _ _ h ↦ (Equiv.eq_symm_apply _).2 (funext h))
193193

Mathlib/CategoryTheory/Limits/FormalCoproducts/Cech.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ noncomputable abbrev powerFan :
5656
set_option backward.isDefEq.respectTransparency false in
5757
/-- `U.power α` identifies to the product of copies of `U` indexed by `α`. -/
5858
noncomputable def isLimitPowerFan : IsLimit (U.powerFan α) :=
59-
mkFanLimit _
59+
Fan.IsLimit.mk _
6060
(fun s ↦
6161
{ f i a := (s.proj a).f i
6262
φ i := Pi.lift (fun a ↦ (s.proj a).φ i) })

Mathlib/CategoryTheory/Limits/MonoCoprod.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ lemma mono_inj (c : Cofan X) (h : IsColimit c) (i : I)
217217
let ι : Unit → I := fun _ ↦ i
218218
have hι : Function.Injective ι := fun _ _ _ ↦ rfl
219219
exact mono_of_injective X ι hι c (Cofan.mk (X i) (fun _ ↦ 𝟙 _)) h
220-
(mkCofanColimit _ (fun s => s.inj ()))
220+
(Cofan.IsColimit.mk _ (fun s => s.inj ()))
221221

222222
instance mono_ι [HasCoproduct X] (i : I)
223223
[HasCoproduct (fun (k : ((Set.range (fun _ : Unit ↦ i))ᶜ : Set I)) => X k.1)] :

Mathlib/CategoryTheory/Limits/Shapes/Biproducts.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -706,9 +706,9 @@ instance {ι} (f : ι → Type*) (g : (i : ι) → (f i) → C)
706706
simp [biproduct.ι_π_ne _ h]
707707
· simp [biproduct.ι_π_ne_assoc _ w] }
708708
isBilimit :=
709-
{ isLimit := mkFanLimit _
709+
{ isLimit := Fan.IsLimit.mk _
710710
(fun s => biproduct.lift fun b => biproduct.lift fun c => s.proj ⟨b, c⟩)
711-
isColimit := mkCofanColimit _
711+
isColimit := Cofan.IsColimit.mk _
712712
(fun s => biproduct.desc fun b => biproduct.desc fun c => s.inj ⟨b, c⟩) } }
713713

714714
/-- An iterated biproduct is a biproduct over a sigma type. -/

Mathlib/CategoryTheory/Limits/Shapes/CombinedProducts.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ set_option backward.isDefEq.respectTransparency false in
4848
/-- If `c₁` and `c₂` are limit fans and `bc` is a limit binary fan on their cone
4949
points, then the fan constructed from `combPairHoms` is a limit cone. -/
5050
def combPairIsLimit : IsLimit (Fan.mk bc.pt (combPairHoms c₁ c₂ bc)) :=
51-
mkFanLimit _
51+
Fan.IsLimit.mk _
5252
(fun s ↦ Fan.IsLimit.lift h <| fun i ↦ by
5353
cases i
5454
· exact Fan.IsLimit.lift h₁ (fun a ↦ s.proj (.inl a))
@@ -84,7 +84,7 @@ set_option backward.isDefEq.respectTransparency false in
8484
/-- If `c₁` and `c₂` are colimit cofans and `bc` is a colimit binary cofan on their cocone
8585
points, then the cofan constructed from `combPairHoms` is a colimit cocone. -/
8686
def combPairIsColimit : IsColimit (Cofan.mk bc.pt (combPairHoms c₁ c₂ bc)) :=
87-
mkCofanColimit _
87+
Cofan.IsColimit.mk _
8888
(fun s ↦ Cofan.IsColimit.desc h <| fun i ↦ by
8989
cases i
9090
· exact Cofan.IsColimit.desc h₁ (fun a ↦ s.inj (.inl a))

Mathlib/CategoryTheory/Limits/Shapes/Products.lean

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,16 @@ lemma hasProduct_of_equiv_of_iso (f : α → C) (g : β → C)
110110
/-- Make a fan `f` into a limit fan by providing `lift`, `fac`, and `uniq` --
111111
just a convenience lemma to avoid having to go through `Discrete` -/
112112
@[simps]
113-
def mkFanLimit {f : β → C} (t : Fan f) (lift : ∀ s : Fan f, s.pt ⟶ t.pt)
113+
def Fan.IsLimit.mk {f : β → C} (t : Fan f) (lift : ∀ s : Fan f, s.pt ⟶ t.pt)
114114
(fac : ∀ (s : Fan f) (j : β), lift s ≫ t.proj j = s.proj j := by cat_disch)
115115
(uniq : ∀ (s : Fan f) (m : s.pt ⟶ t.pt) (_ : ∀ j : β, m ≫ t.proj j = s.proj j),
116116
m = lift s := by cat_disch) :
117117
IsLimit t :=
118118
{ lift }
119119

120+
@[deprecated (since := "2026-05-19")]
121+
alias mkFanLimit := Fan.IsLimit.mk
122+
120123
/-- Constructor for morphisms to the point of a limit fan. -/
121124
def Fan.IsLimit.lift {F : β → C} {c : Fan F} (hc : IsLimit c) {A : C}
122125
(f : ∀ i, A ⟶ F i) : A ⟶ c.pt :=
@@ -142,13 +145,16 @@ lemma Fan.IsLimit.hom_ext {I : Type*} {F : I → C} {c : Fan F} (hc : IsLimit c)
142145
/-- Make a cofan `f` into a colimit cofan by providing `desc`, `fac`, and `uniq` --
143146
just a convenience lemma to avoid having to go through `Discrete` -/
144147
@[simps]
145-
def mkCofanColimit {f : β → C} (s : Cofan f) (desc : ∀ t : Cofan f, s.pt ⟶ t.pt)
148+
def Cofan.IsColimit.mk {f : β → C} (s : Cofan f) (desc : ∀ t : Cofan f, s.pt ⟶ t.pt)
146149
(fac : ∀ (t : Cofan f) (j : β), s.inj j ≫ desc t = t.inj j := by cat_disch)
147150
(uniq : ∀ (t : Cofan f) (m : s.pt ⟶ t.pt) (_ : ∀ j : β, s.inj j ≫ m = t.inj j),
148151
m = desc t := by cat_disch) :
149152
IsColimit s :=
150153
{ desc }
151154

155+
@[deprecated (since := "2026-05-19")]
156+
alias mkCofanColimit := Cofan.IsColimit.mk
157+
152158
/-- Constructor for morphisms from the point of a colimit cofan. -/
153159
def Cofan.IsColimit.desc {F : β → C} {c : Cofan F} (hc : IsColimit c) {A : C}
154160
(f : ∀ i, F i ⟶ A) : c.pt ⟶ A :=
@@ -311,7 +317,7 @@ def Cofan.isColimitTrans {X : α → C} (c : Cofan X) (hc : IsColimit c)
311317
(hs : ∀ a, IsColimit (Cofan.mk (X a) (π a))) :
312318
IsColimit (Cofan.mk (f := fun ⟨a,b⟩ => Y a b) c.pt
313319
(fun (⟨a, b⟩ : Σ a, _) ↦ π a b ≫ c.inj a)) := by
314-
refine mkCofanColimit _ ?_ ?_ ?_
320+
refine Cofan.IsColimit.mk _ ?_ ?_ ?_
315321
· exact fun t ↦ hc.desc (Cofan.mk _ fun a ↦ (hs a).desc (Cofan.mk t.pt (fun b ↦ t.inj ⟨a, b⟩)))
316322
· intro t ⟨a, b⟩
317323
simp only [mk_pt, cofan_mk_inj, Category.assoc]
@@ -610,7 +616,7 @@ instance {ι : Type*} (f : ι → Type*) (g : (i : ι) → (f i) → C)
610616
HasProduct fun p : Σ i, f i => g p.1 p.2 where
611617
exists_limit := Nonempty.intro
612618
{ cone := Fan.mk (∏ᶜ fun i => ∏ᶜ g i) (fun X => Pi.π (fun i => ∏ᶜ g i) X.1 ≫ Pi.π (g X.1) X.2)
613-
isLimit := mkFanLimit _ (fun s => Pi.lift fun b => Pi.lift fun c => s.proj ⟨b, c⟩)
619+
isLimit := Fan.IsLimit.mk _ (fun s => Pi.lift fun b => Pi.lift fun c => s.proj ⟨b, c⟩)
614620
(by simp)
615621
(by intro s (m : _ ⟶ (∏ᶜ fun i ↦ ∏ᶜ g i)) w; aesop (add norm simp Sigma.forall)) }
616622

@@ -630,7 +636,7 @@ instance {ι : Type*} (f : ι → Type*) (g : (i : ι) → (f i) → C)
630636
exists_colimit := Nonempty.intro
631637
{ cocone := Cofan.mk (∐ fun i => ∐ g i)
632638
(fun X => Sigma.ι (g X.1) X.2 ≫ Sigma.ι (fun i => ∐ g i) X.1)
633-
isColimit := mkCofanColimit _
639+
isColimit := Cofan.IsColimit.mk _
634640
(fun s => Sigma.desc fun b => Sigma.desc fun c => s.inj ⟨b, c⟩)
635641
(by simp)
636642
(by intro s (m : (∐ fun i ↦ ∐ g i) ⟶ _) w; aesop_cat (add norm simp Sigma.forall)) }
@@ -815,7 +821,7 @@ def productUniqueIso [Unique β] (f : β → C) : ∏ᶜ f ≅ f default :=
815821
/-- Any isomorphism is the projection from a single object product. -/
816822
def Fan.isLimitMkOfUnique {X Y : C} (e : X ≅ Y) (J : Type*) [Unique J] :
817823
IsLimit (Fan.mk X fun _ : J ↦ e.hom) := by
818-
refine mkFanLimit _ (fun s ↦ s.proj default ≫ e.inv) (fun s j ↦ ?_) fun s m hm ↦ ?_
824+
refine Fan.IsLimit.mk _ (fun s ↦ s.proj default ≫ e.inv) (fun s j ↦ ?_) fun s m hm ↦ ?_
819825
· obtain rfl : j = default := Subsingleton.elim _ _
820826
simp
821827
· simpa [← cancel_mono e.hom] using hm default
@@ -850,7 +856,7 @@ def coproductUniqueIso [Unique β] (f : β → C) : ∐ f ≅ f default :=
850856
/-- Any isomorphism is the projection from a single object product. -/
851857
def Cofan.isColimitMkOfUnique {X Y : C} (e : X ≅ Y) (J : Type*) [Unique J] :
852858
IsColimit (Cofan.mk Y fun _ : J ↦ e.hom) := by
853-
refine mkCofanColimit _ (fun s ↦ e.inv ≫ s.inj default) (fun s j ↦ ?_) fun s m hm ↦ ?_
859+
refine Cofan.IsColimit.mk _ (fun s ↦ e.inv ≫ s.inj default) (fun s j ↦ ?_) fun s m hm ↦ ?_
854860
· obtain rfl : j = default := Subsingleton.elim _ _
855861
simp
856862
· simpa [← cancel_epi e.hom] using hm default
@@ -952,7 +958,7 @@ variable {ι ι' : Type*} {X : ι → ι' → C}
952958
def Fan.IsLimit.prod (c : ∀ i : ι, Fan (fun j : ι' ↦ X i j)) (hc : ∀ i : ι, IsLimit (c i))
953959
(c' : Fan (fun i : ι ↦ (c i).pt)) (hc' : IsLimit c') :
954960
(IsLimit <| Fan.mk c'.pt fun p : ι × ι' ↦ c'.proj _ ≫ (c p.1).proj p.2) := by
955-
refine mkFanLimit _ (fun t ↦ ?_) ?_ fun t m hm ↦ ?_
961+
refine Fan.IsLimit.mk _ (fun t ↦ ?_) ?_ fun t m hm ↦ ?_
956962
· exact Fan.IsLimit.lift hc' fun i ↦ Fan.IsLimit.lift (hc i) fun j ↦ t.proj (i, j)
957963
· simp
958964
· refine Fan.IsLimit.hom_ext hc' _ _ fun i ↦ ?_
@@ -962,7 +968,7 @@ def Fan.IsLimit.prod (c : ∀ i : ι, Fan (fun j : ι' ↦ X i j)) (hc : ∀ i :
962968
def Cofan.IsColimit.prod (c : ∀ i : ι, Cofan (fun j : ι' ↦ X i j)) (hc : ∀ i : ι, IsColimit (c i))
963969
(c' : Cofan (fun i : ι ↦ (c i).pt)) (hc' : IsColimit c') :
964970
(IsColimit <| Cofan.mk c'.pt fun p : ι × ι' ↦ (c p.1).inj p.2 ≫ c'.inj _) := by
965-
refine mkCofanColimit _ (fun t ↦ ?_) ?_ fun t m hm ↦ ?_
971+
refine Cofan.IsColimit.mk _ (fun t ↦ ?_) ?_ fun t m hm ↦ ?_
966972
· exact Cofan.IsColimit.desc hc' fun i ↦ Cofan.IsColimit.desc (hc i) fun j ↦ t.inj (i, j)
967973
· simp
968974
· refine Cofan.IsColimit.hom_ext hc' _ _ fun i ↦ ?_

0 commit comments

Comments
 (0)