{
  "schema_version": "ocme-derivation-reader-v1",
  "guide_id": "derivation-mko-euclidean-length-01",
  "mko_id": "mko-euclidean-length",
  "title": {
    "zh-Hant": "歐幾里得長度：由座標精確計算兩點距離",
    "en": "Euclidean length: computing the distance between two points exactly from coordinates"
  },
  "contract": {
    "schema_version": "ocme-derivation-guide-v0.1",
    "guide_id": "derivation-mko-euclidean-length-01",
    "source": {
      "mko_id": "mko-euclidean-length",
      "commit": "b28a5edbd46279b1db2a3f3f48bb3f447e18899f",
      "sha256": "485948172a6b39e7ec2cf3170ab03489fed98190d0c868161fbbd037f7151e91",
      "english_sha256": "b3ddf0a703643ec48198e001b53296e8991e8855e011f8b9ac9462cd47d53435"
    },
    "mode": "worked_example",
    "audience_prerequisites": [
      "square_nonneg",
      "sqrt_def",
      "order_basics",
      "cartesian_product_def",
      "numeric_evaluation"
    ],
    "goal": {
      "zh-Hant": "在以 ℝ² 表示的歐幾里得平面中，設 P=(1,−2)、Q=(4,2)、R=(2,3)。精確算出 d(P,Q)=5；算出 d(P,R)=√26，並以平方比較證明 5.09<√26<5.1，說明 5.1 只是近似值。另對一般的實數坐標證明：距離有定義且非負、d(Q,P)=d(P,Q)、d(P,P)=0，以及 d(P,Q)=0 ⇔ P=Q。",
      "en": "In the Euclidean plane represented by ℝ², let P=(1,−2), Q=(4,2), R=(2,3). Compute d(P,Q)=5 exactly; compute d(P,R)=√26 and prove by comparing squares that 5.09<√26<5.1, showing that 5.1 is only an approximation. For general real coordinates, also prove that the distance is defined and nonnegative, that d(Q,P)=d(P,Q), that d(P,P)=0, and that d(P,Q)=0 ⇔ P=Q."
    },
    "givens": [
      {
        "id": "G1",
        "statement": {
          "zh-Hant": "模型：歐幾里得平面以 ℝ² 表示，點的座標為實數（MKO 假設 a1、a2）。",
          "en": "Model: the Euclidean plane is represented by ℝ², and the coordinates of points are real numbers (MKO assumptions a1, a2)."
        }
      },
      {
        "id": "G2",
        "statement": {
          "zh-Hant": "距離的定義：P=(x₁,y₁)、Q=(x₂,y₂) 時，d(P,Q)=√((x₂−x₁)²+(y₂−y₁)²)，√ 取非負主值（MKO 假設 a3）。",
          "en": "Definition of distance: for P=(x₁,y₁) and Q=(x₂,y₂), d(P,Q)=√((x₂−x₁)²+(y₂−y₁)²), where √ is the nonnegative principal value (MKO assumption a3)."
        }
      },
      {
        "id": "G3",
        "statement": {
          "zh-Hant": "P=(1,−2)、Q=(4,2)、R=(2,3)。",
          "en": "P=(1,−2), Q=(4,2), R=(2,3)."
        }
      }
    ],
    "steps": [
      {
        "id": "S01",
        "uses": [
          "G1",
          "G2",
          "mko_length_def"
        ],
        "before_tex": "d(P,Q)",
        "after_tex": "\\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}",
        "relation": "definition",
        "rule": "mko_length_def",
        "conditions": [],
        "explanation": {
          "zh-Hant": "依 MKO 的定義：先算兩個座標差，各自平方，相加，最後取非負主平方根。順序是「差、平方、相加、開方」，不可把座標差直接相加。這個定義把水平位移與垂直位移看成互相垂直的兩個分量。",
          "en": "By the MKO's definition: take the two coordinate differences, square each, add, and finally take the nonnegative principal square root. The order is 'difference, square, add, root'; the coordinate differences may not be added directly. The definition treats the horizontal and vertical displacements as two perpendicular components."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G2",
            "mko_length_def"
          ],
          "explanation": {
            "zh-Hant": "此步只寫出定義；√ 是否有定義要在 S02 確認。",
            "en": "This step only states the definition; whether the root is defined is checked in S02."
          }
        },
        "leaf_basis": "mko_length_def + def_unfold"
      },
      {
        "id": "S02",
        "uses": [
          "S01",
          "square_nonneg"
        ],
        "before_tex": "s=(x_2-x_1)^2+(y_2-y_1)^2",
        "after_tex": "s\\ge 0,\\ d(P,Q)=\\sqrt{s}\\ge 0",
        "relation": "implies",
        "rule": "square_nonneg",
        "conditions": [
          "x_1,y_1,x_2,y_2\\in\\mathbb{R}"
        ],
        "explanation": {
          "zh-Hant": "兩個平方都 ≥0（實數平方非負），兩個非負數的和也 ≥0（序與加法），所以被開方數 s≥0，√s 有定義；依主平方根的定義，√s≥0。所以對任何兩點，距離都有定義且非負（MKO 假設 a3）。",
          "en": "Both squares are ≥0 (squares of reals are nonnegative), and a sum of two nonnegative numbers is ≥0 (order and addition), so the radicand s≥0 and √s is defined; by the definition of the principal root, √s≥0. So for any two points the distance is defined and nonnegative (MKO assumption a3)."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "square_nonneg",
            "order_basics",
            "sqrt_def"
          ],
          "explanation": {
            "zh-Hant": "需要實數平方非負；若坐標可以是一般的複數，這一步不成立，所以假設 a2（實數坐標）不可省。",
            "en": "It needs squares of reals to be nonnegative; if coordinates could be arbitrary complex numbers this would fail, so assumption a2 (real coordinates) cannot be dropped."
          }
        },
        "leaf_basis": "square_nonneg + order_basics + sqrt_def"
      },
      {
        "id": "S03",
        "uses": [
          "G3",
          "S01"
        ],
        "before_tex": "x_2-x_1,\\ y_2-y_1\\ \\text{for}\\ P,Q",
        "after_tex": "4-1=3,\\ 2-(-2)=4",
        "relation": "equivalent",
        "rule": "numeric_evaluation",
        "conditions": [],
        "explanation": {
          "zh-Hant": "P=(1,−2)、Q=(4,2)：x₂−x₁=4−1=3，y₂−y₁=2−(−2)=2+2=4。減去負數等於加上它的相反數。",
          "en": "P=(1,−2), Q=(4,2): x₂−x₁=4−1=3 and y₂−y₁=2−(−2)=2+2=4. Subtracting a negative number adds its opposite."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "numeric_evaluation",
            "add_inverse"
          ],
          "explanation": {
            "zh-Hant": "反向：1+3=4、−2+4=2，還原 Q 的座標。",
            "en": "Backward: 1+3=4 and −2+4=2 give back the coordinates of Q."
          }
        },
        "leaf_basis": "numeric_evaluation + add_inverse + neg_mul"
      },
      {
        "id": "S04",
        "uses": [
          "S03"
        ],
        "before_tex": "3^2+4^2",
        "after_tex": "25",
        "relation": "equivalent",
        "rule": "numeric_evaluation",
        "conditions": [],
        "explanation": {
          "zh-Hant": "先平方再相加：3²=9、4²=16，9+16=25。",
          "en": "Square first, then add: 3²=9, 4²=16, and 9+16=25."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "numeric_evaluation"
          ],
          "explanation": {
            "zh-Hant": "精確整數運算，可獨立重算（N3）。",
            "en": "Exact integer arithmetic, independently recomputable (N3)."
          }
        },
        "leaf_basis": "numeric_evaluation + power_laws"
      },
      {
        "id": "S05",
        "uses": [
          "S02",
          "S04",
          "sqrt_def"
        ],
        "before_tex": "d(P,Q)=\\sqrt{25}",
        "after_tex": "d(P,Q)=5",
        "relation": "equivalent",
        "rule": "sqrt_def",
        "conditions": [
          "25\\ge 0"
        ],
        "explanation": {
          "zh-Hant": "依主平方根的定義，√25 是唯一滿足 b≥0 且 b²=25 的實數 b。b=5 滿足 5≥0 且 5²=25，所以 √25=5。−5 也滿足 (−5)²=25，但 −5<0，不是主值；距離不能是 −5。",
          "en": "By the definition of the principal root, √25 is the unique real b with b≥0 and b²=25. b=5 satisfies 5≥0 and 5²=25, so √25=5. −5 also satisfies (−5)²=25, but −5<0, so it is not the principal value; a distance cannot be −5."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "sqrt_def",
            "numeric_evaluation"
          ],
          "explanation": {
            "zh-Hant": "反向：5²=25 且 5≥0，正是 √25=5 的刻畫；唯一性由定義保證。",
            "en": "Backward: 5²=25 and 5≥0 is exactly the characterization of √25=5; uniqueness is part of the definition."
          }
        },
        "leaf_basis": "sqrt_def + numeric_evaluation + order_basics"
      },
      {
        "id": "S06",
        "uses": [
          "S01",
          "L_neg_sq"
        ],
        "before_tex": "d(Q,P)=\\sqrt{(x_1-x_2)^2+(y_1-y_2)^2}",
        "after_tex": "\\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}=d(P,Q)",
        "relation": "equivalent",
        "rule": "L_neg_sq",
        "conditions": [],
        "explanation": {
          "zh-Hant": "交換 P、Q 時，每個座標差變號：x₁−x₂=−(x₂−x₁)。依引理 L_neg_sq，(x₁−x₂)²=(x₂−x₁)²，y 坐標同理，所以被開方數相同，d(Q,P)=d(P,Q)，對所有實數坐標都成立。例：d(Q,P)=√((1−4)²+(−2−2)²)=√(9+16)=5。引理在 S06.1 證明。",
          "en": "Swapping P and Q changes the sign of each difference: x₁−x₂=−(x₂−x₁). By Lemma L_neg_sq, (x₁−x₂)²=(x₂−x₁)², and likewise for y, so the radicands agree and d(Q,P)=d(P,Q) for all real coordinates. Example: d(Q,P)=√((1−4)²+(−2−2)²)=√(9+16)=5. The lemma is proved in S06.1."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "L_neg_sq",
            "eq_replace"
          ],
          "explanation": {
            "zh-Hant": "兩邊的被開方數逐項相等，等值代換雙向成立。",
            "en": "The radicands agree term by term, so the replacement of equals holds both ways."
          }
        },
        "leaf_basis": "L_neg_sq + eq_replace"
      },
      {
        "id": "S06.1",
        "uses": [
          "add_inverse",
          "neg_mul"
        ],
        "before_tex": "(p-q)^2",
        "after_tex": "(q-p)^2",
        "relation": "equivalent",
        "rule": "neg_mul",
        "conditions": [],
        "explanation": {
          "zh-Hant": "p−q=−(q−p)（加法反元素）；依負號與乘法 (−w)(−w)=w·w，所以 (p−q)²=(−(q−p))²=(q−p)²。這證得引理 L_neg_sq；它是多項式恆等式（N6）。",
          "en": "p−q=−(q−p) (additive inverses); by signs and multiplication (−w)(−w)=w·w, so (p−q)²=(−(q−p))²=(q−p)². This proves Lemma L_neg_sq; it is a polynomial identity (N6)."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "neg_mul",
            "add_inverse"
          ],
          "explanation": {
            "zh-Hant": "恆等式，雙向成立。",
            "en": "It is an identity and holds both ways."
          }
        },
        "leaf_basis": "neg_mul + add_inverse + distributive"
      },
      {
        "id": "S07",
        "uses": [
          "S01",
          "sqrt_def"
        ],
        "before_tex": "d(P,P)=\\sqrt{(x_1-x_1)^2+(y_1-y_1)^2}",
        "after_tex": "\\sqrt{0}=0",
        "relation": "equivalent",
        "rule": "sqrt_def",
        "conditions": [],
        "explanation": {
          "zh-Hant": "P 與自己比較時，兩個座標差都是 0，被開方數是 0²+0²=0；0≥0 且 0²=0，所以 √0=0，d(P,P)=0。",
          "en": "Comparing P with itself, both differences are 0 and the radicand is 0²+0²=0; 0≥0 and 0²=0, so √0=0 and d(P,P)=0."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "sqrt_def",
            "mul_zero",
            "add_zero"
          ],
          "explanation": {
            "zh-Hant": "唯一滿足 b≥0、b²=0 的是 b=0，雙向成立。",
            "en": "The only b with b≥0 and b²=0 is b=0, so the step holds both ways."
          }
        },
        "leaf_basis": "sqrt_def + mul_zero + add_zero + add_inverse"
      },
      {
        "id": "S08",
        "uses": [
          "S02",
          "S07",
          "sqrt_def"
        ],
        "before_tex": "\\sqrt{s}=0\\ \\ (s\\ge 0)",
        "after_tex": "s=0",
        "relation": "equivalent",
        "rule": "sqrt_def",
        "conditions": [
          "s\\ge 0"
        ],
        "explanation": {
          "zh-Hant": "⇒：依主平方根定義 (√s)²=s，所以 s=0²=0。⇐：s=0 時 √0=0（S07）。這把「距離為 0」轉成「被開方數為 0」。",
          "en": "⇒: by the definition of the principal root, (√s)²=s, so s=0²=0. ⇐: if s=0 then √0=0 (S07). This turns 'distance 0' into 'radicand 0'."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "sqrt_def",
            "S07"
          ],
          "explanation": {
            "zh-Hant": "兩個方向各有理由；需要 s≥0（S02），否則 √s 沒有定義。",
            "en": "Each direction has its own reason; s≥0 (S02) is needed, otherwise √s is undefined."
          }
        },
        "leaf_basis": "sqrt_def + eq_congruence + mul_zero"
      },
      {
        "id": "S09",
        "uses": [
          "S08",
          "L_sum_sq_zero"
        ],
        "before_tex": "(x_2-x_1)^2+(y_2-y_1)^2=0",
        "after_tex": "x_2=x_1\\ \\land\\ y_2=y_1\\ \\iff\\ P=Q",
        "relation": "equivalent",
        "rule": "L_sum_sq_zero",
        "conditions": [],
        "explanation": {
          "zh-Hant": "依引理 L_sum_sq_zero（a=x₂−x₁、b=y₂−y₁）：平方和為 0 ⇔ 兩個差都是 0 ⇔ x₂=x₁ 且 y₂=y₁；依有序對相等，這就是 P=Q。結合 S08：d(P,Q)=0 ⇔ P=Q。引理在 S09.1、S09.2 證明。",
          "en": "By Lemma L_sum_sq_zero (a=x₂−x₁, b=y₂−y₁): the sum of squares is 0 ⇔ both differences are 0 ⇔ x₂=x₁ and y₂=y₁; by equality of ordered pairs this is P=Q. With S08: d(P,Q)=0 ⇔ P=Q. The lemma is proved in S09.1 and S09.2."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "L_sum_sq_zero",
            "cartesian_product_def",
            "S08"
          ],
          "explanation": {
            "zh-Hant": "引理與有序對相等都是雙條件，兩向成立。",
            "en": "The lemma and equality of ordered pairs are both biconditionals, so both directions hold."
          }
        },
        "leaf_basis": "L_sum_sq_zero + cartesian_product_def + add_inverse"
      },
      {
        "id": "S09.1",
        "uses": [
          "square_nonneg"
        ],
        "before_tex": "a^2+b^2=0",
        "after_tex": "a=0\\ \\land\\ b=0",
        "relation": "implies",
        "rule": "square_nonneg",
        "conditions": [
          "a,b\\in\\mathbb{R}"
        ],
        "explanation": {
          "zh-Hant": "a²≥0 且 b²≥0。由 a²+b²=0 得 a²=−b²≤0；又 a²≥0，依序的三一律 a²=0，再依 square_nonneg（u²=0 ⇔ u=0）得 a=0。b 同理。",
          "en": "a²≥0 and b²≥0. From a²+b²=0 we get a²=−b²≤0; together with a²≥0, trichotomy gives a²=0, and square_nonneg (u²=0 ⇔ u=0) gives a=0. Likewise b=0."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "square_nonneg",
            "order_basics"
          ],
          "explanation": {
            "zh-Hant": "需要兩個平方都非負；若允許負數項（例如 1+(−1)=0，N19），和為 0 並不推出各項為 0。所以只對實數的平方成立。",
            "en": "It needs both squares to be nonnegative; with a negative term allowed (as in 1+(−1)=0, N19), a zero sum would not force each term to be 0. So it holds for squares of reals only."
          }
        },
        "leaf_basis": "square_nonneg + order_basics + eq_congruence"
      },
      {
        "id": "S09.2",
        "uses": [
          "mul_zero"
        ],
        "before_tex": "a=0\\ \\land\\ b=0",
        "after_tex": "a^2+b^2=0",
        "relation": "implies",
        "rule": "mul_zero",
        "conditions": [],
        "explanation": {
          "zh-Hant": "反向：0·0+0·0=0+0=0。S09.1 與 S09.2 合起來證得引理 L_sum_sq_zero 的兩個方向。",
          "en": "Conversely: 0·0+0·0=0+0=0. S09.1 and S09.2 together prove both directions of Lemma L_sum_sq_zero."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "mul_zero",
            "add_zero"
          ],
          "explanation": {
            "zh-Hant": "直接代入計算，沒有附加條件。",
            "en": "Direct substitution, with no side condition."
          }
        },
        "leaf_basis": "mul_zero + add_zero"
      },
      {
        "id": "S10",
        "uses": [
          "G3",
          "S01"
        ],
        "before_tex": "d(P,R)",
        "after_tex": "\\sqrt{(2-1)^2+(3-(-2))^2}=\\sqrt{26}",
        "relation": "equivalent",
        "rule": "mko_length_def",
        "conditions": [],
        "explanation": {
          "zh-Hant": "R=(2,3)：x 差 2−1=1，y 差 3−(−2)=5；1²+5²=1+25=26，所以 d(P,R)=√26。這裡保留精確形式 √26，不用小數取代。",
          "en": "R=(2,3): the x-difference is 2−1=1 and the y-difference is 3−(−2)=5; 1²+5²=1+25=26, so d(P,R)=√26. The exact form √26 is kept rather than replaced by a decimal."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "mko_length_def",
            "numeric_evaluation"
          ],
          "explanation": {
            "zh-Hant": "與 S03 到 S04 相同的計算，可重算（N8）。",
            "en": "The same kind of computation as S03 to S04, recomputable (N8)."
          }
        },
        "leaf_basis": "mko_length_def + numeric_evaluation"
      },
      {
        "id": "S11",
        "uses": [
          "S10",
          "L_sq_mono",
          "sqrt_def"
        ],
        "before_tex": "5^2=25<26<36=6^2",
        "after_tex": "5<\\sqrt{26}<6",
        "relation": "equivalent",
        "rule": "L_sq_mono",
        "conditions": [
          "5\\ge 0,\\ \\sqrt{26}\\ge 0,\\ 6\\ge 0"
        ],
        "explanation": {
          "zh-Hant": "5、√26、6 都 ≥0，且 (√26)²=26（主平方根定義）。依引理 L_sq_mono：25<26 ⇔ 5<√26；26<36 ⇔ √26<6。所以 √26 在 5 與 6 之間。引理在 S11.1、S11.2 證明。",
          "en": "5, √26 and 6 are all ≥0, and (√26)²=26 (definition of the principal root). By Lemma L_sq_mono: 25<26 ⇔ 5<√26, and 26<36 ⇔ √26<6. So √26 lies between 5 and 6. The lemma is proved in S11.1 and S11.2."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "L_sq_mono",
            "sqrt_def"
          ],
          "explanation": {
            "zh-Hant": "引理是雙條件，但只對非負數成立；例如 −7<6 而 (−7)²=49>36（N18）。",
            "en": "The lemma is a biconditional, but only for nonnegative numbers; for example −7<6 while (−7)²=49>36 (N18)."
          }
        },
        "leaf_basis": "L_sq_mono + sqrt_def + numeric_evaluation"
      },
      {
        "id": "S11.1",
        "uses": [
          "distributive",
          "order_basics"
        ],
        "before_tex": "0\\le a<b",
        "after_tex": "a^2<b^2",
        "relation": "implies",
        "rule": "order_basics",
        "conditions": [
          "a\\ge 0"
        ],
        "explanation": {
          "zh-Hant": "b²−a²=(b−a)(b+a)（用分配律展開可驗，N17）。b−a>0；又 b>a≥0，所以 b>0，b+a>0。兩個正數相乘為正（序與乘法），所以 b²−a²>0，即 a²<b²。",
          "en": "b²−a²=(b−a)(b+a) (check by expanding with distributivity, N17). b−a>0; and b>a≥0 gives b>0, so b+a>0. A product of two positive numbers is positive (order and multiplication), so b²−a²>0, that is a²<b²."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "distributive",
            "order_basics"
          ],
          "explanation": {
            "zh-Hant": "需要 a≥0 才能保證 b+a>0；若 a=−7、b=6，b+a<0，結論失敗。",
            "en": "a≥0 is what guarantees b+a>0; with a=−7 and b=6, b+a<0 and the conclusion fails."
          }
        },
        "leaf_basis": "distributive + order_basics + neg_mul"
      },
      {
        "id": "S11.2",
        "uses": [
          "S11.1",
          "order_basics"
        ],
        "before_tex": "a,b\\ge 0,\\ a^2<b^2",
        "after_tex": "a<b",
        "relation": "implies",
        "rule": "contrapositive",
        "conditions": [
          "a\\ge 0",
          "b\\ge 0"
        ],
        "explanation": {
          "zh-Hant": "用逆否：若 a<b 不成立，依三一律 a=b 或 b<a。a=b 時 a²=b²；b<a 時由 S11.1（角色互換，0≤b<a）得 b²<a²。兩種情況都使 a²<b² 不成立。所以 a²<b² 推出 a<b。S11.1 與 S11.2 合起來證得引理 L_sq_mono。",
          "en": "By contraposition: if a<b fails, trichotomy gives a=b or b<a. If a=b then a²=b²; if b<a then S11.1 (with roles swapped, 0≤b<a) gives b²<a². In both cases a²<b² fails. So a²<b² implies a<b. S11.1 and S11.2 together prove Lemma L_sq_mono."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S11.1",
            "order_basics",
            "contrapositive",
            "case_analysis"
          ],
          "explanation": {
            "zh-Hant": "兩種情況涵蓋 a<b 不成立的全部可能；用到 S11.1 時需要 b≥0。",
            "en": "The two cases cover every way a<b can fail; applying S11.1 there needs b≥0."
          }
        },
        "leaf_basis": "contrapositive + case_analysis + order_basics"
      },
      {
        "id": "S12",
        "uses": [
          "S10",
          "L_sq_mono",
          "sqrt_def"
        ],
        "before_tex": "5.09^2=25.9081<26<26.01=5.1^2",
        "after_tex": "5.09<\\sqrt{26}<5.1,\\ \\sqrt{26}\\neq 5.1",
        "relation": "implies",
        "rule": "L_sq_mono",
        "conditions": [
          "5.09\\ge 0,\\ 5.1\\ge 0"
        ],
        "explanation": {
          "zh-Hant": "精確計算 5.09²=25.9081<26，5.1²=26.01>26，依 L_sq_mono 得 5.09<√26<5.1。特別是 5.1²=26.01≠26，所以 √26≠5.1：程式印出的 5.1 或 5.0990195 這類有限小數只是近似值（5.0990195²<26，N14），√26 才是精確距離。",
          "en": "Exactly, 5.09²=25.9081<26 and 5.1²=26.01>26, so L_sq_mono gives 5.09<√26<5.1. In particular 5.1²=26.01≠26, so √26≠5.1: a finite decimal such as 5.1 or 5.0990195 printed by a program is only an approximation (5.0990195²<26, N14), while √26 is the exact distance."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "L_sq_mono",
            "sqrt_def",
            "numeric_evaluation",
            "contradiction"
          ],
          "explanation": {
            "zh-Hant": "若 √26=5.1，則 (√26)²=5.1²，即 26=26.01，矛盾；有限位小數只給出範圍，不給出等式。",
            "en": "If √26=5.1 then (√26)²=5.1², that is 26=26.01, a contradiction; finitely many decimal places give a range, not an equality."
          }
        },
        "leaf_basis": "L_sq_mono + sqrt_def + numeric_evaluation + contradiction"
      },
      {
        "id": "S13",
        "uses": [
          "S02",
          "S05",
          "S06",
          "S07",
          "S09",
          "S12"
        ],
        "before_tex": "\\text{S02, S05, S06, S07, S09, S12}",
        "after_tex": "d(P,Q)=5,\\ d(P,R)=\\sqrt{26}\\in(5.09,\\,5.1);\\ d\\ge 0,\\ d(Q,P)=d(P,Q),\\ d(P,Q)=0\\iff P=Q",
        "relation": "implies",
        "rule": "and_intro_elim",
        "conditions": [],
        "explanation": {
          "zh-Hant": "把各步合起來：例子中 d(P,Q)=5，d(P,R)=√26 且介於 5.09 與 5.1 之間；對所有實數坐標，距離有定義且非負、對稱，而且距離為 0 恰好在兩點相同時發生。",
          "en": "Putting the steps together: in the example d(P,Q)=5 and d(P,R)=√26, which lies between 5.09 and 5.1; for all real coordinates, the distance is defined and nonnegative, symmetric, and equal to 0 exactly when the two points coincide."
        },
        "reverse_audit": {
          "kind": "sufficient_goal_reduction",
          "required_ids": [
            "S02",
            "S05",
            "S06",
            "S07",
            "S08",
            "S09",
            "S12"
          ],
          "explanation": {
            "zh-Hant": "目標是 goal 中的五個敘述。足夠條件 H：S05（例子）、S12（範圍）、S02（非負）、S06（對稱）、S07 到 S09（為 0 的條件）各自成立；H 推出目標只用合取。每個 H 都由定義與前提正向證成，沒有把目標當作前提。",
            "en": "The goal is the five statements in the goal field. Sufficient condition H: S05 (the example), S12 (the range), S02 (nonnegativity), S06 (symmetry) and S07 to S09 (when the distance is 0) each hold; H gives the goal by conjunction only. Each part of H is proved forwards from the definition and the prerequisites; the goal is never used as a premise."
          }
        },
        "leaf_basis": "and_intro_elim"
      }
    ],
    "result": {
      "zh-Hant": "d(P,Q)=√(3²+4²)=√25=5；d(P,R)=√(1²+5²)=√26，且 5.09<√26<5.1，所以 5.1 只是近似值。對任何實數坐標，d(P,Q) 有定義且 ≥0，d(Q,P)=d(P,Q)，d(P,P)=0，並且 d(P,Q)=0 ⇔ P=Q。",
      "en": "d(P,Q)=√(3²+4²)=√25=5; d(P,R)=√(1²+5²)=√26 with 5.09<√26<5.1, so 5.1 is only an approximation. For any real coordinates, d(P,Q) is defined and ≥0, d(Q,P)=d(P,Q), d(P,P)=0, and d(P,Q)=0 ⇔ P=Q."
    },
    "negative_controls": [
      {
        "claim": {
          "zh-Hant": "d(P,Q)=3+4=7",
          "en": "d(P,Q)=3+4=7"
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "7²=49≠25；距離公式先平方再相加（N16）。",
          "en": "7²=49≠25; the distance formula squares before adding (N16)."
        }
      },
      {
        "claim": {
          "zh-Hant": "d(P,Q)=−5，因為 (−5)²=25",
          "en": "d(P,Q)=−5, because (−5)²=25"
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "主平方根取非負值，√25=5（S05）。",
          "en": "The principal square root is nonnegative, so √25=5 (S05)."
        }
      },
      {
        "claim": {
          "zh-Hant": "√26=5.1",
          "en": "√26=5.1"
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "5.1²=26.01≠26（N13）；5.1 只是近似值。",
          "en": "5.1²=26.01≠26 (N13); 5.1 is only an approximation."
        }
      },
      {
        "claim": {
          "zh-Hant": "若 x 差為 1、y 差為 −1，兩差相加為 0，所以兩點距離為 0",
          "en": "If the x-difference is 1 and the y-difference is −1, the differences add to 0, so the distance is 0"
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "距離是 √(1²+(−1)²)=√2≠0；依 S09，距離為 0 只在兩點相同時發生（N20）。",
          "en": "The distance is √(1²+(−1)²)=√2≠0; by S09 the distance is 0 only when the two points coincide (N20)."
        }
      }
    ],
    "status": "candidate",
    "gaps": [],
    "verification": {
      "structure": "checked_local_script",
      "mathematics": "candidate_argument",
      "formalization": "not_formalized"
    },
    "rule_glossary": [
      {
        "id": "square_nonneg",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "實數平方非負：對所有實數 u，u²≥0，且 u²=0 ⇔ u=0。",
          "en": "Squares are nonnegative: for every real u, u²≥0, and u²=0 ⇔ u=0."
        }
      },
      {
        "id": "sqrt_def",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "主平方根：對 a≥0，√a 是唯一滿足 b≥0 且 b²=a 的實數 b。負數在實數中沒有平方根。",
          "en": "Principal square root: for a≥0, √a is the unique real b with b≥0 and b²=a. Negative numbers have no real square root."
        }
      },
      {
        "id": "order_basics",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "實數的序：任兩數恰有 u<v、u=v、u>v 之一；u<v 且 v<w 推出 u<w；u<v 推出 u+w<v+w；u<v 且 w>0 推出 uw<vw；u<v 且 w<0 推出 uw>vw。",
          "en": "Order of the reals: exactly one of u<v, u=v, u>v holds; u<v and v<w give u<w; u<v gives u+w<v+w; u<v and w>0 give uw<vw; u<v and w<0 give uw>vw."
        }
      },
      {
        "id": "cartesian_product_def",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "笛卡兒積：A×B 是所有有序對 (a,b)（a∈A、b∈B）的集合；(a,b)=(c,d) ⇔ a=c 且 b=d。",
          "en": "Cartesian product: A×B is the set of ordered pairs (a,b) with a∈A and b∈B; (a,b)=(c,d) ⇔ a=c and b=d."
        }
      },
      {
        "id": "numeric_evaluation",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "明確整數或有理數算式的精確求值；可以獨立重算。",
          "en": "Exact evaluation of an explicit integer or rational expression; independently recomputable."
        }
      },
      {
        "id": "def_unfold",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "展開定義：把一個已定義的詞換成它的定義內容（或反向收回），命題的真假不變。",
          "en": "Unfolding a definition: replacing a defined term by its definition (or folding it back) does not change whether a statement is true."
        }
      },
      {
        "id": "add_inverse",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "加法反元素：每個 u 都有 −u，使 u+(−u)=0；u−v 定義為 u+(−v)。",
          "en": "Additive inverse: every u has −u with u+(−u)=0; u−v means u+(−v)."
        }
      },
      {
        "id": "neg_mul",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "負號與乘法：(−u)v=−(uv)，(−u)(−v)=uv。",
          "en": "Signs and multiplication: (−u)v=−(uv) and (−u)(−v)=uv."
        }
      },
      {
        "id": "power_laws",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "整數指數律（底數非零或指數為正整數）：a^m·a^n=a^{m+n}，(a^m)^n=a^{mn}，(ab)^n=a^n b^n，a^0=1。",
          "en": "Integer exponent laws (base nonzero, or exponents positive integers): a^m·a^n=a^{m+n}, (a^m)^n=a^{mn}, (ab)^n=a^n b^n, a^0=1."
        }
      },
      {
        "id": "eq_replace",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "等值代換：命題中的一個式子可換成與它相等的式子，命題的真假不變。",
          "en": "Replacement of equals: an expression inside a statement may be replaced by an equal expression without changing whether the statement is true."
        }
      },
      {
        "id": "distributive",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "分配律：u(v+w)=uv+uw；配合乘法交換律也有 (v+w)u=vu+wu。",
          "en": "Distributivity: u(v+w)=uv+uw; with commutativity also (v+w)u=vu+wu."
        }
      },
      {
        "id": "mul_zero",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "乘以零：u·0=0。理由：u·0=u·(0+0)=u·0+u·0，兩邊同減 u·0 得 0=u·0。",
          "en": "Multiplying by zero: u·0=0. Reason: u·0=u·(0+0)=u·0+u·0; subtracting u·0 from both sides gives 0=u·0."
        }
      },
      {
        "id": "add_zero",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "加法單位元：u+0=u。",
          "en": "Additive identity: u+0=u."
        }
      },
      {
        "id": "eq_congruence",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "等式同用：若 u=v，對兩邊做同一個有定義的運算 f，得 f(u)=f(v)。只對一邊做運算不屬於此規則。",
          "en": "Congruence of equality: if u=v, applying the same defined operation f to both sides gives f(u)=f(v). Operating on one side only is not an instance of this rule."
        }
      },
      {
        "id": "contrapositive",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "逆否命題：P⇒Q 與 ¬Q⇒¬P 等價。逆命題 Q⇒P 一般不與 P⇒Q 等價。",
          "en": "Contrapositive: P⇒Q is equivalent to ¬Q⇒¬P. The converse Q⇒P is in general not equivalent to P⇒Q."
        }
      },
      {
        "id": "case_analysis",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "分情況論證：若 P∨Q 成立，且 P⇒R、Q⇒R 都已證，則 R 成立。所有情況必須涵蓋全部可能。",
          "en": "Proof by cases: if P∨Q holds and both P⇒R and Q⇒R are proved, then R holds. The cases must cover every possibility."
        }
      },
      {
        "id": "contradiction",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "反證法：若假設 ¬P 推出矛盾（某命題與其否定同時成立），則 P 成立。",
          "en": "Proof by contradiction: if assuming ¬P leads to a contradiction (a statement and its negation both hold), then P holds."
        }
      },
      {
        "id": "and_intro_elim",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "合取：由 P 與 Q 得 P∧Q；由 P∧Q 可分別得 P 與 Q。",
          "en": "Conjunction: from P and Q infer P∧Q; from P∧Q infer P and infer Q."
        }
      },
      {
        "id": "mko_length_def",
        "kind": "cited",
        "source": {
          "mko_id": "mko-euclidean-length",
          "sha256": "485948172a6b39e7ec2cf3170ab03489fed98190d0c868161fbbd037f7151e91",
          "commit": "b28a5edbd46279b1db2a3f3f48bb3f447e18899f"
        },
        "statement": {
          "zh-Hant": "獨立來源追加式勘誤（使用者已採用於本地修訂；未合併或發布）：在歐幾里得平面中，若 P=(x₁,y₁)、Q=(x₂,y₂)，則兩點距離取座標差平方和的非負主平方根；P=Q 時此值為 0。原來源的「正平方根」字樣保留於父版與修訂紀錄。",
          "en": "Independent append-only source erratum (owner-adopted in this local revision; not merged or published): in the Euclidean plane, for P=(x₁,y₁) and Q=(x₂,y₂), their distance is the nonnegative principal square root of the sum of the squared coordinate differences; it is 0 when P=Q. The original Chinese positive-root wording remains in the parent and revision history."
        }
      },
      {
        "id": "L_neg_sq",
        "kind": "lemma",
        "proved_in": [
          "S06.1"
        ],
        "statement": {
          "zh-Hant": "對實數 p、q：(p−q)²=(q−p)²。",
          "en": "For reals p, q: (p−q)²=(q−p)²."
        }
      },
      {
        "id": "L_sum_sq_zero",
        "kind": "lemma",
        "proved_in": [
          "S09.1",
          "S09.2"
        ],
        "statement": {
          "zh-Hant": "對實數 a、b：a²+b²=0 ⇔ a=0 且 b=0。",
          "en": "For reals a, b: a²+b²=0 ⇔ a=0 and b=0."
        }
      },
      {
        "id": "L_sq_mono",
        "kind": "lemma",
        "proved_in": [
          "S11.1",
          "S11.2"
        ],
        "statement": {
          "zh-Hant": "對實數 a≥0、b≥0：a<b ⇔ a²<b²。",
          "en": "For reals a≥0 and b≥0: a<b ⇔ a²<b²."
        }
      }
    ],
    "revision_log": [],
    "numeric_checks": [
      {
        "id": "N1",
        "step": "S03",
        "lhs": "4-1",
        "rhs": "3"
      },
      {
        "id": "N2",
        "step": "S03",
        "lhs": "2-(-2)",
        "rhs": "4"
      },
      {
        "id": "N3",
        "step": "S04",
        "lhs": "3**2+4**2",
        "rhs": "25"
      },
      {
        "id": "N4",
        "step": "S05",
        "lhs": "5**2",
        "rhs": "25"
      },
      {
        "id": "N5",
        "step": "S05",
        "lhs": "(-5)**2",
        "rhs": "25"
      },
      {
        "id": "N6",
        "step": "S06.1",
        "vars": [
          "p",
          "q"
        ],
        "degree": 2,
        "lhs": "(p-q)**2",
        "rhs": "(q-p)**2"
      },
      {
        "id": "N7",
        "step": "S06",
        "lhs": "(1-4)**2+(-2-2)**2",
        "rhs": "25"
      },
      {
        "id": "N8",
        "step": "S10",
        "lhs": "(2-1)**2+(3-(-2))**2",
        "rhs": "26"
      },
      {
        "id": "N9",
        "step": "S11",
        "lhs": "5**2",
        "relation": "<",
        "rhs": "26"
      },
      {
        "id": "N10",
        "step": "S11",
        "lhs": "26",
        "relation": "<",
        "rhs": "6**2"
      },
      {
        "id": "N11",
        "step": "S12",
        "lhs": "5.09**2",
        "rhs": "25.9081"
      },
      {
        "id": "N12",
        "step": "S12",
        "lhs": "5.1**2",
        "rhs": "26.01"
      },
      {
        "id": "N13",
        "step": "S12",
        "lhs": "5.1**2",
        "relation": "!=",
        "rhs": "26"
      },
      {
        "id": "N14",
        "step": "S12",
        "lhs": "5.0990195**2",
        "relation": "<",
        "rhs": "26"
      },
      {
        "id": "N15",
        "step": "S07",
        "lhs": "0**2+0**2",
        "rhs": "0"
      },
      {
        "id": "N16",
        "lhs": "7**2",
        "relation": "!=",
        "rhs": "25"
      },
      {
        "id": "N17",
        "step": "S11.1",
        "vars": [
          "a",
          "b"
        ],
        "degree": 2,
        "lhs": "b*b-a*a",
        "rhs": "(b-a)*(b+a)"
      },
      {
        "id": "N18",
        "step": "S11",
        "lhs": "(-7)**2",
        "relation": ">",
        "rhs": "6**2"
      },
      {
        "id": "N19",
        "step": "S09.1",
        "lhs": "1+(-1)",
        "rhs": "0"
      },
      {
        "id": "N20",
        "lhs": "1**2+(-1)**2",
        "rhs": "2"
      }
    ]
  },
  "presentation": {
    "md_scope": {
      "zh-Hant": "只使用 MKO 的二維座標距離公式（實數坐標、非負主平方根）。證明公式的基本性質（非負、對稱、與點相同的關係），不證明三角不等式，不處理與抽象度量或 Mathlib EuclideanSpace 的對接，也不證明 √26 是無理數；不改動 canonical MKO 或英文 edition。",
      "en": "Uses only the MKO's two-dimensional coordinate distance formula (real coordinates, nonnegative principal square root). It proves basic properties of the formula (nonnegativity, symmetry, and its relation to equality of points); it does not prove the triangle inequality, does not treat the link to an abstract metric or to Mathlib's EuclideanSpace, and does not prove that √26 is irrational. It does not change the canonical MKO or its English edition."
    },
    "md_symbols": [
      [
        "d(P,Q)",
        "P、Q 兩點的歐幾里得距離",
        "the Euclidean distance between P and Q"
      ],
      [
        "x_2-x_1,\\ y_2-y_1",
        "兩個座標差",
        "the two coordinate differences"
      ],
      [
        "s",
        "被開方數 (x₂−x₁)²+(y₂−y₁)²",
        "the radicand (x₂−x₁)²+(y₂−y₁)²"
      ],
      [
        "\\sqrt{s}",
        "s≥0 的非負主平方根",
        "the nonnegative principal square root of s≥0"
      ]
    ],
    "md_error_controls": [
      {
        "title": "先平方再相加 / Square before adding",
        "zh": "MKO 指出的誤解之一是把座標差直接相加而沒有先平方。對 P、Q，3+4=7，但 7²=49≠25（N16），所以 7 不是 d(P,Q)；正確順序是先平方 9+16=25，再開方得 5。座標差可能為負，直接相加還可能互相抵消：差為 1 與 −1 時和為 0，但距離是 √(1+1)=√2≠0（N20）。",
        "en": "One misconception the MKO names is adding the coordinate differences without squaring them first. For P, Q, 3+4=7, but 7²=49≠25 (N16), so 7 is not d(P,Q); the correct order is to square first, 9+16=25, then take the root, 5. Differences can be negative, and adding them directly can even cancel: differences 1 and −1 add to 0, but the distance is √(1+1)=√2≠0 (N20)."
      },
      {
        "title": "平方根取非負主值 / The square root is the nonnegative principal value",
        "zh": "MKO 指出的另一誤解是忽略非負主值。−5 也滿足 x²=25，但距離取主值 √25=5（S05）；寫成 d=±5 或 d=−5 違反 MKO 假設 a3。S02 證明對任何兩點 d≥0。",
        "en": "The other misconception the MKO names is ignoring the nonnegative principal value. −5 also satisfies x²=25, but the distance is the principal value √25=5 (S05); writing d=±5 or d=−5 violates MKO assumption a3. S02 proves d≥0 for any two points."
      },
      {
        "title": "浮點數不是精確值 / A floating value is not the exact value",
        "zh": "MKO 說明程式可用 hypot 或平方根計算距離，但浮點表示與實數不同。√26 的小數顯示只是近似：5.1²=26.01≠26（N13），5.0990195²<26（N14）。精確答案是 √26，可用 S11 到 S12 的平方比較給出有保證的範圍。",
        "en": "The MKO notes that a program can compute distances with hypot or a square root, but floating-point representations differ from exact real-number arithmetic. A decimal display of √26 is only an approximation: 5.1²=26.01≠26 (N13) and 5.0990195²<26 (N14). The exact answer is √26, and the comparison of squares in S11 to S12 gives a guaranteed range."
      }
    ],
    "md_open_items": [
      {
        "zh-Hant": "本稿不證明三角不等式，也不處理 d 作為度量的完整性質；MKO 所說與 Mathlib EuclideanSpace、dist 的對接未在此處理。",
        "en": "This guide does not prove the triangle inequality or the full metric properties of d; the link to Mathlib's EuclideanSpace and dist mentioned by the MKO is not treated here."
      },
      {
        "zh-Hant": "本稿不證明 √26 是無理數，只證明它不等於 5.1 並給出範圍。",
        "en": "This guide does not prove that √26 is irrational; it only proves that √26 is not 5.1 and gives a range."
      }
    ]
  },
  "revision": {
    "id": "production-20261019-adopted-96",
    "source_commit": "b28a5edbd46279b1db2a3f3f48bb3f447e18899f",
    "adopted_source_sha256": "539f8e100b34dcd38a4feb966f262090b32061cef14dde0554cb042ed2f3f5ba",
    "original_source_sha256": "59692cf052ef581c917f890361bf9fcff19ab54ab5de2bfb61c90c72770ae0f2",
    "owner_adopted": true,
    "bilingual_sync": "complete_source_bound",
    "formal_Lean": "NOT_RUN",
    "independent_AI_concurrence": "NOT_MEASURED",
    "issue_ids": [
      "BR-M003"
    ],
    "scope": "Owner-adopted natural-language teaching guide; not a formal proof, canonical MKO rewrite or evidence-status promotion."
  }
}
