Formalizing Julia in Lean (and finding 400+ bugs in Base)

This is amazing, and thank you so much for all your hard work! How reusable is this code—is there a package or something for finding errors in Julia with Lean? That’d be awesome to see :slight_smile:

Maybe file an PR for this change? I timed it the same:

julia> @btime collect(LinRange(0.9, nextfloat(0.9), 10))
  27.814 ns (2 allocations: 144 bytes)

[Before and after 2 allocations, both 144 bytes, but should either allocate? Might be about global scope.] Maybe slightly faster, or just noise, at least not slower.

What do you mean? We should compete with np.linspace with LinRange (not with StepRangeLen?!). StepRangeLen gives a different result and also with, if you meanst something like that:

julia> @btime collect(StepRangeLen(0.9, nextfloat(0.9) - 0.9, 10))
  29.148 ns (2 allocations: 144 bytes)

Just seen in the na-digest:

From: Diana Halikias diana.halikias@nyu.edu
Date: October 27, 2026
Subject: Lean + Numerical linear algebra working group

We are running a biweekly working group over Zoom to discuss integrating
Lean and NLA research. Topics include an NLA Lean library, incorporating Lean
in combination with AI into our research workflows, proof formalization
standards for the research community, and theoretical underpinnings of Lean.
Our next meeting is Tuesday, Nov 10 at 9:30am eastern time. If you are
interested in joining the email list, please contact diana.halikias@nyu.edu. You
can also view the slides from our first meeting on the website:
dihalikias.github.io/lean-nla.html

Diana Halikias and Haim Avron

For a real Halloween fright… look at floor(x; sigdigits=1) near a power of 10! :face_with_peeking_eye:

Luckily it is fixable: