Reference · Vectors
rainbow.math.linear.vector.dot-distance-bound
Componentwise distance accounting for signed dot products. `vector/dot-distance-sum weights left right` sums the distances between corresponding weighted components. When `left` and `right` have the same shape, paired-addition Lipschitzness proves that the distance between their dot products is below this explicit sum. A second theorem transfers any upper bound on the sum to the dot distance. The shape premise is essential: truncating dot products can otherwise consume different weight prefixes. Native, kernel-checked, and axiom-free on D63.
vector/dot-distance-sum
vector/dot-distance-sum : (x₁ x₂ x₃ : List ℚ) → ℚ
List = data/Listℚ = signed/SignedRational
vector/dot-distance-below-sum
vector/dot-distance-below-sum : (weights left right : List ℚ) (shape : vector/same-shape left right) → signed/distance (vector/dot weights left) (vector/dot weights right) ≤ vector/dot-distance-sum weights left right
List = data/Listℚ = signed/SignedRational≤ = signed/at-most
vector/dot-distance-bounded
vector/dot-distance-bounded : (weights left right : List ℚ) (upper : ℚ) (shape : vector/same-shape left right) (sum-bound : vector/dot-distance-sum weights left right ≤ upper) → signed/distance (vector/dot weights left) (vector/dot weights right) ≤ upper
List = data/Listℚ = signed/SignedRational≤ = signed/at-most