Documentation

Linglib.Phonology.Autosegmental.Floating

Floating autosegmental form (Goldsmith) #

Goldsmith-style autosegmental representation: tier elements (tones, floating segments, features) sit on a tier above the segmental backbone, connected by association lines (links). Multiple tier elements can associate to one backbone position (forming contours); a tier element with no associations is floating. Generic over both backbone type S (the lower tier) and tier-value type T (the upper tier); tonal use instantiates T := TRN, while non-tonal autosegmental work ([LK26]'s floating consonants, [Lie83]'s floating features, [Zim17]'s floating moras and prosodic nodes) chooses other T values.

Main definitions #

Main results #

Implementation notes #

A FloatingForm carries an immutable underlying state (the inherited Graph: lower, upper, links) and a mutable surface state (deletedTier, surfaceLinks); GEN modifies only the surface. A tier element is floating iff it is alive (not deleted) and no surface link references it. This multi-element-per-position encoding (vs. the prior tonalOverwrite) is what [McPL26]'s *CROWD / *FALL constraints require.

gen is a paper-subset (delete tier element, insert/delete link; no insert-and-associate or shift), filtered for no-crossing ([Gol76]). A link is tautomorphemic when its tier element and backbone share a morpheme (*TAUTDOCK, after [Wol07]).

@[reducible, inline]

Index into the upper tier.

Equations
Instances For
    @[reducible, inline]

    Index into the lower tier.

    Equations
    Instances For
      structure Autosegmental.TierSpec (T : Type u_1) :
      Type u_1

      An autosegmental tier element: a value of type T plus morpheme membership. Generalises [Gol76]'s tonal-tier element to arbitrary tier-value types (tones, segments, features).

      • value : T

        The tier value (tone, segment, feature, ...).

      • morpheme : Morpheme
      Instances For
        def Autosegmental.instDecidableEqTierSpec.decEq {T✝ : Type u_1} [DecidableEq T✝] (x✝ x✝¹ : TierSpec T✝) :
        Decidable (x✝ = x✝¹)
        Equations
        Instances For
          @[implicit_reducible]
          instance Autosegmental.instDecidableEqTierSpec {T✝ : Type u_1} [DecidableEq T✝] :
          DecidableEq (TierSpec T✝)
          Equations
          @[implicit_reducible]
          instance Autosegmental.instReprTierSpec {T✝ : Type u_1} [Repr T✝] :
          Repr (TierSpec T✝)
          Equations
          def Autosegmental.instReprTierSpec.repr {T✝ : Type u_1} [Repr T✝] :
          TierSpec T✝Std.Format
          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            structure Autosegmental.SegSpec (S : Type u_1) :
            Type u_1

            A segmental backbone element: segment plus morpheme membership. Generic over the segment type S.

            Instances For
              def Autosegmental.instDecidableEqSegSpec.decEq {S✝ : Type u_1} [DecidableEq S✝] (x✝ x✝¹ : SegSpec S✝) :
              Decidable (x✝ = x✝¹)
              Equations
              Instances For
                @[implicit_reducible]
                instance Autosegmental.instDecidableEqSegSpec {S✝ : Type u_1} [DecidableEq S✝] :
                DecidableEq (SegSpec S✝)
                Equations
                @[implicit_reducible]
                instance Autosegmental.instReprSegSpec {S✝ : Type u_1} [Repr S✝] :
                Repr (SegSpec S✝)
                Equations
                def Autosegmental.instReprSegSpec.repr {S✝ : Type u_1} [Repr S✝] :
                SegSpec S✝Std.Format
                Equations
                • One or more equations did not get rendered due to their size.
                Instances For

                  FloatingForm #

                  FloatingForm S T is an autosegmental form with segmental backbone of type S and tier-value type T. Tonal use chooses T := TRN; non-tonal autosegmental work chooses other T values ([LK26], [Lie83]). The OT-style bookkeeping (deletedTier, surfaceLinks vs underlying links) is language-independent.

                  structure Autosegmental.FloatingForm (S : Type u_1) (T : Type u_2) extends Autosegmental.Graph (Autosegmental.TierSpec T) (Autosegmental.SegSpec S) :
                  Type (max u_1 u_2)

                  An autosegmental form: extends Graph (TierSpec T) (SegSpec S) with OT-style surface bookkeeping. The inherited Graph is the underlying representation; deletedTier and surfaceLinks track the surface state separately.

                  Instances For
                    @[implicit_reducible]
                    instance Autosegmental.instDecidableEqFloatingForm {S✝ : Type u_1} {T✝ : Type u_2} [DecidableEq S✝] [DecidableEq T✝] :
                    DecidableEq (FloatingForm S✝ T✝)
                    Equations
                    def Autosegmental.instDecidableEqFloatingForm.decEq {S✝ : Type u_1} {T✝ : Type u_2} [DecidableEq S✝] [DecidableEq T✝] (x✝ x✝¹ : FloatingForm S✝ T✝) :
                    Decidable (x✝ = x✝¹)
                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For
                      @[implicit_reducible]
                      instance Autosegmental.instReprFloatingForm {S : Type u_1} {T : Type u_2} [Repr S] [Repr T] :
                      Repr (FloatingForm S T)

                      Hides the Finset fields (mathlib's Finset.Repr is unsafe) and prints only segments and underlying tier elements; debug-only.

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

                      Surface graph (derived view) #

                      @[reducible]

                      The surface graph: same tiers as the underlying graph but with surfaceLinks in place of links. Makes the underlying/surface duality explicit — both states are Graphs sharing tier data.

                      Equations
                      Instances For

                        Construction #

                        def Autosegmental.FloatingForm.mkInput {S : Type u_1} {T : Type u_2} (lower : List (SegSpec S)) (upper : List (TierSpec T)) (links : Finset Link) :

                        Construct an input form: surface state mirrors underlying state, nothing deleted, all underlying links intact.

                        Equations
                        Instances For

                          Morphemic structure #

                          def Autosegmental.FloatingForm.upperMorpheme? {S : Type u_1} {T : Type u_2} (f : FloatingForm S T) (k : TierIdx) :
                          Option Morpheme

                          The morpheme of the k-th upper-tier element, or none if out of range.

                          Equations
                          Instances For
                            def Autosegmental.FloatingForm.lowerMorpheme? {S : Type u_1} {T : Type u_2} (f : FloatingForm S T) (i : SegIdx) :
                            Option Morpheme

                            The morpheme of the i-th lower-tier element, or none if out of range.

                            Equations
                            Instances For
                              def Autosegmental.FloatingForm.morphemes {S : Type u_1} {T : Type u_2} (f : FloatingForm S T) :
                              Finset Morpheme

                              Every morpheme occurring on either tier.

                              Equations
                              Instances For
                                @[reducible, inline]
                                abbrev Autosegmental.FloatingForm.IsAlive {S : Type u_1} {T : Type u_2} (f : FloatingForm S T) (k : TierIdx) :

                                The upper-tier element at index k is alive (not deleted). The structural primitive; IsDeleted is its negation.

                                Equations
                                Instances For
                                  @[reducible, inline]
                                  abbrev Autosegmental.FloatingForm.IsDeleted {S : Type u_1} {T : Type u_2} (f : FloatingForm S T) (k : TierIdx) :

                                  The upper-tier element at index k is deleted. Sugar for ¬ IsAlive.

                                  Equations
                                  Instances For
                                    @[reducible, inline]
                                    abbrev Autosegmental.FloatingForm.IsLinked {S : Type u_1} {T : Type u_2} (f : FloatingForm S T) (k : TierIdx) :

                                    The upper-tier element at index k is linked to a backbone position on the surface.

                                    Equations
                                    Instances For
                                      @[reducible, inline]
                                      abbrev Autosegmental.FloatingForm.IsFloating {S : Type u_1} {T : Type u_2} (f : FloatingForm S T) (k : TierIdx) :

                                      The upper-tier element at index k is floating: in-bounds, alive (not deleted), and unlinked. The in-bounds guard mirrors the substrate's Graph.IsFloatingUpper, so out-of-range indices are not spuriously floating.

                                      Equations
                                      Instances For
                                        @[reducible, inline]
                                        abbrev Autosegmental.FloatingForm.IsTautomorphemic {S : Type u_1} {T : Type u_2} (f : FloatingForm S T) (l : Link) :

                                        A surface link (k, i) is tautomorphemic iff its upper- and lower-tier endpoints share a morpheme. Out-of-range indices on either side make this false.

                                        Equations
                                        Instances For

                                          Faithfulness: surface vs underlying #

                                          Atomic GEN operations #

                                          Delete the underlying upper-tier element at index k. Cascades to remove any surface link referencing it.

                                          Equations
                                          Instances For

                                            Well-formedness: no crossing lines #

                                            @[reducible, inline]
                                            abbrev Autosegmental.FloatingForm.Crosses {S : Type u_1} {T : Type u_2} (f : FloatingForm S T) (k : TierIdx) (i : SegIdx) :

                                            A candidate link (k, i) would cross an existing surface link. Wraps the substrate IndexCrosses on the candidate link (k, i); IsNonCrossing (via mathlib's MonovaryOn) provides the set-level NCC and inherits mathlib's lemma library.

                                            Equations
                                            Instances For

                                              GEN: one-step candidate generation #

                                              def Autosegmental.FloatingForm.gen {S : Type u_1} {T : Type u_2} [DecidableEq S] [DecidableEq T] (f : FloatingForm S T) :
                                              Finset (FloatingForm S T)

                                              One-step GEN: the faithful candidate, deleting each alive tone, and (for each FLOATING tone) inserting a link to each TBU that doesn't cross an existing link. One operation per step, after [McCMS12]; a subset of [McPL26]'s operation set (omits insert-and-associate and shift). The no-crossing filter ([Gol76]) enforces well-formedness: without it a floating tone could dock across an intervening linked tone.

                                              Equations
                                              • One or more equations did not get rendered due to their size.
                                              Instances For
                                                theorem Autosegmental.FloatingForm.gen_preserves_isPlanar {S : Type u_1} {T : Type u_2} [DecidableEq S] [DecidableEq T] (f : FloatingForm S T) (h : f.surfaceGraph.IsPlanar) (g : FloatingForm S T) :
                                                g f.geng.surfaceGraph.IsPlanar

                                                GEN preserves the no-crossing WFC ([Gol76] / [Pul86]). If the surface graph is planar, every one-step GEN candidate is too: deletes shrink the surface link set (IsNonCrossing.subset), and each inserted link passed the ¬ Crosses filter (IsNonCrossing.insert_of_not_indexCrosses). So gen is closed on the structural well-formedness condition.

                                                Indicator vectors for constraint evaluation #

                                                def Autosegmental.FloatingForm.floatIndicator {S : Type u_1} {T : Type u_2} (f : FloatingForm S T) :
                                                List

                                                Indicator vector of floating upper-tier elements, in tier order: entry k is 1 iff upper[k] is currently floating, else 0. Drives directional floating constraints (e.g. *FLOAT).

                                                Equations
                                                Instances For
                                                  def Autosegmental.FloatingForm.linksTo {S : Type u_1} {T : Type u_2} (f : FloatingForm S T) (i : SegIdx) :
                                                  List TierIdx

                                                  Upper-tier elements surface-linked to backbone position i, in tier order (smallest index first). List.range-based so the result is naturally sorted and reduces under kernel decide (avoiding Finset.sort, which doesn't unfold structurally).

                                                  Equations
                                                  Instances For
                                                    def Autosegmental.FloatingForm.tierValues {S : Type u_1} {T : Type u_2} (f : FloatingForm S T) (i : SegIdx) :
                                                    List T

                                                    Sequence of tier values linked to backbone position i, in tier order.

                                                    Equations
                                                    Instances For

                                                      Tier and morpheme subsequences #

                                                      Indices of alive (non-deleted) underlying upper-tier elements, in tier order; List.range-based so it reduces under kernel decide.

                                                      Equations
                                                      Instances For
                                                        def Autosegmental.FloatingForm.segsOfMorpheme {S : Type u_1} {T : Type u_2} (f : FloatingForm S T) (m : Morpheme) :
                                                        List SegIdx

                                                        Lower-tier (backbone) indices belonging to morpheme m, in order. Out-of-range indices are excluded by construction.

                                                        Equations
                                                        Instances For

                                                          Position counts #

                                                          def Autosegmental.FloatingForm.countUpper {S : Type u_1} {T : Type u_2} (f : FloatingForm S T) (p : TierIdxProp) [DecidablePred p] :

                                                          Count upper-tier positions satisfying decidable p. List.range-based so it reduces under kernel decide (avoiding Finset pipelines).

                                                          Equations
                                                          Instances For
                                                            def Autosegmental.FloatingForm.countLower {S : Type u_1} {T : Type u_2} (f : FloatingForm S T) (p : SegIdxProp) [DecidablePred p] :

                                                            Count lower-tier (backbone) positions satisfying decidable p.

                                                            Equations
                                                            Instances For