Equations
- One or more equations did not get rendered due to their size.
- MindFormal.A695LogicPaper.IntegerProgram.cumulative x_5 labels x✝¹ x✝ = MindFormal.A695LogicPaper.IntegerProgram.ret (labels 0)
Instances For
theorem
MindFormal.A695LogicPaper.IntegerProgram.cumulative_safe
{m : ℕ}
(counts labels : Fin (m + 1) → ℕ)
(acc threshold : ℕ)
:
Safe (cumulative counts labels acc threshold)
theorem
MindFormal.A695LogicPaper.IntegerProgram.cumulative_spec
{m : ℕ}
(counts labels : Fin (m + 1) → ℕ)
(acc threshold fresh : ℕ)
(v : Values)
(hc : ∀ (i : Fin (m + 1)), counts i < fresh)
(hl : ∀ (i : Fin (m + 1)), labels i < fresh)
(hp : acc < fresh)
(ht : threshold < fresh)
:
(cumulative counts labels acc threshold fresh).commands.length = 3 * m ∧ (cumulative counts labels acc threshold fresh).result < (cumulative counts labels acc threshold fresh).next ∧ evaluate (cumulative counts labels acc threshold fresh).commands v
(cumulative counts labels acc threshold fresh).result = cumulativeChoice (fun (i : Fin (m + 1)) => v (counts i)) (fun (i : Fin (m + 1)) => v (labels i)) (v acc)
(v threshold)
Prefix sums, comparisons and the selected label are actual arithmetic commands. Every row is visited even when its cumulative test succeeds.