pith. machine review for the scientific record. sign in
structure

Protocol

definition
show as:
view math explainer →
module
IndisputableMonolith.Measurement.RSNative.Core
domain
Measurement
line
33 · github
papers citing
none yet

open explainer

Generate a durable explainer page for this declaration.

open lean source

IndisputableMonolith.Measurement.RSNative.Core on GitHub at line 33.

browse module

All declarations in this module, on Recognition.

explainer page

Tracked in the explainer inventory; generation is lazy so crawlers do not trigger LLM jobs.

open explainer

depends on

used by

formal source

  30  deriving DecidableEq, Repr
  31
  32/-- A measurement protocol: how an RS observable is extracted from a state/trace. -/
  33structure Protocol where
  34  /-- Short protocol identifier (stable, machine-friendly). -/
  35  name : String
  36  /-- Human-readable summary. -/
  37  summary : String := ""
  38  /-- Claim hygiene for the extraction step. -/
  39  status : Status := .spec
  40  /-- Explicit assumptions (kept small and testable). -/
  41  assumptions : List String := []
  42  /-- Falsifiers: what would prove this protocol wrong. -/
  43  falsifiers : List String := []
  44
  45namespace Protocol
  46
  47/-- Protocol hygiene predicate (v1/v2).
  48
  49Rules:
  50- `name` must be non-empty
  51- if `status` is `.hypothesis` or `.scaffold`, both `assumptions` and `falsifiers` must be non-empty -/
  52def hygienic (p : Protocol) : Prop :=
  53  p.name ≠ "" ∧
  54    match p.status with
  55    | .hypothesis | .scaffold => p.assumptions ≠ [] ∧ p.falsifiers ≠ []
  56    | _ => True
  57
  58/-- Boolean check version of `Protocol.hygienic` (useful for audits). -/
  59def hygienicBool (p : Protocol) : Bool :=
  60  (!p.name.isEmpty) &&
  61    match p.status with
  62    | .hypothesis | .scaffold => (!p.assumptions.isEmpty) && (!p.falsifiers.isEmpty)
  63    | _ => true