Da acc lang compl
Automata.da_acc_lang_compl
Plain-language statement
For a DA, complementing the language it accepts can be achieved by simply complementing the set of accepting states.
Exact Lean statement
theorem da_acc_lang_compl [Inhabited A] :
M.toNA.AcceptedLang accᶜ = (M.toNA.AcceptedLang acc)ᶜFormal artifact
Lean source
theorem da_acc_lang_compl [Inhabited A] : M.toNA.AcceptedLang accᶜ = (M.toNA.AcceptedLang acc)ᶜ := by ext al constructor · rintro ⟨n, as, ⟨ss, h_run, h_acc⟩, h_al⟩ rintro ⟨n', as', ⟨ss', h_run', h_acc'⟩, h_al'⟩ have h_len : al.length = n := by simp [← h_al, length_extract] have h_len' : al.length = n' := by simp [← h_al', length_extract] obtain ⟨rfl⟩ := show n' = n by rw [← h_len, ← h_len'] have h_run_n := na_FinRun_fixSuffix h_run have h_run_n' := na_FinRun_fixSuffix h_run' have h_as_eq : fixSuffix as' n default = fixSuffix as n default := by ext k ; simp [get.eq_1] ; rcases Classical.em (k < n) with h_k | h_k <;> simp [fixSuffix, h_k] have h_as_k : as k = al.get ⟨k, (by omega)⟩ := by simp (disch := omega) [← h_al, get_extract'] have h_as_k' : as' k = al.get ⟨k, (by omega)⟩ := by simp (disch := omega) [← h_al', get_extract'] rw [h_as_k, h_as_k'] rw [h_as_eq] at h_run_n' have h_ss_n := da_fin_run_unique h_run_n n (by omega) have h_ss_n' := da_fin_run_unique h_run_n' n (by omega) simp [fixSuffix] at h_ss_n h_ss_n' rw [h_ss_n] at h_acc ; rw [h_ss_n'] at h_acc' contradiction · intro h_compl-- let as := fun k ↦ if h : k < al.length then al[k] else default let as := al.padDefault have h_al : as.extract 0 al.length = al := by simp [as, extract_padDefault] use al.length, as ; simp [h_al] let ss := M.DetRun as have h_run : M.toNA.FinRun al.length as ss := by exact da_fin_run_exists al.length as use ss ; constructor · exact h_run intro h_acc have : al ∈ (M.toNA.AcceptedLang acc) := by use al.length, as ; simp [h_al] ; use! ss contradiction- Project
- Automata Theory
- License
- Apache-2.0
- Commit
- f196548710ce
- Source
- AutomataTheory/Automata/Det.lean:135-169
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.