Skip to content

Commit a5d4280

Browse files
committed
feat(CategoryTheory/Limits/Shapes/Pullback/Categorical): bicategory-like lemmas for CatCospanTransforms (#26447)
We complete the proof that categorical cospan transforms introduced in #26412 form an "unbundled bicategory".
1 parent 6c0e852 commit a5d4280

File tree

1 file changed

+100
-2
lines changed

1 file changed

+100
-2
lines changed

Mathlib/CategoryTheory/Limits/Shapes/Pullback/Categorical/CatCospanTransform.lean

Lines changed: 100 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ transformations are used to encode 2-functoriality of categorical pullback squar
2828

2929
namespace CategoryTheory.Limits
3030

31-
universe v₁ v₂ v₃ v₄ v₅ v₆ v₇ v₈ v₉ v₁₀ v₁₁ v₁₂ u₁ u₂ u₃ u₄ u₅ u₆ u₇ u₈ u₉ u₁₀ u₁₁ u₁₂
31+
universe v₁ v₂ v₃ v₄ v₅ v₆ v₇ v₈ v₉ v₁₀ v₁₁ v₁₂ v₁₃ v₁₄ v₁₅
32+
universe u₁ u₂ u₃ u₄ u₅ u₆ u₇ u₈ u₉ u₁₀ u₁₁ u₁₂ u₁₃ u₁₄ u₁₅
3233

3334
/-- A `CatCospanTransform F G F' G'` is a diagram
3435
```
@@ -103,7 +104,7 @@ variable {A : Type u₁} {B : Type u₂} {C : Type u₃}
103104
{F : A ⥤ B} {G : C ⥤ B}
104105
[Category.{v₄} A'] [Category.{v₅} B'] [Category.{v₆} C']
105106
{F' : A' ⥤ B'} {G' : C' ⥤ B'}
106-
[Category.{v₇} A''] [Category.{v₈} B''] [Category.{v} C'']
107+
[Category.{v₇} A''] [Category.{v₈} B''] [Category.{v} C'']
107108
{F'' : A'' ⥤ B''} {G'' : C'' ⥤ B''}
108109

109110
/-- A morphism of `CatCospanTransform F G F' G'` is a triple of natural
@@ -261,6 +262,103 @@ def associator {A''' : Type u₁₀} {B''' : Type u₁₁} {C''' : Type u₁₂}
261262
(φ.right.associator φ'.right φ''.right)
262263
(φ.base.associator φ'.base φ''.base)
263264

265+
section lemmas
266+
267+
-- We scope the notations with notations from bicategories to make life easier.
268+
-- Due to performance issues, these notations should not be in scope at the same time
269+
-- as the ones in bicategories.
270+
271+
@[inherit_doc] scoped infixr:81 " ◁ " => CatCospanTransformMorphism.whiskerLeft
272+
@[inherit_doc] scoped infixl:81 " ▷ " => CatCospanTransformMorphism.whiskerRight
273+
@[inherit_doc] scoped notation "α_" => CatCospanTransform.associator
274+
@[inherit_doc] scoped notation "λ_" => CatCospanTransform.leftUnitor
275+
@[inherit_doc] scoped notation "ρ_" => CatCospanTransform.rightUnitor
276+
277+
variable
278+
{A''' : Type u₁₀} {B''' : Type u₁₁} {C''' : Type u₁₂}
279+
[Category.{v₁₀} A'''] [Category.{v₁₁} B'''] [Category.{v₁₂} C''']
280+
{F''' : A''' ⥤ B'''} {G''' : C''' ⥤ B'''}
281+
{ψ ψ' ψ'' : CatCospanTransform F G F' G'}
282+
(η : ψ ⟶ ψ') (η' : ψ' ⟶ ψ'')
283+
{φ φ' φ'' : CatCospanTransform F' G' F'' G''}
284+
(θ : φ ⟶ φ') (θ' : φ' ⟶ φ'')
285+
{τ τ' : CatCospanTransform F'' G'' F''' G'''}
286+
(γ : τ ⟶ τ')
287+
288+
@[reassoc]
289+
lemma whisker_exchange : ψ ◁ θ ≫ η ▷ φ' = η ▷ φ ≫ ψ' ◁ θ := by aesop_cat
290+
291+
@[simp]
292+
lemma id_whiskerRight : 𝟙 ψ ▷ φ = 𝟙 _ := by aesop_cat
293+
294+
@[reassoc]
295+
lemma whiskerRight_id : η ▷ (.id _ _) = (ρ_ _).hom ≫ η ≫ (ρ_ _).inv := by aesop_cat
296+
297+
@[simp, reassoc]
298+
lemma comp_whiskerRight : (η ≫ η') ▷ φ = η ▷ φ ≫ η' ▷ φ := by aesop_cat
299+
300+
@[reassoc]
301+
lemma whiskerRight_comp :
302+
η ▷ (φ.comp τ) = (α_ _ _ _).inv ≫ (η ▷ φ) ▷ τ ≫ (α_ _ _ _ ).hom := by
303+
aesop_cat
304+
305+
@[simp]
306+
lemma whiskerleft_id : ψ ◁ 𝟙 φ = 𝟙 _ := by aesop_cat
307+
308+
@[reassoc]
309+
lemma id_whiskerLeft : (.id _ _) ◁ η = (λ_ _).hom ≫ η ≫ (λ_ _).inv := by aesop_cat
310+
311+
@[simp, reassoc]
312+
lemma whiskerLeft_comp : ψ ◁ (θ ≫ θ') = (ψ ◁ θ) ≫ (ψ ◁ θ') := by aesop_cat
313+
314+
@[reassoc]
315+
lemma comp_whiskerLeft :
316+
(ψ.comp φ) ◁ γ = (α_ _ _ _).hom ≫ (ψ ◁ (φ ◁ γ)) ≫ (α_ _ _ _).inv := by
317+
aesop_cat
318+
319+
@[reassoc]
320+
lemma pentagon
321+
{A'''' : Type u₁₃} {B'''' : Type u₁₄} {C'''' : Type u₁₅}
322+
[Category.{v₁₃} A''''] [Category.{v₁₄} B''''] [Category.{v₁₅} C'''']
323+
{F'''' : A'''' ⥤ B''''} {G'''' : C'''' ⥤ B''''}
324+
{σ : CatCospanTransform F''' G''' F'''' G''''} :
325+
(α_ ψ φ τ).hom ▷ σ ≫ (α_ ψ (φ.comp τ) σ).hom ≫ ψ ◁ (α_ φ τ σ).hom =
326+
(α_ (ψ.comp φ) τ σ).hom ≫ (α_ ψ φ (τ.comp σ)).hom := by
327+
aesop_cat
328+
329+
@[reassoc]
330+
lemma triangle :
331+
(α_ ψ (.id _ _) φ).hom ≫ ψ ◁ (λ_ φ).hom = (ρ_ ψ).hom ▷ φ := by
332+
aesop_cat
333+
334+
@[reassoc]
335+
lemma triangle_inv :
336+
(α_ ψ (.id _ _) φ).inv ≫ (ρ_ ψ).hom ▷ φ = ψ ◁ (λ_ φ).hom := by
337+
aesop_cat
338+
339+
section Isos
340+
341+
variable {ψ ψ' : CatCospanTransform F G F' G'} (η : ψ ⟶ ψ') [IsIso η]
342+
{φ φ' : CatCospanTransform F' G' F'' G''} (θ : φ ⟶ φ') [IsIso θ]
343+
344+
instance : IsIso (ψ ◁ θ) :=
345+
⟨ψ ◁ inv θ, ⟨by simp [← whiskerLeft_comp], by simp [← whiskerLeft_comp]⟩⟩
346+
347+
lemma inv_whiskerLeft : inv (ψ ◁ θ) = ψ ◁ inv θ := by
348+
apply IsIso.inv_eq_of_hom_inv_id
349+
simp [← whiskerLeft_comp]
350+
351+
instance : IsIso (η ▷ φ) :=
352+
⟨inv η ▷ φ, ⟨by simp [← comp_whiskerRight], by simp [← comp_whiskerRight]⟩⟩
353+
354+
lemma inv_whiskerRight : inv (η ▷ φ) = inv η ▷ φ := by
355+
apply IsIso.inv_eq_of_hom_inv_id
356+
simp [← comp_whiskerRight]
357+
358+
end Isos
359+
360+
end lemmas
361+
264362
end CatCospanTransform
265363

266364
end CategoryTheory.Limits

0 commit comments

Comments
 (0)