Docs / Syntax / Minimalist / SyntacticObject / Lift

The universal property of the syntactic-object carrier

import Linglib.Syntax.Minimalist.SyntacticObject.Lift · namespace Minimalist.SyntacticObject

Leaf data valued in a commutative magma with zero extends to a morphism of magmas out of SyntacticObject L (lift, the FreeMagma.lift analogue), and two such morphisms agreeing on the leaves are equal (hom_ext). The zero absorbs the off-carrier arities, so one total algebra (mergeAlgebra) drives the fold, the quotient descent, and the subtype restriction once and for all: consumers supply a lexical-leaf value and a trace value, the latter for the bare trace (none) and for the trace of each token (some tok), the three kinds of leaf hom_ext distinguishes, and inherit Perm-invariance from mul_comm via a private permutation-invariance lemma — no bespoke step induction.

Main declarations

Main results

Declarations

The node algebra of a magma-with-zero: lexical leaf ↦ ℓ, trace leaf ↦ τ of the token it is the trace of, if any, bare binary node ↦ *, off-carrier arities ↦ 0.

def mergeAlgebraL55–63
{L : Type} {β : Type u_1} [Mul β] [Zero β] (ℓ : L → β) (τ : Option L → β) :
Vertex L → List β → β

Used by mergeAlgebra_perm, liftN, liftN_mk

Used in Syntax/Minimalist/Label/Selection

L108–121
L142–144
L146
L148–149
L162

Morphisms agreeing on the leaves are equal, the uniqueness half of the universal property.

theorem hom_extL166–177
{L : Type} {β : Type u_1} [Mul β] {f g : SyntacticObject L →ₙ* β} (hlex : ∀ (tok : L), f ↑tok = g ↑tok) (htrace : f trace = g trace) (htraceOf : ∀ (tok : L), f (traceOf tok) = g (traceOf tok)) :
f = g

Freeness

L197–207
L217–220
L222–225

The universal property of the carrier: leaf data valued in a commutative magma M corresponds to magma homomorphisms out of SyntacticObject L, so the carrier is the free commutative magma on L ⊕ Option L, its lexical items and traces.

liftEquivL227–237
noncomputable def Minimalist.SyntacticObject.liftEquiv {L : Type} {M : Type u_2} [CommMagma M] :
(L ⊕ Option L → M) ≃ (SyntacticObject L →ₙ* M)

The definition is too large to print here; read it in the source.

Used by liftEquiv_apply_ofLeaf, liftEquiv_apply_leaf, liftEquiv_apply_trace, liftEquiv_apply_traceOf, liftEquiv_symm_apply

L239–241
L243–245
L247–249
L251–253