OAI/Combinatorics/LowSpaceSubsetSum/Streams/MergeCorrectness.lean
7 declarations, 0 contain sorry, 0 declared as axioms
Complete and stopped tournament merges
The multiset view counts every row occurrence, even when all item fields coincide. Each successful advance removes exactly the reported occurrence. A sufficiently long trace therefore enumerates the whole product stream; the potential also bounds every stopped execution's number of advances.
- def
OAI.LowSpaceSubsetSum.RowMerge.bagline 23 - theorem
OAI.LowSpaceSubsetSum.RowMerge.bag_cardline 26 - theorem
OAI.LowSpaceSubsetSum.RowMerge.replacement_bagline 29 - theorem
OAI.LowSpaceSubsetSum.RowMerge.bag_eq_zero_of_winner_noneline 57 - def
OAI.LowSpaceSubsetSum.RowMerge.traceline 71Source documentation
Analysis view of repeated advances. The program can stop between them.
def trace (key : α → ℤ) (read : σ → Option (α × σ)) : ℕ → Tournament.Tree (Front d α σ) d → List α | 0, _ => [] | k + 1, t => match advance key read t with | none => [] | some (a, t') => a :: trace key read k t'Mentions: OAI.LowSpaceSubsetSum.Tournament.Tree, OAI.LowSpaceSubsetSum.RowMerge.Front, OAI.LowSpaceSubsetSum.RowMerge.advance
- theorem
OAI.LowSpaceSubsetSum.RowMerge.trace_completeline 78 - theorem
OAI.LowSpaceSubsetSum.RowMerge.trace_length_leline 107