MindFormal v1.0.0One Mind

MindFormal.Tools.A695LogicPaper.OptimizerCost

theorem MindFormal.A695LogicPaper.IntegerProgram.optimizer_integer_cap (Q m n : ℕ) :
Q + (2 * (m + 1) + n * (2 * (m + 1) + 2)) + (Q + 1) ^ (m + 1) * (n * (2 * (m + 1) + 2) + 5 * (m + 1) + 7) ≤ 100 * (m + 1) * (n + 1) * (Q + 1) ^ (m + 1)

The shared counter chain and first-row initialization are charged once. Every other tuple pays its complete arithmetic and control block.

theorem MindFormal.A695LogicPaper.IntegerProgram.compiled_optimizer_cap {m n : ℕ} (Q : ℕ) (pay : Fin (m + 1) → Fin (n + 1) → ℕ) (table : Fin (m + 1) → Fin (n + 1) → ℚ) (zeroReg one fresh : ℕ) (v : Values) (hp : ∀ (i : Fin (m + 1)) (j : Fin (n + 1)), pay i j < fresh) (hz : zeroReg < fresh) (ho : one < fresh) (hzero : v zeroReg = 0) (hone : v one = 1) (hpay : ∀ (i : Fin (m + 1)) (j : Fin (n + 1)), v (pay i j) = SecurityProgram.encodedTable table i j) (b physicalZero physicalOne : ℕ) (placement : Placement b) :
(compile b physicalZero physicalOne (nativeOptimize Q pay zeroReg one fresh).commands placement).code.length ≤ 10000 * (m + 1) * (n + 1) * (Q + 1) ^ (m + 1) * (b + 1) ^ 2

Literal NOR costs are bounded from the actual emitted command list. All intermediate arithmetic must fit; no carry, rejected tuple, or candidate comparison is removed from this count.