Planck's law and the exactly known derived constants (CODATA 2022)
DefinitionCODATA2022_radiation_constantsPlanck's spectral radiance of a blackbody, in the frequency parameterization and the wavelength parameterization , together with the derived constants that the revised SI makes exactly known: the Stefan-Boltzmann constant , the molar gas constant , the Faraday constant , the first and second radiation constants and , the Josephson constant and the von Klitzing constant . All are numerical values in coherent SI units and are defined from the seven defining constants alone.
import Mathlib
import Definitions.Def_CODATA2022_si_defining_constants
/-!
# Blackbody radiation and the exactly known derived constants (CODATA 2022)
Planck's spectral radiance (frequency and wavelength parameterizations) and the derived
constants that the 2019 revision of the SI made exactly known, as listed in
Mohr, Newell, Taylor, Tiesinga, Rev. Mod. Phys. **97**, 025002 (2025), Tables XXXII and
XXXIII and in the paper's Nomenclature.
-/
noncomputable section
namespace CODATA2022
/-- Planck's law in the frequency variable: the spectral radiance
`B_ν(T, ν) = 2hν³/c² · 1/(exp(hν/kT) − 1)` of a blackbody at thermodynamic temperature `T`,
in watts per square metre per steradian per hertz. -/
def spectralRadianceFrequency (T nu : ℝ) : ℝ :=
2 * planckConstant * nu ^ 3 / speedOfLight ^ 2 /
(Real.exp (planckConstant * nu / (boltzmannConstant * T)) - 1)
/-- Planck's law in the wavelength variable: the spectral radiance
`B_λ(T, λ) = 2hc²/λ⁵ · 1/(exp(hc/(λkT)) − 1)` of a blackbody at thermodynamic temperature `T`,
in watts per square metre per steradian per metre. -/
def spectralRadianceWavelength (T lam : ℝ) : ℝ :=
2 * planckConstant * speedOfLight ^ 2 / lam ^ 5 /
(Real.exp (planckConstant * speedOfLight / (lam * boltzmannConstant * T)) - 1)
/-- Stefan-Boltzmann constant `σ = (π²/60) k⁴ / (ℏ³c²)`, in watts per square metre per
kelvin to the fourth. -/
def stefanBoltzmannConstant : ℝ :=
Real.pi ^ 2 / 60 * boltzmannConstant ^ 4 / (reducedPlanckConstant ^ 3 * speedOfLight ^ 2)
/-- Molar gas constant `R = N_A k`, in joules per mole per kelvin. -/
def molarGasConstant : ℝ := avogadroConstant * boltzmannConstant
/-- Faraday constant `F = N_A e`, in coulombs per mole. -/
def faradayConstant : ℝ := avogadroConstant * elementaryCharge
/-- First radiation constant `c₁ = 2πhc²`, in watt square metres. -/
def firstRadiationConstant : ℝ := 2 * Real.pi * planckConstant * speedOfLight ^ 2
/-- Second radiation constant `c₂ = hc/k`, in metre kelvins. -/
def secondRadiationConstant : ℝ := planckConstant * speedOfLight / boltzmannConstant
/-- Josephson constant `K_J = 2e/h`, in hertz per volt. -/
def josephsonConstant : ℝ := 2 * elementaryCharge / planckConstant
/-- von Klitzing constant `R_K = h/e²`, in ohms. -/
def vonKlitzingConstant : ℝ := planckConstant / elementaryCharge ^ 2
end CODATA2022
end
Read-back
What the Lean code literally says, in plain math · Aristotle by Harmonic (same agent as the drafter; non-blind)
Disclosure - non-blind read-back. This read-back was written by the same agent that drafted the Lean statement it describes, not by an independent auditor with a fresh context. It is therefore not independent testimony: the writer already knew what the code was intended to say, which is exactly the bias that blind read-backs exist to remove. A reviewer should treat it as the drafter's own restatement of the code and, where independence matters, obtain a genuinely blind read-back before relying on it.
This file adds two real-valued functions of two real arguments and eight further real constants, all built from the constants of the previous file.
The first function, written here , is defined for all real and by
where , , are the fixed numbers of the previous file. The second, , is defined for all real and by
Both are total functions, so they return a value on inputs where the formula is meaningless in the usual sense: division by zero yields . Concretely, at the inner quotient is , the exponential is , the denominator , and the whole expression is ; likewise because in a denominator, and at or is for the same reason. For negative or negative the formulas return signed values with no physical reading. Nothing in the definitions restricts the arguments.
The remaining declarations are constants:
with the constant of the previous file. Each is a single real number with no free parameters; every denominator involved is a nonzero rational or a nonzero multiple of , so no degenerate division occurs. As before, the unit names in the docstrings are comments with no formal content.