HyperAI超神経
Back to Headlines

Mathematician Uses Github Copilot and Lean to Rapidly Formalize Complex Proof in 33 Minutes

8日前

I recently embarked on an exercise to use modern automated tools, specifically a combination of Github Copilot, a large language model, and the dependent type matching tactic "canonical," to semi-automatically formalize a one-page proof provided by my collaborator, Bruno Le Floch, as part of the Equational Theories Project. Using these tools, I managed to complete the formalization in just 33 minutes, without a deep understanding of the proof's overall structure. This approach contrasts significantly with my usual method of formalizing results, which typically requires a high-level conception of the proof. However, it proved effective for this type of technical, detailed argument, where the primary focus is on getting the specifics right rather than grasping the broader picture. To document this process, I recorded my attempt and uploaded it to YouTube. You can view the video here. For further insights and discussions surrounding this project, you can visit the Lean Prover community forum here. The final proof, though not yet optimized, is available on GitHub here. This exercise highlights the potential of automated tools in streamlining the formalization process, especially for proofs that are more about precise details than conceptual frameworks. While traditional methods emphasize a deep understanding of the proof, these tools enable a more efficient, detail-oriented approach. They can significantly reduce the time and effort required, making the process more accessible and feasible for a broader range of mathematicians and computer scientists. However, it's important to note that such tools are still in their early stages, and the final product could benefit from further refinement and optimization. Overall, the experience suggests that these tools have the potential to revolutionize how we handle formal proofs in the future.

Related Links

<p>I recently set myself the exercise of using modern automated tools - in particular, a combination of the <a href="https://mathstodon.xyz/tags/GithubCopilot" class="mention hashtag" rel="tag">#<span>GithubCopilot</span></a> large language model and the dependent type matching tactic <a href="https://mathstodon.xyz/tags/canonical" class="mention hashtag" rel="tag">#<span>canonical</span></a> - to try to semi-automatically formalize in <a href="https://mathstodon.xyz/tags/Lean" class="mention hashtag" rel="tag">#<span>Lean</span></a> a one-page proof provided by a collaborator of the <a href="https://mathstodon.xyz/tags/EquationalTheoriesProject" class="mention hashtag" rel="tag">#<span>EquationalTheoriesProject</span></a> (Bruno Le Floch). With these tools, I was able to more or less blindly do the formalization in 33 minutes, withou any real high level conception of how the proof proceeded. It was a very different style to how I usually formalize results, but was workable for this type of technical, non-conceptual argument where the main issue is to get the details correct rather than the &quot;big picture&quot;.</p><p>I recorded my attempt at <a href="https://www.youtube.com/watch?v=cyyR7j2ChCI" target="_blank" rel="nofollow noopener noreferrer" translate="no"><span class="invisible">https://www.</span><span class="ellipsis">youtube.com/watch?v=cyyR7j2ChC</span><span class="invisible">I</span></a> . See also additional discussion at <a href="https://leanprover.zulipchat.com/#narrow/channel/458659-Equational/topic/Alternative.20proofs.20of.20E1689.E2.8A.A2E2" target="_blank" rel="nofollow noopener noreferrer" translate="no"><span class="invisible">https://</span><span class="ellipsis">leanprover.zulipchat.com/#narr</span><span class="invisible">ow/channel/458659-Equational/topic/Alternative.20proofs.20of.20E1689.E2.8A.A2E2</span></a> . The final proof (which is far from optimized, but got the job done) can be found at <a href="https://github.com/teorth/estimate_tools/blob/master/EstimateTools/test/equational.lean" target="_blank" rel="nofollow noopener noreferrer" translate="no"><span class="invisible">https://</span><span class="ellipsis">github.com/teorth/estimate_too</span><span class="invisible">ls/blob/master/EstimateTools/test/equational.lean</span></a></p>
陶哲轩