Nanosyntax: Tree-Based Spellout #
Extension of rank-based Superset spellout
(Morphology/Exponence/Containment/Contiguity.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.MatchestreeSelect,treeSpellout: Superset Principle + Elsewhere ConditiontreeSelect_isElsewhereWinner: the engine as an instance of the shared exponence core (Exponence) — derived specificity is reverse tree containment (TreeLexEntry.le_iff), and smallest-tree selection is an Elsewhere winner with no side conditionsFootConditionMet: [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
Morphological type of an exponent derived from nanosyntactic spellout. Suffixes arise from spellout-driven movement (roll-up, unary foot); prefixes arise from subderivation (binary foot) — [Dek21] for this diagnostic on indefinite markers.
Instances For
Equations
- Morphology.Nanosyntax.instDecidableEqMorphType x✝ y✝ = if h : x✝.ctorIdx = y✝.ctorIdx then isTrue ⋯ else isFalse ⋯
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
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 SpanRule.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
Equations
- Morphology.Nanosyntax.NanoTree.instTransContains = { trans := ⋯ }
Each daughter's size is bounded by the daughters' total size.
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 SpanRule (Morphology/Exponence/Containment/Contiguity.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
Equations
- One or more equations did not get rendered due to their size.
Instances For
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
The shared exponence core #
A tree lexical entry exposes the shared exponence core interface
(Morphology.Exponence.Rule): contexts are syntactic targets,
applicability is Superset-Principle matching.
Equations
- One or more equations did not get rendered due to their size.
The specificity order is reverse containment of the stored trees:
a is at least as specific as b exactly when b's tree contains
a's. Tree size is therefore a faithful specificity measure
(Contains.size_le), which is what licenses smallest-tree selection.
Tree spellout (Elsewhere Condition) #
The matching entry with the smallest stored tree (first-listed on
ties): Minimize Junk over tree-generalized Superset matching, as the
shared core's Exponence.selectBy at the tree-size score dualized so
the smallest tree wins.
Equations
- Morphology.Nanosyntax.treeSelect entries target = Morphology.Exponence.selectBy (fun (e : Morphology.Nanosyntax.TreeLexEntry F α) => OrderDual.toDual e.tree.size) entries target
Instances For
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
- Morphology.Nanosyntax.treeSpellout entries target = Option.map (fun (x : Morphology.Nanosyntax.TreeLexEntry F α) => x.exponent) (Morphology.Nanosyntax.treeSelect entries target)
Instances For
Smallest-tree selection is an Elsewhere winner of the shared core:
the dualized-size score is strictly antitone in specificity
(size_strictAnti), so a size-minimal match is maximally specific. An
instance of selectBy_isElsewhereWinner.
The spelled-out exponent is an Elsewhere winner's exponent.
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 SpanRule 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
SpanRule.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.