Lean 4 fork for HoTT-compatible kernel extensions (Path types, transport, HITs). Maintained against upstream leanprover/lean4.
This PR proves the basic theorems about the functions `Int.bdiv` and `Int.bmod`. For all integers `x` and all natural numbers `m`, we have: - `Int.bdiv_add_bmod`: `m * bdiv x m + bmod x m = x` (which is stated in the docstring for docs#Int.bdiv) - `Int.bmod_add_bdiv`: `bmod x m + m * bdiv x m = x` - `Int.bdiv_add_bmod'`: `bdiv x m * m + bmod x m = x` - `Int.bmod_add_bdiv'`: `bmod x m + bdiv x m * m = x` - `Int.bmod_eq_self_sub_mul_bdiv`: `bmod x m = x - m * bdiv x m` - `Int.bmod_eq_self_sub_bdiv_mul`: `bmod x m = x - bdiv x m * m` These theorems are all equivalent to each other by the basic properties of addition, multiplication, and subtraction of integers. The names `Int.bdiv_add_bmod`, `Int.bmod_add_bdiv`, `Int.bdiv_add_bmod'`, and `Int.bmod_add_bdiv'` are meant to parallel the names of the existing theorems docs#Int.tmod_add_tdiv, docs#Int.tdiv_add_tmod, docs#Int.tmod_add_tdiv', and docs#Int.tdiv_add_tmod'. The names `Int.bmod_eq_self_sub_mul_bdiv` and `Int.bmod_eq_self_sub_bdiv_mul` follow mathlib's naming conventions. Note that there is already a theorem called docs#Int.bmod_def, so it would not have been possible to parallel the name of the existing theorem docs#Int.tmod_def. See https://leanprover.zulipchat.com/#narrow/channel/217875-Is-there-code-for-X.3F/topic/bdiv.20and.20bmod. Closes #6493. |
||
|---|---|---|
| .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).