Public Tensor Linear Algebra #
User-facing matrix factorizations and solves on the canonical tensor type.
Instances For
Reduced QR by classical Gram-Schmidt, sweeping source columns left to right.
The sweep keeps the populated basis columns and the finished coefficient columns in arrays and
builds the two factor matrices once at the end. A dependent column does not consume a basis slot,
so later independent columns can still enter. Each dot product and projection sums only active
entries in their original order, starting from zero. Unused basis columns are zero and never
introduce spurious 0 * NaN terms.
Instances For
Compute a reduced QR factorization with classical Gram-Schmidt.
The result uses the NumPy/PyTorch reduced shapes
q : Tensor α [m, min m n] and r : Tensor α [min m n, n].
For tall and square inputs, this is the specification computation with its dimensions
presented in reduced form; its reconstruction and orthonormality theorems concern real scalars
and require positive diagonal pivots. For wide inputs, linearly dependent source columns do not
consume a basis column, so a later independent column can still enter the reduced basis. Any unused
trailing basis columns are zero.
Instances For
Compute the lower-triangular Cholesky factor candidate of a square matrix.
For real symmetric inputs with positive pivots, the specification layer proves
A = L @ L.transpose for its logical computation. Compilation substitutes an array implementation
through implemented_by; equivalence to the logical computation is not proved. No exact
reconstruction theorem is asserted for floating-point scalars. Inputs outside the intended domain
follow the scalar backend's arithmetic behavior; for example, Float produces NaN after a
negative square root.
Instances For
Solve (kernel + regularization * I) x = target through the Cholesky path.
The operation is intended for symmetric positive-semidefinite kernels and positive regularization.
Its executable implementation is available across scalar backends supporting Context.
The specification uses implemented_by substitutions for the compiled solve and Cholesky paths;
their equivalence to the logical definitions is not proved.