Pith. sign in

IndisputableMonolith.Verification.JlogAMGMCert

IndisputableMonolith/Verification/JlogAMGMCert.lean · 67 lines · 1 declarations

show as:
view math explainer →

open module explainer GitHub source

Explainer status: pending

   1import Mathlib
   2import IndisputableMonolith.Cost
   3
   4namespace IndisputableMonolith
   5namespace Verification
   6namespace JlogAMGM
   7
   8open IndisputableMonolith.Cost
   9open Real
  10
  11/-!
  12# Jlog AM-GM Nonnegativity Certificate
  13
  14This certificate packages the proof that Jlog is non-negative using the
  15arithmetic-geometric mean inequality.
  16
  17## Key Result
  18
  19For all t ∈ ℝ, Jlog(t) ≥ 0, with equality iff t = 0.
  20
  21## Why this matters for the certificate chain
  22
  23The AM-GM inequality provides an elementary, algebraic proof that the cost
  24function is always non-negative:
  25
  261. **AM-GM**: For x > 0, we have x + 1/x ≥ 2√(x · 1/x) = 2
  272. **Cost bound**: J(x) = (x + 1/x)/2 - 1 ≥ 2/2 - 1 = 0
  283. **Equality**: J(x) = 0 iff x + 1/x = 2 iff x = 1
  29
  30In log-coordinates:
  31- Jlog(t) = J(exp(t)) ≥ 0 for all t
  32- Jlog(t) = 0 iff exp(t) = 1 iff t = 0
  33
  34This provides an alternative, elementary proof of non-negativity that doesn't
  35rely on convexity or calculus — just AM-GM.
  36
  37## Mathematical Content
  38
  39The proof uses:
  40- AM-GM: a + b ≥ 2√(ab) for a, b > 0
  41- exp(t) > 0 for all t
  42- exp(t) · exp(-t) = 1
  43-/
  44
  45structure JlogAMGMCert where
  46  deriving Repr
  47
  48/-- Verification predicate: Jlog is non-negative via AM-GM.
  49
  50This certifies that Jlog(t) ≥ 0 for all t, and Jlog(t) = 0 iff t = 0. -/
  51@[simp] def JlogAMGMCert.verified (_c : JlogAMGMCert) : Prop :=
  52  -- Jlog is non-negative
  53  (∀ t : ℝ, 0 ≤ Jlog t) ∧
  54  -- Jlog equals zero iff t = 0
  55  (∀ t : ℝ, Jlog t = 0 ↔ t = 0)
  56
  57/-- Top-level theorem: the certificate verifies. -/
  58@[simp] theorem JlogAMGMCert.verified_any (c : JlogAMGMCert) :
  59    JlogAMGMCert.verified c := by
  60  constructor
  61  · exact Jlog_nonneg
  62  · exact Jlog_eq_zero_iff
  63
  64end JlogAMGM
  65end Verification
  66end IndisputableMonolith
  67

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