lean4
lean4 copied to clipboard
`set_option in` makes local attribute ineffective
Prerequisites
Please put an X between the brackets as you perform the following steps:
- [X] Check that your issue is not already filed: https://github.com/leanprover/lean4/issues
- [X] Reduce the issue to a minimal, self-contained, reproducible test case. Avoid dependencies to Mathlib or Batteries.
- [X] Test your test case against the latest nightly release, for example on https://live.lean-lang.org/#project=lean-nightly (You can also use the settings there to switch to “Lean nightly”)
Description
The construction
set_option ... in
attribute [local ...] ...
silently fails to add the attribute. I believe this is because the set_option in is desugared into a section and the attribute becomes local to that section, which is then immediately closed again.
Steps to Reproduce
MWE:
axiom falso : False
section Works
attribute [local simp] falso
example : False := by simp
end Works
section Fails
set_option trace.debug true in
attribute [local simp] falso
example : False := by simp -- simp made no progress
end Fails
Versions
"4.11.0-nightly-2024-07-12"
Impact
Add :+1: to issues you consider important. If others are impacted by this issue, please ask them to add :+1: to it.