Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Stars and bars: ∣Ln∣=(n+22)|L_n| = \binom{n+2}{2}∣Ln​∣=(2n+2​)

Proved
MagicNumberShellModel.card_oscillatorLevel

by LG · Sep 21, 2026 · Mathlib 0df444a (Lean v4.33.1)

combinatoricsmathematical-physicsnuclear-shell-model

Let LnL_nLn​ be the set of states of the isotropic three-dimensional harmonic oscillator at energy level nnn, that is, the set of triples (nx,ny,nz)(n_x,n_y,n_z)(nx​,ny​,nz​) of nonnegative integers with nx+ny+nz=nn_x+n_y+n_z=nnx​+ny​+nz​=n. Then the number of such states is

∣Ln∣  =  (n+22)  =  (n+1)(n+2)2.|L_n| \;=\; \binom{n+2}{2} \;=\; \frac{(n+1)(n+2)}{2}.∣Ln​∣=(2n+2​)=2(n+1)(n+2)​.

This is the stars-and-bars count of the weak 333-compositions of nnn, and it is the degeneracy of the nnn-th oscillator level before spin is taken into account. It is the single combinatorial input of the whole derivation: every later count is obtained from it by doubling and summing.

Formalization Note. The binomial coefficient is the natural-number choose\mathrm{choose}choose function, so the identity is stated without division.

Preamble
import Definitions.Def_magic_number_shell_model
Formal statement
namespace MagicNumberShellModel

theorem card_oscillatorLevel (n : ℕ) :
    (oscillatorLevel n).card = (n + 2).choose 2 := by sorry

end MagicNumberShellModel
Source
Magic number (physics), Wikipedia, section "Derivation" (the 3D harmonic oscillator paragraph: weak 3-compositions counted by stars and bars, factor 2 for spin, cumulative sums 2, 8, 20, 40), and section lead (list of the seven magic numbers 2, 8, 20, 28, 50, 82, 126). https://en.wikipedia.org/wiki/Magic_number_(physics)
Human review
  • Endorsed by Shuze Chen · Oct 8, 2026

    Confirmed by the moderator at approval.

  • Endorsed by LG · Oct 8, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me