{
  "schema_version": "ocme-derivation-reader-v1",
  "guide_id": "derivation-mko-chinese-remainder-theorem-01",
  "mko_id": "mko-chinese-remainder-theorem",
  "title": {
    "zh-Hant": "三模數CRT的構造與唯一類",
    "en": "Constructing a three-modulus CRT class"
  },
  "contract": {
    "schema_version": "ocme-derivation-guide-v0.1",
    "guide_id": "derivation-mko-chinese-remainder-theorem-01",
    "source": {
      "mko_id": "mko-chinese-remainder-theorem",
      "commit": "b1b2f1dcf8c50d67a93fe52d95f8eef7b3abba9f",
      "sha256": "97d98262a4c1d1774983902029b0e964992d7472332d99d3c22e80f77a1a44cc",
      "english_sha256": "68fb5d62577d9598790d36a1aa4c65339ef78bfc9567c23162560b6e15029f1c"
    },
    "mode": "worked_example",
    "audience_prerequisites": [
      "calc"
    ],
    "goal": {
      "zh-Hant": "x≡2 mod3、3 mod5、2 mod7的全部整數解為23+105t。",
      "en": "All integer solutions of x=2 mod 3, x=3 mod 5, x=2 mod 7 are 23+105t."
    },
    "givens": [
      {
        "id": "G1",
        "statement": {
          "zh-Hant": "模數3、5、7，residues依序2、3、2，t∈Z。",
          "en": "Moduli 3,5,7 with respective residues 2,3,2; t is an integer."
        }
      }
    ],
    "steps": [
      {
        "id": "S01",
        "uses": [
          "G1"
        ],
        "before_tex": "(m_1,m_2,m_3)=(3,5,7)",
        "after_tex": "\\gcd(3,5)=\\gcd(3,7)=\\gcd(5,7)=1,\\quad M=105",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "三對gcd均1且模數正，先完成CRT前提。",
          "en": "All three pairwise gcds are one and moduli positive, qualifying CRT first."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1"
          ],
          "explanation": {
            "zh-Hant": "residues已在各自0至mᵢ−1範圍內。",
            "en": "Each residue is normalized to its own range 0 through m_i-1."
          }
        },
        "leaf_basis": "calc"
      },
      {
        "id": "S02",
        "uses": [
          "G1",
          "S01"
        ],
        "before_tex": "N_i=M/m_i",
        "after_tex": "(N_1,N_2,N_3)=(35,21,15)",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "每個Nᵢ含另兩模數，因此對另兩者同餘0。",
          "en": "Each N_i contains the other two moduli and is zero modulo both."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S01"
          ],
          "explanation": {
            "zh-Hant": "整除105由明示乘積保證，無有理近似。",
            "en": "Exact divisibility follows from the stated product, with no rational approximation."
          }
        },
        "leaf_basis": "calc"
      },
      {
        "id": "S03",
        "uses": [
          "G1",
          "S02"
        ],
        "before_tex": "35\\equiv2\\pmod3,\\quad21\\equiv1\\pmod5,\\quad15\\equiv1\\pmod7",
        "after_tex": "u_1=2,\\quad u_2=1,\\quad u_3=1",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "逐模逆元核35·2≡1 mod3、21·1≡1 mod5、15·1≡1 mod7。",
          "en": "Check each modular inverse: 35*2=1 mod 3, 21=1 mod 5, 15=1 mod 7."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S02"
          ],
          "explanation": {
            "zh-Hant": "uᵢ屬自己模數，不可交換位置。",
            "en": "Each u_i belongs to its own modulus and cannot be permuted."
          }
        },
        "leaf_basis": "calc"
      },
      {
        "id": "S04",
        "uses": [
          "G1",
          "S02",
          "S03"
        ],
        "before_tex": "x_*=\\sum_{i=1}^3 a_iN_iu_i",
        "after_tex": "x_*=2\\cdot35\\cdot2+3\\cdot21+2\\cdot15=233",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "加權和在每個模數只留下對應residue，給同時解。",
          "en": "For each modulus the weighted sum leaves only its corresponding residue, constructing a simultaneous solution."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S02",
            "S03"
          ],
          "explanation": {
            "zh-Hant": "三項都列出，沒有少一個congruence。",
            "en": "All three terms are explicit; no congruence is omitted."
          }
        },
        "leaf_basis": "calc"
      },
      {
        "id": "S05",
        "uses": [
          "G1",
          "S01",
          "S04"
        ],
        "before_tex": "x_*=233",
        "after_tex": "x_0=233-2\\cdot105=23,\\quad0\\le23<105",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "減去M倍數正規化，保留三個同餘。",
          "en": "Subtract a multiple of M to normalize while preserving every congruence."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S01",
            "S04"
          ],
          "explanation": {
            "zh-Hant": "正規化範圍是模product105，不是最大單模數7。",
            "en": "The normalization modulus is product 105, not the largest individual modulus 7."
          }
        },
        "leaf_basis": "calc"
      },
      {
        "id": "S06",
        "uses": [
          "G1",
          "S05"
        ],
        "before_tex": "x_0=23",
        "after_tex": "23=7\\cdot3+2=4\\cdot5+3=3\\cdot7+2",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "獨立逐式重驗全部三個residues。",
          "en": "Independently verify all three residues directly."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S05"
          ],
          "explanation": {
            "zh-Hant": "每個等式的商不同，不可只核模3便宣告全系統。",
            "en": "The quotients differ; checking only modulus 3 cannot certify the system."
          }
        },
        "leaf_basis": "calc"
      },
      {
        "id": "S07",
        "uses": [
          "G1",
          "S01",
          "S06"
        ],
        "before_tex": "m,n\\mid d,\\quad\\gcd(m,n)=1,\\quad um+vn=1",
        "after_tex": "d=mk,\\quad k=umk+vnk\\Rightarrow n\\mid k\\Rightarrow mn\\mid d",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "用Bezout證互質兩整除者的乘積也整除差d；依序對3、5、7套用。",
          "en": "Bezout proves that two coprime divisors of d have product dividing d; apply successively to 3,5,7."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S01",
            "S06"
          ],
          "explanation": {
            "zh-Hant": "n|mk源自n|d，n|vnk顯然；這不是無條件把lcm當product。",
            "en": "n divides mk since n divides d, and n divides vnk directly; this does not unconditionally identify lcm with product."
          }
        },
        "leaf_basis": "calc"
      },
      {
        "id": "S08",
        "uses": [
          "G1",
          "S01",
          "S06",
          "S07"
        ],
        "before_tex": "x,x'\\text{ solve the system}",
        "after_tex": "105\\mid x-x';\\quad x=23+105t,\\quad t\\in\\mathbb Z",
        "relation": "implies",
        "rule": "mko_definition",
        "conditions": [],
        "explanation": {
          "zh-Hant": "各模數整除兩解差，再由前步得到唯一mod105類；反向加105t保持所有方程。",
          "en": "Each modulus divides a solution difference; S07 gives uniqueness modulo 105, and adding 105t preserves all equations."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S01",
            "S06",
            "S07"
          ],
          "explanation": {
            "zh-Hant": "唯一是residue class，不是唯一整數23。",
            "en": "Uniqueness is of a residue class, not of the integer 23 alone."
          }
        },
        "leaf_basis": "mko_definition"
      },
      {
        "id": "S09",
        "uses": [
          "G1",
          "S08"
        ],
        "before_tex": "x\\equiv1\\pmod4,\\quad x\\equiv3\\pmod6",
        "after_tex": "x=9+12t\\text{ solves};\\quad\\gcd(4,6)=2,\\ 1\\equiv3\\pmod2",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "noncoprime仍可能相容；差需同mod gcd，這例週期lcm=12而非product24。",
          "en": "Noncoprime systems can be compatible; residues must agree modulo the gcd, and this example has lcm period 12 rather than product 24."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S08"
          ],
          "explanation": {
            "zh-Hant": "x≡1 mod4、2 mod6則奇偶衝突；不可把所有noncoprime都說無解。",
            "en": "The system 1 mod 4,2 mod 6 has conflicting parity, but not all noncoprime systems are inconsistent."
          }
        },
        "leaf_basis": "calc"
      }
    ],
    "result": {
      "zh-Hant": "x≡2 mod3、3 mod5、2 mod7的全部整數解為23+105t。",
      "en": "All integer solutions of x=2 mod 3, x=3 mod 5, x=2 mod 7 are 23+105t."
    },
    "negative_controls": [
      {
        "claim": {
          "zh-Hant": "主例唯一整數解23。",
          "en": "The main system has unique integer solution 23."
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "128=23+105也滿足全部方程。",
          "en": "128=23+105 satisfies every congruence too."
        }
      },
      {
        "claim": {
          "zh-Hant": "noncoprime模數必矛盾。",
          "en": "Noncoprime moduli are always inconsistent."
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "9滿足1 mod4及3 mod6。",
          "en": "9 satisfies 1 mod 4 and 3 mod 6."
        }
      },
      {
        "claim": {
          "zh-Hant": "模數0可照主公式處理。",
          "en": "Modulus zero can use the main construction."
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "要求正模數，M/mᵢ及同餘代表正規化在mᵢ=0無此意義。",
          "en": "Positive moduli are required; M/m_i and normalization do not have this meaning for m_i=0."
        }
      }
    ],
    "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. Explicitly assume the Bezout identity for coprime integers."
        }
      },
      {
        "id": "mko_definition",
        "kind": "cited",
        "statement": {
          "zh-Hant": "residues正規化，使用modular inverses構造x並核全部congruences。唯一性是mod product而非integer unique。modulus0無效；noncoprime不在CRT假設內但可相容，需pairwise gcd compatibility且一般mod lcm唯一。",
          "en": "Normalize residues, construct a simultaneous solution using modular-inverse methods and check every congruence. Uniqueness is modulo the product, not uniqueness as an integer. Modulus zero is invalid. A noncoprime system is outside the main hypothesis but may be compatible; test pairwise gcd conditions and use the lcm period in general."
        },
        "source": {
          "mko_id": "mko-chinese-remainder-theorem",
          "sha256": "97d98262a4c1d1774983902029b0e964992d7472332d99d3c22e80f77a1a44cc",
          "commit": "b1b2f1dcf8c50d67a93fe52d95f8eef7b3abba9f"
        }
      }
    ],
    "revision_log": [],
    "numeric_checks": [
      {
        "id": "construct",
        "lhs": "2*35*2+3*21+2*15",
        "rhs": "233",
        "step": "S04"
      },
      {
        "id": "normalize",
        "lhs": "233%105",
        "rhs": "23",
        "step": "S05"
      }
    ]
  },
  "presentation": {
    "md_scope": {
      "zh-Hant": "正pairwise-coprime主例及noncoprime相容界線，所有算術精確。",
      "en": "A positive pairwise-coprime instance and noncoprime compatibility boundaries, using exact arithmetic."
    },
    "md_symbols": [
      [
        "M",
        "三模數乘積",
        "product of three moduli"
      ],
      [
        "N_i,u_i",
        "權重與模逆元",
        "weights and modular inverses"
      ]
    ],
    "md_error_controls": [
      {
        "title": "逐式驗證 / Every congruence",
        "zh": "23必分別核mod3、5、7。",
        "en": "Check 23 separately modulo 3,5,7."
      },
      {
        "title": "唯一類 / Unique class",
        "zh": "product唯一性要pairwise-coprime；noncoprime另看gcd與lcm。",
        "en": "Product-modulus uniqueness needs pairwise coprimality; otherwise audit gcd and lcm separately."
      }
    ],
    "md_open_items": []
  },
  "revision": {
    "id": "ocme-new142-reader-adoption-20261021",
    "collection": "coverage-20261021",
    "source_commit": "b1b2f1dcf8c50d67a93fe52d95f8eef7b3abba9f",
    "adopted_source_sha256": "ab307688f99c20980966f2ca78007d3dfe060ce98516b950fbbb6050f695a939",
    "original_source_sha256": "ab307688f99c20980966f2ca78007d3dfe060ce98516b950fbbb6050f695a939",
    "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."
  }
}
