ωLanguage #
This file contains the definition and operations on formal ω-languages, which
are sets of infinite sequences over an alphabet α (namely, objects of type
ωSequence α).
Main definitions and notations #
In general we will use p and q to denote ω-languages and l and m to
denote languages (namely, sets of finite sequences of type List α).
- Set operations (union, intersection, complementation), constants (empty and
universe sets), and the subset relation are denoted using lattice-theoretic
notations (
p ∪ q,p ∩ q,pᶜ,⊥,⊤, and≤) and terminologies in definition and theorem names ("inf", "sup", "compl", "bot", "top", "le"). l * p: ω-language ofx ++ω ywherex ∈ landy ∈ p; referred to as "hmul" in definition and theorem names.l^ω: ω-language of infinite sequences each of which is the concatenation of infinitely many (nonemoty) members ofl; referred to as "omegaPow" in definition and theorem names.- Note: Since
l^ωis defined usingωSequence.flatten, any theorem about it needs the additional assumption[Inhabited α].
- Note: Since
l↗ω: ω-language of infinite sequences each of which has infinitely many distinct prefixes inl; referred to as "omegaLim" in definition and theorem names.p.map f: transform an ω-languagepoverαinto an ω-language overβby mapping throughf : α → β; referred to as "map" in definition and theorem names.
Main theorems #
- Many algebraic properties of the above operations.
- omegaPow_seq_prop: an alternative characterization of
l^ω. - omegaPow_coind: a "coinductive" rule for proving
pis a subset ofl^ω. - hmul_omegaPow_eq_omegaPow:
l * l^ω = l^ω. - kstar_omegaPow_eq_omegaPow:
(l∗)^ω = l^ω. - kstar_hmul_omegaPow_eq_omegaPow:
l∗ * l^ω = l^ω.
TODO #
- Prove more theorems about omegaLim and map.
An ω-language is a set of strings over an alphabet.
Equations
- Cslib.ωLanguage α = Set (Cslib.ωSequence α)
Instances For
Equations
Equations
- Cslib.ωLanguage.instSingletonωSequence = { singleton := Set.singleton }
Equations
- Cslib.ωLanguage.instInsertωSequence = { insert := Set.insert }
Equations
- Cslib.ωLanguage.instHasSubset = { Subset := fun (x1 x2 : Cslib.ωLanguage α) => x1 ≤ x2 }
Equations
- Cslib.ωLanguage.instInhabited = { default := ∅ }
The concatenation of a language l and an ω-language p is the ω-language made of
infinite sequences x ++ω y where x ∈ l and y ∈ p.
Equations
- Cslib.ωLanguage.instHMulLanguage = { hMul := Set.image2 fun (x1 : List α) (x2 : Cslib.ωSequence α) => x1 ++ω x2 }
Concatenation of infinitely many copies of a languages, resulting in an ω-language. A.k.a. ω-power.
Equations
- Cslib.ωLanguage.omegaPow l = {s : Cslib.ωSequence α | ∃ (xs : Cslib.ωSequence (List α)), xs.flatten = s ∧ ∀ (k : ℕ), xs k ∈ l - 1}
Instances For
Use the postfix notation ^ωforomegaPow`.
Equations
- Cslib.ωLanguage.«term_^ω» = Lean.ParserDescr.trailingNode `Cslib.ωLanguage.«term_^ω» 1024 1024 (Lean.ParserDescr.symbol "^ω")
Instances For
Equations
The ω-limit of a language l is the ω-language of infinite sequences each of which
contains infinitely many distinct prefixes in l.
Equations
- Cslib.ωLanguage.omegaLim l = {s : Cslib.ωSequence α | ∃ᶠ (m : ℕ) in Filter.atTop, s.extract 0 m ∈ l}
Instances For
Use the postfix notation ↗ωforomegaLim`.
Equations
- Cslib.ωLanguage.«term_↗ω» = Lean.ParserDescr.trailingNode `Cslib.ωLanguage.«term_↗ω» 1024 1024 (Lean.ParserDescr.symbol "↗ω")
Instances For
Equations
- Cslib.ωLanguage.instOmegaLim = { omegaLim := Cslib.ωLanguage.omegaLim }
transform an ω-language p over α into an ω-language over β
by mapping through f : α → β.