arXiv · 2609.39009
Improved Tristate Multiplication With Formalization in Rocq
Abstract
We give a new multiplication algorithm for tristate numbers improving upon the state-of-the-art implementation from the Linux kernel in terms of precision and formal proofs. Our algorithm is significantly more precise as shown by experimental evaluation (at the peak, giving better results in 95.59% cases compared to the previous work for 31-bit samples). Importantly, we achieve this additional precision with performance comparable to the previous algorithm, as demonstrated by benchmarks. Finally, we formalize and prove the soundness of the algorithm in the Rocq proof assistant, adding to the trust in the resulting implementation. Our algorithm is now part of the upstream Linux kernel. Our soundness proof in Rocq for the new multiplication algorithm works for all bit widths, while the SAT/SMT-based machine-checked proof accompanying the previous algorithm was restricted to 8 bits. We also provide Rocq proofs for the soundness and optimality of the newly added tnum union operation and the existing tnum addition algorithm from the Linux kernel. Our optimality proof for tnum addition presents a simpler and straightforward lemma compared to prior work.
Explore related subjects
Keep this discovery
Explore connections, maps & timelines
Nandakumar Edamana, Piyush P Kurur, Unnikrishnan Cheramangalath. 2026-09-30. Improved Tristate Multiplication With Formalization in Rocq. https://arxiv.org/abs/2609.39009
Cite the original work for its findings. Save a collection to share your selection of sources.