OT — the ERC–Antimatroid isomorphism #
[MR16] prove that consistent ERC sets over n constraints are
isomorphic to antimatroids on Fin n. This file builds that correspondence on top
of the framework-agnostic antimatroid theory in
Linglib.Core.Combinatorics.Antimatroid (SetSystem, Antimatroid,
Antimatroid.free/trace/RootedCircuit). The two maps Antimat (ERCs →
antimatroids) and RCErc (antimatroids → ERCs) are mutually inverse homomorphisms
preserving entailment/containment, so any antimatroid result transfers to OT.
ERC → Antimatroid pipeline #
MChain— maps a consistent ERC set to its feasible sets (Definition 1)Antimat— maps a consistent ERC set to an antimatroid (Definition 6)RCErc— maps an antimatroid to an ERC set (Definition 10)
Decidable feasibility and the simple-ERC fragment #
Feasible— the decidable,Finset-valued local feasibility condition; a sound over-approximation of the antimatroid familyFeasiblePrefix— the faithful, also-decidable family (MChainoverFinset)feasible_not_accessible— for general (disjunctive) ERCsFeasiblestrictly over-approximates and is not even accessiblefeasible_iff_feasiblePrefix_of_simple— on the simple-ERC fragment the two coincide (Birkhoff order-ideal ↔ linear-extension-prefix correspondence)Antimat.ofSimple— the resulting decidable antimatroid on a simple ERC set
Lemmas and theorems #
maximalChain_dominance— prefix sets are downward-closed under dominanceMChain.union_closed— Lemma 3: MChain is union-closedAntimat_entailment— Theorem 3: entailment → containment (proved)RCErc_single_eq_simpleERC— two-element rooted circuits are simple ERCs (proved)Antimat_RCErc_inv— Theorem 1:Antimat ∘ RCErc = id(stated; proofsorry)RCErc_Antimat_inv— Theorem 2:RCErc ∘ Antimat = idup to entailment (stated; proofsorry)RCErc_entailment— Theorem 4: containment → entailment (stated; proofsorry)
The three sorrys are the general antimatroid → ERC direction, which rests on
[Die87]'s rooted-circuit characterization of feasible sets.
References #
[Die87] — A circuit set characterization of antimatroids [MR16] — OT grammars, beyond partial orders: ERC sets and antimatroids
A maximal chain in the power set lattice on n elements is a
sequence of sets ∅ = S₀ ⊂ S₁ ⊂ ... ⊂ Sₙ = Fin n where each
set differs from the previous by exactly one element.
Each maximal chain corresponds to a total order (ranking) on
Fin n: the element added at step k is the constraint ranked
at position k.
Equations
- OptimalityTheory.maximalChain r k = {i : Fin n | ↑((Equiv.symm r) i) < ↑k}
Instances For
The maximal chain starts at the empty set.
The maximal chain ends at the full set.
MChain E is the collection of subsets of Fin n that appear in
some maximal chain consistent with ERC set E.
A set S is in MChain(E) iff there exists a ranking r that
satisfies all ERCs in E and a position k such that S is the
set of the top-k constraints under r.
[MR16] Definition 1.
Equations
- OptimalityTheory.MChain E S = ∃ (r : OptimalityTheory.Ranking n), OptimalityTheory.ERCSet.SatisfiedBy r E ∧ ∃ (k : Fin (n + 1)), OptimalityTheory.maximalChain r k = S
Instances For
Local feasibility — a decidable sound over-approximation #
Local feasibility of a candidate prefix S against ERC set E: for
every ERC, if S contains one of its losers then it contains one of its winners
(one rooted circuit per loser). Decidable and decide-reducing.
Feasible is a necessary condition for antimatroid feasibility — implied by
FeasiblePrefix/MChain (feasible_of_satisfiedBy) — but strictly weaker for
disjunctive (multi-W) ERCs: two ERCs can mutually cover each other's losers
inside S with no consistent global order realizing it
(feasible_not_accessible). It is exact only on the simple-ERC fragment
(each ERC one W/one L = a Hasse edge = a partial order,
feasible_iff_feasiblePrefix_of_simple). The faithful, also decidable notion
is FeasiblePrefix.
Equations
- OptimalityTheory.Feasible E S = ∀ α ∈ E, (∃ (l : Fin n), α l = OptimalityTheory.ERCVal.L ∧ l ∈ S) → ∃ (w : Fin n), α w = OptimalityTheory.ERCVal.W ∧ w ∈ S
Instances For
Equations
- OptimalityTheory.instDecidablePredFinsetFinFeasible E S = id inferInstance
The empty prefix is locally feasible (no losers present).
Local feasibility is union-closed (a one-liner): a loser in S ∪ T lies
in one of them, whose winner then lies in S ∪ T. (This is union-closure of the
over-approximation; the faithful family's union-closure is MChain.union_closed,
[MR16] Lemma 3.)
The top-k constraints under ranking r, as a Finset (the decidable
counterpart of maximalChain r k).
Equations
- OptimalityTheory.prefixFinset r k = {i : Fin n | ↑((Equiv.symm r) i) < ↑k}
Instances For
Forward representation (the easy half of [MR16]'s
isomorphism): a prefix of a ranking that satisfies E is locally feasible.
Winners dominate their losers, so a loser inside the prefix drags its winner in
(maximalChain_dominance in Finset form).
FeasiblePrefix — the faithful, decidable antimatroid feasibility #
Faithful feasibility: S is the top-k constraints of some ranking
satisfying E — the Finset-valued form of MChain. Decidable by finite search
over Ranking n (a Fintype) and Fin (n+1), so decide reduces — and
unlike Feasible it is the genuine antimatroid family, not an over-approximation.
Equations
- OptimalityTheory.FeasiblePrefix E S = ∃ (r : OptimalityTheory.Ranking n), OptimalityTheory.ERCSet.SatisfiedBy r E ∧ ∃ (k : Fin (n + 1)), OptimalityTheory.prefixFinset r k = S
Instances For
Equations
- OptimalityTheory.instDecidablePredFinsetFinFeasiblePrefix E x✝ = Fintype.decidableExistsFintype
The faithful predicate implies the over-approximation (feasible_of_satisfiedBy).
prefixFinset coerces to maximalChain.
FeasiblePrefix is MChain over Finset — the decidable counterpart of the
existential, Set-valued antimatroid family.
Feasible strictly over-approximates the antimatroid family. Two
disjunctive (multi-W) ERCs over Fin 4 admit a locally-feasible {0,1} that
is not a prefix of any consistent ranking (¬ FeasiblePrefix) and has no
removable element — so {S | Feasible E S} is not accessible and cannot be an
antimatroid for general ERC sets. Hence Antimat.IsFeasible stays MChain
([MR16]'s "beyond partial orders"); the local form is exact only
on the simple-ERC fragment.
Prefix sets are downward-closed under dominance: if w dominates
l under ranking r and l is in the prefix set at position k,
then w is too (since r.symm w < r.symm l < k).
This is the key insight enabling the direct construction proof of union closure: any W-witness for an L-constraint in a prefix set must itself be in that prefix set.
MChain is closed under union.
Given S = maximalChain r₁ k₁ and T = maximalChain r₂ k₂ with
both r₁, r₂ satisfying E, construct r₃ whose prefix set at
position k₁ + |T \ S| equals S ∪ T.
Construction: r₃ orders elements in three blocks:
- Elements of
S, inr₁'s order - Elements of
T \ S, inr₂'s order - Remaining elements, in
r₁'s order
The position function f i assigns each element its rank in r₃:
- For
i ∈ S:f i = r₁.symm i(positions0tok₁ - 1) - For
i ∈ T \ S:f i = k₁ + countBelow r₂ (T\S) i - For
i ∉ S ∪ T:f i = k₁ + |T\S| + countBelow r₁ rest i
The function f is injective (within each block by the underlying
ranking's injectivity; across blocks by disjoint ranges), hence
bijective on Fin n by Finite.injective_iff_bijective. The
merged ranking r₃ is (Equiv.ofBijective f).symm.
ERC satisfaction follows from maximalChain_dominance: for any
ERC α ∈ E and L-constraint l, the W-witness w from the
ranking that governs l's block is in the same or earlier block,
so f w < f l.
[MR16] Lemma 3.
Antimat E maps a consistent ERC set E to an antimatroid on
Fin n. The ground set is Fin n (the constraint indices), and
the feasible sets are MChain(E) — the subsets that appear in
maximal chains consistent with E.
[MR16] Definition 6, Lemma 4.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Simple-ERC feasibility coincides with the antimatroid family #
When every ERC is simple (one W, one L — a Hasse edge w ≫ l), the
constraints carry a genuine partial order and the decidable local condition
Feasible is exact: it agrees with the faithful FeasiblePrefix/MChain family.
This is the Birkhoff correspondence between order ideals of a poset and the
prefixes of its linear extensions ([MR16]). For non-simple E
the agreement fails (feasible_not_accessible).
Birkhoff representation on the simple-ERC fragment. With every ERC simple,
local feasibility coincides with the genuine antimatroid family: a set is locally
feasible iff it is a prefix of some consistent ranking. The forward direction is
the order-ideal ↔ linear-extension-prefix correspondence — reorder a witnessing
ranking r₀ into the block S (in r₀'s order) followed by Sᶜ (in r₀'s
order); winner-uniqueness makes every Hasse edge respected, so the result
satisfies E and has S as its length-|S| prefix.
The Set-level feasible family of the simple fragment: a set is the coercion
of a locally-feasible Finset iff it is MChain-feasible. (Bridges the decidable
Finset side to Antimat's Set-valued MChain family.)
The simple-ERC Birkhoff antimatroid. A consistent set of simple ERCs
yields an antimatroid on Fin n whose feasible sets are the locally feasible
Finsets — the decidable form. On the simple fragment this family equals
Antimat E's MChain family (feasible_coe_iff_mChain), so accessibility and
union closure transfer from Antimat; concrete membership is checked by decide
via ofSimple_isFeasible_coe. This is the order-ideal antimatroid of the
constraint partial order ([MR16]).
Equations
- One or more equations did not get rendered due to their size.
Instances For
Concrete feasibility of Antimat.ofSimple is the decidable Feasible — the
hook that lets decide settle membership queries.
RCErc maps a rooted circuit of an antimatroid to an ERC.
Given a rooted circuit F : S(r) with root r and carrier S:
W(α) = S \ {r}(constraints that must dominater)L(α) = {r}(the root)e(α) = G \ S(constraints not in the carrier)
[MR16] Definition 10.
Equations
- OptimalityTheory.RCErc_single A rc k = if k ∈ rc.carrier ∧ k ≠ rc.root then OptimalityTheory.ERCVal.W else if k = rc.root then OptimalityTheory.ERCVal.L else OptimalityTheory.ERCVal.e
Instances For
RCErc A is the ERC set of antimatroid A: the image of A's rooted
circuits under RCErc_single. This is the inverse of Antimat
([MR16] Theorems 1–2).
Represented as a Set (ERC n); a ranking r satisfies RCErc A when
∀ α ∈ RCErc A, ERC.SatisfiedBy r α — the Set analogue of
ERCSet.SatisfiedBy, used to state the isomorphism theorems below.
Equations
- OptimalityTheory.RCErc A = Set.range (OptimalityTheory.RCErc_single A)
Instances For
Two-element rooted circuits are simple ERCs. A rooted circuit with a
two-element carrier {w, l} rooted at l maps under RCErc_single to the simple
ERC simpleERC w l (the Hasse edge w ≫ l). Larger carriers instead give a
disjunctive, multi-W ERC — one L (the root) requiring some element of
S \ {root} to dominate it — which is exactly the "beyond partial orders" content
that makes the local Feasible predicate inexact (feasible_not_accessible).
Theorem 1 ([MR16]): Antimat is a left inverse of
RCErc. For any antimatroid A, rebuilding from A's rooted-circuit
ERCs recovers A — stated at the feasible-set level (Antimat (RCErc A)
and A have the same feasible sets), since Antimat's feasible sets are
by definition the maximal chains satisfying the ERC set.
The general proof rests on the rooted-circuit characterization of an
antimatroid's feasible sets ([Die87]; [MR16]
Lemmas 7, 9), which is why this direction carries an honest sorry.
Theorem 2 ([MR16]): RCErc is a left inverse of Antimat
up to entailment. For a consistent ERC set E, the rooted-circuit ERCs of
Antimat E pick out exactly E's satisfying rankings — they are logically
equivalent to E, not literally equal.
Literal set equality (RCErc (Antimat E) = {α | α ∈ E}) is false by
transitive-reduction ambiguity: RCErc (Antimat [a≫b, b≫c]) also contains the
implied edge a≫c (a rooted circuit of the chain antimatroid), a strict
superset of the two-edge input — yet both pick out the single order a≫b≫c.
Hence the statement is mutual entailment (same satisfying rankings), the form
[MR16] actually proves. The general proof rests on
[Die87]'s rooted-circuit characterization (via Lemmas 7, 9), so it
carries an honest sorry.
Theorem 3 ([MR16]): Antimat preserves
entailment.
If ERC set E entails F (every ranking satisfying E also
satisfies F), then Antimat(E) ⊆ Antimat(F) (every feasible
set of Antimat(E) is also feasible in Antimat(F)).
Theorem 4 ([MR16]): RCErc preserves
containment.
If antimatroid A ⊆ B (every feasible set of A is feasible in
B), then RCErc(A) entails RCErc(B).
Rankings as maximal chains #
A ranking is the same data as a maximal chain in the boolean lattice 2^(Fin n):
its sequence of prefixes ∅ ⊂ … ⊂ univ, each step adding the next-ranked
constraint. The design deliberately keeps this order-theoretic content outside
the type of Ranking (which stays a permutation, [MR16]):
rankingChainEquiv records the bijection without retyping rankings as chains.
The prefix ∅ at height 0.
The constraint at rank position k is the new element added passing from the
height-k prefix to the height-k+1 prefix.
A maximal chain in the boolean lattice 2^(Fin n): an ascending family of
finsets from ∅, each step adding exactly one new element (so it reaches univ at
the top, toFun_last).
- toFun : Fin (n + 1) → Finset (Fin n)
The chain, indexed by height
0 … n. - bot : self.toFun 0 = ∅
The chain starts at the empty set.
- step (k : Fin n) : ∃ x ∉ self.toFun k.castSucc, self.toFun k.succ = insert x (self.toFun k.castSucc)
Each step adds exactly one new element.
Instances For
The unique element added at step k.
Equations
- C.added k = Classical.choose ⋯
Instances For
A constraint is in the height-k prefix iff it was added at some earlier step.
A maximal chain reaches the full ground set at its top.
The ranking recovered from a maximal chain: position k holds the element
added at step k.
Instances For
The prefixes of the recovered ranking are the original chain.
The maximal chain of a ranking: its sequence of prefixes.
Equations
- OptimalityTheory.prefixChain r = { toFun := OptimalityTheory.prefixFinset r, bot := ⋯, step := ⋯ }
Instances For
Rankings are maximal chains ([MR16]). A ranking and the
maximal chain of its prefixes carry the same information — the "ranking is a chain"
intuition, as a bijection rather than a retyping of Ranking.
Equations
- OptimalityTheory.rankingChainEquiv n = { toFun := OptimalityTheory.prefixChain, invFun := OptimalityTheory.MaximalChain.toRanking, left_inv := ⋯, right_inv := ⋯ }