# Draw a picture of primes ideal lying over a prime ideal

Let $K$ be a number field and $L$ be a finite extension of $K$. Then, let $\mathfrak{p}$ be a prime in $K$ and $\mathfrak{P}$ be a prime lying over $\mathfrak{p}$. I would like to draw the following picture:

      L              \mathfrak{P}             R_L/\mathfrak{P}
|finite             |unramified                 |extension of
|extension          |prime                      |finite fields
K              \mathfrak{p}             R_K/\mathfrak{p}


How should I go about it? Can I do it with use amscd or tikz? Or must I use fancier packages?

-
You can definitely do it with TikZ, it is just some nodes with lines between some of them. Have you tried anything? – Torbjørn T. Aug 13 '13 at 8:51
Try the package tikz-cd (tikz-cd). – Qrrbrbirlbel Aug 13 '13 at 8:51
I've tried using array but the vertical lines look awful. I'm hoping to avoid installing unnecessary packages because I'm on a college computer. – BlackAdder Aug 13 '13 at 8:59
tikz-cd is not unnecessary for this. You can use writelatex.com to try out the examples. – percusse Aug 13 '13 at 9:06
I would also recommend tikz-cd. If you do anything in algebraic/topological number theory, you will found yourself using commutative diagrams anyways quite soon. And for them, the TikZ library is just perfect :) – yo' Oct 9 '14 at 12:41

A TikZ solution with a matrix. The distance between the entries can be changed with the column sep and row sep keys. Using column sep={3cm,between origins}, the distance is measured from the center of the columns, not the edges. This should ensure that the distance between the lines is the same, regardless of the size of the 'labels' above/below them.

\documentclass{standalone}
\usepackage{amssymb}
\usepackage{tikz}
\usetikzlibrary{matrix}
\begin{document}
\begin{tikzpicture}
\matrix (m) [matrix of math nodes,column sep={3cm,between origins},row sep=2cm] {
L & \mathfrak{P} & R_L/\mathfrak{P} \\
K & \mathfrak{p} & R_K/\mathfrak{p} \\};

\draw (m-1-1) -- node[right,align=left] {finite\\extension} (m-2-1);
\draw (m-1-2) -- node[right,align=left] {unramified\\prime} (m-2-2);
\draw (m-1-3) -- node[right,align=left] {extension of\\finite fields} (m-2-3);
\end{tikzpicture}
\end{document}


-

No need for tikz. If you need a longer "stick", more \mids can be added, or just use a \rule as I show. The \useanchorwidth setting guarantees that the width of things like {R_L/\mathfrak{P}} don't influence the gap to the subsequent text. The mode \stackMath tells stackengine to process its arguments in \textstyle math by default, whereas \stackText indicates to processes stacking arguments as text. The \stackalignments tell whether to align the stack left, center or (not used here) right.

\stackon builds up from the baseline, \stackunder builds down from the baseline, while stackanchor splits the stack across the baseline.

\documentclass{article}
\usepackage{stackengine}
\usepackage{amsfonts}
\begin{document}
\stackMath
\def\useanchorwidth{T}
% FOR SHORTER STICK
%\savestack{\stick}{\stackon[0pt]{\stackunder[0pt]{\mid}{\mid}}{\mid}}
% FOR LONGER STICK
\savestack{\stick}{\rule[-.3in]{.5pt}{.6in}}
\stackMath\def\stackalignment{c} \stackunder{\stackon{\stick}{L}}{K} \stackText\def\stackalignment{l}\, \stackanchor{finite}{extension} \qquad \stackMath\def\stackalignment{c} \stackunder{\stackon{\stick}{\mathfrak{P}}}{\mathfrak{p}} \stackText\def\stackalignment{l}\, \stackanchor{unramified}{prime} \qquad \stackMath\def\stackalignment{c} \stackunder{\stackon{\stick}{R_L/\mathfrak{P}}}{R_K/\mathfrak{p}} \stackText\def\stackalignment{l}\, \stackanchor{extension of}{finite fields}
\end{document}


-

A tikz-cd solution:

% arara: pdflatex

\documentclass{article}
\usepackage{tikz-cd}
\usepackage{amsfonts}
\usepackage{mathtools}

\begin{document}
\begin{tikzcd}[every arrow/.append style={dash}, row sep = 8ex, column sep = {6em,between origins}]
L \arrow{d}{\text{\oalign{finite\cr extension}}}& \mathfrak{P} \arrow{d}{\text{\oalign{unramified\cr prime}}} & R_L/\mathfrak{P} \arrow{d}{\text{\oalign{extension of\cr finite fields\hfil}}} \\
K & \mathfrak{p} & R_K/\mathfrak{p}
\end{tikzcd}
\end{document}


-
Have you heard of \oalign? It knows to be useful: L \arrow{d}{\text{\oalign{finite\hfil\cr extension}}}& \mathfrak{P} \arrow{d}{\text{\oalign{unramified\cr prime\hfil}}} & R_L/\mathfrak{P} \arrow{d}{\text{\oalign{extension\cr of finite\hfil\cr fields\hfil}}} \\ – yo' Oct 9 '14 at 11:45
@tohecz thanks, never used it yet. I adapted my code to this better approach. – LaRiFaRi Oct 9 '14 at 12:14

A PSTricks solution:

\documentclass{article}

\usepackage{amssymb}
\usepackage{pstricks}

\def\Prime#1{\mathfrak{#1}}
\def\something(#1)#2#3[#4,#5]{
\psline(#1,0)(#1,2)
\uput[270](#1,0){$#2$}
\uput[90](#1,2){$#3$}
\uput[0](#1,1){\shortstack[l]{#4\strut\\[-0.75ex] #5\strut}}
}

\begin{document}

\begin{pspicture}(-0.1,-0.5)(7,2.5)
\something(0){K}{L}[finite, extension]
\something(2.5){\Prime{p}}{\Prime{P}}[unramified, prime]
\something(5){R_{K}/\Prime{p}}{R_{L}/\Prime{P}}[extension of, finite fields]
\end{pspicture}

\end{document}


-

Just for completeness, with the venerable picture mode (no extra packages required):

\documentclass{article}
\usepackage{amssymb}
\newcommand\mycenter[1]{\makebox[0pt][c]{#1}}
\newcommand\mylabel[1]{\parbox[c][1cm][c]{3cm}{#1\strut}}

\begin{document}
\setlength{\unitlength}{1cm}
\begin{picture}(8.5,3)(-1,0)
\put(0,1){\line(0,1){1}}
\put(3,1){\line(0,1){1}}
\put(6,1){\line(0,1){1}}
\put(0,0.6){\mycenter{$K$}}
\put(0,2.2){\mycenter{$L$}}
\put(3,0.6){\mycenter{$\mathfrak{p}$}}
\put(3,2.2){\mycenter{$\mathfrak{P}$}}
\put(6,0.6){\mycenter{$R_K/\mathfrak{p}$}}
\put(6,2.2){\mycenter{$R_L/\mathfrak{P}$}}
\put(0.1,1.35){\mylabel{finite\\extension}}
\put(3.1,1.35){\mylabel{unramified\\prime}}
\put(6.1,1.35){\mylabel{extension of\\finite fields}}
\end{picture}
\end{document}


-