feat: add List.mem_finRange (#9515)

This PR adds a missing lemma for the `List` API.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Add `[simp]` lemma `List.mem_finRange` proving any `x : Fin n` is in
`finRange n`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
631f7ca852b1b2de5c7b1e3c7602c268ff47360e. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: Markus Himmel <markus@lean-fro.org>
Co-authored-by: Kim Morrison <477956+kim-em@users.noreply.github.com>
This commit is contained in:
François G. Dorais 2025-11-10 23:16:08 -05:00 committed by GitHub
parent e7e85e5e17
commit 7f77bfef4c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -60,6 +60,10 @@ theorem finRange_reverse {n} : (finRange n).reverse = (finRange n).map Fin.rev :
congr 2; funext
simp [Fin.rev_succ]
@[simp, grind ←]
theorem mem_finRange {n} (x : Fin n) : x ∈ finRange n := by
simp [finRange]
end List
namespace Fin