Main derivation
S01 · definition
Before
d(P,Q),\ P=(p_x,p_y),\ Q=(q_x,q_y)
After
d(P,Q)=\sqrt{(q_x-p_x)^2+(q_y-p_y)^2}Conditions: P,Q\ \text{in one orthonormal equal-unit frame}
Rule: mko_distance_def · Uses: G1
Leaf basis: mko_distance_def + def_unfold
First write down the MKO's definition. The formula represents Euclidean distance only in the frame of G1: perpendicular axes using the same length unit. The coordinate differences are squared, then added, and then the principal square root is taken.
S02 · implies
Before
(q_x-p_x)^2+(q_y-p_y)^2
After
(q_x-p_x)^2+(q_y-p_y)^2\ge 0,\ \ d(P,Q)\ge 0
Conditions: none
Rule: square_nonneg · Uses: S01, square_nonneg
Leaf basis: square_nonneg + order_basics + sqrt_def
Each square is ≥0 (square_nonneg), and a sum of two nonnegative numbers is ≥0 (order_basics: from 0≤u, 0+v≤u+v, and then use 0≤v). So the radicand is nonnegative and its principal square root is defined; by sqrt_def that root is itself ≥0. Hence for any two points d(P,Q) is defined and nonnegative.
S03 · equivalent
Before
Q-P
After
(4-1,\ 6-2)=(3,4)
Conditions: none
Rule: numeric_evaluation · Uses: S01, G2
Leaf basis: numeric_evaluation + add_inverse
Substitute P=(1,2) and Q=(4,6) and subtract coordinate by coordinate: 4−1=3 and 6−2=4. Both differences come from the same frame (G1), so they may enter the same formula.
S04 · equivalent
Before
(q_x-p_x)^2+(q_y-p_y)^2
After
3^2+4^2=9+16=25
Conditions: none
Rule: numeric_evaluation · Uses: S03
Leaf basis: numeric_evaluation + power_laws
Put the differences of S03 under the root: 3²=3·3=9 and 4²=4·4=16, with sum 25. This is d(P,Q)² (MKO: the squared distance is the sum of the squared coordinate differences).
S05 · equivalent
Before
d(P,Q)=\sqrt{25}After
d(P,Q)=5
Conditions: 25\ge 0
Rule: sqrt_def · Uses: S01, S04, sqrt_def
Leaf basis: sqrt_def + eq_replace
By S01 and S04, d(P,Q)=√25. By sqrt_def, √25 is the unique real b with b≥0 and b²=25; S05.1 checks that 5 satisfies both conditions, and S05.2 uses uniqueness to get √25=5.
S06 · implies
Before
c=-5,\ c^2=25
After
c\neq d(P,Q)
Conditions: none
Rule: sqrt_def · Uses: G3, S05
Leaf basis: sqrt_def + neg_mul + numeric_evaluation
The candidate −5 does have square (−5)(−5)=25 (neg_mul), but −5<0 fails the nonnegativity condition of sqrt_def; moreover S05 gave d(P,Q)=5, and −5≠5. So −5 is not d(P,Q). This is exactly the misconception the MKO names: having the right square is not enough to be a distance (assumption a3).
S07 · equivalent
Before
R-P
After
(6-1,\ -1-2)=(5,-3)
Conditions: none
Rule: numeric_evaluation · Uses: S01, G2
Leaf basis: numeric_evaluation + add_inverse
Subtract coordinatewise for P=(1,2) and R=(6,−1): 6−1=5 and −1−2=−3. A coordinate difference may be negative; squaring in the next step removes the sign.
S08 · equivalent
Before
d(P,R)=\sqrt{5^2+(-3)^2}After
d(P,R)=\sqrt{34},\ \ d(P,R)^2=34Conditions: 34\ge 0
Rule: numeric_evaluation · Uses: S07, sqrt_def
Leaf basis: numeric_evaluation + neg_mul + sqrt_def
5²=25 and (−3)²=(−3)(−3)=9 (neg_mul), with sum 34, so d(P,R)=√34. Since 34≥0, sqrt_def gives (√34)²=34, that is d(P,R)²=34.
S09 · theorem_application
Before
d(P,Q)^2=25,\ d(P,R)^2=34,\ 25<34
After
d(P,Q)<d(P,R)
Conditions: d(P,Q)\ge 0; d(P,R)\ge 0
Rule: L_sq_order · Uses: S02, S04, S05, S08, L_sq_order
Leaf basis: L_sq_order + numeric_evaluation
By S02 both distances are nonnegative, so Lemma L_sq_order applies (a=d(P,Q), b=d(P,R)): 25<34 gives d(P,Q)<d(P,R). This is the MKO's 'two distances can be compared by their squares'; no decimal value of √34 is needed. The lemma is proved in S09.1 and S09.2.
S10 · implies
Before
5^2=25<34<36=6^2
After
5<\sqrt{34}<6,\ \ \sqrt{34}\notin\mathbb{Z}Conditions: 5\ge 0; \sqrt{34}\ge 0; 6\ge 0
Rule: L_sq_order · Uses: S08, S09, L_sq_order, sqrt_def
Leaf basis: L_sq_order + sqrt_def + order_basics + numeric_evaluation
5, √34 and 6 are all nonnegative (√34≥0 by sqrt_def), and their squares 25, 34, 36 satisfy 25<34<36. Applying L_sq_order twice gives 5<√34<6. There is no integer strictly between 5 and 6, so √34 is not an integer; this matches MKO assumption a2: an integer distance needs a perfect-square sum, and 34 is not one. The answer is kept in the exact form √34 instead of passing off a floating-point value as exact.
S11 · equivalent
Before
d(P,P)
After
\sqrt{0^2+0^2}=\sqrt{0}=0Conditions: none
Rule: sqrt_def · Uses: S01, S02, G2
Leaf basis: sqrt_def + numeric_evaluation
For coincident points the differences are 1−1=0 and 2−2=0, so the radicand is 0. Since 0≥0 and 0²=0, the uniqueness in sqrt_def gives √0=0. So coincident points have distance 0, a legitimate value of the distance (assumption a3), not an error.
S12 · equivalent
Before
(p_x-q_x)^2+(p_y-q_y)^2
After
(q_x-p_x)^2+(q_y-p_y)^2
Conditions: none
Rule: neg_mul · Uses: S01, neg_mul
Leaf basis: neg_mul + add_inverse + eq_replace
p_x−q_x=−(q_x−p_x), and by neg_mul (−u)(−u)=uu, so (p_x−q_x)²=(q_x−p_x)²; likewise for y. The two radicands agree, so d(Q,P)=d(P,Q). For example d(Q,P)²=(1−4)²+(2−6)²=9+16=25. As the MKO notes, swapping the two points is not a new computation.
S13 · implies
Before
\text{tasks of the goal}After
d(P,Q)=5,\ d(P,R)=\sqrt{34},\ 5<\sqrt{34}<6,\ -5\neq d(P,Q)Conditions: none
Rule: and_intro_elim · Uses: S05, S06, S08, S09, S10, S11, S12
Leaf basis: and_intro_elim
Combine the conclusions: d(P,Q)=5 (S05), −5 is rejected (S06), d(P,R)=√34 is not an integer and lies between 5 and 6 (S08, S10), d(P,Q)<d(P,R) (S09), coincident points have distance 0 (S11), and the distance does not depend on order (S12).
Substeps and lemmas
S05.1 · implies
Before
b=5
After
b\ge 0\ \land\ b^2=25
Conditions: none
Rule: numeric_evaluation · Uses: numeric_evaluation
Leaf basis: numeric_evaluation + order_basics
5>0, so 5≥0; and 5²=5·5=25. These are exactly the two requirements that sqrt_def places on √25.
S05.2 · implies
Before
5\ge 0,\ 5^2=25
After
\sqrt{25}=5Conditions: none
Rule: sqrt_def · Uses: S05.1, sqrt_def
Leaf basis: sqrt_def
sqrt_def says there is exactly one real b with b≥0 and b²=25, written √25. S05.1 shows that 5 is such a number, so √25=5.
S09.1 · implies
Before
0\le a<b
After
a^2<b^2
Conditions: a\ge 0
Rule: order_basics · Uses: order_basics, distributive
Leaf basis: order_basics + distributive + mul_zero + add_inverse
From a≥0 and a<b we get b>0, so b+a≥b>0; also b−a>0. By order_basics (u<v and w>0 give uw<vw, with u=0, v=b−a, w=b+a), 0<(b−a)(b+a). By distributivity (b−a)(b+a)=b²−a², so b²−a²>0, and adding a² to both sides gives a²<b².
S09.2 · implies
Before
a\ge 0,\ b\ge 0,\ a^2<b^2
After
a<b
Conditions: a\ge 0; b\ge 0
Rule: contradiction · Uses: S09.1, order_basics
Leaf basis: contradiction + order_basics + eq_congruence + case_analysis
Suppose a<b fails. By trichotomy, b=a or b<a. If b=a then b²=a² (eq_congruence), contradicting a²<b². If b<a, then since b≥0, S09.1 with the roles exchanged gives b²<a², again contradicting a²<b². Hence a<b. S09.1 and S09.2 together prove both directions of Lemma L_sq_order.