From Jaxpr to a permutation-invariance proof #
The Python companion captures sum(x * x) and several other tensor computations.
run loads its artifacts through the shared IR checker and compares the native Lean
outputs with the recorded JAX outputs. Theorems below concern the real-valued IR
computation, for every vector length and every permutation, not just those samples.
Neither numerical agreement nor these theorems certify the Python adapter or XLA. Permutation invariance uses exact addition and does not assert bitwise invariance of a floating-point reduction.
The three IR nodes emitted for jax.numpy.sum(x * x).
Instances For
The tensor calculation represented by the captured graph.
Instances For
Evaluate the complete IR graph, rather than proving only a separate tensor formula.
Reordering vector entries leaves the exact real sum of their squares unchanged.
The captured graph itself is permutation invariant under its real-valued semantics.
Compare a mixed-precision example using exact binary words at every declared precision.
This runner checks the recorded example, not all inputs or XLA's reduction schedule. The companion chooses exactly representable reduction inputs for these comparisons.
Instances For
Check an artifact and compare all designated outputs using the binary64 diagnostic evaluator.