Conversation
…ility critique update (run35) Task 5 (Proof Assistance): Add ExpoDeadzone.lean — formal specification and proofs for the combined expo(deadzone(v, dz), e) RC input pipeline. 8 theorems proved (0 sorry, lake build passes): - expodz_in_dz: inside-deadzone input → exactly 0 - expodz_in_range: output always ∈ [-1, 1] (unconditional) - expodz_zero: zero input → zero output for dz ≥ 0 - expodz_at_one / expodz_at_neg_one: ±1 are fixed points for dz ∈ [0, 1) - expodz_e0: e=0 (linear expo) reduces to pure deadzone - expodz_cubic: e=1 (full cubic expo) gives (deadzone v dz)³ - expodz_no_dz: dz=0 recovers exactly expoRat (no-deadzone degeneration) Proofs compose expo_* and deadzone_* theorems from prior Lean files, demonstrating compositional verification of the two-stage RC pipeline. Also registers ExpoDeadzone + MedianFilter + SuperExpo in FVSquad.lean. Task 7 (Proof Utility Critique): Update CRITIQUE.md to reflect current state: - 15 targets, 172 theorems, 166 proved, 6 sorry (WrapAngle wrapRat only) - Add SuperExpo, MedianFilter, ExpoDeadzone rows to proved-theorems table - Update gaps: add expodz_odd as next high-priority target - Add positive findings #10-12 (MedianFilter spike rejection, superexpo denom-positive safety, expo+deadzone composition correctness) - Update Known Sorry-Guarded section (14 files, 0 sorry except WrapAngle) > ✅ Proofs verified: lake build passed with Lean 4.29.0. 0 sorry in new file. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… (run36) Task 4 (Implementation Extraction — new target): - New file: formal-verification/lean/FVSquad/InterpolateNXY.lean Models math::interpolateNXY for N=3 as interp3 9 theorems, 0 sorry (lake build passed) - New file: formal-verification/specs/interpolatenxy_informal.md Informal spec: purpose, pre/postconditions, edge cases, examples Task 5 (Proof Assistance — odd symmetry): - Deadzone.lean: add deadzone_odd theorem deadzone(-x, dz) = -(deadzone x dz) for dz >= 0 Three-case proof: pos branch, neg branch, in-deadzone - ExpoDeadzone.lean: add expodz_odd theorem expodz(-v, e, dz) = -(expodz v e dz) for dz >= 0 Proof by composition: deadzone_odd + expo_odd Total theorems: 172 -> 183 (11 new), sorry unchanged at 6 (WrapAngle only) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔬 Lean Squad — automated formal verification run 36.
Summary
Two tasks completed this run:
Task 4 — Implementation Extraction:
interpolateNXY(new target)New file:
formal-verification/lean/FVSquad/InterpolateNXY.leanFormal specification and proofs for
math::interpolateNXYfromsrc/lib/mathlib/math/Functions.hpp. Models the 3-point case (N=3) asinterp3:9 theorems proved, 0 sorry:
interp3_low_clampv ≤ x0 → output = y0(clamped at low end)interp3_high_clampv > x2 → output = y2(clamped at high end)interp3_at_x0y0interp3_at_x1y1(from segment 0)interp3_seg1_at_x1y1atx1interp3_at_x2y2interp3_le_y2y2when y-values orderedinterp3_ge_y0y0when y-values orderedinterp3_mono_seg0The continuity proof (
interp3_at_x1+interp3_seg1_at_x1) is particularlyimportant: it confirms the two piecewise segments join smoothly at
y[1], ruling outdiscontinuous "jumps" at the interior breakpoint that could cause actuator transients.
New file:
formal-verification/specs/interpolatenxy_informal.md— informal specwith purpose, preconditions, postconditions, edge cases and worked examples.
Task 5 — Proof Assistance: Odd Symmetry for deadzone and expo-deadzone
deadzone_odd(Deadzone.lean)New theorem:
deadzone_odd— the deadzone is an odd function:Three-case proof: positive branch (x > dz), negative branch (x < -dz),
in-deadzone (|x| ≤ dz). Each case uses the existing
deadzone_pos_eq/deadzone_neg_eqlemmas and rational arithmetic (
Rat.neg_sub,Rat.neg_add,Rat.div_def).This is a key structural property: the RC stick deadzone preserves sign symmetry.
expodz_odd(ExpoDeadzone.lean)New theorem:
expodz_odd— the expo-deadzone pipeline is an odd function:Proof by composition:
deadzone_odd+expo_odd(expo already had this theorem).This was the gap flagged in the previous run's CRITIQUE.md.
Verification Status
All 19 modules built successfully. Only pre-existing 6
sorrywarnings inWrapAngle.lean(wrapRat theorems requiring Mathlib floor arithmetic — unchanged).
Files Changed
formal-verification/lean/FVSquad/InterpolateNXY.lean— new (9 theorems, 0 sorry)formal-verification/specs/interpolatenxy_informal.md— new (informal spec)formal-verification/lean/FVSquad/Deadzone.lean— adddeadzone_oddtheoremformal-verification/lean/FVSquad/ExpoDeadzone.lean— addexpodz_oddtheoremformal-verification/lean/FVSquad.lean— add InterpolateNXY importformal-verification/TARGETS.md— add targets 16 and 17