# Need help in order to rewrite a proof environment

I have the following document (that I have shortened considerably), and have several proofs that are of type: "Let x be in set A then go on iff this is true iff this is true, etc and end with therefore foo foo foo." To be honest, I am not quite sure what I want the end result to look like, but there has to be a better way than what I have. Below is my curtailed document. Please help.

\documentclass[12pt,a4paper,oneside]{report}
\usepackage[left=2.00cm,right=2.00cm,top=2.45cm,bottom=2.5cm]{geometry}
\usepackage{amsmath,amssymb,amsthm,amscd,amstext}

\def  \st    {\backepsilon}
\DeclareMathOperator{\dom}{dom}
\DeclareMathOperator{\rng}{rng}

\begin{proof}
\begin{align*}
Let y \in \rng{R^{-1}} &\iff \exists x \in Y \st (x,y) \in R^{-1}.\\
&\iff \exists x \in Y \st (y,x) \in R.\\
&\iff y \in \dom{R}.
\end{align*}
$\therefore \rng{R^{-1}} = \dom{R}.$
\end{proof}
\end{document}

-
Could you turn your snippet into a complete MWE? Otherwise folks have to make educated guesses at which packages to load :) –  cmhughes Feb 15 '12 at 21:46
Sorry. Here goes: –  Michael Dykes Feb 15 '12 at 21:53
\documentclass[12pt,a4paper,oneside]{report} \usepackage[left=2.00cm,right=2.00cm,top=2.45cm,bottom=2.5cm]{geometry} \usepackage{amsmath,amssymb,amscd,amstext} \begin{document} \begin{proof} \begin{align*} Let y \in \rng{R^{-1}} &\iff \exists x \in Y \st (x,y) \in R^{-1}.\\ &\iff \exists x \in Y \st (y,x) \in R.\\ &\iff y \in \dom{R}. \end{align*} $\therefore \rng{R^{-1}} = \dom{R}.$ \end{proof} \end{document} –  Michael Dykes Feb 15 '12 at 21:55
\begin{proof} An element $y\in Y$ belongs to $\rng R^{-1}$ if and only if there exists $x\in X$ such that $(x,y) \in R^{-1}$, which is equivalent to $(y,x)\in R$. This means, by definition, that $y\in\dom R$. Therefore we have proved that $\rng R^{-1}=\dom R$.\end{proof} –  egreg Feb 15 '12 at 22:30
@MichaelDykes Yes, there is. But think many times whether it's a good format for a proof. Symbols like \therefore or \backepsilon for "such that" might be good on a blackboard (and I'm dubious about it), not in a printed proof. –  egreg Feb 16 '12 at 0:18
show 7 more comments

## 2 Answers

If you prefer to use symbols then perhaps the aligned environment works better for you. Here I have added a small space after \exists\; and removed the periods at the end of the line as I think this looks better. I think your version is fine to provide as a solution to students. However, I think @egreg's comment produces results better suited for a paper or book. Here is a comparison of the two:

As per egreg's suggestion, putting the conclusion outside of the aligned correctly places the \qed marker.

\documentclass[12pt,a4paper,oneside]{report}
\usepackage[left=2.00cm,right=2.00cm,top=2.45cm,bottom=2.5cm]{geometry}
\usepackage{amsmath,amssymb,amsthm,amscd,amstext}

\def  \st    {\backepsilon}
\DeclareMathOperator{\dom}{dom}
\DeclareMathOperator{\rng}{rng}

\begin{document}
\begin{proof}
\begin{aligned}[t] \text{Let } y \in \rng{R^{-1}} &\iff \exists\; x \in Y \st (x,y) \in R^{-1}\\ &\iff \exists\; x \in Y \st (y,x) \in R\\ &\iff y \in \dom{R} \end{aligned}

$\qquad\therefore \rng{R^{-1}} = \dom{R}$.
\end{proof}

-
The initial "Let" is completely out of place and the braces around the "argument" to \rng and \dom are useless. Put the \therefore line outside the aligned, so the tombstone will be aligned with it. –  egreg Feb 16 '12 at 14:34
@egreg: I had the conclusion outside initially but then thought it looked better inside, and didn't notice that the \qed marker had moved. Thanks for letting me know, it has been corrected. –  Peter Grill Feb 16 '12 at 15:52
Thank you all very much for the comments and help. Now, I feel that I have 2 excellent 'solutions' and just need to decide which to use. Thanks to everyone who replied. Is there a way I notate that I feel the original question/s has/have been answered? Thanks again. –  Michael Dykes Feb 16 '12 at 23:27
@MichaelDykes: You should up vote any solutions that were helpful. If you feel you have an answer (or the one that was most helpful in getting the answer) then you should use the green check mark near the voting arrows to select that solution and that will mark this question as being answered. –  Peter Grill Feb 17 '12 at 0:20
add comment

like egreg, i think that a well-worded proof is greatly preferable to an entirely symbolic one. however, in the interest of experimentation, here is a total hack that avoids the problem in peter's solution that puts the "tombstone" on the first line of the proof.

\documentclass[12pt,a4paper,oneside]{report}
\usepackage[left=2.00cm,right=2.00cm,top=2.45cm,bottom=2.5cm]{geometry}
\usepackage{amsmath,amssymb,amsthm,amscd,amstext}

\def  \st    {\backepsilon}
\DeclareMathOperator{\dom}{dom}
\DeclareMathOperator{\rng}{rng}

\begin{document}
\begin{proof}
\vspace{-\abovedisplayskip}\vspace{-\baselineskip}
\begin{align*}
\text{Let } y \in \rng{R^{-1}} &\iff \exists\; x \in Y \st (x,y) \in R^{-1}\\
&\iff \exists\; x \in Y \st (y,x) \in R \hspace{15pc}\\
&\iff y \in \dom{R}\\
\therefore \rng{R^{-1}} &= \dom{R}.
\qedhere
\end{align*}
\end{proof}
\end{document}


the idea is to raise the aligned material by the vertical distance automatically added by using a display structure, and to make it wider, so that it is shoved in the proper direction.

the vertical offset can be automated. the amount of extra horizontal space will depend on the actual width of the material, so it can't easily be automated.

only an "outer" environment like align* will permit the use of \qedhere to place the box on the last line at the right margin.

-
I get Runaway argument? with this? –  Peter Grill Feb 16 '12 at 15:54
@Peter -- somehow a blank line crept into the alignment block. fixed. i guess i did a bad job cutting-and-pasting. thanks for reporting. –  barbara beeton Feb 16 '12 at 16:04
Sorry, I should have seen that. –  Peter Grill Feb 16 '12 at 16:28
Also, thanks to egreg for the notions concerning the ideas of a formal proof for a book, and that "for the blackboard" or "for the student". It has been really helpful. –  Michael Dykes Feb 16 '12 at 23:32
add comment