# Overset arrows similar to \vec for monomorphism, epimorphism and isomorphism

I want to define 3 commands similar to \vec. The first, \Mono, must place over the argument an arrow just like in \vec, but with another arrowhead in the beginning of the arrow, and also pointing rightwards. This is to represent injections or monomorphisms.

The second,\Epi, must place over the argument an arrow just like in \vec, but with two arrowheads in the end of the arrow, both pointing rightwards. This is to represent surjections or epimorphisms.

The third, \Iso, must place over the argument an arrow just like in \vec, but with another arrowhead in the beginning of the arrow, but pointing leftwards. This is to represent bijections or isomorphisms.

My first attempt was to define the following commands

\newcommand{\Mono}[1]{\overset{\rightarrowtail}{#1}}
\newcommand{\Iso}[1]{\overset{\leftrightarrow}{#1}}

But these commands create too much space between the letter in the argument and the arrows above them, and the arrows themselves are too big. Ideally, I would like to know how \vec is defined and also to have commands that behave well in superscripts etc.

I don't know exactly how you defined \rightrightarrow, but my main point is to show the layout will be better if you do that with the accents package, as it takes into account the italic angle of the maths variables, so I replaced it with \hookrightarrow, which is a standard way to denote an injective homomorphism.

Here is a comparison of both ways:

\documentclass{article}
\usepackage{mathtools}
\usepackage{accents}
\usepackage{amssymb}
\newcommand{\Mono}[1]{\overset{\hookrightarrow}{#1}}
$\begin{matrix}\Mono{f}: A \rightarrow B &\quad & \accentset{\hookrightarrow}{f}: A \rightarrow B \\% \Epi{f}: A \rightarrow B & & \accentset{\twoheadrightarrow}{f}: A \rightarrow B \\ \Iso{f}: A \rightarrow B & & \accentset{\leftrightarrow}{f}: A \rightarrow B \end{matrix}$%