Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prove 3588 !-> ... and 115 !-> ... via confluence #451

Merged
merged 4 commits into from
Oct 10, 2024

Conversation

lyphyser
Copy link
Contributor

@lyphyser lyphyser commented Oct 9, 2024

This adds a confluence proof for 3588 !-> ..., which is interesting since it is turned by Vampire and kbcv into a system of two confluent rules, which are then implemented using Joachim Breitner's Confluence system (with some enhancements).

Not sure if it should be merged as is because it is quite slow to compile, due to the massive automated case splitting through the custom "sledgehammer" tactic that it employs (it's somewhat fine to have it alone, but if 10-100 more like this would probably be a problem).

Perhaps someone who is more experienced at Lean elaboration performance optimization can find a way to speed it up (and also automate it more ideally); otherwise it's possible that some other strategy for making confluence proofs needs to be found, or possibly a build system change where some proofs are not compiled by default.

EDIT: I rewrote the proof and now it's fast and good and all these problems are solved

@pitmonticone
Copy link
Collaborator

pitmonticone commented Oct 9, 2024

Thanks @lyphyser! Could you please resolve merge conflicts?

@pitmonticone pitmonticone marked this pull request as draft October 9, 2024 09:37
@lyphyser lyphyser force-pushed the prove3588 branch 2 times, most recently from 9863168 to 4dbde64 Compare October 9, 2024 12:16
@lyphyser
Copy link
Contributor Author

lyphyser commented Oct 9, 2024

I have a much better version that I will push soon.

@lyphyser
Copy link
Contributor Author

lyphyser commented Oct 9, 2024

OK, so the proof has been rewritten and is now much better: fast, relatively short and simple, human readable, generalizable in principle to other equations (with some work/thought needed, new issues might arise).

Should be mergeable now.

More natural since it can take any natural value, while length is > 0
This adds a bunch of lemmas in Confluence and makes two slight changes.

First change is we define NF in terms of rw instead of bu, which seems
more natural. It is equivalent to the other definition, which is retained
as buNF, with a proof that NF <-> buNF.

Second change, bu is changed to now call rw for Leaf as well. This seems more
natural and is also needed to have NF <-> buNF. Note that if rw is a
projection, then nothing changes, since it must be the identity on leaves.
We prove this using a proof that is specific to this equation, but
designed to be mostly generalizable and perhaps possible to automatically
generalize.
@lyphyser lyphyser marked this pull request as ready for review October 9, 2024 21:07
@lyphyser lyphyser changed the title Prove 3588 !-> ... via confluence Prove 3588 !-> ... and 115 !-> ... via confluence Oct 10, 2024
@teorth teorth merged commit b0708a3 into teorth:main Oct 10, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants