TorchLean expands into a verified tensor programming framework with einsum and GPU execution in Lean
burny_tech · x · 2026-10-15
Robert Joseph George shares a major update on TorchLean, which is evolving from an ML verification tool into a general tensor programming and execution framework inside Lean.
- Expanded tensor API: shape-safe operations, einsum for general tensor contractions, plus rearrange/expand/reduce. Matrix multiplication, multi-head attention and more can now be expressed directly in Lean with shapes checked during elaboration.
- Verified lowering: the einsum implementation generates fused index-based computations with Lean-checked proofs tying them to their mathematical specifications, including arithmetic operation order.
- GPU compilation: supported Lean functions can now be compiled for GPU execution and used via the tensor API; autograd records a tape of operations for backprop.
- Key question made precise: whether the lowered program still computes the original function — statable and provable in Lean, so writing, evaluating and proving become parts of the same project.
More from coding & agent
- Google Antigravity best uses: /plan, /boost, subagents and scheduled workflows — ChrisUniverse · 2026-10-15
- Dumping every MCP tool schema each turn is a harness bug; tool search cuts 85% of the overhead — ainexfinder · 2026-10-15
- t3 code demo: switching among 78 themes with the /theme command — NERDDISCO · 2026-10-15
- Dev lets Codex autonomously take over his MacBook and iPhone Air to profile and optimize his game — Dimillian · 2026-10-15
- 48 prompts, 1,000 reasoning steps: dev builds 7,342-line zero-dependency game with Gemini 4 Argon — zacharynado · 2026-10-15
- Energy nerd uses Claude Code to build the power-grid tycoon game he couldn't for a decade — Electricvid · 2026-10-15