{
  "$schema": "../../../schemas/mko-v0.4.schema.json",
  "schema_version": "mko-v0.4",
  "id": "mko-distance-formula",
  "semantic_family_id": "sf-distance-formula",
  "type": "definition",
  "version": "0.10.0",
  "language": "zh-Hant",
  "titles": {
    "zh-Hant": "等單位正交座標的歐氏距離"
  },
  "summary": {
    "zh-Hant": "在同一等尺度正交座標系，用非負主平方根讀取二維歐氏距離。"
  },
  "statement": {
    "zh-Hant": "在平面同一等單位正交座標系，P=(px,py)、Q=(qx,qy) 的歐氏距離為 d(P,Q)=√((qx−px)²+(qy−py)²)≥0。距離平方是兩個座標差平方之和；比較兩個距離可比較其非負平方值。"
  },
  "formula": {
    "tex": "d(P,Q)",
    "mathml": "<math xmlns=\"http://www.w3.org/1998/Math/MathML\"><mrow><mi>d</mi><mo>(</mo><mi>P</mi><mo>,</mo><mi>Q</mi><mo>)</mo></mrow></math>",
    "semantic_ast": {
      "type": "function_call",
      "callee": {
        "type": "symbol",
        "name": "d",
        "glyph": "d"
      },
      "arguments": [
        {
          "type": "symbol",
          "name": "P",
          "glyph": "P"
        },
        {
          "type": "symbol",
          "name": "Q",
          "glyph": "Q"
        }
      ]
    },
    "compiler": {
      "id": "ocme-formula-core",
      "version": "0.4.0",
      "source_sha256": "b3d121cd07a1f8414e25c25c83997355fa466dc0bb19f90290f474a5b9b04d14"
    }
  },
  "assumptions": [
    {
      "id": "a1",
      "zh-Hant": "兩點在同一正交座標系，兩軸採同一長度單位；不直接把非正交或不等尺度數值當歐氏距離。"
    },
    {
      "id": "a2",
      "zh-Hant": "題庫採整數座標；距離平方與比較精確，直接整數距離題另要求平方和是完全平方。"
    },
    {
      "id": "a3",
      "zh-Hant": "候選距離需非負且平方等於平方和；重合點距離零合法。"
    }
  ],
  "symbols": [
    {
      "token": "d",
      "role": "euclidean_distance",
      "role_zh": "平面歐氏距離",
      "scope": "representative_formula"
    },
    {
      "token": "P",
      "role": "coordinate_point",
      "role_zh": "第一點",
      "scope": "representative_formula"
    },
    {
      "token": "Q",
      "role": "coordinate_point",
      "role_zh": "第二點",
      "scope": "representative_formula"
    }
  ],
  "dependencies": [
    {
      "id": "mko-coordinate-plane",
      "title_zh": "座標平面",
      "reason_zh": "明示同一座標框架。"
    },
    {
      "id": "mko-power-root",
      "title_zh": "自然數冪與主平方根",
      "reason_zh": "平方和與非負主根。"
    },
    {
      "id": "mko-euclidean-length",
      "title_zh": "歐氏長度",
      "reason_zh": "距離與長度單位的語義。"
    }
  ],
  "explanation": {
    "paragraphs_zh": [
      "此式是歐氏 L2 距離。程式與未來 Lean 橋須明選 EuclideanSpace，而非把普通 Prod R R 的預設度量當同一公式。",
      "交換兩點、共同平移、改變差的正負或互換軸不改變距離，不能只靠這些表示變動填滿題量。非完全平方的平方和不採浮點根冒充精確整數。",
      "候選負根即使平方正確仍不是距離。舊畢氏物件的指定邊模型及既有有限證據不是任意座標點距離的 proof，本條目不繼承它們。"
    ],
    "common_misconception_zh": "把負平方根當距離，忽略座標框架，或把另一個度量的型別當成歐氏距離。"
  },
  "proofs": [],
  "computational_companions": [],
  "verification": {
    "computational_status": "not_evaluated_no_computational_claim",
    "warning_zh": "整數座標精確切片可重算；座標幾何與 EuclideanSpace 橋尚未附形式 Evidence。",
    "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": "在專案固定版綁定 EuclideanSpace R (Fin 2)、平方範數與非負距離，而非普通乘積度量。"
  },
  "provenance": {
    "origin": "ocme_local_ai_materialization_candidate",
    "note_zh": "依 research/atlas-distance-formula.md 整理；2026-10-05 脈衝 R04（使用者手動接續 2026-10-06 工作序列；實際日期仍為 2026-10-05），英文及 Lean 依使用者指示延後。",
    "content_license": "CC-BY-SA-4.0",
    "code_license": "MIT",
    "created_at": "2026-10-05"
  }
}
