OT — Evaluation Mode (Parallel vs Directional) #
@cite{eisner-2000} @cite{eisner-2002} @cite{lamont-2022a} @cite{lamont-2022b}
Encodes @cite{lamont-2022b}'s reframing: directionality is a property of
EVAL, not of constraints. We do not define
DirectionalConstraint C := C → List Nat — that is the obsolete
constraint-side encoding. Instead, an EvalMode parameter governs how
violation profiles are lex-compared.
Encoding convention #
A constraint's violation profile is a List Nat interpreted as an
indicator vector: position i of the list records the violation
status at position i of the form. For binary violations, entries
are 0 (no violation) or 1 (violation present). For gradient
violations, entries are arbitrary Nats.
Under this convention:
parallel— classical OT: profile is conventionally a singleton[count](total violation count).leusesLexLE, which on singletons reduces toNat ≤.directional .leftToRight— @cite{eisner-2000}'s left-to-right evaluation. Indicator vector is in left-to-right position order;LexLEcompares from the leftmost position. The candidate without a violation at the first differing left position wins.directional .rightToLeft— mirror.LexLEcompares the reversed indicator vectors, so the rightmost-position comparison fires first.
Why no sorting #
An earlier version of this file sorted position vectors ascending
before lex-comparing under directional .leftToRight. That destroyed
the position information: for input /kāk^H + rī^H + dō^H/ (paper,
fig. 3), the three depth-1 candidates have indicator vectors
[0,1,1], [1,0,1], [1,1,0] — all sort to [0,1,1], making them
indistinguishable. The correct semantics is plain LexLE on the
position-ordered indicator (no sorting): then [0,1,1] < [1,0,1] < [1,1,0] lex, picking the leftmost-deletion candidate as the winner —
which is what @cite{mcpherson-lamont-2026} require.
The forgetful map count := positions.length lets a counting constraint
embed cleanly into the directional setting as the degenerate case where
every violation collapses to a single tally. The EvalMode.le_singleton
theorem is the structural soundness statement: when comparing two
single-violation profiles, all EvalModes agree with Nat ≤. Note:
multi-violation profiles distinguish the modes — the paper's whole
argument (paper, eqs. 60–62) hinges on parallel and directional eval
giving different winners for /kāk^H + rī^H + dō^H/.
Why this lives in Core/Constraint/OT/ rather than Phonology/ #
EvalMode is a property of the OT evaluation procedure, not of the
phonology-specific candidate type. Like ERC, it lives at the framework
layer so that future phonology-, syntax-, and pragmatics-side users can
share one notion of directional EVAL.
Sibling, not refactor #
This file does not modify NamedConstraint.eval : C → Nat (which is
load-bearing for Weighted.lean/MaxEnt.lean/NoisyHG.lean — see
Core/Constraint/Evaluation.lean). The directional dispatch is consumed
by HarmonicSerialism.lean's combinator, which currently routes the
directional arm to the parallel optimum as a stub; a true
DirectionalTableau consumer lands when a study file requires it.
Direction of lex comparison on violation position vectors. @cite{eisner-2000} §3, @cite{eisner-2002}.
Instances For
Equations
- Core.Constraint.OT.instDecidableEqDirection x✝ y✝ = if h : x✝.ctorIdx = y✝.ctorIdx then isTrue ⋯ else isFalse ⋯
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Evaluation mode for the OT EVAL function.
parallel is classical @cite{prince-smolensky-1993} OT. directional
instances correspond to @cite{eisner-2000}'s direction of evaluation;
@cite{lamont-2022b} reframes directionality as a property of EVAL
(not of constraints), and shows it is needed to break ties locally
without invoking globally-aware tie-breakers.
Instances For
Equations
- Core.Constraint.OT.instDecidableEqEvalMode.decEq Core.Constraint.OT.EvalMode.parallel Core.Constraint.OT.EvalMode.parallel = isTrue ⋯
- Core.Constraint.OT.instDecidableEqEvalMode.decEq Core.Constraint.OT.EvalMode.parallel (Core.Constraint.OT.EvalMode.directional dir) = isFalse ⋯
- Core.Constraint.OT.instDecidableEqEvalMode.decEq (Core.Constraint.OT.EvalMode.directional dir) Core.Constraint.OT.EvalMode.parallel = isFalse ⋯
- Core.Constraint.OT.instDecidableEqEvalMode.decEq (Core.Constraint.OT.EvalMode.directional a) (Core.Constraint.OT.EvalMode.directional b) = if h : a = b then h ▸ isTrue ⋯ else isFalse ⋯
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Core.Constraint.OT.instReprEvalMode = { reprPrec := Core.Constraint.OT.instReprEvalMode.repr }
Equations
Compare two indicator-vector violation profiles under an EvalMode,
returning a Prop (decidable). The result EvalMode.le m a b reads
"candidate a is at least as harmonic as candidate b under m."
Convention: a, b : List Nat are indicator vectors with positions
in left-to-right order (entry i = violation status at position i
of the form). For parallel constraints, the convention is a
singleton [count]; the modes coincide on singletons.
parallel:LexLE a bdirectly (Layered Grounding).directional .leftToRight:LexLE a b— same asparallel, because the convention puts positions in left-to-right order already, andLexLEcompares from the leftmost entry.directional .rightToLeft:LexLE a.reverse b.reverse— compare from the rightmost entry by reversing both vectors.
The substrate keeps parallel and directional .leftToRight as
distinct EvalMode cases (even though le is the same function for
them) so that downstream consumers can dispatch on the mode at
higher levels (e.g., a DirectionalTableau may ONLY accept
directional modes; a count-based Tableau may ONLY accept
parallel).
Equations
- Core.Constraint.OT.EvalMode.parallel.le x✝¹ x✝ = Core.Constraint.Evaluation.LexLE x✝¹ x✝
- (Core.Constraint.OT.EvalMode.directional Core.Constraint.OT.Direction.leftToRight).le x✝¹ x✝ = Core.Constraint.Evaluation.LexLE x✝¹ x✝
- (Core.Constraint.OT.EvalMode.directional Core.Constraint.OT.Direction.rightToLeft).le x✝¹ x✝ = Core.Constraint.Evaluation.LexLE x✝¹.reverse x✝.reverse
Instances For
Equations
- One or more equations did not get rendered due to their size.
Single-violation degeneracy. When comparing two profiles each
consisting of a single violation count [k] and [k'], all
EvalModes agree with Nat ≤. This is the structural reason that
a counting constraint (which records [k] for k violations as a
single position-vector slot) embeds cleanly into the directional
setting as a degenerate case — and the algebraic justification for
why NamedConstraint.eval : C → Nat (count-based) and the
directional indicator-vector encoding agree on simple cases.