Abstract Closure Predicates for Language Classes #
This file defines predicates capturing common closure properties of language classes.
A language class P : Language α → Prop is closed under an operation if applying the
operation to languages in P yields another language in P.
For same-alphabet operations (union, intersection, complement, concatenation, Kleene star,
reversal, intersection/quotient with regular), closedness is expressed as a property of
P : Language α → Prop.
For cross-alphabet operations (string homomorphism, ε-free homomorphism), closedness is
expressed as a property of an alphabet-indexed predicate
isP : ∀ {α : Type*}, Language α → Prop.
Main definitions #
ClosedUnderUnionClosedUnderIntersectionClosedUnderComplementClosedUnderConcatenationClosedUnderKleeneStarClosedUnderReverseClosedUnderIntersectionWithRegularClosedUnderRightQuotientClosedUnderRightQuotientWithRegularClosedUnderHomomorphismClosedUnderEpsFreeHomomorphismClosedUnderInverseHomomorphismClosedUnderSubstitution
A language class is closed under union.
Equations
- ClosedUnderUnion P = ∀ (L₁ L₂ : Language α), P L₁ → P L₂ → P (L₁ + L₂)
Instances For
A language class is closed under intersection.
Equations
- ClosedUnderIntersection P = ∀ (L₁ L₂ : Language α), P L₁ → P L₂ → P (L₁ ⊓ L₂)
Instances For
A language class is closed under complement.
Equations
- ClosedUnderComplement P = ∀ (L : Language α), P L → P Lᶜ
Instances For
A language class is closed under concatenation.
Equations
- ClosedUnderConcatenation P = ∀ (L₁ L₂ : Language α), P L₁ → P L₂ → P (L₁ * L₂)
Instances For
A language class is closed under Kleene star.
Equations
- ClosedUnderKleeneStar P = ∀ (L : Language α), P L → P (KStar.kstar L)
Instances For
A language class is closed under language reversal.
Equations
- ClosedUnderReverse P = ∀ (L : Language α), P L → P L.reverse
Instances For
A language class is closed under right quotient (with any language from the same class).
Equations
- ClosedUnderRightQuotient P = ∀ (L₁ L₂ : Language α), P L₁ → P L₂ → P (L₁.rightQuotient L₂)
Instances For
A language class is closed under right quotient with regular languages.
Equations
- ClosedUnderRightQuotientWithRegular P = ∀ (L : Language α), P L → ∀ (R : Language α), R.IsRegular → P (L.rightQuotient R)
Instances For
A finite-alphabet-indexed language class is closed under string homomorphism.
Here isP is a predicate on languages that is uniform across finite alphabets.
Note: Language.homomorphicImage works in universe Type, so isP ranges over Type.
Equations
- ClosedUnderHomomorphism isP = ∀ {α β : Type} [inst : Fintype α] [inst_1 : Fintype β] (L : Language α) (h : α → List β), isP L → isP (L.homomorphicImage h)
Instances For
A finite-alphabet-indexed language class is closed under ε-free string homomorphism.
Equations
- ClosedUnderEpsFreeHomomorphism isP = ∀ {α β : Type} [inst : Fintype α] [inst_1 : Fintype β] (L : Language α) (h : α → List β), IsEpsFreeHomomorphism h → isP L → isP (L.homomorphicImage h)
Instances For
A finite-alphabet-indexed language class is closed under inverse string homomorphism.
The inverse homomorphic image of L : Language β under h : α → List β is
{ w : List α | w.flatMap h ∈ L }. Both alphabets are finite, matching the
finite-alphabet convention used by the other cross-alphabet closure predicates.
Equations
Instances For
A finite-alphabet-indexed language class is closed under substitution.
Both alphabets are finite, matching the finite-alphabet convention used by the TM-recognizability bridge and the other cross-alphabet closure predicates.
Equations
Instances For
Strictness from property mismatch #
If P ⊆ Q, P has a class property X, Q does not, and X is invariant
under pointwise equivalence of language classes, then the inclusion P ⊆ Q is strict.
The invariance hypothesis is necessary: an arbitrary predicate transformer
X : (Language α → Prop) → Prop need not be transportable from P to an extensionally
equal class.