Skip to content

feat: verification of String.toInt?#13003

Merged
TwoFX merged 5 commits intoleanprover:masterfrom
TwoFX:dropprefix-6
Mar 20, 2026
Merged

feat: verification of String.toInt?#13003
TwoFX merged 5 commits intoleanprover:masterfrom
TwoFX:dropprefix-6

Conversation

@TwoFX
Copy link
Copy Markdown
Member

@TwoFX TwoFX commented Mar 20, 2026

This PR reorganizes the instances ToString Int and Repr Int so that they both point at a common definition Int.repr (the same setup is used for Nat). It then verifies the functions Int.repr, String.isInt and String.toInt.

In particular, for a : Int we get a.repr.toInt? = some a, which implies that Int.repr is injective.

@TwoFX TwoFX requested a review from kim-em as a code owner March 20, 2026 10:03
@TwoFX TwoFX added the changelog-library Library label Mar 20, 2026
@TwoFX TwoFX enabled auto-merge March 20, 2026 10:10
@TwoFX TwoFX added this pull request to the merge queue Mar 20, 2026
Merged via the queue into leanprover:master with commit 5099f96 Mar 20, 2026
15 checks passed
@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 20, 2026
@mathlib-lean-pr-testing
Copy link
Copy Markdown

Mathlib CI status (docs):

  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 5e1b6ed663d03dccf8beda8352e0822b603dfdd9 --onto 87180a09c49c91577e54284703c73c5ca76be126. You can force Mathlib CI using the force-mathlib-ci label. (2026-03-20 11:12:47)

@leanprover-bot
Copy link
Copy Markdown
Collaborator

Reference manual CI status:

  • ❗ Reference manual CI will not be attempted unless your PR branches off the nightly-with-manual branch. Try git rebase 5e1b6ed663d03dccf8beda8352e0822b603dfdd9 --onto cfa8c5a036d6990635c6ec50b02d0e806995cec3. You can force reference manual CI using the force-manual-ci label. (2026-03-20 11:12:49)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

2 participants