Na loop fin run exists
Automata.na_loop_fin_run_exists
Plain-language statement
Conversely, for any finite accepting run of M, there is a finite run of the loop NA that contains the inl () marker only at the beginning and at the end.
Exact Lean statement
theorem na_loop_fin_run_exists {n : ℕ} {as : Stream' A} {ss' : Stream' M.State}
(h_run' : M.FinRun n as ss') (h_acc' : ss' n ∈ acc) :
∃ ss, (M.Loop acc).FinRun n as ss ∧ ss n = inl () ∧ (∀ k < n, k > 0 → ss k = inr (ss' k))Formal artifact
Lean source
theorem na_loop_fin_run_exists {n : ℕ} {as : Stream' A} {ss' : Stream' M.State} (h_run' : M.FinRun n as ss') (h_acc' : ss' n ∈ acc) : ∃ ss, (M.Loop acc).FinRun n as ss ∧ ss n = inl () ∧ (∀ k < n, k > 0 → ss k = inr (ss' k)) := by rcases (show n = 0 ∨ n > 0 by omega) with ⟨rfl⟩ | h_n · use (fun k ↦ inl ()) ; simp [NA.FinRun, NA.Loop] let ss k := if k = 0 ∨ k = n then inl () else inr (ss' k) suffices h : ∃ ss', M.FinRun n as ss' ∧ ss' n ∈ acc ∧ ss 0 = inl () ∧ ss n = inl () ∧ (∀ k < n, k > 0 → ss k = inr (ss' k)) by obtain ⟨h_run, h_ss_n, _⟩ := (na_loop_fin_run h_n).mpr h use ss ; simp [h_run, h_ss_n] intro k h_k_n h_k_0 ; simp [ss] ; omega use ss' ; simp [h_run', h_acc', ss] ; omega- Project
- Automata Theory
- License
- Apache-2.0
- Commit
- f196548710ce
- Source
- AutomataTheory/Automata/Loop.lean:132-142
Reuse this declaration
Bring the exact result into your workflow
The import identifies the source module. Your project still needs the pinned package dependency shown on this page.
What this badge means
This completion status comes from the project or community source. It has not yet been represented here as an independent rebuild and axiom audit.
Continue in this project
Related declarations
Acc lang congr
acc_lang_congr
Plain-language statement
The language accepted by c.toDA with a unique accepting state s is exactly the equivalence class of s.
Source project: Automata Theory
Person-level attribution pending.
Acc lang concat e
Automata.acc_lang_concat_e
Plain-language statement
The language of the concatenation NA that is accepted by M0's accepting states is the language accepted by M0.
Source project: Automata Theory
Person-level attribution pending.
Acc lang concat ne
Automata.acc_lang_concat_ne
Plain-language statement
The language of the concatenation NA that is accepted by M1's accepting states is the language accepted by M0 concatenated with the language accepted by M1 minus the empty word.
Source project: Automata Theory
Person-level attribution pending.