• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Projects
      • Apt
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Legacy-defrstobj
      • Prime-field-constraint-systems
      • Proof-checker-array
      • Soft
      • Rp-rewriter
      • Farray
      • 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
            • 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
        • Taspi
        • Bitcoin
        • Des
        • Ethereum
        • Sha-2
        • Yul
        • Zcash
        • Proof-checker-itp13
        • Bigmem
        • Regex
        • ACL2-programming-language
        • Java
        • C
        • Jfkr
        • X86isa
        • Equational
        • Cryptography
        • Where-do-i-place-my-book
        • Json
        • Built-ins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Testing-utilities
      • Math
    • Fairness-criteria

    Non-maj-ind-hint

    Signature
    (non-maj-ind-hint l cids xs) → (mv * * *)

    Definitions and Theorems

    Theorem: candidate-with-least-nth-place-votes-is-a-member-of-cids-alt

    (defthm
     candidate-with-least-nth-place-votes-is-a-member-of-cids-alt
     (implies
          (and (nat-listp cids)
               (consp cids)
               (irv-ballot-p xs))
          (member-equal (candidate-with-least-nth-place-votes n cids xs)
                        cids)))

    Function: non-maj-ind-hint

    (defun
     non-maj-ind-hint (l cids xs)
     (declare (xargs :guard t))
     (let
      ((__function__ 'non-maj-ind-hint))
      (declare (ignorable __function__))
      (if
       (or (not (irv-ballot-p xs))
           (endp cids)
           (endp xs))
       (mv l cids xs)
       (b*
        ((step-2-candidate-to-remove
              (candidate-with-least-nth-place-votes 0 (candidate-ids xs)
                                                    xs))
         (new-xs (eliminate-candidate step-2-candidate-to-remove xs)))
        (if (equal l step-2-candidate-to-remove)
            (mv step-2-candidate-to-remove cids xs)
            (non-maj-ind-hint
                 l
                 (remove-equal step-2-candidate-to-remove cids)
                 new-xs))))))