Tensor Algebra Lemmas #
This file collects foundational algebraic lemmas for TorchLean.Tensor over ℝ: pointwise
arithmetic identities, linearity of matrix-vector multiplication, and the scalar-fold bridge used
throughout the autograd and runtime-correctness proof files.
Elementwise addition is associative (over $\mathbb R$ tensors).
Bias cancellation for tensor subtraction: (a + c) - (b + c) = a - b.
Linearity of matrix-vector multiplication in the vector argument (addition).
Linearity of matrix-vector multiplication in the vector argument (scaling).
Full linearity of matrix-vector multiplication in the vector argument.
Left identity for addSpec: adding the all-zero tensor does nothing.
Right identity for addSpec: adding the all-zero tensor does nothing.
Left identity for mulSpec: multiplying by the all-ones tensor does nothing.
Right identity for mulSpec: multiplying by the all-ones tensor does nothing.
Adding scalar tensors in a left fold agrees with folding their scalar values.