Writing mathematical proofs that hold up: choosing direct, contradiction, contrapositive, induction, strong induction, cases, construction, or uniqueness structure, stating assumptions cleanly, checking every step, and clean LaTeX conventions with worked proofs at three difficulty levels. Use when someone asks to prove a statement, write or fix a proof, choose a proof method, check a proof for gaps, or format proofs in LaTeX.
name: "proof_writing" description: "Writing mathematical proofs that hold up: choosing direct, contradiction, contrapositive, induction, strong induction, cases, construction, or uniqueness structure, stating assumptions cleanly, checking every step, and clean LaTeX conventions with worked proofs at three difficulty levels. Use when someone asks to prove a statement, write or fix a proof, choose a proof method, check a proof for gaps, or format proofs in LaTeX." metadata: { "includeInPrompt": true }
Proof Writing
Purpose
Write proofs that a skeptical reader can follow line by line and cannot poke a hole in. The core skill is matching the logical form of the goal to a proof structure, then writing each step so its justification is visible. This skill covers the standard structures, a step checking pass, common failure modes, and plain LaTeX conventions. Worked proofs at three levels live in references/worked-proofs.md. Pattern cards live in references/proof-patterns.md.
Workflow
1. Restate the claim before proving anything
Write out, in your own scratch work:
- The givens: what objects, what types, what hypotheses, with quantifiers explicit.
- The goal: what exactly must be shown, with quantifiers explicit.
- Every definition the claim uses, unfolded. Most stuck proofs are stuck on an unfolded definition, not on logic.
- What a counterexample would look like. If you can describe one clearly and cannot rule it out, the claim may be false. Try small cases first.
Example of unfolding: "n is even" means there is an integer k with n = 2k. "n is odd" means n = 2k + 1 for some integer k. "a divides b" means b = a k for some integer k. Write the proof in those terms.
2. Pick the structure from the form of the goal
Use references/proof-patterns.md for full cards. Short version:
- Goal is P implies Q, and Q looks reachable from P: direct. Assume P, derive Q.
- Goal is P implies Q, and not Q is easier to work with than P: contrapositive. Assume not Q, derive not P. The contrapositive is logically equivalent to the original, so this is a complete proof.
- Goal is a negative statement, an irrationality claim, an impossibility, or an infinitude claim: contradiction. Assume the goal is false, derive a statement and its negation.
- Goal is a statement P(n) for all natural numbers n, or all n at or past a starting point: induction. Prove the base case, then assume P(k) and prove P(k + 1).
- Same setting, but the step for k + 1 needs more than just P(k), for example it splits k + 1 into smaller pieces: strong induction. Assume P for all values up to k, prove P(k + 1).
- Goal splits naturally on a property such as parity, sign, or size: cases. List cases that cover every possibility, prove the goal in each one, and say why the list is exhaustive.
- Goal says something exists: construction if you can name the object and verify it works, or a nonconstructive argument (often cases or contradiction) if you cannot name it.
- Goal says exactly one object has a property: existence plus uniqueness. Assume two objects have the property and prove they are equal.
- Goal is an if and only if: prove both directions, and label each direction so the reader can see both were done.
- Goal is a universal claim you suspect is false: do not prove it. Find one counterexample and verify it.
Try direct first for two minutes. If the algebra or logic stalls, switch structures instead of pushing harder on a blocked path.
3. Write the skeleton, then fill it
Write the first and last lines first. They are fixed by the structure:
- Direct: "Assume [P]." ... "Therefore [Q]."
- Contrapositive: "We prove the contrapositive. Assume [not Q]." ... "Therefore [not P], so [P implies Q]."
- Contradiction: "Suppose for contradiction that [goal is false]." ... "This contradicts [fact], so [goal]."
- Induction: "We prove by induction on n. Base case: ..." "Inductive step: let k be arbitrary, assume [P(k)]. Then ..."
- Construction: "Let [object] be [explicit description]. Then [verification]."
Then fill the middle one justified step at a time. Each step should follow from the givens, a definition, a named earlier result, or a previous step. If you cannot name the justification in the margin, the step is a gap.
4. Run the checking pass
Before calling a proof done, check:
- Quantifiers: did you prove it for an arbitrary object, or only for a convenient example? An example never proves a for all claim.
- Direction: did you assume the conclusion anywhere, or prove the converse instead of the claim? Both are fatal and both are common.
- Division and cancellation: every divisor is shown to be nonzero, every cancelled factor is shown to be nonzero.
- Theorem use: every result you cite has all of its hypotheses satisfied here. Name them and check them.
- Cases: the cases cover everything, with no gap at the boundaries.
- Induction: the base case matches the starting point of the claim, the inductive hypothesis is stated for a fixed but arbitrary k, and the step actually uses the hypothesis.
- Endpoints: the first line matches the structure you announced, and the last line is exactly the goal, not a nearby statement.
- Definitions: every term is used with the meaning it was defined with, all the way through.
For the numeric claims in the worked examples, run the bundled checker: python3 ~/workspace/skills/proof-writing/bin/proof_check.py. A finite check catches algebra slips. It never replaces the proof itself.
5. Format it cleanly
State the claim as a theorem, proposition, or lemma before the proof. Keep one idea per paragraph inside the proof. Put displayed equations on their own lines when a step turns on them. End with the goal restated or a clear therefore line. LaTeX specifics are in references/latex-and-checklist.md: use the amsthm proof environment, \qedhere when a proof ends in displayed math, and \theoremstyle to set theorem, definition, and remark styles.
Output Contract
- A finished proof: the claim stated cleanly, the structure named in the first line, every step justified, and the goal reached explicitly at the end.
- When teaching: one structure at a time, one worked proof read line by line, then a second proof for the learner to skeleton before filling in.
- When reviewing a proof: list gaps in order, each tied to a specific line, and say whether the gap is fixable with a step or whether the approach itself fails.
- When a claim is false: say so, give a verified counterexample, and stop. Do not dress up a broken proof.
Operating Rules
- Never present a proof with a step you have not checked. If a step is a standard result, name it. If you cannot justify a step, mark the proof as a sketch and say which step is missing.
- Never use an example as a proof of a universal claim, and never use the claim itself as a step. Checking cases can build intuition and can refute a claim, and that is all it can do for a for all statement.
- Keep the scratch work and the final proof separate. The final proof reads forward from givens to goal, even if you found it by working backward from the goal.
- Prefer the weakest structure that works. Direct beats contrapositive, contrapositive beats contradiction, weak induction beats strong induction, when each one actually reaches the goal. A simpler structure is easier to check and easier to trust.
- Write "without loss of generality" only when the other case really is the same argument with names swapped, and say what the symmetry is.
- In LaTeX, let amsthm place the QED symbol. Add
\qedhere inside the final displayed equation or list instead of forcing the symbol onto a new line by hand.
No ratings yet — be the first to rate it.