Saltar al contenido
The Lumenary
Primeros años de universidadComputationPlanificado

Formalising mathematics in Lean and Mathlib

Formalising undergraduate mathematics in Lean 4 with Mathlib: structures and type classes, sets and functions, quantifier reasoning, algebraic structures, and searching and contributing to a large library.

math.comp.formal-proof-lean

La lección de este tema todavía no se ha escrito. El esquema siguiente forma parte del mapa del plan de estudios y no ha sido revisado.

Se basa en

Requisitos previos obligatorios, hasta el fondo: 16

Aprenderás a

  • Formalise definitions and proofs about sets, functions and quantifiers, such as the fact that a composite of injections is injective.
  • Use Mathlib's algebraic hierarchy to state and prove results about groups and rings.
  • Search Mathlib for existing results and explain the trade-off between using library lemmas and proving from scratch.

Definición

  • Mathlib is the community-maintained mathematical library for Lean 4.
  • A type class packages structure, such as a group operation, which Lean then finds automatically by instance search.
  • A structure in Lean is a type whose elements bundle several fields, such as the carrier operations and laws of a monoid.

Teorema

  • Mathlib's Function.Injective.comp states that a composite of injective functions is injective.
  • Lean's #print axioms command lists the axioms on which a proof depends.
  • A formal library is useful only if its definitions match standard mathematical usage, which people must check.

Errores frecuentes

  • Thinking formalisation is mere translation; it often exposes hidden assumptions and edge cases.
  • Believing Lean's convention x / 0 = 0 changes mathematics; it is a definitional convenience, and theorems carry hypotheses such as x ≠ 0 where needed.

Conduce a

Descubrimientos opcionales

Itinerarios de aprendizaje

Lecturas complementarias