Skip to content
Rainbow docs menu

Reference · Vectors

rainbow.math.linear.vector.norm-witness-laws

Vectorssrc/rainbow/math/linear/vector/norm_witness_laws.clj0 definitions, 3 theorems

Transformation laws for exact native norm witnesses. signed/scale-square norm/is-norm-negate-vector norm/is-norm-scale Scaling a signed value by a nonnegative rate scales its square by rate^2. Consequently, exact perfect-square norm witnesses transport through vector scaling. They also transport through vector negation because squared norm is invariant under componentwise negation.

Depends onmath.linear.vector.norm-laws

signed/scale-square

TheoremFor all inputsNo axiomsSource, line 49

signed/scale-square :
  (rate : ℚ≥0) (value : ℚ)
  → signed/scale rate value · signed/scale rate value = signed/scale (rate · rate) (value · value)

= = signed/equivalent: equality of rational values· = signed/multiplyℚ = signed/SignedRationalℚ≥0 = nnrat/NonnegativeRational

norm/is-norm-negate-vector

TheoremFor all inputsNo axiomsSource, line 95

norm/is-norm-negate-vector :
  (values : List ℚ) (candidate : ℚ) (witness : norm/is-norm values candidate)
  → norm/is-norm (vector/negate values) candidate

List = data/Listℚ = signed/SignedRational

norm/is-norm-scale

TheoremFor all inputsNo axiomsSource, line 117

norm/is-norm-scale :
  (rate : ℚ≥0) (values : List ℚ) (candidate : ℚ)
  (witness : norm/is-norm values candidate)
  → norm/is-norm (vector/scale rate values) (signed/scale rate candidate)

List = data/Listℚ = signed/SignedRationalℚ≥0 = nnrat/NonnegativeRational