Zulip Chat Archive
Stream: Is there code for X?
Topic: Structure of Lower Sets over `Multiset α`
Gian Cordana Sanjaya (Dec 29 2023 at 01:16):
Hello, I tried to search the following result in mathlib4 and didn't find it:
Consider some
α : Type _
andS : Set (Multiset α)
, and suppose thatS
is an infinite lower set. Then at least one of the following holds:
- there exists infinitely many
a : α
such that{a} ∈ S
; or- there exists
a : α
such thatMultiset.replicate n a ∈ S
for alln : ℕ
.
I'm wondering if there is at least a result similar to this one already in mathlib4 (or something generalizing this result). Thank you very much.
Matt Diamond (Dec 29 2023 at 01:32):
FYI Multisets are always finite in mathlib, so you may want a different type here
Gian Cordana Sanjaya (Dec 29 2023 at 01:36):
Ah, I mistyped; I meant S : Set (Multiset α)
, not S : Multiset α
. I'll edit it.
Yaël Dillies (Dec 29 2023 at 07:42):
We don't have that, but it should be an easy pigeonhole argument (assume both options don't hold, then your multisets can only use finitely many copies of finitely many a
, so your set is finite)
Yaël Dillies (Dec 29 2023 at 07:46):
I would first prove the version without the lower set condition:
example {α : Type*} {s : Set (Multiset α)} (hs : s.Infinite) :
{a | ∃ m ∈ s, a ∈ m}.Infinite ∨ ∃ a, ∀ n, ∃ m ∈ s, n ≤ m.count a
Gian Cordana Sanjaya (Jan 07 2024 at 09:01):
I decided to step away from this result for a while, but now I have a proof down below.
Code
It seems to me that the version without the lower set condition is already very nice in itself, so I'm not implementing the lower set version yet. Would the result be worth putting in some existing files/new file in Mathlib? If so, I might need help in choosing names for the lemmas.
I needed this result to prove a result about divisor-closed, infinite subsets of PNat
; it either contains a power of some fixed prime or contains infinitely many primes. Using PrimeMultiset
should help with this.
Last updated: May 02 2025 at 03:31 UTC