Formulas with free variables define regular languages of annotated strings

Lax314295.MSOFreeVariables · concepts/Lax314295/MSOFreeVariables.lean · lax-314295

proven

Loading review…

Sign in with ORCID

Community review

Flags

Each flag is tied to a public ORCID identity and explains why this concept may be incorrect.

No flags have been submitted.

    Community review

    Flag this concept

    State precisely what appears incorrect. This explanation will be public under your ORCID name.

    No source line selected.

    Natural Language Statement

    Theorem

    Let φ\varphi be an mso formula over AA whose free variables are among the first-order variables x1,…,xkx_1, \ldots, x_k and the set variables X1,…,XℓX_1, \ldots, X_\ell. Then the language over A×2k+ℓA \times 2^{k+\ell} of the annotated strings w⊗{x1}⊗⋯⊗{xk}⊗X1⊗⋯⊗Xℓw \otimes \{x_1\} \otimes \cdots \otimes \{x_k\} \otimes X_1 \otimes \cdots \otimes X_\ell such that w⊨φ(x1,…,xk,X1,…,Xℓ)w \models \varphi(x_1, \ldots, x_k, X_1, \ldots, X_\ell) is regular (Lemma C.4.2 of Transducers). The proof is an induction on the formula, with a nondeterministic automaton guessing the value of a quantified variable.

    Concept map
    2 concepts
    100%
    Proven claimDefinitionThis conceptRelated conceptA → B: B builds on A
    Evidence

    Each proof establishes this claim relative to its assumptions.

    In the paper

    Lean source view on GitHub

    1import Lax314295.MSOLogic
    2
    3/-!
    4---
    5title: Formulas with free variables define regular languages of annotated strings
    6type: theorem
    7---
    8Let φ\varphi be an mso formula over AA whose free variables are among the
    9first-order variables x1,…,xkx_1, \ldots, x_k and the set variables
    10X1,…,XℓX_1, \ldots, X_\ell. Then the language over A×2k+ℓA \times 2^{k+\ell} of the
    11annotated strings w⊗{x1}⊗⋯⊗{xk}⊗X1⊗⋯⊗Xℓw \otimes \{x_1\} \otimes \cdots \otimes \{x_k\} \otimes X_1 \otimes \cdots \otimes X_\ell
    12 such that
    13w⊨φ(x1,…,xk,X1,…,Xℓ)w \models \varphi(x_1, \ldots, x_k, X_1, \ldots, X_\ell) is regular
    14(Lemma C.4.2 of *Transducers*). The proof is an induction on the formula, with
    15a nondeterministic automaton guessing the value of a quantified variable.
    16
    17# Formalization notes
    18
    19The free variables are among `0, …, k-1` and `0, …, l-1`; the language is that
    20of the annotations `annotate k l w fo so` of valuations by positions and sets
    21of positions of `w` under which `w` satisfies `φ`. The alphabet is assumed
    22finite.
    23-/
    24
    25namespace Lax314295.MSOFreeVariables
    26
    27open Lax314295.MSOLogic
    28
    29/-- The annotated strings satisfying a formula form a regular language. -/
    30axiom isRegular_annotated {A : Type} [Finite A] (φ : MSO A) (k l : ℕ)
    31 (hfo : φ.freeFO ⊆ {i | i < k}) (hso : φ.freeSO ⊆ {j | j < l}) :
    32 Language.IsRegular
    33 {u : List (A × (Fin k → Bool) × (Fin l → Bool)) |
    34 ∃ (w : List A) (fo : Fin k → ℕ) (so : Fin l → Set ℕ),
    35 (∀ i, fo i < w.length) ∧ (∀ j, so j ⊆ {p | p < w.length}) ∧
    36 u = annotate k l w fo so ∧ MSO.Sat w (extFO k fo) (extSO l so) φ}
    37
    38end Lax314295.MSOFreeVariables
    39
    Show Proof
    Formalization notes

    The free variables are among 0,…,k−10, …, k-1 and 0,…,l−10, …, l-1; the language is that of the annotations annotateklwfosoannotate k l w fo so of valuations by positions and sets of positions of ww under which ww satisfies φφ. The alphabet is assumed finite.

    Builds on
    Used by

    none

    From Mathlib

    none

    Discussion

    Ask a question or add context. Endorsements and structured flags are kept in the review panel above.

    Loading discussion…