Omega Execution flatten execution
Cslib.LTS.OmegaExecution.flatten_execution
Plain-language statement
Concatenating an infinite sequence of finite executions.
Exact Lean statement
theorem OmegaExecution.flatten_execution [Inhabited Label]
{ts : ωSequence State} {μls : ωSequence (List Label)} {sls : ωSequence (List State)}
(hexec : ∀ k, lts.Execution (ts k) (μls k) (ts (k + 1)) (sls k))
(hpos : ∀ k, (μls k).length > 0) :
∃ ss, lts.OmegaExecution ss μls.flatten ∧
∀ k, ss.extract (μls.cumLen k) (μls.cumLen (k + 1)) = (sls k).take (μls k).lengthFormal artifact
Lean source
theorem OmegaExecution.flatten_execution [Inhabited Label] {ts : ωSequence State} {μls : ωSequence (List Label)} {sls : ωSequence (List State)} (hexec : ∀ k, lts.Execution (ts k) (μls k) (ts (k + 1)) (sls k)) (hpos : ∀ k, (μls k).length > 0) : ∃ ss, lts.OmegaExecution ss μls.flatten ∧ ∀ k, ss.extract (μls.cumLen k) (μls.cumLen (k + 1)) = (sls k).take (μls k).length := by have : Inhabited State := by exact {default := ts 0} let segs := ωSequence.mk fun k ↦ (sls k).take (μls k).length have h_len : μls.cumLen = segs.cumLen := by ext k; induction k <;> grind have h_pos (k : ℕ) : (segs k).length > 0 := by grind [List.eq_nil_iff_length_eq_zero] have h_mono := cumLen_strictMono h_pos have h_zero := cumLen_zero (ls := segs) have h_seg0 (k : ℕ) : (segs k)[0]! = ts k := by grind use segs.flatten split_ands · intro n simp only [h_len, flatten_def] simp only [Execution] at hexec have := segment_lower_bound h_mono h_zero n by_cases h_n : n + 1 < segs.cumLen (segment segs.cumLen n + 1) · have := segment_range_val h_mono (by grind) h_n have : n + 1 - segs.cumLen (segment segs.cumLen n) < (μls (segment segs.cumLen n)).length := by grind grind · have h1 : segs.cumLen (segment segs.cumLen n + 1) = n + 1 := by grind [segment_upper_bound h_mono h_zero n] have h2 : segment segs.cumLen (n + 1) = segment segs.cumLen n + 1 := by simp [← h1, segment_idem h_mono] have : n + 1 - segs.cumLen (segment segs.cumLen n) = (μls (segment segs.cumLen n)).length := by grind have h3 : ts (segment segs.cumLen n + 1) = (sls (segment segs.cumLen n))[n + 1 - segs.cumLen (segment segs.cumLen n)]! := by grind simp [h1, h2, h_seg0, h3] grind · simp [h_len, extract_flatten h_pos, segs]- Project
- Lean Computer Science Library
- License
- Apache-2.0
- Commit
- f36649cff2c9
- Source
- Cslib/Foundations/Semantics/LTS/OmegaExecution.lean:70-105
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
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.
Source project: Lean Computer Science Library
Person-level attribution pending.
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.
Source project: Lean Computer Science Library
Person-level attribution pending.
Buchi Family saturation
Cslib.Automata.NA.Buchi.buchiFamily_saturation
Plain-language statement
na.buchiFamily saturates the ω-language accepted by na.
Source project: Lean Computer Science Library
Person-level attribution pending.