Skip to content

Commit b815664

Browse files
committed
feat(AlgebraicTopology): edges and "triangles" in the nerve of a category (#31274)
We study `Edge` and `Edge.CompStruct` in the case of the nerve of a category. In particular, `Edge.CompStruct` are related to commutative triangles.
1 parent 07e962f commit b815664

File tree

8 files changed

+193
-24
lines changed

8 files changed

+193
-24
lines changed

Mathlib/AlgebraicTopology/SimplicialNerve.lean

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ namespace SimplicialCategory
120120
variable {J : Type*} [LinearOrder J]
121121

122122
/-- The hom simplicial set of the simplicial category structure on `SimplicialThickening J` -/
123-
abbrev Hom (i j : SimplicialThickening J) : SSet := (nerve (i ⟶ j))
123+
abbrev Hom (i j : SimplicialThickening J) : SSet := nerve (i ⟶ j)
124124

125125
/-- The identity of the simplicial category structure on `SimplicialThickening J` -/
126126
abbrev id (i : SimplicialThickening J) : 𝟙_ SSet ⟶ Hom i i :=
@@ -155,7 +155,8 @@ noncomputable instance (J : Type*) [LinearOrder J] :
155155
Hom := Hom
156156
id := id
157157
comp := comp
158-
homEquiv {i j} := (nerveEquiv _).symm.trans (SSet.unitHomEquiv _).symm
158+
homEquiv {i j} :=
159+
nerveEquiv.symm.trans (SSet.unitHomEquiv (SimplicialCategory.Hom i j)).symm
159160

160161
/-- Auxiliary definition for `SimplicialThickening.functorMap` -/
161162
def orderHom {J K : Type*} [LinearOrder J] [LinearOrder K] (f : J →o K) :
@@ -169,6 +170,8 @@ noncomputable abbrev functorMap {J K : Type u} [LinearOrder J] [LinearOrder K]
169170
by rintro _ ⟨k, hk, rfl⟩; exact f.monotone (I.le_right k hk)⟩
170171
map f := ⟨⟨Set.image_mono f.1.1⟩⟩
171172

173+
attribute [local simp] nerveMap_app
174+
172175
/--
173176
The simplicial thickening defines a functor from the category of linear orders to the category of
174177
simplicial categories

Mathlib/AlgebraicTopology/SimplicialSet/CompStruct.lean

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,19 @@ lemma tgt_eq (e : Edge x₀ x₁) : X.δ 0 e.edge = x₁ := Truncated.Edge.tgt_e
7474
lemma ext {e e' : Edge x₀ x₁} (h : e.edge = e'.edge) :
7575
e = e' := Truncated.Edge.ext h
7676

77+
section
78+
79+
variable (edge : X _⦋1⦌) (src_eq : X.δ 1 edge = x₀ := by cat_disch)
80+
(tgt_eq : X.δ 0 edge = x₁ := by cat_disch)
81+
82+
/-- Constructor for edges in a simplicial set. -/
83+
def mk : Edge x₀ x₁ := ofTruncated { edge := edge }
84+
85+
@[simp]
86+
lemma mk_edge : (mk edge src_eq tgt_eq).edge = edge := rfl
87+
88+
end
89+
7790
variable (x₀) in
7891
/-- The constant edge on a `0`-simplex. -/
7992
def id : Edge x₀ x₀ := ofTruncated (.id _)
@@ -86,15 +99,18 @@ lemma id_edge : (id x₀).edge = X.σ 0 x₀ := rfl
8699
def map (e : Edge x₀ x₁) (f : X ⟶ Y) : Edge (f.app _ x₀) (f.app _ x₁) :=
87100
ofTruncated (e.toTruncated.map ((truncation 2).map f))
88101

102+
@[simp]
103+
lemma map_edge (e : Edge x₀ x₁) (f : X ⟶ Y) :
104+
(e.map f).edge = f.app _ e.edge := rfl
105+
89106
variable (x₀) in
90107
@[simp]
91108
lemma map_id (f : X ⟶ Y) :
92109
(Edge.id x₀).map f = Edge.id (f.app _ x₀) :=
93110
Truncated.Edge.map_id _ _
94111

95112
/-- The edge given by a `1`-simplex. -/
96-
def mk' (s : X _⦋1⦌) : Edge (X.δ 1 s) (X.δ 0 s) :=
97-
.ofTruncated (Truncated.Edge.mk' (X := (truncation 2).obj X) s)
113+
def mk' (s : X _⦋1⦌) : Edge (X.δ 1 s) (X.δ 0 s) := mk s
98114

99115
@[simp]
100116
lemma mk'_edge (s : X _⦋1⦌) : (mk' s).edge = s := rfl
@@ -128,9 +144,23 @@ def toTruncated (h : CompStruct e₀₁ e₁₂ e₀₂) :
128144
Truncated.Edge.CompStruct e₀₁.toTruncated e₁₂.toTruncated e₀₂.toTruncated :=
129145
h
130146

147+
section
148+
149+
variable (h : CompStruct e₀₁ e₁₂ e₀₂)
150+
131151
/-- The underlying `2`-simplex in a structure `SSet.Edge.CompStruct`. -/
132-
def simplex (h : CompStruct e₀₁ e₁₂ e₀₂) : X _⦋2⦌ :=
133-
h.toTruncated.simplex
152+
def simplex : X _⦋2⦌ := h.toTruncated.simplex
153+
154+
@[simp]
155+
lemma d₂ : X.δ 2 h.simplex = e₀₁.edge := Truncated.Edge.CompStruct.d₂ h
156+
157+
@[simp]
158+
lemma d₀ : X.δ 0 h.simplex = e₁₂.edge := Truncated.Edge.CompStruct.d₀ h
159+
160+
@[simp]
161+
lemma d₁ : X.δ 1 h.simplex = e₀₂.edge := Truncated.Edge.CompStruct.d₁ h
162+
163+
end
134164

135165
section
136166

Mathlib/AlgebraicTopology/SimplicialSet/Coskeletal.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,14 @@ noncomputable def lift {X : SSet.{u}} (sx : StrictSegal X) {n}
7373
arrow_src := fun i ↦ by
7474
let φ : strArrowMk₂ (mkOfLe _ _ (Fin.castSucc_le_succ i)) ⟶
7575
strArrowMk₂ (⦋0⦌.const _ i.castSucc) :=
76-
StructuredArrow.homMk (δ 1).op
76+
StructuredArrow.homMk (SimplexCategory.δ 1).op
7777
(Quiver.Hom.unop_inj (by ext x; fin_cases x; rfl))
7878
exact congr_fun (s.w φ) x
7979
arrow_tgt := fun i ↦ by
8080
dsimp
8181
let φ : strArrowMk₂ (mkOfLe _ _ (Fin.castSucc_le_succ i)) ⟶
8282
strArrowMk₂ (⦋0⦌.const _ i.succ) :=
83-
StructuredArrow.homMk (δ 0).op
83+
StructuredArrow.homMk (SimplexCategory.δ 0).op
8484
(Quiver.Hom.unop_inj (by ext x; fin_cases x; rfl))
8585
exact congr_fun (s.w φ) x }
8686

