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 unfolds a local let with zetaDelta disabled #5455

Closed
3 tasks done
b-mehta opened this issue Sep 24, 2024 · 0 comments · Fixed by #6123
Closed
3 tasks done

simp unfolds a local let with zetaDelta disabled #5455

b-mehta opened this issue Sep 24, 2024 · 0 comments · Fixed by #6123
Labels
bug Something isn't working P-medium We may work on this issue if we find the time

Comments

@b-mehta
Copy link
Contributor

b-mehta commented Sep 24, 2024

Prerequisites

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

Description

variable {α : Type}

theorem test {n : Nat} {f : Fin n → α} : False := by
  let c (i : Fin n) : Nat := i
  let d : Fin n → Nat × Nat := fun i => (c i, c i + 1)
  have : ∀ i, (d i).2 ≠ c i * 2 := by
    simp only

The simp only call here unfolds d, even though the zetaDelta option is disabled.

Context

https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/simp.20and.20local.20lets

[Broader context that the issue occurred in. If there was any prior discussion on the Lean Zulip, link it here as well.]

Steps to Reproduce

  1. Code as above

Expected behavior: simp only does not unfold c or d

Actual behavior: simp only unfolds d.

Versions

Tested on live.lean-lang.org nightly.

Additional Information

@fpvandoorn suggests:

I think it's a good idea to have the "projection-reduction" be aware of the zetaDelta (and zeta) options, and be more conservative if they are off.

Impact

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

@b-mehta b-mehta added the bug Something isn't working label Sep 24, 2024
@leanprover-bot leanprover-bot added the P-medium We may work on this issue if we find the time label Sep 27, 2024
leodemoura added a commit that referenced this issue Nov 19, 2024
…ional equality in `simp`

This PR ensures that the configuration in `Simp.Config` is used when reducing terms and checking definitional equality in `simp`.

closes #5455

TODO: fix broken tests
leodemoura added a commit that referenced this issue Nov 20, 2024
…ional equality in `simp`

This PR ensures that the configuration in `Simp.Config` is used when reducing terms and checking definitional equality in `simp`.

closes #5455

TODO: fix broken tests
kim-em pushed a commit that referenced this issue Nov 20, 2024
…ional equality in `simp`

This PR ensures that the configuration in `Simp.Config` is used when reducing terms and checking definitional equality in `simp`.

closes #5455

TODO: fix broken tests
leodemoura added a commit that referenced this issue Nov 21, 2024
…ional equality in `simp`

This PR ensures that the configuration in `Simp.Config` is used when reducing terms and checking definitional equality in `simp`.

closes #5455

TODO: fix broken tests
leodemoura added a commit that referenced this issue Nov 22, 2024
…ional equality in `simp`

This PR ensures that the configuration in `Simp.Config` is used when reducing terms and checking definitional equality in `simp`.

closes #5455

TODO: fix broken tests
leodemoura added a commit that referenced this issue Nov 30, 2024
…ional equality in `simp`

This PR ensures that the configuration in `Simp.Config` is used when reducing terms and checking definitional equality in `simp`.

closes #5455

TODO: fix broken tests
kim-em pushed a commit that referenced this issue Dec 3, 2024
…ional equality in `simp`

This PR ensures that the configuration in `Simp.Config` is used when reducing terms and checking definitional equality in `simp`.

closes #5455

TODO: fix broken tests
leodemoura added a commit that referenced this issue Dec 6, 2024
…ional equality in `simp`

This PR ensures that the configuration in `Simp.Config` is used when reducing terms and checking definitional equality in `simp`.

closes #5455

TODO: fix broken tests
leodemoura added a commit that referenced this issue Dec 11, 2024
…ional equality in `simp`

This PR ensures that the configuration in `Simp.Config` is used when reducing terms and checking definitional equality in `simp`.

closes #5455

TODO: fix broken tests
leodemoura added a commit that referenced this issue Dec 14, 2024
…ional equality in `simp`

This PR ensures that the configuration in `Simp.Config` is used when reducing terms and checking definitional equality in `simp`.

closes #5455

TODO: fix broken tests
github-merge-queue bot pushed a commit that referenced this issue Dec 14, 2024
…ional equality in `simp` (#6123)

This PR ensures that the configuration in `Simp.Config` is used when
reducing terms and checking definitional equality in `simp`.

closes #5455

---------

Co-authored-by: Kim Morrison <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P-medium We may work on this issue if we find the time
Projects
None yet
2 participants