Docs / Syntax / Minimalist / Workspace / Merge / Basic

The Merge operator on workspaces

import Linglib.Syntax.Minimalist.Workspace.Merge.Basic · namespace Minimalist.Merge

The Merge operator of Marcolli, Chomsky and Berwick (their Definition 1.3.4) acts on the workspace algebra ConnesKreimer R (UnorderedTree α). For a pair S, S' of accessible terms,

M_{S,S'} = ⊔ ∘ (B ⊗ id) ∘ δ_{S,S'} ∘ Δ,

where Δ is a coproduct extracting accessible terms, δ_{S,S'} keeps the terms whose left channel is the forest {S, S'} (Definition 1.3.1), B grafts that forest under a new root (Definition 1.3.2), and ⊔ multiplies the two channels back into one workspace. Only Δ depends on how accessible terms are cut out, so the operator is defined over an arbitrary cut enumeration cuts (mergeOpG). The book's Δ is the deletion coproduct Δ^d, and mergeOp is Merge at the deletion cuts; mergeOpC is Merge at the trace cuts. The unit stage M_{β,1} of Internal Merge (Proposition 1.4.2) has no grafting step (mergeOpUnitG).

On a workspace F, Merge grafts {S, S'} beside the trunk of each forest cut of F whose crown is {S, S'}, summed over all such cuts (mergeOpG_apply_of', the book's (1.3.11)). Each form of Merge in their §1.4 is this sum on a particular workspace.

External, Internal and Sideward Merge are in Merge/External.lean, Merge/Internal.lean and Merge/Sideward.lean; the Minimal-Search weighting is in Merge/MinimalSearch.lean.

Main definitions

Main results

Implementation notes

Definition 1.3.4 fixes the deletion coproduct Δ^d, which contracts the unary vertex a cut leaves, and mergeOp is Merge at the deletion cuts. The pruning coproduct Δ^ρ keeps that vertex. The two extract the same accessible terms, but ⊔ multiplies the remainder into the result, so Merge at the pruning cuts (mergeOpG cutSummandsN) is not the book's operator: its Internal Merge leaves a unary vertex, which no syntactic object has. The book writes (1.3.7) through Δ^ρ only with the right channel contracted after the matching (mergeOp_eq_comp_comulAlgHomN).

The deletion cuts do not admit Merge in the sense of IsMergeCuts: on a tree with a unary vertex the trunk of the empty cut is the contracted tree, not the tree. The book's objects are binary trees, which have none, and on them mergeOp is Merge at the pruning cuts followed by the contraction (mergeOp_eq_rename_contractUnary_comp).

References

Cut enumerations that admit Merge

A cut enumeration admits Merge when its crowns are subtrees with fewer edges in total than their tree, and its only empty cut is the tree itself. The edge bound makes External Merge of a pair exact (mergeOpG_pair); the other two let a spectator component pass through (mergeOpG_ofTree_mul).

class IsMergeCutsL83–93
{α : Type u_2} (cuts : UnorderedTree α → Multiset (UnorderedTree.Forest (UnorderedTree α) × UnorderedTree α)) :

Used by IsMergeCuts.notMem_crown, IsMergeCuts.crown_ne_singleton, IsMergeCuts.mem_subtrees_of_mem_treeCutsG

Used in Syntax/Minimalist/Workspace/Merge/External, Syntax/Minimalist/Workspace/Merge/Internal, Syntax/Minimalist/Workspace/Merge/MinimalSearch, Syntax/Minimalist/Workspace/Merge/Sideward

L110–117

The matching projections

L164–168
L186–190
L198–202

Grafting

L206–213

The Merge operator

L225–231
L233–250
L276–285
L287–296

The unit stage M_{β,1}

The first stage of Internal Merge (Proposition 1.4.2) moves an accessible term β to the left channel and leaves T/β on the right. Its grafting step is the identity, since B(β ⊔ 1) = M(β, 1) = β. It is not a Merge in its own right: it occurs only composed with M_{T/β,β} (Marcolli et al. 2025 Remark 1.4.3).

L317–321
L323–327
L345–352

Merge over a cut enumeration

