# How to write composition of epimorphisms

I am trying to write the following composition of epimorphisms, but I don't like the form.

The code is:

\documentclass[12pt,a4paper]{book}
\usepackage[utf8]{inputenc}
\usepackage[english,greek]{babel}
\usepackage{amsmath,amsfonts,amssymb}

\newcommand{\rightarrowdbl}{\rightarrow\mathrel{\mkern-14mu}\rightarrow}
\newcommand{\xrightarrowdbl}[2][]{%
\xrightarrow[#1]{#2}\mathrel{\mkern-14mu}\rightarrow}

\begin{document}
\begin{align*}
\phi \circ \pi: \mathbb{Z}[X] & \xrightarrowdbl{\ \pi \ } \mathbb{Z}_2[X] && \xrightarrowdbl{\ \phi \ }  \mathbb{Z}_2,\\
f(X) & \longmapsto \pi (f(X)):=\overline{f(X)} && \longmapsto  \phi(\overline{f(X)}):=\overline{f(0)}
\end{align*}
\end{document}


Is there a better way to write it?

Thank you!

• First I will change := with \mathrel{\mathop:}=. What exactly are you interested in changing? Thank you. – Sebastiano Feb 12 at 13:20
• @Sebastiano Thank you for your comment. I just wonder if there is a another way to improve the format. For example to reduce the gap in the second ring epimorphism. Any ideas please? – Chris Feb 12 at 16:37
• Don't worry. My english language is very poor. What do you mean "to reduce the gap in the second ring"? Can you explain me with simple language what do you do? Is it correct in English. Generally for commutative-diagrams I use the package tikz-cd or xy and the translator (now no :-(), – Sebastiano Feb 12 at 16:42
• You can remove the white space between \overline{f(X)} and \longmapsto by using \begin{alignat*}{2} instead of \begin{align*} (and the corresponding end). But it's bad nonetheless. – egreg Feb 12 at 17:07
• @Chris Not trying to align those things. – egreg Feb 12 at 18:09

I will chose for to draw your composition of epimorphisms using the classic package for these commutative diagrams: tikz-cd. See the example below.

\documentclass[a4paper,12pt]{article}
\usepackage{tikz-cd,mathtools,amssymb}

\begin{document}
\begin{tikzcd}[row sep=1cm, column sep=1cm]
{\phi \circ \pi: \mathbb{Z}[X]} \arrow[r, "\pi", two heads] & {\mathbb{Z}_2[X]} \arrow[r, "\phi", two heads] & \mathbb{Z}_2
\end{tikzcd}

\begin{tikzcd}[row sep=1cm, column sep=.5cm]
f(X)   \arrow[r, maps to] & \pi (f(X))\mathrel{\mathop:}=\overline{f(X)} \arrow[r, maps to] & \phi(\overline{f(X)})\mathrel{\mathop:}=\overline{f(0)}
\end{tikzcd}
\end{document}

• You ve got it! I had something like that in my mind, thank you! (your English are ok, so don't worry) Thank you very much. – Chris Feb 12 at 17:18
• @Chris I am happy to help you. My best regards. – Sebastiano Feb 12 at 17:35
• Let me ask you something more. What if we had monomorphisms or isomorphisms? Which will be the format? – Chris Feb 12 at 22:55
• @Chris You're welcome. As this link: andrew.cmu.edu/user/jonasf/80-514-814/hw/hw2.tex – Sebastiano Feb 12 at 22:58
• Ok, thank you for your help! – Chris Feb 12 at 23:00