# Learning materials for doing analysis (calculus) in a mechanized way

Can we collect (or maybe even write) tutorials and guides on doing analysis in various Proof Assistants? Community wiki style?

I was reading Lawrence Paulson's blog (highly recommend!) the other week and https://lawrencecpaulson.github.io/2021/11/17/Cauchy-Schwarz-example.html in particular. It employs pretty specific rules, tactics and theorems relevant to calculus.

I have an impression analysis-formalizing libraries for other proof assistants develop some specific tactics and notations too. For instance I looked over https://github.com/math-comp/analysis/ and https://github.com/lecopivo/SciLean

So the question is: where can I learn about that specifics?

For Program Analysis we have very comprehensive guides like Software Foundations, PLFA, Concrete Semantics and Functional Algorithms, Verified (plus their "fan translations" from one Proof Assistant to another). Do we have (or can we have) anything comparable for Mathematical Analysis?

A related but narrower question was mostly misunderstood and poorly answered as far as I can tell (but decided to mention for completeness).

• There is a survey article about formalizing real analysis, which you might be interested in... Apr 10, 2022 at 18:22
• Like, one of the half-dozen resources which may be interesting is John Harrison's PhD Thesis, which was focused on the different ways to formalize the real numbers in a proof assistant. It was around 150 pages, iirc, and worked within HOL Light. Apr 12, 2022 at 14:30
• I did a quick search search of Lean community YouTube channel and found few videos about analysis. Calculus and integration: youtu.be/p8Etfv1_VqQ Topology and filters: youtu.be/hhOPRaR3tx0 Measure theory: youtu.be/yH3-zE0bYCU
– tom
Aug 23, 2022 at 19:29
• I know very little about Hoare Logic, but from the quick look it looks similar to some kind of categorical reasoning. To do automatic/symbolic I mostly follow this paper arxiv.org/abs/1804.00746 which defines specialized categories for differentiation and rewrite rules for expressions in them. From my limited understanding, it looks like one could frame this in term of Hoare logic too. This would be quite specialized and only useful for computing derivatives. However, the paper is in Haskell, not theorem prover so not exactly what you are looking for.
– tom
Aug 25, 2022 at 20:53
• Your question prompted me to write something down. It is more 'how to use symbolic differentiation in SciLean' but it can give you an idea how to do calculus computations in a theorem prover lecopivo.github.io/SciLean/doc/differentiation_in_scilean.html
– tom
Aug 30, 2022 at 21:12