mathlib4 Documentation

repository·master·Indexed 25 days ago

https://github.com/leanprover-community/mathlib4

A large-scale, community-maintained library for the Lean 4 theorem prover providing extensive mathematical infrastructure, theorems, and tactics. Includes documentation on the algebraic hierarchy, convex analysis, the Archive directory for niche formalizations (including IMO problems and Wiedijk's 100 Theorems), and the mathlib cache tool for managing pre-built .olean files.

Tokens
7.1K
Snippets
13
Records
45
Agent score
37%

What's inside mathlib4

  1. Overview of Growth of Groups in Mathlib4

    master

    The Mathlib/Geometry/Group/Growth subfolder contains mathematical results concerning the growth of finitely generated groups.

    For a finitely generated group $G = \langle S\rangle$ with a finite symmetric generating set $S$, the growth is defined by the function $n \mapsto |S^n|$, where $S^n$ is the set of elements resulting from the pointwise multiplication of $n$ copies of $S$. The growth rate is considered invariant (up to scaling) regardless of the choice of the symmetric generating set $S$.

    Currently covered topics include:

    • Proofs that the growth of a group is at least linear.
    • Results relating the growth of a group $G$ to the growth of a normal subgroup $H \le G$ and the growth of the quotient group $G / H$ (specifically that the growth of $G$ is roughly the product of the growth of $H$ and $G/H$).
  2. Explore topological and analytic theory of convex cones

    master

    The Mathlib.Analysis.Convex.Cone namespace contains results concerning convex cones that require a topology, a norm, or an inner product.

    Use this module for analytic properties such as:

    • Proper cones
    • Dual cones (defined along a continuous bilinear pairing)
    • Inner dual cones
    • Separation theorems: Farkas' lemma, Hahn-Banach separation, and hyperplane separation
    • Double duals of proper cones
    • M. Riesz extension theorem
  3. Understand the mathlib4 cache trust model

    master

    The mathlib4 build cache uses a trust-bounded delivery model. Because Lean can execute arbitrary code during elaboration, the cache cannot verify the byte-level integrity of artifacts. Instead, it uses a hierarchy of storage containers to ensure that artifacts produced at a specific trust level are only readable by consumers at that level or below.

    Trust Hierarchy

    ContainerWriter IdentityTrust Level
    mastermaster/staging branches, v4.* release tagshigh
    forksmathlib4 PR builds, non-master branches, bors trymedium
    nightly-testingnightly-testing trusted branchesmedium
    pr-toolchain-testsnightly-testing experimental toolchain brancheslow

    Default Lookup Chains (Read Side)

    Consumers automatically look up artifacts in a specific order:

    • mathlib4 repo: master
    • nightly-testing repo: nightly-testing
    • Forks (PRs): master, forks
  4. Understand the purpose of the Archive directory

    master
    The Archive directory contains formalizations that do not have a clear place in the main mathlib repository, typically because they are niche or have very few dependencies within mathlib. These formalizations are maintained here to ensure they can be kept up to date as mathlib evolves.
  5. Explore formalized theorems from Wiedijk's 100 Theorems list

    master

    The Archive/Wiedijk100Theorems directory contains Lean formalizations of theorems from Freek Wiedijk's 100 theorems list. These theorems are stored here because they do not fit naturally into the main mathlib hierarchy or other specialized Lean repositories.

    To see which specific theorems from the list have already been formalized in Lean, visit the 100 Theorems documentation page.

  6. Understand Penrose diagram file types

    master

    The Penrose diagram implementation uses three specific file types to define and render diagrams:

    • Domain files (.dsl): Define the objects available within a specific domain.
    • Style files (.sty): Specify the visual rules and how objects from a domain should be drawn.
    • Substance files (.sub): Describe the actual content and structure of specific diagrams.

    These diagrams are rendered in the Lean infoview via ProofWidgets4.