Nanosyntax: Tree-Based Spellout #
Extension of rank-based Superset spellout
(Morphology/Containment/Superset.lean) to tree-structured spellout. Implements the Superset Principle (SP) for trees: a lexical
entry M ↔ S' can spell out syntactic target S if S' structurally
contains S (NanoTree.Contains). Among matching entries, the Elsewhere
Condition selects the smallest (by tree size).
The SP on trees is a consequence of [Sta09a]'s Matching relation (formalized in [TTML18] as (35)): M matches S iff there exists a node N in M's stored tree such that S and N have the same root label and mutually matching daughters. For the right-branching single-daughter trees used in Bantu class prefix analysis, structural containment and bidirectional Matching coincide; the implementation uses containment as the simpler equivalent formulation.
Main declarations #
NanoTree: feature trees;NanoTree.Contains: sub-constituencyTreeLexEntry: a stored tree paired with an exponent;TreeLexEntry.MatchestreeSpellout: Superset Principle + Elsewhere ConditionFootConditionMet: [TTML18]'s constraint on backtrackingchain_contains_iff_le: for right-branching chains, tree containment reduces to rank comparison — tree-based spellout generalizes (not replaces) rank-based spellout
NanoTree #
Equations
Decidable equality #
Defined by structural recursion (not deriving DecidableEq, which routes
the nested List through well-founded recursion and does not kernel-reduce;
decide-style spellout evaluations need the structural form).
Structural decidable equality on trees.
Equations
- One or more equations did not get rendered due to their size.
- (Morphology.Nanosyntax.NanoTree.leaf f).decEq (Morphology.Nanosyntax.NanoTree.leaf g) = if h : f = g then isTrue ⋯ else isFalse ⋯
- (Morphology.Nanosyntax.NanoTree.leaf a).decEq (Morphology.Nanosyntax.NanoTree.node a_1 a_2) = isFalse ⋯
- (Morphology.Nanosyntax.NanoTree.node a a_1).decEq (Morphology.Nanosyntax.NanoTree.leaf a_2) = isFalse ⋯
Instances For
Structural decidable equality on daughter lists.
Equations
- One or more equations did not get rendered due to their size.
- Morphology.Nanosyntax.NanoTree.decEq.decEqList [] [] = isTrue ⋯
- Morphology.Nanosyntax.NanoTree.decEq.decEqList [] (head :: tail) = isFalse ⋯
- Morphology.Nanosyntax.NanoTree.decEq.decEqList (head :: tail) [] = isFalse ⋯
Instances For
Size #
Number of nodes in the tree. Used by the Elsewhere Condition to select the smallest matching entry.
Equations
Instances For
Equations
Instances For
Containment (Superset Principle on trees) #
Contains self target: target occurs in self as a sub-constituent.
Implements the tree-generalized Superset Principle ([Cah09] §2.2,
[TTML18] (36)): entry M matches target S if M's stored
tree contains S.
For right-branching single-daughter trees (all Bantu class prefix structures), this is equivalent to the bidirectional Matching relation ([TTML18] (35)).
For 1D chains: a chain of depth n contains all chains of depth
k ≤ n, matching ExponenceRule.Matches (chain_contains_iff_le).
- refl {F : Type u_1} (t : NanoTree F) : t.Contains t
- child {F : Type u_1} {f : F} {cs : List (NanoTree F)} {c target : NanoTree F} : c ∈ cs → c.Contains target → (node f cs).Contains target
Instances For
Structural decision procedure for containment (kernel-reducible).
Equations
- One or more equations did not get rendered due to their size.
- (Morphology.Nanosyntax.NanoTree.leaf f).decContains x✝ = if h : Morphology.Nanosyntax.NanoTree.leaf f = x✝ then isTrue ⋯ else isFalse ⋯
Instances For
Does some member of cs contain t?
Equations
- One or more equations did not get rendered due to their size.
- Morphology.Nanosyntax.NanoTree.decContains.decAny [] t = isFalse ⋯
Instances For
Equations
Foot #
The foot of a tree: the feature at the bottom of the leftmost spine. For right-branching chains [Fn [... [F0]]], the foot is F0 — the deepest feature on the functional sequence.
Equations
- (Morphology.Nanosyntax.NanoTree.leaf f).foot = f
- (Morphology.Nanosyntax.NanoTree.node f []).foot = f
- (Morphology.Nanosyntax.NanoTree.node a (child :: tail)).foot = child.foot
Instances For
Tree lexical entry #
A nanosyntactic lexical entry storing a tree rather than a scalar
rank, paired with an exponent of type α (String in concrete
fragments). The tree encodes the full feature geometry that the
morpheme lexicalizes.
Contrast with ExponenceRule (Morphology/Containment/Vocabulary.lean)
which stores only a span (depth on a 1D functional sequence).
- tree : NanoTree F
The stored feature tree.
- exponent : α
The exponent.
- morphType : MorphType
Morphological type (suffix or prefix).
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
A tree-based entry matches a target under the Superset Principle iff its stored tree contains the target as a sub-constituent.
Instances For
Equations
Tree spellout (Elsewhere Condition) #
Phrasal spellout via the tree-generalized Superset Principle: among entries whose tree contains the target, select the one with the smallest tree (most specific match).
Parallels Morphology.Containment.spellout, but the matching
relation is tree containment instead of rank comparison, and the
specificity metric is tree size instead of rank.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Foot Condition #
The Foot Condition ([TTML18]): the foot of a lexical entry's stored tree must be present as a feature in the syntactic structure being spelled out.
If entry M stores [X [...[Z]]], the Foot Condition requires that Z appear in the structure. This constrains backtracking: when spellout fails and the derivation splits the target into specifier + complement, only entries whose foot matches a feature in the remaining structure are eligible.
Equations
- Morphology.Nanosyntax.FootConditionMet entry syntacticTree = syntacticTree.Contains (Morphology.Nanosyntax.NanoTree.leaf entry.tree.foot)
Instances For
Equations
Chain trees (bridge to 1D) #
Build a right-branching chain tree of depth n.
chainTree feat 0 = leaf (feat 0)
chainTree feat 1 = node (feat 1) [leaf (feat 0)]
chainTree feat n = node (feat n) [chainTree feat (n-1)]
A chain of depth n is isomorphic to an ExponenceRule spanning
grade n in the 1D nanosyntax.
Equations
- Morphology.Nanosyntax.chainTree feat 0 = Morphology.Nanosyntax.NanoTree.leaf (feat 0)
- Morphology.Nanosyntax.chainTree feat n.succ = Morphology.Nanosyntax.NanoTree.node (feat (n + 1)) [Morphology.Nanosyntax.chainTree feat n]
Instances For
Bridge theorems #
Chain tree size is n + 1 (one node per feature level).
The foot of a chain tree is always feat 0 — the bottom of the functional sequence.
Chains of distinct depths are distinct trees, regardless of the feature assignment — depth alone separates them.
For right-branching chains, tree containment reduces to rank
comparison: a chain of depth re contains a chain of depth r iff
r ≤ re. This is exactly the matching condition of the rank-based
ExponenceRule.Matches, establishing that tree-based spellout
generalizes (not replaces) rank-based spellout.
Unlike the previous Bool formulation, no injectivity of feat is
needed: chain depth alone drives both directions.
Rose-tree interface instances #
NanoTree joins the Core.Order.Branching tower. The structural
size/decEq/decContains above remain the kernel-computable
specializations ([file-level generality discipline]: WF-derived
generics do not kernel-reduce, so decide-style spell-out evaluations
need the structural forms).
Equations
- One or more equations did not get rendered due to their size.