Documentation

Linglib.Core.Computability.Subregular.Multitier

Multitier Extensions of Subregular Classes #

Generic Boolean closure of tier-projected language families @cite{lambert-2022} @cite{lambert-2026}. The construction proceeds in two stages:

  1. Tier-projected family IsTierBased ๐’ž L: L is the preimage under some Boolean tier predicate of a language in ๐’ž.
  2. Boolean closure BoolClosure ๐’ž L: L is built from members of ๐’ž via finite intersection, union, and complement.

Composing the two: IsBTC ๐’ž := BoolClosure (IsTierBased ๐’ž) is the multitier (Boolean tier-projected) closure of ๐’ž. Specializing yields the six classes Lambert (2026) tabulates:

Architecture #

A single generic BoolClosure : (Language ฮฑ โ†’ Prop) โ†’ Language ฮฑ โ†’ Prop operator pays for itself across the six specializations and across other "closure-of-X" patterns elsewhere in linglib (IsLocallyTestable is arguably another instance, though kept structurally distinct for now). The mathlib analogue is Probability.Kernel.Defs general + Probability.Kernel.Deterministic specialized โ€” generic operator at the top, one-line abbreviations downstream.

Tier representation: Bool, not Prop+DecidablePred #

IsTierBased quantifies over tier predicates T : ฮฑ โ†’ Bool. The Bool choice avoids the awkward โˆƒ T, โˆƒ _ : DecidablePred T, โ€ฆ quantifier shape and gives a decidable filter operation by construction. The existing tierProject (taking T : ฮฑ โ†’ Prop with [DecidablePred T]) is recoverable via tierProject T = (ยท.filter (decide โˆ˜ T)); the bridge to TSLGrammar lives in Tier.lean.

Decidability #

IsBTC ๐’ž is a Prop-valued classifier; deciding membership of a specific language requires a finite witness (an automaton, a syntactic monoid). The decidability story lives in a separate DFA.isBTC style classifier, deferred to PR-3+.

Boolean closure of a language class #

inductive Core.Computability.Subregular.BoolClosure {ฮฑ : Type u_1} (๐’ž : Language ฮฑ โ†’ Prop) :
Language ฮฑ โ†’ Prop

The Boolean closure of a class of languages ๐’ž: the smallest predicate containing ๐’ž and closed under finite intersection, union, and complement. Free of base-class assumptions; the closure is empty iff ๐’ž is empty.

