{
  "controller": "pid",
  "name": "PID controller (output clamped to actuator range)",
  "kind": "controller",
  "label": "",
  "source": {
    "eml": "examples/pid_controller.eml",
    "sha256": "4d51cd9248714388"
  },
  "emitted": [
    {
      "target": "c",
      "category": "software",
      "file": "emit/pid_controller.c",
      "lines": 34,
      "ok": true,
      "tier": "LOCAL"
    },
    {
      "target": "cpp",
      "category": "software",
      "file": "emit/pid_controller.cpp",
      "lines": 38,
      "ok": true,
      "tier": "LOCAL"
    },
    {
      "target": "csharp",
      "category": "software",
      "file": "emit/PidController.cs",
      "lines": 49,
      "ok": true,
      "tier": "LOCAL"
    },
    {
      "target": "gdscript",
      "category": "software",
      "file": "emit/pid_controller.gd",
      "lines": 27,
      "ok": true,
      "tier": "LOCAL"
    },
    {
      "target": "go",
      "category": "software",
      "file": "emit/pid_controller.go",
      "lines": 30,
      "ok": true,
      "tier": "LOCAL"
    },
    {
      "target": "java",
      "category": "software",
      "file": "emit/PidController.java",
      "lines": 37,
      "ok": true,
      "tier": "LOCAL"
    },
    {
      "target": "javascript",
      "category": "software",
      "file": "emit/pid_controller.mjs",
      "lines": 32,
      "ok": true,
      "tier": "LOCAL"
    },
    {
      "target": "kotlin",
      "category": "software",
      "file": "emit/pid_controller.kt",
      "lines": 31,
      "ok": true,
      "tier": "LOCAL"
    },
    {
      "target": "luau",
      "category": "software",
      "file": "emit/pid_controller.luau",
      "lines": 33,
      "ok": true,
      "tier": "LOCAL"
    },
    {
      "target": "matlab",
      "category": "software",
      "file": "emit/pid_controller.m",
      "lines": 33,
      "ok": true,
      "tier": "LOCAL"
    },
    {
      "target": "python",
      "category": "software",
      "file": "emit/pid_controller.py",
      "lines": 25,
      "ok": true,
      "tier": "LOCAL"
    },
    {
      "target": "rust",
      "category": "software",
      "file": "emit/pid_controller.rs",
      "lines": 28,
      "ok": true,
      "tier": "LOCAL"
    },
    {
      "target": "swift",
      "category": "software",
      "file": "emit/pid_controller.swift",
      "lines": 26,
      "ok": true,
      "tier": "LOCAL"
    },
    {
      "target": "wasm",
      "category": "software",
      "file": "emit/pid_controller.wasm.ll",
      "lines": 52,
      "ok": true,
      "tier": "LOCAL"
    },
    {
      "target": "glsl",
      "category": "gpu shader",
      "file": "emit/pid_controller.glsl",
      "lines": 35,
      "ok": true,
      "tier": "LOCAL"
    },
    {
      "target": "glsl-es",
      "category": "gpu shader",
      "file": "emit/pid_controller.glsles",
      "lines": 37,
      "ok": true,
      "tier": "LOCAL"
    },
    {
      "target": "hlsl",
      "category": "gpu shader",
      "file": "emit/pid_controller.hlsl",
      "lines": 43,
      "ok": true,
      "tier": "LOCAL"
    },
    {
      "target": "metal",
      "category": "gpu shader",
      "file": "emit/pid_controller.metal",
      "lines": 43,
      "ok": true,
      "tier": "LOCAL"
    },
    {
      "target": "wgsl",
      "category": "gpu shader",
      "file": "emit/pid_controller.wgsl",
      "lines": 33,
      "ok": true,
      "tier": "LOCAL"
    },
    {
      "target": "llvm",
      "category": "compiler IR",
      "file": "emit/pid_controller.ll",
      "lines": 51,
      "ok": true,
      "tier": "LOCAL"
    },
    {
      "target": "coq",
      "category": "proof",
      "file": "emit/pid_controller.v",
      "lines": 29,
      "ok": true,
      "tier": "LOCAL"
    },
    {
      "target": "isabelle",
      "category": "proof",
      "file": "emit/pid_controller.thy",
      "lines": 33,
      "ok": true,
      "tier": "LOCAL"
    },
    {
      "target": "lean",
      "category": "proof",
      "file": "emit/pid_controller.lean",
      "lines": 51,
      "ok": true,
      "tier": "LOCAL"
    },
    {
      "target": "aadl",
      "category": "safety-critical",
      "file": "emit/pid_controller.aadl",
      "lines": 42,
      "ok": true,
      "tier": "LOCAL"
    },
    {
      "target": "ada/spark",
      "category": "safety-critical",
      "file": "emit/pid_controller.adb",
      "lines": 24,
      "ok": true,
      "tier": "LOCAL"
    },
    {
      "target": "autosar",
      "category": "safety-critical",
      "file": "emit/pid_controller.autosar.c",
      "lines": 64,
      "ok": true,
      "tier": "LOCAL"
    },
    {
      "target": "ros2",
      "category": "safety-critical",
      "file": "emit/pid_controller_pkg",
      "lines": 0,
      "ok": true,
      "tier": "LOCAL"
    },
    {
      "target": "solidity",
      "category": "blockchain",
      "file": "emit/pid_controller.sol",
      "lines": 44,
      "ok": true,
      "tier": "LOCAL"
    },
    {
      "target": "zkproof",
      "category": "blockchain",
      "file": "emit/pid_controller.zk.json",
      "lines": 14,
      "ok": true,
      "tier": "LOCAL"
    }
  ],
  "proof": {
    "theorem": "pid_output_clamped",
    "claim": "the control output is always within the actuator band [OUT_MIN, OUT_MAX] = [-1, 1]",
    "trail_file": "proof/pid_output_clamped.axioms.txt",
    "clean": true,
    "forbidden_axioms_found": [],
    "rederived": "2026-07-02T04:37:24Z",
    "source_artifact": "examples/pid_controller.eml  ->  eml-compile --target lean   (the artifact the zoo ships; NOT a probe)",
    "reverify": "make verify-proof",
    "tier": "REPLAY (re-derive: TOOLCHAIN \u2014 Lean)"
  },
  "sim": {
    "plant": "first-order  x' = -x + 1.5 u",
    "reference": "unit step at t=0.2s (drives actuator saturation)",
    "samples": 400,
    "dt": 0.02,
    "trace_csv": "trace.csv",
    "plot_png": "step_response.png",
    "check": {
      "quantity": "max|u|",
      "value": 1.0,
      "relation": "\u2264",
      "bound": 1.0,
      "holds": true,
      "context": "actuator band [-1.0, 1.0]"
    },
    "tier": "LOCAL"
  },
  "certificate": {
    "applicable": true,
    "function": "pid",
    "fragment": "arithmetic (lit/const/var/+/\u2212/\u00d7/unary\u2212) + clamp/abs (1-Lipschitz) + transcendentals sin/cos/tanh/atan (globally-Lipschitz) and exp/sinh/cosh (symmetric-domain local), nested to any depth",
    "regime": "absolute (cancellation-tolerant; inputs are sign-unconstrained so sums may cancel, where a relative bound would be unbounded)",
    "assumption": "IEEE-754 binary64 round-to-nearest, unit roundoff u = 2^-53 \u2248 1.110e-16",
    "input_ranges": {
      "error": 100.0,
      "integral": 100.0,
      "derivative": 100.0
    },
    "bound_abs": 6.439293542825908e-14,
    "bound_ulps_of_result": 580.0,
    "output_magnitude_bound": 1.0,
    "lean_theorem": "Certcom.pipeline_arith  (nesting: Certcom.pipeline_nested / pipeline_nested_exp)",
    "lean_status": "machine-checked, sorryAx-free; claim_audit gate 'pipeline-arith-general-changelog'",
    "meaning": "For every input in the declared ranges, the compiled kernel's float64 result is within 6.439e-14 (absolute) of the exact real value, given the assumption. The soundness of this bound is the Lean theorem; this harness computes its instantiation for the kernel. clamp is 1-Lipschitz, so the clamped output inherits the pre-clamp arithmetic bound (absenc_lip, L=1).",
    "tier": "LOCAL",
    "lean_proof_file": "certificate/pid_forward_error.lean",
    "lean_proof_tier": "TOOLCHAIN"
  },
  "hardware": {
    "tier": "replay",
    "note": "the same clamp/guard has been run on real silicon (ESP32 RC plant; Arty A7-100T bitstream) under injected actuator faults and stayed inside the band \u2014 replayed from capture, not re-captured on your machine",
    "evidence_ref": "monogate-research/electronics_intake (aerospace_actuator_guard_v*, real_modules_v0)"
  }
}