gram

std.linalg.gram · Level L0

Gram matrix of the columns of X.

G = Xᵀ·X

Signature

gram(X: f64[m, n]) → f64[n, n]

Structure

The function as NOVA stores it: one box per input, operation and output, and arrows that carry values. A double border marks another library function this one runs — called once, or by Scan once per element; select it to open that function.

Xf64[m, n]TransposeXtMatMulGGf64[n, n]
  • input
  • operation
  • constant
  • call
  • output

Verification

  • Signature proven by NOVA’s shape solver, for every size.
  • Equal to the reference X.T @ X in exact rational arithmetic, on all 40 test cases.
  • All 591 float64 results inside the running error bound; the closest uses 80% of it.
  • Interpreter and NumPy backend return bit-identical results.
Accuracy in detail
correctly rounded (the float64 nearest the exact value)
85%
bit-equal to the NumPy formula in float64
100%
largest error, in units in the last place
9.95

Identity

Calls
—
Called by
—
sha256:19bdf6b4d6b47714fa718f49302c01fde11360afe7f30c97e86c8e2896208ed1

The semantic hash of the graph. It changes when the program changes, and never when only its documentation does.

Control handle

Symbol
Ω:std.linalg.gram · Ω:gram
Pins
sha256:fd2ca187fda12d1b4699d8d24f9bb75ad467accaf28269a6b3a6c38ccbca76acthis graph alone
Evidence
sha256:2c824bce376ccddfa46bfef7e6f3f8e5015fb0915e6050c72830094aefbf370fthe hash of its verification record
Needs
no capability: a pure function

Through NOVA’s control layer, the symbol launches this function only while the program still matches what it pins: a change to this graph, or to any graph it reaches, needs a migration first.