OAI/Combinatorics/ContingencyTables/Sampling/ExactIntegerProgram.lean
12 declarations, 0 contain sorry, 0 declared as axioms
Binary execution of an exact integer-weighted rejection trial
- def
OAI.ContingencyTables.ExactIntegerPrograms.weightsCodeline 13Source documentation
Fractions share the total integer weight before canonical reduction.
def weightsCode (xs : List ℕ) : List TreeFraction.Fraction := …
- def
OAI.ContingencyTables.ExactIntegerPrograms.weightsCodeRealizerline 15 - lemma
OAI.ContingencyTables.ExactIntegerPrograms.polynomial_weightsCodeline 21 - abbrev
OAI.ContingencyTables.ExactIntegerPrograms.Inputline 26 - def
OAI.ContingencyTables.ExactIntegerPrograms.choiceInputline 28 - def
OAI.ContingencyTables.ExactIntegerPrograms.choiceInputRealizerline 30 - lemma
OAI.ContingencyTables.ExactIntegerPrograms.polynomial_choiceInputline 34 - def
OAI.ContingencyTables.ExactIntegerPrograms.weightedIndexline 41Source documentation
One trial returns an index or requests another independent word. All integers are processed in binary; no weight is expanded into copies.
def weightedIndex (z : Input) : Option ℕ := …
- def
OAI.ContingencyTables.ExactIntegerPrograms.weightedIndexRealizerline 44 - lemma
OAI.ContingencyTables.ExactIntegerPrograms.polynomial_weightedIndexline 51 - lemma
OAI.ContingencyTables.ExactIntegerPrograms.weightsCode_ofFnline 66 - lemma
OAI.ContingencyTables.ExactIntegerPrograms.weightedIndex_ofFnline 72Source documentation
The compiled binary trial is exactly the integer-grid experiment.
lemma weightedIndex_ofFn {r k : ℕ} (w : Fin r → ℕ) (h : 0<totalWeight w) (hQ : totalWeight w≤2^k) (bits : Fin k → Bool) : weightedIndex (List.ofFn w,List.ofFn bits)= (weightedTrial w h hQ (FairBits.binaryWordEquiv k bits)).map Fin.val := by …Mentions: OAI.ContingencyTables.ExactIntegerPrograms.weightedIndex, OAI.ContingencyTables.FairBits.binaryWordEquiv