Documentation

Linglib.Phonology.Autosegmental.OCP

OCP-merging collapse of autosegmental representations #

A merging tone realization ([Jar19]; the melody-merging naming function of [JH15], Mende example) is OCP-merging: a tonal melody Hⁿ realizes as a single H node multiply associated to the n morae, not n separate H nodes. The project's Autosegmental.AR.realize (Realization.lean) instead uses the bridge-only concat (the categorical coproduct), which keeps the n H nodes apart. This file supplies the missing merge as a post-processing retraction on the upper tier:

The upper-tier collapse is exactly OCP.collapse (= List.destutter (· ≠ ·)); the link pushforward is the SimpleGraph.map/Quiver.Push idiom (Finset.image (Prod.map ρ id)); planarity survives because ρ is monotone (IsNonCrossing.image_monotone, NonCrossing.lean).

The AR-level OCP quotient monoid #

collapseAR is the AR-level lift of FreeMonoid.destutterHom: a retraction onto the OCP-clean ARs that descends to a quotient of the concat monoid AR α β. The key congruence is collapseAR_concat — the AR shadow of OCP.collapse_append, whose links half reduces to runIdx commuting with the collapse-collapse seam (runIdx_append_collapse_left/right, in turn the boundary-length lemma List.destutter_append_length_clean). It bundles as collapseARHom : AR α β →* {A // IsCleanAR A}, whose mathlib quotient (ocpARQuotientEquiv) is the concrete OCP-clean model.

Main results #

The collapse in coordinates #

The OCP merge on the graph foundation: destutter melody tier m's word and repoint its links through runIdx. Like normalize the result is a AR on a sigma-Fin carrier, but the merge is not a pullback — runIdx is monotone, not bijective — so the structural axioms are proved directly on the merged carrier.

noncomputable def Autosegmental.AR.collapsedWord {ι : Type u_3} [DecidableEq ι] {τ : ιType u_4} (X : TieredAR ι τ) (m : ι) [DecidableEq (τ m)] [Finite X.obj.V] (i : ι) :
List (τ i)

Tier words after collapsing melody tier m: destuttered at m, untouched elsewhere.

Equations
Instances For
    theorem Autosegmental.AR.collapsedWord_length_le {ι : Type u_3} [DecidableEq ι] {τ : ιType u_4} (X : TieredAR ι τ) (m : ι) [DecidableEq (τ m)] [Finite X.obj.V] (i : ι) :
    (collapsedWord X m i).length tierLength X i
    noncomputable def Autosegmental.AR.collapseIdx {ι : Type u_3} [DecidableEq ι] {τ : ιType u_4} (X : TieredAR ι τ) (m : ι) [DecidableEq (τ m)] [Finite X.obj.V] (i : ι) (p : ) :

    Position repointing: runIdx on the melody tier, identity elsewhere.

    Equations
    Instances For
      noncomputable def Autosegmental.AR.collapse {ι : Type u_3} [DecidableEq ι] {τ : ιType u_4} (X : TieredAR ι τ) (m : ι) [DecidableEq (τ m)] [Finite X.obj.V] :
      TieredAR ι τ

      The OCP-merging collapse: melody tier m destuttered, links repointed through runIdx, other tiers untouched.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        instance Autosegmental.instFiniteVSigmaObjGraphAndIsTierOrderedArcsTierFstNoInternalAssocEdgesCollapse {ι : Type u_3} [DecidableEq ι] {τ : ιType u_4} (X : TieredAR ι τ) (m : ι) [DecidableEq (τ m)] [Finite X.obj.V] :
        Finite (AR.collapse X m).obj.V
        noncomputable def Autosegmental.AR.collapseFiberEnum {ι : Type u_3} [DecidableEq ι] {τ : ιType u_4} (X : TieredAR ι τ) (m : ι) [DecidableEq (τ m)] [Finite X.obj.V] (i : ι) :
        Fin (collapsedWord X m i).length ≃o fiber (collapse X m) i

        The collapsed fiber at i is enumerated by its position range.

        Equations
        Instances For
          @[simp]
          theorem Autosegmental.AR.tierWord_collapse {ι : Type u_3} [DecidableEq ι] {τ : ιType u_4} (X : TieredAR ι τ) (m : ι) [DecidableEq (τ m)] [Finite X.obj.V] (i : ι) :

          The collapse does what it says: its tier words are the collapsed words — destuttered at m (Function.update_self), untouched elsewhere.

          theorem Autosegmental.AR.collapsedWord_tensor {ι : Type u_3} [DecidableEq ι] {τ : ιType u_4} (X : TieredAR ι τ) (m : ι) [DecidableEq (τ m)] {Y : TieredAR ι τ} [Finite X.obj.V] [Finite Y.obj.V] (i : ι) :
          collapsedWord (CategoryTheory.MonoidalCategoryStruct.tensorObj X Y) m i = collapsedWord (CategoryTheory.MonoidalCategoryStruct.tensorObj (collapse X m) (collapse Y m)) m i

          The word half of the OCP congruence: collapsing a tensor computes the same tier words as collapsing the tensor of the collapsed factors — OCP.collapse_append lifted through the readers.

          theorem Autosegmental.AR.fiberEnum_collapse {ι : Type u_3} [DecidableEq ι] {τ : ιType u_4} (X : TieredAR ι τ) (m : ι) [DecidableEq (τ m)] [Finite X.obj.V] (i : ι) :
          fiberEnum i = (Fin.castOrderIso ).trans (collapseFiberEnum X m i)
          theorem Autosegmental.AR.vertexEquiv_collapse {ι : Type u_3} [DecidableEq ι] {τ : ιType u_4} (X : TieredAR ι τ) (m : ι) [DecidableEq (τ m)] [Finite X.obj.V] {i : ι} (r : Fin (tierLength (collapse X m) i)) :
          vertexEquiv i, r = i, Fin.cast r
          theorem Autosegmental.AR.tierLength_collapse {ι : Type u_3} [DecidableEq ι] {τ : ιType u_4} (X : TieredAR ι τ) (m : ι) [DecidableEq (τ m)] [Finite X.obj.V] (i : ι) :
          tierLength (collapse X m) i = (collapsedWord X m i).length
          theorem Autosegmental.AR.collapseIdx_left {ι : Type u_3} [DecidableEq ι] {τ : ιType u_4} (X : TieredAR ι τ) (m : ι) [DecidableEq (τ m)] {Y : TieredAR ι τ} [Finite X.obj.V] [Finite Y.obj.V] (i : ι) {p : } (hp : p < tierLength X i) :
          collapseIdx (CategoryTheory.MonoidalCategoryStruct.tensorObj (collapse X m) (collapse Y m)) m i (collapseIdx X m i p) = collapseIdx (CategoryTheory.MonoidalCategoryStruct.tensorObj X Y) m i p

          Left-block positions commute with the collapse-collapse seam.

          theorem Autosegmental.AR.collapseIdx_right {ι : Type u_3} [DecidableEq ι] {τ : ιType u_4} (X : TieredAR ι τ) (m : ι) [DecidableEq (τ m)] {Y : TieredAR ι τ} [Finite X.obj.V] [Finite Y.obj.V] (i : ι) {p : } (hp : p < tierLength Y i) :
          collapseIdx (CategoryTheory.MonoidalCategoryStruct.tensorObj (collapse X m) (collapse Y m)) m i (tierLength (collapse X m) i + collapseIdx Y m i p) = collapseIdx (CategoryTheory.MonoidalCategoryStruct.tensorObj X Y) m i (tierLength X i + p)

          Right-block positions commute with the collapse-collapse seam.

          noncomputable def Autosegmental.AR.collapseTensorFullIso {ι : Type u_3} [DecidableEq ι] {τ : ιType u_4} (X : TieredAR ι τ) (m : ι) [DecidableEq (τ m)] {Y : TieredAR ι τ} [Finite X.obj.V] [Finite Y.obj.V] :
          (collapse (CategoryTheory.MonoidalCategoryStruct.tensorObj X Y) m).obj.Iso (collapse (CategoryTheory.MonoidalCategoryStruct.tensorObj (collapse X m) (collapse Y m)) m).obj

          The OCP congruence: collapsing a concatenation is isomorphic to collapsing the concatenation of the collapses — [JH15]'s melody-merge law, by the classification theorem.

          Equations
          Instances For
            theorem Autosegmental.AR.cls_collapse_tensor {ι : Type u_3} [DecidableEq ι] {τ : ιType u_4} (X : TieredAR ι τ) (m : ι) [DecidableEq (τ m)] {Y : TieredAR ι τ} [Finite X.obj.V] [Finite Y.obj.V] :
            cls (collapse (CategoryTheory.MonoidalCategoryStruct.tensorObj X Y) m) = cls (collapse (CategoryTheory.MonoidalCategoryStruct.tensorObj (collapse X m) (collapse Y m)) m)

            The OCP congruence as an equality of isomorphism classes: collapse descends to the class monoid.

            def Autosegmental.AR.IsCleanAt {ι : Type u_3} {τ : ιType u_4} (X : TieredAR ι τ) (m : ι) [Finite X.obj.V] :

            OCP-cleanliness at melody tier m: the tier word has no adjacent repeats.

            Equations
            Instances For
              theorem Autosegmental.AR.isCleanAt_collapse {ι : Type u_3} [DecidableEq ι] {τ : ιType u_4} (X : TieredAR ι τ) (m : ι) [DecidableEq (τ m)] [Finite X.obj.V] :

              The collapse is OCP-clean at the collapsed tier.

              noncomputable def Autosegmental.realizeMerged {ι : Type u_3} [DecidableEq ι] {τ : ιType u_4} (m : ι) [DecidableEq (τ m)] {S : Type u_5} (g₀ : STieredAR ι τ) [∀ (s : S), Finite (g₀ s).obj.V] (w : List S) :
              TieredAR ι τ

              The OCP-merging realization at melody tier m[Jar19]'s merging g_T: AR.realize, then merge the melody runs.

              Equations
              Instances For
                theorem Autosegmental.AR.covering_normalize {ι : Type u_3} {τ : ιType u_4} (X : TieredAR ι τ) [Finite X.obj.V] {i : ι} {p q : Fin (tierLength X i)} :
                ((normalize X).obj.arcs.Adj i, p i, q ∀ (u : (normalize X).obj.V), ¬((normalize X).obj.arcs.Adj i, p u (normalize X).obj.arcs.Adj u i, q)) q = p + 1

                On a normal form, one position covers another in the arc order iff it is its immediate successor.

                theorem Autosegmental.AR.isCleanAt_iff_isOCPClean {ι : Type u_3} {τ : ιType u_4} (X : TieredAR ι τ) (m : ι) [Finite X.obj.V] :
                IsCleanAt X m IsOCPClean (normalize X).obj.arcs (normalize X).obj.label Sigma.fst m

                The OCP bridge: tier-word cleanliness is Axiom 6 on the normal form — the coordinate OCP and [Jar16b]'s §4.2 axiom agree.