8000 GitHub - FrankieeW/analysis: A Lean companion to Analysis I
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

FrankieeW/analysis

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Partial Lean formalization of Analysis I

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 sorrys. 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.

In order to align the formalization with Mathlib conventions, a small number of technical changes have been made to some of the definitions as compared with the textbook version. Most notably:

  • Sequences are indexed to start from zero rather than from one, as Mathlib has much more support for the 0-based natural numbers than the 1-based natural numbers.
  • Many operations that are left undefined in the text, such as division by zero, or taking the formal limit of a non-Cauchy sequence, are instead assigned a "junk" value (e.g., 0) to make the operation totally defined. This is because Lean has better support for total functions than partial functions (indiscriminate use of the latter can lead into "dependent type hell" in which even very basic manipulations require quite subtle and delicate proofs). See for instance this blog post by Kevin Buzzard for more discussion.
  • The Chapter 2 natural numbers are constructed by an inductive type, rather than via a purely axiomatic approach. However, the Peano Axioms are formalized in the epilogue to this chapter.

Sections

Other resources

General Lean resources

More resource suggestions welcome!

Building

Building the project

To build this project after installing Lean and cloning this repository, follow these steps:

% cd analysis/
% cd analysis/
% lake exe cache get
% lake build

Building the project's web page

To build the project's web page after installing Lean and cloning this repository, follow these steps:

% cd analysis/
% cd analysis/
% lake exe cache get
% lake -R -Kenv=dev build Analysis:docs
% lake build
% cd ../
% cd book/
% lake exe analysis-book
% cd ../

After this, book/_site/ contains the project's web page.

About

A Lean companion to Analysis I

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Lean 98.5%
  • Other 1.5%
0