Documentation

Linglib.Phonology.Subregular.Multitier

Multitier extensions of subregular classes #

A tier projection erases the symbols off a tier T : ฮฑ โ†’ Bool. The multitier closure IsBTC ๐’ž of a class ๐’ž : Language ฮฑ โ†’ Prop is the Boolean algebra generated by the preimages of ๐’ž-languages under tier projections.

Main definitions #

Main results #

Implementation notes #

IsTierBased/IsBTC.Indist quantify over Bool tiers T : ฮฑ โ†’ Bool, avoiding an โˆƒ T, โˆƒ _ : DecidablePred T, โ€ฆ witness. A Prop tier with [DecidablePred], as in TierStrictlyLocalGrammar, projects by the filter of its decide, which is already a Bool tier, so isTierStrictlyLocal_iff_isTierBased needs no conversion lemma.

References #

Tier-based language families #

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

A language is tier-based for a class ๐’ž when it is the preimage of a ๐’ž-language under the projection to some Boolean tier.

Equations
  • Language.IsTierBased ๐’ž L = โˆƒ (T : ฮฑ โ†’ Bool) (L' : Language ฮฑ), L = {w : List ฮฑ | List.filter T w โˆˆ L'} โˆง ๐’ž L'
Instances For
    theorem Language.IsTierBased.of_class {ฮฑ : Type u_1} {๐’ž : Language ฮฑ โ†’ Prop} {L : Language ฮฑ} (h : ๐’ž L) :
    IsTierBased ๐’ž L

    Every ๐’ž-language is tier-based for ๐’ž via the universal tier, which erases no symbol.

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

    Monotonicity in the base class.

    The multitier closure #

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

    The multitier closure of a class ๐’ž is the Boolean subalgebra of Language ฮฑ generated by the tier-projected family IsTierBased ๐’ž.

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

      A tier-based language lies in the closure.

      theorem Language.IsBTC.inter {ฮฑ : Type u_1} {๐’ž : Language ฮฑ โ†’ Prop} {Lโ‚ Lโ‚‚ : Language ฮฑ} (hโ‚ : IsBTC ๐’ž Lโ‚) (hโ‚‚ : IsBTC ๐’ž Lโ‚‚) :
      IsBTC ๐’ž (Lโ‚ โŠ“ Lโ‚‚)

      Closure under intersection.

      theorem Language.IsBTC.union {ฮฑ : Type u_1} {๐’ž : Language ฮฑ โ†’ Prop} {Lโ‚ Lโ‚‚ : Language ฮฑ} (hโ‚ : IsBTC ๐’ž Lโ‚) (hโ‚‚ : IsBTC ๐’ž Lโ‚‚) :
      IsBTC ๐’ž (Lโ‚ โŠ” Lโ‚‚)

      Closure under union.

      theorem Language.IsBTC.compl {ฮฑ : Type u_1} {๐’ž : Language ฮฑ โ†’ Prop} {L : Language ฮฑ} (h : IsBTC ๐’ž L) :
      IsBTC ๐’ž Lแถœ

      Closure under complement.

      theorem Language.IsBTC.of_class {ฮฑ : Type u_1} {๐’ž : Language ฮฑ โ†’ Prop} {L : Language ฮฑ} (h : ๐’ž L) :
      IsBTC ๐’ž L

      Every ๐’ž-language is in IsBTC ๐’ž, via the universal tier.

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

      Monotonicity of multitier closure in the base class.

      Specializations #

      Each class of the paper is the multitier closure of a base class, so it is closed under the Boolean operations by IsBTC.inter, IsBTC.union and IsBTC.compl and contains the base class by IsBTC.of_class.

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

      The multitier locally testable languages (BTSL) are the Boolean closure of the tier-projected SL_k languages.

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

        The multitier strictly piecewise languages (BTSP) are the Boolean closure of the tier-projected SP_k languages.

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

          The multitier definite languages (BTD) are the Boolean closure of the tier-projected D_k languages.

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

            The multitier reverse definite languages (BTK) are the Boolean closure of the tier-projected RD_k languages.

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

              The multitier generalized definite languages (BTLI) are the Boolean closure of the tier-projected โ„’โ„_k languages.

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

                The multitier finite-or-cofinite languages (BTN) are the Boolean closure of the tier-projected co/finite languages.

                Equations
                Instances For

                  Cross-class inclusions #

                  An inclusion of base classes lifts to their multitier closures by IsBTC.mono.

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

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

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

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

                  Tier literals #

                  The literals of a propositional logic over tier affixes: the words whose projection to a tier T is exactly xs, begins with xs, or ends in xs. Each lies in the multitier extension of the class its affix belongs to, with a window at least the length of the affix (strictly more for a whole tier word).

                  def Language.tierWord {ฮฑ : Type u_1} (T : ฮฑ โ†’ Bool) (xs : List ฮฑ) :
                  Language ฮฑ

                  The tier word [โ‹Šxsโ‹‰]_T is the set of words whose projection to the tier T is xs.

                  Equations
                  Instances For
                    def Language.tierPrefix {ฮฑ : Type u_1} (T : ฮฑ โ†’ Bool) (xs : List ฮฑ) :
                    Language ฮฑ

                    The tier prefix [โ‹Šxs]_T is the set of words whose projection to T begins with xs.

                    Equations
                    Instances For
                      def Language.tierSuffix {ฮฑ : Type u_1} (T : ฮฑ โ†’ Bool) (xs : List ฮฑ) :
                      Language ฮฑ

                      The tier suffix [xsโ‹‰]_T is the set of words whose projection to T ends in xs.

                      Equations
                      Instances For
                        @[simp]
                        theorem Language.mem_tierWord {ฮฑ : Type u_1} {T : ฮฑ โ†’ Bool} {xs w : List ฮฑ} :
                        w โˆˆ tierWord T xs โ†” List.filter T w = xs
                        @[simp]
                        theorem Language.mem_tierPrefix {ฮฑ : Type u_1} {T : ฮฑ โ†’ Bool} {xs w : List ฮฑ} :
                        w โˆˆ tierPrefix T xs โ†” xs <+: List.filter T w
                        @[simp]
                        theorem Language.mem_tierSuffix {ฮฑ : Type u_1} {T : ฮฑ โ†’ Bool} {xs w : List ฮฑ} :
                        w โˆˆ tierSuffix T xs โ†” xs <:+ List.filter T w
                        theorem Language.isBTN_tierWord {ฮฑ : Type u_1} (T : ฮฑ โ†’ Bool) (xs : List ฮฑ) :
                        theorem Language.isBTD_tierWord {ฮฑ : Type u_1} {k : โ„•} (T : ฮฑ โ†’ Bool) (xs : List ฮฑ) (hk : xs.length < k) :
                        IsBTD k (tierWord T xs)
                        theorem Language.isBTK_tierWord {ฮฑ : Type u_1} {k : โ„•} (T : ฮฑ โ†’ Bool) (xs : List ฮฑ) (hk : xs.length < k) :
                        IsBTK k (tierWord T xs)
                        theorem Language.isBTK_tierPrefix {ฮฑ : Type u_1} {k : โ„•} (T : ฮฑ โ†’ Bool) (xs : List ฮฑ) (hk : xs.length โ‰ค k) :
                        IsBTK k (tierPrefix T xs)
                        theorem Language.isBTD_tierSuffix {ฮฑ : Type u_1} {k : โ„•} (T : ฮฑ โ†’ Bool) (xs : List ฮฑ) (hk : xs.length โ‰ค k) :
                        IsBTD k (tierSuffix T xs)
                        theorem Language.isBTK_ofPrefix {ฮฑ : Type u_1} {k : โ„•} (xs : List ฮฑ) (hk : xs.length โ‰ค k) :
                        theorem Language.isBTD_ofSuffix {ฮฑ : Type u_1} {k : โ„•} (xs : List ฮฑ) (hk : xs.length โ‰ค k) :

                        Tier-based strictly local languages #

                        theorem Language.isTierStrictlyLocal_iff_isTierBased {ฮฑ : Type u_1} {L : Language ฮฑ} {k : โ„•} :
                        IsTierStrictlyLocal k L โ†” IsTierBased (fun (x : Language ฮฑ) => x.IsStrictlyLocal k) L

                        The tier-based strictly k-local languages are the tier-based closure of the strictly k-local ones, since a TierStrictlyLocalGrammar is a tier together with an SL_k language pulled back along erasure of the off-tier symbols.

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

                        Every tier-based strictly local language lies in the multitier closure of strictly local languages.

                        Refuting membership by indistinguishability #

                        A language lies outside IsBTC ๐’ž when it separates two words that every ๐’ž-language assigns the same membership under every tier projection. For the generalized definite languages it suffices that the two words share their length-k prefix and suffix on every tier.

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

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

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

                          Two ๐’ž-tier-indistinguishable words have the same membership in every IsBTC ๐’ž-language.

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

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

                          theorem Language.IsBTC.indist_isGeneralizedDefinite_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 (fun (x : Language ฮฑ) => x.IsGeneralizedDefinite k) wโ‚ wโ‚‚

                          Two words sharing their length-k prefix and suffix on every Bool tier are indistinguishable by the tier-projected generalized k-definite languages.

                          Varieties of languages #

                          A tier projection is the free monoid endomorphism FreeMonoid.filter T, and a variety of languages is a Boolean algebra closed under inverse images of such endomorphisms, so it contains the multitier closure of any class it contains.

                          theorem Language.IsBTC.mem_languageVariety {ฮฑ : Type u_1} {๐’ž : Language ฮฑ โ†’ Prop} {L : Language ฮฑ} {๐’ฑ : Monoid.LanguageVariety} (h๐’ž : โˆ€ (L : Language ฮฑ), ๐’ž L โ†’ L โˆˆ ๐’ฑ ฮฑ) (h : IsBTC ๐’ž L) :
                          L โˆˆ ๐’ฑ ฮฑ

                          The multitier closure of ๐’ž lies in every variety of languages containing ๐’ž.

                          theorem Language.IsBTC.isStarFree {ฮฑ : Type u_1} {๐’ž : Language ฮฑ โ†’ Prop} {L : Language ฮฑ} (h๐’ž : โˆ€ (L : Language ฮฑ), ๐’ž L โ†’ L.IsStarFree) (h : IsBTC ๐’ž L) :

                          The multitier closure of a star-free base class is star-free.

                          theorem Language.IsBTSL.isStarFree {ฮฑ : Type u_1} {L : Language ฮฑ} {k : โ„•} [Finite ฮฑ] (h : IsBTSL k L) :
                          theorem Language.IsBTSP.isStarFree {ฮฑ : Type u_1} {L : Language ฮฑ} {k : โ„•} [Finite ฮฑ] (h : IsBTSP k L) :
                          theorem Language.IsBTLI.isStarFree {ฮฑ : Type u_1} {L : Language ฮฑ} {k : โ„•} [Finite ฮฑ] (h : IsBTLI k L) :
                          theorem Language.IsBTD.isStarFree {ฮฑ : Type u_1} {L : Language ฮฑ} {k : โ„•} [Finite ฮฑ] (h : IsBTD k L) :
                          theorem Language.IsBTK.isStarFree {ฮฑ : Type u_1} {L : Language ฮฑ} {k : โ„•} [Finite ฮฑ] (h : IsBTK k L) :
                          theorem Language.IsBTN.isStarFree {ฮฑ : Type u_1} {L : Language ฮฑ} [Finite ฮฑ] (h : L.IsBTN) :