Main derivation
S01 · definition
Before
c\ \text{is a valid counterexample to}\ \forall n\in U\,P(n)After
c\in U\ \land\ \neg P(c)
Conditions: none
Rule: mko_counterexample_def · Uses: G1, G2, mko_counterexample_def
Leaf basis: mko_counterexample_def
By the MKO, c is a valid counterexample to φ_U exactly when both hold: c lies in the domain U, and P(c) is false. The order of checking is domain eligibility first, then failure of the predicate.
S02 · equivalent
Before
m(10)=10^2+10+11
After
m(10)=121=11\cdot 11
Conditions: none
Rule: numeric_evaluation · Uses: G2
Leaf basis: numeric_evaluation
Exact computation: 10²+10+11=100+10+11=121, and 11·11=121.
S03 · implies
Before
m(10)=121=11\cdot 11
After
\neg P(10)
Conditions: 1<11<121; 11\mid 121
Rule: prime_def · Uses: S02, prime_def
Leaf basis: prime_def + divides_def + numeric_evaluation
121≥2, and a=11 satisfies 1<11<121 and 11∣121 (121=11·11). By the definition of prime, 121 is composite, so P(10) is false. The perfect square 121 is composite too; there is no exception.
S04 · implies
Before
0\le 10\le 12,\ \neg P(10)
After
10\in U\land\neg P(10)
Conditions: none
Rule: mko_counterexample_def · Uses: S01, S03, G1
Leaf basis: set_builder + mko_counterexample_def + and_intro_elim
Eligibility first: 10 is an integer with 0≤10≤12, so 10∈U by set-builder notation. Then failure: S03 gives ¬P(10). Both conditions hold, so 10 is a valid counterexample to φ_U.
S05 · implies
Before
10\in U\land\neg P(10)
After
\neg\forall n\in U\,P(n)
Conditions: none
Rule: mko_quantifier_neg · Uses: S04, exists_intro, mko_quantifier_neg
Leaf basis: exists_intro + mko_quantifier_neg
∃-introduction gives ∃n∈U ¬P(n); by the negation law for restricted quantifiers (mko-quantifier) this is equivalent to ¬∀n∈U P(n). One valid counterexample suffices to refute φ_U; the full list of failures is not needed for that.
S06 · implies
Before
c=-11:\ m(-11)=121
After
-11\notin U,\ \text{so}\ -11\ \text{is not a counterexample to}\ \varphi_UConditions: none
Rule: mko_counterexample_def · Uses: S01, G1, G2, G3
Leaf basis: set_builder + mko_counterexample_def + order_basics
The formula can be evaluated outside the domain: (−11)²+(−11)+11=121−11+11=121, which is composite. But eligibility comes before failure: −11<0 fails 0≤n≤12, so −11∉U. By the definition in S01, −11 is not a counterexample to φ_U; its failing value is irrelevant to φ_U.
S07 · theorem_application
Before
n\in V
After
2\nmid m(n),\ 3\nmid m(n),\ 5\nmid m(n),\ 7\nmid m(n)
Conditions: n\in\mathbb{Z}
Rule: L_no_small_factor · Uses: G2, L_no_small_factor
Leaf basis: division_algorithm + rem_divides + divides_combo + case_analysis
To decide φ_V we cannot rely on 'the search found nothing'; every element of V needs a reason. The first tool is Lemma L_no_small_factor: for every integer n, none of 2, 3, 5, 7 divides m(n). Elements of V are integers, so the lemma applies. It is proved in sub-steps S07.1 to S07.5.
S08 · implies
Before
0\le n\le 9
After
11\le m(n)\le 101
Conditions: n\ge 0
Rule: order_basics · Uses: G1, G2, order_basics
Leaf basis: order_basics + square_nonneg + numeric_evaluation
For 0≤n≤9: n≥0 gives n²≥0 and n²+n≥0, so m(n)≥11; from n≤9 and n≥0 we get n²=n·n≤9·n≤81, so m(n)≤81+9+11=101.
S09 · theorem_application
Before
11\le m(n)\le 101,\quad 2,3,5,7\nmid m(n)
After
P(n)\ \text{for an arbitrary}\ n\in VConditions: m(n)\ge 2
Rule: L_trial · Uses: S07, S08, L_trial
Leaf basis: prime_def + order_basics + numeric_evaluation
Take an arbitrary n∈V. If a prime p satisfies p²≤m(n)≤101, then p≤10 (since 11²=121>101), so p∈{2,3,5,7}; S07 says none of these divides m(n). Also m(n)≥11≥2 (S08). By Lemma L_trial, m(n) is prime, that is P(n).
S10 · implies
Before
P(n)\ \text{for an arbitrary}\ n\in VAfter
\forall n\in V\,P(n)
Conditions: none
Rule: forall_intro · Uses: S09, forall_intro
Leaf basis: forall_intro
S07 to S09 proved P(n) for an arbitrary n∈V, with no assumption on n beyond 0≤n≤9. By ∀-introduction, φ_V is true. This is an argument valid for every element of the finite domain V, not 'a search found no counterexample'; N11 recomputes isprime for n=0 to 9 one by one as an independent complete check.
S11 · implies
Before
m(11)=11^2+11+11
After
m(11)=143=11\cdot 13,\ 11\in U,\ \neg P(11)
Conditions: 1<11<143
Rule: prime_def · Uses: G1, G2, prime_def
Leaf basis: prime_def + set_builder + numeric_evaluation
11²+11+11=121+22=143=11·13 with 1<11<143, so 143 is composite; 0≤11≤12, so 11∈U. 11 is a second valid counterexample to φ_U.
S12 · theorem_application
Before
m(12)=12^2+12+11=167
After
P(12)
Conditions: 167\ge 2
Rule: L_trial · Uses: L_no_small_factor, L_trial, G2
Leaf basis: rem_divides + numeric_evaluation + order_basics
m(12)=144+12+11=167. The primes with p²≤167 are those with p≤12: 2, 3, 5, 7, 11 (since 13²=169>167). By L_no_small_factor, 2, 3, 5, 7 do not divide 167; and 167=11·15+2 leaves remainder 2≠0, so 11∤167. By Lemma L_trial, 167 is prime and P(12) holds.
S13 · implies
Before
U=V\cup\{10,11,12\}After
F_U=\{n\in U\mid\neg P(n)\}=\{10,11\}Conditions: none
Rule: set_extensionality · Uses: S03, S10, S11, S12, G1
Leaf basis: set_extensionality + case_analysis + set_builder
The elements of U are the integers 0 to 12, split into V (0 to 9) and the three elements 10, 11, 12, which covers every case. P holds throughout V (S10) and at 12 (S12), and fails at 10 and 11 (S03, S11). So the failure set is exactly {10,11}: both inclusions follow from the case-by-case check. This is a complete verification of a finite domain.
S14 · implies
Before
F_U=\{10,11\}After
\min F_U=10
Conditions: F_U\neq\varnothing
Rule: order_basics · Uses: S13
Leaf basis: order_basics + numeric_evaluation
By MKO assumption a2, the least counterexample is the numerically smallest element of the finite failure set. F_U={10,11} is nonempty and 10<11, so the least counterexample is 10. The value comes from the complete F_U, not from the first failure met in a sample.
S15 · implies
Before
10\in F_U,\ V\subseteq U
After
10\notin V,\ F_V=F_U\cap V=\varnothing
Conditions: none
Rule: set_operations_def · Uses: S10, S13, G1, G3
Leaf basis: set_operations_def + set_builder
Restrict to V: 10>9, so 10∉V and it loses eligibility as a counterexample to φ_V; so does 11. The failure set of V is F_V={n∈V ∣ ¬P(n)}=F_U∩V=∅, so φ_V has no counterexample, and its least counterexample is explicitly reported as nonexistent. Note that φ_V is true because of the argument in S10, not because 10 lost eligibility; losing a witness proves no universal statement by itself.
S16 · implies
Before
\text{S05, S06, S10, S13, S14, S15}After
\neg\varphi_U,\ F_U=\{10,11\},\ \min F_U=10,\ -11\ \text{ineligible},\ \varphi_V\ \text{true}Conditions: none
Rule: and_intro_elim · Uses: S05, S06, S10, S13, S14, S15
Leaf basis: and_intro_elim
Summary: φ_U is false (S05, valid counterexample 10); F_U={10,11} with least counterexample 10 (S13, S14); −11 makes the formula fail but is not in U, so it is not a counterexample (S06); φ_V is true (S10), F_V=∅, and there is no least counterexample (S15).
Substeps and lemmas
S07.1 · implies
Before
n=pq+r,\ 0\le r<p
After
m(n)=p(pq^2+2qr+q)+m(r),\quad p\mid m(n)\Leftrightarrow p\mid m(r)
Conditions: p\ge 1
Rule: distributive · Uses: division_algorithm, distributive, divides_combo
Leaf basis: division_algorithm + distributive + add_assoc + mul_comm + divides_combo
By the division algorithm write n=pq+r with 0≤r<p. Expanding: (pq+r)²+(pq+r)+11=p²q²+2pqr+r²+pq+r+11=p(pq²+2qr+q)+(r²+r+11)=p(pq²+2qr+q)+m(r) (N4 checks this polynomial identity on a grid). Since p divides p(pq²+2qr+q), the sum and difference property gives: if p∣m(n), subtracting yields p∣m(r); if p∣m(r), adding yields p∣m(n). This proves the auxiliary Lemma L_residue.
S07.2 · implies
Before
p=2,\ r\in\{0,1\}After
m(0)=11=2\cdot 5+1,\ m(1)=13=2\cdot 6+1;\ 2\nmid m(n)
Conditions: none
Rule: L_residue · Uses: L_residue, rem_divides, case_analysis
Leaf basis: rem_divides + case_analysis + numeric_evaluation + division_algorithm
p=2: the remainder r is 0 or 1. m(0)=11=2·5+1 and m(1)=13=2·6+1 both leave remainder 1≠0, so 2∤m(0) and 2∤m(1). By L_residue, 2∤m(n) for every integer n.
S07.3 · implies
Before
p=3,\ r\in\{0,1,2\}After
m(r)\in\{11,13,17\},\ \text{remainders}\ 2,1,2;\ 3\nmid m(n)Conditions: none
Rule: L_residue · Uses: L_residue, rem_divides, case_analysis
Leaf basis: rem_divides + case_analysis + numeric_evaluation + division_algorithm
p=3: for r=0, 1, 2, m(r)=11, 13, 17; 11=3·3+2, 13=3·4+1, 17=3·5+2, with remainders 2, 1, 2, none of them 0, so 3 divides none of the three values. By L_residue, 3∤m(n) for every integer n.
S07.4 · implies
Before
p=5,\ r\in\{0,1,2,3,4\}After
m(r)\in\{11,13,17,23,31\},\ \text{remainders}\ 1,3,2,3,1;\ 5\nmid m(n)Conditions: none
Rule: L_residue · Uses: L_residue, rem_divides, case_analysis
Leaf basis: rem_divides + case_analysis + numeric_evaluation + division_algorithm
p=5: for r=0 to 4, m(r)=11, 13, 17, 23, 31, whose remainders on division by 5 are 1, 3, 2, 3, 1, none of them 0. By L_residue, 5∤m(n) for every integer n.
S07.5 · implies
Before
p=7,\ r\in\{0,1,2,3,4,5,6\}After
m(r)\in\{11,13,17,23,31,41,53\},\ \text{remainders}\ 4,6,3,2,3,6,4;\ 7\nmid m(n)Conditions: none
Rule: L_residue · Uses: L_residue, rem_divides, case_analysis
Leaf basis: rem_divides + case_analysis + numeric_evaluation + division_algorithm
p=7: for r=0 to 6, m(r)=11, 13, 17, 23, 31, 41, 53, whose remainders on division by 7 are 4, 6, 3, 2, 3, 6, 4, none of them 0. By L_residue, 7∤m(n) for every integer n. S07.2 to S07.5 together prove Lemma L_no_small_factor.
S09.1 · implies
Before
m\ge 2,\ m\ \text{not prime}After
m=ab,\ 2\le a\le b,\ a^2\le m
Conditions: a>0
Rule: prime_def · Uses: prime_def, order_basics
Leaf basis: prime_def + divides_def + order_basics
Suppose m≥2 is not prime. By definition there is an integer a with 1<a<m and a∣m; let b=m/a, an integer, with b>1 because a<m and b<m because a>1. Swap the two if a>b, so we may assume 2≤a≤b. Multiplying by the positive a gives a²≤ab=m.
S09.2 · implies
Before
m=ab,\ 2\le a,\ a^2\le m
After
\exists\ \text{prime}\ p:\ p\mid m\land p^2\le mConditions: none
Rule: prime_divisor_exists · Uses: S09.1, prime_divisor_exists, divides_combo
Leaf basis: prime_divisor_exists + divides_combo + order_basics
a≥2, so a has a prime divisor p, with p≤a. From p∣a and a∣m we get p∣m; from 0<p≤a we get p²≤a²≤m. Hence: if m≥2 is not prime, some prime p with p²≤m divides m.
S09.3 · equivalent
Before
m\ \text{not prime}\Rightarrow\exists\ \text{prime}\ p:\ p\mid m\land p^2\le mAfter
(\forall\ \text{prime}\ p:\ p^2\le m\Rightarrow p\nmid m)\Rightarrow m\ \text{prime}Conditions: m\ge 2
Rule: contrapositive · Uses: S09.2, contrapositive
Leaf basis: contrapositive + quantifier_negation
Take the contrapositive of S09.2: if no prime p with p²≤m divides m (and m≥2), then m is prime. Negating 'there is such a p' by quantifier negation gives 'every prime with p²≤m fails to divide m'. S09.1 to S09.3 prove Lemma L_trial.