Use when writing or improving a problem-def entry in the Typst paper (docs/paper/reductions.typ)
Full authoring guide for writing a problem-def entry in docs/paper/reductions.typ. Covers formal definition, background, examples with visualization, and verification.
Note: This content is also inlined in
add-modelStep 6 (condensed form). This standalone version has more detail and is useful for improving existing entries.
Before using this skill, ensure:
src/models/<category>/<name>.rs)src/example_db/model_builders.rscargo run --example export_graph && cargo run --example export_schemas)MaximumIndependentSet in docs/paper/reductions.typ is the gold-standard model example. Search for problem-def("MaximumIndependentSet") to see the complete entry. Use it as a template for style, depth, and structure.
problem-def Function#problem-def("ProblemName")[
Formal definition... // parameter 1: def
][
Background, example, figure... // parameter 2: body
]
Three parameters:
name (string) — problem name matching display-name dictionary keydef (content) — formal mathematical definitionbody (content) — background, examples, figures, algorithm listAuto-generated between def and body:
declare_variants! metadata)Add to the display-name dictionary near the top of reductions.typ:
"ProblemName": [Display Name],
def parameter)One self-contained sentence or short paragraph. Requirements:
Given [inputs with domains], find [solution variable] [maximizing/minimizing] [objective] such that [constraints].
Given [inputs with domains], find [solution variable] such that [constraints].
Given $G = (V, E)$ with vertex weights $w: V -> RR$, find $S subset.eq V$
maximizing $sum_(v in S) w(v)$ such that no two vertices in $S$ are
Edit PDFs with natural-language instructions using the nano-pdf CLI.