-
Notifications
You must be signed in to change notification settings - Fork 92
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
Save 3cubes in set-mbox-ii. #3790
Conversation
First of all, congratulations! Nice to see this theorem formalized.
I suggest you remove these additional comments about formalization completely. I don't need any credit, and it is quite often that someone suggests a theorem to formalize in metamath, and I think usually people don't mention that in the comments. Also, about theorems themselves: I remember that I suggested combining individual proofs into one large proof, but the proof of One thing you can do (and should) is minimize your proofs with metamath-exe, see this page for further directions. For example, the proof of The Finally, maybe the comment in |
Yes, congratulations, it's impressive!
I'm thinking a minimizer tool based on metamath-knife would probably be much faster than the current tool based on the metamath C executable, and maybe it would be able to handle such large inputs, but that's a project that has not been even started yet. |
Yes, I agree, in my opinion such a tool is long overdue :-) The big downside of metamath-exe is that it decompresses the proof before minimizing it, so naturally the minimizer has a very hard time doing anything. If metamath-knife operated on the compressed proof itself, that would be a huge speed improvement alone. That being said, I don't think it would make the proof of |
I think intermediate variables contribute to the length of the proof (as you supposed). I was sure they don't affect the length of the proof. But after your post in this PR I reviewed my proof for 3cubeslem3 and found some suspicious statements which look redundant and most probably they remained after the intermediate variables. Hopefully this should be easy to fix.
I will think on how to split it. But why do you think it is better to split it? Because then metamath.exe will be able to minimize shorter proofs? |
Yes, one reason is that metamath-exe can process proofs of moderate size more quickly (we used to run a full set.mm minimization run once in a while, and large proofs posed a problem). Also your theorems will have respective html pages on the metamath website with all the proof steps outlined, and I think it becomes pretty hard to read if the proof is too long.
One very logical idea for a split is, expand the left hand side in one lemma and the right hand side in another. If you find out that after the intermediate variables fix the proof shrinks in size a lot, then maybe this small split will be enough. |
Thank you, Thierry! Such a fast minimizer which can work with long proofs is definitely a needed tool. |
Thanks Saveliy!
Done.
Done for all theorems except 3cubeslem3l and 3cubeslem3r - they are still too long.
I extracted the left hand side and the right hand side as 3cubeslem3l and 3cubeslem3r, but they are still too long. The fix for intermediate variables removed some small amount of redundant steps but it didn’t improve the situation significantly. Theoretically I can keep splitting proofs further. But it will take some time. On the one hand, I am not sure if this is a good idea because it will add additional lemmas to the global namespace but such lemmas will be hardly reusable. It would be nice if Metamath had a keyword “local” which prevented supplementary assertions from being placed in the global namespace :) On the other hand, if the issue with long proofs is a blocker for running minimizations on the entire set.mm then of course such long proofs must not appear in set.mm. |
Since this is mathbox only, in my opinion it's good to merge.
I think additional lemmata are fine, metamath uses cryptic names for theorems so a collision between labels is unlikely.
I don't think we had a full set.mm minimization run since Norm passed away, and it looks like nothing like that is planned in the near future, so this is probably not a very big issue right now. I wonder how readable the proof will be once it appears on html pages, but that we will find out later :-)
Since metamath-lamp can work with proofs of this length, you could try making a minimizer yourself. The idea is as follows. Suppose you have a proof, and step 100 proves some statement S using steps 50,60,70 and theorem X. The minimizer tries proving statement S using some other theorem Y from the database, referencing, for example, steps 2, 40, 50, 99. It may happen that, for instance, step 60 is no longer used in the proof, hence you can delete it (and recursively all other steps which are not used anymore) shortening the whole proof. Of course the tricky part is that you introduced a new theorem Y to the list of used theorems (and some no longer used theorems may have disappeared), and also some step numbers in the compressed proof got smaller. In order to tell if this indeed shortened the proof, one has to generate the full compressed proof once again, but often one can just use some heuristic.
One other thing. Try running the command In your version:
after recompression:
The secret here is that theorems which are used more often should be placed first in the theorem list. |
According lemmas, see our conventions:
So maybe the comments of your lemmas should be revised accordingly (the labels are already OK - they contain at least the fragment "lem"). |
Thanks for sharing the algorithm. This sounds feasible to implement in metamath-lamp. I added it to my to-do list.
Done for all the theorems added in this PR.
I think this also could be implemented in metamath-lamp. Added to my to-do list :) |
This is done. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ready to be merged (from my point of view).
There are still several statements that could use fewer lines and remain readable (which is a different practice than our current one), but I think it's ok, especially since this is in a mathbox. |
Do you mean the below statements? Would the below be a good formatting?
|
At least 3cubes should be reformatted as proposed:
|
The one that @avekens proposed, yes. There are also two "equal" signs that are alone on their lines and that could go to the line right before or right after (I prefer when "=" is at the end of the line, since it tells the reader they should expect a next line, but others prefer to begin a line with "="). For the moment, there are no strict rules, because there is no automatic wrapping of statement lines, so respecting and enforcing the rules would be a nightmare. Therefore, try to find a balance between compactness and readability, but don't worry too much. |
Thanks for the clarifications. This is done. I could not put the I chose to put the equal sign at the beginning of the line because Thierry previously mentioned "The idea is to have the equal sign = and the top level operations stand out a bit more.". |
I think this PR is ready to be merged (3 approvals, no objection). |
Looks like one of the checks failed during merge? https://github.com/metamath/set.mm/actions/runs/7732471647/job/21082474245 |
It worked after I re-run the failed tests. |
This PR adds
3cubes
and all its lemmas.Along with usual “Contributed by”, a new statement is used in comments - “The assertion statement was formalized by”. I am not sure if this wording is clear and correct, so please feel free to suggest a better one.