Da concat det run cnt2
Automata.da_concat_det_run_cnt2
Plain-language statement
The second state component of M1.Concat acc1 M2 always has at least one inactive copy of M2 available.
Exact Lean statement
theorem da_concat_det_run_cnt2 (as : Stream' A) (n : ℕ) :
∃ i, ((M1.Concat acc1 M2).DetRun as n).2 i = noneFormal artifact
Lean source
theorem da_concat_det_run_cnt2 (as : Stream' A) (n : ℕ) : ∃ i, ((M1.Concat acc1 M2).DetRun as n).2 i = none := by induction' n with n h_ind · use 0 ; simp [DA.DetRun, DA.Concat] let s_n := (M1.Concat acc1 M2).DetRun as n obtain ⟨i, h_i⟩ := h_ind rcases Classical.em (∃ j, j ≠ i ∧ s_n.2 j = none) with h_none | h_some · obtain ⟨j, h_ne, h_j⟩ := h_none simp [s_n] at h_j wlog h : i < j generalizing i j with h' · exact h' j h_j i (Ne.symm h_ne) h_i (by fin_omega) use j ; simp [DA.DetRun, da_concat_next_2, h_j] intro _ ; use i · simp [ne_none_iff_isSome] at h_some have h1 : {j | (s_n.2 j).isSome} = {i}ᶜ := by ext j ; simp ; grind have h2 : {j | (s_n.2 j).isSome}.ncard = Nat.card M2.State + 1 := by have h_sum := ncard_add_ncard_compl {i} ; simp at h_sum rw [h1] ; omega obtain ⟨j1, j2, h_ne, s2, h_j1, h_j2⟩ := option_some_pigeonhole s_n.2 (by omega) wlog h : j1 < j2 generalizing j1 j2 with h' · exact h' j2 j1 (Ne.symm h_ne) h_j2 h_j1 (by fin_omega) simp [s_n] at h_j1 h_j2 use j2 ; simp [DA.DetRun, da_concat_next_2, h_j2] use j1 ; simp [h, h_j1]- Project
- Automata Theory
- License
- Apache-2.0
- Commit
- f196548710ce
- Source
- AutomataTheory/Automata/DetConcat.lean:125-148
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.