OAI/Computability/Superstring/Tables.lean
38 declarations, 0 contain sorry, 0 declared as axioms
- theorem
OAI.Superstring.Computable.stage_zeroline 9 - theorem
OAI.Superstring.Computable.input_stage_boundline 20 - def
OAI.Superstring.Computable.stageTableline 28 - theorem
OAI.Superstring.Computable.lookup_stageTableline 31 - def
OAI.Superstring.Computable.rawCountStepline 40Source documentation
Only finite materialized tables are passed between consecutive iterations.
def rawCountStep (q : List (List α) × Table α) : List (List α) × Table α := …
Mentions: OAI.Superstring.Computable.Table
- def
OAI.Superstring.Computable.initialTableline 43 - theorem
OAI.Superstring.Computable.rawCountStep_stageline 45 - theorem
OAI.Superstring.Computable.iterate_rawCountStepline 58 - def
OAI.Superstring.Computable.countCapline 68Source documentation
A proved polynomial workspace guard. The cap is part of the implemented loop; the mathematical bound proves it never fires on an actual input.
def countCap (S : List (List α)) : ℕ := …
- def
OAI.Superstring.Computable.countDepthline 71 - def
OAI.Superstring.Computable.computeCountsline 74 - theorem
OAI.Superstring.Computable.stageTable_sizeline 77 - theorem
OAI.Superstring.Computable.computeCounts_eqline 90 - theorem
OAI.Superstring.Computable.lookup_computeCountsline 99 - theorem
OAI.Superstring.Computable.poly_initialTableline 108 - theorem
OAI.Superstring.Computable.poly_rawCountStepline 112 - theorem
OAI.Superstring.Computable.poly_countCapline 117 - theorem
OAI.Superstring.Computable.poly_countDepthline 122 - theorem
OAI.Superstring.Computable.poly_computeCountsline 128 - def
OAI.Superstring.PrefixGreedy.Capacityline 139 - theorem
OAI.Superstring.PrefixGreedy.exists_supplyline 143 - theorem
OAI.Superstring.PrefixGreedy.capacity_eraseline 153Source documentation
Deleting a longest request and any of its extensions preserves all subtree capacities.
theorem capacity_erase {req : β → List α} {sup : γ → List α} {R : Finset β} {S : Finset γ} (h : Capacity req sup R S) {a : β} {b : γ} (ha : a ∈ R) (hb : b ∈ S) (hm : ∀ r ∈ R, (req r).length ≤ (req a).length) (hp : req a <+: sup b) : Capacity req sup (R.erase a) (S.erase b) := by …Mentions: OAI.Superstring.PrefixGreedy.Capacity
- abbrev
OAI.Superstring.PrefixGreedy.Tokenline 182 - def
OAI.Superstring.PrefixGreedy.preferline 184 - def
OAI.Superstring.PrefixGreedy.largestline 186 - theorem
OAI.Superstring.PrefixGreedy.fold_preferline 188 - theorem
OAI.Superstring.PrefixGreedy.largest_specline 209 - def
OAI.Superstring.PrefixGreedy.prefixBline 221 - def
OAI.Superstring.PrefixGreedy.removeline 223 - theorem
OAI.Superstring.PrefixGreedy.mem_removeline 226 - theorem
OAI.Superstring.PrefixGreedy.toFinset_removeline 229 - def
OAI.Superstring.PrefixGreedy.extensionline 233 - theorem
OAI.Superstring.PrefixGreedy.extension_specline 236 - abbrev
OAI.Superstring.PrefixGreedy.Stateline 252 - def
OAI.Superstring.PrefixGreedy.stepline 254 - theorem
OAI.Superstring.PrefixGreedy.remove_nodupline 265 - theorem
OAI.Superstring.PrefixGreedy.remove_permline 268 - theorem
OAI.Superstring.PrefixGreedy.iterate_correctline 282Source documentation
The explicit greedy loop returns a complete matching, with no search over permutations.
theorem iterate_correct (n : ℕ) (R S : List (Token α)) (P : List (Token α × Token α)) (hR : R.Nodup) (hS : S.Nodup) (hc : Capacity Prod.snd Prod.snd R.toFinset S.toFinset) (hlen : R.length = S.length) (hn : R.length ≤ n) (hP : ∀ p ∈ P, p.1.2 <+: p.2.2) : let q := step^[n] (R,S,P) …Mentions: OAI.Superstring.PrefixGreedy.Token, OAI.Superstring.PrefixGreedy.Capacity, OAI.Superstring.PrefixGreedy.step