Theorem 5 — with costs 1 and π the steps δ_{k,k+1} − δ_{k,k} are pairwise distinct, so the set of possible steps is infinite
ProvedMasekPaterson.Necessity.steps_unboundedLet be the cost function and the infinite strings of the §4.1 example over (replacement costs , and , insertions and deletions ), and . Then:
- the horizontal steps , for , are pairwise distinct:
- the set of possible steps of (all differences of adjacent entries of the edit matrices of all pairs of strings over ) is infinite.
Part 1 shows that the edit matrix of and already contains at least different steps, so the number of distinct steps grows linearly with the string length. Part 2 is the direct contrast with the paper's Lemma 4, which shows that the set of possible steps is finite whenever the alphabet is finite and the cost set is discrete; the example meets every other condition of the paper, so discreteness cannot be dropped.
Formalization Note The paper states Theorem 5 about the running time of Algorithm Y ("Discreteness is a necessary condition for Algorithm Y to run in time on length strings and step sequences"); its proof establishes that the number of distinct steps grows linearly with the string length, which is what is stated here. Running time is not formalized.
import Mathlib import Definitions.Def_MasekPaterson_Shared_editDist import Definitions.Def_MasekPaterson_Necessity_editPaths import Definitions.Def_MasekPaterson_Necessity_example import Definitions.Def_MasekPaterson_Shared_steps open MasekPaterson.Shared
namespace MasekPaterson.Necessity
/-- Theorem 5, pinned to what its proof establishes: in the example, the horizontal steps
`δ_{k,k+1} - δ_{k,k}` (`k = 0, 1, 2, …`) are pairwise distinct, so the edit matrix of
`A^n, B^n` has at least `n` distinct steps, and the set of possible steps of the cost
function is infinite. -/
theorem steps_unbounded :
Function.Injective (fun k : ℕ => exDelta k (k + 1) - exDelta k k) ∧
¬ (possibleSteps exCost).Finite := by sorry
end MasekPaterson.Necessity
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
The statement is a conjunction of two claims about three objects defined in imported modules: (exDelta), a cost function (exCost), and a set-valued map (possibleSteps). Their definitions are in Definitions.Def_MasekPaterson_Necessity_example and Definitions.Def_MasekPaterson_Shared_steps. They were not provided to this read-back and could not be found on disk, so they cannot be unfolded here. The declaration has no explicit binders, hypotheses or typeclass assumptions. Everything it says is about these fixed objects.
- is a function taking two natural numbers and returning a value . The code alone does not show what type that value has.
- is a specific fixed object that the statement calls a cost.
- is a set. The code does not show its element type or how its membership is defined.
First claim (injectivity). Define a map on the natural numbers by
The claim is that is injective: for all , if then . Equivalently, the values are pairwise distinct. Here is whatever subtraction the value type of carries.
Second claim (infinitude). The set is not finite. In other words, it is an infinite set in the ordinary cardinality sense.
The two claims are joined only by "and". The statement does not assert that the differences belong to , or that either claim implies the other. It mentions no strings , no edit matrix, no parameter , and no count of "at least distinct steps". Any such link lives only in the unseen definitions or in the docstring, not in the asserted proposition.
Degenerate cases. There are no hypotheses, so none can be vacuous or impossible to satisfy. The quantification over includes , where . If the value type of were , subtraction would be truncated: whenever . In that case injectivity would force this to happen for at most one . Whether that case arises cannot be seen here. Likewise, whether or are built from total-function defaults (division by zero, suprema of empty sets, and so on) depends on definitions not visible to this read-back. The statement's meaning, including whether it is trivially true or false, rests entirely on those definitions.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.