Lean4
/-- The category of subterminal objects is equivalent to the category of monomorphisms to the terminal
object (which is in turn equivalent to the subobjects of the terminal object).
-/
@[simps]
def subterminalsEquivMonoOverTerminal [HasTerminal C] : Subterminals C ≌ MonoOver (⊤_ C)
where
functor :=
{ obj := fun X => ⟨Over.mk (terminal.from X.1), X.2.mono_terminal_from⟩
map := fun f => MonoOver.homMk f (by ext1 ⟨⟨⟩⟩) }
inverse :=
{ obj := fun X =>
⟨X.obj.left, fun Z f g => by
rw [← cancel_mono X.arrow]
subsingleton⟩
map := fun f => f.1 }
unitIso := NatIso.ofComponents (fun X => Iso.refl X) (by subsingleton)
counitIso := NatIso.ofComponents (fun X => MonoOver.isoMk (Iso.refl _)) (by subsingleton)
functor_unitIso_comp := by subsingleton