Merge M_{S,S'} over a cut enumeration cuts, whose coproduct is comulAlgHomNG cuts.

mergeOpGL364–369
noncomputable def Minimalist.Merge.mergeOpG {R : Type u_1} [CommSemiring R] {α : Type u_2} [DecidableEq (UnorderedTree α)] (cuts : UnorderedTree α → Multiset (UnorderedTree.Forest (UnorderedTree α) × UnorderedTree α)) (lbl : α) (S S' : UnorderedTree α) :

Built from

Used by mergeOp, mergeOpG_apply_of', mergeOpG_apply_of'_eq_sum, mergeOpG_comm, mergeOp_eq_rename_contractUnary_comp, mergeOpC

Used in Syntax/Minimalist/Workspace/Merge/External, Syntax/Minimalist/Workspace/Merge/Internal, Syntax/Minimalist/Workspace/Merge/MinimalSearch, Syntax/Minimalist/Workspace/Merge/Sideward

The unit stage M_{β,1} over a cut enumeration cuts.

mergeOpUnitGL371–375
noncomputable def Minimalist.Merge.mergeOpUnitG {R : Type u_1} [CommSemiring R] {α : Type u_2} [DecidableEq (UnorderedTree α)] (cuts : UnorderedTree α → Multiset (UnorderedTree.Forest (UnorderedTree α) × UnorderedTree α)) (β : UnorderedTree α) :

Built from

Used by mergeOpUnit, mergeOpUnitG_apply_of'_eq_sum, mergeOpUnitG_one, mergeOpUnit_eq_rename_contractUnary_comp, mergeOpUnitC

Used in Syntax/Minimalist/Workspace/Merge/Internal, Syntax/Minimalist/Workspace/Merge/MinimalSearch

The Merge operator M_{S,S'} of Marcolli et al. 2025 Definition 1.3.4, Merge at the deletion cuts cutSummandsDN, whose coproduct is Δ^d, with root label lbl.

mergeOpL377–381
noncomputable def Minimalist.Merge.mergeOp {R : Type u_1} [CommSemiring R] {α : Type u_2} [DecidableEq (UnorderedTree α)] (lbl : α) (S S' : UnorderedTree α) :

Built from

Used by mergeOp_eq_comp_comulAlgHomN, mergeOp_eq_rename_contractUnary_comp

Used in Syntax/Minimalist/Workspace/Merge/External, Syntax/Minimalist/Workspace/Merge/Internal, Syntax/Minimalist/Workspace/Merge/SyntacticObject

The unit stage M_{β,1} at the deletion cuts, the operator of Definition 1.3.4 that Proposition 1.4.2 composes with External Merge.

mergeOpUnitL383–387
noncomputable def Minimalist.Merge.mergeOpUnit {R : Type u_1} [CommSemiring R] {α : Type u_2} [DecidableEq (UnorderedTree α)] (β : UnorderedTree α) :

Built from

Used by mergeOpUnit_eq_rename_contractUnary_comp

Used in Syntax/Minimalist/Workspace/Merge/Internal, Syntax/Minimalist/Workspace/Merge/SyntacticObject

Merge on a workspace F grafts {S, S'} beside the trunk of each forest cut of F with crown {S, S'} (Marcolli et al. 2025 (1.3.11)).

theorem mergeOpG_apply_of'L389–400
{R : Type u_1} [CommSemiring R] {α : Type u_2} [DecidableEq (UnorderedTree α)] (cuts : UnorderedTree α → Multiset (UnorderedTree.Forest (UnorderedTree α) × UnorderedTree α)) (lbl : α) (S S' : UnorderedTree α) (F : UnorderedTree.Forest (UnorderedTree α)) :
(mergeOpG cuts lbl S S') (ConnesKreimer.of' F) = ConnesKreimer.of' {UnorderedTree.node lbl {S, S'}} * (Multiset.map (fun (p : Multiset (UnorderedTree α) × Multiset (UnorderedTree α)) => ConnesKreimer.of' p.2) (Multiset.filter (fun (x : Multiset (UnorderedTree α) × Multiset (UnorderedTree α)) => x.1 = {S, S'}) (ConnesKreimer.forestCutsG cuts F))).sum

Built from

Merge on a workspace F is a sum of workspaces, one for each choice of a cut of each tree of F whose crowns together are {S, S'}.

theorem mergeOpG_apply_of'_eq_sumL402–412
{R : Type u_1} [CommSemiring R] {α : Type u_2} [DecidableEq (UnorderedTree α)] (cuts : UnorderedTree α → Multiset (UnorderedTree.Forest (UnorderedTree α) × UnorderedTree α)) (lbl : α) (S S' : UnorderedTree α) (F : UnorderedTree.Forest (UnorderedTree α)) :
(mergeOpG cuts lbl S S') (ConnesKreimer.of' F) = (Multiset.map (fun (s : ConnesKreimer.CutChoice α) => ConnesKreimer.of' ({UnorderedTree.node lbl {S, S'}} + s.trunk)) (Multiset.filter (fun (x : ConnesKreimer.CutChoice α) => x.crown = {S, S'}) (ConnesKreimer.forestCutChoicesG cuts F))).sum

Built from

L414–428

Deletion and pruning

Merge at the deletion cuts reaches the pruning coproduct through the contraction Π_{d,ρ} of the right channel, rename UnorderedTree.contractUnary, which commutes with the matching since the two act on different channels.

Merge at Δ^d is ⊔ ∘ (B ⊗ id) ∘ (id ⊗ Π_{d,ρ}) ∘ δ_{S,S'} ∘ Δ^ρ, the matching taken through the pruning coproduct and the remainder contracted after it (Marcolli et al. 2025 (1.3.10)).

theorem mergeOp_eq_comp_comulAlgHomNL460–474
{R : Type u_1} [CommSemiring R] {α : Type u_2} [DecidableEq (UnorderedTree α)] (lbl : α) (S S' : UnorderedTree α) :
mergeOp lbl S S' = LinearMap.mul' R (ConnesKreimer R (UnorderedTree α)) ∘ₗ TensorProduct.map (graftBinaryAt lbl S S') LinearMap.id ∘ₗ TensorProduct.map LinearMap.id (ConnesKreimer.rename UnorderedTree.contractUnary).toLinearMap ∘ₗ deltaMatch S S' ∘ₗ ConnesKreimer.comulAlgHomN.toLinearMap

Built from , ,

On objects without unary vertices, Merge at the deletion cuts is Merge at the pruning cuts followed by contracting the unary vertices of the workspace.

theorem mergeOp_eq_rename_contractUnary_compL491–503
{R : Type u_1} [CommSemiring R] {α : Type u_2} [DecidableEq (UnorderedTree α)] (lbl : α) {S S' : UnorderedTree α} (hS : S.numUnary = 0) (hS' : S'.numUnary = 0) :

Built from ,

On a tree without unary vertices, the unit stage at the deletion cuts is the unit stage at the pruning cuts followed by contracting the unary vertices of the workspace.

theorem mergeOpUnit_eq_rename_contractUnary_compL518–529
{R : Type u_1} [CommSemiring R] {α : Type u_2} [DecidableEq (UnorderedTree α)] {β : UnorderedTree α} (hβ : β.numUnary = 0) :

Built from ,

Merge at the trace cuts

The trace Merge operator is Merge at the trace cuts cutSummandsCN τ, whose trunks carry a trace leaf at each cut site.

mergeOpCL537–542
noncomputable def Minimalist.Merge.mergeOpC {R : Type u_1} [CommSemiring R] {α : Type u_2} {β : Type u_3} [DecidableEq (UnorderedTree (α ⊕ β))] (τ : UnorderedTree (α ⊕ β) → β) (lbl : α ⊕ β) (S S' : UnorderedTree (α ⊕ β)) :
ConnesKreimer R (UnorderedTree (α ⊕ β)) →ₗ[R] ConnesKreimer R (UnorderedTree (α ⊕ β))

Built from

Used in Syntax/Minimalist/Derivation/Basic, Syntax/Minimalist/Workspace/Merge/External, Syntax/Minimalist/Workspace/Merge/Internal, Syntax/Minimalist/Workspace/Merge/SyntacticObject

The unit stage M_{S,1} at the trace cuts cutSummandsCN τ.

mergeOpUnitCL544–548
noncomputable def Minimalist.Merge.mergeOpUnitC {R : Type u_1} [CommSemiring R] {α : Type u_2} {β : Type u_3} [DecidableEq (UnorderedTree (α ⊕ β))] (τ : UnorderedTree (α ⊕ β) → β) (S : UnorderedTree (α ⊕ β)) :
ConnesKreimer R (UnorderedTree (α ⊕ β)) →ₗ[R] ConnesKreimer R (UnorderedTree (α ⊕ β))

Built from

Used in Syntax/Minimalist/Derivation/Basic, Syntax/Minimalist/Workspace/Merge/Internal, Syntax/Minimalist/Workspace/Merge/SyntacticObject