ComparatorChallenges/EditDistance.lean
Explanation legend Lean4 Domain Explanation Language (L4DEL)
L4DEL explanations are a separate layer. They do not change the Lean source. Intuition is explanatory prose; numbered items are a reading path; sources link the wording back to evidence.
- L4DEL
- Lean4 Domain Explanation Language
Credit: OpenAI's pinned repository says an unreleased internal model produced the manuscripts and supporting proof artifacts. The collection builds on the mathematics community's accumulated problems, results, language, and formal libraries; each manuscript's BibTeX and bibliography are the authority for individual scholarly credit.
Project sources: Pinned openai/math documentation, Pinned formalization catalogue
13 declarations, 1 contain sorry, 0 declared as axioms
- inductive
OAI.EditDistortion.StepA single unit-cost insertion, deletion, or (when enabled) substitution line 10Source documentation
A single unit-cost insertion, deletion, or (when enabled) substitution.
L4DEL explanation
A single unit-cost insertion, deletion, or (when enabled) substitution.
- This explanation is a condensed rendering of the declaration's own doc comment at the pinned source commit; consult the exact Lean statement below for authority.
Sources and attribution: Pinned Lean source (fd4aeeb2ee4f)
Also declared: ComparatorChallenges/EditApproximation.lean:10791 (same declaration text), OAI/Combinatorics/EditApproximation/Definitions.lean:10791 (same declaration text).
inductive Step (substitutions : Bool) {Alpha : Type u} : List Alpha → List Alpha → Prop | insert (p q : List Alpha) (a : Alpha) : Step substitutions (p ++ q) (p ++ a :: q) | delete (p q : List Alpha) (a : Alpha) : Step substitutions (p ++ a :: q) (p ++ q) | substitute (h : substitutions = true) (p q : List Alpha) (a b : Alpha) : Step substitutions (p ++ a :: q) (p ++ b :: q) /-- An unrestricted script of exactly n unit edits. -/ - inductive
OAI.EditDistortion.ScriptAn unrestricted script of exactly n unit edits line 17Source documentation
An unrestricted script of exactly n unit edits.
L4DEL explanation
An unrestricted script of exactly n unit edits.
- This explanation is a condensed rendering of the declaration's own doc comment at the pinned source commit; consult the exact Lean statement below for authority.
Sources and attribution: Pinned Lean source (fd4aeeb2ee4f)
Distinct definitions of this name: ComparatorChallenges/EditApproximation.lean:10797 (different declaration text), OAI/Combinatorics/EditApproximation/Definitions.lean:10797 (different declaration text). Qualify references as OAI.EditDistortion.Script@path.
inductive Script (substitutions : Bool) {Alpha : Type u} : ℕ → List Alpha → List Alpha → Prop | nil (x : List Alpha) : Script substitutions 0 x x | cons {n : ℕ} {x y z : List Alpha} (first : Step substitutions x y) (rest : Script substitutions n y z) : Script substitutions (n + 1) x z /-- Minimum script length. Scripts always exist (delete x and insert y). -/Mentions: OAI.EditDistortion.Step
- def
OAI.EditDistortion.editMinimum script length line 23Source documentation
Minimum script length. Scripts always exist (delete x and insert y).
L4DEL explanation
Minimum script length. Scripts always exist (delete x and insert y).
- This explanation is a condensed rendering of the declaration's own doc comment at the pinned source commit; consult the exact Lean statement below for authority.
Sources and attribution: Pinned Lean source (fd4aeeb2ee4f)
Also declared: ComparatorChallenges/EditApproximation.lean:10802 (same declaration text), OAI/Combinatorics/EditApproximation/Definitions.lean:10802 (same declaration text).
noncomputable def edit {Alpha : Type u} (x y : List Alpha) : ℕ := … - abbrev
OAI.EditDistortion.L1line 26Also declared: OAI/Combinatorics/EditDistance/Model.lean:20 (same declaration text).
- def
OAI.EditDistortion.distortionThe product of the two maximal distance ratios line 29Source documentation
The product of the two maximal distance ratios.
L4DEL explanation
The product of the two maximal distance ratios.
- This explanation is a condensed rendering of the declaration's own doc comment at the pinned source commit; consult the exact Lean statement below for authority.
Sources and attribution: Pinned Lean source (fd4aeeb2ee4f)
Also declared: OAI/Combinatorics/EditDistance/Model.lean:23 (same declaration text).
noncomputable def distortion {X : Type u} (ρ : X → X → ℝ) (f : X ↪ L1) : ℝ := …Mentions: OAI.EditDistortion.L1
- def
OAI.EditDistortion.leastDistortionThe infimum over injective maps to real absolutely summable sequences line 34Source documentation
The infimum over injective maps to real absolutely summable sequences.
L4DEL explanation
The infimum over injective maps to real absolutely summable sequences.
- This explanation is a condensed rendering of the declaration's own doc comment at the pinned source commit; consult the exact Lean statement below for authority.
Sources and attribution: Pinned Lean source (fd4aeeb2ee4f)
Also declared: OAI/Combinatorics/EditDistance/Model.lean:28 (same declaration text).
noncomputable def leastDistortion {X : Type u} (ρ : X → X → ℝ) : ℝ := … - abbrev
OAI.EditDistortion.Wordsline 37Also declared: OAI/Combinatorics/EditDistance/Model.lean:31 (same declaration text).
- def
OAI.EditDistortion.Eline 39Also declared: OAI/Combinatorics/EditDistance/Model.lean:33 (same declaration text).
- def
OAI.EditDistortion.exponentScaleline 42Also declared: OAI/Combinatorics/EditDistance/Model.lean:36 (same declaration text).
- def
OAI.EditDistortion.alphabetSupSupremum over finite alphabet cardinalities line 46Source documentation
Supremum over finite alphabet cardinalities.
L4DEL explanation
Supremum over finite alphabet cardinalities.
- This explanation is a condensed rendering of the declaration's own doc comment at the pinned source commit; consult the exact Lean statement below for authority.
Sources and attribution: Pinned Lean source (fd4aeeb2ee4f)
Also declared: OAI/Combinatorics/EditDistance/Model.lean:40 (same declaration text).
noncomputable def alphabetSup (d : ℕ) : ℝ := …
- def
OAI.EditDistortion.BinaryWitnessA finite nonempty subset of binary words of one common length line 50Source documentation
A finite nonempty subset of binary words of one common length.
L4DEL explanation
A finite nonempty subset of binary words of one common length.
- This explanation is a condensed rendering of the declaration's own doc comment at the pinned source commit; consult the exact Lean statement below for authority.
Sources and attribution: Pinned Lean source (fd4aeeb2ee4f)
Also declared: OAI/Combinatorics/EditDistance/Model.lean:44 (same declaration text).
def BinaryWitness (c : ℝ) (d : ℕ) : Prop := …
- def
OAI.EditDistortion.MainClaimUniform two-sided bounds with common positive constants and threshold line 56Source documentation
Uniform two-sided bounds with common positive constants and threshold.
L4DEL explanation
Uniform two-sided bounds with common positive constants and threshold.
- This explanation is a condensed rendering of the declaration's own doc comment at the pinned source commit; consult the exact Lean statement below for authority.
Sources and attribution: Pinned Lean source (fd4aeeb2ee4f)
Also declared: OAI/Combinatorics/EditDistance/Model.lean:50 (same declaration text).
def MainClaim : Prop := …
- theorem
OAI.edit_distance_mainChallenge statement: Matching exponential-scale bounds for edit-distance distortion sorry line 67L4DEL explanation
This declaration is an exact comparator-selected statement. Read the Lean statement below for its mathematical content.
- The linked formalization note covers 4 distinct comparator results, so its combined Scope prose is not copied onto this declaration.
- The repository's comparator configuration selects OAI.Combinatorics.EditDistance.Main as the released solution module checked against this declaration.
Sources and attribution: Pinned Lean source (fd4aeeb2ee4f)
Distinct definitions of this name: OAI/Combinatorics/EditDistance/Main.lean:13 (same statement text; different proof or body). Qualify references as OAI.edit_distance_main@path.
theorem edit_distance_main : EditDistortion.MainClaim.{u} := by …