ComparatorChallenges/Superstring.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

11 declarations, 1 contain sorry, 0 declared as axioms

  1. abbrev OAI.Superstring.Symbol line 7

    Also declared: OAI/Computability/Superstring/Model.lean:7 (same declaration text).

  2. abbrev OAI.Superstring.Word line 8

    Also declared: OAI/Computability/Superstring/Model.lean:8 (same declaration text).

  3. abbrev OAI.Superstring.Instance line 9

    Also declared: OAI/Computability/Superstring/Model.lean:9 (same declaration text).

  4. def OAI.Superstring.encodeList Prefix markers encode the list spine, including its final boundary line 12

    Source documentation

    Prefix markers encode the list spine, including its final boundary.

    L4DEL explanation

    Prefix markers encode the list spine, including its final boundary.

    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/Computability/Superstring/Model.lean:12 (same declaration text).

    def encodeList {α : Type} (enc : α → List Bool) : List α → List Bool
      | [] => [true]
      | a :: as => false :: (enc a ++ encodeList enc as)
  5. def OAI.Superstring.encodeSymbol line 16

    Also declared: OAI/Computability/Superstring/Model.lean:16 (same declaration text).

  6. def OAI.Superstring.encodeWord line 17

    Also declared: OAI/Computability/Superstring/Model.lean:17 (same declaration text).

  7. def OAI.Superstring.encodeInstance line 18

    Also declared: OAI/Computability/Superstring/Model.lean:18 (same declaration text).

  8. def OAI.Superstring.IsCommonSuperstring Ordinary contiguous substring containment, including the empty word line 21

    Source documentation

    Ordinary contiguous substring containment, including the empty word.

    L4DEL explanation

    Ordinary contiguous substring containment, including the empty word.

    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/Computability/Superstring/Model.lean:21 (same declaration text).

    def IsCommonSuperstring (S : Instance) (T : Word) : Prop :=
    …

    Mentions: OAI.Superstring.Instance, OAI.Superstring.Word

  9. def OAI.Superstring.opt The optimum in symbols, not in bits line 25

    Source documentation

    The optimum in symbols, not in bits.

    L4DEL explanation

    The optimum in symbols, not in bits.

    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/Computability/Superstring/Model.lean:25 (same declaration text).

    noncomputable def opt (S : Instance) : ℕ :=
    …

    Mentions: OAI.Superstring.Instance

  10. def OAI.Superstring.HasPolynomialImplementation A deterministic finite-stack-machine implementation, with a polynomial bound on bit-level running time in the explicitly encoded input length line 30

    Source documentation

    A deterministic finite-stack-machine implementation, with a polynomial bound on bit-level running time in the explicitly encoded input length.

    L4DEL explanation

    A deterministic finite-stack-machine implementation, with a polynomial bound on bit-level running time in the explicitly encoded input 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/Computability/Superstring/Model.lean:30 (same declaration text).

    def HasPolynomialImplementation (f : Instance → Word) : Prop :=
    …

    Mentions: OAI.Superstring.Instance, OAI.Superstring.Word

  11. theorem OAI.Superstring.main Challenge statement: A factor-two approximation for shortest common superstring sorry line 36

    Source documentation

    The deterministic algorithm with its exact finite-alphabet bit-machine certificate, contiguous coverage, and factor-two bound in symbols.

    L4DEL explanation

    The shortest common superstring problem asks for the shortest string containing each input string as a contiguous substring. The formalized result gives one deterministic polynomial-time algorithm whose output is a common superstring of length at most twice the unrestricted optimum. It applies to every finite list of explicitly encoded strings, with running time measured in input bits and the approximation ratio measured in symbol length.

    1. This is an exact comparator target linked by the pinned repository's formalization note for this result.
    2. The repository's comparator configuration selects OAI.Computability.Superstring.Main as the released solution module checked against this declaration.

    Sources and attribution: Pinned Lean source (fd4aeeb2ee4f)

    Distinct definitions of this name: OAI/Computability/Superstring/Main.lean:57 (same statement text; different proof or body). Qualify references as OAI.Superstring.main@path.

    theorem main : ∃ f : Instance → Word,
        HasPolynomialImplementation f ∧
        ∀ S, IsCommonSuperstring S (f S) ∧ (f S).length ≤ 2 * opt S := by
    …

    Mentions: OAI.Superstring.Instance, OAI.Superstring.Word, OAI.Superstring.HasPolynomialImplementation, OAI.Superstring.IsCommonSuperstring, OAI.Superstring.opt