theorem
MindFormal.A695LogicPaper.SecurityProgram.packed_trial
{m n : ℕ}
(pay : Fin (m + 1) → Fin (n + 1) → ℚ)
(Q : ℕ)
(old trial : Fin (m + 1) → ℕ)
(ho : ∑ i : Fin (m + 1), old i = Q)
:
IntegerProgram.trialChoice (encodedTable pay) Q (pack (encodedTable pay) old) trial = pack (encodedTable pay) (keepBetter pay Q old trial)
theorem
MindFormal.A695LogicPaper.SecurityProgram.packed_fold
{m n : ℕ}
(pay : Fin (m + 1) → Fin (n + 1) → ℚ)
(Q : ℕ)
(xs : List (Fin (m + 1) → ℕ))
(old : Fin (m + 1) → ℕ)
(ho : ∑ i : Fin (m + 1), old i = Q)
:
List.foldl (IntegerProgram.trialChoice (encodedTable pay) Q) (pack (encodedTable pay) old) xs = pack (encodedTable pay) (List.foldl (keepBetter pay Q) old xs)
theorem
MindFormal.A695LogicPaper.SecurityProgram.packed_optimizer
{m n : ℕ}
(pay : Fin (m + 1) → Fin (n + 1) → ℚ)
(Q : ℕ)
:
List.foldl (IntegerProgram.trialChoice (encodedTable pay) Q) (pack (encodedTable pay) (firstCounts m Q))
(counterTuples Q (m + 1)) = pack (encodedTable pay) (optimize pay Q)
The native packed fold computes precisely the optimizer verified on the calibrated rational table, with the same strict tie rule.