• This repository has been archived on 11/Oct/2023
  • Stars
    star
    181
  • Rank 211,918 (Top 5 %)
  • Language Lean
  • License
    Apache License 2.0
  • Created over 5 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Some Lean tutorials

lean-tutorials

Gitpod Ready-to-Code

The goal of this project is to quickly teach you how to use Lean 3 for mathematics using a very hands-on approach. It can be used alongside Theorem proving in Lean or independently. You can play the Natural number game first, but this is not mandatory.

Currently, these tutorials do not cover creating your own theories, only proving things in elementary real analysis. All exercises are adapted from a first year undergraduate course by Patrick Massot in Orsay, adding only explanations about compressing proofs using slightly advanced tactics like rintros and rcases.

What you do need first is to install Lean 3 and get this project for local use by typing:

leanproject get tutorials

Then, in the tutorials/src folder, create a copy of the exercises folder for you work. This way it won't be overwritten if you update the project to get new exercises. You can then open the tutorials folder in VS code. For instance you can type:

cp -r tutorials/src/exercises tutorials/src/my_exercises
code tutorials

VSCode has a file explorer that you can open by clicking the top icon in the icon column on the left. In this explorer, you can navigate to src/my_exercises and click on 00_first_proofs.lean. This file does not contain any exercise, it is meant as an overview of the basics. You can skip it if you are really eager to start coding, but this is not recommended. You don't need to understand everything while reading this file, only try to get a feel for what it's looking like, and maybe start picking up some key words.

There are solutions for all the exercises in src/solutions. If you need help about any specific exercise, you can come on Zulip in the "new members" stream and look for a thread called "tutorials NNNN" where NNNN is the exercise number. If no such thread exists, you can create one!

More Repositories

1

mathlib3

Lean 3's obsolete mathematical components library: please use mathlib4
Lean
1,667
star
2

mathlib4

The math library of Lean 4
Lean
1,482
star
3

lean

Lean 3 Theorem Prover (community fork)
C++
435
star
4

mathematics_in_lean

The user home repository for the Mathematics in Lean tutorial.
HTML
253
star
5

batteries

The "batteries included" extended library for the Lean programming language and theorem prover
Lean
238
star
6

lean4-metaprogramming-book

Lean
211
star
7

aesop

White-box automation for Lean 4
Lean
180
star
8

lean-liquid

💧 Liquid Tensor Experiment
Lean
176
star
9

lean4game

Server to host lean games.
TypeScript
167
star
10

lean-perfectoid-spaces

Perfectoid spaces in the Lean formal theorem prover.
Lean
115
star
11

ProofWidgets4

Helper toolkit for creating your own Lean 4 UserWidgets
Lean
102
star
12

NNG4

Natural Number Game
Lean
99
star
13

quote4

Intuitive, type-safe expression quotations for Lean 4.
Lean
73
star
14

con-nf

A formal consistency proof of Quine's set theory New Foundations
Lean
66
star
15

lean-auto

Experiments in automation for Lean
Lean
66
star
16

lftcm2020

Lean for the Curious Mathematician 2020
Lean
63
star
17

lean4web

The Lean 4 web editor
TypeScript
62
star
18

format_lean

A Lean file formatter
Python
62
star
19

iris-lean

Lean 4 port of Iris, a higher-order concurrent separation logic framework
Lean
62
star
20

lean4-mode

Emacs major mode for Lean 4
Emacs Lisp
60
star
21

leanprover-community.github.io

Hosts the website for mathlib and other Lean community infrastructure.
CSS
52
star
22

flt-regular

Fermat's Last Theorem for regular primes
Lean
51
star
23

lean-client-python

Python talking to the Lean theorem prover
Python
41
star
24

mathport

Mathport is a tool for porting Lean3 projects to Lean4
Lean
39
star
25

sphere-eversion

Formalization of the existence of sphere eversions
Lean
36
star
26

mathlib-tools

Development tools for https://github.com/leanprover-community/mathlib
Python
33
star
27

mathzoo

Lean mathzoo
Lean
23
star
28

repl

A simple REPL for Lean 4, returning information about errors and sorries.
Lean
22
star
29

doc-gen

Generate HTML documentation for mathlib and Lean
Python
21
star
30

leancrawler

An obsolete python library which gathers statistics and relational information about Lean 3 libraries.
Python
17
star
31

llm

Interfacing with Large Language Models (remote and local) from Lean.
Lean
13
star
32

mathlib3port

Synport output from mathport for mathlib3
Lean
11
star
33

lean-sensitivity

A formalization of Huang's degree theorem
Lean
8
star
34

duper

Lean
7
star
35

mathlib4_docs

7
star
36

highlightjs-lean

A highlight.js language grammar for the Lean theorem proving language.
JavaScript
7
star
37

import-graph

Tool to analyse the import structure of lean projects.
Lean
7
star
38

blog

Source for the community blog
Python
6
star
39

mathlib_docs

Hosts the HTML documentation for mathlib.
6
star
40

liquid

Website and documentation for the Liquid Tensor Experiment
TeX
6
star
41

lt2021

Website for Lean Together 2021
JavaScript
5
star
42

plausible

Lean
5
star
43

lean-mode-contrib

Emacs Lisp
4
star
44

mathlib-nursery

Lean
3
star
45

yasnippet-lean

YASnippet
3
star
46

mathlib-port-status

Tools for managing the status of the port
Jinja
3
star
47

archive-old

HTML
3
star
48

LeanSearchClient

Syntax for searching with natural language from Lean, using https://leansearch.net/ (may extend to other services)
Lean
3
star
49

logic_and_proof

TeX
3
star
50

archive

Replacement for the archive repo
HTML
2
star
51

mathlib_docs_demo

2
star
52

tutorials4

Lean 4 tutorial files
Lean
2
star
53

lean3port

Stub for downloading mathport artifacts for Lean 3
Lean
1
star
54

test-mathport

Dockerfile
1
star
55

mathlib_stats

Display gitstats output on the mathlib website
Python
1
star
56

witt-vectors

1
star
57

azure-scripts

scripts and cron jobs for Azure
Python
1
star
58

mathlib-nightly

stores nightly releases of mathlib
1
star