Zulip Chat Archive
Stream: Is there code for X?
Topic: card_filter_fin_lt
Joseph Hua (Dec 17 2021 at 14:04):
Hi! I would like to prove this
lemma finset.card_filter_fin_lt {n k : ℕ} (h : k < n) :
(finset.filter (λ (j : fin n), ↑j < k) finset.univ).card = k :=
sorry
I can imaging making finset.filter (λ (j : fin n), ↑j < k) finset.univ
biject with finset.range k
and then taking the cardinality using finset.card_range
. Is there already something like this or a better way of doing things?
Would this be a useful result in the library?
Yaël Dillies (Dec 17 2021 at 14:11):
Have a look at data.fin.interval
. What you want is basically docs#fin.card_Iio
Joseph Hua (Dec 17 2021 at 14:26):
Yaël Dillies said:
Have a look at
data.fin.interval
. What you want is basically docs#fin.card_Iio
ahaa thank you!
Joseph Hua (Dec 17 2021 at 14:44):
oh wow you made this very recently
Yaël Dillies (Dec 17 2021 at 16:01):
Yeah, this finite intervals refactor started in September and is still happening. I have branch#localfinorder_multiset for finite intervals of multisets.
Last updated: Dec 20 2023 at 11:08 UTC