MindFormal v1.0.0One Mind

MindFormal.Tools.FiniteOrder

Finite systems of weak and strict order constraints, with the exact cycle and tie-quotient tests. The numerical construction reuses Afriat's proved rank; no second topological-sort argument is introduced.

def MindFormal.FiniteOrder.NoStrictCycle {I : Type u_1} (weak strict : I → I → Prop) :

A forbidden cycle is a strict edge with a return path of weak or strict edges. The return path may be empty, so strict loops are forbidden.

Equations
Instances For
    theorem MindFormal.FiniteOrder.path_le {I : Type u_1} {weak strict : I → I → Prop} {u : I → ℝ} (hw : ∀ (i j : I), weak i j → u j ≤ u i) (hs : ∀ (i j : I), strict i j → u j < u i) {i j : I} (hp : Relation.ReflTransGen (fun (x y : I) => weak x y ∨ strict x y) i j) :
    u j ≤ u i

    Every weak-or-strict path preserves the weak numerical order.

    theorem MindFormal.FiniteOrder.feasible_iff {I : Type u_1} [Finite I] (weak strict : I → I → Prop) :
    (∃ (u : I → ℝ), (∀ (i j : I), weak i j → u j ≤ u i) ∧ ∀ (i j : I), strict i j → u j < u i) ↔ NoStrictCycle weak strict

    A finite weak/strict utility system is feasible exactly when no cycle contains a strict edge. Utilities are constructed by the existing Afriat rank.

    theorem MindFormal.FiniteOrder.strict_iff_acyclic {I : Type u_1} [Finite I] (r : I → I → Prop) :
    (∃ (u : I → ℝ), ∀ (i j : I), r i j → u j < u i) ↔ ∀ (i : I), ¬Relation.TransGen r i i

    Strict utilities exist exactly when the strict graph is acyclic.

    theorem MindFormal.FiniteOrder.tie_eq {I : Type u_1} {tie : I → I → Prop} {u : I → ℝ} (ht : ∀ (i j : I), tie i j → u i = u j) {i j : I} (h : Relation.EqvGen tie i j) :
    u i = u j

    Equality on declared ties propagates over their equivalence closure.

    def MindFormal.FiniteOrder.quotientStrict {I : Type u_1} (tie strict : I → I → Prop) (a b : Quotient (Relation.EqvGen.setoid tie)) :

    The actual strict graph on equivalence classes of declared ties.

    Equations
    Instances For
      def MindFormal.FiniteOrder.TieTest {I : Type u_1} (tie strict : I → I → Prop) :

      The entry's two finite checks: no strict comparison within a tie class, and no directed cycle in the strict graph on those classes.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        theorem MindFormal.FiniteOrder.ties_iff {I : Type u_1} [Finite I] (tie strict : I → I → Prop) :
        (∃ (u : I → ℝ), (∀ (i j : I), tie i j → u i = u j) ∧ ∀ (i j : I), strict i j → u j < u i) ↔ TieTest tie strict

        Equality on ties and strict order on strict comparisons are feasible exactly under the entry's tie-quotient test, in both directions.

        theorem MindFormal.FiniteOrder.winner_iff {I : Type u_1} [LinearOrder I] (menu : Finset I) (w : I) (hw : w ∈ menu) (u : I → ℝ) :
        have this := ⋯; (Quantal.winner fun (i : ↥menu) => u ↑i) = ⟨w, hw⟩ ↔ (∀ j ∈ menu, u j ≤ u w) ∧ ∀ j ∈ menu, j < w → u j < u w

        Fixed priority evaluation on a finite menu is exactly weak dominance against all rivals and strict dominance against every earlier rival.