# Reproduction — PID controller (output clamped to actuator range)

Source `examples/pid_controller.eml` (sha256 `4d51cd9248714388`). Regenerate with `make demo`.

| stage | artifact | tier |
|---|---|---|
| emit — software (14) | `c`, `cpp`, `csharp`, `gdscript`, `go`, `java`, `javascript`, `kotlin`, `luau`, `matlab`, `python`, `rust`, `swift`, `wasm` | LOCAL |
| emit — gpu shader (5) | `glsl`, `glsl-es`, `hlsl`, `metal`, `wgsl` | LOCAL |
| emit — compiler IR (1) | `llvm` | LOCAL |
| emit — proof (3) | `coq`, `isabelle`, `lean` | LOCAL |
| emit — safety-critical (4) | `aadl`, `ada/spark`, `autosar`, `ros2` | LOCAL |
| emit — blockchain (2) | `solidity`, `zkproof` | LOCAL |
| **emit total** | **29 targets from one source** | LOCAL |
| proof | `pid_output_clamped` — ✓ clean (`proof/pid_output_clamped.axioms.txt`) | REPLAY (re-derive: TOOLCHAIN — Lean) |
| simulate | `sim/trace.csv`, `sim/step_response.png` — max|u| = 1.0 ≤ 1.0 | LOCAL |
| certificate | fwd-error ≤ `6.44e-14` abs (`580` ulp of result), all inputs in range — `certificate.json` | LOCAL |
| hardware | 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 — replayed from capture, not re-captured on your machine | REPLAY |

**Forward-error certificate.** For every input in the declared ranges (`|error| ≤ 100`, `|integral| ≤ 100`, `|derivative| ≤ 100`), the COMPILED kernel's float64 result is within **`6.439e-14`** (absolute, ≈ `580` ulp of the result) of the exact real value, assuming IEEE-754 binary64 round-to-nearest, unit roundoff u = 2^-53 ≈ 1.110e-16. This is not asserted — it is the `absErr` fold computed over the kernel's AST, and that fold is proved sound (`sorryAx`-free) by machlib's `Certcom.pipeline_arith`. Regime: absolute. The soundness is machine-checked (TOOLCHAIN); the per-kernel bound is computed here (LOCAL).

The harness also emits the **instantiated proof** `certificate/pid_forward_error.lean` — the kernel's arithmetic core as an `EML` term, its generated `IsArith` proof, and the `pipeline_arith` instantiation = a machine-checked per-kernel theorem `pid_forward_error : AbsEnc (absErr …) (emitted-C value) (exact)`, `sorryAx`-free, holding for any `FPBridge`. Re-check: `lake env lean` it against machlib (TOOLCHAIN).

**The same claim, three ways.** The Lean theorem `pid_output_clamped` proves the control output is always within the actuator band [OUT_MIN, OUT_MAX] = [-1, 1]; the simulation shows `max|u| = 1.0 ≤ 1.0` (actuator band [-1.0, 1.0]); the hardware evidence shows the same behavior measured on real hardware; Proved, simulated, measured.

