Lean 4 fork for HoTT-compatible kernel extensions (Path types, transport, HITs). Maintained against upstream leanprover/lean4.
@Kha I was writing the following example
```
...
induction as
| nil => cases h -- `h` is an empty type
| cons b bs ih => cases h
| head a bs => exact ⟨[], ⟨bs, rfl⟩⟩
| tail a b bs h1 => ...
```
The current `syntax` assumes the `| cons b bs ih => ...` alternative
is part of the first `cases h`. Forcing the `|` to occur in a column
>= of the corresponding `cases` is not a nice solution since it would
preven us from writing the second `cases` as I wrote it above.
That is we would have to write
```
induction as
| nil => cases h -- `h` is an empty type
| cons b bs ih =>
cases h
| head a bs => exact ⟨[], ⟨bs, rfl⟩⟩
| tail a b bs h1 => ...
```
or
```
induction as
| nil => cases h -- `h` is an empty type
| cons b bs ih => cases h
| head a bs => exact ⟨[], ⟨bs, rfl⟩⟩
| tail a b bs h1 => ...
```
I think the best solution is to use `with` when we have explicit
alternatives with `|`. The new syntax is similar to `match ... with | ...`
That is, we would write
```
...
induction as with
| nil => cases h
| cons b bs ih => cases h with
| head a bs => exact ⟨[], ⟨bs, rfl⟩⟩
| tail a b bs h1 => ...
```
|
||
|---|---|---|
| .github | ||
| doc | ||
| images | ||
| lean4-mode | ||
| nix | ||
| script | ||
| src | ||
| stage0 | ||
| tests | ||
| tmp | ||
| .gitattributes | ||
| .gitignore | ||
| CMakeLists.txt | ||
| default.nix | ||
| flake.lock | ||
| flake.nix | ||
| LICENSE | ||
| README.md | ||
| shell.nix | ||
We are currently developing Lean 4. The Lean 4 manual (work in progress) will give you an overview of the language.
Lean 3 is still the latest official release. This repository contains work in progress.
Important. Unless you are one of our collaborators
- We strongly suggest you use Lean 3.
- Pull requests are not welcome.
- New issues are not welcome, and will be closed without any feedback.