AFTD Auto-Formalizing Theoretical Domains

forest_greedy_signed_step

def

The new discrepancy of the first endpoint of a greedy edge is x+1 when x<y, x-1 when x>y, and uses the fair coin to choose between these values on a tie.

Statement

def forest_greedy_signed_step (x y : ℤ) (coin : Bool) : ℤ
Source
Helper for OP-1106, forest greedy carpooling; related background arXiv:2611.00388.
Verified
13 Nov 2026
Axioms
none listed
Used by 9

Lean source view module on GitHub

def forest_greedy_signed_step (x y : ℤ) (coin : Bool) : ℤ := if x < y then x + 1 else if y < x then x - 1 else if coin then x + 1 else x - 1
See it in the graphDiscuss this resultChallenge it