The seven defining constants of the SI (CODATA 2022)
DefinitionCODATA2022_si_defining_constantsThe numerical values, in coherent SI units, of the seven constants whose values were fixed by the 2019 revision of the SI: the caesium-133 hyperfine transition frequency , the speed of light , the Planck constant , the elementary charge , the Boltzmann constant , the Avogadro constant and the luminous efficacy , together with the reduced Planck constant . Each is modelled as a real number: the numerical value of the quantity in the unit named in its docstring.
import Mathlib /-! # The seven defining constants of the SI (CODATA 2022) Numerical values are the exact ones fixed by the 2019 revision of the SI and listed in Mohr, Newell, Taylor, Tiesinga, *CODATA recommended values of the fundamental physical constants: 2022*, Rev. Mod. Phys. **97**, 025002 (2025), Table XXXII. All quantities are pure real numbers: each is the numerical value of the constant in the coherent SI unit named in its docstring. -/ noncomputable section namespace CODATA2022 /-- Numerical value of the unperturbed ground-state hyperfine transition frequency of the caesium-133 atom `Δν_Cs`, in hertz. -/ def deltaNuCs : ℝ := 9192631770 /-- Numerical value of the speed of light in vacuum `c`, in metres per second. -/ def speedOfLight : ℝ := 299792458 /-- Numerical value of the Planck constant `h`, in joule seconds. -/ def planckConstant : ℝ := 6.62607015e-34 /-- Numerical value of the elementary charge `e`, in coulombs. -/ def elementaryCharge : ℝ := 1.602176634e-19 /-- Numerical value of the Boltzmann constant `k`, in joules per kelvin. -/ def boltzmannConstant : ℝ := 1.380649e-23 /-- Numerical value of the Avogadro constant `N_A`, in reciprocal moles. -/ def avogadroConstant : ℝ := 6.02214076e23 /-- Numerical value of the luminous efficacy of monochromatic radiation of frequency `540 × 10^12 Hz`, `K_cd`, in lumens per watt. -/ def luminousEfficacy : ℝ := 683 /-- Reduced Planck constant `ℏ = h / 2π`, in joule seconds. -/ def reducedPlanckConstant : ℝ := planckConstant / (2 * Real.pi) 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 introduces eight real-number constants and nothing else; no units, dimensions or physical interpretation are part of the code, so each declaration is simply a name for a specific real number.
Seven of them are given by decimal literals, hence are exact rational numbers:
The eighth, , is defined as the quotient with the real circle constant; since this is an ordinary division with no degenerate case, and is irrational.
The docstrings name a unit for each constant (hertz, metres per second, joule seconds, coulombs, joules per kelvin, reciprocal moles, lumens per watt), but the units are comments only: nothing in the code records or checks them, and all eight constants live in the same type and can be freely combined arithmetically. The whole file is inside a noncomputable section, which affects code generation only and not the mathematical meaning.