Step-by-step derivation
S001 · implies
Before
source roles = [qf-density12-length-integer-distance-pair, density12_length_integer_distance_pair, integer_euclidean_plane]
After
derived = [[nonnegative_distance_PQ, nonnegative_distance_QR]]
Conditions: none
Retain the ORIGINAL bank full operation prefix,domain and ordered answer roles.Use orthogonal_equal_unit only where a frame is declared,and degrees where an angle unit is declared.Integer fractions retain/1.Do not invent parameters or alter original bilingual sources.
Step identifiers and dependencies
Rule: R59_EXACT_family_domain_FULLprefix_operation_and_answer_roles · Uses: G001
S002 · calculation
Before
Length segment0 ORIGINAL Q minus P coordinate0 := sub(0, 0)
After
Length segment0 ORIGINAL Q minus P coordinate0 = 0
Conditions: none
Substitute exact ORIGINAL roles,without floating approximation.SAFE bounds raw inputs only;derived integers/rationals are unbounded and do not inherit another bank component cap.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S001
S003 · calculation
Before
Length segment0 ORIGINAL Q minus P coordinate1 := sub(0, 0)
After
Length segment0 ORIGINAL Q minus P coordinate1 = 0
Conditions: none
Substitute exact ORIGINAL roles,without floating approximation.SAFE bounds raw inputs only;derived integers/rationals are unbounded and do not inherit another bank component cap.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S002
S004 · calculation
Before
Length segment0 ORIGINAL square coordinate0 := mul(0, 0)
After
Length segment0 ORIGINAL square coordinate0 = 0
Conditions: none
Substitute exact ORIGINAL roles,without floating approximation.SAFE bounds raw inputs only;derived integers/rationals are unbounded and do not inherit another bank component cap.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S003
S005 · calculation
Before
Length segment0 ORIGINAL square coordinate1 := mul(0, 0)
After
Length segment0 ORIGINAL square coordinate1 = 0
Conditions: none
Substitute exact ORIGINAL roles,without floating approximation.SAFE bounds raw inputs only;derived integers/rationals are unbounded and do not inherit another bank component cap.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S004
S006 · calculation
Before
Length segment0 ORIGINAL squared norm sum := sum(0, 0)
After
Length segment0 ORIGINAL squared norm sum = 0
Conditions: none
Substitute exact ORIGINAL roles,without floating approximation.SAFE bounds raw inputs only;derived integers/rationals are unbounded and do not inherit another bank component cap.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S005
S007 · implies
Before
source roles = [Length segment0, [0, 0], [0, 0]]
After
derived = [[0, 0], 0]
Conditions: none
In the SAME equal-unit orthogonal L2 frame,the directed displacement is Q-P with signs retained.The sum of coordinate squares is the nonnegative SQUARED length.Derived coordinates may exceed SAFE without being revalidated as raw inputs.
Step identifiers and dependencies
Rule: Euclidean_DIRECTED_displacement_then_SQUARED_nonnegative_norm · Uses: G001, S006
S008 · calculation
Before
Length segment0 candidate nonnegative root squared := mul(0, 0)
After
Length segment0 candidate nonnegative root squared = 0
Conditions: none
Substitute exact ORIGINAL roles,without floating approximation.SAFE bounds raw inputs only;derived integers/rationals are unbounded and do not inherit another bank component cap.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S007
S009 · calculation
Before
Length segment0 candidate next integer := sum(0, 1)
After
Length segment0 candidate next integer = 1
Conditions: none
Substitute exact ORIGINAL roles,without floating approximation.SAFE bounds raw inputs only;derived integers/rationals are unbounded and do not inherit another bank component cap.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S008
S010 · calculation
Before
Length segment0 next integer squared := mul(1, 1)
After
Length segment0 next integer squared = 1
Conditions: none
Substitute exact ORIGINAL roles,without floating approximation.SAFE bounds raw inputs only;derived integers/rationals are unbounded and do not inherit another bank component cap.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S009
S011 · implies
Before
source roles = [Length segment0, 0]
After
derived = [0, 0, 1, Yes]
Conditions: none
The exact certificate r>=0,r²=N and(r+1)²>N identifies the UNIQUE nonnegative principal root.This slice requires an actual perfect square.Do not round a float or return both±r as distances;derived r is not SAFE-capped.
Step identifiers and dependencies
Rule: Length_EXACT_perfect_square_certificate_NONNEGATIVE_principal_root · Uses: G001, S010
S012 · calculation
Before
Length segment1 ORIGINAL Q minus P coordinate0 := sub(0, 0)
After
Length segment1 ORIGINAL Q minus P coordinate0 = 0
Conditions: none
Substitute exact ORIGINAL roles,without floating approximation.SAFE bounds raw inputs only;derived integers/rationals are unbounded and do not inherit another bank component cap.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S011
S013 · calculation
Before
Length segment1 ORIGINAL Q minus P coordinate1 := sub(0, 0)
After
Length segment1 ORIGINAL Q minus P coordinate1 = 0
Conditions: none
Substitute exact ORIGINAL roles,without floating approximation.SAFE bounds raw inputs only;derived integers/rationals are unbounded and do not inherit another bank component cap.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S012
S014 · calculation
Before
Length segment1 ORIGINAL square coordinate0 := mul(0, 0)
After
Length segment1 ORIGINAL square coordinate0 = 0
Conditions: none
Substitute exact ORIGINAL roles,without floating approximation.SAFE bounds raw inputs only;derived integers/rationals are unbounded and do not inherit another bank component cap.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S013
S015 · calculation
Before
Length segment1 ORIGINAL square coordinate1 := mul(0, 0)
After
Length segment1 ORIGINAL square coordinate1 = 0
Conditions: none
Substitute exact ORIGINAL roles,without floating approximation.SAFE bounds raw inputs only;derived integers/rationals are unbounded and do not inherit another bank component cap.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S014
S016 · calculation
Before
Length segment1 ORIGINAL squared norm sum := sum(0, 0)
After
Length segment1 ORIGINAL squared norm sum = 0
Conditions: none
Substitute exact ORIGINAL roles,without floating approximation.SAFE bounds raw inputs only;derived integers/rationals are unbounded and do not inherit another bank component cap.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S015
S017 · implies
Before
source roles = [Length segment1, [0, 0], [0, 0]]
After
derived = [[0, 0], 0]
Conditions: none
In the SAME equal-unit orthogonal L2 frame,the directed displacement is Q-P with signs retained.The sum of coordinate squares is the nonnegative SQUARED length.Derived coordinates may exceed SAFE without being revalidated as raw inputs.
Step identifiers and dependencies
Rule: Euclidean_DIRECTED_displacement_then_SQUARED_nonnegative_norm · Uses: G001, S016
S018 · calculation
Before
Length segment1 candidate nonnegative root squared := mul(0, 0)
After
Length segment1 candidate nonnegative root squared = 0
Conditions: none
Substitute exact ORIGINAL roles,without floating approximation.SAFE bounds raw inputs only;derived integers/rationals are unbounded and do not inherit another bank component cap.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S017
S019 · calculation
Before
Length segment1 candidate next integer := sum(0, 1)
After
Length segment1 candidate next integer = 1
Conditions: none
Substitute exact ORIGINAL roles,without floating approximation.SAFE bounds raw inputs only;derived integers/rationals are unbounded and do not inherit another bank component cap.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S018
S020 · calculation
Before
Length segment1 next integer squared := mul(1, 1)
After
Length segment1 next integer squared = 1
Conditions: none
Substitute exact ORIGINAL roles,without floating approximation.SAFE bounds raw inputs only;derived integers/rationals are unbounded and do not inherit another bank component cap.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S019
S021 · implies
Before
source roles = [Length segment1, 0]
After
derived = [0, 0, 1, Yes]
Conditions: none
The exact certificate r>=0,r²=N and(r+1)²>N identifies the UNIQUE nonnegative principal root.This slice requires an actual perfect square.Do not round a float or return both±r as distances;derived r is not SAFE-capped.
Step identifiers and dependencies
Rule: Length_EXACT_perfect_square_certificate_NONNEGATIVE_principal_root · Uses: G001, S020
S022 · implies
Before
source roles = [[[0, 0], [0, 0], [0, 0]]]
After
derived = [[0, 0]]
Conditions: none
Return the TWO segment distances(d(P,Q),d(Q,R)) in the ORIGINAL order.Coincident points and distance0 are legal;do not substitute the sum or d(P,R).
Step identifiers and dependencies
Rule: Length_TWO_original_segment_roots_IN_ORDER_not_sum_or_endpoint · Uses: G001, S021