Skip to content

Commit 75a0561

Browse files
committed
feat(CategoryTheory/Limits/Shapes/Pullback/Categorical/CatCospanTransform): more lemmas about isomorphisms of CatCospanTransform (#26547)
We construct ways to extract left, right or base components of ismorphisms of `CatCospanTransform`, as well as various `IsIso` instances, and lemmas allowing to compute the left, right or base component of the inverse of a `CatCospanTransformMorphism` that has an `IsIso` instance.
1 parent b60e8b5 commit 75a0561

File tree

1 file changed

+70
-0
lines changed

1 file changed

+70
-0
lines changed

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

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,76 @@ def mkIso {ψ ψ' : CatCospanTransform F G F' G'}
237237
IsIso.inv_eq_inv.mpr right_coherence =≫
238238
ψ.squareRight.iso.hom }
239239

240+
section Iso
241+
242+
variable {ψ ψ' : CatCospanTransform F G F' G'}
243+
(f : ψ' ⟶ ψ') [IsIso f] (e : ψ ≅ ψ')
244+
245+
instance isIso_left : IsIso f.left :=
246+
⟨(inv f).left, by simp [← CatCospanTransform.category_comp_left]⟩
247+
248+
instance isIso_right : IsIso f.right :=
249+
⟨(inv f).right, by simp [← CatCospanTransform.category_comp_right]⟩
250+
251+
instance isIso_base : IsIso f.base :=
252+
⟨(inv f).base, by simp [← CatCospanTransform.category_comp_base]⟩
253+
254+
@[simp]
255+
lemma inv_left : inv f.left = (inv f).left := by
256+
symm
257+
apply IsIso.eq_inv_of_inv_hom_id
258+
simp [← CatCospanTransform.category_comp_left]
259+
260+
@[simp]
261+
lemma inv_right : inv f.right = (inv f).right := by
262+
symm
263+
apply IsIso.eq_inv_of_inv_hom_id
264+
simp [← CatCospanTransform.category_comp_right]
265+
266+
@[simp]
267+
lemma inv_base : inv f.base = (inv f).base := by
268+
symm
269+
apply IsIso.eq_inv_of_inv_hom_id
270+
simp [← CatCospanTransform.category_comp_base]
271+
272+
/-- Extract an isomorphism between left components from an isomorphism in
273+
`CatCospanTransform F G F' G'`. -/
274+
@[simps]
275+
def leftIso : ψ.left ≅ ψ'.left where
276+
hom := e.hom.left
277+
inv := e.inv.left
278+
hom_inv_id := by simp [← category_comp_left]
279+
inv_hom_id := by simp [← category_comp_left]
280+
281+
/-- Extract an isomorphism between right components from an isomorphism in
282+
`CatCospanTransform F G F' G'`. -/
283+
@[simps]
284+
def rightIso : ψ.right ≅ ψ'.right where
285+
hom := e.hom.right
286+
inv := e.inv.right
287+
hom_inv_id := by simp [← category_comp_right]
288+
inv_hom_id := by simp [← category_comp_right]
289+
290+
/-- Extract an isomorphism between base components from an isomorphism in
291+
`CatCospanTransform F G F' G'`. -/
292+
@[simps]
293+
def baseIso : ψ.base ≅ ψ'.base where
294+
hom := e.hom.base
295+
inv := e.inv.base
296+
hom_inv_id := by simp [← category_comp_base]
297+
inv_hom_id := by simp [← category_comp_base]
298+
299+
omit [IsIso f] in
300+
lemma isIso_iff : IsIso f ↔ IsIso f.left ∧ IsIso f.base ∧ IsIso f.right where
301+
mp h := ⟨inferInstance, inferInstance, inferInstance⟩
302+
mpr h := by
303+
obtain ⟨_, _, _⟩ := h
304+
use mkIso (asIso f.left) (asIso f.right) (asIso f.base)
305+
f.left_coherence f.right_coherence|>.inv
306+
aesop_cat
307+
308+
end Iso
309+
240310
/-- The left unitor isomorphism for categorical cospan transformations. -/
241311
@[simps!]
242312
def leftUnitor (φ : CatCospanTransform F G F' G') :

0 commit comments

Comments
 (0)