[Merged by Bors] - feat(Data/Set/Card): Fintype.card s = s.ncard#38426
[Merged by Bors] - feat(Data/Set/Card): Fintype.card s = s.ncard#38426SnirBroshi wants to merge 10 commits into
Fintype.card s = s.ncard#38426Conversation
PR summary e120fe83a7Import changes for modified filesNo significant changes to the import graph Import changes for all files
|
Vierkantor
left a comment
There was a problem hiding this comment.
I agree with adding the lemma. This should probably be a @[simp] lemma, though. We can fix the simpNF linter by adding the following theorem:
variable (s) in
@[simp]
/-- `simpNF` form of `coe_fintypeCard`. -/
theorem ncard_eq_encard [Finite s] : s.ncard = s.encard := by
have := Fintype.ofFinite s
rw [← fintypeCard_eq_ncard, coe_fintypeCard]and then removing the @[simp] from coe_fintypeCard.
(Note: this was the first proof I came up with, it might be simplifiable)
|
Tagging this simp may be a good idea, but it is a pretty big change, since it's declaring that |
|
With |
|
I would say: this PR can add the lemma but not tag it as |
We have `↑(Fintype.card s) = s.encard` but we don't yet have a theorem relating `Fintype.card` and `Set.ncard`. This adds `Fintype.card s = s.ncard` for `Fintype s`, and also `s.ncard = s.encard` for `Finite s`.
|
Pull request successfully merged into master. Build succeeded: |
Fintype.card s = s.ncardFintype.card s = s.ncard
simpNF PR: #39414 |
…#38426) We have `↑(Fintype.card s) = s.encard` but we don't yet have a theorem relating `Fintype.card` and `Set.ncard`. This adds `Fintype.card s = s.ncard` for `Fintype s`, and also `s.ncard = s.encard` for `Finite s`.
We have
↑(Fintype.card s) = s.encardbut we don't yet have a theorem relatingFintype.cardandSet.ncard.This adds
Fintype.card s = s.ncardforFintype s, and alsos.ncard = s.encardforFinite s.(taggingsimpis problematic since the aforementioned theorem (Set.coe_fintypeCard) issimp, and I'm not sure we should untag it)