Zulip Chat Archive
Stream: CSLib
Topic: Porting from rocq ?
Bas Spitters (Feb 08 2026 at 09:51):
Rocq has a huge CS library.
There are already some porting efforts under way (e.g. iris/stdpp) and softwarefoundations.cis.upenn.edu .
[ I also have some of my own that I'll announce separately. }
Did you consider porting, or at least taking inspiration from the Rocq eco-system?
The CS lib roadmap is not very detailed, so for now, I've just asked an LLM to do a quick comparison.
It's below (slightly edited). I'd be happy to help with a more detailed comparison.
The HOL eco-systems can also be a rich source for inspiration.
I believe this may also be a chance for deeper connections and collaboration between the eco-systems.
One such project we are working on is the peregrine-project.github.io. (for verified compilers, pilar II)
AI (mostly) generated
Chris Henson (Feb 08 2026 at 10:20):
Small nitpick: I think it would be nice to move the wall of LLM text into a spoiler drop-down so the human text is easier to see in the flow of conversation.
I'll speak mostly on the lambda calculus formalizations I wrote. These modules, as noted in their docstrings, very directly take inspiration from Rocq and I wouldn't object to calling them a port. (The interesting deviations as I talked about in my Lean Together talk are how Lean's metaprogramming and grind change things). This isn't in CSLib yet, but I also spent a lot of time looking at Agda formalizations of lambda calculi because of how I believe their intrinsic typing judgements are needed for getting some version of categorical semantics in to Lean.
As I have mentioned previously, my next big project for CSLib is going to be very directly taking inspiration from Rocq and Nominal Isabelle in setting up metaprogramming utilities for declaring type systems and binding. Again the interesting part here is in synthesis of prior tooling of other proof assistants into something that looks a little bit different in Lean. In areas that I'm less familiar with, I know there have been discussions about making use of the recently added coinductive predicates, which would definitely closely reference prior work in Rocq.
There are several other examples I'll omit for brevity. So yes, it has not only been considered to take inspiration from Rocq and other proof assistants, but is already actively shaping the library. Several of the examples in the LLM generated text are things that I have already used as inspiration or will for future work. I would personally be welcoming of idiomatic (i.e. not fully AI translated) ports of developments from other proof assistants. The idiomatic piece here is crucial, especially when translating tactics and automation between proof assistants and using existing Mathlib abstractions.
Bas Spitters (Feb 08 2026 at 13:17):
Hi @Chris Henson I'll try to look up your talk later. Unfortunately, there are no slides here: https://leanprover-community.github.io/lt2026/schedule.html
From what you wrote, what you've done (looking at rocq and agda) is precisely what I tried to suggest.
I see you are a PhD-student. Have you considered how to get academic credit for your work, while also giving due credit to earlier formalizations?
I agree there are more idiomatic ways of translating then say Babel does (https://hal.science/hal-05342510/document)
But I'm also wondering how to justify porting of several hundreds of thousands of lines of code from Rocq to Lean, if we dont use assistance.
About nominal sets, our colleagues work on nominal SSProve is now in the main line: https://eprint.iacr.org/2025/598
Maybe it is of some use to you. I'd be interested in an idiomatic development in Lean.
Snir Broshi (Feb 08 2026 at 13:38):
Link to the talk-
https://youtu.be/BVmhPmrAMGU
Snir Broshi (Feb 08 2026 at 13:38):
And another CSLib talk-
https://youtu.be/KfIZn2zH8CA
Snir Broshi (Feb 08 2026 at 13:40):
Bas Spitters (Feb 08 2026 at 14:34):
This is classical POPLmark (reloaded) material. Someone (@Chris Henson ?) should do Lean4!
( or maybe it's already done, and then the websites would need to be updated...)
https://poplmark-reloaded.github.io/
https://www.seas.upenn.edu/~plclub/poplmark/
Chris Henson (Feb 08 2026 at 14:47):
Thanks for finding the links @Snir Broshi. To address your other questions @Bas Spitters :
Bas Spitters said:
Have you considered how to get academic credit for your work, while also giving due credit to earlier formalizations?
Yes, as I think is true of any PhD student publications are being considered! How to frame things is a question, but for instance the (very early) work I describe above regarding a Lean synthesis of Autosubst and related work is sufficiently novel in my view. Even the work in my talk linked above, while well trod in some sense, is interesting in seeing how it compares the first Rocq formalizations of locally nameless binding.
I agree there are more idiomatic ways of translating then say Babel does (https://hal.science/hal-05342510/document)
But I'm also wondering how to justify porting of several hundreds of thousands of lines of code from Rocq to Lean, if we dont use assistance.
Disclaimer: I am a single maintainer that does not speak unilaterally for CSLib and I'll be as brief as possible at the cost of nuance. My view is the many discussions you can find in other threads about "why do we formalize mathematics?" equally apply here. I'd ask a similar "why do we port to Lean?". For myself, I think it is because there is something inherently interesting to be found in discovering the "Lean way" of implementing the previous decades of PL research done in other proof assistants. For me, using AI to perform large ports does not align with my goals of careful exploring this space. The details are deceptively "simple"!
Bas Spitters said:
This is classical POPLmark (reloaded) material. Someone (Chris Henson ?) should do Lean4!
( or maybe it's already done, and then the websites would need to be updated...)
Yes, it is! I didn't include records, but the pure Fsub pieces (1A/2A) are complete, closely following Charguéraud. A new contributor is currently working on strong normalization for STLC.
Fabrizio Montesi (Feb 13 2026 at 12:22):
We take inspiration from projects (and papers) in other theorem provers, yes. Porting efforts or pointers to relevant projects are always welcome (just like any other formalisation effort in the scope of CSLib). Sometimes porting is not simple, as it requires a redesign to integrate well with CSLib and Mathlib (which we depend on).
Last updated: Feb 28 2026 at 14:05 UTC