{
  "schema_version": "ocme-derivation-reader-v1",
  "guide_id": "derivation-mko-prime-number-01",
  "mko_id": "mko-prime-number",
  "title": {
    "zh-Hant": "自然數質數：證明 97 是質數、91 是合數，並排除 0 與 1",
    "en": "Prime natural numbers: proving 97 prime and 91 composite, and excluding 0 and 1"
  },
  "contract": {
    "schema_version": "ocme-derivation-guide-v0.1",
    "guide_id": "derivation-mko-prime-number-01",
    "source": {
      "mko_id": "mko-prime-number",
      "commit": "b28a5edbd46279b1db2a3f3f48bb3f447e18899f",
      "sha256": "5ebeb1330ba52c9685111730d0c0c2255e653887f8869f119ebbbb767ed139b5",
      "english_sha256": "9c7980d6fc0591adf0ccc93fefbab485b5b58c30d23d24e43095b2a8f18fd5aa"
    },
    "mode": "worked_example",
    "audience_prerequisites": [
      "order_basics",
      "division_algorithm",
      "mul_zero",
      "numeric_evaluation"
    ],
    "goal": {
      "zh-Hant": "依 MKO 定義（p 為質數 ⇔ 2≤p 且 p 的每個自然數因數 d 都滿足 d=1 或 d=p）：(1) 說明 0 與 1 不是質數；(2) 證明 2 是質數；(3) 以見證 7 證明 91 是合數，並說明只測 2、3、5 會誤判；(4) 證明「若 n=dk 且 d、k≥2，則 min(d,k)²≤n」，據此只需檢查 2 到 9，證明 97 是質數；(5) 證明 2 是唯一的偶質數。",
      "en": "From the MKO's definition (p is prime ⇔ 2≤p and every natural divisor d of p satisfies d=1 or d=p): (1) explain why 0 and 1 are not prime; (2) prove that 2 is prime; (3) prove that 91 is composite with the witness 7, and show that testing only 2, 3, 5 misjudges it; (4) prove 'if n=dk with d, k≥2 then min(d,k)²≤n', and use it to prove that 97 is prime by checking only 2 to 9; (5) prove that 2 is the only even prime."
    },
    "givens": [
      {
        "id": "G1",
        "statement": {
          "zh-Hant": "p、d 是包含 0 的自然數；整除依 MKO 自然數整除，見證必須是自然數（MKO 假設 a1）。",
          "en": "p and d are natural numbers including 0; divisibility follows the natural-divisibility MKO, with natural witnesses (MKO assumption a1)."
        }
      },
      {
        "id": "G2",
        "statement": {
          "zh-Hant": "因數判定用自然數整除與精確整數比較，不用近似平方根或浮點除法（MKO 假設 a2）。",
          "en": "Factors are checked with natural divisibility and exact integer comparisons, not approximate square roots or floating-point division (MKO assumption a2)."
        }
      },
      {
        "id": "G3",
        "statement": {
          "zh-Hant": "候選：0、1、2、91、97，以及大於 2 的偶數。",
          "en": "Candidates: 0, 1, 2, 91, 97, and even numbers greater than 2."
        }
      }
    ],
    "steps": [
      {
        "id": "S01",
        "uses": [
          "G1",
          "mko_prime_def"
        ],
        "before_tex": "p\\ \\text{prime}",
        "after_tex": "2\\le p\\ \\land\\ \\forall d\\in\\mathbb{N}\\,(d\\mid p\\Rightarrow d=1\\lor d=p)",
        "relation": "definition",
        "rule": "mko_prime_def",
        "conditions": [],
        "explanation": {
          "zh-Hant": "依 MKO 的定義，質數要同時滿足兩個條件：p≥2，以及 p 沒有 1 與 p 以外的自然數因數。要否定只需其中一個條件失敗；要肯定則必須排除所有可能的非平凡因數。",
          "en": "By the MKO's definition, a prime must satisfy two conditions together: p≥2, and p has no natural divisor other than 1 and p. To refute, one failed condition suffices; to confirm, every possible nontrivial divisor must be excluded."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "mko_prime_def"
          ],
          "explanation": {
            "zh-Hant": "此步只展開定義，不推出新事實。",
            "en": "This step only unfolds the definition and derives nothing new."
          }
        },
        "leaf_basis": "mko_prime_def + def_unfold"
      },
      {
        "id": "S02",
        "uses": [
          "mko_dvd_def",
          "L_div_bound"
        ],
        "before_tex": "d\\mid n,\\ n>0",
        "after_tex": "1\\le d\\le n",
        "relation": "implies",
        "rule": "L_div_bound",
        "conditions": [
          "n>0"
        ],
        "explanation": {
          "zh-Hant": "正數的因數夾在 1 與它自己之間：依引理 L_div_bound（S02.1、S02.2 證明）。這讓「列出所有因數」成為有限的工作。",
          "en": "A divisor of a positive number lies between 1 and the number itself, by Lemma L_div_bound (proved in S02.1 and S02.2). This makes 'list every divisor' a finite task."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "L_div_bound"
          ],
          "explanation": {
            "zh-Hant": "需要 n>0；n=0 時每個 d 都整除 0，沒有上界（S03）。",
            "en": "It needs n>0; for n=0 every d divides 0 and there is no bound (S03)."
          }
        },
        "leaf_basis": "mul_zero + order_basics + exists_elim"
      },
      {
        "id": "S02.1",
        "uses": [
          "mko_dvd_def",
          "mul_zero"
        ],
        "before_tex": "n=dk,\\ n>0",
        "after_tex": "d\\ge 1,\\ k\\ge 1",
        "relation": "implies",
        "rule": "mul_zero",
        "conditions": [
          "n>0"
        ],
        "explanation": {
          "zh-Hant": "若 d=0 或 k=0，則 n=dk=0，與 n>0 矛盾。所以 d≠0、k≠0；自然數非零即至少為 1。",
          "en": "If d=0 or k=0, then n=dk=0, contradicting n>0. So d≠0 and k≠0, and a nonzero natural is at least 1."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "mul_zero",
            "contradiction"
          ],
          "explanation": {
            "zh-Hant": "只用乘以零；沒有使用引理本身。",
            "en": "Only multiplication by zero is used; the lemma itself is not used."
          }
        },
        "leaf_basis": "mul_zero + contradiction"
      },
      {
        "id": "S02.2",
        "uses": [
          "S02.1",
          "order_basics"
        ],
        "before_tex": "k\\ge 1,\\ d\\ge 0",
        "after_tex": "n=dk\\ge d\\cdot 1=d",
        "relation": "implies",
        "rule": "order_basics",
        "conditions": [],
        "explanation": {
          "zh-Hant": "k≥1 且 d≥0，所以 dk≥d·1=d，即 d≤n。S02.1 與 S02.2 合起來證得引理 L_div_bound。",
          "en": "k≥1 and d≥0, so dk≥d·1=d, that is d≤n. S02.1 and S02.2 together prove Lemma L_div_bound."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "order_basics",
            "mul_one"
          ],
          "explanation": {
            "zh-Hant": "乘以非負數保持 ≤；沒有使用引理本身。",
            "en": "Multiplying by a nonnegative number preserves ≤; the lemma itself is not used."
          }
        },
        "leaf_basis": "order_basics + mul_one"
      },
      {
        "id": "S03",
        "uses": [
          "S01",
          "S02",
          "G3"
        ],
        "before_tex": "p=0,\\ p=1",
        "after_tex": "0,\\ 1\\ \\text{not prime}",
        "relation": "implies",
        "rule": "mko_prime_def",
        "conditions": [],
        "explanation": {
          "zh-Hant": "2≤0 與 2≤1 都不成立，所以 0、1 都不是質數。值得注意：1 的因數依 S02 只有 1（1≤d≤1），所以 1 其實通過「因數只有 1 與自身」的條件，它被排除完全是因為 2≤p。0 則兩個條件都失敗：0=2·0，所以 2∣0 而 2∉{1,0}。",
          "en": "Neither 2≤0 nor 2≤1 holds, so 0 and 1 are not prime. Note: by S02 the only divisor of 1 is 1 (1≤d≤1), so 1 actually passes the condition 'divisors are only 1 and itself'; it is excluded solely by 2≤p. 0 fails both conditions: 0=2·0, so 2∣0 with 2∉{1,0}."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S01",
            "S02",
            "mul_zero"
          ],
          "explanation": {
            "zh-Hant": "否定只需一個條件失敗；這裡同時說明哪個條件對 1 是決定性的。",
            "en": "Refutation needs one failed condition; this also shows which condition is decisive for 1."
          }
        },
        "leaf_basis": "mko_prime_def + order_basics + mul_zero"
      },
      {
        "id": "S04",
        "uses": [
          "S01",
          "S02"
        ],
        "before_tex": "p=2",
        "after_tex": "2\\ \\text{prime}",
        "relation": "implies",
        "rule": "mko_prime_def",
        "conditions": [],
        "explanation": {
          "zh-Hant": "2≥2。若 d∣2，依 S02 有 1≤d≤2，而 1 與 2 之間的自然數只有 1 與 2，所以 d=1 或 d=2。兩個條件都成立，2 是質數（N22 為獨立核對）。",
          "en": "2≥2. If d∣2, then 1≤d≤2 by S02, and the only naturals from 1 to 2 are 1 and 2, so d=1 or d=2. Both conditions hold, so 2 is prime (N22 is an independent check)."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S01",
            "S02",
            "case_analysis"
          ],
          "explanation": {
            "zh-Hant": "因數範圍 1 到 2 已窮盡；沒有遺漏的候選。",
            "en": "The divisor range 1 to 2 is exhausted; no candidate is missed."
          }
        },
        "leaf_basis": "mko_prime_def + case_analysis + order_basics"
      },
      {
        "id": "S05",
        "uses": [
          "S01",
          "mko_dvd_def",
          "G3"
        ],
        "before_tex": "91=7\\cdot 13",
        "after_tex": "7\\mid 91,\\ 7\\notin\\{1,91\\};\\ 91\\ \\text{not prime}",
        "relation": "implies",
        "rule": "mko_prime_def",
        "conditions": [],
        "explanation": {
          "zh-Hant": "7·13=91（N1），所以 7∣91，見證是 13。7≠1、7≠91，因數條件失敗，91 不是質數；7 是合數見證（MKO 段落 2）。",
          "en": "7·13=91 (N1), so 7∣91 with witness 13. 7≠1 and 7≠91, so the divisor condition fails and 91 is not prime; 7 is a compositeness witness (MKO paragraph 2)."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S01",
            "mko_dvd_def",
            "numeric_evaluation"
          ],
          "explanation": {
            "zh-Hant": "否定只需一個非平凡因數。",
            "en": "Refutation needs only one nontrivial divisor."
          }
        },
        "leaf_basis": "mko_prime_def + exists_intro + numeric_evaluation"
      },
      {
        "id": "S06",
        "uses": [
          "S05",
          "rem_test"
        ],
        "before_tex": "91\\bmod 2=91\\bmod 3=91\\bmod 5=1",
        "after_tex": "2,3,5\\nmid 91,\\ \\text{yet}\\ 91\\ \\text{is composite}",
        "relation": "implies",
        "rule": "rem_test",
        "conditions": [],
        "explanation": {
          "zh-Hant": "91 除以 2、3、5 的餘數都是 1（N2 到 N4），依 rem_test 它們都不整除 91。若只測這三個就宣稱 91 是質數，結論錯誤，因為 S05 已找到因數 7。在不完整的候選表中找不到因數，不能當作質數證明（MKO 段落 2）。",
          "en": "91 leaves remainder 1 on division by 2, 3 and 5 (N2 to N4), so by rem_test none of them divides 91. Declaring 91 prime after testing only these three would be wrong, since S05 found the divisor 7. Finding no factor in an incomplete list of candidates is not a proof of primality (MKO paragraph 2)."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S05",
            "rem_test"
          ],
          "explanation": {
            "zh-Hant": "這一步只顯示部分檢查的不足，不改變 S05 的結論。",
            "en": "This step only shows the inadequacy of a partial check; it does not change the conclusion of S05."
          }
        },
        "leaf_basis": "rem_test + numeric_evaluation"
      },
      {
        "id": "S07",
        "uses": [
          "S01",
          "S02",
          "G3"
        ],
        "before_tex": "d\\mid 97,\\ d\\neq 1,\\ d\\neq 97",
        "after_tex": "97=dk,\\ 2\\le d\\le 96,\\ k\\ge 2",
        "relation": "implies",
        "rule": "L_div_bound",
        "conditions": [],
        "explanation": {
          "zh-Hant": "97≥2 成立。為證因數條件，用反證：假設有 d∣97 且 d≠1、d≠97，取見證 97=dk。由 S02，1≤d≤97，再排除 1 與 97 得 2≤d≤96。又 k≥1（S02.1）；若 k=1 則 d=97，已排除；所以 k≥2。",
          "en": "97≥2 holds. For the divisor condition argue by contradiction: suppose d∣97 with d≠1 and d≠97, and take a witness 97=dk. By S02, 1≤d≤97, and excluding 1 and 97 gives 2≤d≤96. Also k≥1 (S02.1); if k=1 then d=97, which is excluded; so k≥2."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S02",
            "exists_elim"
          ],
          "explanation": {
            "zh-Hant": "這是反證法的假設與它的直接推論；結論要到 S11 才釋放假設。",
            "en": "These are the hypothesis of the proof by contradiction and its direct consequences; the hypothesis is discharged only in S11."
          }
        },
        "leaf_basis": "exists_elim + order_basics + case_analysis"
      },
      {
        "id": "S08",
        "uses": [
          "S07",
          "L_small_factor"
        ],
        "before_tex": "97=dk,\\ d\\ge 2,\\ k\\ge 2",
        "after_tex": "m=\\min(d,k):\\ 2\\le m,\\ m\\mid 97,\\ m^2\\le 97",
        "relation": "implies",
        "rule": "L_small_factor",
        "conditions": [
          "d\\ge 2",
          "k\\ge 2"
        ],
        "explanation": {
          "zh-Hant": "依引理 L_small_factor（S08.1、S08.2 證明），因數對中較小的 m 也整除 97，而且 m²≤97。這就是「只需檢查到平方根」的理由，而且用的是精確整數比較。",
          "en": "By Lemma L_small_factor (proved in S08.1 and S08.2), the smaller member m of the factor pair also divides 97, and m²≤97. This is the reason one only needs to check up to the square root, stated with exact integer comparisons."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S07",
            "L_small_factor"
          ],
          "explanation": {
            "zh-Hant": "引理需要 d、k 都至少為 2，由 S07 提供。",
            "en": "The lemma needs d and k both at least 2, which S07 provides."
          }
        },
        "leaf_basis": "order_basics + mul_comm + exists_intro"
      },
      {
        "id": "S08.1",
        "uses": [
          "mko_dvd_def",
          "mul_comm"
        ],
        "before_tex": "n=dk",
        "after_tex": "d\\mid n,\\ k\\mid n,\\ \\text{so}\\ m\\mid n",
        "relation": "implies",
        "rule": "exists_intro",
        "conditions": [],
        "explanation": {
          "zh-Hant": "n=d·k 給 d∣n（見證 k）；由交換律 n=k·d 給 k∣n（見證 d）。m 是 d 或 k 其中之一，所以 m∣n；又 d、k≥2，故 m≥2。",
          "en": "n=d·k gives d∣n (witness k); by commutativity n=k·d gives k∣n (witness d). m is one of d and k, so m∣n; and since d, k≥2, m≥2."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "mko_dvd_def",
            "mul_comm",
            "exists_intro"
          ],
          "explanation": {
            "zh-Hant": "只用交換律與見證；沒有使用引理本身。",
            "en": "Only commutativity and witnesses are used; the lemma itself is not used."
          }
        },
        "leaf_basis": "exists_intro + mul_comm + case_analysis"
      },
      {
        "id": "S08.2",
        "uses": [
          "order_basics"
        ],
        "before_tex": "m\\le d,\\ m\\le k,\\ m\\ge 0",
        "after_tex": "m^2=m\\cdot m\\le d\\cdot m\\le d\\cdot k=n",
        "relation": "implies",
        "rule": "order_basics",
        "conditions": [],
        "explanation": {
          "zh-Hant": "m≤d 兩邊乘非負的 m 得 m·m≤d·m；m≤k 兩邊乘非負的 d 得 d·m≤d·k。串接得 m²≤n。S08.1 與 S08.2 合起來證得引理 L_small_factor。",
          "en": "Multiplying m≤d by the nonnegative m gives m·m≤d·m; multiplying m≤k by the nonnegative d gives d·m≤d·k. Chaining gives m²≤n. S08.1 and S08.2 together prove Lemma L_small_factor."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "order_basics"
          ],
          "explanation": {
            "zh-Hant": "乘以非負數保持 ≤；沒有使用引理本身。",
            "en": "Multiplying by a nonnegative number preserves ≤; the lemma itself is not used."
          }
        },
        "leaf_basis": "order_basics + mul_comm"
      },
      {
        "id": "S09",
        "uses": [
          "S08",
          "G2"
        ],
        "before_tex": "m^2\\le 97",
        "after_tex": "2\\le m\\le 9",
        "relation": "implies",
        "rule": "order_basics",
        "conditions": [],
        "explanation": {
          "zh-Hant": "若 m≥10，則 m²≥100>97（N5），與 m²≤97 矛盾；所以 m≤9。而 9²=81≤97（N6），所以 9 是滿足 m²≤97 的最大整數。這裡用的是精確的整數平方比較，不是浮點 √97。",
          "en": "If m≥10, then m²≥100>97 (N5), contradicting m²≤97; so m≤9. And 9²=81≤97 (N6), so 9 is the largest integer with m²≤97. This uses exact integer squares, not a floating-point √97."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S08",
            "order_basics",
            "G2"
          ],
          "explanation": {
            "zh-Hant": "上界必須涵蓋所有 m²≤97 的 m；取 9 不多也不少。",
            "en": "The bound must cover every m with m²≤97; 9 is neither too small nor too large."
          }
        },
        "leaf_basis": "order_basics + numeric_evaluation + contradiction"
      },
      {
        "id": "S10",
        "uses": [
          "S09",
          "rem_test"
        ],
        "before_tex": "m\\in\\{2,3,4,5,6,7,8,9\\}",
        "after_tex": "97\\bmod m\\in\\{1,1,1,2,1,6,1,7\\}\\neq 0,\\ \\text{so}\\ m\\nmid 97",
        "relation": "case_split",
        "rule": "rem_test",
        "conditions": [],
        "explanation": {
          "zh-Hant": "逐一計算 97 除以 m 的餘數：m=2 餘 1、3 餘 1、4 餘 1、5 餘 2、6 餘 1、7 餘 6、8 餘 1、9 餘 7（N7 到 N14）。沒有一個是 0，依 rem_test，2 到 9 都不整除 97。這與 S08、S09 的「存在 2≤m≤9 且 m∣97」矛盾。",
          "en": "Compute the remainder of 97 on division by each m: m=2 gives 1, 3 gives 1, 4 gives 1, 5 gives 2, 6 gives 1, 7 gives 6, 8 gives 1, 9 gives 7 (N7 to N14). None is 0, so by rem_test none of 2 to 9 divides 97. This contradicts 'some m with 2≤m≤9 divides 97' from S08 and S09."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S09",
            "rem_test",
            "case_analysis"
          ],
          "explanation": {
            "zh-Hant": "八種情況窮盡 2≤m≤9 的所有 m；這是完整檢查，不是抽樣。",
            "en": "The eight cases exhaust every m with 2≤m≤9; this is a complete check, not a sample."
          }
        },
        "leaf_basis": "rem_test + case_analysis + numeric_evaluation"
      },
      {
        "id": "S11",
        "uses": [
          "S07",
          "S10"
        ],
        "before_tex": "\\text{assumption of S07 leads to a contradiction}",
        "after_tex": "\\forall d\\,(d\\mid 97\\Rightarrow d=1\\lor d=97);\\ 97\\ \\text{prime}",
        "relation": "implies",
        "rule": "contradiction",
        "conditions": [],
        "explanation": {
          "zh-Hant": "S07 的假設「有 d∣97 且 d∉{1,97}」推出 S10 的矛盾，所以假設不成立：97 的每個因數都是 1 或 97。加上 97≥2，依定義 97 是質數。N15 以內建質數判定獨立核對。",
          "en": "The hypothesis of S07, 'some d∣97 with d∉{1,97}', leads to the contradiction in S10, so it is false: every divisor of 97 is 1 or 97. Together with 97≥2, the definition makes 97 prime. N15 is an independent check with a built-in primality test."
        },
        "reverse_audit": {
          "kind": "sufficient_goal_reduction",
          "required_ids": [
            "S07",
            "S10",
            "contradiction",
            "mko_prime_def"
          ],
          "explanation": {
            "zh-Hant": "目標 G：97 是質數。足夠條件 H：97≥2 且沒有非平凡因數；H⇒G 由定義。H 由反證法證成，沒有把 G 當作前提；N15 只是交叉核對，不是證明的一部分。",
            "en": "Goal G: 97 is prime. Sufficient condition H: 97≥2 and no nontrivial divisor; H⇒G by the definition. H is proved by contradiction, without using G as a premise; N15 is only a cross-check, not part of the proof."
          }
        },
        "leaf_basis": "contradiction + quantifier_negation + mko_prime_def"
      },
      {
        "id": "S12",
        "uses": [
          "S05",
          "S08",
          "G2"
        ],
        "before_tex": "91,\\ 9^2\\le 91<10^2",
        "after_tex": "\\text{the complete search}\\ 2\\le m\\le 9\\ \\text{finds}\\ 7",
        "relation": "implies",
        "rule": "L_small_factor",
        "conditions": [],
        "explanation": {
          "zh-Hant": "同一個界套用到 91：9²=81≤91<100=10²（N18、N19），所以合數 91 必有 2 到 9 之間的因數；完整搜尋在 m=7 找到（91 除以 7 餘 0，N17），與 S05 一致。對照 S06：只測 2、3、5 是不完整的搜尋，才會漏掉 7。",
          "en": "Apply the same bound to 91: 9²=81≤91<100=10² (N18, N19), so the composite 91 must have a divisor between 2 and 9; the complete search finds m=7 (91 leaves remainder 0 on division by 7, N17), in agreement with S05. Contrast S06: testing only 2, 3, 5 is an incomplete search, which is how 7 was missed."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S05",
            "L_small_factor"
          ],
          "explanation": {
            "zh-Hant": "引理保證合數在界內有因數；這裡只是說明完整搜尋與部分搜尋的差別。",
            "en": "The lemma guarantees a divisor within the bound for a composite number; this step only contrasts a complete search with a partial one."
          }
        },
        "leaf_basis": "order_basics + rem_test + numeric_evaluation"
      },
      {
        "id": "S13",
        "uses": [
          "S01",
          "S04",
          "mko_dvd_def"
        ],
        "before_tex": "p=2j,\\ p\\ge 2,\\ p\\neq 2",
        "after_tex": "2\\mid p,\\ 2\\notin\\{1,p\\};\\ p\\ \\text{not prime}",
        "relation": "implies",
        "rule": "mko_prime_def",
        "conditions": [
          "p\\neq 2"
        ],
        "explanation": {
          "zh-Hant": "偶數 p=2j 有因數 2（見證 j）。若 p≠2，則 2≠1 且 2≠p，因數條件失敗，p 不是質數。配合 S04，2 是唯一的偶質數（N21 對 4 到 120 的偶數做有限核對，只支持這些點）。",
          "en": "An even p=2j has the divisor 2 (witness j). If p≠2, then 2≠1 and 2≠p, so the divisor condition fails and p is not prime. With S04, 2 is the only even prime (N21 is a finite check over the even numbers 4 to 120 and supports only those points)."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S01",
            "S04",
            "mko_dvd_def"
          ],
          "explanation": {
            "zh-Hant": "一般論證對每個偶數 p≠2 成立；有限核對 N21 不是證明的一部分。",
            "en": "The general argument holds for every even p≠2; the finite check N21 is not part of the proof."
          }
        },
        "leaf_basis": "mko_prime_def + exists_intro + forall_intro"
      }
    ],
    "result": {
      "zh-Hant": "0 與 1 不是質數（2≤p 失敗；1 雖只有因數 1，仍被排除）；2 是質數，也是唯一的偶質數；91=7·13 是合數，只測 2、3、5 會漏掉 7；由 min(d,k)²≤n 只需檢查 2 到 9，而 97 除以 2 到 9 的餘數都不為 0，所以 97 是質數。",
      "en": "0 and 1 are not prime (2≤p fails; 1 is excluded even though its only divisor is 1); 2 is prime and the only even prime; 91=7·13 is composite, and testing only 2, 3, 5 misses 7; by min(d,k)²≤n only 2 to 9 need checking, and 97 leaves a nonzero remainder on division by each of them, so 97 is prime."
    },
    "negative_controls": [
      {
        "claim": {
          "zh-Hant": "1 是質數，因為它的因數只有 1 與它自己",
          "en": "1 is prime because its only divisors are 1 and itself"
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "定義要求 2≤p，1 不滿足。",
          "en": "The definition requires 2≤p, which 1 fails."
        }
      },
      {
        "claim": {
          "zh-Hant": "91 不被 2、3、5 整除，所以 91 是質數",
          "en": "91 is not divisible by 2, 3 or 5, so 91 is prime"
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "91=7·13；部分檢查不是證明。",
          "en": "91=7·13; a partial check is not a proof."
        }
      },
      {
        "claim": {
          "zh-Hant": "要證 97 是質數，必須試除 2 到 96 的每一個數",
          "en": "To prove 97 prime one must try division by every integer from 2 to 96"
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "引理 L_small_factor 證明若有非平凡因數，必有一個 m 滿足 2≤m≤9，所以檢查 2 到 9 已足夠。",
          "en": "Lemma L_small_factor proves that a nontrivial divisor forces one with 2≤m≤9, so checking 2 to 9 suffices."
        }
      },
      {
        "claim": {
          "zh-Hant": "0 是質數，因為 0 沒有因數",
          "en": "0 is prime because 0 has no divisors"
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "每個自然數都整除 0（例如 0=2·0），而且 2≤0 不成立。",
          "en": "Every natural divides 0 (for example 0=2·0), and 2≤0 fails."
        }
      },
      {
        "claim": {
          "zh-Hant": "所有質數都是奇數",
          "en": "All primes are odd"
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "2 是質數（S04）且是偶數。",
          "en": "2 is prime (S04) and even."
        }
      }
    ],
    "status": "candidate",
    "gaps": [],
    "verification": {
      "structure": "checked_local_script",
      "mathematics": "candidate_argument",
      "formalization": "not_formalized"
    },
    "rule_glossary": [
      {
        "id": "order_basics",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "實數的序：任兩數恰有 u<v、u=v、u>v 之一；u<v 且 v<w 推出 u<w；u<v 推出 u+w<v+w；u<v 且 w>0 推出 uw<vw；u<v 且 w<0 推出 uw>vw。",
          "en": "Order of the reals: exactly one of u<v, u=v, u>v holds; u<v and v<w give u<w; u<v gives u+w<v+w; u<v and w>0 give uw<vw; u<v and w<0 give uw>vw."
        }
      },
      {
        "id": "division_algorithm",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "帶餘除法：對整數 a 與正整數 b，存在唯一的整數 q、r 使 a=bq+r 且 0≤r<b。",
          "en": "Division algorithm: for an integer a and a positive integer b there are unique integers q, r with a=bq+r and 0≤r<b."
        }
      },
      {
        "id": "mul_zero",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "乘以零：u·0=0。理由：u·0=u·(0+0)=u·0+u·0，兩邊同減 u·0 得 0=u·0。",
          "en": "Multiplying by zero: u·0=0. Reason: u·0=u·(0+0)=u·0+u·0; subtracting u·0 from both sides gives 0=u·0."
        }
      },
      {
        "id": "numeric_evaluation",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "明確整數或有理數算式的精確求值；可以獨立重算。",
          "en": "Exact evaluation of an explicit integer or rational expression; independently recomputable."
        }
      },
      {
        "id": "def_unfold",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "展開定義：把一個已定義的詞換成它的定義內容（或反向收回），命題的真假不變。",
          "en": "Unfolding a definition: replacing a defined term by its definition (or folding it back) does not change whether a statement is true."
        }
      },
      {
        "id": "exists_elim",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "∃消去：由 ∃x∈D, P(x)，可取一個新名字 a 表示某個滿足 P(a) 的元素；只要最後結論不含 a，就可用 a 推理。",
          "en": "∃-elimination: from ∃x∈D, P(x) we may name some element a with P(a) by a fresh name; reasoning with a is allowed as long as the final conclusion does not mention a."
        }
      },
      {
        "id": "contradiction",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "反證法：若假設 ¬P 推出矛盾（某命題與其否定同時成立），則 P 成立。",
          "en": "Proof by contradiction: if assuming ¬P leads to a contradiction (a statement and its negation both hold), then P holds."
        }
      },
      {
        "id": "mul_one",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "乘法單位元：1·u=u。",
          "en": "Multiplicative identity: 1·u=u."
        }
      },
      {
        "id": "case_analysis",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "分情況論證：若 P∨Q 成立，且 P⇒R、Q⇒R 都已證，則 R 成立。所有情況必須涵蓋全部可能。",
          "en": "Proof by cases: if P∨Q holds and both P⇒R and Q⇒R are proved, then R holds. The cases must cover every possibility."
        }
      },
      {
        "id": "exists_intro",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "∃引入：若找到 a∈D 使 P(a) 成立，則 ∃x∈D, P(x)。",
          "en": "∃-introduction: if some a∈D satisfies P(a), then ∃x∈D, P(x)."
        }
      },
      {
        "id": "mul_comm",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "乘法交換律：uv=vu（在交換的數系中，例如 ℤ、ℚ、ℝ、ℂ）。",
          "en": "Commutativity of multiplication: uv=vu (in commutative number systems such as ℤ, ℚ, ℝ, ℂ)."
        }
      },
      {
        "id": "quantifier_negation",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "量詞否定：¬(∀x, P(x)) 等價於 ∃x, ¬P(x)；¬(∃x, P(x)) 等價於 ∀x, ¬P(x)。",
          "en": "Negating quantifiers: ¬(∀x, P(x)) is equivalent to ∃x, ¬P(x), and ¬(∃x, P(x)) is equivalent to ∀x, ¬P(x)."
        }
      },
      {
        "id": "forall_intro",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "∀引入（全稱推廣）：若某命題對一個「任意的」元素 x 證成，而證明沒有對 x 加任何額外假設，則它對論域中所有 x 成立。",
          "en": "∀-introduction (generalization): if a statement is proved for an arbitrary element x, with no extra assumption on x, it holds for every x in the domain."
        }
      },
      {
        "id": "mko_prime_def",
        "kind": "cited",
        "source": {
          "mko_id": "mko-prime-number",
          "sha256": "5ebeb1330ba52c9685111730d0c0c2255e653887f8869f119ebbbb767ed139b5",
          "commit": "b28a5edbd46279b1db2a3f3f48bb3f447e18899f"
        },
        "statement": {
          "zh-Hant": "自然數 p 為質數，當且僅當 2≤p，且每個自然數 d 若 d∣p，則 d=1 或 d=p。0 與 1 都不是質數。",
          "en": "A natural number p is prime exactly when 2≤p and every natural divisor d of p satisfies d=1 or d=p. Neither 0 nor 1 is prime."
        }
      },
      {
        "id": "mko_dvd_def",
        "kind": "cited",
        "source": {
          "mko_id": "mko-natural-divisibility",
          "sha256": "2e5d00faa3ae3031b2cb2a650b12db0ab8e8aa1b59a7ea6b2350f49a792758d7",
          "commit": "b28a5edbd46279b1db2a3f3f48bb3f447e18899f"
        },
        "statement": {
          "zh-Hant": "對自然數 a、b，a∣b 當且僅當存在自然數 k 使 b=a·k。",
          "en": "For natural numbers a and b, a∣b exactly when there is a natural number k such that b=a·k."
        }
      },
      {
        "id": "rem_test",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "對自然數 n 與正自然數 m：m∣n ⇔ n 除以 m 的餘數為 0（由帶餘除法的唯一性得到）。",
          "en": "For a natural n and a positive natural m: m∣n ⇔ n leaves remainder 0 on division by m (a consequence of uniqueness in the division algorithm)."
        }
      },
      {
        "id": "L_div_bound",
        "kind": "lemma",
        "proved_in": [
          "S02.1",
          "S02.2"
        ],
        "statement": {
          "zh-Hant": "若 d∣n、n>0，且 n=dk，則 d≥1、k≥1 且 d≤n。",
          "en": "If d∣n with n>0 and n=dk, then d≥1, k≥1 and d≤n."
        }
      },
      {
        "id": "L_small_factor",
        "kind": "lemma",
        "proved_in": [
          "S08.1",
          "S08.2"
        ],
        "statement": {
          "zh-Hant": "若 n=d·k，且 d≥2、k≥2，則 m=min(d,k) 滿足 2≤m、m∣n 且 m²≤n。",
          "en": "If n=d·k with d≥2 and k≥2, then m=min(d,k) satisfies 2≤m, m∣n and m²≤n."
        }
      }
    ],
    "revision_log": [],
    "numeric_checks": [
      {
        "id": "N1",
        "step": "S05",
        "lhs": "7*13",
        "rhs": "91"
      },
      {
        "id": "N2",
        "step": "S06",
        "lhs": "91 % 2",
        "rhs": "1"
      },
      {
        "id": "N3",
        "step": "S06",
        "lhs": "91 % 3",
        "rhs": "1"
      },
      {
        "id": "N4",
        "step": "S06",
        "lhs": "91 % 5",
        "rhs": "1"
      },
      {
        "id": "N5",
        "step": "S09",
        "lhs": "10**2",
        "relation": ">",
        "rhs": "97"
      },
      {
        "id": "N6",
        "step": "S09",
        "lhs": "9**2",
        "relation": "<=",
        "rhs": "97"
      },
      {
        "id": "N7",
        "step": "S10",
        "lhs": "97 % 2",
        "rhs": "1"
      },
      {
        "id": "N8",
        "step": "S10",
        "lhs": "97 % 3",
        "rhs": "1"
      },
      {
        "id": "N9",
        "step": "S10",
        "lhs": "97 % 4",
        "rhs": "1"
      },
      {
        "id": "N10",
        "step": "S10",
        "lhs": "97 % 5",
        "rhs": "2"
      },
      {
        "id": "N11",
        "step": "S10",
        "lhs": "97 % 6",
        "rhs": "1"
      },
      {
        "id": "N12",
        "step": "S10",
        "lhs": "97 % 7",
        "rhs": "6"
      },
      {
        "id": "N13",
        "step": "S10",
        "lhs": "97 % 8",
        "rhs": "1"
      },
      {
        "id": "N14",
        "step": "S10",
        "lhs": "97 % 9",
        "rhs": "7"
      },
      {
        "id": "N15",
        "step": "S11",
        "lhs": "isprime(97)",
        "rhs": "1"
      },
      {
        "id": "N16",
        "step": "S05",
        "lhs": "isprime(91)",
        "rhs": "0"
      },
      {
        "id": "N17",
        "step": "S12",
        "lhs": "91 % 7",
        "rhs": "0"
      },
      {
        "id": "N18",
        "step": "S12",
        "lhs": "9**2",
        "relation": "<=",
        "rhs": "91"
      },
      {
        "id": "N19",
        "step": "S12",
        "lhs": "10**2",
        "relation": ">",
        "rhs": "91"
      },
      {
        "id": "N20",
        "step": "S03",
        "lhs": "isprime(0) + isprime(1)",
        "rhs": "0"
      },
      {
        "id": "N21",
        "step": "S13",
        "vars": [
          "j"
        ],
        "range": [
          2,
          60
        ],
        "lhs": "isprime(2*j)",
        "rhs": "0"
      },
      {
        "id": "N22",
        "step": "S04",
        "lhs": "isprime(2)",
        "rhs": "1"
      }
    ]
  },
  "presentation": {
    "md_scope": {
      "zh-Hant": "只在包含 0 的自然數中工作，使用自然數整除與精確的整數比較（MKO 假設 a1、a2），不用浮點平方根。平方根界由本稿證明的引理給出。不處理質因數分解的唯一性、質數無窮多或大整數的質數證書；不改動 canonical MKO 或英文 edition。",
      "en": "Works in the natural numbers including 0, with natural divisibility and exact integer comparisons (MKO assumptions a1 and a2), never a floating-point square root. The square-root bound comes from a lemma proved here. Uniqueness of prime factorization, the infinitude of primes and primality certificates for large integers are not treated; the canonical MKO and its English edition are not changed."
    },
    "md_symbols": [
      [
        "p",
        "候選的自然數",
        "the candidate natural number"
      ],
      [
        "d\\mid p",
        "d 整除 p",
        "d divides p"
      ],
      [
        "m=\\min(d,k)",
        "因數對中較小者",
        "the smaller member of a factor pair"
      ],
      [
        "n\\bmod m",
        "n 除以 m 的餘數",
        "the remainder of n on division by m"
      ]
    ],
    "md_error_controls": [
      {
        "title": "1 不是質數 / 1 is not prime",
        "zh": "MKO 指出的誤解：把 1 列為質數。1 的因數確實只有 1，但定義另要求 2≤p，所以 1 不是質數（S03）。0 則連因數條件也失敗，因為 2∣0。",
        "en": "The misconception the MKO names: listing 1 as a prime. The only divisor of 1 is indeed 1, but the definition also requires 2≤p, so 1 is not prime (S03). 0 fails even the divisor condition, since 2∣0."
      },
      {
        "title": "只測少數小因數不夠 / Testing a few small factors is not enough",
        "zh": "MKO 指出的另一個誤解：只測少數小因數就宣稱是質數。91 不被 2、3、5 整除，卻等於 7·13（S06）。肯定質數必須排除所有可能的非平凡因數；引理 L_small_factor 把範圍縮到 m²≤n，但範圍內的每個 m 都要檢查（S10、S12）。",
        "en": "The other misconception the MKO names: declaring a number prime after testing a few small factors. 91 is not divisible by 2, 3 or 5, yet it equals 7·13 (S06). Confirming primality requires excluding every possible nontrivial divisor; Lemma L_small_factor narrows the range to m²≤n, but every m in that range must be checked (S10, S12)."
      },
      {
        "title": "平方根界要用精確整數比較 / Use exact integer comparisons for the square-root bound",
        "zh": "MKO 假設 a2 不允許用近似平方根。本稿以 m²≤97 與 10²=100>97 精確決定上界 9；若用四捨五入的浮點 √n 決定上界，在 n 是完全平方數附近可能少檢查一個候選。",
        "en": "MKO assumption a2 rules out approximate square roots. Here the bound 9 is fixed exactly by m²≤97 and 10²=100>97; deciding the bound from a rounded floating-point √n could skip a candidate near perfect squares."
      }
    ],
    "md_open_items": [
      {
        "zh-Hant": "rem_test 作為前置規則使用，其證明見自然數整除的教學稿。",
        "en": "rem_test is used as a prerequisite; its proof is in the natural-divisibility guide."
      },
      {
        "zh-Hant": "只試除 2 到 9 中的質數（2、3、5、7）其實也足夠，但需要「最小的非平凡因數必為質數」這個額外事實，本稿沒有使用也沒有證明。",
        "en": "Trying only the primes 2, 3, 5, 7 among 2 to 9 would also suffice, but that needs the extra fact 'the smallest nontrivial divisor is prime', which this guide neither uses nor proves."
      },
      {
        "zh-Hant": "N15、N16、N22 使用核對器內建的質數判定，只作獨立交叉核對；N21 是有限範圍核對。",
        "en": "N15, N16 and N22 use the checker's built-in primality test as independent cross-checks only; N21 is a finite-range check."
      }
    ]
  },
  "revision": {
    "id": "production-20261019-adopted-96",
    "source_commit": "b28a5edbd46279b1db2a3f3f48bb3f447e18899f",
    "adopted_source_sha256": "0bde7a02304dff72bf0e31bb574cf7cb0d9d60df1744fb45c6915cc88cba7bb7",
    "original_source_sha256": "0bde7a02304dff72bf0e31bb574cf7cb0d9d60df1744fb45c6915cc88cba7bb7",
    "owner_adopted": true,
    "bilingual_sync": "complete_source_bound",
    "formal_Lean": "NOT_RUN",
    "independent_AI_concurrence": "NOT_MEASURED",
    "issue_ids": [],
    "scope": "Owner-adopted natural-language teaching guide; not a formal proof, canonical MKO rewrite or evidence-status promotion."
  }
}
