long-form-math
Write mathematics in a long-form, understanding-focused style with detailed proofs and rich exposition. Use when explaining mathematical concepts, writing proofs, tutoring math, creating educational math content, or when the user asks for mathematical explanations. Inspired by Jay Cummings' Real Analysis and Chartrand's Mathematical Proofs. Triggers on proof writing, theorem explanations, mathematical exposition, or math tutoring.
What this skill does
# Long-Form Mathematics
Write mathematics the way the best textbooks do: with motivation, intuition, scratch work, and post-proof reflection. Every proof tells a story. Every definition earns its place.
## When to Use
- Writing or explaining proofs
- Introducing mathematical definitions, theorems, or concepts
- Tutoring someone in mathematics
- Creating educational math content (lecture notes, textbook-style explanations)
- Answering "why" questions about mathematical results
- Working through problem sets with a student
## Core Philosophy
| Principle | Meaning |
|-----------|---------|
| Understanding over economy | A longer explanation that builds understanding beats a terse proof that sacrifices clarity |
| Show the thinking | Make the invisible reasoning process visible -- scratch work, false starts, technique selection |
| Words between symbols | Never present bare equation chains; every step gets connective text explaining WHY |
| Math is communication | Writing quality matters as much as correctness; the reader must be convinced AND enlightened |
## Proof Writing Workflow
Every proof follows three phases. Do not skip phases 1 and 3.
### Phase 1: Pre-Proof Strategy
Before writing the proof, show the reader how the proof was discovered.
**Scratch Work.** Work backward from the desired conclusion. Show the exploratory reasoning that reveals what to prove and how. Label this section explicitly.
> Example: "We want to show |a_n - 0| < e. Unraveling, this means 1/n < e, so n > 1/e. This tells us to pick N = ceil(1/e)."
**Technique Selection.** State which proof technique to use and WHY.
| Try this technique... | When... |
|----------------------|---------|
| Direct proof | The hypothesis gives enough structure to reach the conclusion |
| Contrapositive | The hypothesis yields a complicated expression; starting from ~Q is simpler |
| Contradiction | The result sounds "negative" (no, never, impossible, does not exist) |
| Construction | The result asserts existence ("there exists...") |
| Cases | The domain splits naturally (even/odd, positive/negative/zero) |
| Both directions | The result is biconditional ("if and only if") |
**Proof Idea.** For long proofs, give a plain-English summary of the high-level strategy before diving into details.
> Example: "The idea is to show |a - b| < e for all e > 0, forcing |a - b| = 0."
### Phase 2: The Proof
Write the polished proof following these structural rules:
1. **State assumptions first.** Open with "Assume that..." or "Let... be..."
2. **Type every variable.** When introducing k, say "where k is an integer." Never leave a variable untyped.
3. **Justify each step.** Explain WHY each step is taken, not just WHAT happens. Use phrases like "By [theorem]...", "Since [established fact]...", "By definition of..."
4. **Words between equations.** Connect every equation to the next with explanatory text. Vary transitional words: therefore, thus, hence, consequently, so, it follows that.
5. **Conclude explicitly.** End by stating what has been shown: "Therefore n^2 is even, as desired."
**Correct pattern:**
> Since x is even, we can write x = 2k for some integer k. Then x^2 = (2k)^2 = 4k^2 = 2(2k^2). Since 2k^2 is an integer, it follows that x^2 is even.
**Incorrect pattern:**
> x = 2k
> x^2 = 4k^2 = 2(2k^2)
> Therefore x^2 is even.
The incorrect version is a bare equation chain with no connective text and no typing of variables.
### Phase 3: Post-Proof Analysis
After the proof, reflect on it.
- **The Moral.** State what the result teaches us in plain English. ("The moral: two sets can have the same size even though one is a proper subset of the other.")
- **Could it be simpler?** If a more elegant proof exists, show it.
- **Alternative approaches.** If a different technique illuminates a different aspect, present it.
- **Reverse engineering.** Show how the polished proof was constructed from scratch work -- how we went from goal-backward exploration to hypothesis-forward presentation.
## Exposition Patterns
When introducing a new topic or definition, follow this sequence:
### The Introduction Sequence
```
Motivating problem --> Intuition --> Formal definition --> Examples + Non-examples
```
1. **Motivating problem first.** Open with a paradox, puzzle, question, or historical problem that creates NEED for the concept. Never open with a bare definition.
> "So, what do you think? Does slow and steady win the race? Zeno's paradox tells us..."
2. **Intuition before formalism.** Give the informal idea first. Build understanding of what the definition captures before stating it precisely.
> "What the definition means is that eventually the points get 'arbitrarily close' to a."
3. **Formal definition.** Now state the precise definition. The reader is ready for it.
4. **Examples and non-examples.** Immediately follow with concrete examples that satisfy the definition AND examples that fail it, explaining why they fail.
> "The integers Z almost form a field; they only fail the second half of Axiom 5."
### Additional Exposition Techniques
- **Questions that drive investigation.** Pose numbered questions that structure sections around intellectual curiosity. ("Does there exist a function continuous at one point but not at another?")
- **Historical storytelling.** Weave mathematical history into the exposition as narrative, not sidebar decoration. The story of Hippasus and the irrationals, Cantor and infinity, Archimedes and exhaustion -- these ARE the exposition.
- **Progressive disclosure.** Reference future topics: "We will come back to this." Build concepts incrementally. State a "moral" after each result, with each moral slightly more surprising than the last.
- **The almost-correct proof.** Show a proof attempt that fails, diagnose WHY it fails, then fix it. This teaches more than a perfect proof alone.
- **Investigation tables.** Create tables with "???" entries that get filled in as the exposition progresses, giving the reader an ongoing investigation to follow.
## Mathematical Writing Rules
Quick reference for clean mathematical prose. These rules apply to ALL mathematical writing in this style.
### Symbol Rules
| Rule | Bad | Good |
|------|-----|------|
| Never start a sentence with a symbol | "x^2 - 6x + 8 = 0 has two roots." | "The equation x^2 - 6x + 8 = 0 has two roots." |
| Separate adjacent symbols with words | "With the exception of a, b is the only root." | "With the exception of a, the number b is the only root." |
| Use words, not logical shorthand | "forall x, exists y s.t. ..." | "For every x, there exists a y such that..." |
| Explain every new symbol | "Then n = 2k + 1." | "Then n = 2k + 1, where k is an integer." |
| Use frozen symbols conventionally | Using m for a function | Use m, n for integers; f, g for functions; A, B for sets |
| Use consistent symbol families | "x = 2a and y = 2r" | "x = 2a and y = 2b" (or "x = 2r and y = 2s") |
### Language Rules
| Rule | Bad | Good |
|------|-----|------|
| Use "we" as default pronoun | "I will now show..." | "We will now show..." |
| Avoid "clearly/obviously" | "Clearly, n^2 is positive." | "Since n is nonzero, n^2 is positive." |
| Use "each/every" not "any" | "For any integer n..." | "For every integer n..." |
| Never use "Since...then" | "Since n is odd, then n^2 is odd." | "Since n is odd, it follows that n^2 is odd." |
| "Since" = established fact | "If n is odd" (when n is already known odd) | "Since n is odd" (for established facts) |
| Vary connective words | "Therefore... Therefore... Therefore..." | "Therefore... Thus... It follows that... Hence..." |
| Write complete sentences | Bare equation with no punctuation | Every equation is part of a sentence, ending with a period |
### Formatting Rules
- **Inline vs. display:** Short expressions inline; long expressions as centered displays.
- **Line breaks:** When breaking an expression, end the first line with the operator (+, -, =, <).
- *Related in Writing & Docs
jax-development
IncludedUse this skill when the user is writing, debugging, profiling, refactoring, reviewing, benchmarking, parallelising, exporting, or explaining JAX code, or when they mention JAX, jax.numpy, jit, grad, value_and_grad, vmap, scan, lax, random keys, pytrees, jax.Array, sharding, Mesh, PartitionSpec, NamedSharding, pmap, shard_map, Pallas, XLA, StableHLO, checkify, profiler, or the JAX repo. It helps turn NumPy or PyTorch-style code into pure functional JAX, fix tracer/control-flow/shape/PRNG bugs, remove recompiles and host-device syncs, choose transforms and sharding strategies, inspect jaxpr/lowering/IR, and benchmark compiled code correctly.
nature-article-writer
IncludedDrafts, rewrites, diagnostically critiques, and style-calibrates primary research manuscripts for Nature and Nature Portfolio journals. Use when the user wants a Nature-style title, summary paragraph or abstract, introduction, results, discussion, methods, figure legends, presubmission enquiry, cover letter, reviewer response, or when a scientific draft sounds generic, jargon-heavy, structurally weak, or AI-ish and needs precise, broad-reader-friendly prose without inventing data, analyses, or references. Best for primary research articles and letters rather than reviews or press releases unless explicitly adapting one.
deckrd
IncludedDocument-driven framework that derives requirements, specifications, implementation plans, and executable tasks from goals through structured AI dialogue. Use when user says "write requirements", "create spec", "plan implementation", "derive tasks", "structure this feature", "break down into tasks", or "document this module". Also use for reverse engineering existing code into docs (/deckrd rev). Do NOT use for direct code writing — use /deckrd-coder after tasks are generated. Do NOT use when the user only wants to run or fix existing code without planning.
clinical-decision-support
IncludedGenerate professional clinical decision support (CDS) documents for pharmaceutical and clinical research settings, including patient cohort analyses (biomarker-stratified with outcomes) and treatment recommendation reports (evidence-based guidelines with decision algorithms). Supports GRADE evidence grading, statistical analysis (hazard ratios, survival curves, waterfall plots), biomarker integration, and regulatory compliance. Outputs publication-ready LaTeX/PDF format optimized for drug development, clinical research, and evidence synthesis.
handling-sf-data
IncludedSalesforce data operations with 130-point scoring. Use this skill to create, update, delete, bulk import/export, generate test data, and clean up org records using sf CLI and anonymous Apex. TRIGGER when: user creates test data, performs bulk import/export, uses sf data CLI commands, needs data factory patterns for Apex tests, or needs to seed/clean records in a Salesforce org. DO NOT TRIGGER when: SOQL query writing only (use querying-soql), Apex test execution (use running-apex-tests), or metadata deployment (use deploying-metadata).
accelint-ac-to-playwright
IncludedConvert and validate acceptance criteria for Playwright test automation. Use when user asks to (1) review/evaluate/check if AC are ready for automation, (2) assess if AC can be converted as-is, (3) validate AC quality for Playwright, (4) turn AC into tests, (5) generate tests from acceptance criteria, (6) convert .md bullets or .feature Gherkin files to Playwright specs, (7) create test automation from requirements. Handles both bullet-style markdown and Gherkin syntax with JSON test plan generation and validation.