What does iris-lean do?



The iris-lean project aims to port Iris into Lean. As it stands now, the project is mainly a formalization of Iris Proof Mode frontend MoSeL.

I want to understand concretely what iris-lean has accomplished, in order to judge how it might be used for mechanizing other separation logics in Lean. To do this, I worked my way up the project’s import graph, and made an inventory of which kind of theorems are in each file.

Higher-res version

Notes

Here are my notes about what each file in the iris-lean repository does.

I didn’t end up reading anything in ProofMode, because Lean metaprogramming is still magical to me, and I’m happy to leave it as “that code works”. There is a single example in the repository.

What does iris-lean do, and what’s next?

iris-lean implements a collection of tactics against a particular axiomatization of separation logic.

The most glaring deficiency in iris-lean is the fact that it’s never actually instantiated. Trying to do this for a simple separation logic (and mechanizing its adequacy theorem) would be an obvious next step. I suspect that in the process of doing this, one would need to break up the BIBase typeclass into smaller components—not every logic will have all of the features of Iris. This could possibly be a fragment of one of the early logics presented in Iris from the Ground Up, but I think that might even be a little much at this point.

They also have no program logics developed on top of their separation logic. Implementing an analogue of the generic program logic code from Iris would probably require a lot of work. It would be nice if there was generic tactic-writing code for this.

The results for OFEs and COFEs could be ported from regular Iris, since those have no dependencies in Iris. I’m curious about if any of this work can integrate into Mathlib.

The README for iris-lean mentions an issue with generalized rewriting. I don’t fully understand how they solve this issue with their rw' tactic in the development. Which features of generalized rewriting does iris-lean need, and what has changed since this project was under development?

Code

My fork is updated to Lean 4.14.0-rc2. The import graph was generated using importGraph.