Reference · Vectors
rainbow.math.linear.vector.dot-scale
Homogeneity of the native vector dot product in its first argument. signed/scale-zero signed/scale-multiply signed/scale-respects-equivalence vector/dot-scale-left vector/dot-scale-right The scalar laws are semiring identities checked through the verified nnrat ring normalizer. Dot homogeneity is then one List induction, combining the scalar product law, the tail hypothesis, and signed scale additivity.
signed/scale-zero
signed/scale-zero : (rate : ℚ≥0) → signed/scale rate 0 = 0
0 = signed/zero= = signed/equivalent: equality of rational valuesℚ≥0 = nnrat/NonnegativeRational
signed/scale-multiply
signed/scale-multiply : (rate : ℚ≥0) (value multiplier : ℚ) → signed/scale rate value · multiplier = signed/scale rate (value · multiplier)
= = signed/equivalent: equality of rational values· = signed/multiplyℚ = signed/SignedRationalℚ≥0 = nnrat/NonnegativeRational
signed/scale-respects-equivalence
signed/scale-respects-equivalence : (rate : ℚ≥0) (left right : ℚ) (same : left = right) → signed/scale rate left = signed/scale rate right
= = signed/equivalent: equality of rational valuesℚ = signed/SignedRationalℚ≥0 = nnrat/NonnegativeRational
vector/dot-scale-left
vector/dot-scale-left : (rate : ℚ≥0) (values weights : List ℚ) → vector/dot (vector/scale rate values) weights = signed/scale rate (vector/dot values weights)
= = signed/equivalent: equality of rational valuesList = data/Listℚ = signed/SignedRationalℚ≥0 = nnrat/NonnegativeRational
vector/dot-scale-right
vector/dot-scale-right : (rate : ℚ≥0) (values weights : List ℚ) → vector/dot values (vector/scale rate weights) = signed/scale rate (vector/dot values weights)
= = signed/equivalent: equality of rational valuesList = data/Listℚ = signed/SignedRationalℚ≥0 = nnrat/NonnegativeRational