跳到正文
研踪PaperTrail
← 研踪 PaperTrail

arXiv:2611.19505 · v1

Formalizing $\mathsf{einsum}$ with Named Tensor Notation

首次提交 2026-11-15 00:56
版本更新 2026-11-15 00:56
雷达观测 2026-11-17 12:06
arXiv ↗PDF ↗

摘要

Einstein notation (einsum\mathsf{einsum}) is a widely adopted tensor operation that has proven useful in areas such as machine learning and quantum computing. But it had no formal semantics until recently, and its properties had no mechanized verification. We formalize the denotational semantics of a language of tensors (multi-dimensional arrays) that supports einsum\mathsf{einsum} and repeated tensors (expand\mathsf{expand}). With this semantics, we verify equational rewriting rules about einsum\mathsf{einsum} and expand\mathsf{expand} that improve the performance of tensor computation. Whereas typical languages use unnamed tensors, whose shape is a sequence of natural numbers, we found it advantageous for mechanization to use named tensors, whose shape is a finite map from names to natural numbers. To our knowledge, this is the first time that the semantics and rewriting rules of einsum\mathsf{einsum} are mechanized in a proof assistant. Our solution is agnostic to proof assistants; we have implemented it in Lean and partially in Agda.

作者备注:14 pages

AI 论文解读

基于摘要 · 非全文审阅

此版本尚未生成 AI 解读。解读由后台任务生成并按论文版本保存,登录后共享已有结果。

版本差异

目前只收录了一个版本。收录下一版后,可以对照标题、作者、分类和摘要。

观测到的版本

相邻记录可能跳过中间版本;首次发现 v2 及以上也会标为版本更新。

v1 · 2026-11-15 00:56 · 最新观测版本

Formalizing $\mathsf{einsum}$ with Named Tensor Notation

Einstein notation (einsum\mathsf{einsum}) is a widely adopted tensor operation that has proven useful in areas such as machine learning and quantum computing. But it had no formal semantics until recently, and its properties had no mechanized verification. We formalize the denotational semantics of a language of tensors (multi-dimensional arrays) that supports einsum\mathsf{einsum} and repeated tensors (expand\mathsf{expand}). With this semantics, we verify equational rewriting rules about einsum\mathsf{einsum} and expand\mathsf{expand} that improve the performance of tensor computation. Whereas typical languages use unnamed tensors, whose shape is a sequence of natural numbers, we found it advantageous for mechanization to use named tensors, whose shape is a finite map from names to natural numbers. To our knowledge, this is the first time that the semantics and rewriting rules of einsum\mathsf{einsum} are mechanized in a proof assistant. Our solution is agnostic to proof assistants; we have implemented it in Lean and partially in Agda.

查看此版本解读 →查看此版本原文 ↗