Bounds and norm facts for dependent tensors.
The proofs use coordinate extensionality and finite sums. They therefore describe the mathematical tensor independently of its packed physical storage.
The dot product is symmetric.
Shape preservation #
Elementwise addition does not change the statically tracked shape size.
Elementwise multiplication does not change the statically tracked shape size.
Uniform finite bounds #
theorem
Spec.safediv_bound
{s : Shape}
(a b : TorchLean.Tensor ℝ s)
(_i : Fin s.size)
:
Context.defaultEpsilon > 0 →
∃ (bound : ℝ),
(a.safedivSpec b).absSpec = TorchLean.Tensor.mapSpec (fun (value : ℝ) => min value bound) (a.safedivSpec b).absSpec
A finite tensor admits a uniform bound, expressed by an idempotent minimum clamp.
Squared norm #
The squared Euclidean norm of all coordinates of a tensor.
Instances For
A tensor squared norm is nonnegative.
A tensor has zero squared norm exactly when every coordinate is zero.