OAI/Combinatorics/ContingencyTables/Rooted/ForestAffineProgram.lean
25 declarations, 0 contain sorry, 0 declared as axioms
Binary list evaluation of the forest's signed affine numerators
Each coefficient is stored by its nonnegative and nonpositive parts. The program performs two finite product sums and passes their difference to the proved interval-cost routine. Large capacities are never iterated.
- abbrev
OAI.ContingencyTables.ForestAffineProgram.Termline 18 - abbrev
OAI.ContingencyTables.ForestAffineProgram.Inputline 19 - def
OAI.ContingencyTables.ForestAffineProgram.positiveTermline 21 - def
OAI.ContingencyTables.ForestAffineProgram.negativeTermline 22 - def
OAI.ContingencyTables.ForestAffineProgram.positiveTermRealizerline 24 - def
OAI.ContingencyTables.ForestAffineProgram.negativeTermRealizerline 28 - lemma
OAI.ContingencyTables.ForestAffineProgram.polynomial_positiveTermline 32 - lemma
OAI.ContingencyTables.ForestAffineProgram.polynomial_negativeTermline 36 - def
OAI.ContingencyTables.ForestAffineProgram.positiveSumRealizerline 40 - def
OAI.ContingencyTables.ForestAffineProgram.negativeSumRealizerline 43 - lemma
OAI.ContingencyTables.ForestAffineProgram.polynomial_positiveSumline 46 - lemma
OAI.ContingencyTables.ForestAffineProgram.polynomial_negativeSumline 49 - def
OAI.ContingencyTables.ForestAffineProgram.partsline 52 - def
OAI.ContingencyTables.ForestAffineProgram.partsRealizerline 55 - lemma
OAI.ContingencyTables.ForestAffineProgram.polynomial_partsline 62 - def
OAI.ContingencyTables.ForestAffineProgram.evaluateline 73 - def
OAI.ContingencyTables.ForestAffineProgram.evaluateRealizerline 76 - theorem
OAI.ContingencyTables.ForestAffineProgram.polynomial_evaluateline 80 - def
OAI.ContingencyTables.ForestAffineProgram.signedPartsline 84 - lemma
OAI.ContingencyTables.ForestAffineProgram.signedParts_subline 86 - def
OAI.ContingencyTables.ForestAffineProgram.dataline 93 - lemma
OAI.ContingencyTables.ForestAffineProgram.parts_dataline 96 - theorem
OAI.ContingencyTables.ForestAffineProgram.evaluate_dataline 109Source documentation
All signs and products in an affine tree term are executed in binary; the resulting fraction is its exact interval penalty.
theorem evaluate_data (offset : ℤ) (coefficient : Fin q → ℤ) (v : Fin q → ℕ) (den : ℕ) (hd : 0<den) : TreeFraction.val (evaluate (data offset coefficient v den))= max 0 (max (-(((offset:ℚ)+∑ i,(coefficient i:ℚ)*(v i:ℚ))/den)) (((offset:ℚ)+∑ i,(coefficient i:ℚ)*(v i:ℚ))/den-1)) := by …Mentions: OAI.ContingencyTables.ForestAffineProgram.evaluate, OAI.ContingencyTables.ForestAffineProgram.data
- def
OAI.ContingencyTables.ForestAffineProgram.forestDataline 132 - theorem
OAI.ContingencyTables.ForestAffineProgram.evaluate_forestline 142Source documentation
This input is the literal cut-derived affine form of the manuscript. The executable value is its exact contribution to the softened penalty.
theorem evaluate_forest (A : Instance I J) (C : ℕ) (hC : 0<C) (t : TreeCell A.T) (x y : I → J → ℤ) (e : Fin q ≃ FreeCell A.small A.T) (v : FreeCell A.small A.T → ℕ) : TreeFraction.val (evaluate (forestData A C t x y e v))= max 0 (max (-rationalScaledTree A C x y (fun f => (v f:ℚ)) t) (rationalScaledTree A C x y (fun f => (v f:ℚ)) t-1)) := by …Mentions: OAI.ContingencyTables.ForestAffineProgram.evaluate, OAI.ContingencyTables.ForestAffineProgram.forestData