Documentation

Linglib.Theories.Syntax.Minimalist.Labeling

Minimalist Labeling (@cite{marcolli-chomsky-berwick-2025} §1.15) #

The MCB §1.15 Labeling Algorithm: assign categorial labels to non-leaf vertices of a SyntacticObject via an externally-supplied HeadFunction. There is no canonical "the" label of an SO — labeling is parametric over the head function chosen by the analyst.

This file is the single source of truth for Minimalist labeling. The pre-MCB selection-driven algorithm (getCategory, label, labelCat, selects, sameLabel, projectsIn, isMaximalIn, isHeadIn, isPhraseIn, etc.) was deleted at 0.230.798 — it predated both linglib's MCB substrate and the @cite{marcolli-chomsky-berwick-2025} formalisation, and bridged-via-HeadFunction.selectionBased preservation was rejected as perpetuating the legacy mindset (selection determines projection) that MCB explicitly relaxes.

Public API #

Choice of head function #

For consumers without natural derivational context, the standard choices are HeadFunction.leftSpine (left-headed; canonical for English-like analyses) or HeadFunction.rightSpine (right-headed). For Studies with a Derivation, the per-paper head function lives on the derivation (see Selection.lean's Derivation.headLI?).

The MCB framework treats these as equally valid; the choice is per- analysis, not a property of the language faculty.

noncomputable def Minimalist.Labeling.labelVertex (h : HeadFunction) (T v : SyntacticObject) :
Option Cat

The categorial label at vertex v of T under head function h, when T ∈ Dom(h). Returns none for leaf vertices (which carry their own LIToken's category directly, not a "label" in the head-function sense) and when T ∉ Dom(h).

Implements @cite{marcolli-chomsky-berwick-2025} §1.15 Labeling Algorithm in its default case: the projecting head's outer category. UNVERIFIED: the precise case structure (1-4 vs (i)-(iv) vs Chomsky 2013-style cases) needs to be checked against MCB Definition 1.15.2 in the published book; the docstring previously described "case 1" without page-level verification. The shared-feature fallback (corresponding to Chomsky 2013's {XP, YP} sharing-of-φ) is not yet implemented; deferred to next session along with the case-numbering verification.

Equations
Instances For
    noncomputable def Minimalist.Labeling.labelRoot (h : HeadFunction) (T : SyntacticObject) :
    Option Cat

    The label at the root of T (a frequent special case).

    Equations
    Instances For
      @[simp]
      theorem Minimalist.Labeling.labelRoot_node_in_dom (h : HeadFunction) (a b : SyntacticObject) (hT : h.Dom (a.node b)) :
      labelRoot h (a.node b) = some (h.head (a.node b)).item.outerCat

      For T ∈ Dom(h) with T = .node a b, the root label is the outer category of h(T).

      @[simp]

      Leaves never get a "label" from the algorithm — they carry their own LIToken's category.

      When T ∉ Dom(h), the algorithm's default case fails (returns none); the shared-feature fallback (case 4) is not yet implemented.

      A vertex is labelable by the algorithm iff labelVertex returns some _. Non-labelable vertices correspond to objects filtered out by the Externalization quotient map Π_L per @cite{marcolli-chomsky-berwick-2025} §1.15.

      Equations
      Instances For
        @[implicit_reducible]
        noncomputable instance Minimalist.Labeling.instDecidableIsLabelable (h : HeadFunction) (T v : SyntacticObject) :
        Decidable (isLabelable h T v)
        Equations

        For T ∈ Dom(h), every internal vertex is labelable (default case applies).

        Two vertices x, y of T carry the same label under h.

        Equations
        Instances For
          @[implicit_reducible]
          noncomputable instance Minimalist.Labeling.instDecidableSameLabelAt (h : HeadFunction) (T x y : SyntacticObject) :
          Decidable (sameLabelAt h T x y)
          Equations

          x is the projecting head of T under h: x is a leaf whose token equals h.head T. Decidable on LIToken.DecidableEq.

          Equations
          Instances For
            @[implicit_reducible]
            noncomputable instance Minimalist.Labeling.instDecidableIsHeadOf (h : HeadFunction) (T x : SyntacticObject) :
            Decidable (isHeadOf h T x)
            Equations
            • One or more equations did not get rendered due to their size.

            x projects at vertex x of T under h: x is a non-leaf contained in T whose label equals T's root label. This is the MCB analogue of "x is on the projection path of the root head".

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              @[implicit_reducible]
              noncomputable instance Minimalist.Labeling.instDecidableProjectsAt (h : HeadFunction) (T x : SyntacticObject) :
              Decidable (projectsAt h T x)
              Equations

              x is +max(imal) in T under h: x ⊆ T and no strict ancestor of x in T carries the same label. A linglib-formulated "maximal projection" predicate; not yet proved equivalent to @cite{marcolli-chomsky-berwick-2025} Lemma 1.14.1's terminus of a γ_ℓ projection path (which would require the §1.14 algebraic substrate).

              Bounded over T.subtrees so the predicate is decidable. The implication form z ≠ x → ¬ sameLabelAt (rather than the disjunction ¬ sameLabelAt ∨ z = x) reads as "for every strict ancestor, labels disagree" — the standard mathlib idiom.

              Equations
              Instances For
                @[implicit_reducible]
                noncomputable instance Minimalist.Labeling.instDecidableIsMaximalAt (h : HeadFunction) (T x : SyntacticObject) :
                Decidable (isMaximalAt h T x)
                Equations
                theorem Minimalist.Labeling.isMaximalAt_iff_unbounded (h : HeadFunction) (T x : SyntacticObject) :
                isMaximalAt h T x containsOrEq T x ∀ (z : SyntacticObject), isTermOf z Tcontains z xz x¬sameLabelAt h T x z

                isMaximalAt's bounded ∀ z ∈ T.subtrees quantifier is equivalent to the textbook unbounded ∀ z, isTermOf z T → ... form. The bounded form is taken as the canonical definition for decidability; this lemma anchors the soundness against the unbounded statement.

                Restored from the pre-rewrite isMaximalIn_iff_bounded audit trail.

                x is +min(imal) in T under h: x is a leaf in T. (MCB treats heads as leaves; +min adds the membership requirement.)

                Equations
                Instances For
                  @[implicit_reducible]
                  Equations

                  A head in T: +min and −max (it projects). MCB §1.15 classification carried over.

                  Equations
                  Instances For
                    @[implicit_reducible]
                    noncomputable instance Minimalist.Labeling.instDecidableIsHeadIn (h : HeadFunction) (T x : SyntacticObject) :
                    Decidable (isHeadIn h T x)
                    Equations
                    @[reducible, inline]

                    A phrase in T: +max. MCB §1.15 classification carried over. abbrev of isMaximalAt so the two names unify in elaboration — the legacy file separated them but the semantic content is identical.

                    Equations
                    Instances For