Documentation

Linglib.Phonology.OptimalityTheory.ElementaryRankingCondition

Elementary ranking conditions #

OT's algebraic ranking-inference layer ([Pri02]; [Rig09a]). An ERC value is a sign, so the alphabet is mathlib's SignTypeW (+1, winner-preferring), L (-1, loser-preferring), e (0, neutral) — which buys ercOfProfiles as a coordinatewise SignType.sign, the antithetical ERC as pointwise negation, per-coordinate entailment as SignType's own order LeW, and the decidability instances for free.

A ranking satisfies an ERC iff its sign vector, read in the ranking's priority order, is lex-nonnegative — equivalently (ERC.satisfiedBy_iff_dominance), every L-constraint is outranked by some W-constraint ([Pri02] §0 (3)/(4)).

Main declarations #

The three-valued alphabet ERCVal #

@[reducible, inline]

An ERC value is a sign ([Pri02] §0): W (winner-preferring), L (loser-preferring), e (neutral). This is mathlib's SignType — see ERCVal.W, ERCVal.L, ERCVal.e.

Equations
Instances For
    @[reducible, match_pattern, inline]

    Winner-preferring value (+1).

    Equations
    Instances For
      @[reducible, match_pattern, inline]

      Loser-preferring value (-1).

      Equations
      Instances For
        @[reducible, match_pattern, inline]

        Neutral / indifferent value (0).

        Equations
        Instances For

          Elementary ranking conditions #

          @[reducible, inline]
          abbrev OptimalityTheory.ERC (n : ) :

          An elementary ranking condition over n constraints: a sign vector Fin n → ERCVal ([Pri02] §0).

          Equations
          Instances For
            def OptimalityTheory.ERC.IsTrivial {n : } (α : ERC n) :

            An ERC is trivial if it has no L-constraint, so every ranking satisfies it.

            Equations
            Instances For
              @[instance_reducible]
              instance OptimalityTheory.ERC.instDecidableIsTrivial {n : } (α : ERC n) :
              Decidable α.IsTrivial
              Equations

              An ERC is contradictory if it has an L-constraint but no W-constraint, so no ranking satisfies it — Prince's class 𝓛⁺.

              Equations
              Instances For
                def OptimalityTheory.ERC.IsSimple {n : } (α : ERC n) :

                A simple ERC has exactly one W and one L.

                Equations
                Instances For

                  ERC satisfaction #

                  def OptimalityTheory.ERC.SatisfiedBy {n : } (r : Ranking n) (α : ERC n) :

                  A ranking r satisfies ERC α iff its sign vector, read in r's priority order, is lexicographically nonnegative.

                  Equations
                  Instances For
                    theorem OptimalityTheory.ERC.lex_nonneg_iff_dominance {n : } (v : Fin nERCVal) :
                    toLex 0 toLex v ∀ (p : Fin n), v p = ERCVal.Lq < p, v q = ERCVal.W

                    Position-space dominance, ranking-free: a sign vector is lex-nonnegative iff every L is preceded by a W.

                    theorem OptimalityTheory.ERC.satisfiedBy_iff_lead {n : } (r : Ranking n) (α : ERC n) :
                    SatisfiedBy r α ∀ (he : ∃ (p : Fin n), α (r p) ERCVal.e), α (r (Fin.find (fun (k : Fin n) => α (r k) ERCVal.e) he)) = ERCVal.W

                    Prince's leading-entry characterization ([Pri02] §0): a ranking satisfies an ERC iff the r-earliest non-neutral constraint, when one exists, is winner-preferring.

                    theorem OptimalityTheory.ERC.satisfiedBy_iff_dominance {n : } (r : Ranking n) (α : ERC n) :
                    SatisfiedBy r α ∀ (c : Fin n), α c = ERCVal.L∃ (w : Fin n), α w = ERCVal.W r.Dominates w c

                    [Pri02] §0 (3): satisfaction unfolds to the ∀∃ dominance form — every loser-preferring constraint is dominated by some winner-preferring one. Position-space dominance (lex_nonneg_iff_dominance), coordinates changed along r.

                    @[instance_reducible]
                    instance OptimalityTheory.ERC.instDecidableSatisfiedBy {n : } (r : Ranking n) (α : ERC n) :
                    Decidable (SatisfiedBy r α)
                    Equations
                    theorem OptimalityTheory.ERC.satisfiedBy_iff_exists_dominant {n : } (r : Ranking n) (α : ERC n) [NeZero n] :
                    SatisfiedBy r α ∃ (d : Fin n), ∀ (c : Fin n), α c = ERCVal.Lα d = ERCVal.W r.Dominates d c

                    [Pri02] §0 (4): the ∀∃ form is equivalent to the ∃∀ form — some W-constraint dominates every L-constraint — because the ranking is total: the leading constraint is the single witness.

                    theorem OptimalityTheory.ERC.trivial_satisfiedBy {n : } {α : ERC n} (htriv : α.IsTrivial) (r : Ranking n) :

                    A trivial ERC is satisfied by every ranking.

                    Linear extensions #

                    Satisfaction of a Finset (ERC n) needs no vocabulary of its own: a ranking satisfies the set iff ∀ α ∈ E, α.SatisfiedBy r, the set is consistent ([Pri02]) iff (ERC.linearExtensions E).Nonempty, and E entails E' iff ERC.linearExtensions E ⊆ ERC.linearExtensions E'.

                    def OptimalityTheory.ERC.linearExtensions {n : } (E : Finset (ERC n)) :
                    Finset (Ranking n)

                    The rankings satisfying every member of a set of ERCs, as a Finset — its linear extensions ([MR16]).

                    Equations
                    Instances For
                      @[simp]
                      theorem OptimalityTheory.ERC.mem_linearExtensions {n : } {E : Finset (ERC n)} {r : Ranking n} :
                      r linearExtensions E αE, SatisfiedBy r α
                      @[simp]

                      The empty set constrains nothing: every ranking is a linear extension.

                      Simple ERCs #

                      def OptimalityTheory.simpleERC {n : } (i j : Fin n) :
                      ERC n

                      The simple ERC asserting constraint i must dominate constraint j; all other constraints are e.

                      Equations
                      Instances For
                        theorem OptimalityTheory.simpleERC_eq_W_iff {n : } {i j : Fin n} (k : Fin n) :
                        simpleERC i j k = ERCVal.W k = i

                        The only W of simpleERC i j is at i.

                        theorem OptimalityTheory.simpleERC_eq_L_iff {n : } {i j : Fin n} (hij : i j) (k : Fin n) :
                        simpleERC i j k = ERCVal.L k = j

                        The only L of simpleERC i j (with i ≠ j) is at j.

                        @[simp]
                        theorem OptimalityTheory.simpleERC_apply_W {n : } {i j : Fin n} :
                        theorem OptimalityTheory.simpleERC_apply_L {n : } {i j : Fin n} (hij : i j) :

                        The diagonal simple ERC i ≫ i has no L, hence is trivial.

                        theorem OptimalityTheory.simpleERC_satisfiedBy_iff {n : } {i j : Fin n} (hij : i j) (r : Ranking n) :

                        A simple ERC i ≫ j (with i ≠ j) is satisfied by r iff i dominates j under r.

                        theorem OptimalityTheory.simpleERC_satisfiedBy_toRel_iff {n : } (i j : Fin n) (r : Ranking n) :
                        ERC.SatisfiedBy r (simpleERC i j) r.toRel i j

                        Side-condition-free form: simpleERC i j is satisfied by r iff i is ranked at least as high as j (Ranking.toRel). On the diagonal the ERC is trivial and the relation reflexive, so no i ≠ j guard is needed.

                        theorem OptimalityTheory.simpleERC_consistent {n : } {i j : Fin n} (hij : i j) :

                        A simple ERC i ≫ j (with i ≠ j) is consistent.

                        theorem OptimalityTheory.simpleERC_isSimple {n : } {i j : Fin n} (hij : i j) :

                        simpleERC i j (with i ≠ j) is a simple ERC.

                        Every simpleERC is simple or (on the diagonal) trivial.

                        Bridges: profiles, tableaux, and the Core lex order #

                        The ERC of a winner/loser violation-profile pair: the coordinatewise sign of the violation difference ([Pri02] §0; [Rig09a] Def. 3).

                        Equations
                        Instances For
                          theorem OptimalityTheory.ercOfProfiles_eq_W_iff {n : } (w l : Constraints.ViolationProfile n) (k : Fin n) :
                          ercOfProfiles w l k = ERCVal.W w k < l k

                          ercOfProfiles is W exactly where the winner has strictly fewer violations.

                          theorem OptimalityTheory.ercOfProfiles_eq_L_iff {n : } (w l : Constraints.ViolationProfile n) (k : Fin n) :
                          ercOfProfiles w l k = ERCVal.L l k < w k

                          ercOfProfiles is L exactly where the winner has strictly more violations.

                          theorem OptimalityTheory.ercOfProfiles_eq_e_iff {n : } (w l : Constraints.ViolationProfile n) (k : Fin n) :
                          ercOfProfiles w l k = ERCVal.e w k = l k

                          ercOfProfiles is e exactly where violations are equal.

                          The antithetical ERC ([Pri02] §2): swapping winner and loser negates it.

                          def OptimalityTheory.ercOfList {n : } (vs : List ERCVal) (h : vs.length = n := by decide) :
                          ERC n

                          Construct an ERC from a list of ERCVal, with a length proof discharged by decide for literals: def myERC : ERC 4 := ercOfList [.W, .e, .L, .e].

                          Equations
                          Instances For
                            theorem OptimalityTheory.lex_nonneg_ercOfProfiles_iff {n : } (w l : Constraints.ViolationProfile n) :
                            (toLex fun (x : Fin n) => 0) toLex (ercOfProfiles w l) w l

                            Lex-nonnegativity of the sign vector is lex-comparison of the profiles: the sign of the first difference decides both.

                            ERC satisfaction is lexicographic domination: r satisfies the ERC of a winner/loser pair iff the winner's profile, read in r's priority order, is lex-≤ the loser's ([Pri02]). Precomposition with the ranking is absorbed by instantiating lex_nonneg_ercOfProfiles_iff at the ranked readings r • w, r • l.

                            def OptimalityTheory.tableauERC {n : } {C : Type u_1} [DecidableEq C] (t : Tableau C n) (w l : C) :
                            ERC n

                            The ERC of a winner-loser pair (w, l) in tableau t: the ranking requirements for w to beat l.

                            Equations
                            Instances For
                              theorem OptimalityTheory.tableauERC_satisfiedBy_iff {n : } {C : Type u_1} [DecidableEq C] (t : Tableau C n) (r : Ranking n) (w l : C) :
                              ERC.SatisfiedBy r (tableauERC t w l) r t.profile w r t.profile l

                              Tableau form of the bridge: the winner-loser ERC is satisfied by r iff r ranks the winner at-or-above the loser under the tableau's lex evaluation.

                              theorem OptimalityTheory.tableauERC_satisfiedBy_id_iff {n : } {C : Type u_1} [DecidableEq C] (t : Tableau C n) (w l : C) :

                              At the identity ranking, ERC satisfaction is exactly the tableau's own lex comparison — connecting ERC inference to LexMinProblem.

                              theorem OptimalityTheory.mem_optimal_iff_forall_satisfiedBy {n : } {C : Type u_1} [DecidableEq C] (t : Tableau C n) (w : C) :
                              w t.optimal w t.candidates lt.candidates, ERC.SatisfiedBy (Ranking.id n) (tableauERC t w l)

                              A candidate is the tableau's optimum iff, under the identity ranking, its ERC against every competitor is satisfied — ERC consistency is optimality.

                              theorem OptimalityTheory.Tableau.ofPerm_mem_optimal_iff_satisfiedBy {C : Type u_1} [DecidableEq C] {n : } (con : Constraints.CON C n) (r : Ranking n) (candidates : List C) (h : candidates []) (w : C) :
                              w (ofPerm con r candidates h).optimal w candidates.toFinset lcandidates.toFinset, ERC.SatisfiedBy r (tableauERC (ofPerm con (Equiv.refl (Fin n)) candidates h) w l)

                              The Sₙ action on a fixed CON is the ERC theory: w is optimal in Tableau.ofPerm con r iff every winner–loser ERC of the identity-ranked tableau is satisfied by r — factorial typology and ERC consistency are two readouts of one symmetric-group action.