I am currently workin within my Mathbox, and I found a minimization of one of my poofs (using minimize_with) using a theorem of Benoît's Mathbox (@Benoît: it's bj-eleq2w - can I move it (together with bj-eleq1w?) to main set.mm? Where is the right place for them?).
This example shows that there is a flaw in the approaches we discussed so far: what about minimization if a new theorem is added to main set.mm which would allow for a minimization of following theorems which were minimized before? The global run of "minimize_with" on the entire set.mm would detect and process such cases, but neither the marking proposed by Norm nor the list proposed by @savask nor my proposal would handle such cases.
Maybe the program/script of my proposal could be extended to check for proofs which could be minimized by the new/modified theorems (and gives a hint to the contributor which proofs to minimize before the pull request can be accepted)?
It looks like my proposal wouldn't be welcomed, so I will abandon it. As for keeping a list of minimized theorems, I'm not really in favor of that either; it would be one more thing to maintain that people will forget or neglect.
As for mathboxes, we've never had a rule about people minimizing proofs in other people's mathboxes, or even finding shorter proofs manually, adding credit and creating a *OLD for the original (and still keeping everything in the mathbox). In the past we've done this often, and I always welcomed it. Indeed, there are well over 100 "(Proof shortened by [someone else]...)" tags currently in mathboxes. And if we add, say, a new variation of syl* in main that shortens 50 proofs, we typically apply it to all of them including ones in mathboxes, without consulting the mathbox owners.
What would be the reason someone would not want a proof in their mathbox minimized? I could see a few cases where the proof is still being worked on and minimization would create a merge conflict, but I think that is rare. Most people, once they have a proof (a minimum requirement for the PR checks to pass), go on to the next and only occasionally go back and revise the proof. If a mathbox user doesn't want a proof to be touched because it is still being modified, the tag "(Proof modification is discouraged.)" can be added temporarily until it is finished.
In any case, I strongly encourage people to minimize all proofs they submit, whether in their mathbox or not. An informal rule to minimize proofs when importing to main is nice, but it can't be enforced and I doubt it will always be followed.
On Saturday, December 12, 2020 at 3:42:36 AM UTC-5 Alexander van der Vekens wrote:I am currently workin within my Mathbox, and I found a minimization of one of my poofs (using minimize_with) using a theorem of Benoît's Mathbox (@Benoît: it's bj-eleq2w - can I move it (together with bj-eleq1w?) to main set.mm? Where is the right place for them?).This shouldn't have happened. 'minimize_with' does not consider other mathboxes unless '/include_mathboxes' is specified. Is that what you used, or is this a bug I should investigate?
As for moving theorems out of mathboxes, we have often done that when a theorem is needed for another mathbox. Typically we simply move the theorem to main at an appropriate place (I use 'show trace_back' to help identify where it should best go) and add an entry to the list at the top of set.mm, but we don't necessarily notify the mathbox owner. Sometimes a name change is needed e.g. the "bj-" prefix would be removed or a new name is chosen that better conforms to our informal conventions; this is also documented in the same list entry at the top of set.mm.
BTW that fact that someone else's mathbox theorem shortens a proof isn't necessarily a good reason to move it to main. E.g. there are many trivial variants of existing propositional calculus theorems in some mathboxes that may, by coincidence, slightly shorten a proof elsewhere in set.mm, but that doesn't necessarily mean we should move it out of the mathbox if it doesn't "pay for itself" in terms of shortening many proofs.
This example shows that there is a flaw in the approaches we discussed so far: what about minimization if a new theorem is added to main set.mm which would allow for a minimization of following theorems which were minimized before? The global run of "minimize_with" on the entire set.mm would detect and process such cases, but neither the marking proposed by Norm nor the list proposed by @savask nor my proposal would handle such cases.
I don't think this happens enough to be concerned with much. The global minimization will handle it, and in individual cases it can be dealt with manually. When proposing moving a new basic logic theorem to set.mm, most people will determine what proofs can be minimized with it as justification, and then will perform those minimizations.
Maybe the program/script of my proposal could be extended to check for proofs which could be minimized by the new/modified theorems (and gives a hint to the contributor which proofs to minimize before the pull request can be accepted)?This isn't practical because for a very large proof, 'minimize_with' may take days to run.
Norm
On Dec 14, 2020, at 12:52 AM, 'Alexander van der Vekens' via Metamath <meta...@googlegroups.com> wrote:Yes, I see - large proof would cause problems. In general, large proofs are problematic (difficult to understand/maintain, containing parts which could be useful as theorems by themselves, etc.). In my opinion proofs should usually not contain more than 100 (essential) steps, and maybe not more than 500 steps in extraordinary cases. Parts of large proofs should be extracted as separate theorems (if general enough) or as lemmata. But this is another topic to be discussed separately...
On Dec 14, 2020, at 12:52 AM, 'Alexander van der Vekens' via Metamath <meta...@googlegroups.com> wrote:Yes, I see - large proof would cause problems. In general, large proofs are problematic (difficult to understand/maintain, containing parts which could be useful as theorems by themselves, etc.). In my opinion proofs should usually not contain more than 100 (essential) steps, and maybe not more than 500 steps in extraordinary cases. Parts of large proofs should be extracted as separate theorems (if general enough) or as lemmata. But this is another topic to be discussed separately...The “conventions” text already hints at limiting size:<li><b>Organizing proofs.</b>
Humans have trouble understanding long proofs.
It is often preferable to break longer proofs into
smaller parts (just as with traditional proofs). In Metamath
this is done by creating separate proofs of the separate parts.
A proof with the sole purpose of supporting a final proof is a
lemma; the naming convention for a lemma is the final proof's name
followed by "lem", and a number if there is more than one. E.g.,
~ sbthlem1 is the first lemma for ~ sbth . Also, consider proving
reusable results separately, so that others will be able to easily
reuse that part of your work.
</li>
I would rather have long proofs than no proofs, so I think we shouldn’t make a hard-and-fast rule.100 may be too small; perhaps recommend that they be under 200 instead?How about this revision (note I said 200 instead of 100, discussion welcome)?:<li><b>Limit proof size.</b>It is often preferable to break longer proofs into
smaller parts, just as you would do with traditional proofs.One reason is that humans have trouble understanding long proofs.Another reason is that it’s generally best to prove reusable results separately,so that others will be able to easily reuse that part of your work.Finally, the “minimize” routine can take much longer with very long proofs.We encourage proofs to be no more than 200 essential steps, andgenerally no more than 500 essential steps, though these are simply guidelines andnot hard-and-fast rules.In Metamath this is done by creating separate proofs of the separate parts.A proof with the sole purpose of supporting a final proof is a
lemma; the naming convention for a lemma is the final proof's name
followed by "lem", and a number if there is more than one. E.g.,
~ sbthlem1 is the first lemma for ~ sbth .
</li>
--
You received this message because you are subscribed to the Google Groups "Metamath" group.
To unsubscribe from this group and stop receiving emails from it, send an email to metamath+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/metamath/a0794916-43c7-4c91-8a25-2665c4e46a5an%40googlegroups.com.
On Dec 14, 2020, at 3:01 PM, Mario Carneiro <di....@gmail.com> wrote:I also think that 200 is an okay "soft maximum". I've definitely got some theorems larger than that, some a lot larger, and the MM0 project is going to generate some really large proofs (the largest so far is 673 steps but that's still mostly handwritten; the autogenerated proofs are going to be huge), but given that several verifiers tend to choke on large proofs it's best to keep them out of set.mm.
*Verifiers* shouldn’t struggle with large proofs. Can you give an example?
abstract def execXAST (k ast k2: nat): wff = $ ast e. Sum (Sum (Sum (Sum (S\ op, S\ sz, {rm | E. q (readEA k sz (RM_EA k rm) q /\ writeUnop k op sz (RM_EA k rm) q k2)}) (S\ op, S\ sz, {ds | E. d E. s (readEA k sz (destEA k ds) d /\ readEA k sz (srcEA k ds) s /\ writeBinop k op sz (destEA k ds) d s k2)})) (Sum (S\ _0, {_1 | _0 e. ocasep (_1 e. S\ sz, {rm | E. n E. src E. res (n = wsizeBits sz /\ readEA k sz (RM_EA k rm) src /\ res = readRegSz k sz RAX * src /\ ifp (n = 8) (k2 = writeReg k wSz16 RAX res) (E. lo E. hi (splitBits ((n <> lo) : (n <> hi) : 0) res /\ k2 = writeReg (writeReg k sz RAX lo) sz RDX hi)))}) {_2 | _1 e. S\ sz, {rm | E. n E. a E. b E. d E. m (n = wsizeBits sz /\ readEA k sz (RM_EA k rm) b /\ divModSz sz a b d m /\ ifp (n = 8) (a = readRegSz k wSz16 RAX /\ eraseFlags (writeReg k sz RAX (shl m 8 + d)) k2) (splitBits ((n <> readRegSz k sz RAX) : (n <> readRegSz k sz RDX) : 0) a /\ eraseFlags (writeReg (writeReg k sz RAX d) sz RDX m) k2))}}}) (S\ sz, {ds | writeEA k sz (destEA k ds) (EA_addr (srcEA k ds)) k2}))) (Sum (S\ _0, {_1 | _0 e. {sz | _1 e. Sum (S\ _2, {_3 | _2 e. ocasep (_3 e. S\ ds, {sz2 | E. src (readEA k sz (srcEA k ds) src /\ writeEA k sz2 (destEA k ds) src k2)}) {_4 | _3 e. S\ ds, {sz2 | E. src (readEA k sz (srcEA k ds) src /\ writeEA k sz2 (destEA k ds) (sExt (wsizeBits sz) (wsizeBits sz2) src) k2)}}} ) (S\ _2, {_3 | _2 e. ocasep (_3 e. S\ rm, {r | E. v (readEA k sz (RM_EA k rm) v /\ writeEA (writeReg k sz r v) sz (RM_EA k rm) (readRegSz k sz r) k2)}) (ocasep (_3 e. S\ rm, {r | E. src E. acc E. dst E. ki (acc = readRegSz k sz RAX /\ readEA k sz (RM_EA k rm) dst /\ writeBinop k binopCmp sz (EA_r r) acc dst ki /\ ifp (acc = dst) (writeEA ki sz (RM_EA k rm) (readRegSz k sz r) k2) (writeEA ki sz (EA_r RAX) dst k2))}) {_4 | _3 e. S\ rm, {r | E. v (readEA k sz (RM_EA k rm) v /\ writeBinop k binopAdd sz (RM_EA k rm) (readRegSz k sz r) v k2)}})})}}) (S\ _0, {_1 | _0 e. {c | _1 e. Sum (S\ sz, {ds | ifp (readCond k c) (E. v (readEA k sz (srcEA k ds) v /\ writeEA k sz (destEA k ds) v k2)) (k2 = k)}) (S\ b, {rm | writeEA k (wSz8 (true b)) (RM_EA k rm) (nat (readCond k c)) k2})}}))) (Sum (Sum (Sum (Sum {rm | E. v (readEA k wSz64 (RM_EA k rm) v /\ k2 = writeRIP k v)} (S\ c, {q | k2 = if (readCond k c) (writeRIP k (readRIP k +_64 q)) k})) (Sum {irm | E. ki (pushRIP k ki /\ EA_jump ki (immRM_EA k irm) k2)} {q | E. ki (popRIP k ki /\ k2 = setReg ki RSP (readReg ki RSP +_64 q))})) (ocasep (popWrite (setReg k RSP (readReg k RBP)) (RM_reg RBP) k2) (Sum {irm | pushImmRM k irm k2} {rm | popWrite k rm k2}))) (ocasep (k2 = writeFlags k (setCF (readFlags k) (~CF (readFlags k)))) (ocasep (k2 = writeFlags k (setCF (readFlags k) F.)) (ocasep (k2 = writeFlags k (setCF (readFlags k) T.)) {_0 | E. r11 (r11 e. u64 /\ k2 = setException (setReg (setReg k RCX (readRIP k)) 11 r11) (suc exSysCall))})))) $;
In despite of large proofs being problematic. They are solutive. The question is if a large proof giver a better understanding then a short proof. Or can a big proof maintain more information. I believe that all bigger proofs van be written as small proofs. There is where I might go wrong. Instead larger proof can maintain more information. So they are uniqe and give more information. That itself is a fact. But what’s the truth about it.
Verzonden vanuit Mail voor Windows 10
![]()
--
You received this message because you are subscribed to the Google Groups "Metamath" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
metamath+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/metamath/D406837B-B1E9-43D3-BA4E-D9B410F38D2A%40dwheeler.com.