Docs / Phonology / OptimalityTheory / Constraint / Defs

Constraints

import Linglib.Phonology.OptimalityTheory.Constraint.Defs · namespace OptimalityTheory

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

The Harmonic Grammar scores of a constraint set are in HarmonicGrammar/Harmony.lean.

References

Declarations

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.

@[reducible, inline] abbrev ConstraintL51–54
(C : Type u_1) :
Type u_1

Used by Constraint.binary, Constraint.antifaithful, Constraint.antifaithful_eq_zero_iff, Constraint.antifaithful_eq_one_iff, Constraint.comap, Constraint.comap_apply, Constraint.joint, Constraint.joint_apply, ConstraintSet

Used in Phonology/HarmonicGrammar/Expressivity, Phonology/HarmonicGrammar/Harmony, Phonology/Hiatus, Phonology/OptimalityTheory/Constraint/Alignment, Phonology/OptimalityTheory/Constraint/Directional and 52 more

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.

def Constraint.binaryL58–62
{C : Type u_1} (P : C → Prop) [DecidablePred P] :

Built from

Used by Constraint.binary_apply, Constraint.binary_le_one, Constraint.binary_eq_zero_iff, Constraint.binary_eq_one_iff, Constraint.antifaithful

Used in Phonology/OptimalityTheory/Constraint/Directional, Aissen2003, Alderete2001, ArnoldEtAl2000, Beaver2004 and 14 more

L64–65
L67–69
L71–73
L75–77
L79–81
L83–85
L87–89

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.

def Constraint.comapL91–93
{C : Type u_1} {D : Type u_2} (f : C → D) (con : Constraint D) :

Built from

Used by Constraint.comap_apply, ConstraintSet.comap

Used in Phonology/OptimalityTheory/Filtration, Benua1997, CoetzeePater2011, ItoMester2009, Pater2001 and 2 more

L95–96

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).

L113–114

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.Enumeration ι 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.

@[reducible, inline] abbrev ConstraintSetL116–121
(C : Type u_6) (ι : Type u_7) :
Type (max u_7 u_6)

Built from

Used by ConstraintSet.comap, ConstraintSet.comap_apply, ConstraintSet.joint, ConstraintSet.joint_apply, ConstraintSystem.con, ConstraintSystem.conAt

Used in Phonology/HarmonicGrammar/Harmony, Phonology/HarmonicGrammar/IntersectingFamilies, Phonology/HarmonicGrammar/Noise, Phonology/OptimalityTheory/PartiallyOrderedConstraints, Phonology/OptimalityTheory/ViolationProfile and 13 more

The pullback of a constraint set along a candidate map pulls back each constraint.

def ConstraintSet.comapL127–128
{C : Type u_1} {D : Type u_2} {ι : Type u_6} (f : C → D) (con : ConstraintSet D ι) :

Built from ,

Used by ConstraintSet.comap_apply, ConstraintSystem.conAt

Used in Phonology/HarmonicGrammar/Harmony, Phonology/HarmonicGrammar/IntersectingFamilies, CoetzeePater2011, Jaeger2007, Magri2025 and 2 more

L130–131
L137–138

Constraint systems

A constraint system gives each input its candidate outputs, GEN, and each candidate its marks on the constraints, CON (Prince & Smolensky 1993). Optimality Theory ranks the constraints and Harmonic Grammar weights them, and either way a grammar evaluates each input's candidates.

structure ConstraintSystemL144–151
(I : Type u_6) (O : Type u_7) (ι : Type u_8) :
Type (max (max u_6 u_7) u_8)
  • gen : I → Finset O

    The candidate outputs of each input.

  • marks : I → O → ι → ℕ

    The marks of an output for an input: its violations of each constraint.

Used by ConstraintSystem.con, ConstraintSystem.conAt, ConstraintSystem.conAt_apply, ConstraintSystem.joint

Used in Phonology/HarmonicGrammar/Expressivity, Phonology/HarmonicGrammar/Harmony, Phonology/OptimalityTheory/ElementaryRankingCondition, Phonology/OptimalityTheory/Grammar, Phonology/OptimalityTheory/PartiallyOrderedConstraints and 10 more

L162–163

The joint system of a system with finitely many inputs has a single input, whose candidates are the tuples choosing a candidate for every input; each constraint sums its violations over the inputs. Its tableau is the Minkowski sum of the system's tableaux (Prince 2015).

def ConstraintSystem.jointL165–172
{I : Type u_6} {O : Type u_7} {ι : Type u_8} [Fintype I] [DecidableEq I] (S : ConstraintSystem I O ι) :
ConstraintSystem Unit (I → O) ι
  • S.joint = { gen := fun (x : Unit) => Fintype.piFinset S.gen, marks := fun (x : Unit) (g : I → O) (k : ι) => ∑ i : I, S.marks i (g i) k }

Built from

Used in Phonology/HarmonicGrammar/Harmony, Phonology/OptimalityTheory/Typology