OAI/Combinatorics/ContingencyTables/Sampling/ProfileRepairProgram.lean
19 declarations, 0 contain sorry, 0 declared as axioms
A polynomial binary program for the literal small-profile repair
- def
OAI.ContingencyTables.ProfilePrograms.differenceEntryline 11 - def
OAI.ContingencyTables.ProfilePrograms.differenceEntryRealizerline 14 - lemma
OAI.ContingencyTables.ProfilePrograms.polynomial_differenceEntryline 19 - def
OAI.ContingencyTables.ProfilePrograms.listDifferenceline 29Source documentation
Preserve the second list's length, including malformed inputs.
def listDifference (z : List ℕ×List ℕ) : List ℕ := …
- def
OAI.ContingencyTables.ProfilePrograms.listDifferenceRealizerline 32 - lemma
OAI.ContingencyTables.ProfilePrograms.polynomial_listDifferenceline 36 - lemma
OAI.ContingencyTables.ProfilePrograms.listDifference_ofFnline 46 - lemma
OAI.ContingencyTables.ProfilePrograms.listExchange_ofFn_natline 60Source documentation
Natural indices permit the receiver to be absent from the list.
lemma listExchange_ofFn_nat {n : ℕ} (v : Fin n → ℕ) (i j : ℕ) : listExchange (List.ofFn v,(i,j))= List.ofFn (fun a => v a+(if a.val=i then 1 else 0)-(if a.val=j then 1 else 0)) := by …Mentions: OAI.ContingencyTables.ProfilePrograms.listExchange
- abbrev
OAI.ContingencyTables.ProfilePrograms.RepairInputline 73 - def
OAI.ContingencyTables.ProfilePrograms.repairedViewsline 76Source documentation
The final pair stores the source and receiver respectively.
def repairedViews (z : RepairInput) : List ℕ×List ℕ := …
- def
OAI.ContingencyTables.ProfilePrograms.repairRowsRealizerline 80 - lemma
OAI.ContingencyTables.ProfilePrograms.polynomial_repairRowsline 86 - def
OAI.ContingencyTables.ProfilePrograms.repairedViewsRealizerline 92 - theorem
OAI.ContingencyTables.ProfilePrograms.polynomial_repairedViewsline 96 - def
OAI.ContingencyTables.SmallGraphProfiles.cellIndexline 114Source documentation
An absent large cell receives the out-of-range code
n.def cellIndex (t : I×J) : ℕ := …
- lemma
OAI.ContingencyTables.SmallGraphProfiles.cellIndex_eqline 118 - def
OAI.ContingencyTables.SmallGraphProfiles.viewListline 136 - lemma
OAI.ContingencyTables.SmallGraphProfiles.indexed_transferline 139 - theorem
OAI.ContingencyTables.SmallGraphProfiles.repairedViews_eqline 151Source documentation
The executable row transfer and complement produce exactly the graph repair, including a large crossing cell outside the stored list.
theorem repairedViews_eq (B : I → J → ℕ) (v : SmallProfile small) (s t : I×J) : repairedViews (viewList small e v false, (List.ofFn (fun i => B (e i).val.1 (e i).val.2), (cellIndex small e t,cellIndex small e (t.1,s.2))))= (viewList small e (repairedProfile small B v s t) false, viewList small e (repairedProfile small B v s t) true) := by …Mentions: OAI.ContingencyTables.SmallGraphProfiles.viewList, OAI.ContingencyTables.SmallGraphProfiles.cellIndex, OAI.ContingencyTables.SmallGraphProfiles.repairedProfile