OAI/Combinatorics/ContingencyTables/Rooted/ForestIntegerEvaluation.lean
14 declarations, 0 contain sorry, 0 declared as axioms
Integral numerators for the literal forest penalty
Cut signs and affine completion coefficients are integers in {-1,0,1}. At an integral bin corner the tree value has the single denominator B times its capacity. This identifies the integer arithmetic consumed by the executable interval-penalty program.
- def
OAI.ContingencyTables.ForestIntegerEvaluation.indicatorline 23 - def
OAI.ContingencyTables.ForestIntegerEvaluation.signline 25 - lemma
OAI.ContingencyTables.ForestIntegerEvaluation.sign_castline 28 - lemma
OAI.ContingencyTables.ForestIntegerEvaluation.selfSign_squareline 33 - def
OAI.ContingencyTables.ForestIntegerEvaluation.coefficientline 40 - lemma
OAI.ContingencyTables.ForestIntegerEvaluation.coefficient_castline 44 - def
OAI.ContingencyTables.ForestIntegerEvaluation.smallContributionline 58 - lemma
OAI.ContingencyTables.ForestIntegerEvaluation.smallContribution_castline 64 - def
OAI.ContingencyTables.ForestIntegerEvaluation.offsetline 76 - lemma
OAI.ContingencyTables.ForestIntegerEvaluation.offset_castline 80 - def
OAI.ContingencyTables.ForestIntegerEvaluation.numeratorline 91 - theorem
OAI.ContingencyTables.ForestIntegerEvaluation.numerator_divline 100Source documentation
The exact affine tree value is a signed integral numerator divided by the explicit natural denominator, even when the original margins have very large binary representations.
theorem numerator_div (A : Instance I J) (C : ℕ) (hC : 0<C) (t : TreeCell A.T) (x q : I → J → ℤ) (v : FreeCell A.small A.T → ℕ) : (numerator A C t x q v:ℚ)/ ((rationalBinWidth A C:ℚ)*A.b t.val.1 t.val.2)= rationalScaledTree A C x q (fun f => (v f:ℚ)) t := by …Mentions: OAI.ContingencyTables.ForestIntegerEvaluation.numerator
- def
OAI.ContingencyTables.ForestIntegerEvaluation.treeDataline 128 - theorem
OAI.ContingencyTables.ForestIntegerEvaluation.treeData_valueline 135Source documentation
Each summand of the literal rational forest penalty is exactly the output of the compiled nonnegative interval-arithmetic routine.
theorem treeData_value (A : Instance I J) (C : ℕ) (hC : 0<C) (t : TreeCell A.T) (x q : I → J → ℤ) (v : FreeCell A.small A.T → ℕ) : MatchingFPRAS.TreeFraction.val (RationalIntervalProgram.intervalCode (treeData A C t x q v))= max 0 (max (-rationalScaledTree A C x q (fun f => (v f:ℚ)) t) (rationalScaledTree A C x q (fun f => (v f:ℚ)) t-1)) := by …Mentions: OAI.MatchingFPRAS.TreeFraction.val, OAI.ContingencyTables.RationalIntervalProgram.intervalCode, OAI.ContingencyTables.ForestIntegerEvaluation.treeData