mathlib icon indicating copy to clipboard operation
mathlib copied to clipboard

feat(set_theory/cardinal): cardinality of `multiset`, `polynomial` and `mv_polynomial`

Open alreadydone opened this issue 3 years ago • 4 comments

  • Show #(multiset α) = max (#α) ℵ₀ when α is nonempty. Show the same for #(α →₀ ℕ), which is used in the mv_polynomial proof (see below).

  • Prove that the inequality in polynomial.cardinal_mk_le_max is an equality when the semiring is nontrivial. The result is no longer derived from the corresponding result for mv_polynomial to allow general semiring, not just comm_semiring.

  • Generalize mv_polynomial.cardinal_mk_le_max to two possibly different universes, and prove that the inequality is an equality when the type of variables is nonempty and the semiring is nontrivial. W_type is no longer used so that part is removed from the file.

  • Change the [encodable] assumption in mk_le_aleph_0 and mk_list_eq_aleph_0 to the weaker typeclass [countable].

  • [ ] depends on: #16046

Open in Gitpod

alreadydone avatar Aug 06 '22 04:08 alreadydone

The part using W types can just be deleted. They were all just private definitions to prove the cardinality lemma.

ChrisHughes24 avatar Aug 07 '22 06:08 ChrisHughes24

bors d=vihdzp

jcommelin avatar Aug 11 '22 17:08 jcommelin

:v: vihdzp can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

bors[bot] avatar Aug 11 '22 17:08 bors[bot]

This PR/issue depends on:

  • ~~leanprover-community/mathlib#16046~~ By Dependent Issues (🤖). Happy coding!

Is this PR ready now?

vihdzp avatar Aug 17 '22 00:08 vihdzp

I think yes!

alreadydone avatar Aug 17 '22 00:08 alreadydone

I planned to notify you once I confirm that CI passed, but you got here earlier than me :)

alreadydone avatar Aug 17 '22 00:08 alreadydone

Then this looks alright to me now.

bors r+

vihdzp avatar Aug 17 '22 00:08 vihdzp

Pull request successfully merged into master.

Build succeeded:

bors[bot] avatar Aug 17 '22 02:08 bors[bot]