mathlib4
mathlib4 copied to clipboard
feat(Mathlib/Tactic/finCases): Port `fin_cases`
This PR implements fin_cases from mathlib3. It largely follows the original idea behind Scott's code. There are a few notable details for this PR
- To have
fin_casess full functionality, we must portFintype/Finset/Multiset. I've tried my best to only use the minimal number of dependencies, but right now it feels very messy. Is there a standard way of organizing this? cases_coredoesn't exist and I don't know how to recreate the API. There's an extremely hacky section that needs to be fixed.
Please separate out the porting parts of this PR into its own PR.
For porting, you should be using https://github.com/leanprover-community/mathlib3port, not https://github.com/leanprover-community/mathlib directly. This will save you a lot of trouble fixing lean 3 syntax stuff, and will save us trouble when we later have to diff these files against the automatically ported files when new theorems are added to mathlib and/or we get around to porting these files for real.
@winston-h-zhang, would it be okay if I started some work on this port? My plan would be
- Port a minimal version of
fin_casesthat only deals withList Ahypotheses. This will get most of the logic of the tactic sorted out, but not need any material onFinsetandMultisetported. - In parallel, port as little as possible of
FinsetandMultisetfrommathlib3port. - Once those are both done, make
fin_casesdo everything.
I would probably just start a new branch, but make use of some of your code from here (appropriately credited, of course :-).
Made redundant by #437.