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) (M : Type u_2) :
      Type (max u_1 u_2)

      An autosegmental tier element: a value of type T plus its sponsoring morpheme identity M. Generalises [Gol76]'s tonal-tier element to arbitrary tier-value types (tones, segments, features) and an opaque sponsor.

      • value : T

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

      • morpheme : M

        The sponsoring morpheme identity (opaque).

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

            A segmental backbone element: segment plus its sponsoring morpheme identity. Generic over the segment type S and sponsor type M.

            • seg : S
            • morpheme : M

              The sponsoring morpheme identity (opaque).

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

                  FloatingForm #

                  FloatingForm S T M is an autosegmental form with segmental backbone of type S, tier-value type T, and sponsor type M. 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) (M : Type u_3) :
                  Type (max (max u_1 u_2) u_3)

                  An autosegmental form: an underlying two-tier presentation (tones over segments, with association links) plus OT-style surface bookkeeping — deletedTier and surfaceLinks track the surface state separately.

                  • upper : LabeledTuple (TierSpec T M)

                    The tonal tier (underlying).

                  • lower : LabeledTuple (SegSpec S M)

                    The segmental backbone (underlying).

                  • deletedTier : Finset TierIdx

                    SURFACE deletion set on the upper tier (current state).

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

                      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, inline]
                      abbrev Autosegmental.FloatingForm.SurfaceIsPlanar {S : Type u_1} {T : Type u_2} {M : Type u_3} (f : FloatingForm S T M) :

                      The surface state is planar: the surface links satisfy the per-pair No-Crossing Constraint.

                      Equations
                      Instances For

                        Construction #

                        def Autosegmental.FloatingForm.mkInput {S : Type u_1} {T : Type u_2} {M : Type u_3} (lower : List (SegSpec S M)) (upper : List (TierSpec T M)) (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} {M : Type u_3} (f : FloatingForm S T M) (k : TierIdx) :
                          Option M

                          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} {M : Type u_3} (f : FloatingForm S T M) (i : SegIdx) :
                            Option M

                            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} {M : Type u_3} [DecidableEq M] (f : FloatingForm S T M) :
                              Finset M

                              Every morpheme occurring on either tier.

                              Equations
                              Instances For
                                @[reducible, inline]
                                abbrev Autosegmental.FloatingForm.IsAlive {S : Type u_1} {T : Type u_2} {M : Type u_3} (f : FloatingForm S T M) (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} {M : Type u_3} (f : FloatingForm S T M) (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} {M : Type u_3} (f : FloatingForm S T M) (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} {M : Type u_3} (f : FloatingForm S T M) (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} {M : Type u_3} (f : FloatingForm S T M) (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 #

                                          @[reducible, inline]
                                          abbrev Autosegmental.FloatingForm.SurfaceLinkedLower {S : Type u_1} {T : Type u_2} {M : Type u_3} (f : FloatingForm S T M) (i : SegIdx) :

                                          The lower-tier slot i is linked on the surface.

                                          Equations
                                          Instances For
                                            def Autosegmental.FloatingForm.InBounds {S : Type u_1} {T : Type u_2} {M : Type u_3} (f : FloatingForm S T M) :

                                            The presentation is in bounds: every link's endpoints index into the tiers.

                                            Equations
                                            Instances For
                                              @[instance_reducible]
                                              instance Autosegmental.FloatingForm.instDecidableInBoundsOfDecidableEq {S : Type u_1} {T : Type u_2} {M : Type u_3} (f : FloatingForm S T M) [DecidableEq S] [DecidableEq T] :
                                              Decidable f.InBounds
                                              Equations

                                              Input concatenation #

                                              def Autosegmental.FloatingForm.hconcat {S : Type u_1} {T : Type u_2} {M : Type u_3} (f g : FloatingForm S T M) :

                                              Concatenation of underlying input states ([JH15]): tier juxtaposition with index-shifted links, surface mirroring underlying.

                                              Equations
                                              • One or more equations did not get rendered due to their size.
                                              Instances For
                                                @[simp]
                                                theorem Autosegmental.FloatingForm.hconcat_upper {S : Type u_1} {T : Type u_2} {M : Type u_3} [DecidableEq S] [DecidableEq T] [DecidableEq M] (f g : FloatingForm S T M) :
                                                @[simp]
                                                theorem Autosegmental.FloatingForm.hconcat_lower {S : Type u_1} {T : Type u_2} {M : Type u_3} [DecidableEq S] [DecidableEq T] [DecidableEq M] (f g : FloatingForm S T M) :
                                                @[simp]
                                                theorem Autosegmental.FloatingForm.hconcat_deletedTier {S : Type u_1} {T : Type u_2} {M : Type u_3} [DecidableEq S] [DecidableEq T] [DecidableEq M] (f g : FloatingForm S T M) :
                                                (f.hconcat g).deletedTier =

                                                Atomic GEN operations #

                                                def Autosegmental.FloatingForm.deleteTierElem {S : Type u_1} {T : Type u_2} {M : Type u_3} (f : FloatingForm S T M) (k : TierIdx) :

                                                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} {M : Type u_3} (f : FloatingForm S T M) (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} {M : Type u_3} [DecidableEq S] [DecidableEq T] [DecidableEq M] (f : FloatingForm S T M) :
                                                    Finset (FloatingForm S T M)

                                                    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} {M : Type u_3} [DecidableEq S] [DecidableEq T] [DecidableEq M] (f : FloatingForm S T M) (h : f.SurfaceIsPlanar) (g : FloatingForm S T M) :
                                                      g f.geng.SurfaceIsPlanar

                                                      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} {M : Type u_3} (f : FloatingForm S T M) :
                                                      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} {M : Type u_3} (f : FloatingForm S T M) (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} {M : Type u_3} (f : FloatingForm S T M) (i : SegIdx) :
                                                          List T

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

                                                          Equations
                                                          Instances For

                                                            Tier and morpheme subsequences #

                                                            def Autosegmental.FloatingForm.aliveTierIdxs {S : Type u_1} {T : Type u_2} {M : Type u_3} (f : FloatingForm S T M) :
                                                            List TierIdx

                                                            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} {M : Type u_3} [DecidableEq M] (f : FloatingForm S T M) (m : M) :
                                                              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} {M : Type u_3} (f : FloatingForm S T M) (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} {M : Type u_3} (f : FloatingForm S T M) (p : SegIdxProp) [DecidablePred p] :

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

                                                                  Equations
                                                                  Instances For
                                                                    def Autosegmental.FloatingForm.emptyInput {S : Type u_1} {T : Type u_2} {M : Type u_3} :

                                                                    The empty input.

                                                                    Equations
                                                                    Instances For
                                                                      def Autosegmental.FloatingForm.concatInputs {S : Type u_1} {T : Type u_2} {M : Type u_3} (gs : List (FloatingForm S T M)) :

                                                                      Left-to-right concatenation of a list of input states.

                                                                      Equations
                                                                      Instances For