Superoptimal: Bidirectional OT via OrderHom.gfp #
@cite{blutner-2000} @cite{jaeger-2002}
Mathlib-grounded formulation of @cite{blutner-2000}'s weak Bidirectional OT
"superoptimality" (eq. 14). The set of superoptimal form-meaning pairs is
the greatest fixed point of the squared blocking operator on Set (F × M),
defined via mathlib's OrderHom.gfp on the Set α complete lattice.
Architecture #
The blocking operator superoptimalSetStep is anti-monotone (more witnesses ⇒
more blockers ⇒ fewer survivors). Its square is monotone, so mathlib's
OrderHom.gfp applies. The substrate definition is:
superoptimalSet pairs profile := (superoptimalSetStepSq pairs profile).gfp
(Renamed from superoptimalSet to superoptimal once the legacy list-based
superoptimal in Evaluation.lean is retired.)
Mathlib's GFP API (isGreatest_gfp, le_gfp, gfp_le, map_gfp,
Park induction) immediately applies. Per-paper consumers prove
superoptimalSet pairs profile = S by exhibiting S as an IsParkWitness
(§4 below): a fixed point of the unsquared step that absorbs every non-S
pair via blocking. The maximality direction goes through
Set.Finite.exists_minimalFor-based minimum-profile descent, anchored in
the LexProfile preorder from Evaluation.lean.
Blocks profile S p: some witness q ∈ S blocks p — same form or
same meaning (not both), strictly better profile under lex order.
Set-valued sibling of IsBlocked (will inherit that name once the
list-based variant retires).
Equations
- Core.Constraint.Evaluation.Blocks profile S p = ∃ q ∈ S, (q.1 = p.1 ∧ q.2 ≠ p.2 ∨ q.1 ≠ p.1 ∧ q.2 = p.2) ∧ Core.Constraint.Evaluation.LexLT (profile q) (profile p)
Instances For
For Finset-coerced witness sets, Blocks is decidable: the existential
over the finite carrier reduces to Finset.decidableBEx. This instance is
the load-bearing piece for decide-based per-paper proofs.
Equations
- One or more equations did not get rendered due to their size.
Single step of the superoptimality computation: keep pairs in pairs
that are NOT blocked by any element of S. Anti-monotone in S.
Equations
- Core.Constraint.Evaluation.superoptimalSetStep pairs profile S = {p : F × M | p ∈ pairs ∧ ¬Core.Constraint.Evaluation.Blocks profile S p}
Instances For
superoptimalSetStep is anti-monotone in the witness set.
The squared step. Anti-monotone composed with anti-monotone is monotone,
so this is the right object to feed OrderHom.gfp.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@cite{blutner-2000}'s superoptimality (eq. 14): the greatest fixed point
of the squared blocking operator. Set-valued, anchored in mathlib's
OrderHom.gfp via Set α's CompleteLattice instance.
All mathlib gfp lemmas (isGreatest_gfp, le_gfp, gfp_le, map_gfp,
Park induction) immediately apply. Per-paper consumers typically prove
superoptimalSet pairs profile = S by exhibiting S as an
IsParkWitness (§4 below).
Renamed from superoptimalSet to superoptimal once the legacy
list-based superoptimal in Evaluation.lean is retired.
Equations
- Core.Constraint.Evaluation.superoptimalSet pairs profile = OrderHom.gfp (Core.Constraint.Evaluation.superoptimalSetStepSq pairs profile)
Instances For
IsParkWitness pairs profile S: structural witness via Park's induction
that S is the greatest fixed point of superoptimalSetStepSq pairs profile.
Three conditions:
subset:S ⊆ pairs.unblocked: everyp ∈ Sis unblocked byS(i.e.,Sis a fixed point of the unsquared step).closure: everyp ∈ pairs \ Sis blocked byS(uniqueness: no proper extension ofSis a fixed point).
Together they pin down S as the GFP via superoptimalSet_eq_of_witness.
The unblocked and closure conditions decompose into per-pair blocking
checks that are typically decide-able for finite literal S and
pairs (via the Blocks.decidableOnFinset instance).
- subset : S ⊆ pairs
- unblocked (p : F × M) : p ∈ S → ¬Blocks profile S p
- closure (p : F × M) : p ∈ pairs → p ∉ S → Blocks profile S p
Instances For
Witness lemma: IsParkWitness pairs profile S implies
superoptimalSet pairs profile = S.
Proof structure:
S ≤ gfpvia coinduction (OrderHom.le_gfp):Sis a fixed point ofsuperoptimalSetStep(fromunblocked+closure), hence of its square.gfp ≤ Svia Park rule (OrderHom.gfp_le) with minimum-profile descent: any post-fixed-pointTviolatingT ⊆ Scontains a profile-minimalp ∈ T \ S; theS-blocker forp(fromclosure) is unblocked byT(noS-element blocks it byunblocked; no smallerT \ S-element blocks it by minimality), hence inF(T), contradictingp ∈ F²(T). Descent terminates bySet.Finite.exists_minimalForagainst theLexProfilepreorder.
Finset-version witness lemma — for structural arguments where the
abstract gfp form is needed. Hypotheses are Finset-bounded universals,
hence decidable when paired with Blocks.decidableOnFinset. Per-paper
consumers typically prefer superoptimal (the Finset-native computable
form below) with one decide; this lemma is the bridge for theorems
stated about superoptimalSet.
Single iteration step on Finset: keep pairs in pairs not blocked by S.
Decidability of Blocks on Finset witnesses (via Blocks.decidableOnFinset)
makes this a computable Finset.filter.
Equations
- Core.Constraint.Evaluation.superoptimalSetStep_TEMPFIN pairs profile S = {p ∈ pairs | ¬Core.Constraint.Evaluation.Blocks profile (↑S) p}
Instances For
@cite{blutner-2000}'s superoptimality (Finset-native, computable). Iterates
superoptimalSetStep_TEMPFIN from pairs (top) until fixed.
For consumer use, this is the canonical form — output equality with a
literal Finset is decide-able directly:
theorem foo : superoptimal pairs profile = winner := by decide
For structural arguments (uniqueness, ranking-invariance across OT
procedures), use superoptimalSet instead, with the Park-witness API.
The bridge theorem superoptimal_coe_eq_gfp connects the two when
needed.
Equations
- Core.Constraint.Evaluation.superoptimal pairs profile = Core.Constraint.Evaluation.superoptimalLoop✝ pairs profile pairs (2 * pairs.card + 1)
Instances For
The iteration converges: at the returned value, one more step yields the same set (i.e., it's a fixed point of the unsquared step), provided the iteration actually stabilized within the fuel budget.
Bridge theorem: when the iteration converges (the Finset returned by
superoptimal is a fixed point of the unsquared step), it coincides with
the abstract superoptimalSet set under coercion. This is the connection
that lets per-paper consumers prove output equalities via decide on the
computable form, and lift those equalities to the abstract gfp form when
needed for structural arguments.
Convergence is decide-able for finite literal pairs, so the
hypothesis is typically discharged by by decide at use sites.
@cite{blutner-2000}'s strong bidirectional OT (eq. 9): a pair p is
strong-optimal iff it survives one step of the blocking operator starting
from the full pair set. Equivalently: p ∈ pairs and no element of pairs
blocks p (the Q- and I-principles are evaluated independently against
the full candidate set, not against a mutually-constrained survivor set).
Set-valued Prop sibling of the Finset-native strongOptimal below;
related to weak BiOT via the structural meta-theorem strong_subset_weak.
Equations
- Core.Constraint.Evaluation.IsStrongOptimal pairs profile p = (p ∈ pairs ∧ ¬Core.Constraint.Evaluation.Blocks profile pairs p)
Instances For
Strong-optimal is exactly one step of the blocking operator.
Equations
- Core.Constraint.Evaluation.IsStrongOptimal.decidableOnFinset pairs profile p = id inferInstance
Finset-native strong-optimal computation: pairs in pairs not blocked by
pairs. Computable via Blocks.decidableOnFinset; consumer-facing
canonical form for per-paper decide proofs.
Equations
- Core.Constraint.Evaluation.strongOptimal pairs profile = {p ∈ pairs | ¬Core.Constraint.Evaluation.Blocks profile (↑pairs) p}
Instances For
@cite{blutner-2000} p. 12: "It is simple to prove that a pair which is optimal (strong bidirection), is super-optimal (weak bidirection) as well."
Mathlib-grounded structural proof: the singleton {p} is a post-fixed
point of the squared blocking operator superoptimalSetStepSq whenever p
is strong-optimal — the only candidate blocker for p from
F({p}) ⊆ pairs is excluded by strong-optimality (no pairs-element
blocks p) plus Blocks.mono. Coinduction (OrderHom.le_gfp) then
delivers {p} ⊆ gfp, giving p ∈ superoptimalSet pairs profile.
No algorithmic detour through iterated removal — the result is a direct
consequence of OrderHom.gfp being the supremum of post-fixed points
on the Set α complete lattice.
Set-valued strong ⊂ weak as a Set-inclusion.
Finset version of strong ⊂ weak: when superoptimal converges, every
strong-optimal pair is also weak-optimal. Per-paper consumers prove the
convergence hypothesis with by decide.