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

9 declarations, 1 contain sorry, 0 declared as axioms

  1. def OAI.TwoWayComplementation.relStar Reflexive transitive closure, including the empty path line 10

    Source documentation

    Reflexive transitive closure, including the empty path.

    L4DEL explanation

    Reflexive transitive closure, including the empty path.

    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/TwoWayComplementation.lean:9 (same declaration text), OAI/Combinatorics/TwoWayAutomata/Model.lean:10 (same declaration text).

    def relStar {α : Type*} (R : SetRel α α) : SetRel α α :=
    …
  2. structure OAI.TwoWayComplementation.TwoNFA A read-only 2NFA line 15

    Source documentation

    A read-only 2NFA. The two endmarkers are Sum.inl 0 and Sum.inl 1. Move codes 0, 1, 2 mean left, stay, right.

    L4DEL explanation

    A read-only 2NFA. The two endmarkers are Sum.inl 0 and Sum.inl 1. Move codes 0, 1, 2 mean left, stay, right.

    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/TwoWayComplementation.lean:12 (same declaration text), OAI/Combinatorics/TwoWayAutomata/Model.lean:15 (same declaration text).

    structure TwoNFA (Sigma Q : Type*) where
    …
  3. def OAI.TwoWayComplementation.tapeSymbol Tape lookup includes two distinct endmarkers, even on empty input line 24

    Source documentation

    Tape lookup includes two distinct endmarkers, even on empty input.

    L4DEL explanation

    Tape lookup includes two distinct endmarkers, even on empty input.

    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/TwoWayComplementation.lean:17 (same declaration text), OAI/Combinatorics/TwoWayAutomata/Model.lean:24 (same declaration text).

    def tapeSymbol {Sigma : Type*} (w : List Sigma) (p : Fin (w.length + 2)) : Fin 2 ⊕ Sigma :=
    …
  4. def OAI.TwoWayComplementation.TwoNFA.step One legal step: both head positions stay within the marked input line 32

    Source documentation

    One legal step: both head positions stay within the marked input.

    L4DEL explanation

    One legal step: both head positions stay within the marked input.

    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/TwoWayComplementation.lean:24 (same declaration text), OAI/Combinatorics/TwoWayAutomata/Model.lean:32 (same declaration text).

    def step {Sigma Q : Type*} (A : TwoNFA Sigma Q) (w : List Sigma) :
        SetRel (Q × Fin (w.length + 2)) (Q × Fin (w.length + 2)) :=
    …

    Mentions: OAI.TwoWayComplementation.TwoNFA

  5. def OAI.TwoWayComplementation.TwoNFA.language Existential finite-run acceptance, allowing a run of length zero line 39

    Source documentation

    Existential finite-run acceptance, allowing a run of length zero.

    L4DEL explanation

    Existential finite-run acceptance, allowing a run of length zero.

    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/TwoWayComplementation.lean:30 (same declaration text), OAI/Combinatorics/TwoWayAutomata/Model.lean:39 (same declaration text).

    def language {Sigma Q : Type*} (A : TwoNFA Sigma Q) : Set (List Sigma) :=
    …

    Mentions: OAI.TwoWayComplementation.TwoNFA

  6. def OAI.TwoWayComplementation.TwoNFA.Deterministic At most one next-state/move pair at every state and scanned symbol line 46

    Source documentation

    At most one next-state/move pair at every state and scanned symbol.

    L4DEL explanation

    At most one next-state/move pair at every state and scanned symbol.

    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/TwoWayAutomata/DeterministicCore.lean:8 (same declaration text).

    def TwoNFA.Deterministic {Sigma Q : Type*} (A : TwoNFA Sigma Q) : Prop :=
    …

    Mentions: OAI.TwoWayComplementation.TwoNFA

  7. def OAI.TwoWayComplementation.relationProduct Relation product for an input word; the empty product is the identity line 50

    Source documentation

    Relation product for an input word; the empty product is the identity.

    L4DEL explanation

    Relation product for an input word; the empty product is the identity.

    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/TwoWayAutomata/Source.lean:11 (same declaration text).

    def relationProduct {H : Type*} (w : List (SetRel H H)) : SetRel H H :=
    …
  8. def OAI.TwoWayComplementation.sourceLanguage The source language consists of the words with nonempty relation product line 54

    Source documentation

    The source language consists of the words with nonempty relation product.

    L4DEL explanation

    The source language consists of the words with nonempty relation product.

    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/TwoWayAutomata/Source.lean:21 (same declaration text).

    def sourceLanguage (H : Type*) : Set (List (SetRel H H)) :=
    …
  9. theorem OAI.TwoWayComplementation.explicit_family_main Challenge statement: Same-family determinization lower bound sorry line 58

    Source documentation

    Both lower bounds hold for the same n-state liveness witness.

    L4DEL explanation

    Both lower bounds hold for the same n-state liveness witness.

    1. This explanation is a condensed rendering of this declaration's own doc comment at the pinned source commit.
    2. The linked formalization note covers 3 distinct comparator results, so its combined Scope prose is not copied onto this declaration.
    3. The repository's comparator configuration selects OAI.Combinatorics.TwoWayAutomata.ExplicitFamily as the released solution module checked against this declaration.

    Sources and attribution: Pinned Lean source (fd4aeeb2ee4f)

    Distinct definitions of this name: OAI/Combinatorics/TwoWayAutomata/ExplicitFamily.lean:36 (same statement text; different proof or body). Qualify references as OAI.TwoWayComplementation.explicit_family_main@path.

    theorem explicit_family_main (n : ℕ) (hn : 4 ≤ n) :
        ∃ A : TwoNFA (SetRel (Fin (n - 2)) (Fin (n - 2))) (Fin n),
          A.language = sourceLanguage (Fin (n - 2)) ∧
          (∀ (Q : Type*) [Fintype Q],
            ∀ B : TwoNFA (SetRel (Fin (n - 2)) (Fin (n - 2))) Q,
            B.language = A.languageᶜ →
              (1 / 2 : ℝ) * 2 ^ ((n - 4) / 127) - 1 ≤ (Fintype.card Q : ℝ)) ∧
          (131 ≤ n → ∀ (Q : Type*) [Fintype Q],
            ∀ D : TwoNFA (SetRel (Fin (n - 2)) (Fin (n - 2))) Q,
            D.Deterministic → D.language = A.language →
              (1 / 2 : ℝ) * 2 ^ ((n - 4) / 127) ≤ (Fintype.card Q : ℝ)) := by
    …

    Mentions: OAI.TwoWayComplementation.TwoNFA, OAI.TwoWayComplementation.sourceLanguage