Threshold, majority and symmetric Boolean functions #
The threshold function threshold n j says that at least j of n bits are true, and majority
(majority, at least half) and strict majority (strictMajority, more than half) are threshold
functions. On an arbitrary finite set of voting indices, BitString.strictMajorityOn chooses
false on a tie. A Boolean function is symmetric when it depends only on the weight of its input
(BooleanFunction.IsSymmetric), and then it factors through the weight
(BooleanFunction.IsSymmetric.exists_eq_comp_weight) Jukna, Chapter 1.
Main definitions #
Cslib.BitString.strictMajorityOn: strict majority on a finite set of voting indices.Cslib.threshold,Cslib.majority,Cslib.strictMajority: threshold functions.Cslib.BooleanFunction.IsSymmetric: Boolean functions depending only on the weight.
Main results #
Cslib.monotone_threshold: threshold functions are monotone.Cslib.strictMajority_not: strict majority of the negated bits is the negation of majority.Cslib.le_card_ne_of_strictMajority_ne,Cslib.BitString.card_filter_eq_le_half_of_strictMajorityOn_ne: a wrong majority requires at least half wrong votes.Cslib.BooleanFunction.IsSymmetric.exists_eq_comp_weight: symmetric functions factor through the weight.Cslib.isSymmetric_threshold,Cslib.isSymmetric_majority,Cslib.isSymmetric_strictMajority: threshold functions are symmetric.
References #
A nonempty constant vote has its constant value.
The threshold function Th^n_j on n bits: whether at least j of them are true.
Instances For
The majority function on n bits: whether at least half of them are true, that is, the
threshold function Th^n_⌈n/2⌉.
Instances For
The strict majority function on n bits: whether more than half of them are true, so that a
tie is false. It is the threshold function Th^n_{⌊n/2⌋+1}.
Instances For
The threshold function Th^n_j is true exactly when at least j bits are true.
Strict majority is true exactly when more than n / 2 bits are true.
Strict majority is false exactly when at most n / 2 bits are true.
Strict majority on all coordinates agrees with the finite-set operation.
Strict majority of the negated bits is the negation of majority: fewer than half of the bits are true exactly when not at least half of them are.
A Boolean function is symmetric when it depends only on the weight of its input.
Instances For
A symmetric function factors through the weight.
Threshold functions are symmetric.
Strict majority is symmetric.