Lean4
/-- Given `w : TwoSquare T L R B` and a morphism `g : R.obj X₂ ⟶ B.obj X₃`, this is
the obvious functor `w.CostructuredArrowDownwards g ⥤ w.StructuredArrowRightwards g`. -/
@[simps]
def inverse : w.CostructuredArrowDownwards g ⥤ w.StructuredArrowRightwards g
where
obj
f :=
StructuredArrow.mk (Y := CostructuredArrow.mk f.hom.right)
(CostructuredArrow.homMk f.left.hom (by simpa using StructuredArrow.w f.hom))
map {f₁ f₂}
φ :=
StructuredArrow.homMk (CostructuredArrow.homMk φ.left.right (by dsimp; rw [← CostructuredArrow.w φ]; rfl))
(by ext; exact StructuredArrow.w φ.left)
map_id _ := rfl
map_comp _ _ := rfl