{
  "$schema": "../../../schemas/mko-v0.4.schema.json",
  "schema_version": "mko-v0.4",
  "id": "mko-gcd-coprime",
  "semantic_family_id": "sf-gcd-coprime",
  "type": "definition",
  "version": "0.10.0",
  "language": "zh-Hant",
  "titles": {
    "zh-Hant": "最大公因數與互質"
  },
  "summary": {
    "zh-Hant": "gcd(a,b) 是同時整除 a、b 且被每個公因數整除的自然數；gcd=1 時稱互質。"
  },
  "statement": {
    "zh-Hant": "自然數 d=gcd(a,b) 由 d∣a、d∣b，且每個同時整除 a、b 的自然數 c 都滿足 c∣d 刻畫。採 gcd(0,0)=0；a、b 互質表示 gcd(a,b)=1。"
  },
  "formula": {
    "tex": "d=g(a,b)",
    "mathml": "<math xmlns=\"http://www.w3.org/1998/Math/MathML\"><mrow><mi>d</mi><mo>=</mo><mrow><mi>g</mi><mo>(</mo><mi>a</mi><mo>,</mo><mi>b</mi><mo>)</mo></mrow></mrow></math>",
    "semantic_ast": {
      "type": "equation",
      "lhs": {
        "type": "symbol",
        "name": "d",
        "glyph": "d"
      },
      "rhs": {
        "type": "function_call",
        "callee": {
          "type": "symbol",
          "name": "g",
          "glyph": "g"
        },
        "arguments": [
          {
            "type": "symbol",
            "name": "a",
            "glyph": "a"
          },
          {
            "type": "symbol",
            "name": "b",
            "glyph": "b"
          }
        ]
      }
    },
    "compiler": {
      "id": "ocme-formula-core",
      "version": "0.4.0",
      "source_sha256": "11ce36e5774e281a073f35e81a656080f1a18980a4d378e2593d9a5cd4882131"
    }
  },
  "assumptions": [
    {
      "id": "a1",
      "zh-Hant": "a、b 是自然數，允許其中一個或兩個為 0。"
    },
    {
      "id": "a2",
      "zh-Hant": "最大性以整除關係刻畫；在自然數中與通常的數值最大公因數一致。"
    }
  ],
  "symbols": [
    {
      "token": "d",
      "role": "greatest_common_divisor",
      "role_zh": "最大公因數",
      "scope": "representative_formula"
    },
    {
      "token": "g",
      "role": "gcd_operation",
      "role_zh": "最大公因數運算",
      "scope": "representative_formula"
    },
    {
      "token": "a",
      "role": "first_natural",
      "role_zh": "第一自然數",
      "scope": "representative_formula"
    },
    {
      "token": "b",
      "role": "second_natural",
      "role_zh": "第二自然數",
      "scope": "representative_formula"
    }
  ],
  "dependencies": [
    {
      "id": "mko-natural-divisibility",
      "title_zh": "自然數整除",
      "reason_zh": "公因數與最大性都以整除關係表達。"
    }
  ],
  "explanation": {
    "paragraphs_zh": [
      "歐幾里得算法反覆以非零除數的餘數取代較大輸入，直到餘數為零；最後非零值是 gcd。對 (0,0) 另採 0。",
      "驗證候選 d 不只要檢查 d 同時整除兩數，還要檢查全部公因數都整除 d；只找到一個大公因數不夠。",
      "互質不表示兩數都是質數。例如 8 與 15 互質；0 與 1 互質，但 0 與大於 1 的數不互質。"
    ],
    "common_misconception_zh": "把任何共同因數稱為最大公因數，或把互質誤解成兩個數本身都必須是質數。"
  },
  "proofs": [],
  "computational_companions": [],
  "verification": {
    "computational_status": "not_evaluated_no_computational_claim",
    "warning_zh": "自然數上的歐幾里得算法可精確重算；本輪不建立 Bézout 整數係數的形式證明。",
    "evidence_refs": [],
    "producers": [
      {
        "id": "lean-mathlib",
        "adapter": "formal_system",
        "config_path": "formal/lean/lakefile.toml",
        "status": "configured"
      }
    ]
  },
  "formalization": {
    "status": "not_formalized",
    "target_systems": [
      "Lean 4",
      "Mathlib"
    ],
    "next_obligation_zh": "綁定 Nat.gcd、Nat.dvd_gcd、Nat.gcd_dvd_left/right、gcd_greatest 與 Nat.Coprime。"
  },
  "provenance": {
    "origin": "ocme_local_ai_materialization_candidate",
    "note_zh": "依 research/atlas-gcd-coprime.md 整理；2026-10-13 脈衝 R03（使用者手動接續 2026-10-18 工作序列；實際日期仍為 2026-10-13），英文及 Lean 依使用者指示延後。",
    "content_license": "CC-BY-SA-4.0",
    "code_license": "MIT",
    "created_at": "2026-10-13"
  }
}
