Every function is a graph.
The standard library is NOVA’s working corpus: real functions, written as typed graphs, built on one another with Call, and verified before they ship. People read the diagrams; AIs read the same structure.
- functions
- 33
- modules
- 6
- test cases
- 1,320
- verified results
- 6,923
- all passing
- 33/33
Level L0: everything here is built from the primitives NOVA has today. L1 and L2 add standard math primitives, indexing and loops.
Three checks, all automatic
- 01
The right function
In exact arithmetic, the graph must equal an independent reference formula, usually the NumPy library call. Exactly, with rational numbers; to 80 digits where exp or tanh appear.
- 02
A guaranteed accuracy
Every float64 result must lie inside an error bound computed from the graph itself, by running error analysis. The bound holds whatever order NumPy adds in.
- 03
The same answer everywhere
NOVA’s reference interpreter and its NumPy backend must return bit-identical results.
Before any of this, the signature is proven: NOVA’s shape solver checks every broadcast and every contraction, for every size.
Elementwise
std.elementwise · 8Absolute value, built from Relu. Exact: one of the two terms is always zero.
Elementwise square.
Elementwise cube.
Linear interpolation from a to b by a scalar t.
Leaky ReLU with slope alpha for negative inputs, built from Relu.
SiLU (also called swish): x times its own sigmoid.
GELU, tanh approximation, as used in GPT-style networks.
Softsign: a smooth, bounded alternative to tanh. Calls abs.
Linear algebra
std.linalg · 11Inner product of two vectors.
Squared Euclidean norm. Calls dot.
Matrix times vector.
Row vector times matrix.
Outer product: every product xᵢ·yⱼ, by broadcasting. Exact up to one rounding per entry.
Gram matrix of the columns of X.
Bilinear form xᵀ·A·y. Calls matvec, then dot.
Linear combination of two vectors with scalar weights.
Orthogonal projection of x onto the line spanned by u. Calls dot twice.
The part of x orthogonal to u: x minus its projection. Calls proj.
Squared Frobenius norm: the sum of every squared entry.
Geometry
std.geometry · 4Squared Euclidean distance between two points. Calls norm_sq.
Squared distances between every point of X and every point of Y, with one matrix product.
Centroid (mean point) of a set of points.
Shift a set of points so that its centroid is the origin.
Statistics
std.stats · 3Population variance, two-pass: the mean first, then the mean squared deviation.
Population covariance of two paired samples.
Weighted mean with positive weights. Calls dot.
Neural networks
std.nn · 3Affine layer: a batch of rows times a weight matrix, plus a bias.
Two-layer perceptron with a ReLU between the layers. Calls linear twice.
Scaled dot-product attention for one head.
Losses
std.loss · 4Mean squared error.
Mean absolute error. Calls abs.
Hinge loss for labels ±1 and real-valued scores.
L2 weight penalty. Calls frobenius_sq.
The next primitives
Each one unlocks a set of functions. All of them are standard mathematics.
- L1Sqrt, Exp, Log
Elementwise square root, exponential and logarithm.
- L1Maximum, Minimum
Exact elementwise max and min (a + relu(b − a) is not exact in floating point).
- L1Less, Greater, Equal, Where
Elementwise comparison and selection.
- L1ReduceMax, ReduceMin
Largest and smallest value along an axis.
- L1Size
The element count of a symbolic dimension, as a value.
- L1Differentiation through Call
Reverse-mode AD that follows Call into the callee; today composed entries are not differentiable.
- L2Slice, Concat, Gather
Indexing and joining along an axis.
- L2Scan
A general loop whose body is a graph.