Zulip Chat Archive
Stream: CSLib
Topic: Adding new algorithms proof in cslib
Ved Bhatawadekar (Jan 07 2026 at 17:13):
Hey I wanted to contribute to the cslib library. I see someone has added a proof for merge sort in algorithms section.
Which algorithms can I pick up next? any suggestions? I was thinking about doing insertion sort/bubble sort?
Shreyas Srinivas (Jan 07 2026 at 17:26):
I would recommend waiting until we sort out some model level conundrums (such as cslib#201)
Shreyas Srinivas (Jan 07 2026 at 20:03):
I recommend checking out the CSLib channel. There seems to be a lot to do in automata theory and logic
Shreyas Srinivas (Jan 07 2026 at 20:04):
You could try formalising the functional correctness of the McNaughton Yamada algorithm for example
Chris Henson (Jan 07 2026 at 20:17):
I don't have permission to move messages from here, but yes please ask CSLib-specific questions in the dedicated channel. (I don't work much on algorithms, so I can't really answer your actual question)
Notification Bot (Jan 07 2026 at 21:05):
This topic was moved here from #computer science > Adding new algorithms proof in cslib by Patrick Massot.
Wrenna Robson (Jan 15 2026 at 09:34):
I am quite interesting in algorithms stuff too so keen to hear more about this.
Wrenna Robson (Jan 15 2026 at 09:35):
I can already see stuff I want to improve about the merge sort stuff (having recently worked on Mathlib's version of this, which sadly doesn't track complexity).
GasStationManager (Jan 22 2026 at 02:58):
For complexity of algorithms yes we'd better wait for the modeling to settle.
Meanwhile, if you're interested in the mathematical properties of algorithms, we can already study them as Lean functions and prove things about them. That's the approach taken in my repo ArtificialAlgorithms. It includes some basic algorithms like insertion sort, but also more exotic ones like Value Iteration and Stochastic Gradient Descent, whose convergence properties are more nontrivial to prove.
Wrenna Robson (Jan 22 2026 at 11:51):
Just FYI, Sorted is now a deprecated predicate.
Wrenna Robson (Jan 22 2026 at 11:51):
you probably want SortedLE
Shreyas Srinivas (Jan 22 2026 at 20:50):
Fwiw, cslib#275 is starting to take shape
Shreyas Srinivas (Jan 22 2026 at 20:50):
I have some trouble getting one of the coercions working, and I am still preparing serious examples, but you can see some good and bad ones already in the repository
Last updated: Feb 28 2026 at 14:05 UTC