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

simp fails to see through abbrev #5606

Closed
3 tasks done
JLimperg opened this issue Oct 3, 2024 · 1 comment
Closed
3 tasks done

simp fails to see through abbrev #5606

JLimperg opened this issue Oct 3, 2024 · 1 comment
Labels
closing soon This issue will be closed soon (<1 month) as it is missing essential features. P-medium We may work on this issue if we find the time

Comments

@JLimperg
Copy link
Contributor

JLimperg commented Oct 3, 2024

Prerequisites

Please put an X between the brackets as you perform the following steps:

Description

The following simp call fails to unfold the abbrev Bar.

axiom Foo : PropProp

abbrev Bar := ∀ P, True → Foo P

example (P : Prop) (h : Bar) : False := by
  simp only [forall_const] at h -- fails

example (P : Prop) (h : Bar) : False := by
  unfold Bar at h
  simp only [forall_const] at h -- succeeds

Expected behavior: both simp calls succeed.

Actual behavior: the first simp call fails.

Additional Information

The issue does not occur with Foo : Prop and Bar := True -> Foo.

Versions

"4.12.0-nightly-2024-10-02"

Impact

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

@JLimperg JLimperg added the bug Something isn't working label Oct 3, 2024
@leanprover-bot leanprover-bot added the P-medium We may work on this issue if we find the time label Oct 25, 2024
@leodemoura
Copy link
Member

This is not a bug. In the first example, forall_const is not applicable because we cannot unify ?a -> ?b with Bar. Note that Bar is unfolded during unification, but ?a -> ?b and ∀ P, True → Foo P cannot be unified.
In the second example, forall_const is applied to the subterm True -> Foo P.

@leodemoura leodemoura added closing soon This issue will be closed soon (<1 month) as it is missing essential features. and removed bug Something isn't working labels Dec 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closing soon This issue will be closed soon (<1 month) as it is missing essential features. P-medium We may work on this issue if we find the time
Projects
None yet
Development

No branches or pull requests

3 participants