• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • Proof-checker-array
      • Soft
      • C
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
        • Fairness-criteria
          • Eliminate-candidates
          • Sum-nats
          • Eliminate-other-candidates
          • Clone-p
            • Adjacent-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
      • Java
      • Taspi
      • Bitcoin
      • Riscv
      • 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
      • Bigmems
      • Builtins
      • Execloader
      • Aleo
      • Solidity
      • Paco
      • Concurrent-programs
      • Bls12-377-curves
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
    • Math
    • Testing-utilities
  • Fairness-criteria

Clone-p

Is clone a clone of c in xs?

Signature
(clone-p clone c xs) → *
Arguments
clone — Candidate in xs who is a possible clone of candidate c.
    Guard (natp clone).
c — Candidate in xs.
    Guard (natp c).
xs — Guard (irv-ballot-p xs).

Definitions and Theorems

Function: clone-p

(defun clone-p (clone c xs)
  (declare (xargs :guard (and (natp clone)
                              (natp c)
                              (irv-ballot-p xs))))
  (declare (xargs :guard (not (equal clone c))))
  (let ((__function__ 'clone-p))
    (declare (ignorable __function__))
    (if (endp xs)
        t
      (and (adjacent-p clone c (car xs))
           (clone-p clone c (cdr xs))))))

Theorem: clone-p-reflexive

(defthm clone-p-reflexive
  (implies (clone-p c clone xs)
           (clone-p clone c xs)))

Theorem: eliminate-candidate-preserves-clone-p

(defthm eliminate-candidate-preserves-clone-p
  (implies (and (clone-p clone c xs)
                (not (equal id c))
                (not (equal id clone))
                (irv-ballot-p xs))
           (clone-p clone c (eliminate-candidate id xs))))

Subtopics

Adjacent-p