leanprover-community / leanprover-community/mathlib4
Feature Request: `to_snoc` an attribute for generating lemmas with snoc in them
Nobody has claimed this yet.
- Dominant language
- Lean
- Stars
- 4.1k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
For most operations that work on tuples, there are analogous operations that work "from the right"
The TupleRight section of Data.Fin.Tuple.Basic defines several such operations.
cons <-> snoc
tail <-> init
succ <-> castSucc
zero <-> last
pred <-> ???
it would be nice to have an attribute, similar to to_additive, to allow us to automatically derive proofs for lemmas relevant to these operations from the proofs of their left-hand counterparts.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the TupleRight section of Data.Fin.Tuple.Basic and the existing to_additive attribute. Compare the listed left/right operation pairs and determine the requirements for deriving proofs for snoc-related lemmas. Done means the requested attribute can automatically generate the relevant right-hand proofs.
Written by the indexing model from the issue text.
Assessment
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100