🤖 AI Summary
This study addresses the steep learning curve mathematicians face when approaching Isabelle/HOL metaprogramming by proposing a self-contained pedagogical framework, illustrated through the automated computation and correctness proof of upper bounds on the total degree of multivariate polynomials. Methodologically, leveraging Isabelle/ML and symbolic computation techniques to parse polynomial structures, the work concretizes abstract metaprogramming concepts into an executable `poly_degree` command that automates degree bound estimation and formal proof generation. By effectively balancing pedagogical simplification with practical functionality, this project establishes a comprehensive development guide that significantly lowers the barrier to entry for formal verification. Ultimately, it provides mathematicians with a pragmatic pathway to mastering metaprogramming within interactive theorem provers.
📝 Abstract
This article offers an introduction to metaprogramming in Isabelle/HOL for beginners, based on a running example for working with multivariate polynomials. The example is motivated by our formalisation of universal Diophantine pairs. We describe the implementation of the poly_degree command, which computes upper bounds on the total degrees of multivariate polynomials and automatically proves their correctness. The complete metaprogram handles a variety of special cases but herein we present a simplified version for the sake of exposition. We describe our development process and design decisions; our goal is to offer a small and self-contained tutorial on Isabelle/ML, for mathematicians who want to get started with metaprogramming.