math-typst/source/manual.typ

58 lines
1.9 KiB
Plaintext

#import "template/template.typ": *
#show: paper => configuration(
title: "Short guide to math-typst.",
authors: (
(
name: "Orca",
affiliation: "git.disroot.org/orca/math-typst",
email: "orcinus_orca@disroot.org",
),
),
abstract: "This PDF explains how to use math-typst.",
paper
)
= Introduction
This packages aims to provide a good enough interface for writing a mathematical course in it.
As of now, it consists of the most used mathematical environments in courses #footnote[The environments provided are: `proposition`, `lemma`, `theorem`, `corollary`,
`definition`, `remark`, `example`, `exercise`, `proof`, and `numbered-equation`.].
= How to use
With the exception of `proof`, environments behave like `theorem`. Simply type the environment name followed by it's body
in square brackets. You may name the particular environment by appending `(name: "The name")` after the environment name.
== Example
#theorem(name: "Orca")[
Let $P in ZZ[X]$ and $N in NN^*$ be such that for all $n in NN$, if $n >= N$, then $P(n)$ is prime.
We have that $P$ is constant.
] <orca>
#proof[
Let's consider
$ P: x |-> sum_(i = 0)^(deg P) a_i x^i, " with " a_i in ZZ " for " i in [|0, deg P|]. $
Suppose there exists $N in NN^*$ such that for all $n >= N$, $P(n)$ is prime.
We have, for $alpha, beta in NN^*$,
#numbered-equation(name: "E")[
$ P(alpha + beta) = P(alpha) + k beta, " with " k in ZZ $
] <eq>
The equation @eq follows from the definition of $P$ and the binomial theorem.
In particular, if $alpha >= N$ and $beta = n abs(P(alpha))$ with $n in NN^*$, then $P(alpha)$ divides $P(alpha + beta)$.
Since they're both primes, we have $epsilon P(alpha) = P(alpha + beta)$, with $epsilon in {-1, 1}$ and $n$ a variable.
We then find that $P - epsilon P(alpha)$ cancels an infinite amount of times, showing that $P$ is constant.
]
Unfortunately, it seems like the theorem @orca is not useful at all.