docs(lean4): add Rust cross-references to formal specs

Add documentation comments linking Lean 4 specifications to their
corresponding Rust implementations (tree_predict, mlp_predict_32,
PackedNode). Reference TorchLean arXiv ID for future axiom replacement.

Signed-off-by: Sienna Meridian Satterwhite <sienna@sunbeam.pt>
This commit is contained in:
2026-03-10 23:38:22 +00:00
parent 97e58b5a42
commit 3628424f43
3 changed files with 19 additions and 5 deletions

View File

@@ -4,7 +4,11 @@ import Sunbeam.Model.ReLU
namespace Sunbeam
/-- Weights for a 2-layer MLP (input → hidden → scalar output). -/
/-- Weights for a 2-layer MLP (input → hidden → scalar output).
Corresponds to `ensemble::mlp::mlp_predict_32` in Rust, which uses const generic
`INPUT` and a fixed hidden dimension of 32. Here `hiddenDim` is a parameter so
structural properties can be proved generically. -/
structure MLPWeights (inputDim hiddenDim : Nat) where
w1 : Fin hiddenDim FloatVec inputDim
b1 : FloatVec hiddenDim