The files in this directory contain a formalization of selected portions of my text Analysis I into Lean. The formalization is intended to be as faithful a paraphrasing as possible to the original text, while also showcasing Lean's features and syntax. In particular, the formalization is not optimized for efficiency, and in some cases may deviate from idiomatic Lean usage.
Portions of the text that were left as exercises to the reader are rendered in this translation as sorry
s. Readers are welcome to fork the repository here to try their hand at these exercises, but I do not intend to place solutions in this repository directly.
While the arrangement of definitions, theorems, and proofs here are closely paraphrasing the textbook, I am refraining from directly quoting material from the textbook, instead providing references to the original text where appropriate. As such, this formalization should be viewed as an annotated companion to the primary text, rather than a replacement for it.
Much of the material in this text is duplicated in Lean's standard math library Mathlib, though with slightly different definitions. To reconcile these discrepancies, this formalization will gradually transition from the textbook-provided definitions to the Mathlib-provided definitions as one progresses further into the text, thus sacrificing the self-containedness of the formalization in favor of compatibility with Mathlib. For instance, Chapter 2 develops a theory of the natural numbers independent of Mathlib, but all subsequent chapters will use the Mathlib natural numbers instead. (An epilogue to Chapter 2 is provided to show that the two notions of the natural numbers are isomorphic.) As such, this formalization can also be used as an introduction to various portions of Mathlib.
Currently formalized sections:
- Section 2.1: The Peano axioms
- Section 2.2: Addition
- Section 2.3: Multiplication
- Chapter 2 epilogue: Isomorphism with the Mathlib natural numbers
- Section 3.1: Set theory fundamentals
- Section 4.1: The integers
Other resources: