pith. machine review for the scientific record. sign in

IndisputableMonolith.Constants.Dimensions

IndisputableMonolith/Constants/Dimensions.lean · 129 lines · 11 declarations

show as:
view math explainer →

open module explainer GitHub source

Explainer status: ready · generated 2026-05-13 10:18:34.390435+00:00

   1import Mathlib
   2import IndisputableMonolith.Constants
   3
   4/-!
   5# Dimensional Analysis Framework for Recognition Science
   6
   7This module provides a rigorous dimensional analysis framework for deriving
   8physical constants from Recognition Science primitives.
   9
  10## Overview
  11
  12In Recognition Science, the fundamental units are:
  13* τ₀ (fundamental tick) - the atomic time quantum
  14* ℓ₀ (recognition length) - c·τ₀
  15* φ (golden ratio) - geometric scaling factor
  16
  17From these, all physical constants (ℏ, G, c) can be derived self-consistently.
  18
  19## Dimensional Signatures
  20
  21Each physical quantity carries a dimensional signature [L^a, T^b, M^c]
  22representing length, time, and mass exponents.
  23-/
  24
  25namespace IndisputableMonolith
  26namespace Constants
  27namespace Dimensions
  28
  29/-! ## Dimensional Signatures -/
  30
  31/-- Dimensional signature: [Length, Time, Mass] exponents.
  32    Used to track physical dimensions through calculations. -/
  33structure Dimension where
  34  L : ℤ  -- Length exponent
  35  T : ℤ  -- Time exponent
  36  M : ℤ  -- Mass exponent
  37  deriving DecidableEq
  38
  39/-! ## Fundamental Dimension Constants -/
  40
  41/-- Dimensionless quantity: [L⁰T⁰M⁰] -/
  42def dim_one : Dimension := ⟨0, 0, 0⟩
  43
  44/-- Length dimension: [L¹T⁰M⁰] -/
  45def dim_L : Dimension := ⟨1, 0, 0⟩
  46
  47/-- Time dimension: [L⁰T¹M⁰] -/
  48def dim_T : Dimension := ⟨0, 1, 0⟩
  49
  50/-- Mass dimension: [L⁰T⁰M¹] -/
  51def dim_M : Dimension := ⟨0, 0, 1⟩
  52
  53/-! ## Physical Constant Dimensions -/
  54
  55/-- Speed of light dimension: [L¹T⁻¹M⁰] -/
  56def dim_c : Dimension := ⟨1, -1, 0⟩
  57
  58/-- Reduced Planck constant dimension: [L²T⁻¹M¹] -/
  59def dim_hbar : Dimension := ⟨2, -1, 1⟩
  60
  61/-- Gravitational constant dimension: [L³T⁻²M⁻¹] -/
  62def dim_G : Dimension := ⟨3, -2, -1⟩
  63
  64/-! ## Dimensional Consistency (Documentation)
  65
  66The Planck length formula has correct dimensions:
  67  ℓ_P = √(ℏG/c³)
  68  [ℏG/c³] = [L²T⁻¹M¹][L³T⁻²M⁻¹]/[L³T⁻³M⁰]
  69          = [L⁵T⁻³M⁰]/[L³T⁻³M⁰]
  70          = [L²T⁰M⁰]
  71  [√(ℏG/c³)] = [L¹] ✓
  72
  73The Planck time formula has correct dimensions:
  74  t_P = √(ℏG/c⁵)
  75  [ℏG/c⁵] = [L²T⁻¹M¹][L³T⁻²M⁻¹]/[L⁵T⁻⁵M⁰]
  76          = [L⁵T⁻³M⁰]/[L⁵T⁻⁵M⁰]
  77          = [L⁰T²M⁰]
  78  [√(ℏG/c⁵)] = [T¹] ✓
  79
  80The Planck mass formula has correct dimensions:
  81  m_P = √(ℏc/G)
  82  [ℏc/G] = [L²T⁻¹M¹][L¹T⁻¹M⁰]/[L³T⁻²M⁻¹]
  83         = [L³T⁻²M¹]/[L³T⁻²M⁻¹]
  84         = [L⁰T⁰M²]
  85  [√(ℏc/G)] = [M¹] ✓
  86
  87τ₀ = √(ℏG/(πc³))/c has dimension [T]:
  88  [√(ℏG/c³)/c] = [L¹]/[L¹T⁻¹] = [T¹] ✓
  89-/
  90
  91/-! ## Dimensioned Quantities -/
  92
  93/-- A dimensioned physical quantity with its value and dimensional signature. -/
  94structure DimensionedQuantity where
  95  value : ℝ
  96  dim : Dimension
  97
  98/-- A positive dimensioned quantity (for physical constants). -/
  99structure PositiveDimensionedQuantity extends DimensionedQuantity where
 100  value_pos : 0 < value
 101
 102/-- Multiplication of dimensioned quantities. -/
 103noncomputable def DimensionedQuantity.mul (q1 q2 : DimensionedQuantity) : DimensionedQuantity :=
 104  ⟨q1.value * q2.value, ⟨q1.dim.L + q2.dim.L, q1.dim.T + q2.dim.T, q1.dim.M + q2.dim.M⟩⟩
 105
 106/-- Division of dimensioned quantities. -/
 107noncomputable def DimensionedQuantity.div (q1 q2 : DimensionedQuantity) : DimensionedQuantity :=
 108  ⟨q1.value / q2.value, ⟨q1.dim.L - q2.dim.L, q1.dim.T - q2.dim.T, q1.dim.M - q2.dim.M⟩⟩
 109
 110/-- Square root of a dimensioned quantity (for even dimension exponents). -/
 111noncomputable def DimensionedQuantity.sqrt (q : DimensionedQuantity) : DimensionedQuantity :=
 112  ⟨Real.sqrt q.value, ⟨q.dim.L / 2, q.dim.T / 2, q.dim.M / 2⟩⟩
 113
 114/-! ## Status Report -/
 115
 116/-- Summary of dimensional analysis module. -/
 117def dimensions_status : String :=
 118  "✓ Dimension structure [L, T, M] defined\n" ++
 119  "✓ Physical constant dimensions (c, ℏ, G) specified\n" ++
 120  "✓ Planck unit dimensions documented\n" ++
 121  "✓ τ₀ dimension documented as [T]\n" ++
 122  "✓ DimensionedQuantity algebra defined"
 123
 124#eval dimensions_status
 125
 126end Dimensions
 127end Constants
 128end IndisputableMonolith
 129

source mirrored from github.com/jonwashburn/shape-of-logic