Shade of integer compositions
DefinitionShade of a composition#✓fully proved
Let \(x = (x_0, x_1, \ldots, x_{k-1})\) be a finite list of natural numbers (the parts of a composition), drawn as a bargraph whose column \(c\) has height \(x_c\), with \(x_c = 0\) for \(c \ge k\). A cell \((c, h)\) with column \(c \ge 0\) and height \(h \ge 1\) is shaded when \(h > x_c\) and \(x_j \ge h + (c - j)\) for some column \(j < c\). The shade of \(x\) is the number of shaded cells.
Every shaded cell satisfies \(c < k + s\) and \(h \le s\), where \(s = x_0 + \cdots + x_{k-1}\), so the number of shaded cells is finite.
def compositionShade (x : List ℕ) : ℕ :=
∑ c ∈ Finset.range (x.length + x.sum), ∑ h ∈ Finset.Icc 1 x.sum,
if x.getD c 0 < h ∧ ∃ j < c, h + (c - j) ≤ x.getD j 0 then 1 else 0
Sources
- Aubrey Blecher, Arnold Knopfmacher and Michael Mays, Shade in Compositions of Integers, Journal of Integer Sequences 27 (2024), Article 24.5.6, Section 1.
DefinitionTotal shade of compositions#✓fully proved
For a natural number \(n\), the total shade \(c(n)\) is the sum of the shades of all compositions of \(n\).
def totalCompositionShade (n : ℕ) : ℕ :=
∑ x : Composition n, compositionShade x.blocks
def compositionShade (x : List ℕ) : ℕ :=
∑ c ∈ Finset.range (x.length + x.sum), ∑ h ∈ Finset.Icc 1 x.sum,
if x.getD c 0 < h ∧ ∃ j < c, h + (c - j) ≤ x.getD j 0 then 1 else 0
WantedExt/Combinatorics/Enumerative/CompositionShadeWanted.lean:41
Sources
- Aubrey Blecher, Arnold Knopfmacher and Michael Mays, Shade in Compositions of Integers, Journal of Integer Sequences 27 (2024), Article 24.5.6, Section 2.
Uses 1 · Used by 3
TheoremShade of the composition 4#✓fully proved
The one-part composition \(4\) has shade \(6\): its bargraph has \(6\) shaded cells.
theorem compositionShade_four : compositionShade [4] = 6
def compositionShade (x : List ℕ) : ℕ :=
∑ c ∈ Finset.range (x.length + x.sum), ∑ h ∈ Finset.Icc 1 x.sum,
if x.getD c 0 < h ∧ ∃ j < c, h + (c - j) ≤ x.getD j 0 then 1 else 0
WantedExt/Combinatorics/Enumerative/CompositionShadeWanted.lean:41
Sources
- Aubrey Blecher, Arnold Knopfmacher and Michael Mays, Shade in Compositions of Integers, Journal of Integer Sequences 27 (2024), Article 24.5.6, Figure 5.
Uses 1
TheoremShade of the composition 1 + 3#✓fully proved
The composition \(1 + 3\) has shade \(3\): its bargraph has \(3\) shaded cells.
All three shaded cells lie to the right of the bargraph.
theorem compositionShade_one_three : compositionShade [1, 3] = 3
def compositionShade (x : List ℕ) : ℕ :=
∑ c ∈ Finset.range (x.length + x.sum), ∑ h ∈ Finset.Icc 1 x.sum,
if x.getD c 0 < h ∧ ∃ j < c, h + (c - j) ≤ x.getD j 0 then 1 else 0
WantedExt/Combinatorics/Enumerative/CompositionShadeWanted.lean:41
Sources
- Aubrey Blecher, Arnold Knopfmacher and Michael Mays, Shade in Compositions of Integers, Journal of Integer Sequences 27 (2024), Article 24.5.6, Figure 5.
Uses 1
TheoremThe total shade bounds the shade of each composition#✓fully proved
For every natural number \(n\) and every composition \(x\) of \(n\), the shade of \(x\) is at most the total shade \(c(n)\) of the compositions of \(n\).
For example, since the composition \(4\) has shade \(6\), this gives \(c(4) \ge 6\).
theorem compositionShade_le_totalCompositionShade {n : ℕ} (x : Composition n) :
compositionShade x.blocks ≤ totalCompositionShade n
def compositionShade (x : List ℕ) : ℕ :=
∑ c ∈ Finset.range (x.length + x.sum), ∑ h ∈ Finset.Icc 1 x.sum,
if x.getD c 0 < h ∧ ∃ j < c, h + (c - j) ≤ x.getD j 0 then 1 else 0
WantedExt/Combinatorics/Enumerative/CompositionShadeWanted.lean:41
def totalCompositionShade (n : ℕ) : ℕ :=
∑ x : Composition n, compositionShade x.blocks
WantedExt/Combinatorics/Enumerative/CompositionShadeWanted.lean:49
Sources
- Aubrey Blecher, Arnold Knopfmacher and Michael Mays, Shade in Compositions of Integers, Journal of Integer Sequences 27 (2024), Article 24.5.6, Section 2.
Uses 2
TheoremTotal shade of the compositions of zero#✓fully proved
The total shade \(c(0)\) of the compositions of \(0\) is zero: \(c(0) = 0\).
The only composition of \(0\) is the empty one, whose bargraph has no shaded cells.
theorem totalCompositionShade_zero : totalCompositionShade 0 = 0
def totalCompositionShade (n : ℕ) : ℕ :=
∑ x : Composition n, compositionShade x.blocks
WantedExt/Combinatorics/Enumerative/CompositionShadeWanted.lean:49
Sources
- Aubrey Blecher, Arnold Knopfmacher and Michael Mays, Shade in Compositions of Integers, Journal of Integer Sequences 27 (2024), Article 24.5.6, Section 2.
Uses 2
TheoremGenerating function for the total shade of compositions#●ready to prove
Let \(c(n)\) be the total shade of the compositions of \(n\), and let \(q\) be a real number with \(0 < q < 1/4\). For natural numbers \(i_2, i_3, s_1, s_3\) put
and for natural numbers \(i, j, s\) put
Let
Then
Empty sums are \(0\) and empty products are \(1\); all exponents are integers and may be negative. For \(0 < q < 1/4\) all these series converge absolutely.
This is Theorem 1 of the paper with two corrected readings. In the paper's display for \(D_L(q)\) the outer double sum over \(i_1, s_1\) (and the left-hand side \(L(x, q, u)\)) is duplicated, a typesetting slip; reading it once reproduces the printed expansion \(2q^6 + 6q^7 + 24q^8 + \cdots\). In the display for \(D_R(q)\) the product in the double sum over \(m, j\) runs over \(r \ne j\), as in the paper's display (R) from which it is obtained by setting \(x = 1\); with the product over all \(r\) as printed, the coefficient of \(q^4\) in \(D_R(q)\) is \(14\) instead of the printed \(13\), and \(D_L + D_R\) no longer matches the total shade.
MetaMathlibExt.totalCompositionShade_generatingFunction · 39 lines
public theorem_wanted totalCompositionShade_generatingFunction {q : ℝ} (hq0 : 0 < q)
(hq : q < 1 / 4) :
let DL : ℝ :=
∑' i₁ : Set.Ici 1, ∑' s₁ : Set.Ici ((i₁ : ℕ) + 2),
(1 / (1 - q)) ^ (((i₁ : ℕ) : ℤ) - 2) *
(∏ r ∈ Finset.Icc 1 ((i₁ : ℕ) - 1), (1 - q ^ ((s₁ : ℕ) - r))) *
q ^ ((((i₁ : ℕ) : ℤ) * ((i₁ : ℕ) - 1)) / 2 - (i₁ : ℕ) * (s₁ : ℕ)) *
∑ i₂ ∈ Finset.Icc ((i₁ : ℕ) + 2) ((s₁ : ℕ) + 1), ∑' s₂ : Set.Ici ((s₁ : ℕ) + 1),
∑ i₃ ∈ Finset.Icc ((i₁ : ℕ) + 1) (i₂ - 1), ∑ s₃ ∈ Finset.Icc i₃ ((s₁ : ℕ) - 1),
q ^ ((i₃ : ℤ) * (s₁ : ℕ) + (s₂ : ℕ) + s₃ - ((i₃ : ℤ) + (i₃ : ℤ) ^ 2) / 2) *
(1 / (1 - q)) ^ (i₂ - i₃) *
(((s₁ : ℕ) - (s₃ : ℝ)) *
∏ i ∈ Finset.Icc (i₃ + 1) (i₂ - 1), (1 - q ^ ((s₁ : ℕ) - i + 1)) +
∑ j ∈ Finset.Icc (i₃ + 1) (i₂ - 1),
(∏ i ∈ (Finset.Icc (i₃ + 1) (i₂ - 1)).erase j,
(1 - q ^ ((s₁ : ℕ) - i + 1))) *
((j * (q - 1) + q ^ ((s₁ : ℕ) + 1 - j) + (s₁ : ℕ) -
q * (1 + (s₁ : ℕ))) / (1 - q))) *
(1 + ∑' m : Set.Ici 1,
q ^ (-((i₂ : ℤ) * (m : ℕ)) - (((m : ℕ) : ℤ) * ((m : ℕ) - 1)) / 2) *
(1 - q) ^ (-((m : ℕ) : ℤ)) *
q ^ ((((m : ℕ) : ℤ) * (1 + 2 * i₂ + (m : ℕ))) / 2))
let DR : ℝ :=
∑' i : Set.Ici 1, ∑' s : Set.Ici (i : ℕ),
(∏ r ∈ Finset.Icc 1 ((i : ℕ) - 1), (1 - q ^ ((s : ℕ) - r))) *
(q ^ (s : ℕ) / (1 - q) ^ ((i : ℕ) - 1)) *
((((s : ℕ) - (i : ℕ) + 1).choose 2 : ℝ) *
∑ m ∈ Finset.range (s : ℕ),
q ^ m / (1 - q) ^ m *
∏ r ∈ Finset.Icc 1 m, (1 - q ^ (((s : ℕ) : ℤ) + 1 - (i : ℕ) - r)) +
1 / (1 - q) ^ 2 *
∑ m ∈ Finset.Icc 1 ((s : ℕ) - 1), ∑ j ∈ Finset.Icc 1 m,
q ^ m / (1 - q) ^ (m - 1) *
(∏ r ∈ (Finset.Icc 1 m).erase j,
(1 - q ^ (((s : ℕ) : ℤ) + 1 - (i : ℕ) - r))) *
(-1 - q ^ (1 - ((i : ℕ) : ℤ) - j + (s : ℕ)) *
(-2 + (i : ℕ) + j - (s : ℕ) : ℝ) +
q ^ (2 - ((i : ℕ) : ℤ) - j + (s : ℕ)) * (-1 + (i : ℕ) + j - (s : ℕ) : ℝ)))
∑' n : ℕ, (totalCompositionShade n : ℝ) * q ^ n = DL + DR
def totalCompositionShade (n : ℕ) : ℕ :=
∑ x : Composition n, compositionShade x.blocks
WantedExt/Combinatorics/Enumerative/CompositionShadeWanted.lean:49
Sources
- Aubrey Blecher, Arnold Knopfmacher and Michael Mays, Shade in Compositions of Integers, Journal of Integer Sequences 27 (2024), Article 24.5.6, Theorem 1 (
jis-2024-24.5.6-thm-1).
Uses 1
Loading dependency explorer…
The dependency explorer needs JavaScript and its graph data.