The areas / V30. Combinatorics
Mathlib.Combinatorics.Enumerative.Pentagonal.Basic
12 declarations. Mathlib docs · Source
Pentagonal numbers
This file introduces (generalized) pentagonal numbers $k(3k-1)/2$ for integer $k$.
Some sources, such as A001318 in the OEIS, order generalized pentagonal numbers by indices
$k = 0, 1, -1, 2, -2, \cdots$ to form a strictly monotone sequence. This file doesn't follow this
convention, but implicitly shows the monotonicity in pentagonal_lt_pentagonal_neg and
pentagonal_neg_lt_pentagonal_add_one.
Main definitions
pentagonal: pentagonal numbers as a functionℤ → ℕ.
References
- https://en.wikipedia.org/wiki/Pentagonal_number
def pentagonal E3 #
ℤ → ℕ
Pentagonal numbers $k(3k-1)/2$ for integer $k$.
theorem pentagonal_def E0 #
∀ (k : ℤ), pentagonal k = (k * (3 * k - 1) / 2).toNat
theorem pentagonal_neg E1 #
∀ (k : ℤ), pentagonal (-k) = (k * (3 * k + 1) / 2).toNat
theorem natCast_pentagonal E1 #
∀ (k : ℤ), ↑(pentagonal k) = k * (3 * k - 1) / 2
theorem two_mul_natCast_pentagonal E1 #
∀ (k : ℤ), 2 * ↑(pentagonal k) = k * (3 * k - 1)
theorem two_mul_natCast_pentagonal_neg E1 #
∀ (k : ℤ), 2 * ↑(pentagonal (-k)) = k * (3 * k + 1)
theorem pentagonal_injective E1 #
Function.Injective pentagonal
theorem pentagonal_inj E0 #
∀ {x y : ℤ}, pentagonal x = pentagonal y ↔ x = y
theorem pentagonal_lt_pentagonal_neg E1 #
∀ {k : ℤ}, 0 < k → pentagonal k < pentagonal (-k)
theorem pentagonal_neg_lt_pentagonal_add_one E1 #
∀ {k : ℤ}, 0 ≤ k → pentagonal (-k) < pentagonal (k + 1)
theorem pentagonal_strictMonoOn E1 #
StrictMonoOn pentagonal (Set.Ici 0)
theorem pentagonal_strictAntiOn E1 #
StrictAntiOn pentagonal (Set.Iic 0)