AFTD Auto-Formalizing Theoretical Domains

op861_triangle_orientation

def

Given an abelian group equipped with a linear order and a Boolean choice for each finite set, return true for the edge from distinct x to y exactly when the choice on {x,y,−x−y} agrees with the cyclic order x,y,−x−y induced by the linear order.

Statement

def op861_triangle_orientation (α : Type*) [AddCommGroup α] [DecidableEq α]
    [LinearOrder α] (turn : Finset α → Bool) (x y : α) : Bool
Source
Triangle orientation model for the exponent-three construction of op861_ternary_tournament_sqrt_core_cover.
Verified
17 Nov 2026
Axioms
none listed
Built on 2
  • TotalPreorderA total preorder: a preorder where ≤ is total (complete). This is weaker than LinearOrder — it does NOT require antisymmetry or…
  • LinearOrder.toTotalPreorderEvery LinearOrder is a TotalPreorder.
Used by 2

Lean source view module on GitHub

def op861_triangle_orientation (α : Type*) [AddCommGroup α] [DecidableEq α]
    [LinearOrder α] (turn : Finset α → Bool) (x y : α) : Bool := decide (x ≠ y ∧ (turn {x, y, -x-y} = true ↔
      ((x < y ∧ y < -x-y) ∨ (y < -x-y ∧ -x-y < x) ∨ (-x-y < x ∧ x < y))))
See it in the graphDiscuss this resultChallenge it