pith. machine review for the scientific record. sign in

IndisputableMonolith.Certificates.Standard

IndisputableMonolith/Certificates/Standard.lean · 52 lines · 2 declarations

show as:
view math explainer →

open module explainer GitHub source

Explainer status: pending

   1import Mathlib
   2
   3namespace IndisputableMonolith
   4
   5/--
   6The Standard of Truth for the Canon.
   7
   8Every physical claim in the repository must be packaged as a `PhysicalCertificate`.
   9This structure ensures that:
  101. The derived value is explicit.
  112. The empirical target (from CODATA/PDG) is explicit.
  123. The proof relies only on the authorized axioms (enforced by CI).
  13-/
  14class PhysicalCertificate (α : Type) [Repr α] [DecidableEq α] where
  15  /-- The name of the physical quantity (e.g., "Electron Mass"). -/
  16  name : String
  17
  18  /-- The value derived from the Core (e.g., derived from φ). -/
  19  val : α
  20
  21  /-- The empirical target value (e.g., from CODATA). -/
  22  target : α
  23
  24  /-- The certified error bound (precision of the match). -/
  25  error_bound : α
  26
  27  /-- The proof that the derivation equals the value. -/
  28  proof : True  -- Placeholder for the actual proof term type
  29
  30  /--
  31  Metadata for the CI Auditor.
  32  This field is checked by the python script to ensure no hidden axioms.
  33  -/
  34  axiom_check : Unit
  35
  36/--
  37A helper for numeric certificates (Real numbers).
  38-/
  39structure RealCertificate where
  40  val : ℝ
  41  target_min : ℝ
  42  target_max : ℝ
  43  /-- Proof that the value lies within the empirical bounds. -/
  44  proof : target_min < val ∧ val < target_max
  45
  46instance : Repr RealCertificate where
  47  reprPrec c _ :=
  48    "PhysicalCertificate(val=" ++ repr c.val ++
  49    ", bounds=[" ++ repr c.target_min ++ ", " ++ repr c.target_max ++ "])"
  50
  51end IndisputableMonolith
  52

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