ComparatorChallenges/TwoWayDeterminization.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
9 declarations, 1 contain sorry, 0 declared as axioms
- def
OAI.TwoWayComplementation.relStarReflexive transitive closure, including the empty path line 10Source documentation
Reflexive transitive closure, including the empty path.
L4DEL explanation
Reflexive transitive closure, including the empty path.
- 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 α α := … - structure
OAI.TwoWayComplementation.TwoNFAA read-only 2NFA line 15Source documentation
A read-only 2NFA. The two endmarkers are
Sum.inl 0andSum.inl 1. Move codes 0, 1, 2 mean left, stay, right.L4DEL explanation
A read-only 2NFA. The two endmarkers are
Sum.inl 0andSum.inl 1. Move codes 0, 1, 2 mean left, stay, right.- 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 …
- def
OAI.TwoWayComplementation.tapeSymbolTape lookup includes two distinct endmarkers, even on empty input line 24Source documentation
Tape lookup includes two distinct endmarkers, even on empty input.
L4DEL explanation
Tape lookup includes two distinct endmarkers, even on empty input.
- 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 := … - def
OAI.TwoWayComplementation.TwoNFA.stepOne legal step: both head positions stay within the marked input line 32Source 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.
- 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
- def
OAI.TwoWayComplementation.TwoNFA.languageExistential finite-run acceptance, allowing a run of length zero line 39Source documentation
Existential finite-run acceptance, allowing a run of length zero.
L4DEL explanation
Existential finite-run acceptance, allowing a run of length zero.
- 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
- def
OAI.TwoWayComplementation.TwoNFA.DeterministicAt most one next-state/move pair at every state and scanned symbol line 46Source 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.
- 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
- def
OAI.TwoWayComplementation.relationProductRelation product for an input word; the empty product is the identity line 50Source 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.
- 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 := … - def
OAI.TwoWayComplementation.sourceLanguageThe source language consists of the words with nonempty relation product line 54Source 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.
- 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)) := …
- theorem
OAI.TwoWayComplementation.explicit_family_mainChallenge statement: Same-family determinization lower bound sorry line 58Source 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.
- This explanation is a condensed rendering of this declaration's own doc comment at the pinned source commit.
- The linked formalization note covers 3 distinct comparator results, so its combined Scope prose is not copied onto this declaration.
- 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