Proofs
qed_symbol sets the end-of-proof symbol, amsthm’s \qedsymbol, as math. Here it is a filled square instead of the default open box.
Theorem 1. \(\sqrt{2}\) is irrational.
Proof. Suppose \(\sqrt{2} = p/q\) in lowest terms. Then \(p^2 = 2q^2\), so \(p\) is even, and then so is \(q\): a contradiction.\(\quad\blacksquare\)
When a proof ends in a display or a list, the symbol would sit on a line of its own. Put \qedhere where it should go, as in LaTeX:
Another proof of Theorem 1. Write \(p = 2r\). Then \(4r^2 = 2q^2\), so \[q^2 = 2r^2. \quad\blacksquare\]
Proof. Two cases remain:
- \(q\) is odd, which contradicts \(q^2 = 2r^2\);
- \(q\) is even, which contradicts lowest terms.\(\quad\blacksquare\)
A proof inside a proof ends with a symbol of its own:
Proof. We need a lemma.
Proof. The lemma’s own proof.\(\quad\blacksquare\)
The rest follows.\(\quad\blacksquare\)
Source
This page is made from the Markdown below, and LaTeX output gets the LaTeX beside it. The PDF under Other Formats is that LaTeX, typeset by amsthm.
---
title: Proofs
amsthm:
plain:
- Theorem
qed_symbol: $\blacksquare$
---
`qed_symbol` sets the end-of-proof symbol, amsthm's `\qedsymbol`, as
math. Here it is a filled square instead of the default open box.
::: {#sqrt2 .Theorem}
$\sqrt{2}$ is irrational.
:::
::: proof
Suppose $\sqrt{2} = p/q$ in lowest terms. Then $p^2 = 2q^2$, so $p$ is
even, and then so is $q$: a contradiction.
:::
When a proof ends in a display or a list, the symbol would sit on a
line of its own. Put `\qedhere` where it should go, as in LaTeX:
::: {.proof info="Another proof of @Sqrt2"}
Write $p = 2r$. Then $4r^2 = 2q^2$, so
$$q^2 = 2r^2. \qedhere$$
:::
::: proof
Two cases remain:
1. $q$ is odd, which contradicts $q^2 = 2r^2$;
2. $q$ is even, which contradicts lowest terms. \qedhere
:::
A proof inside a proof ends with a symbol of its own:
::: proof
We need a lemma.
::: proof
The lemma's own proof.
:::
The rest follows.
:::\usepackage{amsthm}
\renewcommand{\qedsymbol}{\ensuremath{\blacksquare}}
\theoremstyle{plain}
\newtheorem{Theorem}{Theorem}
\texttt{qed\_symbol} sets the end-of-proof symbol, amsthm's
\texttt{\textbackslash{}qedsymbol}, as math. Here it is a filled square
instead of the default open box.
\begin{Theorem}\label{sqrt2}
\(\sqrt{2}\) is irrational.
\end{Theorem}
\begin{proof}
Suppose \(\sqrt{2} = p/q\) in lowest terms. Then \(p^2 = 2q^2\), so
\(p\) is even, and then so is \(q\): a contradiction.
\end{proof}
When a proof ends in a display or a list, the symbol would sit on a line
of its own. Put \texttt{\textbackslash{}qedhere} where it should go, as
in LaTeX:
\begin{proof}[{Another proof of Theorem~\ref{sqrt2}}]
Write \(p = 2r\). Then \(4r^2 = 2q^2\), so \[q^2 = 2r^2. \qedhere\]
\end{proof}
\begin{proof}
Two cases remain:
\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
\tightlist
\item
\(q\) is odd, which contradicts \(q^2 = 2r^2\);
\item
\(q\) is even, which contradicts lowest terms. \qedhere
\end{enumerate}
\end{proof}
A proof inside a proof ends with a symbol of its own:
\begin{proof}
We need a lemma.
\begin{proof}
The lemma's own proof.
\end{proof}
The rest follows.
\end{proof}