math-olympiad
Solve competition math problems (IMO, Putnam, USAMO, AIME) with adversarial verification that catches the errors self-verification misses. Activates when asked to 'solve this IMO problem', 'prove this olympiad inequality', 'verify this competition proof', 'find a counterexample', 'is this proof correct', or for any problem with 'IMO', 'Putnam', 'USAMO', 'olympiad', or 'competition math' in it. Uses pure reasoning (no tools) — then a fresh-context adversarial verifier attacks the proof using specific failure patterns, not generic 'check logic'. Outputs calibrated confidence — will say 'no confident solution' rather than bluff. If LaTeX is available, produces a clean PDF after verification passes.
What this skill does
# Math Olympiad Solver ## The five things that change outcomes 1. **Strip thinking before verifying** — a verifier that sees the reasoning is biased toward agreement. Fresh context, cleaned proof only. 2. **"Does this prove RH?"** — if your theorem's specialization to ζ is a famous open problem, you have a gap. Most reliable red flag. 3. **Short proof → extract the general lemma** — try 2×2 counterexamples. If general form is false, find what's special about THIS instance. 4. **Same gap twice → step back** — the case split may be obscuring a unified argument. Three lines sometimes does what twelve pages couldn't. 5. **Say "no confident solution"** — wrong-and-confident is worse than honest abstain. --- **Tool policy**: Solvers and verifiers use THINKING ONLY in the tight-budget workflow. Competition math is reasoning. Computation is for deep mode (§6c), and even then bounded — a recurrence that's doubly-exponential can't be computed past n~30, work mod 2^m instead. --- ## When to use which approach | Problem | Approach | Verification | | ---------------------------------------------------- | ------------------------------------------------------------------------------ | ------------------------- | | AIME numeric answer | Best-of-N → majority vote | Answer check only | | Olympiad proof (IMO/Putnam/USAMO) | Full workflow below | 5-pass adversarial | | "Is this proof correct?" | Skip to verification (step 4) | Adversarial + spec-gaming | | **Full problem set** (e.g. all 6 from a competition) | Sequential: one full workflow per problem, collect results, compile single PDF | Per-problem adversarial | **Batch in one Workflow**: Set `opts.label` on every `agent()` call to include the problem ID (e.g., `label: "P3:solver:2"`). Without labels, 36 results come back with no problem association. Run problems in parallel — the label is what matters, not ordering. ### For a full problem set Launch one solver workflow per problem (same VERBATIM prompt, different statement). Run them in parallel. When all return, run adversarial verification per problem. Problems that pass get their proof in the PDF; problems that abstain get "No confident solution" with partial notes. Don't try to solve all N problems in one agent's context — each problem needs its own thinking budget and its own fresh-context verifier. The composition is mechanical: collect the per-problem outputs, fill in LaTeX sections, compile once. | "Simplify this proof" | Skip to presentation (step 8) | — | --- ## The Workflow ### 1. Interpretation check (30 seconds, catches 50/63 of one class of errors) Before solving anything, identify the interpretation. > Read the problem statement. List 2-3 ways it could be interpreted. For each: > is this reading TRIVIAL? If one reading makes the problem easy and another > makes it hard, the hard one is almost certainly intended. State which > interpretation you're solving and WHY you believe it's the intended one. The Aletheia case study found 50 of 63 "technically correct" solutions were for the wrong interpretation. Olympiad problems often have a trap easy reading. ### 2. Generate candidates with internal refinement (parallel, thinking only) Launch 8-12 attempt agents in parallel. **Each agent internally iterates** — solve → self-improve → self-verify → correct → repeat. This is the Yang-Huang structure that achieves 85.7% on IMO: one-shot solving isn't enough; per-attempt refinement matters. **The Agent tool cannot enforce tool restriction.** Subagents get the full tool set. The only mechanism is the prompt. Use this prompt VERBATIM — do not summarize, do not synthesize your own: ``` NO COMPUTATION. Do not use Bash, Python, WebSearch, Read, Write, or any tool that runs code or fetches data. Numerical verification is not a proof step. "I computed n=1..10 and the pattern holds" is not a proof. (If your agent harness requires a StructuredOutput or similar return-mechanism tool call, that is NOT a computation tool — call it to return your answer. The restriction is on tools that DO work, not tools that REPORT work.) Your internal process (iterate until done): - Solve: Complete rigorous solution. - Self-improve: Reread. Fix gaps before a grader sees it. - Self-verify: Strict grader mode. Every step justified? - Correct: Fix and re-verify. Up to 5 rounds. - Stop: Self-verify passes twice clean, OR 5 rounds, OR approach fundamentally wrong. A correct answer from flawed reasoning is a failure. If incomplete, say so honestly. Never hide gaps. PROBLEM: <insert the problem statement here> ANGLE: <insert one starting angle here> ``` The first two paragraphs are load-bearing. A session that writes its own prompt and omits them will produce subagents that grind Python for 30 iterations and confidently get wrong answers — a pattern that fits n≤10 but fails at n=100 is not a proof. Starting angles (vary across agents — see `references/solver_heuristics.md`): - Work out small cases (test past n=3) - Look for an invariant or monovariant - Consider the extremal case - Try induction - What symmetries? - Work backwards - Drop a condition — where does it become trivially false? - Generalize (inventor's paradox — more structure is sometimes easier) Each returns its FINAL state (not intermediate rounds): ``` **Verdict**: complete solution | partial result | no progress **Rounds**: [how many verify→correct cycles] **Method**: [key idea, one paragraph] **Detailed Solution**: [full step-by-step, every step justified] **Answer**: [if applicable] **Self-verification notes**: [what you caught and fixed; remaining concerns] ``` **Retry policy**: If an agent fails or times out, retry once. Transient failures happen. ### 3. Clean the solution (context isolation — the #1 lever) The thinking trace biases the verifier toward agreement — a long chain of reasoning reads as supporting evidence even when the conclusion is wrong. Before any verification, strip: - All thinking-block content - All "Let me try..." / "Actually wait..." / "Hmm" prose - All false starts and backtracking What remains: problem statement + clean final argument only. Extract only the **Method** + **Proof** + **Answer** sections from each solver's output. The verifier never sees how the solver got there. ### 4. Adversarial verify (fresh context, pattern-armed) For each cleaned solution, launch a fresh verifier agent. **Fresh context**: it sees only (problem statement + cleaned solution). **No tools.** The verifier's job is to ATTACK, not grade. Load `references/adversarial_prompts.md` for the prompts. The key patterns it runs: | Pattern | The check | | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | **#4** | Does this theorem specialize to a famous object (ζ, quadratic reciprocity, etc.) and prove something open about it? → gap | | **#18** | Substitute the proof's own intermediate identities into any "remaining gap." Recover the original claim? → tautological | | **#40** | Is any step a "one-line lemma"? Extract the GENERAL form. Find a 2×2 counterexample. If the general form is false, find what special structure saves THIS instance | | **#5** | For each invoked theorem: re-check hypotheses FROM SCRATCH. "Continuous on [0,1]" ≠ "contin
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.