Ruby-lean: A Ruby semantics with a type soundness proof Software engineer Sam Xif built ruby-lean, an executable model of Ruby's semantics in the Lean proof assistant, together with a proof of type soundness for a small fragment of Sorbet's type system, according to the project write-up. The semantics is validated by differential testing against Ruby and passes a large swath of conformance tests, with source code published on GitHub and a playground available. Xif reported two lessons from the project: agents perform well on long-horizon tasks when the task definition is clear and fail unpredictably when it is not, and advanced AI working with proof assistants has the potential to change how software correctness is managed. ruby-lean: A Ruby semantics with a type soundness proof Written for Software engineers and computer scientists, or technical hobbyists Bottom line up front: I, with heavy augmentation from LLMs, have built an executable model of Ruby's semantics in Lean, together with a proof of type soundness for a small fragment of Sorbet's type system built on the semantics. The semantics is validated by differential testing against Ruby and passes a large swath of conformance tests. Through this project, I learned firstly that agents do great at long-horizon tasks if the task definition is clear; if it is not clear, they mess up in unpredictable ways. Secondly, I learned that advanced AI, via its ability to work with proof assistants, has the potential to revolutionize how we manage the correctness of software. Check out the ruby-lean playground https://samx.io/ruby-lean and see it in action. For the technically inclined, see the Technical Appendix 2026-09-26-ruby-lean-technical-appendix.html . View the source code on GitHub https://github.com/sam-xif/ruby-lean . Introduction: "Semantics Done Quick" introduction-semantics-done-quick Suppose you have a program in your language of choice, and you want to prove that it is correct. Proof here means for all inputs , of which there could be infinitely many. No amount of unit tests can satisfy that obligation.