Zulip Chat Archive
Stream: Is there code for X?
Topic: proving commutativity of diagrams
Anthony Bordg (Mar 26 2025 at 13:39):
Has Mathlib something more direct than using docs#CategoryTheory.Functor.map_comp to prove that a functor maps a commutative diagram to a commutative diagram?
Markus Himmel (Mar 26 2025 at 13:42):
What is your notion of "commutative diagram" here? If a commutative diagram in C
is just a functor I ⥤ C
, then the fact that a functor C ⥤ D
preserves commutative diagrams is docs#CategoryTheory.Functor.comp
Anthony Bordg (Mar 26 2025 at 13:47):
Markus Himmel said:
What is your notion of "commutative diagram" here?
I want to prove F f ≫ F g = F f' ≫ F g'
, knowing that I have a proof of f ≫ g = f' ≫ g'
.
Markus Himmel (Mar 26 2025 at 13:50):
You might be interested in docs#CategoryTheory.CommSq.map, i.e.,
import Mathlib
open CategoryTheory
variable {C D : Type*} [Category C] [Category D] (F : C ⥤ D)
variable {X Y Z W : C} {f : X ⟶ Y} {g : Y ⟶ Z} {f' : X ⟶ W} {g' : W ⟶ Z}
example (h : f ≫ g = f' ≫ g') : F.map f ≫ F.map g = F.map f' ≫ F.map g' := by
simp [← Functor.map_comp, h]
example (h : f ≫ g = f' ≫ g') : F.map f ≫ F.map g = F.map f' ≫ F.map g' :=
((CommSq.mk h).map F).w
Last updated: May 02 2025 at 03:31 UTC