Continuing to make progress on my #Lean4 formalization project. Thanks to a tip from a follower here, I was able to complete the proof that the derivative of a polynomial that splits of the reals, also splits over the reals, and as such I have finished the proof of the first non-trivial lemma of my paper (Lemma 2.1). From this I hope to derive the Newton inequalities fairly readily.
As before, it is the minor "obvious" facts that are often the hardest to formalize. Here was a surprisingly challenging proof of the result that if a polynomial
... and now the proof of the Newton identity
is formalized! (If one is interested, one can find the proof at https://github.com/teorth/symmetric_project/blob/master/SymmetricProject/newton.lean .)
Copilot showed an uncanny ability to anticipate some of the steps of the proof, perhaps because it "knew" about the standard proof of this identity which I was following somewhat closely. The process is now faster than it was before, though again there was an unexpected speedbump. The standard proof of the Newton identity proceeds by reduction to the case
which expands after a "routine" unpacking of the definitions to the AM-GM inequality
Somewhat annoyingly, I had to perform this unpacking in fine detail, for instance by tediously verifying that the 1-element subsets of {0,1} were {0} and {1}. Possibly I was missing out on some of Lean's automated tools for this (perhaps by making some trivial little lemmas to feed into Lean's simplifier). In any case, it is done. Next step is to establish Maclaurin's inequality, which I anticipate to be a quick corollary of the Newton identity.
OK, much of the tedium of proving "obvious" statements is coming down to not knowing the existing tools available to do this. Here is my initial proof of the obvious assertion
And, embarrassingly, it was pointed out to me just now on Zulip that this fact is a total triviality in Lean.
@tao You shouldn’t be embarrassed! The whole difficulty of using proof assistants is to find clever ways to make the proof obvious/easy for the computer, and it’s always surprising how different it is from what’s obvious/easy for humans. In this case of course it’s "obvious" for both, but for different underlying reasons.
@anatolededecker @tao There's never anything shameful in being unaware of a fact that can only be determined empirically! There's no possible way one could have come up with the line `by simp` merely by thinking incredibly hard; one of human culture's primary reasons to exist is precisely to solve this kind of meta-problem.
@tao It sounds like a horrible way to do mathematics tbh.
@ijk What I'm discovering is that this is a tool which can be used very inefficiently, but for which experts can wield in a very elegant, rapid, and/or intuitive fashion. Perhaps what is missing is a more modern user interface (possibly including AI enhancements) that encourage (both overtly and covertly) the "good" formalization practices and dissuade the "bad" or "deprecated" ones.
@tao @ijk A chat assistant for lean was just announced: https://huggingface.co/morph-labs/morph-prover-v0-7b. I'm not sure how to use it but I see that there is a link to a form to express interest.