{
  "schema_version": "ocme-derivation-reader-v1",
  "guide_id": "derivation-mko-unique-prime-factorization-01",
  "mko_id": "mko-unique-prime-factorization",
  "title": {
    "zh-Hant": "存在、Euclid引理與唯一質因數",
    "en": "Existence, Euclid's lemma and unique factors"
  },
  "contract": {
    "schema_version": "ocme-derivation-guide-v0.1",
    "guide_id": "derivation-mko-unique-prime-factorization-01",
    "source": {
      "mko_id": "mko-unique-prime-factorization",
      "commit": "b1b2f1dcf8c50d67a93fe52d95f8eef7b3abba9f",
      "sha256": "0f01853edccbfb8cdf298587be277da27032f1f31ab87712ee5745644aa66cff",
      "english_sha256": "daa563be289db97eeabc811b523c607b1c88cb0a7c4b7b320a62dee46bcc27ac"
    },
    "mode": "theorem_proof",
    "audience_prerequisites": [
      "calc"
    ],
    "goal": {
      "zh-Hant": "正整數n>1存在唯一質因數多重集合；360=2³·3²·5，負號與units另列。",
      "en": "Every positive integer n>1 has a unique prime multiset; 360=2^3*3^2*5, with signs and units separate."
    },
    "givens": [
      {
        "id": "G1",
        "statement": {
          "zh-Hant": "主定理n∈Z,n>1；實例n=360；分解忽略因數順序但保留重數。",
          "en": "The theorem domain is integers n>1; the example is 360; factor order is ignored but multiplicity retained."
        }
      }
    ],
    "steps": [
      {
        "id": "S01",
        "uses": [
          "G1"
        ],
        "before_tex": "n>1,\\quad d=\\min\\{m>1:m\\mid n\\}",
        "after_tex": "d\\text{ prime}",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "若d=uv且1<u<d，則u也整除n，違反最小性，因此最小非單位因數必prime。",
          "en": "If d=uv with 1<u<d, then u divides n, contradicting minimality; hence the least nonunit divisor is prime."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1"
          ],
          "explanation": {
            "zh-Hant": "集合非空因n自身是因數，最小值由良基前提保證。",
            "en": "The divisor set is nonempty because n itself belongs; well-foundedness supplies its minimum."
          }
        },
        "leaf_basis": "calc"
      },
      {
        "id": "S02",
        "uses": [
          "G1",
          "S01"
        ],
        "before_tex": "n=dq,\\quad d\\text{ prime},\\quad1\\le q<n",
        "after_tex": "q=1\\Rightarrow n=d;\\quad q>1\\Rightarrow q\\text{ has prime factors by induction}",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "商比n小，強歸納提供q分解，乘回d證存在；n=2的基礎亦落q=1分支。",
          "en": "The quotient is smaller than n; strong induction factors q and adjoining d proves existence, with n=2 covered by q=1."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S01"
          ],
          "explanation": {
            "zh-Hant": "歸納只用更小正整數，不用待證同一n。",
            "en": "Induction uses only smaller positive integers, not the same n."
          }
        },
        "leaf_basis": "calc"
      },
      {
        "id": "S03",
        "uses": [
          "G1"
        ],
        "before_tex": "p\\text{ prime},\\quad p\\mid ab,\\quad p\\nmid a",
        "after_tex": "\\gcd(p,a)=1\\Rightarrow\\exists u,v:\\ up+va=1",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "p因數只有1、p，且p不整除a，故互質，可用明示Bezout前提。",
          "en": "The only positive divisors of p are 1,p; since p does not divide a, they are coprime and the stated Bezout prerequisite applies."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1"
          ],
          "explanation": {
            "zh-Hant": "這一步標示實際用到的Bezout，不把Euclid引理當自證。",
            "en": "This identifies the actual Bezout dependency rather than assuming the Euclid lemma being proved."
          }
        },
        "leaf_basis": "calc"
      },
      {
        "id": "S04",
        "uses": [
          "G1",
          "S03"
        ],
        "before_tex": "up+va=1,\\quad p\\mid ab",
        "after_tex": "b=upb+vab\\Rightarrow p\\mid b",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "乘b後兩項皆被p整除，證p|ab則p|a或p|b。",
          "en": "After multiplication by b, both terms are divisible by p, proving Euclid's lemma."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S03"
          ],
          "explanation": {
            "zh-Hant": "若p|a則直接在另一分支；合數p不保證前一步互質。",
            "en": "The case p dividing a is immediate; composite p does not ensure the preceding coprimality."
          }
        },
        "leaf_basis": "calc"
      },
      {
        "id": "S05",
        "uses": [
          "G1",
          "S04"
        ],
        "before_tex": "\\prod_{i=1}^{r}p_i=\\prod_{j=1}^{s}q_j,\\quad p_i,q_j\\text{ prime}",
        "after_tex": "p_1\\mid\\prod_{j=1}^{s}q_j\\Rightarrow\\exists j:\\ p_1\\mid q_j\\Rightarrow p_1=q_j",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "反覆對有限乘積使用Euclid引理，p₁必等於右側某個prime。",
          "en": "Finite-product induction using Euclid's lemma makes p1 equal to one prime on the right."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S04"
          ],
          "explanation": {
            "zh-Hant": "不是只比兩個已算答案；對任意兩個有限prime分解適用。",
            "en": "This handles arbitrary finite prime factorizations, not merely two computed outputs."
          }
        },
        "leaf_basis": "calc"
      },
      {
        "id": "S06",
        "uses": [
          "G1",
          "S02",
          "S05"
        ],
        "before_tex": "p_1=q_j\\ne0",
        "after_tex": "\\text{cancel }p_1\\text{ and induct on }r+s\\Rightarrow\\{p_i\\}_{\\rm multiset}=\\{q_j\\}_{\\rm multiset}",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "消去非零整數prime使總因數數下降，直到空乘積1；非空prime乘積≥2，不能等1。",
          "en": "Cancel the nonzero prime and decrease the total factor count until empty product 1; a nonempty prime product is at least 2 and cannot equal 1."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S02",
            "S05"
          ],
          "explanation": {
            "zh-Hant": "唯一性保留重數，只忽略次序，空與非空終點亦已區分。",
            "en": "Uniqueness retains multiplicities while ignoring order, and distinguishes empty from nonempty endpoints."
          }
        },
        "leaf_basis": "calc"
      },
      {
        "id": "S07",
        "uses": [
          "G1",
          "S01",
          "S02"
        ],
        "before_tex": "360",
        "after_tex": "360=2\\cdot180=2^2\\cdot90=2^3\\cdot45=2^3\\cdot3\\cdot15=2^3\\cdot3^2\\cdot5",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "完整抽取2三次與3兩次，餘5；2、3皆prime，餘5只需試2因3²>5，故5prime。",
          "en": "Extract 2 three times and 3 twice, leaving 5. Primes 2,3 qualify, and testing 2 suffices for remaining 5 since 3^2>5."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S01",
            "S02"
          ],
          "explanation": {
            "zh-Hant": "剩餘5不是未處理的合數；已完整核到平方根界。",
            "en": "The remaining 5 is not an unchecked composite; trial division reaches the square-root boundary."
          }
        },
        "leaf_basis": "calc"
      },
      {
        "id": "S08",
        "uses": [
          "G1",
          "S06",
          "S07"
        ],
        "before_tex": "2^3\\cdot3^2\\cdot5=360",
        "after_tex": "360\\text{ has multiset }\\{2,2,2,3,3,5\\}\\text{ uniquely}",
        "relation": "implies",
        "rule": "mko_definition",
        "conditions": [],
        "explanation": {
          "zh-Hant": "乘積精確重驗，並由一般唯一性證其他prime列表只有排列不同。",
          "en": "Recheck the exact product; the uniqueness argument ensures any other prime list differs only in order."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S06",
            "S07"
          ],
          "explanation": {
            "zh-Hant": "不能只寫360=p^k，因這個例子有三種互異prime。",
            "en": "A single prime-power expression is insufficient because this example has three distinct primes."
          }
        },
        "leaf_basis": "mko_definition"
      },
      {
        "id": "S09",
        "uses": [
          "G1",
          "S06",
          "S08"
        ],
        "before_tex": "-360,\\quad1,\\quad-1,\\quad0",
        "after_tex": "-360=-(2^3 3^2 5),\\quad\\pm1\\text{ use empty prime product};\\quad0\\text{ excluded}",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "負號是單位因子；±1無prime因數而用空乘積1；0不屬n>1分解域。",
          "en": "A negative sign is a unit factor; ±1 use empty prime product 1, and zero is outside the n>1 factorization domain."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S06",
            "S08"
          ],
          "explanation": {
            "zh-Hant": "0可被任意prime整除，不能給有限唯一prime多重集合。",
            "en": "Every prime divides zero, so it cannot have a finite unique prime multiset."
          }
        },
        "leaf_basis": "calc"
      }
    ],
    "result": {
      "zh-Hant": "正整數n>1存在唯一質因數多重集合；360=2³·3²·5，負號與units另列。",
      "en": "Every positive integer n>1 has a unique prime multiset; 360=2^3*3^2*5, with signs and units separate."
    },
    "negative_controls": [
      {
        "claim": {
          "zh-Hant": "360=2³·3·5。",
          "en": "360=2^3*3*5."
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "右側120，漏掉一個3。",
          "en": "The right side is 120, missing a factor 3."
        }
      },
      {
        "claim": {
          "zh-Hant": "Euclid引理對合數4也成立。",
          "en": "Euclid's lemma also holds for composite 4."
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "4|2·2但4不整除任一2。",
          "en": "4 divides 2*2 but neither factor 2."
        }
      },
      {
        "claim": {
          "zh-Hant": "0的prime factorization是空乘積。",
          "en": "Zero's prime factorization is the empty product."
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "空乘積是1，不是0。",
          "en": "The empty product is 1, not zero."
        }
      }
    ],
    "status": "candidate",
    "gaps": [],
    "verification": {
      "structure": "checked_local_script",
      "mathematics": "candidate_argument",
      "formalization": "not_formalized"
    },
    "rule_glossary": [
      {
        "id": "calc",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "假設精確整數算術、帶餘除法、整除與gcd的定義；同餘等式始終綁定明示模數。另假設正整數良基／強歸納原理，以及互質整數的Bezout恆等式。",
          "en": "Assume exact integer arithmetic, division with remainder, and definitions of divisibility and gcd; every congruence has an explicit modulus. Also assume well-founded/strong induction on positive integers and the Bezout identity for coprime integers."
        }
      },
      {
        "id": "mko_definition",
        "kind": "cited",
        "statement": {
          "zh-Hant": "existence以well-founded/induction與完整trial division小切片驗證；uniqueness保留Euclid lemma witness p|ab implies p|a or p|b，而非只比較少數答案。整數版分離negative sign，±1為units與empty product，0沒有此prime factorization。",
          "en": "Separate existence from uniqueness. Induction/well-founded reasoning gives existence, with complete bounded trial-division instances as computational companions. Uniqueness keeps the Euclid-lemma witness p|ab implies p|a or p|b, not just a few matching outputs. General factorizations may contain several distinct primes. Separate a negative sign, units±1 with the empty prime product and zero, which has no such factorization."
        },
        "source": {
          "mko_id": "mko-unique-prime-factorization",
          "sha256": "0f01853edccbfb8cdf298587be277da27032f1f31ab87712ee5745644aa66cff",
          "commit": "b1b2f1dcf8c50d67a93fe52d95f8eef7b3abba9f"
        }
      }
    ],
    "revision_log": [],
    "numeric_checks": [
      {
        "id": "product",
        "lhs": "2**3*3**2*5",
        "rhs": "360",
        "step": "S08"
      }
    ]
  },
  "presentation": {
    "md_scope": {
      "zh-Hant": "以強歸納與明示Bezout前提證存在唯一性，再完整trial division核360。",
      "en": "Existence and uniqueness by strong induction and an explicit Bezout prerequisite, then complete trial division for 360."
    },
    "md_symbols": [
      [
        "p_i,q_j",
        "含重數的prime因子",
        "prime factors with multiplicity"
      ],
      [
        "r,s",
        "有限因數個數",
        "finite factor counts"
      ]
    ],
    "md_error_controls": [
      {
        "title": "存在與唯一 / Existence and uniqueness",
        "zh": "強歸納給存在，Euclid引理加消去給唯一，兩責任分開。",
        "en": "Strong induction gives existence; Euclid's lemma and cancellation give uniqueness."
      },
      {
        "title": "重數 / Multiplicity",
        "zh": "比較prime多重集合，不只distinct prime集合。",
        "en": "Compare prime multisets, not only distinct-prime sets."
      }
    ],
    "md_open_items": []
  },
  "revision": {
    "id": "ocme-new142-reader-adoption-20261021",
    "collection": "coverage-20261021",
    "source_commit": "b1b2f1dcf8c50d67a93fe52d95f8eef7b3abba9f",
    "adopted_source_sha256": "648c53ebc102df797ce25af2afb0b128976c45a091ff54b1a47d03de1a9d1ad6",
    "original_source_sha256": "648c53ebc102df797ce25af2afb0b128976c45a091ff54b1a47d03de1a9d1ad6",
    "owner_adopted": true,
    "bilingual_sync": "complete_source_bound",
    "formal_Lean": "NOT_RUN",
    "reader_review": "142_of_142_source_bound",
    "wording_review": "original_Lead_decisions_resolved",
    "glossary_reader_paraphrases": [],
    "independent_AI_concurrence": "SCOPED_LEAD_AND_BILINGUAL_CONTEXT_REVIEW",
    "issue_ids": [],
    "parent_manifest_sha256": "d29f4cae8229ebd24f60d496cb1d3cd4ad8c0a4dca9d44daab0c3245c544283a",
    "scope": "Owner-adopted reader revision. Lead and bilingual review concern the recorded text and premises; no new universal or Lean proof, canonical promotion or historical-label rewrite.",
    "english_binding_revision": {
      "id": "edition-symbol-bindings-20261101",
      "path": "content/edition-symbol-bindings-20261101/revision.json",
      "sha256": "e9b4c69f2c4732074c37abb624c8ab8a70afc3645c12bf9df2268ef650ad7b6c"
    },
    "source_quotation_revision": {
      "id": "edition-symbol-source-quotes-20261101",
      "path": "content/edition-symbol-bindings-20261101/guide-quote-revision.json",
      "sha256": "738a662b019680accb9f968b6b62a5bf284d9d213351faf5273715f932e427cb"
    }
  }
}
