Zulip Chat Archive

Stream: Is there code for X?

Topic: Partition numbers


Gareth Ma (Jan 27 2023 at 23:57):

Are there any results for partition numbers (i.e. number of partitions)? There exists combinatorics/partition.leanbut it only defines a partition as a multiset that sums to a number, but not the number of partitions. There's also this interesting comment

## Implementation details

The main motivation for this structure and its API is to show Euler's partition theorem, and
related results.

The representation of a partition as a multiset is very handy as multisets are very flexible and
already have a well-developed API

But I can't find any mention of Euler's partition theorem / pentagonal theorem

Yaël Dillies (Jan 28 2023 at 07:43):

cc @Bhavik Mehta

Gareth Ma (Jan 29 2023 at 00:49):

What if I want to define it myself? How should I approach it to get a definition that I can actually prove results on

Gareth Ma (Jan 29 2023 at 00:50):

For us humans it’s natural to jump directly to generating function and the infinite product prod(1/(1-x^p))

Gareth Ma (Jan 29 2023 at 00:51):

But i don’t know if it’s possible to translate this to lean? If anyone can provide some directions that would be nice

Gareth Ma (Jan 29 2023 at 00:52):

Like preferably the definition would somehow be “counting number of distinct partitions” instead of an arbitrary function defined as the coefficient of the product

Joseph Myers (Jan 29 2023 at 01:27):

See archive/100-theorems-list/45_partition.lean.

Gareth Ma (Jan 29 2023 at 01:32):

Oh

Gareth Ma (Jan 29 2023 at 01:32):

Thank you… my bad

Eric Wieser (Feb 03 2023 at 02:21):

Is docs#finset.nat.antidiagonal_tuple related here? I think showing it's cardinality is a TODO

Eric Wieser (Feb 03 2023 at 02:24):

Oh, that's what is being referred to by

This notion is closely related to that of a composition of n, but in a composition of n the order does matter.

right? If so, we should probably add to the docstring

Gareth Ma (Feb 03 2023 at 19:03):

So move this sentence relating partitions and compositions to the docstring of composition?


Last updated: Dec 20 2023 at 11:08 UTC