Equations
- One or more equations did not get rendered due to their size.
- MindFormal.A695LogicPaper.IntegerProgram.rejectionLoop zeroReg one bound [] x✝ = MindFormal.A695LogicPaper.IntegerProgram.ret x✝
Instances For
theorem
MindFormal.A695LogicPaper.IntegerProgram.rejectionLoop_safe
(zeroReg one bound : ℕ)
(cs : List ℕ)
(state : Fin 2 → ℕ)
:
Safe (rejectionLoop zeroReg one bound cs state)
theorem
MindFormal.A695LogicPaper.IntegerProgram.rejectionLoop_spec
(zeroReg one bound : ℕ)
(cs : List ℕ)
(state : Fin 2 → ℕ)
(fresh Q : ℕ)
(old : Option ℕ)
(v : Values)
(hz : zeroReg < fresh)
(ho : one < fresh)
(hq : bound < fresh)
(hc : ∀ c ∈ cs, c < fresh)
(hs : ∀ (i : Fin 2), state i < fresh)
(hzero : v zeroReg = 0)
(hone : v one = 1)
(hbound : v bound + 1 = Q)
(hstate : ∀ (i : Fin 2), v (state i) = sampleState old i)
:
(rejectionLoop zeroReg one bound cs state fresh).commands.length = 5 * cs.length ∧ (∀ (i : Fin 2),
(rejectionLoop zeroReg one bound cs state fresh).result i < (rejectionLoop zeroReg one bound cs state fresh).next) ∧ ∀ (i : Fin 2),
evaluate (rejectionLoop zeroReg one bound cs state fresh).commands v
((rejectionLoop zeroReg one bound cs state fresh).result i) = sampleState (List.foldl (remember Q) old (List.map v cs)) i
Every candidate is compared, including all candidates after first acceptance. The two final registers give the actual found flag and first accepted value.