Learn Lean 4 in 40 Minutes — A Visual Crash Course
Mathify - Animate math by chatting with AI
0:00 / 0:00
Learn Lean 4 in 40 Minutes — A Visual Crash Course
3 412 просмотров · 1 мес. назад
Mathify - Animate math by chatting with AI
903 подписчика
3 412 просмотров · 1 мес. назад
What does it actually look like to *write a mathematical proof in Lean 4*?
Want the prompts, Mathify projects, source code, scripts, and production workflow behind this video? Get permanent access to the Mathify Long-Form Source Vault:
https://mathify.dev/digital-products/...
It includes the production files behind Mathify’s long-form videos, all organized in a private GitHub repo that I keep expanding as new long-form videos are published. One-time $99 purchase.
In this animated crash course, you'll learn Lean by watching real code, proof states, tactics, equations, and mathematical ideas transform on screen step by step.
We start with the basic language of Lean — types, terms, functions, and `#check` — then build toward propositions as types, interactive theorem proving, tactics, rewriting, Mathlib, induction, and the trusted kernel that ultimately checks every proof.
You'll see actual Lean code throughout the course, including:
• `def`, `example`, and `theorem`
• `intro`, `exact`, and `apply`
• Lean's goal state and local context
• `constructor`, existential witnesses, and logical proofs
• Equality with `rfl` and `rw`
• Simplification with `simp`
• Algebra with `ring`
• Numerical proofs with `norm_num`
• Inequalities with `linarith`
• Mathematical induction
• Structures, type classes, and Mathlib
• How tactics become proof terms that Lean's kernel can check
But this isn't just a syntax tutorial.
The animations show **what each line of code actually does**.
When `intro` runs, you'll see an assumption move into the local context.
When `apply` runs, you'll see Lean work backward and create the premises that still need to be proved.
When `rw` runs, you'll watch the exact mathematical expression being rewritten.
When a tactic closes a goal, you'll see why the proof step was valid.
By the end, you should understand the central mental model behind Lean:
A theorem is a type.
A proof is a term of that type.
A goal tells you what proof is still missing.
Tactics help construct it.
The kernel checks the result.
This course uses modern Lean 4 and Mathlib.
CHAPTERS
0:00 What Does Lean Actually Do?
1:57 Everything Has a Type
4:20 Functions Are Values Too
6:27 Propositions Are Types
9:16 What the Lean Kernel Actually Checks
11:35 Understanding the Proof State
13:36 intro, exact, and apply
16:23 Logic Becomes Construction
19:47 Equality: rfl, rw, and calc
22:40 How simp Works
24:52 Mathlib, ring, norm_num, and linarith
28:26 Inductive Types
31:35 Induction and Recursion
34:56 Structures and Type Classes
37:45 From Mathematics to a Checked Theorem
Lean:
https://lean-lang.org/
Lean Language Reference:
https://lean-lang.org/doc/reference/l...
Theorem Proving in Lean 4:
https://lean-lang.org/theorem_proving...
Mathematics in Lean:
https://leanprover-community.github.i...
Mathify:
https://mathify.dev/
Want the prompts, Mathify projects, source code, scripts, and production workflow behind Mathify’s long-form videos?
Mathify Long-Form Source Vault:
https://mathify.dev/digital-products/...
#Lean4 #Lean #TheoremProving #Mathematics #FormalVerification #Mathlib #Programming #ComputerScience