@@ -131,7 +131,7 @@ lemma fac_aux₂ {n : ℕ}
131131
let α₂ := strArrowMk₂ (mkOfLe (n := n) ⟨i, by cutsat⟩ ⟨i + k, by cutsat⟩ (by simp))
132132
let β₀ : α ⟶ α₀ := StructuredArrow.homMk ((mkOfSucc 1).op) (Quiver.Hom.unop_inj
133133
(by ext x; fin_cases x <;> rfl))
134-
let β₁ : α ⟶ α₁ := StructuredArrow.homMk ((δ 1).op) (Quiver.Hom.unop_inj
134+
let β₁ : α ⟶ α₁ := StructuredArrow.homMk ((SimplexCategory.δ 1).op) (Quiver.Hom.unop_inj
135135
(by ext x; fin_cases x <;> rfl))
136136
let β₂ : α ⟶ α₂ := StructuredArrow.homMk ((mkOfSucc 0).op) (Quiver.Hom.unop_inj
137137
(by ext x; fin_cases x <;> rfl))

Mathlib/AlgebraicTopology/SimplicialSet/HomotopyCat.lean

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,8 @@ def OneTruncation₂.ofNerve₂.natIso :
167167
ComposableArrows.obj', Fin.zero_eta, Fin.isValue, ReflQuiv.comp_eq_comp, Nat.reduceAdd,
168168
op_map, Quiver.Hom.unop_op, nerve_map, SimplexCategory.toCat_map, ReflPrefunctor.comp_obj,
169169
ReflPrefunctor.comp_map]
170-
simp [nerveHomEquiv, ReflQuiv.isoOfEquiv, ReflQuiv.isoOfQuivIso, Quiv.isoOfEquiv])
170+
simp [nerveMap_app, nerveHomEquiv, ReflQuiv.isoOfEquiv,
171+
ReflQuiv.isoOfQuivIso, Quiv.isoOfEquiv])
171172

172173
end
173174

Mathlib/AlgebraicTopology/SimplicialSet/Nerve.lean

Lines changed: 120 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Authors: Joël Riou
55
-/
66
module
77

8-
public import Mathlib.AlgebraicTopology.SimplicialSet.Basic
8+
public import Mathlib.AlgebraicTopology.SimplicialSet.CompStruct
99
public import Mathlib.CategoryTheory.ComposableArrows.Basic
1010

1111
/-!
@@ -31,19 +31,21 @@ universe v u
3131
namespace CategoryTheory
3232

3333
/-- The nerve of a category -/
34-
@[simps]
34+
@[simps -isSimp]
3535
def nerve (C : Type u) [Category.{v} C] : SSet.{max u v} where
3636
obj Δ := ComposableArrows C (Δ.unop.len)
3737
map f x := x.whiskerLeft (SimplexCategory.toCat.map f.unop)
3838
-- `aesop` can prove these but is slow, help it out:
3939
map_id _ := rfl
4040
map_comp _ _ := rfl
4141

42+
attribute [simp] nerve_obj
43+
4244
instance {C : Type*} [Category C] {Δ : SimplexCategoryᵒᵖ} : Category ((nerve C).obj Δ) :=
4345
(inferInstance : Category (ComposableArrows C (Δ.unop.len)))
4446

4547
/-- Given a functor `C ⥤ D`, we obtain a morphism `nerve C ⟶ nerve D` of simplicial sets. -/
46-
@[simps]
48+
@[simps -isSimp]
4749
def nerveMap {C D : Type u} [Category.{v} C] [Category.{v} D] (F : C ⥤ D) : nerve C ⟶ nerve D :=
4850
{ app := fun _ => (F.mapComposableArrows _).obj }
4951

@@ -54,9 +56,9 @@ def nerveFunctor : Cat.{v, u} ⥤ SSet where
5456
map F := nerveMap F
5557

5658
/-- The 0-simplices of the nerve of a category are equivalent to the objects of the category. -/
57-
def nerveEquiv (C : Type u) [Category.{v} C] : nerve C _⦋0 ≃ C where
59+
def nerveEquiv {C : Type u} [Category.{v} C] : ComposableArrows C 0 ≃ C where
5860
toFun f := f.obj ⟨0, by omega⟩
59-
invFun f := (Functor.const _).obj f
61+
invFun f := ComposableArrows.mk₀ f
6062
left_inv f := ComposableArrows.ext₀ rfl
6163

