All proofs
Project-declaredLean 4.33.0-rc1 · mathlib@169c26b52a38

Concat run exists

Cslib.Automata.NA.concat_run_exists

Plain-language statement

Given an accepting finite run of na1 and a run of na2, there exists a run of concat na1 na2 that is the concatenation of the two runs.

Exact Lean statement

theorem concat_run_exists {xs1 : List Symbol} {xs2 : ωSequence Symbol} {ss2 : ωSequence State2}
    (h1 : xs1 ∈ language na1) (h2 : na2.Run xs2 ss2) :
    ∃ ss, (concat na1 na2).Run (xs1 ++ω xs2) ss ∧ ss.drop xs1.length = ss2.map inr

Formal artifact

Lean source

Canonical source
Full Lean sourceLean 4
theorem concat_run_exists {xs1 : List Symbol} {xs2 : ωSequence Symbol} {ss2 : ωSequence State2}    (h1 : xs1  language na1) (h2 : na2.Run xs2 ss2) :     ss, (concat na1 na2).Run (xs1 ++ω xs2) ss  ss.drop xs1.length = ss2.map inr := by  by_cases h_xs1 : xs1.length = 0  · obtain rfl : xs1 = [] := List.eq_nil_iff_length_eq_zero.mpr h_xs1    use ss2.map inr    split_ands    · simp [concat]      grind only [LTS.OmegaExecution, = Set.mem_union, = get_map, = Set.mem_image, Run]    · simp  · obtain s0, _, _, _, h_mtr := h1    obtain ss1, _, _, _, _ := LTS.Execution.of_mTr h_mtr    let ss := (ss1.map inl).take xs1.length ++ω ss2.map inr    refine ss, Run.mk ?_ ?_, ?_    · grind [concat, get_append_left]    · have (k) (h_k : ¬ k < xs1.length) : k + 1 - xs1.length = k - xs1.length + 1 := by grind      simp only [concat]      grind only [Run, LTS.OmegaExecution, get_append_right', get_append_left,        = List.length_take, = get_map, = List.length_map, = min_def, = List.getElem_take,        = List.getElem_map]    · grind [drop_append_of_le_length]
Project
Lean Computer Science Library
License
Apache-2.0
Commit
f36649cff2c9
Source
Cslib/Computability/Automata/NA/Concat.lean:96-116

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.33.0-rc1

Unique minimal

Cslib.Automata.DA.FinAcc.unique_minimal

Plain-language statement

The minimal DFA M accepting the language l is unique up to unique isomorphism.

computer sciencecomputabilityprogram semantics

Source project: Lean Computer Science Library

Person-level attribution pending.

View proof record
Project-declaredLean 4.33.0-rc1

Buchi Family cover

Cslib.Automata.NA.Buchi.buchiFamily_cover

Project documentation

na.buchiFamily is a cover if na has only finitely many states. This theorem uses the Ramsey theorem for infinite graphs and does not depend on any details of na.BuchiCongruence other than that it is of finite index.

computer sciencecomputabilityprogram semantics

Source project: Lean Computer Science Library

Person-level attribution pending.

View proof record