Documentation

Linglib.Phonology.Constraints.Harmony

Harmony evaluation #

Evaluation and order lemmas for Constraints.harmonyScore and Constraints.weightedViolations.

Main results #

Evaluation by cons-recursion #

@[simp]
theorem Constraints.weightedViolations_nil (w : Fin 0) (v : Fin 0) :
@[simp]
theorem Constraints.weightedViolations_cons {n : } (w₀ : ) (w : Fin n) (v₀ : ) (v : Fin n) :
weightedViolations (Matrix.vecCons w₀ w) (Matrix.vecCons v₀ v) = w₀ * v₀ + weightedViolations w v
@[simp]
theorem Constraints.harmonyScore_nil {C : Type u_1} (con : CON C 0) (w : Fin 0) (x : C) :
harmonyScore con w x = 0
@[simp]
theorem Constraints.harmonyScore_cons {C : Type u_1} {n : } (c₀ : Constraint C) (con : CON C n) (w₀ : ) (w : Fin n) (x : C) :
harmonyScore (Matrix.vecCons c₀ con) (Matrix.vecCons w₀ w) x = -(w₀ * (c₀ x)) + harmonyScore con w x

Harmonic bounding (Pareto dominance) #

theorem Constraints.weightedViolations_mono {n : } {w : Fin n} (hw : 0 w) :
Monotone (weightedViolations w)

For non-negative weights, the weighted violation sum is monotone in the violation profile.

theorem Constraints.weightedViolations_lt_weightedViolations {n : } {w : Fin n} {va vb : Fin n} (hw : 0 w) (hle : va vb) (hlt : ∃ (i : Fin n), 0 < w i va i < vb i) :

Pointwise with a strict advantage on a positively weighted coordinate gives a strictly smaller weighted violation sum.

theorem Constraints.harmonyScore_le_of_forall_le {C : Type u_1} {n : } {con : CON C n} {w : Fin n} {a b : C} (hw : 0 w) (h : ∀ (i : Fin n), con i a con i b) :
harmonyScore con w b harmonyScore con w a

Harmonic bounding: with non-negative weights, a candidate incurring no more violations than b on every constraint has at least b's harmony ([PS93]).

theorem Constraints.harmonyDominates_of_lt {C : Type u_1} {n : } {con : CON C n} {w : Fin n} {a b : C} (hw : 0 w) (hle : ∀ (i : Fin n), con i a con i b) (hlt : ∃ (i : Fin n), 0 < w i con i a < con i b) :

Strict harmonic bounding: strictly fewer violations on some positively weighted constraint gives strictly greater harmony.