OAI/Combinatorics/ContingencyTables/Sampling/RepairResiduals.lean
10 declarations, 0 contain sorry, 0 declared as axioms
Original residual bounds are preserved by the literal repair
Only a small source entry is lowered. Every large entry is unchanged or increased. Since full row and column-view totals are preserved, the small row/column sums cannot increase.
- def
OAI.ContingencyTables.largeRowline 20 - def
OAI.ContingencyTables.smallColumnViewline 23 - def
OAI.ContingencyTables.largeColumnViewline 26 - lemma
OAI.ContingencyTables.row_small_largeline 30 - lemma
OAI.ContingencyTables.column_small_largeline 39 - lemma
OAI.ContingencyTables.repairMatrix_largeline 48 - theorem
OAI.ContingencyTables.repairMatrix_small_sumsline 68Source documentation
This covers small and large receivers and the two possible receiver coincidences without a special case in the residual calculation.
theorem repairMatrix_small_sums {small : I → J → Bool} {x q : I → J → ℕ} {s t : I×J} (h : IsDefect x q s t) (hs : small s.1 s.2=true) (ht : small t.1 t.2=true) : (∀ i, smallRow small (repairMatrix x s t) i ≤ smallRow small x i) ∧ (∀ j, smallColumnView small (repairMatrix x s t) j ≤ smallColumnView small q j) := by …Mentions: OAI.ContingencyTables.IsDefect, OAI.ContingencyTables.repairMatrix, OAI.ContingencyTables.smallColumnView
- lemma
OAI.ContingencyTables.entry_le_smallRowline 102 - lemma
OAI.ContingencyTables.entry_le_smallColumnline 109 - theorem
OAI.ContingencyTables.repairMatrix_small_capacityline 117Source documentation
Every repaired small cell respects the manuscript's actual U box, because one of its original incident margins is strictly below U.
theorem repairMatrix_small_capacity {x q : I → J → ℕ} {s t : I×J} (r : I → ℕ) (c : J → ℕ) (U : ℕ) (h : IsDefect x q s t) (hs : firstPaperSmall r c U s.1 s.2=true) (ht : firstPaperSmall r c U t.1 t.2=true) (hr : ∀ i, smallRow (firstPaperSmall r c U) x i ≤ r i) (hc : ∀ j, smallColumnView (firstPaperSmall r c U) q j ≤ c j) (i : I) (j : J) (hij : firstPaperSmall r c U i j=true) : repairMatrix x s t i j < U := by …Mentions: OAI.ContingencyTables.IsDefect, OAI.ContingencyTables.smallColumnView, OAI.ContingencyTables.repairMatrix