Zulip Chat Archive
Stream: general
Topic: cardinality of a finite set?
Scott Morrison (May 28 2021 at 06:49):
Sorry, basic question:
If I have (w : set M) (f : w.finite)
, how am I supposed to refer to the cardinality of this set?
I wish it were possible (e.g. by making set.finite
a class) to just provide a fintype
instance for the coercion to type, and write fintype.card w
.
Eric Rodriguez (May 28 2021 at 06:58):
seems like docs#set.finite.fintype is a thing, but for the same reason as what you said it's not an instance
Eric Rodriguez (May 28 2021 at 06:59):
there's also docs#set.finite.to_finset, and I'd really hope that those two cardinalities are defeq
Eric Wieser (May 28 2021 at 07:00):
Making docs#set.finite a class would be somewhat pointless, as then it would basically just be fintype s
Kevin Buzzard (May 28 2021 at 07:02):
fincard
!
Sebastien Gouezel (May 28 2021 at 07:02):
No, because fintype
has data (so, diamonds), while finite
doesn't.
Kevin Buzzard (May 28 2021 at 07:03):
If we didn't make fincard
yet, its definition should be finsum w 1
Eric Rodriguez (May 28 2021 at 07:04):
Eric Rodriguez said:
there's also docs#set.finite.to_finset, and I'd really hope that those two cardinalities are defeq
they don't seem to be
Kevin Buzzard (May 28 2021 at 07:04):
Kevin Buzzard (May 28 2021 at 07:05):
Oh darn, it's for finite types :-(
Eric Wieser (May 28 2021 at 07:17):
Is there a lemma about docs#cardinal.to_nat and set.finite?
Eric Wieser (May 28 2021 at 07:21):
I guess you can use docs#cardinal.lt_omega_iff_finite with something like docs#cardinal.cast_to_nat_of_lt_omega
Yakov Pechersky (May 28 2021 at 13:07):
Aaron Anderson made a nat.card, which is fincard
Yakov Pechersky (May 28 2021 at 13:08):
You can use that or set.finite.to_finset.card
Last updated: Dec 20 2023 at 11:08 UTC