Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

attribute [-simp] cannot be undone #5868

Open
nomeata opened this issue Oct 28, 2024 · 0 comments
Open

attribute [-simp] cannot be undone #5868

nomeata opened this issue Oct 28, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@nomeata
Copy link
Contributor

nomeata commented Oct 28, 2024

This seems like a bug, and not a feature: Once a theorem is attribute [-simp] a_eq_b’ed, it cannot be made [simp] again:

axiom a : Nat
axiom b : Nat
axiom a_eq_b : a = b

axiom P : Nat → Nat → Prop
@[simp] axiom P_b : P b b

/-- error: simp made no progress -/
#guard_msgs in example : P a b := by simp

attribute [simp] a_eq_b

example : P a b := by simp

attribute [-simp] a_eq_b

/-- error: simp made no progress -/
#guard_msgs in example : P a b := by simp

attribute [simp] a_eq_b
/-- error: simp made no progress -/
#guard_msgs in example : P a b := by simp

I stumbled over this while testing changes for #5828.

I wonder how complicated it will be to describe the intended semantics of these attributes, also with regard to local and scoped. But it seems that one cannot even use local and scoped with [-simp]?

Versions

Lean 4.12.0-nightly-2024-10-28
Target: x86_64-unknown-linux-gnu

Additional Information

[Additional information, configuration or data that might be necessary to reproduce the issue]

Impact

Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.

@nomeata nomeata added the bug Something isn't working label Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant