Pith. sign in

IndisputableMonolith.Verification.LeastActionCert

IndisputableMonolith/Verification/LeastActionCert.lean · 106 lines · 2 declarations

show as:
view math explainer →

open module explainer GitHub source

Explainer status: pending

   1import Mathlib
   2import IndisputableMonolith.Action.PathSpace
   3import IndisputableMonolith.Action.FunctionalConvexity
   4import IndisputableMonolith.Action.EulerLagrange
   5import IndisputableMonolith.Action.QuadraticLimit
   6import IndisputableMonolith.Action.Hamiltonian
   7import IndisputableMonolith.Action.Noether
   8
   9/-!
  10# Master Verification Certificate: The Principle of Least Action
  11
  12This certificate aggregates the central theorems of the
  13`IndisputableMonolith.Action` namespace into a single verifiable
  14statement. Together they establish: **the principle of least action is
  15a theorem of the d'Alembert functional equation, via the convexity of
  16the J-cost functional.**
  17
  18## Verified content
  19
  20The certificate's `verified` predicate bundles five independent
  21assertions, each a theorem in its own right:
  22
  231. **Convexity of the J-action.** For any two admissible paths and any
  24   `s ∈ [0,1]`, `S[(1-s) γ₁ + s γ₂] ≤ (1-s) S[γ₁] + s S[γ₂]`.
  25
  262. **Local-min ⇒ global-min.** A path that does not strictly decrease
  27   the action toward any competitor (along even one positive
  28   interpolation step) globally minimizes the action.
  29
  303. **Cost-rate Euler–Lagrange uniqueness.** The constant ground state
  31   `γ ≡ 1` is the unique solution of the cost-rate EL equation among
  32   admissible paths.
  33
  344. **Newton's second law from EL.** The EL equation of the standard
  35   Lagrangian `L = ½ m q̇² - V(q)` is equivalent to Newton's law
  36   `m q̈ = -V'(q)`.
  37
  385. **Energy conservation.** The total energy of a Newtonian trajectory
  39   is conserved (under the standard differentiability hypotheses).
  40
  41This is the headline of Paper A.
  42-/
  43
  44namespace IndisputableMonolith
  45namespace Verification
  46namespace LeastAction
  47
  48open IndisputableMonolith.Action
  49
  50structure LeastActionCert where
  51  deriving Repr
  52
  53/-- The verification predicate for the principle of least action. -/
  54def LeastActionCert.verified (_c : LeastActionCert) : Prop :=
  55  -- (1) Convexity of the J-action
  56  (∀ {a b : ℝ} (hab : a ≤ b) (γ₁ γ₂ : AdmissiblePath a b)
  57      (s : ℝ) (hs : s ∈ Set.Icc (0:ℝ) 1),
  58      actionJ (interp γ₁ γ₂ s hs) ≤ (1 - s) * actionJ γ₁ + s * actionJ γ₂) ∧
  59  -- (2) Local-min ⇒ global-min for the J-action
  60  (∀ {a b : ℝ} (hab : a ≤ b) (γ_geo γ_other : AdmissiblePath a b)
  61      (s₀ : ℝ) (hs₀ : s₀ ∈ Set.Icc (0:ℝ) 1) (hs₀_pos : 0 < s₀),
  62      actionJ γ_geo ≤ actionJ (interp γ_geo γ_other s₀ hs₀) →
  63      actionJ γ_geo ≤ actionJ γ_other) ∧
  64  -- (3) Cost-rate EL ⇔ constant-1 path
  65  (∀ (γ : ℝ → ℝ), (∀ t, 0 < γ t) →
  66      (EulerLagrange.costRateELHolds γ ↔ ∀ t, γ t = 1)) ∧
  67  -- (4) Newton's second law from standard EL
  68  (∀ (m : ℝ) (V : ℝ → ℝ) (γ : ℝ → ℝ) (t : ℝ),
  69      QuadraticLimit.standardEL m V γ t = 0 ↔
  70      m * deriv (deriv γ) t = -(deriv V (γ t))) ∧
  71  -- (5) Energy conservation along Newtonian trajectories (with witnesses)
  72  (∀ (m : ℝ) (hm : 0 < m) (V : ℝ → ℝ) (γ : ℝ → ℝ),
  73      (∀ t, DifferentiableAt ℝ V (γ t)) →
  74      (∀ t, DifferentiableAt ℝ γ t) →
  75      (∀ t, DifferentiableAt ℝ (deriv γ) t) →
  76      (∀ t : ℝ,
  77        deriv (HamiltonianMech.totalEnergy m V γ) t =
  78          deriv γ t * (m * deriv (deriv γ) t + deriv V (γ t))) →
  79      (∀ t : ℝ, QuadraticLimit.standardEL m V γ t = 0) →
  80      ∀ t₁ t₂ : ℝ,
  81        HamiltonianMech.totalEnergy m V γ t₁ = HamiltonianMech.totalEnergy m V γ t₂)
  82
  83/-- **Master theorem.** The principle of least action certificate verifies. -/
  84theorem LeastActionCert.verified_any (c : LeastActionCert) :
  85    LeastActionCert.verified c := by
  86  refine ⟨?_, ?_, ?_, ?_, ?_⟩
  87  · intro a b hab γ₁ γ₂ s hs
  88    exact actionJ_convex_on_interp hab γ₁ γ₂ s hs
  89  · intro a b hab γ_geo γ_other s₀ hs₀ hs₀_pos h_local
  90    exact actionJ_local_min_is_global hab γ_geo γ_other s₀ hs₀ hs₀_pos h_local
  91  · intro γ hpos
  92    exact EulerLagrange.costRateEL_iff_const_one γ hpos
  93  · intro m V γ t
  94    exact QuadraticLimit.newton_second_law m V γ t
  95  · intro m hm V γ hV_diff hγ_diff hγ_diff2 h_dE_factored hEL t₁ t₂
  96    exact HamiltonianMech.energy_conservation m hm V γ hV_diff hγ_diff hγ_diff2
  97      h_dE_factored hEL t₁ t₂
  98
  99/-- Status string for human consumption. -/
 100def leastAction_status : String :=
 101  "Verification.LeastActionCert: principle_of_least_action verified (5 theorems, 0 sorry, 0 axiom)"
 102
 103end LeastAction
 104end Verification
 105end IndisputableMonolith
 106

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