Documentation

Linglib.Theories.Phonology.Constraints

Shared Phonological Constraint Library #

@cite{prince-smolensky-1993} @cite{mccarthy-prince-1995}

Reusable constraint constructors for Optimality Theory and Harmonic Grammar. Every phonological study in linglib defines constraints as NamedConstraint C or WeightedConstraint C instances. Many constraint families recur across studies with different candidate types:

This module provides generic constructors so that study files can write:

def myMax := mkMax "MAX-V" (fun c => c.deleted)

rather than manually assembling the NamedConstraint record each time. The constructors enforce the correct ConstraintFamily classification.

Contextual faithfulness #

Following @cite{coetzee-pater-2011}, contextual faithfulness constraints (e.g. MAX-PRE-V, MAX-FINAL) are standard MAX/DEP constraints with an additional context predicate. mkMaxCtx and mkDepCtx take a context guard: the constraint is violated only when the context guard is true.

Violation counting #

All constructors support both binary (0/1) and gradient (Nat) violations. Binary constraints use a Bool predicate; gradient constraints use a Nat-valued evaluation function directly.

Build a MAX constraint (penalizes deletion). violated c returns true when candidate c exhibits deletion.

Equations
Instances For
    def Theories.Phonology.Constraints.mkMaxCtx {C : Type} (name : String) (deleted context : CBool) :

    Build a contextual MAX constraint. Violated only when both deletion occurs AND the context holds. Models positional faithfulness (@cite{coetzee-pater-2011} §3.2).

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For

      Build a DEP constraint (penalizes epenthesis). violated c returns true when candidate c exhibits insertion.

      Equations
      Instances For

        Build an IDENT constraint (penalizes featural change). violated c returns true when the feature value has changed.

        Equations
        Instances For

          Build a binary markedness constraint. violated c returns true when the marked structure is present.

          Equations
          Instances For

            Build a gradient markedness constraint with a Nat-valued violation count. violations c returns the number of violations for candidate c.

            Equations
            Instances For

              MAX constraints are faithfulness constraints.

              DEP constraints are faithfulness constraints.

              Markedness constraints are markedness constraints.

              Contextual MAX constraints are faithfulness constraints.

              theorem Theories.Phonology.Constraints.mkMax_bounded {C : Type} (name : String) (p : CBool) (c : C) :
              (mkMax name p).eval c 1

              Binary constraints have violations bounded by 1.

              theorem Theories.Phonology.Constraints.mkMark_bounded {C : Type} (name : String) (p : CBool) (c : C) :
              (mkMark name p).eval c 1

              Binary markedness constraints have violations bounded by 1.

              theorem Theories.Phonology.Constraints.mkMaxCtx_bounded {C : Type} (name : String) (d ctx : CBool) (c : C) :
              (mkMaxCtx name d ctx).eval c 1

              Contextual MAX constraints have violations bounded by 1.

              Build a weighted MAX constraint with a given weight.

              Equations
              Instances For

                Build a weighted contextual MAX constraint.

                Equations
                Instances For

                  Build a weighted DEP constraint.

                  Equations
                  Instances For

                    Build a weighted IDENT constraint.

                    Equations
                    Instances For

                      Build a weighted binary markedness constraint.

                      Equations
                      Instances For

                        Build a weighted gradient markedness constraint.

                        Equations
                        Instances For