PhysLean Documentation

PhysLean.StatisticalMechanics.CanonicalEnsemble.Finite

Finite Canonical Ensemble #

This file specializes the general measure-theoretic framework of the canonical ensemble to systems with a finite number of discrete microstates. This is a common and important case in statistical mechanics to study models like spin systems (e.g., the Ising model) and other systems with a discrete quantum state space.

Main Definitions and Results #

The specialization is achieved through the IsFinite class, which asserts that:

  1. The type of microstates ι is a Fintype.
  2. The measure μ on ι is the standard counting measure.
  3. The number of degrees of freedom dof is 0.
  4. The phaseSpaceunit is 1.

These assumptions correspond to systems where the state space is fundamentally discrete, and no semi-classical approximation from a continuous phase space is needed. Consequently, the dimensionless physical quantities are directly equivalent to their mathematical counterparts.

The main results proved in this file are:

This file also confirms that the IsFinite property is preserved under the composition of systems (addition, nsmul, and congr).

References #

A finite CanonicalEnsemble is one whose microstates form a finite type and whose measure is the counting measure. For such systems, the state space is inherently discrete and dimensionless, so we require dof = 0 and phaseSpaceUnit = 1.

Instances
    instance CanonicalEnsemble.instIsFiniteCongr {ι : Type} [Fintype ι] [MeasurableSpace ι] (𝓒 : CanonicalEnsemble ι) {ι1 : Type} [Fintype ι1] [MeasurableSpace ι1] [𝓒.IsFinite] (e : ι1 ≃ᵐ ι) :
    (𝓒.congr e).IsFinite

    In the finite (counting) case a nonempty index type gives a nonzero measure.

    noncomputable def CanonicalEnsemble.shannonEntropy {ι : Type} [Fintype ι] [MeasurableSpace ι] (𝓒 : CanonicalEnsemble ι) (T : Temperature) :

    The Shannon entropy of a finite canonical ensemble. This is defined by the formula S = -k_B ∑ pᵢ log pᵢ. It is proven to be equivalent to the differentialEntropy and the thermodynamicEntropy for systems satisfying the IsFinite property.

    Equations
    Instances For
      @[simp]
      theorem CanonicalEnsemble.μBolt_of_fintype {ι : Type} [Fintype ι] [MeasurableSpace ι] [MeasurableSingletonClass ι] (𝓒 : CanonicalEnsemble ι) (T : Temperature) [𝓒.IsFinite] (i : ι) :
      (𝓒.μBolt T).real {i} = Real.exp (-T.β * 𝓒.energy i)
      @[simp]

      Finite specialization: strict positivity of the mathematical partition function.

      Finite specialization: strict positivity of the (physical) partition function.

      Finite specialization: non-negativity (indeed positivity) of probabilities.

      The sum of probabilities over all microstates is 1.

      The entropy of a finite canonical ensemble (Shannon entropy) is non-negative.

      In the finite, nonempty case the thermodynamic and Shannon entropies coincide. All semi-classical correction factors vanish (dof = 0, phaseSpaceUnit = 1), so the absolute thermodynamic entropy reduces to the discrete Shannon form.

      Fluctuations in Finite Systems #

      β-parameterization for finite systems #

      The finite-sum partition function as a real function of the inverse temperature b = β, defined by Z(b) = ∑ i exp (-b * 𝓒.energy i).

      Equations
      Instances For
        noncomputable def CanonicalEnsemble.probabilityBetaReal {ι : Type} [Fintype ι] [MeasurableSpace ι] (𝓒 : CanonicalEnsemble ι) (b : ) (i : ι) :

        For inverse temperature b = β, the (real-valued) Boltzmann probability of microstate i, given by exp (-b * E i) / Z(b) where Z(b) = ∑ i exp (-b * E i).

        Equations
        Instances For
          noncomputable def CanonicalEnsemble.meanEnergyBetaReal {ι : Type} [Fintype ι] [MeasurableSpace ι] (𝓒 : CanonicalEnsemble ι) (b : ) :

          The mean energy as a function of inverse temperature b = β in the finite case, defined by U(b) = ∑ i, E i * p_b i with p_b i = exp (-b * E i) / Z(b) and Z(b) = ∑ i, exp (-b * E i).

          Equations
          Instances For

            Derivatives of Z and numerator

            noncomputable def CanonicalEnsemble.meanEnergyNumerator {ι : Type} [Fintype ι] [MeasurableSpace ι] (𝓒 : CanonicalEnsemble ι) (b : ) :

            The numerator in the finite-sum expression of the mean energy as a function of the inverse temperature b = β, namely ∑ i, E i * exp (-b * E i) (so that U(b) = meanEnergyNumerator b / Z(b)).

            Equations
            Instances For
              theorem CanonicalEnsemble.deriv_meanEnergyNumerator {ι : Type} [Fintype ι] [MeasurableSpace ι] (𝓒 : CanonicalEnsemble ι) (b : ) :
              deriv 𝓒.meanEnergyNumerator b = -i : ι, 𝓒.energy i ^ 2 * Real.exp (-b * 𝓒.energy i)

              Quotient rule: dU/db = U^2 - ⟨E^2⟩_β

              (∂U/∂β) = -Var(E) for finite systems.

              FDT for finite canonical ensembles: C_V = Var(E) / (k_B T²).