triangular_number
def
For any natural number k, the k-th triangular number is defined as k(k+1)/2.
Statement
def triangular_number (k : ℕ) : ℕ- Defined in
- arXiv:2611.17360 line 120
- Verified
- 16 Nov 2026
- Axioms
- none listed
- Used by 2
- dual_cert_pFor each natural number m, p(m) is the largest integer p >= 2 such that p + (p-2)(p-1)/2 < m, or 1 if no such integer exists.
- signed_relationFor a dimension n : ℕ, an index j : ℕ, and a vector x : Fin n → ℝ, signed_relation n j x is the real number (∑ t ∈ Finset.range p, coord…
Read back from the Lean
triangular_number is defined as the function that takes a natural number $k$ and returns the natural number $k(k + 1) / 2$, computed using natural number division.
Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.
Lean source view module on GitHub
/-- The k-th triangular number k(k+1)/2. -/ def triangular_number (k : ℕ) : ℕ := k * (k + 1) / 2