Lean 4 fork for HoTT-compatible kernel extensions (Path types, transport, HITs). Maintained against upstream leanprover/lean4.
This PR modifies macros, which implement non-atomic definitions and ```$cmd1 in $cmd2``` syntax. These macros involve implicit scopes, introduced through ```section``` and ```namespace``` commands. Since sections or namespaces are designed to delimit local attributes, this has led to unintuitive behaviour when applying local attributes to definitions appearing in the above-mentioned contexts. This has been causing the following examples to fail: ```lean4 axiom A : Prop namespace ex1 open Nat in @[local simp] axiom a : A ↔ True example : A := by simp end ex1 namespace ex2 @[local simp] axiom Foo.a : A ↔ True example : A := by simp end ex2 ``` This PR adds an internal-only piece of syntax, ```InternalSyntax.end_local_scope```, that influences the ```ScopedEnvExtension.addLocalEntry``` used in implementing local attributes, to avoid delimiting local entries in the current scope. This command is used in the above-mentioned macros. Closes [#9445](https://github.com/leanprover/lean4/issues/9445). --------- Co-authored-by: Joachim Breitner <mail@joachim-breitner.de> |
||
|---|---|---|
| .github | ||
| doc | ||
| images | ||
| 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
Installation
See Setting Up Lean.
Contributing
Please read our Contribution Guidelines first.
Building from Source
See Building Lean.