OAI/Combinatorics/ContingencyTables/Sampling/ExactIntegerChoice.lean
13 declarations, 0 contain sorry, 0 declared as axioms
Exact integer-weighted choice for the residual correction branch
- def
OAI.ContingencyTables.ExactIntegerChoice.totalWeightline 15 - def
OAI.ContingencyTables.ExactIntegerChoice.normalizedline 17 - def
OAI.ContingencyTables.ExactIntegerChoice.prefixWeightline 19 - lemma
OAI.ContingencyTables.ExactIntegerChoice.normalized_nonnegativeline 21 - lemma
OAI.ContingencyTables.ExactIntegerChoice.normalized_totalline 25 - lemma
OAI.ContingencyTables.ExactIntegerChoice.cumulative_normalizedline 29 - lemma
OAI.ContingencyTables.ExactIntegerChoice.grid_scaled_cumulativeline 36 - theorem
OAI.ContingencyTables.ExactIntegerChoice.integer_choice_exactline 43Source documentation
On the integer grid with size equal to the total weight, the cumulative selector has exactly the desired rational law, with no approximation.
theorem integer_choice_exact (h : 0<totalWeight w) (i : Fin r) : outputLaw (normalized w) (normalized_total w h) h i=normalized w i := by …Mentions: OAI.ContingencyTables.ExactIntegerChoice.totalWeight, OAI.ContingencyTables.ExactIntegerChoice.normalized, OAI.ContingencyTables.ExactIntegerChoice.normalized_total
- def
OAI.ContingencyTables.ExactIntegerChoice.intervalTrialline 58Source documentation
One bounded trial rejects only the unused terminal indices.
def intervalTrial {V Q : ℕ} (_h : V≤Q) (j : Fin Q) : Option (Fin V) := … - lemma
OAI.ContingencyTables.ExactIntegerChoice.intervalTrial_eq_someline 61 - lemma
OAI.ContingencyTables.ExactIntegerChoice.intervalTrial_massline 71 - def
OAI.ContingencyTables.ExactIntegerChoice.weightedTrialline 79Source documentation
A rational choice with integer weights, after a single binary rejection trial. The sum of these masses is totalWeight / 2^k.
def weightedTrial (h : 0<totalWeight w) {Q : ℕ} (hQ : totalWeight w≤Q) (j : Fin Q) : Option (Fin r) := …Mentions: OAI.ContingencyTables.ExactIntegerChoice.totalWeight
- lemma
OAI.ContingencyTables.ExactIntegerChoice.weightedTrial_massline 83