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

chore: use getElem in RHS of getElem theorems #7187

Merged
merged 3 commits into from
Feb 24, 2025

Conversation

tobiasgrosser
Copy link
Contributor

@tobiasgrosser tobiasgrosser commented Feb 22, 2025

This PR moves the RHS of getElem theorems to use getElem. This is a cleanup after the recent move to getElem as simp normal form.

We also turn ((!decide (i < n)) && getLsbD x (i - n)) into if h' : i < n then false else x[i - n] to preserve the bounds, but keep the decide if the dependent if is not needed to maintain a getElem on the RHS.

This PR moved the RHS of getELem theorems to use getElem. This is a cleanup
after the recent move to getElem as simp normal form.
@github-actions github-actions bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label Feb 22, 2025
@leanprover-community-bot
Copy link
Collaborator

Mathlib CI status (docs):

  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 788a7ec502c11b4448eed01e5497e4b0d34a1348 --onto 2960b384af1f29f566f59a3ede8ac982e4628f19. (2025-02-22 15:54:54)

@tobiasgrosser tobiasgrosser marked this pull request as ready for review February 22, 2025 22:31
@tobiasgrosser
Copy link
Contributor Author

review-requested

@hargoniX hargoniX enabled auto-merge February 24, 2025 18:31
@hargoniX hargoniX added this pull request to the merge queue Feb 24, 2025
Merged via the queue into leanprover:master with commit 77e0fa4 Feb 24, 2025
16 checks passed
luisacicolini pushed a commit to opencompl/lean4 that referenced this pull request Feb 25, 2025
This PR moves the RHS of getElem theorems to use getElem. This is a
cleanup after the recent move to getElem as simp normal form.

We also turn `((!decide (i < n)) && getLsbD x (i - n))` into `if h' : i
< n then false else x[i - n]` to preserve the bounds, but keep the
decide if the dependent if is not needed to maintain a getElem on the
RHS.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants