Skip to content

feat: finite type conversions (Nat/Int/Fin/BitVec -> IntX -> *)#7368

Merged
TwoFX merged 30 commits intomasterfrom
finite-type-conversions-2
Mar 10, 2025
Merged

feat: finite type conversions (Nat/Int/Fin/BitVec -> IntX -> *)#7368
TwoFX merged 30 commits intomasterfrom
finite-type-conversions-2

Conversation

@TwoFX
Copy link
Copy Markdown
Member

@TwoFX TwoFX commented Mar 6, 2025

This PR adds lemmas for iterated conversions between finite types, starting with something of type Nat/Int/Fin/BitVec and going through IntX.

@TwoFX TwoFX added the changelog-library Library label Mar 6, 2025
@github-actions github-actions bot temporarily deployed to lean-lang.org/lean4/doc March 6, 2025 16:06 Inactive
@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 Mar 6, 2025
ghost pushed a commit to leanprover-community/batteries that referenced this pull request Mar 6, 2025
ghost pushed a commit to leanprover-community/mathlib4 that referenced this pull request Mar 6, 2025
@ghost ghost added the builds-mathlib CI has verified that Mathlib builds against this PR label Mar 6, 2025
@ghost
Copy link
Copy Markdown

ghost commented Mar 6, 2025

Mathlib CI status (docs):

  • ✅ Mathlib branch lean-pr-testing-7368 has successfully built against this PR. (2025-03-06 17:25:53) View Log
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 0d3ae7fde5df571c04102d008f7c3359afd298ae --onto ca0d8226192e7c0cdcc71d6322c3226ad4f73f30. You can force Mathlib CI using the force-mathlib-ci label. (2025-03-08 11:16:56)

github-merge-queue bot pushed a commit that referenced this pull request Mar 7, 2025
This PR adds lemmas about `Int` that will be required in #7368.

Most notably, we add
```lean
@[simp] theorem neg_nonpos_iff (i : Int) : -i ≤ 0 ↔ 0 ≤ i
```
which causes some breakage but gets us closer to mathlib which has a
more general version of this that applies to `Int`.

Note also that the mathlib adaptation branch deletes the (unused in
mathlib) mathib lemma `Int.zero_le_ofNat` as there is now a
syntactically different (but definitionally equal) `Int.zero_le_ofNat`
in core.
@TwoFX TwoFX marked this pull request as ready for review March 8, 2025 10:45
@TwoFX TwoFX requested a review from kim-em as a code owner March 8, 2025 10:45
@github-actions github-actions bot temporarily deployed to lean-lang.org/lean4/doc March 8, 2025 10:59 Inactive
@TwoFX TwoFX added this pull request to the merge queue Mar 10, 2025
Merged via the queue into master with commit 7bfa8f6 Mar 10, 2025
15 checks passed
@TwoFX TwoFX deleted the finite-type-conversions-2 branch August 4, 2025 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

builds-mathlib CI has verified that Mathlib builds against this PR changelog-library Library 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.

1 participant