Leaning Into the Coding Interview 2: static bounds checks and dependent types

In an earlier post, we learned a bunch of Lean’s syntax and saw how to write some simple theorems about the venerable(?) Fizzbuzz problem. In particular, we learned some simple tactics that can break down a theorem’s goal into simpler statements, until we are left with an axiomatically-true statement: The rw tactic lets us, if we have a proof of equality, substitute one side of the equality for…