Monotonicity Axioms¶
Monotonicity¶
- pref_voting.monotonicity_axioms.has_monotonicity_violation(profile, vm, verbose=False, violation_type='Lift', check_probabilities=False, one_rank_monotonicity=False)[source]¶
If violation_type = “Lift”, returns True if there is some winning candidate A and some voter v such that lifting A up some number of positions in v’s ranking causes A to lose.
If violation_type = “Drop”, returns True if there is some losing candidate A and some voter v such that dropping A down some number of positions in v’s ranking causes A to win.
If checking_probabilities = True, returns True if there is some candidate whose probability of winning decreases after a lifting or increases after a dropping.
If one_rank_monotonicity = True, then the function will check lifts/drops of one rank only.
- Parameters:
profile – a Profile object.
vm (VotingMethod) – A voting method to test.
verbose (bool, default=False) – If a violation is found, display the violation.
violation_type – default is “Lift”
- Returns:
Returns True if there is a violation and False otherwise.
- Return type:
Result of the test (bool)
Note
If a voting method violates monotonicity, then it violates one-rank monotonicity, so setting one_rank_monotonicity = True is sufficient for testing whether a method violates monotonicity (though not for testing the frequency of monotonicity violations).
- pref_voting.monotonicity_axioms.find_all_monotonicity_violations(profile, vm, verbose=False, violation_type='Lift', check_probabilities=False, one_rank_monotonicity=False)[source]¶
If violation_type = “Lift”, returns all tuples (candidate, ranking, “Lift”, n) such that the candidate wins in the original profile but loses after lifting the candidate up n positions in the ranking.
If violation_type = “Drop”, returns all tuples (candidate, ranking, “Drop”, n) such that the candidate loses in the original profile but wins after dropping the candidate down n positions in the ranking.
If checking_probabilities = True, returns all tuples (candidate, ranking, violation_type, n) such that the candidate’s probability of winning decreases after a lifting or increases after a dropping.
If one_rank_monotonicity = True, then the function will check lifts/drops of one rank only.
- Parameters:
profile – a Profile object.
vm (VotingMethod) – A voting method to test.
verbose (bool, default=False) – If a violation is found, display the violation.
violation_type – default is “Lift”
- Returns:
A list of tuples (candidate, ranking, violation_type, positions lifted/dropped) witnessing violations of monotonicity.
Note
If a voting method violates monotonicity, then it violates one-rank monotonicity, so setting one_rank_monotonicity = True is sufficient for testing whether a method violates monotonicity (though not for testing the frequency of monotonicity violations).
Weak Positive Responsiveness¶
- pref_voting.monotonicity_axioms.has_weak_positive_responsiveness_violation(profile, vm, verbose=False, violation_type='Lift')[source]¶
If violation_type = “Lift”, returns True if there is some winning candidate A and some voter v who ranks A last such that v moving A into first place does not make A the unique winner
If violation_type = “Drop”, returns True if there is some candidate A who is either a loser or a non-unique winner and some voter v who ranks A first such that v moving A into last place does not make A a loser.
- Parameters:
profile – a Profile object.
vm (VotingMethod) – A voting method to test.
verbose (bool, default=False) – If a violation is found, display the violation.
violation_type – default is “Lift”
- Returns:
Returns True if there is a violation and False otherwise.
- Return type:
Result of the test (bool)
- pref_voting.monotonicity_axioms.find_all_weak_positive_responsiveness_violations(profile, vm, verbose=False, violation_type='Lift')[source]¶
If violation_type = “Lift”, returns all pairs (candidate, ranking) such that the candidate is a unique winner in the original profile but is not a unique winner after the voter moves the candidate from last to first place in the ranking.
If violation_type = “Drop”, returns all pairs (candidate, ranking) such that the candidate is either a loser or a non-unique winner in the original profile but is a winner after the voter moves the candidate from first to last place in the ranking.
- Parameters:
profile – a Profile object.
vm (VotingMethod) – A voting method to test.
verbose (bool, default=False) – If a violation is found, display the violation.
violation_type – default is “Lift”
- Returns:
A list of pairs (candidate, ranking) witnessing violations of weak positive responsiveness.