AFTD Auto-Formalizing Theoretical Domains

odd_majority_sign

def

The sign of the strict majority of n bits: odd_majority_sign n x = -1 if strictly more than half of the coordinates of x are true, and +1 otherwise. At n = 3 it coincides with majority_three.

Statement

open scoped BigOperators in
def odd_majority_sign (n : ℕ) : (Fin n → Bool) → ℝ
Source
step towards antipodal_hellinger_sharp_stability_majority_transition
Verified
01 Nov 2026
Axioms
none listed

Lean source view module on GitHub

open scoped BigOperators in
/-- The n-bit majority sign, with the same convention as majority_three: -1 when strictly more than half the bits are true. -/
def odd_majority_sign (n : ℕ) : (Fin n → Bool) → ℝ := fun x ↦ if 2 * (∑ i : Fin n, (if x i then 1 else 0) : ℕ) > n then -1 else 1
See it in the graphDiscuss this resultChallenge it