Lean 4 fork for HoTT-compatible kernel extensions (Path types, transport, HITs). Maintained against upstream leanprover/lean4.
Find a file
Wojciech Rozowski d51a5b920d
feat: change delimiting of local attributes in implicit sections (#9968)
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>
2025-08-28 15:48:42 +00:00
.github chore: CI: disable broken test on macOS x64 2025-08-27 13:14:32 +02:00
doc chore: fix spelling errors (#10042) 2025-08-22 07:23:12 +00:00
images
releases_drafts
script chore: review of failing grind tests (#10166) 2025-08-28 05:24:31 +00:00
src feat: change delimiting of local attributes in implicit sections (#9968) 2025-08-28 15:48:42 +00:00
stage0 chore: update stage0 2025-08-28 09:45:24 +00:00
tests feat: change delimiting of local attributes in implicit sections (#9968) 2025-08-28 15:48:42 +00:00
.gitattributes
.gitignore
.gitpod.Dockerfile
.gitpod.yml
.ignore
CMakeLists.txt chore: make USE_LAKE the default (#10016) 2025-08-21 11:43:25 +00:00
CMakePresets.json
CODEOWNERS
CONTRIBUTING.md
flake.lock
flake.nix chore: remove broken Nix build (#9910) 2025-08-14 08:31:39 +00:00
lean-toolchain
lean.code-workspace
LICENSE
LICENSES
README.md doc: fix examples link 2025-08-22 16:28:01 +02:00
RELEASES.md

This is the repository for Lean 4.

About

Installation

See Setting Up Lean.

Contributing

Please read our Contribution Guidelines first.

Building from Source

See Building Lean.