Lean 4 fork for HoTT-compatible kernel extensions (Path types, transport, HITs). Maintained against upstream leanprover/lean4.
This PR contains the theorem proving that signed division x.toInt / y.toInt only overflows when `x = intMin w` and `y = allOnes w` (for `0 < w`). To show that this is the *only* case in which overflow happens, we refer to overflow for negation (`BitVec.sdivOverflow_eq_negOverflow_of_neg_one`): in fact, `x.toInt/(allOnes w).toInt = - x.toInt`, i.e., the overflow conditions are the same as `negOverflow` for `x`, and then reason about the signs of the operands with the respective theorems. These BitVec theorems themselves rely on numerous `Int.ediv_*` theorems, that carefully set the bounds of signed division for integers. co-authored by @bollu, @tobiasgrosser |
||
|---|---|---|
| .github | ||
| doc | ||
| images | ||
| nix | ||
| releases_drafts | ||
| script | ||
| src | ||
| stage0 | ||
| tests | ||
| .gitattributes | ||
| .gitignore | ||
| .gitpod.Dockerfile | ||
| .gitpod.yml | ||
| .ignore | ||
| CMakeLists.txt | ||
| CMakePresets.json | ||
| CODEOWNERS | ||
| CONTRIBUTING.md | ||
| flake.lock | ||
| flake.nix | ||
| lean-toolchain | ||
| lean.code-workspace | ||
| LICENSE | ||
| LICENSES | ||
| README.md | ||
| RELEASES.md | ||
This is the repository for Lean 4.
About
- Quickstart
- Homepage
- Theorem Proving Tutorial
- Functional Programming in Lean
- Documentation Overview
- Language Reference
- Release notes starting at v4.0.0-m3
- Examples
- External Contribution Guidelines
- FAQ
Installation
See Setting Up Lean.
Contributing
Please read our Contribution Guidelines first.
Building from Source
See Building Lean (documentation source: doc/make/index.md).