Zulip Chat Archive

Stream: iris-lean

Topic: Who wants the glory of finishing iProp?


Markus de Medeiros (Oct 24 2025 at 14:23):

iProp seems like it is pretty close to working on the rfunctors branch, however there are a couple sorry's that mainly have to do with type casts (see eg. ElemG.Bundle.ne).

I will not have much time to commit to Iris-Lean for the next little while, so if you are interested in helping, these goals are a good self-contained challenge. Finishing iProp would be a big step in this project and bring us much much closer to parity with Iris-Rocq!

suhr (Oct 24 2025 at 15:11):

I'll take a look.

suhr (Oct 25 2025 at 13:24):

Tricky stuff.

Markus de Medeiros (Oct 25 2025 at 14:06):

Glad I'm not the only one. Thanks for trying :)

Zongyuan Liu (Oct 28 2025 at 09:24):

FYI, I asked an LLM to fix the remaining sorry’s in IProp/Instance.lean (for fun). It’s almost done, except for those in iOwn_alloc_strong_dep. The proofs aren’t elegant, but they might give some clues. I’ll share more once it finishes the last ones.

Markus de Medeiros (Oct 28 2025 at 09:53):

Cool!!! I'm very curious to see what it ended up doing.

Markus de Medeiros (Oct 28 2025 at 09:54):

And I'd be interested to hear more details about the LLM and prompts as well.

suhr (Oct 28 2025 at 10:00):

Curious. Did you give it the proof context context with pp.all enabled? The usual view seems to lack important information, but in the same time pp.all output is not very human readable.

Zongyuan Liu (Oct 28 2025 at 23:04):

The LLM is stuck at the last subgoal of iOwn_alloc_strong_dep, thinking it is unprovable. The subgoal is finding a key (a Nat) of a map that is fresh AND satisfies some predicate P, given that there are infinite keys that are fresh and satisfy P, respectively. I'm not sure how to prove it either. It seems stronger than what's proven for the Rocq counterpart?

Zongyuan Liu (Oct 28 2025 at 23:08):

suhr said:

Curious. Did you give it the proof context context with pp.all enabled? The usual view seems to lack important information, but in the same time pp.all output is not very human readable.

I connected it to Lean LSP, not entirely sure what the LSP gives it.

Markus de Medeiros (Oct 28 2025 at 23:18):

Zongyuan Liu said:

I'm not sure how to prove it either. It seems stronger than what's proven for the Rocq counterpart?

It is possible that the subgoal is unprovable, the top-level statement should be identical to the Rocq one in this case.

Markus de Medeiros (Oct 28 2025 at 23:20):

Do you think you could commit your progress somewhere? It sounds like you solved all the hard goals, I would be happy to help finish the last one off.

Markus de Medeiros (Oct 28 2025 at 23:23):

Ah, I found your branch :)

Markus de Medeiros (Oct 28 2025 at 23:36):

The last sorry is false (take P and Q to be the sets of even and odd natural numbers) but I'm very confident that iOwn_alloc_strong_dep is provable.

Markus de Medeiros (Oct 28 2025 at 23:55):

I'm curious how many of the comments are yours versus the LLM?

Markus de Medeiros (Oct 29 2025 at 00:03):

Aha! I did not know about eq_of_heq! I can see how that can deal with all the remaining type cases. Very cool, I have learned something from the machine :robot:

Zongyuan Liu (Oct 29 2025 at 09:20):

Markus de Medeiros said:

I'm curious how many of the comments are yours versus the LLM?

I didn't write anything in that file - all the comments and code were written by the LLM (I haven't really got a chance to check carefully if all the generated comments make sense). I only gave it some high-level guidance.

Michael Sammler (Oct 29 2025 at 09:53):

Do you have a link to the file? I would be curious to see what the LLM has produced.

Markus de Medeiros (Oct 29 2025 at 10:01):

The file is here

Markus de Medeiros (Oct 29 2025 at 10:08):

Zongyuan Liu said:

I didn't write anything in that file - all the comments and code were written by the LLM (I haven't really got a chance to check carefully if all the generated comments make sense). I only gave it some high-level guidance.

Fascinating.

Markus de Medeiros (Oct 29 2025 at 10:35):

Today I will refactor this PR here

Zongyuan Liu (Oct 29 2025 at 12:12):

Markus de Medeiros said:

Today I will refactor this PR here

I'm asking the LLM to refactor it right now (didn't see your message when I started). I'll push once it finishes. Maybe I can save your time :)

Markus de Medeiros (Oct 29 2025 at 12:15):

Haha

Michael Sammler (Oct 29 2025 at 12:20):

Out of curiosity, which LLM are you using for this?

Zongyuan Liu (Oct 29 2025 at 12:28):

Michael Sammler said:

Out of curiosity, which LLM are you using for this?

I'm using Claude Code in VS Code, and only using it in a very basic way. I connect it to Lean LSP with https://github.com/oOo0oOo/lean-lsp-mcp, and give it the awesome prompts of https://github.com/cameronfreer/lean4-skills/tree/main. That's it. I'm sure people can easily set up similar things and try it out.

Zongyuan Liu (Oct 29 2025 at 12:38):

@Markus de Medeiros It's done in https://github.com/lzy0505/iris-lean/commit/a4f7441c5581a0a1483f914f490b705b6d8a71c8. Eyeballed the changes, they look reasonable.

Markus de Medeiros (Oct 29 2025 at 12:40):

Cool, I have some different ideas that can eliminate more code but the refactoring of the proofs looks great :)

Remy Seassau (Nov 05 2025 at 13:09):

Zongyuan Liu said:

Michael Sammler said:

Out of curiosity, which LLM are you using for this?

I'm using Claude Code in VS Code, and only using it in a very basic way. I connect it to Lean LSP with https://github.com/oOo0oOo/lean-lsp-mcp, and give it the awesome prompts of https://github.com/cameronfreer/lean4-skills/tree/main. That's it. I'm sure people can easily set up similar things and try it out.

Just popping in to say that I've started using this setup and it works really well, thanks Zongyuan!

Markus de Medeiros (Nov 23 2025 at 20:28):

iProp is sorry-free! iris-lean#97 thanks to Zongyuan!

I ended up not proving own_alloc_strong_dep and getting claude to emit a self-contained proof of iOwn_alloc_dep. I was surprised at how well it worked! We will need to revisit this for the dependencies of own_alloc_strong and own_alloc_cofinite, but the only such dependent in our near future is mono_nat.

I'll also need to refactor the code some more before it can be merged, I already did quite a bit but the code in the PR right now is not acceptable.


Last updated: Dec 20 2025 at 21:32 UTC