[Merged by Bors] - feat(SetTheory/ZFC): add ZFSet.card#29365
[Merged by Bors] - feat(SetTheory/ZFC): add ZFSet.card#29365staroperator wants to merge 18 commits intoleanprover-community:masterfrom
ZFSet.card#29365Conversation
PR summary 16e4c581cfImport changes for modified filesNo significant changes to the import graph Import changes for all files
|
vihdzp
left a comment
There was a problem hiding this comment.
Thank you for this! This was a long-standing TODO on my personal list.
Speaking of that, one of the results I wanted to prove was that (V_ o).card = preBeth o. I think you should have all the tools to prove that - if it's not too hard, could you add it to the PR?
I have! But that proof is not trivial and will depend on #26544. I will make a draft PR for that later |
YaelDillies
left a comment
There was a problem hiding this comment.
Thanks for the PR! Here's a first batch of comments
| theorem iSup_mk_le_mk_iUnion {α : Type u} {ι : Type v} {f : ι → Set α} : | ||
| ⨆ i, #(f i) ≤ #(⋃ i, f i) := | ||
| ciSup_le' fun _ => mk_le_mk_of_subset (subset_iUnion _ _) |
There was a problem hiding this comment.
Are you sure we really need this lemma? I think we should instead make sure that simp can prove it
There was a problem hiding this comment.
I don't think simp can prove an inequality. It is definitely used in #29393, and since we already have Cardinal.mk_iUnion_le_sum_mk that gives an upper bound for #(⋃ i, f i), it should be natural to have a lower bound for it.
There was a problem hiding this comment.
I don't think
simpcan prove an inequality
Have you seen iSup_le_iff ?
There was a problem hiding this comment.
Have you seen
iSup_le_iff?
Now I know, thanks to point it out 😃 But still, I don't think simp can help in this lemma.
0d4ee83 to
8bebe30
Compare
|
This pull request has conflicts, please merge |
Mathlib/SetTheory/ZFC/Cardinal.lean
Outdated
| def card (x : ZFSet.{u}) : Cardinal.{u} := #(Shrink x.toSet) | ||
|
|
||
| /-- `ZFSet.card x` is equal to the cardinality of `x` as a set of `ZFSet`s. -/ | ||
| theorem card_eq {x : ZFSet.{u}} : lift.{u + 1, u} (card x) = #x.toSet := by |
There was a problem hiding this comment.
I would turn this around and call it mk_toSet
There was a problem hiding this comment.
Looks good. Should that also be @[simp]?
There was a problem hiding this comment.
Probably not, because it will make simp non-confluent on card (x ∪ y).toSet and others
There was a problem hiding this comment.
I mean this makes simp on #(x ∪ y).toSet produce different normal forms based on choice of order of rewriting lemmas. card_toSet will rewrite it to lift (card (x ∪ y)) while toSet_union (which is already simp) will rewrite it to #(x.toSet ∪ y.toSet), both can not be rewritten further.
(Sorry, the card above should be Cardinal.mk.)
There was a problem hiding this comment.
Do you mean #(x ∪ y).toSet?
There was a problem hiding this comment.
Also, since # is Cardinal.mk should we call it mk_toSet? Or cardinalMk_toSet?
There was a problem hiding this comment.
Or cardinal_toSet? That has a few precedents like LinearIndependent.cardinal_le_rank.
|
This pull request has conflicts, please merge |
|
This PR/issue depends on: |
YaelDillies
left a comment
There was a problem hiding this comment.
Thanks!
maintainer delegate
|
🚀 Pull request has been placed on the maintainer queue by YaelDillies. |
Co-authored-by: Yaël Yanis Dillies <yael.dillies@gmail.com>
The same as `ZFSet.rank`, we define `ZFSet.card` as `ZFSet.{u} → Cardinal.{u}` and prove some basic properties.
Co-authored-by: Yaël Dillies <yael.dillies@gmail.com>
|
Pull request successfully merged into master. Build succeeded: |
ZFSet.cardZFSet.card
…lib4 * 'master' of https://github.com/leanprover-community/mathlib4: (3130 commits) feat(SetTheory/ZFC): add `ZFSet.card` (leanprover-community#29365) feat: grind annotations for `choose_spec` (leanprover-community#31927) chore(scripts): update nolints.json (leanprover-community#31975) feat(Analysis): cos (n * π) = (-1) ^ n (leanprover-community#31971) chore: rename `mul_le_mul_right'` to `mul_le_mul_left` (leanprover-community#30242) chore: update Mathlib dependencies 2025-11-22 (leanprover-community#31955) feat(MeasureTheory): ae-measurability notation wrt non-standard sigma-algebra (leanprover-community#31910) doc: add missing spaces around doc code blocks (leanprover-community#31917) chore: update Mathlib dependencies 2025-11-22 (leanprover-community#31945) chore: shortcut instance for `Nat` to be mul-torsion-free (leanprover-community#31027) doc(Topology/Algebra/Algebra): outdated TODO (leanprover-community#31944) feat(EqHaar): add `addHaar_nnreal_smul` (leanprover-community#31922) chore(Algebra): make invertibleInv an instance (leanprover-community#31916) chore(Algebra): change two statements in CubicDiscriminant (leanprover-community#31912) chore(MeasureTheory): mark `map_dirac` as simp (leanprover-community#31909) feat: `LinearOrder` instance for `Empty` (leanprover-community#31889) chore: deprecate all remaining modules in `Analysis/NormedSpace` (leanprover-community#31913) feat(SimpleGraph): weaker condition for paths in acyclic graphs (leanprover-community#25814) chore: do not set `group` when declaring option (leanprover-community#31888) chore: clean up more unused `Decidable*` instances in types (leanprover-community#31934) ...
The same as
ZFSet.rank, we defineZFSet.cardasZFSet.{u} → Cardinal.{u}and prove some basic properties.ZFSet.iUnion#30841