\section{The method calculus}\label{sec:methods} Discovery needs more than the ability to check. Faced with an obstruction, research mathematics does not search the space of all arguments: it recognises the shape of a method that has worked elsewhere, an auxiliary polynomial, an amplification, a positivity argument, and asks whether the present problem supplies what the method needs. The method calculus gives the engine the same resource in a form the kernel can check: a method is a proof skeleton with a soundness theorem, and applying it is the search, in a target world, for a certified stand-in of every role (\cref{fig:methods}). \begin{figure}[t] \centering \includegraphics[width=\textwidth]{figures/fig-methods.pdf} \caption{The method calculus. A skeleton is a proved method; applying it is the search for a certified stand-in of every role, routed through the catalogue of admitted packs.}\label{fig:methods} \end{figure} \subsection{Roles, skeletons and instances}\label{sec:meth-skeleton} \begin{definition}[Skeleton]\label{def:skeleton} A \emph{role} is an interface together with a certificate requirement, for instance an auxiliary object with a certificate of its order of vanishing. A \emph{skeleton} is a list of roles, the constraints between them and a conclusion. An \emph{instance} gives, for every role, a stand-in and its certificate. The \emph{soundness metatheorem} of a skeleton states that for every instance, if every role's certificate holds, the conclusion holds. \end{definition} In the Lean library a skeleton is a value of a type with one certificate proposition per role and a field that is the soundness metatheorem itself, so that a skeleton cannot be built without its proof, and applying it, every certificate, then the conclusion, is the only way to obtain its conclusion. A forged certificate is a term that does not have the certificate's type; the kernel refuses it, and no conclusion is produced. The negative control of a role is an instance in which every other certificate holds and the conclusion fails: a role with such a witness cannot be dropped. \begin{theorem}[Applying a proved method]\label{thm:skeleton} For every skeleton of the library and every instance whose role certificates all hold, the conclusion of the skeleton holds for the instance. For the methods of amplification and of the multiplicity chain, every role is necessary: for each role there is an instance in which every other certificate holds and the conclusion fails. \end{theorem} \lean{GaiMua.Method.Skeleton.apply, GaiMua.Method.Amplify.all_necessary, GaiMua.Method.Chain.all_necessary} A family enters the library only with three earlier instances from three different fields, in which every role of the family had a stand-in, so that the method is general by construction and not fitted to one problem. The auxiliary-function method, for example, is instantiated by Stepanov's method for hyperelliptic curves in number theory, by Dvir's bound for Kakeya sets over finite fields in combinatorics, and by Thue's auxiliary polynomial in Diophantine approximation; in each, the roles are a finite-dimensional space of candidate auxiliary objects, a linear condition map, and the principle that a non-zero object of bounded size cannot satisfy every condition. \subsection{The library of proved methods}\label{sec:meth-library} Version 1.0 has \DmclSkeletons{} skeletons in \DmclFamilies{} families, and every one has a proved soundness theorem (\cref{tab:skeletons}). {\small \begin{longtable}{@{}>{\raggedright\arraybackslash}p{.22\textwidth} >{\raggedright\arraybackslash}p{.72\textwidth}@{}} \caption{The skeletons of the method library and their conclusions.}\label{tab:skeletons}\\ \toprule Family & Conclusion of the skeleton\\ \midrule\endfirsthead \toprule Family & Conclusion\\ \midrule\endhead \bottomrule\endfoot Auxiliary function & \(N\le c\); in the existence mode (Siegel's lemma), if \(c