ComparatorChallenges/EditDistance.lean

GitHub source file

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

  1. inductive OAI.EditDistortion.Step A single unit-cost insertion, deletion, or (when enabled) substitution line 10

    Source documentation

    A single unit-cost insertion, deletion, or (when enabled) substitution.

    L4DEL explanation

    A single unit-cost insertion, deletion, or (when enabled) substitution.

    1. 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. -/
  2. inductive OAI.EditDistortion.Script An unrestricted script of exactly n unit edits line 17

    Source documentation

    An unrestricted script of exactly n unit edits.

    L4DEL explanation

    An unrestricted script of exactly n unit edits.

    1. 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

  3. def OAI.EditDistortion.edit Minimum script length line 23

    Source 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).

    1. 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) : ℕ :=
    …
  4. abbrev OAI.EditDistortion.L1 line 26

    Also declared: OAI/Combinatorics/EditDistance/Model.lean:20 (same declaration text).

  5. def OAI.EditDistortion.distortion The product of the two maximal distance ratios line 29

    Source documentation

    The product of the two maximal distance ratios.

    L4DEL explanation

    The product of the two maximal distance ratios.

    1. 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

  6. def OAI.EditDistortion.leastDistortion The infimum over injective maps to real absolutely summable sequences line 34

    Source documentation

    The infimum over injective maps to real absolutely summable sequences.

    L4DEL explanation

    The infimum over injective maps to real absolutely summable sequences.

    1. 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 → ℝ) : ℝ :=
    …
  7. abbrev OAI.EditDistortion.Words line 37

    Also declared: OAI/Combinatorics/EditDistance/Model.lean:31 (same declaration text).

  8. def OAI.EditDistortion.E line 39

    Also declared: OAI/Combinatorics/EditDistance/Model.lean:33 (same declaration text).

  9. def OAI.EditDistortion.exponentScale line 42

    Also declared: OAI/Combinatorics/EditDistance/Model.lean:36 (same declaration text).

  10. def OAI.EditDistortion.alphabetSup Supremum over finite alphabet cardinalities line 46

    Source documentation

    Supremum over finite alphabet cardinalities.

    L4DEL explanation

    Supremum over finite alphabet cardinalities.

    1. 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 : ℕ) : ℝ :=
    …
  11. def OAI.EditDistortion.BinaryWitness A finite nonempty subset of binary words of one common length line 50

    Source 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.

    1. 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 :=
    …
  12. def OAI.EditDistortion.MainClaim Uniform two-sided bounds with common positive constants and threshold line 56

    Source documentation

    Uniform two-sided bounds with common positive constants and threshold.

    L4DEL explanation

    Uniform two-sided bounds with common positive constants and threshold.

    1. 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 :=
    …
  13. theorem OAI.edit_distance_main Challenge statement: Matching exponential-scale bounds for edit-distance distortion sorry line 67

    L4DEL explanation

    This declaration is an exact comparator-selected statement. Read the Lean statement below for its mathematical content.

    1. The linked formalization note covers 4 distinct comparator results, so its combined Scope prose is not copied onto this declaration.
    2. 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
    …