I0 Latex
I0 Latex
Dylan Yu
January 8, 2022
Table of Contents
1 Introduction
What is LATEX?
Why learn LATEX?
Math Equations
What is LATEX?
1 It’s useful
Why learn LATEX?
1 It’s useful
There’s a high amount of customizability
Why learn LATEX?
1 It’s useful
There’s a high amount of customizability
It’s extremely stable (so your document won’t crash and burn
the next time you compile it, unless you broke your computer
or something)
Why learn LATEX?
1 It’s useful
There’s a high amount of customizability
It’s extremely stable (so your document won’t crash and burn
the next time you compile it, unless you broke your computer
or something)
You can collaborate with others via Overleaf, Github, or
Dropbox (the later two are preferred by serious users)
Why learn LATEX?
1 It’s useful
There’s a high amount of customizability
It’s extremely stable (so your document won’t crash and burn
the next time you compile it, unless you broke your computer
or something)
You can collaborate with others via Overleaf, Github, or
Dropbox (the later two are preferred by serious users)
2 It’s aesthetically pleasing
Why learn LATEX?
1 It’s useful
There’s a high amount of customizability
It’s extremely stable (so your document won’t crash and burn
the next time you compile it, unless you broke your computer
or something)
You can collaborate with others via Overleaf, Github, or
Dropbox (the later two are preferred by serious users)
2 It’s aesthetically pleasing
In fact, it’s the easiest language that also produces beautiful
documents
Why learn LATEX?
1 It’s useful
There’s a high amount of customizability
It’s extremely stable (so your document won’t crash and burn
the next time you compile it, unless you broke your computer
or something)
You can collaborate with others via Overleaf, Github, or
Dropbox (the later two are preferred by serious users)
2 It’s aesthetically pleasing
In fact, it’s the easiest language that also produces beautiful
documents
For example, you could use LATEX for Google Docs, but it looks
bad and you won’t get the same functionality
Why learn LATEX?
1 It’s useful
There’s a high amount of customizability
It’s extremely stable (so your document won’t crash and burn
the next time you compile it, unless you broke your computer
or something)
You can collaborate with others via Overleaf, Github, or
Dropbox (the later two are preferred by serious users)
2 It’s aesthetically pleasing
In fact, it’s the easiest language that also produces beautiful
documents
For example, you could use LATEX for Google Docs, but it looks
bad and you won’t get the same functionality
You’ll see examples of nicely presented articles later
Why learn LATEX?
Fractions:
x+y
$\frac{x+y}{2}$ 2
Math Expressions
Roots:
√
$\sqrt{2}$ 2
Math Expressions
Roots:
√
$\sqrt{2}$ 2
Roots:
√
$\sqrt{2}$ 2
Inequalities:
$>$, $<$, $\ge$, $\le$ >, <, ≥, ≤
Math Expressions
Inequalities:
$>$, $<$, $\ge$, $\le$ >, <, ≥, ≤
Inequalities:
$>$, $<$, $\ge$, $\le$ >, <, ≥, ≤
\documentclass{article}
\begin{document}
The solution to \[\sqrt{x} = 5\] is \[x=25.\]
\end{document}
\documentclass{article}
\title{An example document} % The title
\author{John Doe} % Author’s name
\date{\today} % The date; you can choose a specific date
\begin{document}
\maketitle % Creates the title
3 Details
Bold, italics, and underline
Comments
Images
Lists
Sections
Tables and figures
Bold, italics, and underline
Bold:
\textbf{Bold} Bold
Bold, italics, and underline
Bold:
\textbf{Bold} Bold
Italics:
\textit{Italics} Italics
Bold, italics, and underline
Bold:
\textbf{Bold} Bold
Italics:
\textit{Italics} Italics
Underline:
\underline{Underline} Underline
Bold, italics, and underline
Bold:
\textbf{Bold} Bold
Italics:
\textit{Italics} Italics
Underline:
\underline{Underline} Underline
You might’ve noticed the percent symbol before; these are called
comments. Some languages (like Java) use // for comments.
LATEX uses %.
% The solution to
\[\sqrt{x} = 5\] is
\[x=25.\]
\includegraphics{images/latex-thonk.png}
Images
\includegraphics{images/latex-thonk.png}
Centering them, adjusting them, etc. are a bit harder, but still
manageable:
Figure: Thonk
Lists
With numbers:
1 One
Without numbers:
Dot
Sections
\section{A section}
Divide your topic into smaller parts.
\subsection{A subsection}
Even smaller.
\subsubsection{A subsubsection}
\textit{Even smaller.}
\paragraph{A paragraph} Gives a title to a paragraph.
Take a look at the example below; don’t worry too much about the
[H] for now.
\begin{figure}[H]
\centering
\begin{tabular}{c|c}
\textbf{Kanye} &
Kanye Drake
\textbf{Drake}\\
\hline MBDTF IYRTITL
MBDTF & IYRTITL\\ CD TML
CD & TML Figure: A table inside a figure
\end{tabular} environment.
\caption{A table inside
a figure
environment.}
\end{figure}
Table of Contents
4 Commands
\newcommand
\newenvironment
\newcommand
5 Code-generated figures
Asymptote
Tikz
Asymptote
2 4 6 8
6 Beauty
Handouts
Style Files
More fun
Handouts
There are many beautiful handouts that can be made with LATEX.
Handouts
There are many beautiful handouts that can be made with LATEX.
Ch Us
Contents §1.1 Heuristics The idea of diagram perturbation is to manipulate a diagram in a geometry problem in
some way so that the result becomes easier to find. Let’s try a few classic examples.
This is going to be a lot like the Free class: lots of room for you to make choices (e.g. in
an rnal
1 Complexity: review 2 constructions). The same two philosophies from the combinatorial counterpart might be
1.1 Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 â1.2 Rotations
helpful here:
1.2 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
• Experimental: making conscious design choices, trying things out, etc. Example 1.1
2 Density bounding
2.1 The main idea . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2 A motivating example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3
3
3 v
• Restrictive: adding abstract constraints, including any constraints you can prove
E te
are necessary (which is especially often the case in number theory).
If a point P lies in an equilateral triangle ABC such that AP = 3, BP = 4, CP = 5, find
the area of 4 ABC.
By S, In
2.3 Useful bounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Solution. Let’s draw a figure:
This time, both of these steps often require number theory skill in order to carry out the
correct deductions. (So: globally, it feels like doing a combinatorics problem, but locally,
3 Walkthroughs 4 A
it feels like doing a number theory problem.) This has the weird property that sometimes
you’d like to rely on statement that is obviously true (“n2 + 1 is prime infinitely often”),
4 Additional practice 5 3
but either hard to prove or open; if you don’t know, then you have to make a judgment
5 Solutions to walkthroughs
5.1 Solution 1.1 (USAMO 1995/4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.2 Solution 2.3 (Ukraine TST 2007/12j) . . . . . . . . . . . . . . . . . . . . . . . . . .
7
7
7
TI
call. (Whereas in combinatorics, simple true statements are usually easy to prove.)
Common tropes in this lecture will include:
Note that 3, 4, 5 are special numbers, because they form the side lengths of a right triangle.
Now we’re going to rotate 4 APB around B such that A goes to C:
6.2 Solution 4.2 (Iran 2001/3/2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
6.3 Solution 4.3 (Canada 2020/4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
§1.2 Examples
6.4 Solution 4.4 (ISL 2015 N6) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
6.5 Solution 4.5 (China TST 2018/1/5) . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
6.6 Solution 4.6 (InfinityDots 2019/5) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
6.7 Solution 4.7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
∗
Internal use only. Selected problems belong to their respective authors and organizations, as attributed.
Otherwise, no part of this document may be reproduced or transmitted in any form or by any means,
without prior written permission from the author.
1
1
1
Figure: The first handout is by Raymond Feng and Eric Shen; the second
handout is by Evan Chen; the third is by me.
Style files
There are many pretty style files, which are basically just
custom-made designs that act like a “template” for your article.
Some nice ones are evan.sty by Evan Chen (he doesn’t have an
example document so this is just one of his handouts),
Style files
There are many pretty style files, which are basically just
custom-made designs that act like a “template” for your article.
Some nice ones are evan.sty by Evan Chen (he doesn’t have an
example document so this is just one of his handouts), lucky.sty by
Dennis Chen, and
Style files
There are many pretty style files, which are basically just
custom-made designs that act like a “template” for your article.
Some nice ones are evan.sty by Evan Chen (he doesn’t have an
example document so this is just one of his handouts), lucky.sty by
Dennis Chen, and dylanadi.sty by me (sorry for the
self-advertisement).
Style files
There are many pretty style files, which are basically just
custom-made designs that act like a “template” for your article.
Some nice ones are evan.sty by Evan Chen (he doesn’t have an
example document so this is just one of his handouts), lucky.sty by
Dennis Chen, and dylanadi.sty by me (sorry for the
self-advertisement).
E1
Modular Arithmetic
Dennis Chen
AIME/USA(J)MO Handout
A
NQU
§ 1.1 Divisibility
Divisibility seems like such a simple idea; if a divides b (which is denoted as a | b) then ab must be an
integer. However, this falls apart once we start introducing 0 into the equation. For the purpose of letting
our definition stay consistent when 0 is introduced, we say that integers a | b if there exists integer c such
that ac = b. (We specify a, b as integer for our useful results to stay consistent.)
Authors:
naman12
freeman66
Date:
For:
AoPS P M N Q
This means that all a | 0 and 0 - b for all b 6= 0, implying 0 | 0. (Verify this for yourself.)
May 26, 2020
§ 1.2 Results
Our definition of divisibility leaves us with some helpful results. A
Fact 1 (Divisibility Results)
Modular Arithmetic
Q
X
O
B C
Definition 1 (Modular Congruence) We say a ≡ b (mod n) if and only if n | a − b.
The intuitive way to think about this is that a and b have the same remainder when divided by n.
(Remember that negative numbers also have a remainder when divided.)
B D E C
Y
E2
Definition 2 (Modular Residue) We say the residue of an integer a (mod n) is the integer b that satisfies L
F 0≤b<n
F a ≡ b (mod n).
Yet another beauty by Evan. Yes, you can solve this with trigonometry.
It can be helpful to think of b as the remainder of a when divided by n.
“I was trying to unravel the complicated trigonometry of the radical thought that silence could make up the
F1
1 greatest lie ever told.” - Pat Conroy
There aren’t picture for these, since they are more technical:
More fun
There aren’t picture for these, since they are more technical:
VON by Evan Chen, an olympiad problem database written in
Python, but prints out documents in LATEX
More fun
There aren’t picture for these, since they are more technical:
VON by Evan Chen, an olympiad problem database written in
Python, but prints out documents in LATEX
Napkin by Evan Chen, an open source math textbook written
in LATEX
More fun
There aren’t picture for these, since they are more technical:
VON by Evan Chen, an olympiad problem database written in
Python, but prints out documents in LATEX
Napkin by Evan Chen, an open source math textbook written
in LATEX
Dynamic Programming in Computing Contests by Arpan
Banerjee, a book on dynamic programming written in LATEX
More fun
There aren’t picture for these, since they are more technical:
VON by Evan Chen, an olympiad problem database written in
Python, but prints out documents in LATEX
Napkin by Evan Chen, an open source math textbook written
in LATEX
Dynamic Programming in Computing Contests by Arpan
Banerjee, a book on dynamic programming written in LATEX
An Introduction to USACO by Darren Yao, a beginner’s guide
to USACO written in LATEX; the cover was designed by me (in
LATEX, of course)
More fun
There aren’t picture for these, since they are more technical:
VON by Evan Chen, an olympiad problem database written in
Python, but prints out documents in LATEX
Napkin by Evan Chen, an open source math textbook written
in LATEX
Dynamic Programming in Computing Contests by Arpan
Banerjee, a book on dynamic programming written in LATEX
An Introduction to USACO by Darren Yao, a beginner’s guide
to USACO written in LATEX; the cover was designed by me (in
LATEX, of course)
As you can tell, Evan Chen loves LATEX.
Table of Contents
7 Parting words
Google
Further Reading
Google
idk