Docs / Syntax / Minimalist / Linearization / Replay

Replaying a derivation on linearized objects

import Linglib.Syntax.Minimalist.Linearization.Replay · namespace Minimalist

Free symmetric Merge builds unordered objects, so the surface order is not recoverable from Derivation.final, but each step records the side its new daughter takes. Derivation.replay? replays the steps by Merge on linearized objects, and a successful replay forgets to the derivation's own configuration, so the readouts surfaceTokens, surfaceCats and surfacePhon are the word order of the derived object. The order is a datum of the derivation rather than of its object, and a derivation whose daughters take the head side exactly when they project records the harmonic linearization of its object.

Main definitions

Main results

Implementation notes

  • The replay is partial, none when the initial object is not a leaf, when a mover is absent, or when nothing is left to merge back. An externally merged item replays in the order it was built in. Traces are unpronounced.
  • Sibling accounts of linearization are the selection-induced harmonic order (Linearization/Externalization.lean) and cyclic linearization (Linearization/Cyclic.lean).

References

Declarations

The replay

A step on a linearized configuration, Step.run with each new daughter on its side. Internal Merge raises the leftmost occurrence of the mover, leaving the trace of its head under τ, and an extraction stacks it; none when the mover is absent or the stack is empty.

def Step.replay?L77–90

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

Used by Derivation.replay?_append_singleton, Step.replay?_map, Step.replay?_of_harmonic, foldlM_replay?_of_harmonicList

Used in Syntax/Minimalist/Copy/Replay

The derivation's linearized configuration under the trace encoder τ, or none if the initial object is not a leaf, a mover is absent, or remerge finds the stack empty.

def Derivation.replay?L94–98

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

Used by Derivation.externalize?, Derivation.replay?_append_singleton, Derivation.stack_eq_nil_of_replay?, Derivation.replay?_map, Derivation.replay?_faithful

Used in Syntax/Minimalist/Copy/Replay, Syntax/Minimalist/Derivation/Licensing, Syntax/Minimalist/Derivation/Reconstruction, Syntax/Minimalist/Linearization/ChainReduction, Privizentseva2026

The derivation's linearized object under the trace encoder τ; copies still on the stack are not part of it.

def Derivation.externalize?L100–104

Built from

Used by Derivation.surfaceTokens, Derivation.externalize?_map, Derivation.externalize?_faithful, Derivation.externalize?_take_faithful, Derivation.externalize?_eq_linearize?, Derivation.not_factorsThrough_final

Used in Syntax/Minimalist/Copy/Replay, Syntax/Minimalist/Copy/ToTree, Syntax/Minimalist/Derivation/Reconstruction, Syntax/Minimalist/Linearization/SpelloutDomain, Syntax/Minimalist/Locality/Freezing and 5 more

Faithfulness

Relabelling

L167–174

Harmonic derivations

A derivation is harmonic for a head side when each daughter it merges projects exactly if it takes the head side, and each mover leaves a trace with its selection state. Its recorded order is then the harmonic linearization of its object (Derivation.externalize?_eq_linearize?).

A step is harmonic for the head side side at a configuration when each daughter it merges projects exactly if it takes the head side, an externally merged item is built in its harmonic order, and a mover is a term of the object whose trace keeps its selection state.

def Step.HarmonicL326–338

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

Used by Step.HarmonicList, Step.replay?_of_harmonic

L356–402
L404–414

A derivation from a leaf whose every step is harmonic externalizes to the harmonic linearization of its object: the order the derivation records is the one the head function determines.

theorem Derivation.externalize?_eq_linearize?L416–428
{side : Edge} {τ : SyntacticObject → Option LexicalItem.Token} {d : Derivation} (hi : d.initial.toLinearizedLeaf?.isSome = true) (hd : Step.HarmonicList side τ d.steps { current := d.initial, stack := [] }) :

Built from ,