MindFormal v1.0.0One Mind

MindFormal.Tools.A695LogicPaper.NativeSampler

def MindFormal.A695LogicPaper.IntegerProgram.nativeSampler {m : ℕ} (counts : Fin (m + 1) → ℕ) (zeroReg one bound : ℕ) (candidates : List ℕ) :
Builder (Fin 3 → ℕ)
Equations
  • One or more equations did not get rendered due to their size.
Instances For
    theorem MindFormal.A695LogicPaper.IntegerProgram.nativeSampler_safe {m : ℕ} (counts : Fin (m + 1) → ℕ) (zeroReg one bound : ℕ) (candidates : List ℕ) :
    Safe (nativeSampler counts zeroReg one bound candidates)
    theorem MindFormal.A695LogicPaper.IntegerProgram.nativeSampler_spec {m : ℕ} (counts : Fin (m + 1) → ℕ) (zeroReg one bound : ℕ) (candidates : List ℕ) (fresh Q : ℕ) (v : Values) (hc : ∀ (i : Fin (m + 1)), counts i < fresh) (hz : zeroReg < fresh) (ho : one < fresh) (hq : bound < fresh) (hx : ∀ r ∈ candidates, r < fresh) (hzero : v zeroReg = 0) (hone : v one = 1) (hbound : v bound + 1 = Q) :
    (nativeSampler counts zeroReg one bound candidates fresh).commands.length = 5 * candidates.length + 4 * m + 1 ∧ (∀ (i : Fin 3), (nativeSampler counts zeroReg one bound candidates fresh).result i < (nativeSampler counts zeroReg one bound candidates fresh).next) ∧ have accepted := List.foldl (remember Q) none (List.map v candidates); ∀ (i : Fin 3), evaluate (nativeSampler counts zeroReg one bound candidates fresh).commands v ((nativeSampler counts zeroReg one bound candidates fresh).result i) = ![sampleState accepted 0, sampleState accepted 1, ↑(SecurityProgram.selectCount (fun (j : Fin (m + 1)) => v (counts j)) (accepted.getD 0))] i

    The sampler writes its found flag, first accepted integer and selected action. No part of the candidate loop or cumulative search is omitted.