Skip to content
Rainbow docs menu

Reference · Matrices

rainbow.math.linear.matrix.signed-scale

Matricessrc/rainbow/math/linear/matrix/signed_scale.clj1 definitions, 3 theorems

Arbitrary signed-scalar homogeneity for native finite matrices. The existing vector/signed-scale acts pointwise by an arbitrary signed rational. Dot products are homogeneous in their second argument as well as their first, so native matrix action commutes with scaling its input. Mapping the same action over matrix rows then gives an unrestricted left-factor homogeneity law for matrix multiplication. These laws remain valid for ragged and empty matrices because every operation uses the same total list semantics. Native and axiom-free on D63.

Depends onmath.linear.matrix.associativity-counterexample

matrix/signed-scale

DefinitionSource, line 153

matrix/signed-scale :
  (x₁ : ℚ) (x₂ : List (List ℚ))
  → List (List ℚ)

List = data/Listℚ = signed/SignedRational

vector/dot-signed-scale-right

TheoremFor all inputsNo axiomsSource, line 68

vector/dot-signed-scale-right :
  (factor : ℚ) (values weights : List ℚ)
  → vector/dot values (vector/signed-scale factor weights) = factor · vector/dot values weights

= = signed/equivalent: equality of rational valuesList = data/List· = signed/multiplyℚ = signed/SignedRational

matrix/vector-multiply-signed-scale

TheoremFor all inputsNo axiomsSource, line 101

matrix/vector-multiply-signed-scale :
  (factor : ℚ) (rows : List (List ℚ)) (values : List ℚ)
  → vector/equivalent (multiply) (scale)
  where multiply := matrix/vector-multiply rows (vector/signed-scale factor values)
  where scale := vector/signed-scale factor (matrix/vector-multiply rows values)

List = data/Listℚ = signed/SignedRational

matrix/multiply-signed-scale-left

TheoremFor all inputsNo axiomsSource, line 166

matrix/multiply-signed-scale-left :
  (factor : ℚ) (left right : List (List ℚ))
  → matrix/equivalent (multiply) (scale)
  where multiply := matrix/multiply (matrix/signed-scale factor left) right
  where scale := matrix/signed-scale factor (matrix/multiply left right)

List = data/Listℚ = signed/SignedRational