Compare commits

..

7 Commits

Author SHA1 Message Date
095d85d4ef DRAFT
All checks were successful
CI / Typos (pull_request) Successful in 13s
CI / Typst formatting (pull_request) Successful in 6s
CI / Build (pull_request) Successful in 4m50s
2025-01-23 12:54:47 -08:00
ede934369b Add local typst packages
All checks were successful
CI / Typst formatting (push) Successful in 15s
CI / Typos (push) Successful in 18s
CI / Build (push) Successful in 13m16s
2025-01-23 10:29:13 -08:00
3b41ea714a Added "Tropical Polynomials" handout 2025-01-23 10:29:07 -08:00
7597343fe3 Scripts and CI 2025-01-22 21:01:26 -08:00
540e34d9bd Warm-ups 2025-01-22 21:00:44 -08:00
80eef6b7dc Intermediate handouts
missing files
2025-01-22 21:00:44 -08:00
dd4abdbab0 Advanced handouts
Add missing file
Co-authored-by: Mark <mark@betalupi.com>
Co-committed-by: Mark <mark@betalupi.com>
2025-01-22 21:00:44 -08:00
13 changed files with 38 additions and 19 deletions

View File

@ -1,4 +1,5 @@
{
"latex-workshop.latex.recipe.default": "latexmk (xelatex)",
"tinymist.formatterPrintWidth": 80
"tinymist.formatterPrintWidth": 80,
"tinymist.typstExtraArgs": ["--package-path=./lib/typst"]
}

3
authors.toml Normal file
View File

@ -0,0 +1,3 @@
[authors."mark"]
email = "mark@betalupi.com"
webpage = "betalupi.com"

View File

@ -1,3 +1,5 @@
/// Typst handout library, used for all documents in this repository.
/// If false, hide instructor info.
///
@ -238,8 +240,8 @@
set page(
margin: 20mm,
width: 8.5in,
height: 11in,
width: 8in,
height: 11.5in,
footer: align(
center,
context counter(page).display(),

View File

@ -0,0 +1,6 @@
[package]
name = "handout"
version = "0.1.0"
entrypoint = "handout.typ"
authors = []
license = "GPL"

View File

@ -1,4 +1,4 @@
#import "./handout.typ": *
#import "@local/handout:0.1.0": *
#import "@preview/cetz:0.3.1"

View File

@ -1,4 +1,4 @@
#import "./handout.typ": *
#import "@local/handout:0.1.0": *
#show: doc => handout(
doc,

View File

@ -1,4 +1,4 @@
#import "../handout.typ": *
#import "@local/handout:0.1.0": *
#import "../macros.typ": *
= Tropical Arithmetic
@ -62,8 +62,7 @@ Let's expand $#sym.RR$ to include a tropical additive identity.
#problem()
Do tropical additive inverses exist? \
#note([
Is there an inverse $y$ for every $x$ so that $x #tp y = #sym.infinity$? \
Remember that $#sym.infinity$ is the additive identity.
Is there an inverse $y$ for every $x$ so that $x #tp y = #sym.infinity$?
])
#solution([
@ -278,7 +277,7 @@ Fill the following tropical addition and multiplication tables
#problem()
Expand and simplify $f(x) = (x #tp 2)(x #tp 3)$, then evaluate $f(1)$ and $f(4)$ \
#hint([Adjacent parenthesis imply tropical multiplication])
Adjacent parenthesis imply tropical multiplication
#solution([
$

View File

@ -1,4 +1,4 @@
#import "../handout.typ": *
#import "@local/handout:0.1.0": *
#import "../macros.typ": *
#import "@preview/cetz:0.3.1"
@ -20,7 +20,7 @@ for some nonnegative integer $n$ and coefficients $c_0, c_1, ..., c_n$. \
The _degree_ of a polynomial is the largest $n$ for which $c_n$ is nonzero.
#theorem()
The _fundamental theorem of algebra_ states that any non-constant polynomial with real coefficients
The _fundamental theorem of algebra_ implies that any non-constant polynomial with real coefficients
can be written as a product of polynomials of degree 1 or 2 with real coefficients.
#v(2mm)
@ -30,8 +30,8 @@ can be written as $(x^2 + 2x+5)(x-2)(x+4)(x+4)$
#v(2mm)
A similar theorem exists for polynomials with complex coefficients. \
These coefficients may be found using the _roots_ of this polynomial. \
As you already know, there are formulas that determine the roots of quadratic, cubic, and quartic #note([(degree 2, 3, and 4)]) polynomials. There are no formulas for the roots of polynomials with larger degrees---in this case, we usually rely on appropriate roots found by computers.
These coefficients may be found using the roots of this polynomial. \
As it turns out, there are formulas that determine the roots of quadratic, cubic, and quartic #note([(degree 2, 3, and 4)]) polynomials. There are no formulas for the roots of polynomials with larger degrees---in this case, we usually rely on approximate roots found by computers.
#v(2mm)
In this section, we will analyze tropical polynomials:
@ -100,7 +100,7 @@ In other words, find $r$ and $s$ so that
),
)
#note([Naturally, we will call $r$ and $s$ the _roots_ of $f$.])
we will call $r$ and $s$ the _roots_ of $f$.
#solution([
Because $(x #tp r)(x #tp s) = x^2 #tp (r #tp s)x #tp s r$, we must have $r #tp s = 1$ and $r #tm s = 4$. \
@ -116,8 +116,7 @@ In other words, find $r$ and $s$ so that
#v(1fr)
#problem()
Can you see the roots of this polynomial in the graph? \
#hint([Yes, you can. What "features" do the roots correspond to?])
How can we use the graph to determine these roots?
#solution([The roots are the corners of the graph.])
@ -317,7 +316,7 @@ into linear factors.
#v(2mm)
Whenever we say "the roots of $f$", we really mean "the roots of $accent(f, macron)$." \
Also, $f$ and $accent(f, macron)$ might be the same polynomial.
$f$ and $accent(f, macron)$ might be the same polynomial.
#problem()
If $f(x) = a x^2 #tp b x #tp c$, then $accent(f, macron)(x) = a x^2 #tp B x #tp c$ for some $B$. \

View File

@ -1,4 +1,4 @@
#import "../handout.typ": *
#import "@local/handout:0.1.0": *
#import "../macros.typ": *
#import "@preview/cetz:0.3.1"

Binary file not shown.

Binary file not shown.

View File

@ -4,3 +4,8 @@ title = "Odd Dice"
[publish]
handout = true
solutions = true
[[attribution]]
who = "mark"
when = 2024-02-13
what = "Initial version of handout"

View File

@ -143,10 +143,12 @@ def build_typst(source_dir: Path, out_subdir: Path) -> IndexEntry | None:
[
TYPST_PATH,
"compile",
"--package-path",
f"{ROOT}/lib/typst",
"--ignore-system-fonts",
"main.typ",
"--input",
"show_solutions=false",
"main.typ",
f"{out}/{handout_file}",
],
cwd=source_dir,
@ -164,6 +166,8 @@ def build_typst(source_dir: Path, out_subdir: Path) -> IndexEntry | None:
[
TYPST_PATH,
"compile",
"--package-path",
f"{ROOT}/lib/typst",
"--ignore-system-fonts",
"main.typ",
f"{out}/{solutions_file}",