Documentation

Linglib.Core.Computability.SyntacticMonoid.Pin

Pin's algebraic characterization of subregular language classes #

The classical algebraic-automata-theory characterization of four basic subregular varieties via omega-power equations on the syntactic monoid:

VarietyEquationMeaning
𝒟 (definite)s · [w]^ω = [w]^ωleft-absorbing
𝒦 (reverse-definite)[w]^ω · s = [w]^ωright-absorbing
𝒩 (co/finite)both 𝒟's and 𝒦'sboth-sided absorbing
ℒℐ (generalized definite)[w]^ω · s · [w]^ω = [w]^ωsandwich-absorbing

Where [w]^ω = Monoid.omegaPow (L.toSyntacticMonoid (FreeMonoid.ofList w)) is the unique idempotent in the cyclic submonoid of [w] (see Linglib/Core/Algebra/IdempotentPower.lean). The variables s range over L.syntacticMonoid and w over non-empty List α (alphabet-relativized form — see Equations.lean for the trivial-letter counterexample motivating the non-empty-w restriction).

Why omega-power and not finite-k? #

@cite{lambert-2026} Props 53/57 (in Equations.lean) give finite-k characterizations parameterized by the suffix/prefix length k. Pin's forms are the unbounded versions: a single k-free equation in the syntactic monoid characterizes membership in the variety. The omegaPow substrate is what eliminates the k parameter.

The two characterizations cohere: IsDefinite k L → kDefiniteEquation L k is the finite-k half; (∃ k, IsDefinite k L) ↔ pinDefiniteEquation L is the unbounded half. The unbounded form is the natural Pin/Eilenberg form used throughout algebraic automata theory.

Main definitions #

All four require [Finite L.syntacticMonoid] (equivalent to L being regular, by IsRegular.finite_syntacticMonoid).

Main results #

References #

def Language.pinDefiniteEquation {α : Type u_1} (L : Language α) [Finite L.syntacticMonoid] :

Pin's algebraic equation for definite languages: ∀ s : L.syntacticMonoid, ∀ w : List α, w ≠ [] → s · [w]^ω = [w]^ω.

The non-empty w quantifier (alphabet-relativized form) handles the trivial-letter case the same way kDefiniteEquation does — see the counterexample in Equations.lean. Despite living in a sibling file to Lambert's kDefiniteEquation, this is a classical Pin/Eilenberg omega-power equation, not Lambert-specific — hence the namespace is Language (no author-named namespace).

Equations
  • One or more equations did not get rendered due to their size.
Instances For

    Pin's theorem (forward direction): if L is k-definite for some k, then its syntactic monoid satisfies Pin's omega-power equation.

    Proof: reduce to IsDefinite.satisfies_kDefiniteEquation plus the absorbing-power trick — [w]^ω = [w]^N for some N, and by idempotence [w]^N = [w]^(N·k) whenever k ≥ 1, giving a long-enough representative w^(N·k) (length N·k·|w| ≥ k) of [w]^ω. The k = 0 case forces the syntactic monoid to be trivial, so the equation holds vacuously.

    Pin's theorem (reverse direction): if a regular language's syntactic monoid satisfies Pin's omega-power equation, then L is k-definite for some k (specifically, k = Fintype.card L.syntacticMonoid).

    Pin's theorem: a language is k-definite for some k iff its (necessarily finite) syntactic monoid satisfies Pin's omega-power equation.

    def Language.pinReverseDefiniteEquation {α : Type u_1} (L : Language α) [Finite L.syntacticMonoid] :

    Pin's algebraic equation for reverse-definite languages (@cite{lambert-2026} Prop 57 limit; @cite{almeida-1995}): ∀ s : L.syntacticMonoid, ∀ w : List α, w ≠ [] → [w]^ω · s = [w]^ω.

    Mirror of pinDefiniteEquation with right-multiplication instead of left. Same alphabet-relativized non-empty w quantifier.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For

      Pin's K-theorem (forward direction): a reverse-k-definite language's syntactic monoid satisfies Pin's right-absorbing omega-power equation. Mirror of IsDefinite.satisfies_pinDefiniteEquation.

      Pin's K-theorem (reverse direction): if a regular language's syntactic monoid satisfies Pin's reverse-definite omega-power equation, then L is reverse-k-definite for some k.

      Pin's K-theorem: a language is reverse-k-definite for some k iff its (necessarily finite) syntactic monoid satisfies Pin's reverse-definite omega-power equation.

      def Language.pinCofiniteEquation {α : Type u_1} (L : Language α) [Finite L.syntacticMonoid] :

      Pin's algebraic equation for co/finite languages (@cite{lambert-2026} Prop 59; @cite{almeida-1995}): 𝒩 = ⟦sx^ω = x^ω = x^ω s⟧. The conjunction of D's left-absorbing equation and K's right-absorbing equation.

      Equations
      Instances For

        Pin's N-theorem (forward direction): a finite-or-cofinite language's syntactic monoid satisfies the conjunction of Pin's D and K omega-power equations. Composes the substrate lemma IsFiniteOrCofinite.exists_isDefinite_and_isReverseDefinite (in Subregular/Definite.lean) with the Pin D and Pin K iff theorems.

        Pin's N-theorem (reverse direction, α-finite case): if a language over a finite alphabet has a syntactic monoid satisfying both Pin's D and K equations, then it is finite-or-cofinite.

        Requires [Finite α] because the language-level reverse direction (isFiniteOrCofinite_of_isDefinite_and_isReverseDefinite in Subregular/Definite.lean) needs it: with infinite α, words of bounded length need not form a finite set.

        Pin's N-theorem: over a finite alphabet, a language is finite-or-cofinite iff its syntactic monoid satisfies the conjunction of Pin's D and K omega-power equations.

        def Language.pinGeneralizedDefiniteEquation {α : Type u_1} (L : Language α) [Finite L.syntacticMonoid] :

        Pin's algebraic equation for generalized-definite languages (@cite{lambert-2026} Prop 58 limit, simplified form; @cite{straubing-1985}): ℒℐ = ⟦x^ω · s · x^ω = x^ω⟧. Sandwiching s between two copies of the same omega-power absorbs s.

        Lambert (paper p. 25) notes this simplified one-variable form is equivalent to the more general two-variable form x^ω · s · z^ω = x^ω · z^ω; the equivalence proof itself uses omega-power idempotence.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For

          Pin's ℒℐ-theorem (forward direction): a generalized-k-definite language's syntactic monoid satisfies the LI omega-power equation.

          Strategy: pick v = w^(N·k) long enough (length ≥ k); apply IsGeneralizedDefinite k L directly to the pair (v ++ s' ++ v, v) — both have the same length-k left-prefix (the first k chars of v) and same length-k right-suffix (the last k chars of v). The omega-power identity [w]^N · s · [w]^N = [w]^N follows by lifting through [w]^(N·k) = omegaPow [w].

          Pin's ℒℐ-theorem (reverse direction): if a regular language's syntactic monoid satisfies Pin's LI omega-power equation, then L is generalized-k-definite for some k (specifically, k = Nat.card L.syntacticMonoid).

          Proof: sandwich_absorbing_of_pinGeneralizedDefiniteEquation lifts the omega-power equation to a finite-k sandwich on length-k words; this is exactly kGeneralizedDefiniteEquation L k, which by Lambert Prop 58 (reverse direction in Equations.lean) gives IsGeneralizedDefinite k L.

          Pin's ℒℐ-theorem: a language is generalized-k-definite for some k iff its syntactic monoid satisfies Pin's LI omega-power equation.