# L$$\exists\forall$$n Theorem Prover

### L$$\exists\forall$$n Theorem Prover

The lean prover system is getting gaining a lot of popularity:

• Quanta magazine called it one of the 5 most important progressions in math of 2020: original article
• In use at many universities to teach topics in mathematics: e.g. lambda calculus
• Integrates a theorem prover and a programming language
• Based on dependent type theory
(Specifically, calculus of inductive constructions)
• Every expression has a type
• countable hierarchy of non-cumulative universes and inductive types: link

### L$$\exists\forall$$N

$$\alpha$$

Type

Type 1

.

Type

.

$$\alpha$$

Type

Type 1

.

• Integrates a theorem prover and a programming language
• Based on dependent type theory
(Specifically, calculus of inductive constructions)
• Every expression has a type
• countable hierarchy of non-cumulative universes and inductive types: link
• Types really are first-class objects: link
• We can define functions: link

### Propositions and Proofs

Uses 'Propositions as Types' paradigm (Curry-Howard isomorphism)

then:

~p ≡ p -> false

p $$\Rightarrow$$ q ≡ p -> q

p $$\land$$ q ≡ (p, q)

p $$\lor$$ q ≡ Either p q

p and q are propositions:
p : Prop q : Prop

### Propositions and Proofs

Proving p $$\Rightarrow$$ q $$\Rightarrow$$ p is the same as providing an implementation for a function of type p $$\rightarrow$$ q $$\rightarrow$$ p

### Tactics

Tactics are instructions on how to build a proof. They offer a gateway to to L$$\exists\forall$$N automated reasoning capabilities.

An introduction to tactics is given in the natural number game.

We'll go through it if time allows.

### Inductive types

inductive foo : Sort u
| constructor₁ : ... → foo
| constructor₂ : ... → foo
...
| constructorₙ : ... → foo

(Almost*) all types are a form of inductive types:

* All user-defined, and all built-in except for the universes and the dependent type constructor $$\Pi$$, that I kept hidden.

Every type automatically comes with its own eliminator and based on that, we can recurse (of which induce is considered a special form)

• Very strong and generic type system
• Many different ways of writing the same thing (Steep learning curve!)
• Many language versions, not clearly marked
• Fancy symbol usage in syntax

### Resources:

Lean book on github

natural number game