OAI/Combinatorics/EditApproximation/Probability/ExactSuffixDPWork.lean
21 declarations, 0 contain sorry, 0 declared as axioms
A costed implementation of the exact cut dynamic program. The counter counts symbol comparisons and list-cell visits, with explicit outer-loop overhead. Each counted transition uses a fixed number of word operations; the surrounding RAM realization supplies that constant. Suffix lookups and occurrence scans are charged rather than treated as constant-time arrays.
- theorem
OAI.EditApproximation.dpLength_specline 25 - theorem
OAI.EditApproximation.dpDrop_specline 32 - theorem
OAI.EditApproximation.dpTake_specline 43 - theorem
OAI.EditApproximation.dpGetD_specline 55 - theorem
OAI.EditApproximation.dpMember_specline 66 - theorem
OAI.EditApproximation.dpSingleton_specline 79 - theorem
OAI.EditApproximation.dpMinimum_specline 93 - theorem
OAI.EditApproximation.dpCandidate_valueline 103 - theorem
OAI.EditApproximation.dpCandidate_workline 110 - theorem
OAI.EditApproximation.nat_pair_sum_boundline 126 - theorem
OAI.EditApproximation.dpCell_valueline 139 - theorem
OAI.EditApproximation.dpCell_workline 148 - theorem
OAI.EditApproximation.chargedSuffixDP_valueline 170 - theorem
OAI.EditApproximation.chargedSuffixDP_workline 177 - theorem
OAI.EditApproximation.chargedSuffixDP_storageline 205Source documentation
Every retained row has linear length, and every stored distance fits the input length bound; the traversal counter is polynomial even with lists.
theorem chargedSuffixDP_storage {α : Type*} [DecidableEq α] (source target : List α) (N : ℕ) (hsize : source.length + target.length ≤ N) : (chargedSuffixDP source target).1.length ≤ N + 1 ∧ (∀ j ≤ target.length, (chargedSuffixDP source target).1.getD j 0 ≤ N) ∧ (chargedSuffixDP source target).2 ≤ 50 * (N + 1) ^ 4 := by …Mentions: OAI.EditApproximation.chargedSuffixDP
- theorem
OAI.EditApproximation.dpTake_allocationline 226 - theorem
OAI.EditApproximation.dpCandidate_allocationline 237 - theorem
OAI.EditApproximation.nat_list_sum_monoline 244 - theorem
OAI.EditApproximation.dpCell_allocationline 258Source documentation
Candidate pairs, natural candidate values, the index range and prefix lists are counted as materialized cells. The fallback prefix is retained.
theorem dpCell_allocation {α : Type*} [DecidableEq α] (a : α) (target : List α) (previous : List ℕ) (j : ℕ) : dpCellAllocation target j ≤ (dpCell a target previous j).2 := by …Mentions: OAI.EditApproximation.dpCellAllocation, OAI.EditApproximation.dpCell
- theorem
OAI.EditApproximation.suffixDPAllocation_le_workline 273Source documentation
Total materialized list cells over the whole run. This also bounds the simultaneously live materialized cells under any deallocation policy.
theorem suffixDPAllocation_le_work {α : Type*} [DecidableEq α] (source target : List α) : suffixDPAllocation source target ≤ (chargedSuffixDP source target).2 := by …Mentions: OAI.EditApproximation.suffixDPAllocation, OAI.EditApproximation.chargedSuffixDP
- theorem
OAI.EditApproximation.suffixDPAllocation_polynomialline 291