Skip to content

Conversation

@tobiasgrosser
Copy link
Contributor

@tobiasgrosser tobiasgrosser commented Dec 22, 2025

This PR introduces two induction principles for bitvectors, based on the concat and cons operations. We show how this principle can be useful to reason about bitvectors by refactoring the population count lemmas as follows:

move cpopNatRec_cons_of_le and cpopNatRec_cons_of_lt earlier in the popcount section (they are the building blocks enabling us to take advantage of the new induction principle)
refactor (and shorten) the following proofs: cpopNatRec_zero_le
So far I could only refactor that one lemma, for the others I could not find a way to benefit particularly from induction, but I will continue to look into it

@tobiasgrosser tobiasgrosser force-pushed the cons_elim branch 2 times, most recently from 54e0a43 to 208613c Compare December 22, 2025 09:57
@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 Dec 22, 2025
@leanprover-bot
Copy link
Collaborator

leanprover-bot commented Dec 22, 2025

Reference manual CI status:

  • ❗ Reference manual CI can not be attempted yet, as the nightly-testing-2025-12-22 tag does not exist there yet. We will retry when you push more commits. If you rebase your branch onto nightly-with-manual, reference manual CI should run now. You can force reference manual CI using the force-manual-ci label. (2025-12-22 10:57:44)
  • ✅ Reference manual branch lean-pr-testing-11767 has successfully built against this PR. (2026-01-08 17:22:20) View Log
  • 🟡 Reference manual branch lean-pr-testing-11767 build against this PR didn't complete normally. (2026-01-08 17:23:24) View Log

leanprover-community-mathlib4-bot added a commit to leanprover-community/batteries that referenced this pull request Dec 22, 2025
@github-actions github-actions bot added the mathlib4-nightly-available A branch for this PR exists at leanprover-community/mathlib4-nightly-testing:lean-pr-testing-NNNN label Dec 22, 2025
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4-nightly-testing that referenced this pull request Dec 22, 2025
@leanprover-community-bot leanprover-community-bot added the builds-mathlib CI has verified that Mathlib builds against this PR label Dec 22, 2025
@leanprover-community-bot
Copy link
Collaborator

leanprover-community-bot commented Dec 22, 2025

Mathlib CI status (docs):

@tobiasgrosser tobiasgrosser changed the title feat: cons_eliminator feat: BitVec.cons_eliminator Jan 8, 2026
@tobiasgrosser tobiasgrosser changed the title feat: BitVec.cons_eliminator feat: add BitVec.cons_eliminator Jan 8, 2026
leanprover-community-mathlib4-bot added a commit to leanprover-community/batteries that referenced this pull request Jan 8, 2026
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4-nightly-testing that referenced this pull request Jan 8, 2026
leanprover-bot added a commit to leanprover/reference-manual that referenced this pull request Jan 8, 2026
@leanprover-bot leanprover-bot added the builds-manual CI has verified that the Lean Language Reference builds against this PR label Jan 8, 2026
@luisacicolini
Copy link
Contributor

changelog-library

@github-actions github-actions bot added the changelog-library Library label Jan 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

builds-manual CI has verified that the Lean Language Reference builds against this PR builds-mathlib CI has verified that Mathlib builds against this PR changelog-library Library mathlib4-nightly-available A branch for this PR exists at leanprover-community/mathlib4-nightly-testing:lean-pr-testing-NNNN 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.

5 participants