Mathematical proof (source code)

= Mathematical proof
{wiki}

= Proof
{synonym}

A mathematical proof is a finite deductive argument from stated assumptions to a conclusion. It explains why the conclusion follows for every instance covered by its hypotheses. An informal <mathematical proof> can omit routine detail while making its assumptions and deductions clear; a <formal proof> expresses them in a specified formal language with specified inference rules. The distinction between assumptions, <propositions>, and deductions is introduced in https://web.mit.edu/neboat/Public/6.042/proofs.pdf[Leighton and Rubinfeld, What is a proof?, sections 1–3].

Checking examples can suggest a pattern, but need not establish a universally quantified claim. For example, the <polynomial> $n^2+n+41$ is a <prime number> for every <integer> $0\leq n\leq39$, as direct trial division verifies. At $n=40$ it equals $1681=41^2$, a <composite number>. Those first forty successes do not prove the claim for all <natural numbers>; one <counterexample> disproves it. The point is not to discard computation: it can find a conjecture, detect a mistake, or verify a finite exhaustive case analysis. The question is whether the cases checked cover the statement being claimed.

For a positive example, the sum of two <even integers> is even: writing them as $2a$ and $2b$ with $a,b\in\mathbb Z$ gives $2a+2b=2(a+b)$, and $a+b$ is an <integer>. This direct argument handles every allowed pair at once. A useful <mathematical proof> therefore does more than certify an answer: it exposes the mechanism and the exact assumptions that make the answer transferable.