Snap displacement versus the recorded margin (margin–ledger joint)
ProvedQMCLeafB.SnapLedger.ledger_round_okA separation loop that runs its oracle at a snapped (rational) centre, while its engine's recorded centre is the exact iterate, must account for the displacement when it records the round's margin.
Let be the cut normal, the snapped centre at which the oracle was evaluated, and the engine's recorded centre. Suppose the cut separates a set around with margin :
Suppose moreover and . Then Cauchy–Schwarz gives
so the cut separates around with the inflated margin .
Consequently the bookkeeping pair a ledger needs for the round holds at del := m + Cε: the margin is nonnegative, it fits the quadratic room , and the separation clause holds around the recorded centre.
The sign matters: the displacement can only weaken the guaranteed separation, so the recorded margin must be , not . Recording the smaller value would be unsound, and the ledger's room must therefore contain the snap cost on top of the oracle's own margin.
import Mathlib open Finset
theorem QMCLeafB.SnapLedger.ledger_round_ok {k : ℕ} {S : Set (Fin k → ℝ)} {c a a' : Fin k → ℝ} {m C ε rho sigma : ℝ}
(hsep : ∀ z ∈ S, -m ≤ ∑ i, c i * (z i - a i))
(hC : Real.sqrt (∑ i, (c i) ^ 2) ≤ C)
(hε : Real.sqrt (∑ i, (a i - a' i) ^ 2) ≤ ε)
(hm : 0 < m) (hε0 : 0 ≤ ε) (hrho : 0 ≤ rho) (hsigma : 0 ≤ sigma)
(hroom : (m + C * ε) ^ 2 ≤ rho ^ 2 * sigma) :
0 ≤ m + C * ε ∧ (m + C * ε) ^ 2 ≤ rho ^ 2 * sigma ∧
∀ z ∈ S, -(m + C * ε) ≤ ∑ i, c i * (z i - a' i) := by sorry