Pith. sign in

IndisputableMonolith.Verification.JcostAxiomsCert

IndisputableMonolith/Verification/JcostAxiomsCert.lean · 74 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 JcostAxioms
   7
   8open IndisputableMonolith.Cost
   9
  10/-!
  11# Jcost Axioms Certificate: A1, A2, and Algebraic Form
  12
  13This certificate packages the fundamental axioms and identities for the
  14Jcost function directly in multiplicative coordinates.
  15
  16## Key Results
  17
  181. **A1 (Symmetry)**: J(x) = J(1/x) for x > 0
  192. **A2 (Unit)**: J(1) = 0
  203. **Algebraic Form**: J(x) = (x - 1)² / (2x)
  214. **Nonnegativity**: J(x) ≥ 0 for x > 0
  22
  23## Why this matters for the certificate chain
  24
  25While we have certified these properties in log-coordinates (for Jlog),
  26the multiplicative coordinate version is also essential because:
  27
  281. The multiplicative form J(x) = (x + 1/x)/2 - 1 is the defining formula
  292. The algebraic form J(x) = (x - 1)²/(2x) makes many proofs simpler
  303. The symmetry J(x) = J(1/x) directly expresses reciprocal invariance
  31
  32This completes the picture by certifying both coordinate systems.
  33
  34## Mathematical Content
  35
  36The squared form shows:
  37- J(x) = 0 iff (x-1)² = 0 iff x = 1
  38- J(x) ≥ 0 because (x-1)² ≥ 0 and 2x > 0 for x > 0
  39- J(x) = J(1/x) because (x-1)² = (1/x - 1)² · x² / (1/x)² = (1-x)² = (x-1)²
  40-/
  41
  42structure JcostAxiomsCert where
  43  deriving Repr
  44
  45/-- Verification predicate: Jcost satisfies A1, A2, and algebraic identity.
  46
  47This certifies:
  481. Symmetry: J(x) = J(1/x) for x > 0 (A1)
  492. Unit: J(1) = 0 (A2)
  503. Algebraic form: J(x) = (x-1)²/(2x) for x ≠ 0
  514. Nonnegativity: J(x) ≥ 0 for x > 0 -/
  52@[simp] def JcostAxiomsCert.verified (_c : JcostAxiomsCert) : Prop :=
  53  -- A1: Symmetry
  54  (∀ x : ℝ, 0 < x → Jcost x = Jcost x⁻¹) ∧
  55  -- A2: Unit
  56  (Jcost 1 = 0) ∧
  57  -- Algebraic form
  58  (∀ x : ℝ, x ≠ 0 → Jcost x = (x - 1)^2 / (2 * x)) ∧
  59  -- Nonnegativity
  60  (∀ x : ℝ, 0 < x → 0 ≤ Jcost x)
  61
  62/-- Top-level theorem: the certificate verifies. -/
  63@[simp] theorem JcostAxiomsCert.verified_any (c : JcostAxiomsCert) :
  64    JcostAxiomsCert.verified c := by
  65  refine ⟨?_, ?_, ?_, ?_⟩
  66  · intro x hx; exact Jcost_symm hx
  67  · exact Jcost_unit0
  68  · intro x hx; exact Jcost_eq_sq hx
  69  · intro x hx; exact Jcost_nonneg hx
  70
  71end JcostAxioms
  72end Verification
  73end IndisputableMonolith
  74

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