{
  "schema_version": "ocme-derivation-reader-v1",
  "guide_id": "derivation-mko-linear-diophantine-equation-01",
  "mko_id": "mko-linear-diophantine-equation",
  "title": {
    "zh-Hant": "負係數方程的全部整數解",
    "en": "All integer solutions with a negative coefficient"
  },
  "contract": {
    "schema_version": "ocme-derivation-guide-v0.1",
    "guide_id": "derivation-mko-linear-diophantine-equation-01",
    "source": {
      "mko_id": "mko-linear-diophantine-equation",
      "commit": "b1b2f1dcf8c50d67a93fe52d95f8eef7b3abba9f",
      "sha256": "f0c63a1636cb208e054adfa59fdc5cb29078971741ce31fd2c59710199df6a79",
      "english_sha256": "77cad5a116f985108c11f12cd56c1fc7c6f88ab25c327092ad4ad569e0f44a3d"
    },
    "mode": "worked_example",
    "audience_prerequisites": [
      "calc"
    ],
    "goal": {
      "zh-Hant": "−6x+9y=15全部解為x=5+3t,y=5+2t，t∈Z。",
      "en": "All integer solutions of -6x+9y=15 are x=5+3t,y=5+2t, t in Z."
    },
    "givens": [
      {
        "id": "G1",
        "statement": {
          "zh-Hant": "a=−6,b=9,c=15；x,y須為整數，gcd使用非負慣例。",
          "en": "a=-6,b=9,c=15; x,y are integers and gcd is nonnegative."
        }
      }
    ],
    "steps": [
      {
        "id": "S01",
        "uses": [
          "G1"
        ],
        "before_tex": "9=1\\cdot6+3,\\quad6=2\\cdot3+0",
        "after_tex": "d=\\gcd(-6,9)=3,\\quad3=(-6)\\cdot1+9\\cdot1",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "Euclid完整兩步給gcd3並回代Bezout式。",
          "en": "Two complete Euclidean steps give gcd 3 and its Bezout identity."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1"
          ],
          "explanation": {
            "zh-Hant": "−6原符號已恢復，1、1係數直接核正確。",
            "en": "The original -6 sign is restored, and coefficients 1,1 check directly."
          }
        },
        "leaf_basis": "calc"
      },
      {
        "id": "S02",
        "uses": [
          "G1",
          "S01"
        ],
        "before_tex": "-6x+9y=15",
        "after_tex": "3\\mid(-6x+9y),\\quad3\\mid15",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "任何解必使gcd整除右側，此例通過必要條件。",
          "en": "Every solution requires the gcd to divide the right side, which holds here."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S01"
          ],
          "explanation": {
            "zh-Hant": "這只證必要性；存在解仍由下一步構造。",
            "en": "This is only necessity; the next step constructs a solution."
          }
        },
        "leaf_basis": "calc"
      },
      {
        "id": "S03",
        "uses": [
          "G1",
          "S01",
          "S02"
        ],
        "before_tex": "3=(-6)1+9(1),\\quad15=5\\cdot3",
        "after_tex": "x_0=5,\\quad y_0=5,\\quad-6(5)+9(5)=15",
        "relation": "implies",
        "rule": "calc",
        "conditions": [
          "d=3>0",
          "d divides c"
        ],
        "explanation": {
          "zh-Hant": "把Bezout係數乘c/d=5得一個整數特解，證充分性。",
          "en": "Scaling Bezout coefficients by c/d=5 constructs an integer particular solution, proving sufficiency here."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S01",
            "S02"
          ],
          "explanation": {
            "zh-Hant": "d=3非零，c/d是整數，因此縮放合法。",
            "en": "d=3 is nonzero and c/d is integral, so scaling is valid."
          }
        },
        "leaf_basis": "calc"
      },
      {
        "id": "S04",
        "uses": [
          "G1",
          "S03"
        ],
        "before_tex": "x=5+3t,\\quad y=5+2t,\\quad t\\in\\mathbb Z",
        "after_tex": "-6x+9y=15+(-18+18)t=15",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "所有此參數值均給解，步長為b/d=3及−a/d=2。",
          "en": "Every parameter value solves the equation, with steps b/d=3 and -a/d=2."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S03"
          ],
          "explanation": {
            "zh-Hant": "係數負號使y步長為正2，不是−2。",
            "en": "The negative a makes y's step positive 2, not -2."
          }
        },
        "leaf_basis": "calc"
      },
      {
        "id": "S05",
        "uses": [
          "G1",
          "S03"
        ],
        "before_tex": "(x,y)\\text{ any solution},\\quad u=x-5,\\ v=y-5",
        "after_tex": "-6u+9v=0\\iff2u=3v",
        "relation": "equivalent",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "任意解減特解，取得齊次整數關係。",
          "en": "Subtract the particular solution from an arbitrary solution to get the homogeneous integer relation."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "G1",
            "S03"
          ],
          "explanation": {
            "zh-Hant": "除3合法且兩邊均可整除，沒有丟解。",
            "en": "Division by 3 is exact on both sides and loses no solutions."
          }
        },
        "leaf_basis": "calc"
      },
      {
        "id": "S06",
        "uses": [
          "G1",
          "S05"
        ],
        "before_tex": "2u=3v",
        "after_tex": "2u\\equiv0\\pmod3\\Rightarrow u\\equiv0\\pmod3\\Rightarrow u=3t",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "模3中2·2≡1，故乘2可消去2，所有u必為3倍。",
          "en": "Since 2*2=1 modulo 3, multiplication by 2 cancels the factor, forcing u to be a multiple of 3."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S05"
          ],
          "explanation": {
            "zh-Hant": "消去用已明示的逆2，不是任意模數都能消去。",
            "en": "Cancellation uses the explicitly known inverse 2, not unconditional modular division."
          }
        },
        "leaf_basis": "calc"
      },
      {
        "id": "S07",
        "uses": [
          "G1",
          "S04",
          "S05",
          "S06"
        ],
        "before_tex": "u=3t,\\quad2u=3v",
        "after_tex": "v=2t,\\quad x=5+3t,\\ y=5+2t",
        "relation": "implies",
        "rule": "mko_definition",
        "conditions": [],
        "explanation": {
          "zh-Hant": "代回整數等式除非零3得v=2t，證任意解都在已列族內。",
          "en": "Substitute back and divide the integer equality by nonzero 3 to get v=2t, proving completeness."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S04",
            "S05",
            "S06"
          ],
          "explanation": {
            "zh-Hant": "S04給每個參數是解，S05至S07給每個解有參數，兩方向完備。",
            "en": "S04 proves every parameter is a solution; S05-S07 prove every solution has a parameter."
          }
        },
        "leaf_basis": "mko_definition"
      },
      {
        "id": "S08",
        "uses": [
          "G1"
        ],
        "before_tex": "0x+9y=18",
        "after_tex": "y=2,\\quad x\\in\\mathbb Z\\text{ arbitrary}",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "單零係數仍能求解，x完全自由，不得漏掉此分支。",
          "en": "A single zero coefficient is solvable with x entirely free; this case must not be omitted."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1"
          ],
          "explanation": {
            "zh-Hant": "此處gcd(0,9)=9非零，並非雙零退化。",
            "en": "Here gcd(0,9)=9 is nonzero, unlike double-zero degeneracy."
          }
        },
        "leaf_basis": "calc"
      },
      {
        "id": "S09",
        "uses": [
          "G1",
          "S08"
        ],
        "before_tex": "0x+0y=c",
        "after_tex": "c=0\\Rightarrow\\mathbb Z^2;\\qquad c\\ne0\\Rightarrow\\varnothing",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "雙零係數時左右變成0=c，分別所有整數對或無解，永不除以d=0。",
          "en": "Double-zero coefficients reduce to 0=c, giving all integer pairs or none, never division by gcd zero."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S08"
          ],
          "explanation": {
            "zh-Hant": "c=0時不能把參數族縮成單一解(0,0)。",
            "en": "For c=0 the solution set cannot be reduced to the one pair (0,0)."
          }
        },
        "leaf_basis": "calc"
      }
    ],
    "result": {
      "zh-Hant": "−6x+9y=15全部解為x=5+3t,y=5+2t，t∈Z。",
      "en": "All integer solutions of -6x+9y=15 are x=5+3t,y=5+2t, t in Z."
    },
    "negative_controls": [
      {
        "claim": {
          "zh-Hant": "只需列(5,5)便是全部解。",
          "en": "Listing (5,5) gives all solutions."
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "t=1給不同解(8,7)。",
          "en": "t=1 gives the distinct solution (8,7)."
        }
      },
      {
        "claim": {
          "zh-Hant": "y步長應為−2。",
          "en": "The y-step should be -2."
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "x=5+3t,y=5−2t使左側15−36t，不恒等15。",
          "en": "x=5+3t,y=5-2t gives 15-36t, not identically 15."
        }
      },
      {
        "claim": {
          "zh-Hant": "雙零係數可使用c/d且d=0。",
          "en": "Double-zero coefficients allow c/d with d=0."
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "除零非法，必先分0=c兩分支。",
          "en": "Zero division is invalid; split on 0=c first."
        }
      }
    ],
    "status": "candidate",
    "gaps": [],
    "verification": {
      "structure": "checked_local_script",
      "mathematics": "candidate_argument",
      "formalization": "not_formalized"
    },
    "rule_glossary": [
      {
        "id": "calc",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "假設精確整數算術、帶餘除法、整除與gcd的定義；同餘等式始終綁定明示模數。",
          "en": "Assume exact integer arithmetic, division with remainder, and definitions of divisibility and gcd; every congruence has an explicit modulus."
        }
      },
      {
        "id": "mko_definition",
        "kind": "cited",
        "statement": {
          "zh-Hant": "使用extended Euclidean Bézout證書構造particular solution；若d=gcd(a,b)整除c，全部解為x=x0+(b/d)t、y=y0-(a/d)t。a=b=0時c=0有所有整數對，c非零則無解且不得除以d=0。",
          "en": "Use an extended Euclidean Bezout certificate for a particular solution. If d=gcd(a,b) divides c, all solutions are x=x0+(b/d)t and y=y0−(a/d)t, t∈Z. When a=b=0, c=0 permits every integer pair and c≠0 permits none; never divide by d=0."
        },
        "source": {
          "mko_id": "mko-linear-diophantine-equation",
          "sha256": "f0c63a1636cb208e054adfa59fdc5cb29078971741ce31fd2c59710199df6a79",
          "commit": "b1b2f1dcf8c50d67a93fe52d95f8eef7b3abba9f"
        }
      }
    ],
    "revision_log": [],
    "numeric_checks": [
      {
        "id": "particular",
        "lhs": "-6*5+9*5",
        "rhs": "15",
        "step": "S03"
      },
      {
        "id": "identity",
        "lhs": "-6*(5+3*t)+9*(5+2*t)",
        "rhs": "15",
        "step": "S04",
        "vars": [
          "t"
        ],
        "degree": 1
      }
    ]
  },
  "presentation": {
    "md_scope": {
      "zh-Hant": "二變數精確整數方程、完整參數化及零係數分支。",
      "en": "An exact two-variable integer equation, complete parameterization and zero-coefficient cases."
    },
    "md_symbols": [
      [
        "t",
        "任意整數參數",
        "arbitrary integer parameter"
      ],
      [
        "d",
        "非負gcd",
        "nonnegative gcd"
      ]
    ],
    "md_error_controls": [
      {
        "title": "完整性 / Completeness",
        "zh": "代回只證族內都是解，還需任意解減特解證反向。",
        "en": "Substitution proves only that the family consists of solutions; subtract a particular solution to prove the converse."
      },
      {
        "title": "gcd正規化 / Normalized gcd",
        "zh": "d=3而非−3，步長分別3、2。",
        "en": "d=3, not -3, with step sizes 3 and 2."
      }
    ],
    "md_open_items": []
  },
  "revision": {
    "id": "ocme-new142-reader-adoption-20261021",
    "collection": "coverage-20261021",
    "source_commit": "b1b2f1dcf8c50d67a93fe52d95f8eef7b3abba9f",
    "adopted_source_sha256": "51507b62feb5851a8cf0c74a7f420b24a166be908dc2a9f02c03852a04af9026",
    "original_source_sha256": "4e219790cfd274009340791ffd283bde4d21693b21fdc40ee88a5d801a4090e1",
    "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": [
      "BR142-P035",
      "BR142-P036"
    ],
    "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."
  }
}
