Documentation

Linglib.Phonology.Subregular.Harmony

Harmony systems #

A harmony system in the [RW11] typological decomposition: a distinctive feature value spreads from trigger segments to target segments, optionally skipping transparent segments and halting at opaque blockers ([RW11], [Bel26]). System couples the tier-based AGREE recognizer with the transduction discipline that turns it into a structure-changing map.

System is alphabet-generic; at each concrete alphabet it instantiates to a familiar finite-state object — transduce to a subsequential transducer whose only state is one lens readout (at Turkish's alphabet, the classic two-state front/back machine), the recognizer to a last-trigger-decides subsequential function. The theorems are proved once, generically; every instantiation inherits them. Finiteness is supplied at instantiation, not in the structure (mathlib's DFA convention: [Fintype α] appears only on the theorems that consume it).

Main definitions #

Main results #

Implementation notes #

This is the tier-based (TSL/OSL) analysis — one live account, not a settled reduction: autosegmental spreading ([Gol76]), Agreement-by-Correspondence ([RW04a]), and OT SPREAD/ALIGN remain rivals with divergent predictions on transparency and opacity, and the single-tier commitment is not universally adequate — Uyghur backness harmony is provably non-TSL ([MM18]). Only the identity-tier case is currently proved subsequential. The theory-neutral pattern vocabulary the rival accounts share lives in Phonology/Harmony/Basic.lean; language instances live in Fragments/{Turkish,Finnish,Hungarian}/VowelHarmony.lean.

Direction #

System — a pattern plus its transduction discipline #

Write harmonic value v into a segment's feature slot: the function-type lens (Lens.proj) written at feature.

Equations
Instances For
    structure Subregular.Harmony.System (α : Type u_1) :
    Type u_1

    A harmony system: the descriptive Phonology.Harmony.Pattern (valuation, blockers, transparency, direction) plus the mechanism-side residue — the trigger context, the targets, and the feature write.

    • pattern : Phonology.Harmony.Pattern α Bool

      The descriptive pattern the system realizes.

    • targetIsContext : αProp

      The natural class of triggering context segments.

    • decContext : DecidablePred self.targetIsContext
    • isTarget : αProp

      Which segments undergo the feature change.

    • decTarget' : DecidablePred self.isTarget
    • write : Boolαα

      Write the harmonic value into a segment.

    • value_write (v : Bool) (s : α) : self.pattern.value (self.write v s) = some v

      Reading back a written value gives that value.

    Instances For
      def Subregular.Harmony.System.isBlocker {α : Type u_1} (sys : System α) (s : α) :

      Opaque blockers, read off the pattern.

      Equations
      Instances For
        @[instance_reducible]
        instance Subregular.Harmony.instDecidablePredIsBlocker {α : Type u_1} (sys : System α) :
        DecidablePred sys.isBlocker
        Equations
        def Subregular.Harmony.System.lens {α : Type u_1} (sys : System α) :
        Lens α Bool

        The system's lens: (pattern.value, write) with the put-get law. The slot readout is the only state the OSL transducer carries.

        Equations
        Instances For

          The recognizer core, derived from the pattern: an agree TierRule over the pattern's tier, reading the pattern's valuation from the pattern's side.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            def Subregular.Harmony.System.mk' (feature : Phonology.Feature) (isTrigger isTarget isTransparent : Phonology.SegmentBool) (direction : Phonology.Harmony.Direction := Phonology.Harmony.Direction.rightward) (isBlocker : Phonology.SegmentBool := fun (x : Phonology.Segment) => false) :

            Compile the [RW11] six-way decomposition into a System; Bool lambdas are stored as the decidable Prop fields.

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

              Recovering the Rose-Walker Typology #

              @[inline]
              def Subregular.Harmony.isTrigger {α : Type u_1} (sys : System α) (s : α) :
              Bool

              The trigger predicate: Bool accessor for targetIsContext.

              Equations
              Instances For

                Harmony Domain #

                def Subregular.Harmony.harmonyDomain {α : Type u_1} (sys : System α) (stem : List α) :
                List α

                The stem portion governing suffix harmony: everything after (rightward) or before (leftward) the blocker nearest the suffix.

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

                  Trigger Value Extraction #

                  def Subregular.Harmony.triggerValue {α : Type u_1} (sys : System α) (stem : List α) :
                  Option Bool

                  The harmony value predicted at the suffix slot: the recognizer applied to the harmony domain.

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

                    Segment-Level Harmony #

                    def Subregular.Harmony.harmonizeOne {α : Type u_1} (sys : System α) (val : Bool) (s : α) :
                    α

                    Set a target's harmony feature to the given value; non-targets are unchanged.

                    Equations
                    Instances For

                      Suffix Spreading (convenience over the recognizer) #

                      def Subregular.Harmony.spreadSuffix {α : Type u_1} (sys : System α) (val : Bool) (suffix : List α) :
                      List α

                      Walk a suffix: blockers halt spreading, targets harmonize, all else passes through. For the re-triggering subregular semantics, see transduce.

                      Equations
                      Instances For

                        Transducer grounding — harmony as an OSL function #

                        def Subregular.Harmony.System.spreadRule {α : Type u_1} (sys : System α) :
                        OSLRule 2 α α

                        Harmony as a 2-OSL rule ([CEH15]): each target copies the harmonic value of the preceding output segment; blockers re-trigger.

                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For
                          def Subregular.Harmony.System.transduce {α : Type u_1} (sys : System α) :
                          List αList α

                          The harmonized-string function of a harmony system: the OSL transduction.

                          Equations
                          Instances For

                            The harmonized string is 2-OSL by construction.

                            Properties #

                            theorem Subregular.Harmony.harmonizeOne_nontarget {α : Type u_1} {sys : System α} {val : Bool} {s : α} (h : ¬sys.isTarget s) :
                            harmonizeOne sys val s = s

                            Non-target segments are unchanged by harmonization.

                            theorem Subregular.Harmony.spreadSuffix_nil {α : Type u_1} {sys : System α} {val : Bool} :
                            spreadSuffix sys val [] = []

                            Spreading through an empty suffix returns an empty list.

                            theorem Subregular.Harmony.spreadSuffix_length {α : Type u_1} {sys : System α} {val : Bool} (suffix : List α) :
                            (spreadSuffix sys val suffix).length = suffix.length

                            Spreading preserves length: blocked segments are kept, not removed.

                            theorem Subregular.Harmony.harmonyDomain_no_blockers {α : Type u_1} {sys : System α} {stem : List α} (h : sstem, ¬sys.isBlocker s) :
                            harmonyDomain sys stem = stem

                            The harmony domain is the full stem when there are no blockers.

                            theorem Subregular.Harmony.spreadSuffix_blocker {α : Type u_1} {sys : System α} {val : Bool} {s : α} {rest : List α} (hb : sys.isBlocker s) :
                            spreadSuffix sys val (s :: rest) = s :: rest

                            A leading blocker halts spreading: the suffix is returned unchanged.

                            theorem Phonology.Harmony.Pattern.harmonic_iff_mem_tsl {α : Type u_1} {V : Type u_2} (p : Pattern α V) (w : List α) :
                            p.Harmonic w w (Subregular.TSLGrammar.ofForbiddenPairs (fun (x1 x2 : α) => ¬p.Compatible x1 x2) p.OnTier).lang

                            Harmony is TSL₂ by construction: the tier supplies both the unbounded distance strictly local grammars lack and the blocking strictly piecewise grammars lack ([ARGH24]; for the latter, McMullin2016.blockingLang_not_isStrictlyPiecewise).