All proofs
Project-declaredLean 4.24.0-rc1 · mathlib@aad26963

Acc lang loop concat

Automata.acc_lang_loop_concat

Plain-language statement

The concatenation of the language accepted by the loop NA with itself is a subset of itself.

Exact Lean statement

theorem acc_lang_loop_concat :
    ((M.Loop acc).AcceptedLang {inl ()}) * ((M.Loop acc).AcceptedLang {inl ()}) ⊆
    (M.Loop acc).AcceptedLang {inl ()}

Formal artifact

Lean source

Canonical source
Full Lean sourceLean 4
theorem acc_lang_loop_concat :    ((M.Loop acc).AcceptedLang {inl ()}) * ((M.Loop acc).AcceptedLang {inl ()})     (M.Loop acc).AcceptedLang {inl ()} := by  rintro al al1, al2, n1, as1, ss1, h_run1, h_acc1, rfl, n2, as2, ss2, h_run2, h_acc2, rfl, rfl  use (n1 + n2), ((as1.extract 0 n1) ++ₛ as2) ; symm ; constructor  · have h1 : (as1.extract 0 n1).length  n1 + n2 := by simp [length_extract]    simp [extract_append_zero_right h1, length_extract]  let ss k := if k < n1 then ss1 k else ss2 (k - n1)  use ss ; symm ; constructor  · simp at h_acc2 ; simp [ss, h_acc2]  constructor  · suffices h_0 : ss 0 = inl () by simp [h_0, NA.Loop]    rcases (show n1 = 0  n1 > 0 by omega) with h_n1 | h_n1 <;> simp [ss, h_n1]    · exact h_run2.1    · exact h_run1.1  intro k h_k  rcases (show k + 1 < n1  k + 1 = n1  k + 1 > n1 by omega) with h_k | h_k | h_k  · have h1 : k < (as1.extract 0 n1).length := by simp [length_extract] ; omega    simp (disch := omega) [get_append_left' h1, get_extract']    have h_next := h_run1.2 k (by omega)    simp [ss, h_next, h_k, (show k < n1 by omega)]  · have h_next := h_run1.2 k (by omega)    suffices h_n1 : ss2 0 = ss1 (k + 1) by      have h1 : k < (as1.extract 0 n1).length := by simp [length_extract] ; omega      simp (disch := omega) [get_append_left' h1, get_extract']      simp [ss,  h_k, h_n1, h_next]    simp [ h_k] at h_acc1    simp [h_acc1] ; exact h_run2.1  · have h_next := h_run2.2 (k - n1) (by omega)    have h1 : (as1.extract 0 n1).length  k := by simp [length_extract] ; omega    simp [get_append_right' h1, length_extract, ss, h_next,      (show ¬ k + 1 < n1 by omega), (show ¬ k < n1 by omega), (show k + 1 - n1 = k - n1 + 1 by omega)]
Project
Automata Theory
License
Apache-2.0
Commit
f196548710ce
Source
AutomataTheory/Automata/Loop.lean:153-184

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

Project-declaredLean 4.24.0-rc1

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.

automata theoryformal languagescomputer science

Source project: Automata Theory

Person-level attribution pending.

View proof record
Project-declaredLean 4.24.0-rc1

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.

automata theoryformal languagescomputer science

Source project: Automata Theory

Person-level attribution pending.

View proof record
Project-declaredLean 4.24.0-rc1

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.

automata theoryformal languagescomputer science

Source project: Automata Theory

Person-level attribution pending.

View proof record