@@ -327,14 +327,32 @@ variable {X Y Z X' Y' Z' : C} (iX : X ≅ X') (iY : Y ≅ Y') (iZ : Z ≅ Z')
327327
328328section
329329
330+ /-- Constructor for natural transformations between cospans. -/
331+ @[simps]
332+ def cospanHomMk {F G : WalkingCospan ⥤ C}
333+ (z : F.obj .one ⟶ G.obj .one) (l : F.obj .left ⟶ G.obj .left)
334+ (r : F.obj .right ⟶ G.obj .right)
335+ (hl : F.map inl ≫ z = l ≫ G.map inl := by cat_disch)
336+ (hr : F.map inr ≫ z = r ≫ G.map inr := by cat_disch) : F ⟶ G where
337+ app := by rintro (_ | _ | _); exacts [z, l, r]
338+ naturality := by rintro (_ | _ | _ ) (_ | _ | _) (_ | _); all_goals cat_disch
339+
340+ /-- Constructor for natural isomorphisms between cospans. -/
341+ @[simps!]
342+ def cospanIsoMk {F G : WalkingCospan ⥤ C}
343+ (z : F.obj .one ≅ G.obj .one) (l : F.obj .left ≅ G.obj .left)
344+ (r : F.obj .right ≅ G.obj .right)
345+ (hl : F.map inl ≫ z.hom = l.hom ≫ G.map inl := by cat_disch)
346+ (hr : F.map inr ≫ z.hom = r.hom ≫ G.map inr := by cat_disch) : F ≅ G :=
347+ NatIso.ofComponents (by rintro (_ | _ | _); exacts [z, l, r])
348+ (by rintro (_ | _ | _ ) (_ | _ | _) (_ | _); all_goals cat_disch)
349+
330350variable {f : X ⟶ Z} {g : Y ⟶ Z} {f' : X' ⟶ Z'} {g' : Y' ⟶ Z'}
331351
332352/-- Construct an isomorphism of cospans from components. -/
333353def cospanExt (wf : iX.hom ≫ f' = f ≫ iZ.hom) (wg : iY.hom ≫ g' = g ≫ iZ.hom) :
334354 cospan f g ≅ cospan f' g' :=
335- NatIso.ofComponents
336- (by rintro (⟨⟩ | ⟨⟨⟩⟩); exacts [iZ, iX, iY])
337- (by rintro (⟨⟩ | ⟨⟨⟩⟩) (⟨⟩ | ⟨⟨⟩⟩) f <;> cases f <;> simp [wf, wg])
355+ cospanIsoMk iZ iX iY
338356
339357variable (wf : iX.hom ≫ f' = f ≫ iZ.hom) (wg : iY.hom ≫ g' = g ≫ iZ.hom)
340358
@@ -375,13 +393,32 @@ end
375393
376394section
377395
396+ /-- Constructor for natural transformations between spans. -/
397+ @[simps]
398+ def spanHomMk {F G : WalkingSpan ⥤ C}
399+ (z : F.obj .zero ⟶ G.obj .zero) (l : F.obj .left ⟶ G.obj .left)
400+ (r : F.obj .right ⟶ G.obj .right)
401+ (hl : F.map fst ≫ l = z ≫ G.map fst := by cat_disch)
402+ (hr : F.map snd ≫ r = z ≫ G.map snd := by cat_disch) : F ⟶ G where
403+ app := by rintro (_ | _ | _); exacts [z, l, r]
404+ naturality := by rintro (_ | _ | _ ) (_ | _ | _) (_ | _); all_goals cat_disch
405+
406+ /-- Constructor for natural isomorphisms between spans. -/
407+ @[simps!]
408+ def spanIsoMk {F G : WalkingSpan ⥤ C}
409+ (z : F.obj .zero ≅ G.obj .zero) (l : F.obj .left ≅ G.obj .left)
410+ (r : F.obj .right ≅ G.obj .right)
411+ (hl : F.map fst ≫ l.hom = z.hom ≫ G.map fst := by cat_disch)
412+ (hr : F.map snd ≫ r.hom = z.hom ≫ G.map snd := by cat_disch) : F ≅ G :=
413+ NatIso.ofComponents (by rintro (_ | _ | _); exacts [z, l, r])
414+ (by rintro (_ | _ | _ ) (_ | _ | _) (_ | _); all_goals cat_disch)
415+
378416variable {f : X ⟶ Y} {g : X ⟶ Z} {f' : X' ⟶ Y'} {g' : X' ⟶ Z'}
379417
380418/-- Construct an isomorphism of spans from components. -/
381419def spanExt (wf : iX.hom ≫ f' = f ≫ iY.hom) (wg : iX.hom ≫ g' = g ≫ iZ.hom) :
382420 span f g ≅ span f' g' :=
383- NatIso.ofComponents (by rintro (⟨⟩ | ⟨⟨⟩⟩); exacts [iX, iY, iZ])
384- (by rintro (⟨⟩ | ⟨⟨⟩⟩) (⟨⟩ | ⟨⟨⟩⟩) f <;> cases f <;> simp [wf, wg])
421+ spanIsoMk iX iY iZ
385422
386423variable (wf : iX.hom ≫ f' = f ≫ iY.hom) (wg : iX.hom ≫ g' = g ≫ iZ.hom)
387424
0 commit comments