Lean4
/-- Turn an element of a type `F` satisfying `OneHomClass F M N` into an actual
`OneHom`. This is declared as the default coercion from `F` to `OneHom M N`. -/
@[to_additive (attr := coe) /-- Turn an element of a type `F` satisfying `ZeroHomClass F M N` into an actual
`ZeroHom`. This is declared as the default coercion from `F` to `ZeroHom M N`. -/
]
def toOneHom [OneHomClass F M N] (f : F) : OneHom M N
where
toFun := f
map_one' := map_one f