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

feat: change Array.get to take a Nat and a proof #6032

Merged
merged 14 commits into from
Nov 12, 2024
Merged

Conversation

kim-em
Copy link
Collaborator

@kim-em kim-em commented Nov 11, 2024

This PR changes the signature of Array.get to take a Nat and a proof, rather than a Fin, for consistency with the rest of the (planned) Array API. Note that because of bootstrapping issues we can't provide get_elem_tactic as an autoparameter for the proof. As users will mostly use the xs[i] notation provided by GetElem, this hopefully isn't a problem.

We may restore Fin based versions, either here or downstream, as needed, but they won't be the "main" functions.

@kim-em kim-em added the changelog-library Library label Nov 11, 2024
@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 Nov 11, 2024
@leanprover-community-bot
Copy link
Collaborator

leanprover-community-bot commented Nov 11, 2024

Mathlib CI status (docs):

  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 258d3725e73688ef08bc410e4cc8ee91a5641f13 --onto 811d8fb3c01cf5724ba4daf733898793cca24bdd. (2024-11-11 10:41:59)
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 5c611f78149d9e67f3bff1e3697fb1b504657998 --onto 456e6d2b791bbc560b304b28a60f35db7072c306. (2024-11-11 12:55:08)

@david-christiansen
Copy link
Contributor

One very minor docstring quibble.

It looks like this changeset touches lots of code, and basically all of it gets nicer. That's a nice outcome!

@kim-em kim-em enabled auto-merge November 12, 2024 03:10
@github-actions github-actions bot temporarily deployed to lean-lang.org/lean4/doc November 12, 2024 03:30 Inactive
@kim-em kim-em added this pull request to the merge queue Nov 12, 2024
Merged via the queue into master with commit 3a408e0 Nov 12, 2024
15 checks passed
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.

3 participants