- #26

jhae2.718

Gold Member

- 1,161

- 20

Code:

```
[B]\documentclass[/B][10pt,a4paper]{article}
[B]\usepackage[/B][latin1]{inputenc}
[B]\usepackage[/B]{amsmath}
[B]\usepackage[/B]{amsfonts}
[B]\usepackage[/B]{amssymb}
[B]\author[/B]{Author}
[B]\newtheorem[/B]{theorem}{Theorem}[section]
[B]\newtheorem[/B]{lemma}[theorem]{Lemma}
[B]\newenvironment[/B]{proof}[1][Proof]{[B]\begin[/B]{trivlist}
[B]\item[/B][[B]\hskip \labelsep[/B] {[B]\bfseries[/B] #1}]}{[B]\end[/B]{trivlist}}
[B]\begin[/B]{document}
Prove $4^k+5$ is divisible by 3. [I]% Use $...$ for inline math. It's not necessary to put a single character in braces for (super|sub)scripts.[/I]
[B]\begin[/B]{equation*}
4^{k}+5 =2^{2k}-1+6 [I]% Newlines (\\) don't work in the equation environment. Use align. Asterisks suppress numbering.[/I]
[B]\end[/B]{equation*}
Here we introduce a lemma
[B]\begin[/B]{lemma}
If $n$ is not divisible by 3, then $n^2-1$ is divisible by 3.
[B]\end[/B]{lemma}
[B]\begin[/B]{proof}
if $n$ is divisible by 3,
[B]\begin[/B]{align*} [I]% This is the align environment. Use it for multiline equations/etc. The ampersand is the alignment position.[/I]
&[B]\implies[/B] n[B]\equiv[/B][B] \pm[/B] 1 [B]\pmod[/B] [B]3\\[/B]
&[B]\implies[/B] n^2[B]\equiv[/B] 1 [B]\pmod[/B] 3[B]\\[/B]
&[B]\implies[/B] n^2 - 1 [B]\equiv[/B] 0 [B]\pmod[/B] 3
[B]\end[/B]{align*}
[B]\end[/B]{proof}
[B]\end[/B]{document}
```