Step-by-step derivation
S001 · implies
Before
source roles = [qf-distance-candidate, candidate_distance, frame, euclidean_orthonormal_equal_units]
After
derived = [[nonnegative_exact_candidate_YesNo]]
Conditions: none
Check THIS source interface:distance uses ONLY its complete coordinate frame;other families use a domain.Discrete operations use local hyphens,legacy banks underscores.Retain family-specific ordered output types and original bilingual data/status.
Step identifiers and dependencies
Rule: R61_SOURCE_exact_keys_operation_domain_OR_frame_and_output_roles · Uses: G001
S002 · calculation
Before
Distance PQ ORIGINAL Q minus P axis0 := sub(-33, -9)
After
Distance PQ ORIGINAL Q minus P axis0 = -24
Conditions: none
Retain ORIGINAL operands and order for exact integer arithmetic.Only raw inputs are SAFE-bounded;derived integers are not recapped or approximated.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S001
S003 · calculation
Before
Distance PQ ORIGINAL Q minus P axis1 := sub(12, 2)
After
Distance PQ ORIGINAL Q minus P axis1 = 10
Conditions: none
Retain ORIGINAL operands and order for exact integer arithmetic.Only raw inputs are SAFE-bounded;derived integers are not recapped or approximated.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S002
S004 · calculation
Before
Distance PQ ORIGINAL signed delta squared axis0 := mul(-24, -24)
After
Distance PQ ORIGINAL signed delta squared axis0 = 576
Conditions: none
Retain ORIGINAL operands and order for exact integer arithmetic.Only raw inputs are SAFE-bounded;derived integers are not recapped or approximated.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S003
S005 · calculation
Before
Distance PQ ORIGINAL signed delta squared axis1 := mul(10, 10)
After
Distance PQ ORIGINAL signed delta squared axis1 = 100
Conditions: none
Retain ORIGINAL operands and order for exact integer arithmetic.Only raw inputs are SAFE-bounded;derived integers are not recapped or approximated.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S004
S006 · calculation
Before
Distance PQ ORIGINAL sum of two squares := sum(576, 100)
After
Distance PQ ORIGINAL sum of two squares = 676
Conditions: none
Retain ORIGINAL operands and order for exact integer arithmetic.Only raw inputs are SAFE-bounded;derived integers are not recapped or approximated.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S005
S007 · implies
Before
source roles = [Distance PQ, [-9, 2], [-33, 12]]
After
derived = [[-24, 10], [576, 100], 676]
Conditions: none
In the DECLARED orthonormal equal-unit frame,distance squared is(Δx)²+(Δy)²≥0,including coincident points.Keep signed differences;do not mistake a signed component for distance.
Step identifiers and dependencies
Rule: Distance_ORTHONORMAL_equal_units_two_squares_NONNEGATIVE · Uses: G001, S006
S008 · calculation
Before
Distance ORIGINAL candidate d squared := mul(26, 26)
After
Distance ORIGINAL candidate d squared = 676
Conditions: none
Retain ORIGINAL operands and order for exact integer arithmetic.Only raw inputs are SAFE-bounded;derived integers are not recapped or approximated.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S007
S009 · implies
Before
source roles = [26, 676, 676]
After
derived = [Yes, Yes, Yes]
Conditions: none
A distance candidate requires BOTH nonnegativity and equal squares.Negative d is a LEGAL input returning No,even if its square matches;do not reject it as malformed.
Step identifiers and dependencies
Rule: Distance_CANDIDATE_BOTH_nonnegative_AND_square_equality · Uses: G001, S008