g-factor conventions: Dirac, nuclear-magneton, Bohr-magneton and classical moments
DefinitionGFactorPhysics_DefsThis bundle fixes the objects used throughout the mission. Vectors are elements of (component is the component), and all physical constants are real numbers.
- Dirac-particle moment. .
- Nuclear magneton. .
- Nuclear-magneton moment. .
- Bohr magneton. .
- Electron orbital moment. .
- Classical magnetic moment of point charges with charges , positions , velocities :
- Classical angular momentum of point masses :
Items 1–5 transcribe the defining formulas of the article; items 6–7 are the standard non-relativistic expressions behind the article's phrase "a classical particle of the same charge and angular momentum".
Formalization Note Vectors are Fin 3 → ℝ and × is Mathlib's crossProduct. Division is total, so each formula returns when its denominator is ; theorems using these definitions assume the relevant constants are nonzero.
import Mathlib
namespace GFactorPhysics
open Matrix
/-- Spin magnetic moment of a Dirac particle with g-factor `g`, charge `e`, mass `m`
and spin angular momentum `S`: `μ = g * e / (2 m) * S`. -/
noncomputable def diracMagneticMoment (g e m : ℝ) (S : Fin 3 → ℝ) : Fin 3 → ℝ :=
(g * e / (2 * m)) • S
/-- The nuclear magneton `μ_N = e ħ / (2 m_p)`. -/
noncomputable def nuclearMagneton (e hbar m_p : ℝ) : ℝ :=
e * hbar / (2 * m_p)
/-- Magnetic moment of a nucleon or nucleus under the nuclear-magneton convention:
`μ = g * μ_N / ħ * I`. -/
noncomputable def nuclearMagneticMoment (g μN hbar : ℝ) (I : Fin 3 → ℝ) : Fin 3 → ℝ :=
(g * μN / hbar) • I
/-- The Bohr magneton `μ_B = e ħ / (2 m_e)`. -/
noncomputable def bohrMagneton (e hbar m_e : ℝ) : ℝ :=
e * hbar / (2 * m_e)
/-- Orbital magnetic moment of an electron: `μ_L = - g_L * μ_B / ħ * L`. -/
noncomputable def electronOrbitalMagneticMoment (g_L μB hbar : ℝ) (L : Fin 3 → ℝ) :
Fin 3 → ℝ :=
(-(g_L * μB / hbar)) • L
/-- Magnetic moment of a finite system of classical point charges with charges `q i`,
positions `r i` and velocities `v i`: `μ = ∑ᵢ (q i / 2) (r i × v i)`. -/
noncomputable def classicalMagneticMoment {n : ℕ} (q : Fin n → ℝ) (r v : Fin n → Fin 3 → ℝ) : Fin 3 → ℝ :=
∑ i, (q i / 2) • (r i ⨯₃ v i)
/-- Angular momentum of a finite system of classical point masses with masses `m i`,
positions `r i` and velocities `v i`: `L = ∑ᵢ m i (r i × v i)`. -/
noncomputable def classicalAngularMomentum {n : ℕ} (m : Fin n → ℝ) (r v : Fin n → Fin 3 → ℝ) : Fin 3 → ℝ :=
∑ i, m i • (r i ⨯₃ v i)
end GFactorPhysics
Read-back
What the Lean code literally says, in plain math · Aristotle (Harmonic) — non-blind, same agent as drafter
Non-blind read-back. This read-back was written by the same agent that drafted the Lean statement, with access to the source article and to the drafting intent. It is not an independent, blind audit and must not be treated as independent testimony; an independent reviewer should still check the Lean code against the source.
The file defines seven objects, all over the real numbers, with vectors in represented as real functions on .
- For reals and a vector : the vector . If the scalar is (division by zero is defined as ), so the result is the zero vector.
- For reals : the real number (equal to if ).
- For reals and a vector : the vector (zero vector if ).
- For reals : the real number (equal to if ). This is literally the same formula as item 2.
- For reals and a vector : the vector (zero vector if ).
- For a natural number , real numbers and vectors : the vector , where is the usual cross product on . For this is the zero vector.
- For , reals and the same kind of vectors: ; zero vector for .
No sign, positivity or physical constraint is imposed on any argument by the definitions themselves.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.