• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Pfcs
      • Wp-gen
      • Dimacs-reader
      • Legacy-defrstobj
      • Proof-checker-array
      • Soft
      • C
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
        • Fairness-criteria
          • Eliminate-candidates
          • Sum-nats
          • Eliminate-other-candidates
          • Clone-p
          • Last-place
          • All-head-to-head-competition-loser-p
          • Non-maj-ind-hint
          • Find-condorcet-loser
            • Find-condorcet-loser-aux
            • Last-place-elim-ind-hint
          • Candidate-with-least-nth-place-votes
          • Eliminate-candidate
          • First-choice-of-majority-p
          • Candidate-ids
          • Irv
          • Create-nth-choice-count-alist
          • Irv-alt
          • Irv-ballot-p
          • Majority
          • Number-of-candidates
          • List-elements-equal
          • Number-of-voters
        • Imp-language
        • Sidekick
        • Leftist-trees
        • Java
        • Taspi
        • Riscv
        • Bitcoin
        • Des
        • Ethereum
        • X86isa
        • Sha-2
        • Yul
        • Zcash
        • Proof-checker-itp13
        • Regex
        • ACL2-programming-language
        • Json
        • Jfkr
        • Equational
        • Cryptography
        • Poseidon
        • Where-do-i-place-my-book
        • Axe
        • Aleo
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Community
      • Proof-automation
      • ACL2
      • Macro-libraries
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Find-condorcet-loser

    Find-condorcet-loser-aux

    Signature
    (find-condorcet-loser-aux loser-cids cids xs) → *
    Arguments
    loser-cids — Candidates in xs to consider as losers.
        Guard (nat-listp loser-cids).
    cids — All candidates in xs.
        Guard (nat-listp cids).
    xs — Guard (irv-ballot-p xs).

    Definitions and Theorems

    Function: find-condorcet-loser-aux

    (defun find-condorcet-loser-aux (loser-cids cids xs)
      (declare (xargs :guard (and (nat-listp loser-cids)
                                  (nat-listp cids)
                                  (irv-ballot-p xs))))
      (declare
           (xargs :guard (and (acl2::set-equiv cids (candidate-ids xs))
                              (subsetp-equal loser-cids cids))))
      (let ((__function__ 'find-condorcet-loser-aux))
        (declare (ignorable __function__))
        (if (endp loser-cids)
            nil
          (if (all-head-to-head-competition-loser-p
                   (car loser-cids)
                   (remove-equal (car loser-cids) cids)
                   xs)
              (car loser-cids)
            (find-condorcet-loser-aux (cdr loser-cids)
                                      cids xs)))))