MindFormal v1.0.0One Mind

MindFormal.Tools.A695LogicPaper.SecuritySelection

The cumulative-count test is implemented by subtraction and a strict comparison, with a declared last-coordinate fallback on malformed input.

Equations
Instances For
    theorem MindFormal.A695LogicPaper.SecurityProgram.selectCount_first {m : ℕ} (c : Fin (m + 2) → ℕ) (k : ℕ) (h : k < c 0) :
    theorem MindFormal.A695LogicPaper.SecurityProgram.selectCount_tail {m : ℕ} (c : Fin (m + 2) → ℕ) (k : ℕ) :
    selectCount c (c 0 + k) = (selectCount (fun (i : Fin (m + 1)) => c i.succ) k).succ
    theorem MindFormal.A695LogicPaper.SecurityProgram.selectCount_histogram {m : ℕ} (c : Fin (m + 1) → ℕ) (i : Fin (m + 1)) :
    (∑ k ∈ Finset.range (∑ j : Fin (m + 1), c j), if selectCount c k = i then 1 else 0) = c i

    Exact histogram of the computed cumulative selection. No random integer or chosen distribution is an algorithmic input to this proof.

    theorem MindFormal.A695LogicPaper.SecurityProgram.select_grid_histogram {m Q : ℕ} (g : Security.Grid m Q) (i : Fin (m + 1)) :
    (∑ k ∈ Finset.range Q, if selectCount (↑g) k = i then 1 else 0) = ↑g i