Zulip Chat Archive

Stream: new members

Topic: Examples of Lean programs being verified in Lean


Ching-Tsun Chou (Jun 01 2025 at 04:23):

Where can I find examples of Lean programs being verified in Lean? I am interested in both functional and imperative (namely, monadic) programs. This is for my own education, so simple (but not too simple) programs are what I'm looking for. Thanks in advance!

pandaman (Jun 01 2025 at 05:50):

Shameless plug:wink:

lean-regex is a verified regex engine implementation based on NFA compilation. Most of the code is written in functional style, but the core search logic is pretty much while loops disguised as pure functions. It's not super simple, but also not very big as a working program.

Ching-Tsun Chou (Jun 01 2025 at 18:33):

@pandaman Thanks for the pointer! This program is probably still much larger than my current state of knowledge can comprehend. What did you study when you were learning how to do it?

pandaman (Jun 01 2025 at 23:00):

Functional programming in Lean is a great resource to learn how to write programs in Lean and verify them

Ching-Tsun Chou (Jun 02 2025 at 03:09):

Thanks for the pointer!


Last updated: Dec 20 2025 at 21:32 UTC