6264
namespace nerve
@@ -71,17 +73,17 @@ def representableBy {n : ℕ} (α : Type u) [Preorder α] (e : α ≃o Fin (n +
7173
right_inv F := Functor.ext (fun x ↦ by simp) }
7274
homEquiv_comp _ _ := rfl
7375

74-
variable {C : Type*} [Category C] {n : ℕ}
76+
variable {C : Type u} [Category.{v} C] {n : ℕ}
7577

76-
lemma δ_obj {n : ℕ} (i : Fin (n + 2)) (x : (nerve C) _⦋n + 1) (j : Fin (n + 1)) :
78+
lemma δ_obj {n : ℕ} (i : Fin (n + 2)) (x : ComposableArrows C (n + 1)) (j : Fin (n + 1)) :
7779
((nerve C).δ i x).obj j = x.obj (i.succAbove j) :=
7880
rfl
7981

80-
lemma σ_obj {n : ℕ} (i : Fin (n + 1)) (x : (nerve C) _⦋n⦌) (j : Fin (n + 2)) :
82+
lemma σ_obj {n : ℕ} (i : Fin (n + 1)) (x : ComposableArrows C n) (j : Fin (n + 2)) :
8183
((nerve C).σ i x).obj j = x.obj (i.predAbove j) :=
8284
rfl
8385

84-
lemma δ₀_eq {x : nerve C _⦋n + 1} : (nerve C).δ (0 : Fin (n + 2)) x = x.δ₀ := rfl
86+
lemma δ₀_eq {x : ComposableArrows C (n + 1)} : (nerve C).δ (0 : Fin (n + 2)) x = x.δ₀ := rfl
8587

8688
lemma σ₀_mk₀_eq (x : C) : (nerve C).σ (0 : Fin 1) (.mk₀ x) = .mk₁ (𝟙 x) :=
8789
ComposableArrows.ext₁ rfl rfl (by simp; rfl)
@@ -107,6 +109,115 @@ lemma ext_of_isThin [Quiver.IsThin C] {n : SimplexCategoryᵒᵖ} {x y : (nerve
107109
x = y :=
108110
ComposableArrows.ext (by simp [h]) (by subsingleton)
109111

112+
open SSet
113+
114+
@[simp]
115+
lemma left_edge {x y : ComposableArrows C 0} (e : (nerve C).Edge x y) :
116+
ComposableArrows.left (n := 1) e.edge = nerveEquiv x := by
117+
simp only [← e.src_eq]
118+
rfl
119+
120+
@[simp]
121+
lemma right_edge {x y : ComposableArrows C 0} (e : (nerve C).Edge x y) :
122+
ComposableArrows.right (n := 1) e.edge = nerveEquiv y := by
123+
simp only [← e.tgt_eq]
124+
rfl
125+
126+
lemma δ₂_two (x : ComposableArrows C 2) :
127+
(nerve C).δ 2 x = .mk₁ (x.map' 0 1) :=
128+
ComposableArrows.ext₁ rfl rfl (by cat_disch)
129+
130+
lemma δ₂_zero (x : ComposableArrows C 2) :
131+
(nerve C).δ 0 x = .mk₁ (x.map' 1 2) :=
132+
ComposableArrows.ext₁ rfl rfl (by cat_disch)
133+
134+
section
135+
136+
attribute [local ext (iff := false)] ComposableArrows.ext₀ ComposableArrows.ext₁
137+
138+
/-- Bijection between edges in the nerve of category and morphisms in the category. -/
139+
def homEquiv {x y : ComposableArrows C 0} :
140+
(nerve C).Edge x y ≃ (nerveEquiv x ⟶ nerveEquiv y) where
141+
toFun e := eqToHom (by simp) ≫ e.edge.hom ≫ eqToHom (by simp)
142+
invFun f := .mk (ComposableArrows.mk₁ f) (ComposableArrows.ext₀ rfl) (ComposableArrows.ext₀ rfl)
143+
left_inv e := by cat_disch
144+
right_inv f := by simp
145+
146+
lemma mk₁_homEquiv_apply {x y : ComposableArrows C 0} (e : (nerve C).Edge x y) :
147+
ComposableArrows.mk₁ (homEquiv e) = ComposableArrows.mk₁ e.edge.hom := by
148+
simp [homEquiv, ComposableArrows.mk₁_eqToHom_comp, ComposableArrows.mk₁_comp_eqToHom]
149+
150+
/-- Constructor for edges in the nerve of a category. (See also `homEquiv`.) -/
151+
def edgeMk {x y : C} (f : x ⟶ y) : (nerve C).Edge (nerveEquiv.symm x) (nerveEquiv.symm y) :=
152+
Edge.mk (ComposableArrows.mk₁ f)
153+
154+
@[simp]
155+
lemma edgeMk_edge {x y : C} (f : x ⟶ y) : (edgeMk f).edge = ComposableArrows.mk₁ f := rfl
156+
157+
lemma edgeMk_surjective {x y : C} :
158+
Function.Surjective (edgeMk : (x ⟶ y) → _) :=
159+
fun e ↦ ⟨eqToHom (by simp) ≫ homEquiv e ≫ eqToHom (by simp), by cat_disch⟩
160+
161+
@[simp]
162+
lemma homEquiv_edgeMk {x y : C} (f : x ⟶ y) :
163+
homEquiv (edgeMk f) = f :=
164+
homEquiv.symm.injective (by cat_disch)
165+
166+
lemma homEquiv_id (x : ComposableArrows C 0) :
167+
homEquiv (Edge.id x) = 𝟙 _ := by
168+
obtain ⟨x, rfl⟩ := nerveEquiv.symm.surjective x
169+
dsimp [homEquiv]
170+
cat_disch
171+
172+
lemma nonempty_compStruct_iff {x₀ x₁ x₂ : C}
173+
(f₀₁ : x₀ ⟶ x₁) (f₁₂ : x₁ ⟶ x₂) (f₀₂ : x₀ ⟶ x₂) :
174+
Nonempty (Edge.CompStruct (edgeMk f₀₁) (edgeMk f₁₂) (edgeMk f₀₂)) ↔
175+
f₀₁ ≫ f₁₂ = f₀₂ := by
176+
let h' : Edge.CompStruct (edgeMk f₀₁) (edgeMk f₁₂) (edgeMk (f₀₁ ≫ f₁₂)) :=
177+
Edge.CompStruct.mk (ComposableArrows.mk₂ f₀₁ f₁₂)
178+
(by cat_disch) (by cat_disch) (by cat_disch)
179+
refine ⟨fun ⟨h⟩ ↦ ?_, fun h ↦ ⟨by rwa [← h]⟩⟩
180+
rw [← Arrow.mk_inj]
181+
apply ComposableArrows.arrowEquiv.symm.injective
182+
convert_to (nerve C).δ 1 h'.simplex = (nerve C).δ 1 h.simplex
183+
· exact (h'.d₁).symm
184+
· exact (h.d₁).symm
185+
· have h₀ := h.d₀
186+
have h₂ := h.d₂
187+
have h'₀ := h'.d₀
188+
have h'₂ := h'.d₂
189+
simp only [δ₂_zero, δ₂_two, edgeMk_edge] at h₀ h₂ h'₀ h'₂
190+
exact congr_arg _ (ComposableArrows.ext₂_of_arrow
191+
(ComposableArrows.arrowEquiv.symm.injective
192+
(by simp [-Edge.CompStruct.d₂, h'₂, ← h₂]))
193+
(ComposableArrows.arrowEquiv.symm.injective
194+
(by simp [-Edge.CompStruct.d₀, h'₀, ← h₀])))
195+
196+
lemma homEquiv_comp {x₀ x₁ x₂ : ComposableArrows C 0}
197+
{e₀₁ : (nerve C).Edge x₀ x₁}
198+
{e₁₂ : (nerve C).Edge x₁ x₂} {e₀₂ : (nerve C).Edge x₀ x₂}
199+
(h : Edge.CompStruct e₀₁ e₁₂ e₀₂) :
200+
homEquiv e₀₁ ≫ homEquiv e₁₂ = homEquiv e₀₂ := by
201+
obtain ⟨x₀, rfl⟩ := nerveEquiv.symm.surjective x₀
202+
obtain ⟨x₁, rfl⟩ := nerveEquiv.symm.surjective x₁
203+
obtain ⟨x₂, rfl⟩ := nerveEquiv.symm.surjective x₂
204+
obtain ⟨f₀₁, rfl⟩ := edgeMk_surjective e₀₁
205+
obtain ⟨f₁₂, rfl⟩ := edgeMk_surjective e₁₂
206+
obtain ⟨f₀₂, rfl⟩ := edgeMk_surjective e₀₂
207+
convert (nerve.nonempty_compStruct_iff _ _ _).1 ⟨h⟩ <;> apply homEquiv_edgeMk
208+
209+
lemma σ_zero_nerveEquiv_symm (x : C) :
210+
(nerve C).σ 0 (nerveEquiv.symm x) = ComposableArrows.mk₁ (𝟙 x) := by
211+
cat_disch
212+
213+
@[simp]
214+
lemma homEquiv_edgeMk_map_nerveMap {D : Type u} [Category.{v} D] {x y : C}
215+
(f : x ⟶ y) (F : C ⥤ D) :
216+
homEquiv ((edgeMk f).map (nerveMap F)) = F.map f := by
217+
simp [homEquiv, nerveMap_app]
218+
219+
end
220+
110221
end nerve
111222

112223
end CategoryTheory

Mathlib/AlgebraicTopology/SimplicialSet/NerveAdjunction.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ instance nerveFunctor₂.full : nerveFunctor₂.{u, u}.Full where
449449
simp [uF', nerveFunctor₂, SSet.truncation, ReflQuiv.comp_eq_comp, uF, Fhk] <;>
450450
[let ι := ι0₂; let ι := ι1₂; let ι := ι2₂] <;>
451451
· replace := congr_arg (·.obj 0) (congr_fun (F.naturality ι.op) hk)
452-
dsimp [oneTruncation₂, ComposableArrows.left, SimplicialObject.truncation,
452+
dsimp [nerve_map, oneTruncation₂, ComposableArrows.left, SimplicialObject.truncation,
453453
nerveFunctor₂, SSet.truncation, forget₂, HasForget₂.forget₂] at this ⊢
454454
convert this.symm
455455
apply ComposableArrows.ext₀; rfl

Mathlib/AlgebraicTopology/SimplicialSet/StrictSegal.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,8 @@ lemma spine_δ_vertex_lt (hij : i.castSucc < j) :
202202
(sx.spineToSimplex (m + 1) _ f))).vertex i = f.vertex i.castSucc := by
203203
rw [spine_vertex, ← FunctorToTypes.map_comp_apply, ← op_comp, ← tr_comp,
204204
SimplexCategory.const_comp, spineToSimplex_vertex]
205-
dsimp only [δ, len_mk, mkHom, Hom.toOrderHom_mk, Fin.succAboveOrderEmb_apply,
206-
OrderEmbedding.toOrderHom_coe]
205+
dsimp only [SimplexCategory.δ, len_mk, mkHom, Hom.toOrderHom_mk,
206+
Fin.succAboveOrderEmb_apply, OrderEmbedding.toOrderHom_coe]
207207
rw [Fin.succAbove_of_castSucc_lt j i hij]
208208

209209
/-- If we take the path along the spine of the `j`th face of a `spineToSimplex`,
@@ -214,8 +214,8 @@ lemma spine_δ_vertex_ge (hij : j ≤ i.castSucc) :
214214
(sx.spineToSimplex (m + 1) _ f))).vertex i = f.vertex i.succ := by
215215
rw [spine_vertex, ← FunctorToTypes.map_comp_apply, ← op_comp, ← tr_comp,
216216
SimplexCategory.const_comp, spineToSimplex_vertex]
217-
dsimp only [δ, len_mk, mkHom, Hom.toOrderHom_mk, Fin.succAboveOrderEmb_apply,
218-
OrderEmbedding.toOrderHom_coe]
217+
dsimp only [SimplexCategory.δ, len_mk, mkHom, Hom.toOrderHom_mk,
218+
Fin.succAboveOrderEmb_apply, OrderEmbedding.toOrderHom_coe]
219219
rw [Fin.succAbove_of_le_castSucc j i hij]
220220

221221
variable {i : Fin m} {j : Fin (m + 2)}

Mathlib/CategoryTheory/ComposableArrows/Basic.lean

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,18 @@ lemma ext₁ {F G : ComposableArrows C 1}
280280
lemma mk₁_surjective (X : ComposableArrows C 1) : ∃ (X₀ X₁ : C) (f : X₀ ⟶ X₁), X = mk₁ f :=
281281
⟨_, _, X.map' 0 1, ext₁ rfl rfl (by simp)⟩
282282

283+
lemma mk₁_eqToHom_comp {X₀' X₀ X₁ : C} (h : X₀' = X₀) (f : X₀ ⟶ X₁) :
284+
ComposableArrows.mk₁ (eqToHom h ≫ f) = ComposableArrows.mk₁ f := by
285+
cat_disch
286+
287+
lemma mk₁_comp_eqToHom {X₀ X₁ X₁' : C} (f : X₀ ⟶ X₁) (h : X₁ = X₁') :
288+
ComposableArrows.mk₁ (f ≫ eqToHom h) = ComposableArrows.mk₁ f := by
289+
cat_disch
290+
291+
lemma mk₁_hom (X : ComposableArrows C 1) :
292+
mk₁ X.hom = X :=
293+
ext₁ rfl rfl (by simp)
294+
283295
/-- The bijection between `ComposableArrows C 1` and `Arrow C`. -/
284296
@[simps]
285297
def arrowEquiv : ComposableArrows C 1 ≃ Arrow C where
@@ -606,6 +618,18 @@ lemma mk₂_surjective (X : ComposableArrows C 2) :
606618
∃ (X₀ X₁ X₂ : C) (f₀ : X₀ ⟶ X₁) (f₁ : X₁ ⟶ X₂), X = mk₂ f₀ f₁ :=
607619
⟨_, _, _, X.map' 0 1, X.map' 1 2, ext₂ rfl rfl rfl (by simp) (by simp)⟩
608620

621+
lemma ext₂_of_arrow {f g : ComposableArrows C 2}
622+
(h₀₁ : Arrow.mk (f.map' 0 1) = Arrow.mk (g.map' 0 1))
623+
(h₁₂ : Arrow.mk (f.map' 1 2) = Arrow.mk (g.map' 1 2)) : f = g := by
624+
obtain ⟨x₀, x₁, x₂, f, f', rfl⟩ := mk₂_surjective f
625+
obtain ⟨y₀, y₁, y₂, g, g', rfl⟩ := mk₂_surjective g
626+
obtain rfl : x₀ = y₀ := congr_arg Arrow.leftFunc.obj h₀₁
627+
obtain rfl : x₁ = y₁ := congr_arg Arrow.rightFunc.obj h₀₁
628+
obtain rfl : x₂ = y₂ := congr_arg Arrow.rightFunc.obj h₁₂
629+
obtain rfl : f = g := by rwa [← Arrow.mk_inj]
630+
obtain rfl : f' = g' := by rwa [← Arrow.mk_inj]
631+
rfl
632+
609633
section
610634

611635
variable

0 commit comments

Comments
 (0)