Goal and scope
(1) In a stated context for the integers, prove from explicit premises and rules the theorem T: for every integer n, 2∣(n²+n); then derive from T by contradiction that no integer n makes n²+n odd. (2) Test the claim C: 'for every natural number n, n²+n+41 is prime'; explain why the 40 positive cases n=0 to 39 do not constitute a proof, and refute C by the counterexample n=40.
Follows the MKO: a proof must derive the proposition within a stated context from accepted premises, definitions and earlier results by valid inference. The context is the ring operations and order of ℤ, divisibility and the division algorithm, and classical logic (G1). It illustrates direct proof, proof by cases, universal generalization, proof by contradiction, and refuting a universal statement by one counterexample. It is not formalized, Lean is not run, and the canonical MKO and its English edition are not changed.
Main derivation
S01 · definition
Before
\text{prove}\ TAfter
\text{premises of G1}\ +\ \text{valid rules}\ \Rightarrow\ TConditions: none
Rule: mko_proof · Uses: G1, G2
Leaf basis: mko_proof + def_intro
By the MKO, a proof derives the proposition within a stated context from accepted premises, definitions or earlier results by valid inference. So state first: the proposition is T (G2); the usable premises are the integer operations, order, definition of divisibility and division algorithm of G1; the usable inferences are the rules of classical logic. Every later step must name the premises and rules it uses.
S02 · theorem_application
Before
n\in\mathbb{Z}\ \text{arbitrary}After
n=2q+r,\ q,r\in\mathbb{Z},\ 0\le r<2Conditions: 2>0
Rule: division_algorithm · Uses: G1
Leaf basis: division_algorithm
Take an arbitrary integer n with no extra assumption (so that generalization is allowed at the end). By the division algorithm (a=n, b=2, and 2 is a positive integer) there are integers q, r with n=2q+r and 0≤r<2. This holds for negative integers too, for example −3=2·(−2)+1.
S03 · case_split
Before
0\le r<2,\ r\in\mathbb{Z}After
r=0\ \lor\ r=1
Conditions: none
Rule: int_no_gap · Uses: S02
Leaf basis: int_no_gap + order_basics + case_analysis
r is an integer with 0≤r<2. By int_no_gap (m=0), r≤0 or r≥1. If r≤0, together with 0≤r this gives r=0; if r≥1, int_no_gap (m=1) gives r≤1 or r≥2, and r<2 excludes the latter, so r=1. Hence r=0 or r=1, and the two cases cover every possibility.
S04 · equivalent
Before
r=0:\ n=2q
After
n^2+n=(2q)^2+2q=4q^2+2q
Conditions: none
Rule: power_laws · Uses: S03
Leaf basis: power_laws + eq_replace + numeric_evaluation
Case r=0: n=2q. Substituting gives n²+n=(2q)²+2q; by the exponent laws (2q)²=2²q²=4q², so n²+n=4q²+2q.
S05 · implies
Before
4q^2+2q
After
2(2q^2+q),\ \text{so}\ 2\mid n^2+nConditions: none
Rule: divides_def · Uses: S04
Leaf basis: distributive + divides_def + exists_intro
By distributivity 4q²+2q=2(2q²+q); 2q²+q is an integer (the integers are closed under addition and multiplication), so 2∣(n²+n) by the definition of divisibility.
S06 · equivalent
Before
r=1:\ n=2q+1
After
n^2+n=(2q+1)^2+(2q+1)=4q^2+6q+2
Conditions: none
Rule: L_odd_case · Uses: S03
Leaf basis: distributive + power_laws + add_assoc + add_comm + numeric_evaluation
Case r=1: n=2q+1. Substituting and expanding by Lemma L_odd_case gives n²+n=4q²+6q+2.
S07 · implies
Before
4q^2+6q+2
After
2(2q^2+3q+1),\ \text{so}\ 2\mid n^2+nConditions: none
Rule: divides_def · Uses: S06
Leaf basis: distributive + divides_def + exists_intro
By distributivity 4q²+6q+2=2(2q²+3q+1); 2q²+3q+1 is an integer, so 2∣(n²+n) by the definition of divisibility.
S08 · implies
Before
r=0\Rightarrow 2\mid n^2+n,\quad r=1\Rightarrow 2\mid n^2+n
After
2\mid n^2+n
Conditions: none
Rule: case_analysis · Uses: S03, S05, S07
Leaf basis: case_analysis
The two cases of S03 cover every possibility and both yield 2∣(n²+n), so by proof by cases 2∣(n²+n) for this arbitrary n.
S09 · implies
Before
2\mid n^2+n\ \text{for the arbitrary}\ nAfter
\forall n\in\mathbb{Z}:\ 2\mid n^2+n\quad(T)Conditions: none
Rule: forall_intro · Uses: S02, S08
Leaf basis: forall_intro
The n of S02 was arbitrary and S02 to S08 placed no extra assumption on it, so by universal generalization 2∣(n²+n) for every integer n: theorem T is proved.
S10 · implies
Before
\text{suppose}\ n^2+n=2m+1\ \text{for some}\ n,m\in\mathbb{Z}After
\neg\exists n,m\in\mathbb{Z}:\ n^2+n=2m+1Conditions: none
Rule: contradiction · Uses: S09, division_algorithm
Leaf basis: contradiction + division_algorithm + divides_def
By contradiction: suppose integers n, m satisfy n²+n=2m+1. By T (S09) there is also an integer k with n²+n=2k=2k+0. Then the single integer n²+n has two divisions by 2 with remainders 1 and 0, both satisfying 0≤r<2, contradicting uniqueness in the division algorithm. So no integer n makes n²+n odd. This is the method of contradiction the MKO describes: add the negation of the conclusion and derive a contradiction.
S11 · implies
Before
C:\ \forall n\in\mathbb{N},\ n^2+n+41\ \text{is prime}After
n^2+n+41\ \text{is prime for}\ 0\le n\le 39\ \text{(finite check only)}Conditions: none
Rule: numeric_evaluation · Uses: G3
Leaf basis: numeric_evaluation + prime_def
For n=0 to 39 compute n²+n+41 and test for primality (N5, a finite check at 40 integer points): all are prime. But C is a universal statement about all natural numbers and ℕ is infinite; these 40 positive cases neither show the domain is finite nor exhaust it, so they cannot establish C. This is exactly what the MKO's first paragraph says.
S12 · equivalent
Before
n=40:\ 40^2+40+41
After
1681=41\cdot 41
Conditions: none
Rule: numeric_evaluation · Uses: G3
Leaf basis: numeric_evaluation + distributive
Take n=40∈ℕ: 40²+40+41=1600+40+41=1681; and 41·41=1681. The structure is visible too: 40²+40+41=40·(40+1)+41=40·41+41=41·41.
S13 · implies
Before
1681=41\cdot 41
After
1681\ \text{is not prime}Conditions: none
Rule: prime_def · Uses: S12
Leaf basis: prime_def + divides_def + numeric_evaluation
41 is a positive divisor of 1681 (1681=41·41), and 41≠1 and 41≠1681. By the definition, 1681 has positive divisors other than 1 and itself, so 1681 is not prime.
S14 · implies
Before
40\in\mathbb{N},\ 40^2+40+41\ \text{not prime}After
\neg C
Conditions: none
Rule: quantifier_negation · Uses: S12, S13, G3
Leaf basis: quantifier_negation + exists_intro
n=40∈ℕ (40≥0) makes n²+n+41 not prime, so ∃n∈ℕ with n²+n+41 not prime, and by negation of quantifiers C is false. One valid counterexample refutes a universal statement, however many positive cases came before.
S15 · implies
Before
\text{conclusions of S09, S10, S11, S14}After
T\ \text{proved};\ C\ \text{refuted}Conditions: none
Rule: and_intro_elim · Uses: S09, S10, S11, S14
Leaf basis: and_intro_elim
T is derived from explicit premises by valid inference and holds for every integer (S09), and it follows that n²+n is never odd (S10). C has 40 positive cases (S11) yet is refuted by the single counterexample n=40 (S14). The first is a proof; the second shows that sampling is not proof.