OAI/Combinatorics/ContingencyTables/Transport/RowColumnPenalties.lean
22 declarations, 0 contain sorry, 0 declared as axioms
Literal doubled row and column penalties
The false coordinate of a cell is its row value x. Its true coordinate is y, with physical column value q=B-y. Thus row and column factor groups are disjoint, while their small-cell subsets are nested inside them. Offsets below are the actual full margins and capacity sums of the paper.
- def
OAI.ContingencyTables.RowColumnPenalties.cellLineline 23 - def
OAI.ContingencyTables.RowColumnPenalties.smallCoordinateline 25 - def
OAI.ContingencyTables.RowColumnPenalties.rowViewline 27 - def
OAI.ContingencyTables.RowColumnPenalties.columnViewline 28 - def
OAI.ContingencyTables.RowColumnPenalties.columnCapacityline 31 - def
OAI.ContingencyTables.RowColumnPenalties.smallColumnCapacityline 32 - def
OAI.ContingencyTables.RowColumnPenalties.fullOffsetline 35 - def
OAI.ContingencyTables.RowColumnPenalties.viewSlopeline 38 - def
OAI.ContingencyTables.RowColumnPenalties.smallOffsetline 40 - lemma
OAI.ContingencyTables.RowColumnPenalties.lineTotal_rowline 44 - lemma
OAI.ContingencyTables.RowColumnPenalties.lineTotal_columnline 50 - lemma
OAI.ContingencyTables.RowColumnPenalties.smallTotal_rowline 54 - lemma
OAI.ContingencyTables.RowColumnPenalties.smallTotal_columnline 60 - lemma
OAI.ContingencyTables.RowColumnPenalties.columnViews_addline 67 - lemma
OAI.ContingencyTables.RowColumnPenalties.smallColumnViews_addline 77 - lemma
OAI.ContingencyTables.RowColumnPenalties.full_affine_rowline 90 - lemma
OAI.ContingencyTables.RowColumnPenalties.full_affine_columnline 98 - lemma
OAI.ContingencyTables.RowColumnPenalties.small_affine_rowline 109 - lemma
OAI.ContingencyTables.RowColumnPenalties.small_affine_columnline 118 - theorem
OAI.ContingencyTables.RowColumnPenalties.penalty_eqline 134Source documentation
This is exactly the manuscript's full row/column deviation plus its small residual violation penalty, on the actual doubled physical box.
theorem penalty_eq (small : I → J → Bool) (B : I → J → ℕ) (r cR : I → ℕ) (c cC : J → ℕ) (z : ((I × J) × Bool) → ℕ) (hz : InBox (fun u => B u.1.1 u.1.2) z) : penalty cellLine (smallCoordinate small) (fullOffset B cR cC) viewSlope (smallOffset small B r c) viewSlope z = (∑ i, |((∑ j, rowView z i j):ℝ)-cR i|)+ (∑ j, |((∑ i, columnView B z i j):ℝ)-cC j|)+ (∑ i, max (((∑ j, if small i j then rowView z i j else 0):ℝ)-r i) 0)+ (∑ j, max (((∑ i, if small i j then columnView B z i j else 0):ℝ)-c j) 0) := by …Mentions: OAI.ContingencyTables.RowColumnPenalties.cellLine, OAI.ContingencyTables.RowColumnPenalties.smallCoordinate, OAI.ContingencyTables.RowColumnPenalties.fullOffset, OAI.ContingencyTables.RowColumnPenalties.viewSlope, OAI.ContingencyTables.RowColumnPenalties.smallOffset, OAI.ContingencyTables.RowColumnPenalties.rowView, OAI.ContingencyTables.RowColumnPenalties.columnView
- def
OAI.ContingencyTables.RowColumnPenalties.FullConditionsline 149 - theorem
OAI.ContingencyTables.RowColumnPenalties.penalty_zero_iffline 158Source documentation
Zero penalty means precisely the enlarged full margins and nonnegative original residuals, even for unbalanced defect profiles.
theorem penalty_zero_iff (small : I → J → Bool) (B : I → J → ℕ) (r rbar : I → ℕ) (c cbar : J → ℕ) (z : ((I × J) × Bool) → ℕ) (hz : InBox (fun u => B u.1.1 u.1.2) z) : penalty cellLine (smallCoordinate small) (fullOffset B rbar cbar) viewSlope (smallOffset small B r c) viewSlope z=0 ↔ FullConditions small B r rbar c cbar z := by …Mentions: OAI.ContingencyTables.RowColumnPenalties.cellLine, OAI.ContingencyTables.RowColumnPenalties.smallCoordinate, OAI.ContingencyTables.RowColumnPenalties.fullOffset, OAI.ContingencyTables.RowColumnPenalties.viewSlope, OAI.ContingencyTables.RowColumnPenalties.smallOffset, OAI.ContingencyTables.RowColumnPenalties.FullConditions