Lemma 4 — discrete costs give finitely many possible steps
ProvedMasekPaterson.FourRussians.possibleSteps_finiteLet be a finite alphabet and a nonnegative cost function whose cost set is discrete, i.e. there is such that every element of is an integral multiple of . Then the set of possible steps
taken over all strings and all adjacent pairs of entries of their edit matrices, is finite.
This is what makes the precomputation of Algorithm Y finite: its table ranges over pairs of length- strings and pairs of length- vectors of possible steps, a set whose size does not depend on the strings being compared.
Formalization Note Normalization of is not assumed. Steps on the boundary row and column of the matrix are included in the set.
import Mathlib import Definitions.Def_MasekPaterson_Shared_editDist import Definitions.Def_MasekPaterson_Shared_steps open MasekPaterson.Shared
namespace MasekPaterson.FourRussians
/-- Lemma 4: over a finite alphabet, if the set `Ω` of edit costs is discrete then the set
of possible steps in edit matrices is finite. -/
theorem possibleSteps_finite {α : Type*} [Fintype α] (γ : EditOp α → ℝ) (hγ : ∀ o, 0 ≤ γ o)
(hΩ : IsDiscrete γ) :
(possibleSteps γ).Finite := by sorry
end MasekPaterson.FourRussians
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Let be a finite type and a real-valued cost function on edit operations over (a type defined in the imported shared file). There are two assumptions:
- for every edit operation ;
- satisfies the imported predicate
IsDiscrete, whose definition is not reproduced here.
No normalisation hypothesis is present. The conclusion is that the set is finite. This set is imported from the shared steps file and its definition is not shown; the docstring describes it as the set of possible steps in edit matrices. What exactly is being bounded, and what IsDiscrete requires, therefore depends entirely on the imported definitions.
In the degenerate cases:
- empty. The only strings are empty, and the claim reduces to whatever means over an empty alphabet.
IsDiscreteunsatisfiable. If it could not be satisfied together with nonnegativity, the statement would be vacuous. This cannot be judged from the code shown.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.