New words, familiar ideas

Let’s put that in words.

No need to memorize everything. Keep this nearby and follow the links whenever a term feels new.

Append

Join a second list after the first, keeping the order of both.

Find related lessons ↗

Base case

The starting case of an induction or recursive definition, such as zero or an empty list.

Find related lessons ↗

Boolean

A value of type Bool: true or false. These are values, distinct from propositions and their proofs.

Find related lessons ↗

Case

One possibility determined by the constructor that built a value. A proof by cases handles every possibility.

Find related lessons ↗

Classical logic

Reasoning that includes excluded middle: every proposition holds or its negation holds.

Find related lessons ↗

Commutative

An operation is commutative when swapping its two inputs leaves the result unchanged.

Find related lessons ↗

Conditional

An expression that chooses one branch when a condition holds and another when it does not.

Find related lessons ↗

Conjunction

An and statement. Its proof contains a proof of each component proposition.

Find related lessons ↗

Constructor

A specified way to build a value of an inductive type. Nat has zero and successor constructors.

Find related lessons ↗

Contradiction

A situation where the available assumptions produce a proof of False. A compiler error is not such a proof.

Find related lessons ↗

Decidable

A proposition is decidable when a procedure provides either a proof of it or a proof of its negation.

Find related lessons ↗

Declaration

A command that introduces something into Lean, such as a definition or theorem.

Find related lessons ↗

Definition

A named expression. Lean checks its declared type and its defining value.

Find related lessons ↗

Definitional equality

Equality that Lean recognizes using its computation rules, without requiring a separate equality proof.

Find related lessons ↗

Disjunction

An inclusive or statement. A proof supplies one side; both sides may also be true.

Find related lessons ↗

Divisibility

For natural numbers, a divides b when b equals a times some natural-number witness.

Find related lessons ↗

Element

One item in a list or other collection. Every element in a Lean list has the same element type.

Find related lessons ↗

Equality

A proposition identifying two expressions of the same type. It may need more than computation to prove.

Find related lessons ↗

Equivalence

An if-and-only-if statement, proved by an implication in each direction.

Find related lessons ↗

Evaluation

Computing the value described by an expression. Evaluation alone is different from stating a theorem.

Find related lessons ↗

Even

A natural number is even when it is the sum of some natural number with itself. Zero is even.

Find related lessons ↗

Existential quantifier

The phrase there exists. A proof supplies a witness and a proof of its required property.

Find related lessons ↗

Expression

A piece of code that describes a term. Well-typed expressions have types.

Find related lessons ↗

Factorial

The product of the positive whole numbers through n. By definition, the factorial of zero is one.

Find related lessons ↗

False

A proposition with no constructors. It is different from the Boolean value false.

Find related lessons ↗

Fibonacci sequence

The sequence beginning with zero and one, in which each later value is the sum of the preceding two values.

Find related lessons ↗

Field of a structure

A named component of a structure record. This use of field differs from the algebraic meaning of a number field.

Find related lessons ↗

Function

A rule taking an input of a specified type and producing an output of a specified type.

Find related lessons ↗

Goal

The type or proposition for which a proof still needs to supply a term.

Find related lessons ↗

Hypothesis

A named assumption or available fact in the local proof context.

Find related lessons ↗

Implication

A proposition saying that a proof of a premise can be turned into a proof of a conclusion.

Find related lessons ↗

Induction

A proof method following the constructors of an inductive type, with hypotheses for recursive constructor arguments.

Find related lessons ↗

Induction hypothesis

The claim already available for the smaller recursive input in an induction case.

Find related lessons ↗

Inductive type

A type specified by constructors that build its values, sometimes from smaller values of the same type.

Find related lessons ↗

Inequality

An order comparison such as less than or less than or equal to.

Find related lessons ↗

Injective

A function is injective when equal outputs force equal inputs. Different inputs cannot share an output.

Find related lessons ↗

Instance

A registered implementation that Lean can find automatically. A Decidable instance supplies a decision procedure for a proposition.

Find related lessons ↗

Integer

