pith. machine review for the scientific record. sign in

IndisputableMonolith.Measurement.RSNative.Alignment

IndisputableMonolith/Measurement/RSNative/Alignment.lean · 55 lines · 6 declarations

show as:
view math explainer →

open module explainer GitHub source

Explainer status: pending

   1import IndisputableMonolith.Measurement.RSNative.Core
   2
   3namespace IndisputableMonolith
   4namespace Measurement
   5namespace RSNative
   6
   7/-!
   8# Cross-Agent Alignment (Scaffold)
   9
  10This module defines the *protocol-level seam* for comparing measurements across agents.
  11
  12We do **not** solve qualia/ethics comparability here. Instead we:
  13- make the alignment *explicit data* (a map + a protocol),
  14- record invariants that must be preserved for a comparison to be meaningful,
  15- require falsifiers whenever the status is `.hypothesis` or `.scaffold`.
  16-/
  17
  18/-- An alignment protocol extends `Protocol` with explicit invariants for cross-agent comparability. -/
  19structure AlignmentProtocol where
  20  protocol : Protocol
  21  /-- Invariants that must be preserved under alignment (e.g., dominant mode, total Z, etc.). -/
  22  invariants : List String := []
  23
  24namespace AlignmentProtocol
  25
  26@[simp] def name (A : AlignmentProtocol) : String := A.protocol.name
  27@[simp] def status (A : AlignmentProtocol) : Status := A.protocol.status
  28
  29end AlignmentProtocol
  30
  31/-- An alignment map from one agent’s coordinate system to another’s. -/
  32abbrev AlignmentMap (α β : Type) : Type := α → β
  33
  34/-- A packaged alignment: map + protocol hygiene. -/
  35structure Alignment (α β : Type) where
  36  map : AlignmentMap α β
  37  protocol : AlignmentProtocol
  38
  39namespace Alignment
  40
  41/-- Apply an alignment map to a measurement value, keeping window/uncertainty, and appending an audit note. -/
  42noncomputable def apply {α β : Type} (A : Alignment α β) (m : Measurement α) : Measurement β :=
  43  { value := A.map m.value
  44    window := m.window
  45    protocol := A.protocol.protocol
  46    uncertainty := m.uncertainty
  47    notes := m.notes ++ [s!"Aligned via {A.protocol.name}"]
  48  }
  49
  50end Alignment
  51
  52end RSNative
  53end Measurement
  54end IndisputableMonolith
  55

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