-
Notifications
You must be signed in to change notification settings - Fork 88
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
Add part of sticks and stones (need help with dv condition #4254
base: develop
Are you sure you want to change the base?
Conversation
In particular, there seems to be a unliked dv condition on both the A and the I. This way I can't even do eqid to satisfy both. All other dv appear to be fine. |
You can just have this be a lemma, and another lemma use cbv* theorems instead of eqid For example, https://us.metamath.org/mpeuni/etransc.html works even with |
So is this proof fine as is or is there a grave mistake that still needs fixing? |
I wouldn't say there's a grave mistake since it's perfectly usable... but I took a look at the actual proof to try to find a more definitive answer about whether the dvs can be removed. First I minimized the proof Then it looks like the dv on f, A can be removed using elab2 on step 68
becomes
For
So the result is (edit: second minimize):
Sidenote: It seems like the mmj2 error gives the diff while the metamath-knife error just gives I think the former looks nicer even though they're equivalent |
I agree. To make it "more usable", the $d A f constraints should be removed. IMHO, in general, a good approach is to use the "true" proof as a lemma, and the last theorem to be just an external "wrapper" that minimizes the $d condition (it would play a role similar to a FOL metatheorem that proofs which are the non-free variables) |
Alright, that helps me much. That means I can keep dv conditions as long as I want to keep the proofs shorter and just remove them in the last step with cbv* theorems. Did I understand that correctly? |
My first proof had
and I thought I had to rewrite the whole proof since in my opinion that's where the original dv conditions came from. You always learn something new. |
sticksstones4.4 $e |- A = { f | ( f : ( 1 ... K ) --> ( 1 ... N ) /\ A. x | ||
e. ( 1 ... K ) A. y e. ( 1 ... K ) | ||
( x < y -> ( f ` x ) < ( f ` y ) ) ) } $. | ||
$( Equinumerosity lemma for sticks and stones .) (Contributed by metakunt, |
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.
$( Equinumerosity lemma for sticks and stones .) (Contributed by metakunt, | |
$( Equinumerosity lemma for sticks and stones. (Contributed by metakunt, |
this is probably still a draft, but I'll note this typo
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.
Should be fixed now
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.
Actually the theorem I've wanted to prove is proven, it can be reviewed now
Yes, I like to keep theorems as "general" as possible, thus if $d statements are unnecessary I prefer to add one more final theorem, just to remove them. |
Understood, the final theorem will have its dv's removed. For now there will be certainly more steps with dv's and I'd like to carry them so that each lemma does not have to do cbv* applications. I'm also quite happy to hear that you can't mess up with distinct variables that much. I always was scared of them since they could impact future theorem use. But since you can change them that problem disappeared. |
${ | ||
syldbl2.1 $e |- ( ( ph /\ ps ) -> ( ps -> th ) ) $. | ||
$( Stacked hypotheseis implies goal. (Contributed by Stanislas Polu, | ||
9-Mar-2020.) $) | ||
syldbl2 $p |- ( ( ph /\ ps ) -> th ) $= | ||
( wa com12 anabsi7 ) ABCABEBCDFG $. | ||
$} | ||
|
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.
This theorem would be anabsi3, as anabsi* (5, 6, 7, 8) commuted is presumably (1, 2, 3, 4), but this is arguably not really an improvement. So just a comment, not a suggestion.
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.
Yeah those renaming commits should be done in a separate pr. I've just moved the theorem because mmj2 autofilled it for me. This is actually how most theorems that I move are getting moved to main. MMJ2 autofills it and I get too lazy to find a different route because it is usually the shortest.
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.
I think we should give theorems which are moved to main adequate and hopefully final names. That's why we have (besides other reasons) the column "New" in changes-set.txt. If we defer the renaming to future PRs, this will easily be forgotten.
Minor generalisation from NN to NN0, surprisingly it was just 2 lines that I had to change. This allows me to have the hypotheses ( A e. Fin ) instead of ( A e. Fin /\ A =/= (/) ) once I move to monoid generators. I thought to do it in the next pr after this is merged, however the change is quite minimal and it's best to clean it up immediately. Also do we have the fundamental theorem of arithmetic over a polynomial ring over a Field or UFD? I likely need it in the following form. Consider a set of irreducibles ( in our case linear factors) that are not associate to each other. is distinct. Basically two different mappings |
It doesn't look like there's any addition there, so I'm confused on how it translates to polynomials, so I'm assuming you meant sum. If I understand correctly, this is indirectly equivalent to showing the ring homomorphism https://us.metamath.org/mpeuni/evlrhm.html is one-to-one, which hasn't been proven yet.
|
No it is the product. Essentially S will be a finite set of irreducible nonassociated linear factors of Essentially I want to show that two factorisations of polynomials are equal if the exponent of their irreducibles are equal. Basically this is the fundamental theorem of arithmetic for polynomials. You can interpret this for natural numbers as follows. S is a finite set of primes and https://en.wikipedia.org/wiki/Unique_factorization_domain I need this basically, for either |
Unfortunately, it seems like https://us.metamath.org/mpeuni/df-ufd.html is only used (recursively) by isufd, so we definitely haven't reached that far. Actually, we have a division algorithm for singlevariable polynomials, but nothing about factors of multivariate polynomials, as far as I can tell. |
fvelrn lttri4d simp3 sseli simprd simpl3 breq1 breq1d breq2 breq2d rspc2v | ||
3ad2ant1 imbi12d mpd cle sylib 3expa 3adantl2 ltned necomd neeq1d 3jaodan | ||
simpl2 lttrd neneqd wrex ralnex nnel fvelrnb bitrd con1bid elnelne1 fzfid | ||
wor ltso ssrab2 ssfi rabeq0 ralbii cab wal abeq2 spi biimpi eqfnfv bicomd |
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.
Why is ~abeq used here? It's usage is discouraged. Why not use ~abeqw instead?
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.
I needed a theorem to unfold the class abstraction. Not knowing which theorems to use I used the mmj2 search feature and searched on the website. This was surprisingly the only theorem I've found in mmj2.
I've conjectured that this is the only theorem that unfolds the definition and by the time I did the merge request I've figured that the theorem may not be that straightforward to change. Then I've looked at the axioms and pretty much concluded that I am using all of those axioms anyways.
Honestly I wouldn't mind refactoring it but it is very likely that my theorems are going to use the full suite of predicate calculus axioms anyways.
https://us.metamath.org/mpeuni/fvelrnb.html is used in the first theorem that uses all axioms that sticksstones1 uses and https://us.metamath.org/mpeuni/hashf1rn.html in sticksstones2.
So I don't even get any smaller axiom footprint in the final theorem.
To be fair most of my workflow comes from the point that MMJ2 autofills. I am not checking discouraged or mathbox theorems before opening a pr, so by the time it hits it is usually too late.
I guess for the future I will use elab2g, now that I know that alternatives exist to unfold the theorem.
If that's fine I'd like to keep things as is, as my workspace is currently dirty with other theorems.
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.
@metakunt thank you for these explanations. It looks like the problem is not using this theorem, but the tag "(New usage is discouraged.)" within the comment of ~abeq2. The usage of this theorem should only be discouraged in proofs which become dependent on more axioms using ~abeq2 instead of ~abeq2w, but this does not seem to be the case here. Unfortunately, we cannot distinguish between a general discouragement and a specific discouragement for axiom usage.
Since ~abeq2 cannot simply be replaced by ~abeq2w in a proof (probably the bound variable has to be changed for that, and this blows up the proof unnecessarily). Therefore, I propose to remove the tag "(New usage is discouraged.)" from the comment of ~abeq2. It is absolutely correct to use this theorem in the proofs of high level theorems. @GinoGiotto, @benjub what's your opinion? Maybe other theorems of this kind are also concerned.
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.
@GinoGiotto, @benjub what's your opinion? Maybe other theorems of this kind are also concerned.
Yes, I'd remove the tag. Proving theorems is already difficult enough. We don’t need to make it harder by restricting the use of axioms that are still common in the database. I think it's fine to let people prove theorems whatever way they want and optimize those proofs later.
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.
I agree, remove the discouragement tag from ~abeq2. The reason to avoid ~abeq2 does exist but it is not strong enough to put the tag.
Note: a standard format for these tags is:
(* Blabla. (Contributed by XX, 11-Jan-2024.) [Brief explanation why proof modification
is discouraged.] (Proof modification is discouraged). [Brief indication why new usage
is discouraged.] Use ~ xxx instead. (New usage is discouraged.) $)
Mnemonic why tags are in that order (when both are present): you prove a result before you can use it.
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.
I have removed the discouragement tag.
sticksstones2 $p |- ( ph -> F : A -1-1-> B ) $= | ||
( cfv wceq wcel clt vi vj vb vs vr wf cv wi wral wa wf1 crn chash cfz cpw | ||
c1 co crab fveqeq2 cfn fzfid wbr eleq1w feq1 fveq1 breq12d imbi2d ralbidv | ||
wb anbi12d bibi12d cab wal abeq2 spi chvarvv biimpi adantl simpld sselpwd |
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.
see above
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.
PS: I think that MMJ2 only showed me abeq2 because it has no hypotheses, it tends to show me theorems in closed form.
I am trying to prove the sticks and stones formula.
However sadly there seems to be a distinct variable condition that I can't get rid of sadly.
Could someone guide me which part of my proof is messed up? I would be very thankful for that.