A whole number, including zero, positive whole numbers, and negative whole numbers. Lean’s Int type represents integers.

Find related lessons ↗

Lemma

A theorem used as a supporting fact. Lean checks lemmas and theorems by the same proof rules.

Find related lessons ↗

Linear arithmetic

Arithmetic with sums, order comparisons, and fixed-number multiples of unknowns. General products of unknowns are nonlinear.

Find related lessons ↗

List

An ordered sequence of elements of a single type. A list is empty or has a head and a tail.

Find related lessons ↗

Mathlib

A community-maintained mathematical library for Lean, containing definitions, checked theorems, and tactics.

Find related lessons ↗

Module

A source-file unit that controls imported and exported declarations. This course pins the module behavior of Lean 4.36.0.

Find related lessons ↗

Natural number

Zero or a positive whole number. Lean’s Nat type does not contain negative integers or fractions.

Find related lessons ↗

Negation

A not statement. In Lean, a proof of not P turns a proof of P into a proof of False.

Find related lessons ↗

Odd

A natural number of the form twice a natural number plus one.

Find related lessons ↗

Parameter

A named input used while describing a function, definition, or theorem.

Find related lessons ↗

Pattern matching

Inspecting a value’s constructor and providing a result for each possible constructor pattern.

Find related lessons ↗

Polynomial

An expression formed from variables and coefficients using addition, multiplication, and natural-number powers.

Find related lessons ↗

Premise

The assumption on the left side of an implication. A proof of the implication must work for any proof of this assumption.

Find related lessons ↗

Prime

A natural number at least two whose only positive divisors are one and itself.

Find related lessons ↗

Prime factor

A prime number that divides another natural number. The least prime factor is the smallest such prime.

Find related lessons ↗

Proof

A term whose type is the proposition being established. Lean’s kernel checks that term against its type.

Find related lessons ↗

Proposition

A statement that can have a proof. Propositions have type Prop in Lean.

Find related lessons ↗

Rational number

A number expressible as an integer divided by a nonzero integer. Lean’s rational arithmetic is exact.

Find related lessons ↗

Real number

A number on the usual continuous number line. Real numbers include rational and irrational numbers.

Find related lessons ↗

Recursion

Defining a function using its own values at smaller inputs. Lean checks that ordinary recursive definitions terminate.

Find related lessons ↗

Remainder

What is left after whole-number division. For a positive divisor, a natural-number remainder is smaller than the divisor.

Find related lessons ↗

Rewrite

Replace an occurrence using a proved equality or a supported logical equivalence.

Find related lessons ↗

sorry

A placeholder for unfinished work. Lean warns about it. It is forbidden in this course’s finished examples and solutions.

Find related lessons ↗

Square

The product of a number with itself. Every real square is nonnegative.

Find related lessons ↗

String

Lean’s type for text values. String literals are surrounded by double quotation marks.

Find related lessons ↗

Structure

A record type built from a collection of named fields and a constructor.

Find related lessons ↗

Tactic

A command that constructs proof terms by transforming or solving goals. Its result is still checked by Lean.

Find related lessons ↗

Term

A value or expression inhabiting a type. Functions, data values, and proofs can all be terms.

Find related lessons ↗

Termination

A computation eventually reaching a result. Lean checks that the recursive calls in these examples decrease.

Find related lessons ↗

Theorem

A named proposition together with a checked proof. A theorem may use explicitly stated assumptions.

Find related lessons ↗

Transitive

A relation is transitive when a relation from a to b and from b to c imply the relation from a to c.

Find related lessons ↗

Type

A classification of terms. It tells Lean what kind of term is required in a position.

Find related lessons ↗

Unbounded above

Having an element beyond every proposed upper limit. The prime theorem lets you choose a larger bound each time.

Find related lessons ↗

Universal quantifier

The phrase for all. A proof must work for every input of the indicated type.

Find related lessons ↗

Variable

A named value that can vary over its declared type. An arbitrary variable cannot be assumed to be a particular number.

Find related lessons ↗

Witness

The specific value supplied by an existence proof, together with a proof of its property.

Find related lessons ↗