LaserCortex

1 EML Registry: Tamari Lattice Contraction

1.1 Core Types

Definition 1 EML Tree
#

The type of binary trees representing configurations in the Tamari lattice. A tree is either a Leaf (empty configuration) or a Node \(t_1\ t_2\) (composition of two sub-configurations).

Definition 2 Tree Size
#

The number of internal nodes in a tree, used as the lattice index \(n\) in \(T_n\).

Definition 3 Single-Step Contraction
#

The primitive non-associative rewrite rule: \((a \bullet b) \bullet c \to a \bullet (b \bullet c)\). This is the coupling signature for choice resolution, lifted through subtrees.

Definition 4 Multi-Step Contraction
#

The reflexive-transitive closure of contracts_one. Represents an audit trail of choice resolutions with monotonic provenance.

Definition 5 Right-Comb Normal Form
#

The minimum element of the Tamari lattice — the equilibrium attractor. Defined as \(\mathsf{rightComb}(0) = \mathsf{Leaf}\) and \(\mathsf{rightComb}(n+1) = \mathsf{Node}(\mathsf{Leaf},\ \mathsf{rightComb}(n))\).

1.2 Lifting Lemmas

Lemma 6 Contraction Preserved Under Left Node

If \(t \to t'\) then \(\mathsf{Node}(t,\ r) \to \mathsf{Node}(t',\ r)\). Choice resolution in the left subtree propagates to the whole composition.

Lemma 7 Contraction Preserved Under Right Node

If \(r \to r'\) then \(\mathsf{Node}(l,\ r) \to \mathsf{Node}(l,\ r')\). Choice resolution in the right subtree propagates to the whole composition.

Lemma 8 Transitivity of Contraction
#

If \(s \to t\) and \(t \to u\) then \(s \to u\). Audit trails concatenate monotonically.

1.3 Size Invariants

Lemma 9 Size is Preserved by Single-Step Contraction

Rotation rewrites the tree depth but does not change the number of internal nodes.

Lemma 10 Size is Preserved by Multi-Step Contraction

Contraction paths preserve tree size, establishing that the Tamari lattice \(T_n\) is graded by node count \(n\).

1.4 Main Contraction Theorem

Lemma 11 Node of Right-Combs Contracts to Right-Comb

For any \(a, b : \mathbb {N}\),

\[ \mathsf{Node}(\mathsf{rightComb}(a),\ \mathsf{rightComb}(b)) \longrightarrow \mathsf{rightComb}(1 + a + b). \]

The equilibrium attractor is closed under non-associative composition.

Theorem 12 Every Tree Contracts to Right-Comb

For any tree \(t : \mathsf{EMLTree}\),

\[ t \longrightarrow \mathsf{rightComb}(t.\mathsf{size}). \]

Every configuration has a valid evolution path to the equilibrium attractor indexed by its size.

1.5 Router and Registry

Definition 13 Router Index
#

A bounded natural number \(\mathsf{Fin}(n)\) serving as a neural binding address.

Definition 14 Type Registry
#

An injective mapping from router indices to EML trees. This is the cortex-registry interface where neural computation meets formal grammar.

1.6 Witness-Skeptic Game

Definition 15 Cortex Certificate
#

A proof-carrying audit trail \(\langle source,\ target,\ proof \rangle \) showing that a tree reaches its equilibrium.

Definition 16 Certify

Issues a CortexCertificate for any tree \(t\), certifying that \(t \to \mathsf{rightComb}(t.\mathsf{size})\). This is the quench witness in the Witness-Skeptic game.