Pith. sign in

IndisputableMonolith.Verification.JcostNonnegCert

IndisputableMonolith/Verification/JcostNonnegCert.lean · 51 lines · 1 declarations

show as:
view math explainer →

open module explainer GitHub source

Explainer status: pending

   1import Mathlib
   2import IndisputableMonolith.Cost
   3
   4/-!
   5# J-cost Non-negativity Certificate
   6
   7This audit certificate packages the **AM-GM inequality** for the J-cost function:
   8
   9> J(x) ≥ 0 for all x > 0
  10
  11## Why this matters
  12
  131. **AM-GM foundation**: The arithmetic-geometric mean inequality implies
  14   that (x + 1/x)/2 ≥ √(x · 1/x) = 1, so J(x) = (x + 1/x)/2 - 1 ≥ 0.
  15
  162. **Cost interpretation**: In Recognition Science, J-cost measures "deviation
  17   from unit ratio". Non-negativity means there's no negative cost — only
  18   zero cost at the optimum x = 1.
  19
  203. **Variational foundation**: Combined with Jlog_nonneg, this establishes
  21   that the cost functional has a well-defined minimum.
  22
  23## Proof approach
  24
  25The proof uses the identity J(x) = (x-1)²/(2x) and positivity of squares.
  26-/
  27
  28namespace IndisputableMonolith
  29namespace Verification
  30namespace JcostNonneg
  31
  32open IndisputableMonolith.Cost
  33
  34structure JcostNonnegCert where
  35  deriving Repr
  36
  37/-- Verification predicate: J-cost is non-negative on positive reals.
  38
  39This is the AM-GM inequality: (x + 1/x)/2 ≥ 1 for x > 0. -/
  40@[simp] def JcostNonnegCert.verified (_c : JcostNonnegCert) : Prop :=
  41  ∀ {x : ℝ}, 0 < x → 0 ≤ Jcost x
  42
  43@[simp] theorem JcostNonnegCert.verified_any (c : JcostNonnegCert) :
  44    JcostNonnegCert.verified c := by
  45  intro x hx
  46  exact Jcost_nonneg hx
  47
  48end JcostNonneg
  49end Verification
  50end IndisputableMonolith
  51

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