Constructors are the closure operations themselves; derived stability lemmas (top, bot, sdiff, finite intersections, โ€ฆ) live below or follow mechanically from the four primitives.

  • base {ฮฑ : Type u_1} {๐’ž : Language ฮฑ โ†’ Prop} {L : Language ฮฑ} : ๐’ž L โ†’ BoolClosure ๐’ž L

    Languages in the base class are in the closure.

  • inter {ฮฑ : Type u_1} {๐’ž : Language ฮฑ โ†’ Prop} {Lโ‚ Lโ‚‚ : Language ฮฑ} : BoolClosure ๐’ž Lโ‚ โ†’ BoolClosure ๐’ž Lโ‚‚ โ†’ BoolClosure ๐’ž (Lโ‚ โŠ“ Lโ‚‚)

    Pairwise intersection (lattice โŠ“, equiv. Set.inter via the CompleteAtomicBooleanAlgebra instance derived in mathlib's Language).

  • union {ฮฑ : Type u_1} {๐’ž : Language ฮฑ โ†’ Prop} {Lโ‚ Lโ‚‚ : Language ฮฑ} : BoolClosure ๐’ž Lโ‚ โ†’ BoolClosure ๐’ž Lโ‚‚ โ†’ BoolClosure ๐’ž (Lโ‚ โŠ” Lโ‚‚)

    Pairwise union (lattice โŠ”; mathlib's Language derives the Boolean algebra, so โŠ” is union and + is the same operation under the Kleene algebra alias).

  • compl {ฮฑ : Type u_1} {๐’ž : Language ฮฑ โ†’ Prop} {L : Language ฮฑ} : BoolClosure ๐’ž L โ†’ BoolClosure ๐’ž Lแถœ

    Complement (Boolean algebra แถœ).

Instances For
    theorem Core.Computability.Subregular.BoolClosure.mono {ฮฑ : Type u_1} {๐’ž ๐’Ÿ : Language ฮฑ โ†’ Prop} (h : โˆ€ (L : Language ฮฑ), ๐’ž L โ†’ ๐’Ÿ L) {L : Language ฮฑ} :
    BoolClosure ๐’ž L โ†’ BoolClosure ๐’Ÿ L

    The Boolean closure is monotone in the base class: enlarging ๐’ž enlarges the closure.

    Tier-based language families #

    def Core.Computability.Subregular.IsTierBased {ฮฑ : Type u_1} (๐’ž : Language ฮฑ โ†’ Prop) (L : Language ฮฑ) :

    A language L is tier-based for class ๐’ž iff there is some Boolean tier predicate T : ฮฑ โ†’ Bool and some L' : Language ฮฑ with L' in ๐’ž such that L is the preimage of L' under projection by T: w โˆˆ L โ†” w.filter T โˆˆ L'.

    The Bool tier shape is the existence-friendly form (no instance quantifier issues). For the Prop+DecidablePred form used by tierProject and TSLGrammar, convert via T x โ†” tier x = true (see Tier.lean's TSLGrammar.ofByClass adapter).

    Equations
    Instances For
      theorem Core.Computability.Subregular.IsTierBased.of_class {ฮฑ : Type u_1} {๐’ž : Language ฮฑ โ†’ Prop} {L : Language ฮฑ} (h : ๐’ž L) :
      IsTierBased ๐’ž L

      Class injection: every ๐’ž-language is tier-based for ๐’ž via the universal-true tier (no symbols erased). The witness is T = fun _ => true and L' = L.

      theorem Core.Computability.Subregular.IsTierBased.mono {ฮฑ : Type u_1} {๐’ž ๐’Ÿ : Language ฮฑ โ†’ Prop} (h : โˆ€ (L : Language ฮฑ), ๐’ž L โ†’ ๐’Ÿ L) {L : Language ฮฑ} (hL : IsTierBased ๐’ž L) :
      IsTierBased ๐’Ÿ L

      Monotonicity in the base class.

      Multitier (Boolean tier-projected) closure #

      def Core.Computability.Subregular.IsBTC {ฮฑ : Type u_1} (๐’ž : Language ฮฑ โ†’ Prop) :
      Language ฮฑ โ†’ Prop

      The multitier closure of a class ๐’ž: the Boolean closure of the tier-projected family. Lambert's B(TC) notation.

      Equations
      Instances For
        theorem Core.Computability.Subregular.IsBTC.of_class {ฮฑ : Type u_1} {๐’ž : Language ฮฑ โ†’ Prop} {L : Language ฮฑ} (h : ๐’ž L) :
        IsBTC ๐’ž L

        Class injection into the multitier closure: every ๐’ž-language is in IsBTC ๐’ž. Composed of IsTierBased.of_class (universal tier) and BoolClosure.base.

        theorem Core.Computability.Subregular.IsBTC.of_tierBased {ฮฑ : Type u_1} {๐’ž : Language ฮฑ โ†’ Prop} {L : Language ฮฑ} (h : IsTierBased ๐’ž L) :
        IsBTC ๐’ž L

        Tier-based injection into the multitier closure: every tier-based-for-๐’ž language is in IsBTC ๐’ž.

        theorem Core.Computability.Subregular.IsBTC.mono {ฮฑ : Type u_1} {๐’ž ๐’Ÿ : Language ฮฑ โ†’ Prop} (h : โˆ€ (L : Language ฮฑ), ๐’ž L โ†’ ๐’Ÿ L) {L : Language ฮฑ} :
        IsBTC ๐’ž L โ†’ IsBTC ๐’Ÿ L

        Monotonicity of multitier closure in the base class.

        Specializations: Lambert (2026) Table 6 #

        One line each. Closure under intersection, union, and complement comes from BoolClosure's constructors; class injection from IsBTC.of_class.

        def Core.Computability.Subregular.IsBTSL {ฮฑ : Type u_1} (k : โ„•) :
        Language ฮฑ โ†’ Prop

        Multitier strictly local (BTSL): Boolean closure of tier-projected SL_k languages.

        Equations
        Instances For
          def Core.Computability.Subregular.IsBTSP {ฮฑ : Type u_1} (k : โ„•) :
          Language ฮฑ โ†’ Prop

          Multitier strictly piecewise (BTSP): Boolean closure of tier-projected SP_k languages.

          Equations
          Instances For
            def Core.Computability.Subregular.IsBTD {ฮฑ : Type u_1} (k : โ„•) :
            Language ฮฑ โ†’ Prop

            Multitier definite (BTD): Boolean closure of tier-projected D_k languages. Lambert (2026) ยง4.3 places Uyghur backness harmony in this class โ€” strictly stronger than the multiple-tier-based strictly-local class of @cite{de-santo-graf-2019}.

            Equations
            Instances For
              def Core.Computability.Subregular.IsBTK {ฮฑ : Type u_1} (k : โ„•) :
              Language ฮฑ โ†’ Prop

              Multitier reverse definite (BTK): Boolean closure of tier-projected RD_k languages.

              Equations
              Instances For
                def Core.Computability.Subregular.IsBTLI {ฮฑ : Type u_1} (k : โ„•) :
                Language ฮฑ โ†’ Prop

                Multitier generalized definite (BTLI): Boolean closure of tier-projected โ„’โ„_k languages. Lambert (2026) ยง5.6 places Karanga Shona tone in this class (verb-stem domain) โ€” refining @cite{jardine-2020}.

                Equations
                Instances For
                  def Core.Computability.Subregular.IsBTN {ฮฑ : Type u_1} :
                  Language ฮฑ โ†’ Prop

                  Multitier finite-or-cofinite (BTN): Boolean closure of tier-projected co/finite languages. Captures culminativity-style constraints when projected to the stress tier.

                  Equations
                  Instances For

                    Cross-class inclusions #

                    Class containment lifts through the multitier construction: if ๐’ž โІ ๐’Ÿ pointwise, then IsBTC ๐’ž โІ IsBTC ๐’Ÿ. Specializing yields the standard inclusions BTSL โІ BTSP, BTD โІ BTLI, BTK โІ BTLI, BTN โІ BTLI (per Lambert (2026) Table 6 and the ยง2.4 small hierarchy diagram).

                    theorem Core.Computability.Subregular.IsBTD.toIsBTLI {ฮฑ : Type u_1} {k : โ„•} {L : Language ฮฑ} (h : IsBTD k L) :
                    IsBTLI k L

                    D_k โІ โ„’โ„_k lifts to BTD_k โІ BTLI_k.

                    theorem Core.Computability.Subregular.IsBTK.toIsBTLI {ฮฑ : Type u_1} {k : โ„•} {L : Language ฮฑ} (h : IsBTK k L) :
                    IsBTLI k L

                    RD_k โІ โ„’โ„_k lifts to BTK_k โІ BTLI_k.

                    Bridge: TSL โ†” tier-based SL #

                    TSL_k = IsTierBased (IsStrictlyLocal k). The TSLGrammar-witnessed predicate IsTierStrictlyLocal and the generic preimage-of-SL predicate IsTierBased โˆ˜ IsStrictlyLocal are co-extensive on Language ฮฑ. The bridge gives every existing IsTierStrictlyLocal witness a free IsBTSL corollary via BoolClosure.base.

                    theorem Core.Computability.Subregular.IsTierStrictlyLocal.toIsBTSL {ฮฑ : Type u_1} {k : โ„•} {L : Language ฮฑ} (h : IsTierStrictlyLocal k L) :
                    IsBTSL k L

                    TSL_k โ†’ BTSL_k: every tier-based strictly local language is in the multitier closure of strictly local languages. Combines the bridge with BoolClosure.base.

                    Indistinguishability framework for refuting IsBTC membership #

                    Standard mathematical technique for L โˆ‰ IsBTC ๐’ž: exhibit two words wโ‚, wโ‚‚ that are ๐’ž-tier-indistinguishable (every ๐’ž-language under every Bool tier projection assigns them the same membership) but differ in L-membership. Lambert (2026) ยง4.2 (Tsuut'ina) and ยง5.1 (Luganda) both use this technique with the specialization for IsGeneralizedDefinite k (sharing length-k prefix-and-suffix on every tier projection โ€” see indist_isGenDef_of_tierAffixes).

                    def Core.Computability.Subregular.IsBTC.Indist {ฮฑ : Type u_1} (๐’ž : Language ฮฑ โ†’ Prop) (wโ‚ wโ‚‚ : List ฮฑ) :

                    Two words are ๐’ž-tier-indistinguishable iff under every Bool tier projection, every ๐’ž-language assigns them the same membership.

                    Equations
                    • Core.Computability.Subregular.IsBTC.Indist ๐’ž wโ‚ wโ‚‚ = โˆ€ (T : ฮฑ โ†’ Bool) (L' : Language ฮฑ), ๐’ž L' โ†’ (List.filter T wโ‚ โˆˆ L' โ†” List.filter T wโ‚‚ โˆˆ L')
                    Instances For
                      theorem Core.Computability.Subregular.IsBTC.Indist.refl {ฮฑ : Type u_1} (๐’ž : Language ฮฑ โ†’ Prop) (w : List ฮฑ) :
                      Indist ๐’ž w w
                      theorem Core.Computability.Subregular.IsBTC.Indist.symm {ฮฑ : Type u_1} {๐’ž : Language ฮฑ โ†’ Prop} {wโ‚ wโ‚‚ : List ฮฑ} (h : Indist ๐’ž wโ‚ wโ‚‚) :
                      Indist ๐’ž wโ‚‚ wโ‚
                      theorem Core.Computability.Subregular.IsBTC.mem_iff_of_indist {ฮฑ : Type u_1} {๐’ž : Language ฮฑ โ†’ Prop} {wโ‚ wโ‚‚ : List ฮฑ} {L : Language ฮฑ} (hL : IsBTC ๐’ž L) (hindist : Indist ๐’ž wโ‚ wโ‚‚) :
                      wโ‚ โˆˆ L โ†” wโ‚‚ โˆˆ L

                      Tier-indistinguishability transports through the Boolean closure: wโ‚ and wโ‚‚ ๐’ž-tier-indistinguishable implies same membership in every IsBTC ๐’ž-language. Proof by induction on BoolClosure: base is the defining property of Indist; inter/union/compl lift via and_congr/or_congr/not_congr.

                      theorem Core.Computability.Subregular.not_isBTC_of_indist {ฮฑ : Type u_1} {๐’ž : Language ฮฑ โ†’ Prop} {wโ‚ wโ‚‚ : List ฮฑ} {L : Language ฮฑ} (h_indist : IsBTC.Indist ๐’ž wโ‚ wโ‚‚) (h_wโ‚ : wโ‚ โˆˆ L) (h_wโ‚‚ : wโ‚‚ โˆ‰ L) :
                      ยฌIsBTC ๐’ž L

                      Refutation lemma: if wโ‚ โˆˆ L and wโ‚‚ โˆ‰ L but wโ‚ and wโ‚‚ are ๐’ž-tier-indistinguishable, then L โˆ‰ IsBTC ๐’ž.

                      theorem Core.Computability.Subregular.IsBTC.indist_isGenDef_of_tierAffixes {ฮฑ : Type u_1} {k : โ„•} {wโ‚ wโ‚‚ : List ฮฑ} (h : โˆ€ (T : ฮฑ โ†’ Bool), Edge.left.takeAt k (List.filter T wโ‚) = Edge.left.takeAt k (List.filter T wโ‚‚) โˆง Edge.right.takeAt k (List.filter T wโ‚) = Edge.right.takeAt k (List.filter T wโ‚‚)) :
                      Indist (IsGeneralizedDefinite k) wโ‚ wโ‚‚

                      Shared length-k prefix-and-suffix on every Bool-tier projection implies IsBTC.Indist (IsGeneralizedDefinite k). This is the standard specialization Lambert (2026) ยง4.2 / ยง5.1 use for refuting IsBTLI k membership: producing two words with matching tier-affixes on every tier reduces to providing a Bool-tier-parameterised pair of equalities.