OAI/Combinatorics/ContingencyTables/Transport/MeasuredMap.lean
5 declarations, 0 contain sorry, 0 declared as axioms
Costs for mapping cached computations over a finite list
- lemma
OAI.ContingencyTables.MeasuredMap.mapStep_costline 14Source documentation
The map accumulator adds linear copying overhead to one call of the underlying computation. Its cost may use an external finite-box measure.
lemma mapStep_cost {f : A×B → C} (F : Realizer f) (a : A) (b : B) (cs : List C) : (mapStepRealizer F).cost (b,(a,cs)) ≤ F.cost (a,b)+500*(weight a+weight b+weight cs+weight (f (a,b))+1) := by … - def
OAI.ContingencyTables.MeasuredMap.listMeasureline 21 - def
OAI.ContingencyTables.MeasuredMap.foldMeasureline 24 - lemma
OAI.ContingencyTables.MeasuredMap.measure_entryline 27 - lemma
OAI.ContingencyTables.MeasuredMap.work_mapWithline 35Source documentation
Mapping a finite list costs a polynomial in its encoded size and in the sum of the work measures of its individual cached computations.
lemma work_mapWith {f : A×B → C} (F : Realizer f) (μ : A×B → ℕ) (hF : WorkBound F μ) : WorkBound (mapWith F) (listMeasure μ) := by …