Constraints #
This file defines the violable constraints of Optimality Theory ([prince-smolensky-1993]), which
Harmonic Grammar, MaxEnt and optimality-theoretic work in syntax and semantics adopt. A constraint
is a function C → ℕ that counts the violations of each candidate. It stores no name and no
faithfulness or markedness tag, since a constraint is its evaluation function. The
faithfulness–markedness distinction is a structural property of correspondence candidates
(OptimalityTheory.Correspondence), where markedness factors through the output and faithfulness
vanishes on the identity candidate, and a constraint over an opaque candidate type has no family.
Main definitions #
OptimalityTheory.Constraint C: a violation-counting functionC → ℕ.Constraint.binary: the indicator constraint of a decidable predicate.Constraint.comap,ConstraintSet.comap: the pullback of a constraint or constraint set along a candidate map.ConstraintSet C ι: a grammar's constraint set, CON, a family of constraints indexed byι.Constraint.joint,ConstraintSet.joint: joint evaluation on output tuples by constraint summation.
The Harmonic Grammar scores of a constraint set are in HarmonicGrammar/Harmony.lean.
References #
- [A. Prince and P. Smolensky, Optimality Theory: Constraint Interaction in Generative Grammar (1993)][prince-smolensky-1993]
- [J. D. Alderete, Dominance Effects as Trans-derivational Anti-faithfulness (2001)][alderete-2001]
- [A. Prince, One Tableau Suffices (2015)][prince-2015]
- [G. Magri and B. Storme, Constraint Summation in Phonological Theory (2021)][magri-storme-2021]
An OT or Harmonic-Grammar constraint is a function counting the violations of each
candidate. Whether it is a faithfulness or a markedness constraint is a structural property (see
OptimalityTheory.Correspondence), not a stored tag.
Equations
- OptimalityTheory.Constraint C = (C → ℕ)
Instances For
The binary constraint of a decidable predicate P assigns one violation when P c
holds and none otherwise. Every binary markedness or faithfulness constraint has this shape, and
which of the two it is follows from its structure, not from the constructor.
Equations
- OptimalityTheory.Constraint.binary P c = if P c then 1 else 0
Instances For
A binary constraint is satisfied exactly when its predicate fails.
A binary constraint is violated exactly when its predicate holds.
The anti-faithfulness constraint ¬F of a constraint F ([alderete-2001]) is satisfied
exactly when F is violated at least once, so it demands one violation and no more.
Equations
- F.antifaithful = OptimalityTheory.Constraint.binary fun (x : C) => F x = 0
Instances For
The pullback of a D-constraint along f : C → D evaluates it on the image of each
candidate, so a specific candidate type can reuse a constraint defined on a more general one.
Equations
- OptimalityTheory.Constraint.comap f con = con ∘ f
Instances For
Joint evaluation #
A systemic constraint — *HOMOPHONY, a distinctiveness constraint — scores a
whole system of outputs, so its candidate is an output tuple f : κ → O assigning
each input inputs i its output. A per-mapping constraint on I × O is lifted to
output tuples by constraint summation ([prince-2015], [magri-storme-2021]), which
sums its violations on f over the mappings (inputs i, f i).
The joint evaluation of a per-mapping constraint on an output tuple sums its violations
over the mappings (inputs i, f i).
Equations
- OptimalityTheory.Constraint.joint inputs con f = ∑ i : κ, con (inputs i, f i)
Instances For
A grammar's constraint set, CON in [prince-smolensky-1993], is a family of constraints over
candidates C indexed by the constraint names ι. An OT grammar ranks it (a Ranking ι n), a
Harmonic Grammar weights its violations by a vector ι → ℝ, and MaxEnt takes the softmax of the
resulting harmonies. A constraint set written as a vector ![C₀, …] is indexed by Fin n.
Equations
- OptimalityTheory.ConstraintSet C ι = (ι → OptimalityTheory.Constraint C)
Instances For
The pullback of a constraint set along a candidate map pulls back each constraint.
Equations
- OptimalityTheory.ConstraintSet.comap f con i = OptimalityTheory.Constraint.comap f (con i)
Instances For
The joint evaluation of a constraint set evaluates each constraint jointly.
Equations
- OptimalityTheory.ConstraintSet.joint inputs con j = OptimalityTheory.Constraint.joint inputs (con j)