OAI/Combinatorics/ContingencyTables/Sampling/ProfileExchangeProgram.lean
9 declarations, 0 contain sorry, 0 declared as axioms
A binary list program for a small-profile unit exchange
- abbrev
OAI.ContingencyTables.ProfilePrograms.ExchangeInputline 13 - def
OAI.ContingencyTables.ProfilePrograms.exchangeEntryline 15 - def
OAI.ContingencyTables.ProfilePrograms.exchangeEntryRealizerline 18 - theorem
OAI.ContingencyTables.ProfilePrograms.polynomial_exchangeEntryline 31 - def
OAI.ContingencyTables.ProfilePrograms.listExchangeline 52 - def
OAI.ContingencyTables.ProfilePrograms.listExchangeRealizerline 55 - theorem
OAI.ContingencyTables.ProfilePrograms.polynomial_listExchangeline 61Source documentation
Its loop traverses the input profile once, even if the supplied coordinate indices are much larger than its length.
theorem polynomial_listExchange : PolynomialTime listExchangeRealizer := by …
Mentions: OAI.ContingencyTables.ProfilePrograms.listExchangeRealizer
- lemma
OAI.ContingencyTables.ProfilePrograms.listExchange_lengthline 71 - theorem
OAI.ContingencyTables.ProfilePrograms.listExchange_ofFnline 76Source documentation
The binary list program implements the exact coordinate update used by the physical graph, with no bounded-integer overflow.
theorem listExchange_ofFn {n : ℕ} (v : Fin n → ℕ) (i j : Fin n) : listExchange (List.ofFn v,(i.val,j.val))= List.ofFn (IntegerWeightedTransport.exchangeTarget v i j) := by …Mentions: OAI.ContingencyTables.ProfilePrograms.listExchange, OAI.ContingencyTables.IntegerWeightedTransport.exchangeTarget