• 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
        • 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
    • Instant-runoff-voting

    List-elements-equal

    Returns t if all elements of x are equal to e

    Signature
    (list-elements-equal e x) → elem-equal?
    Arguments
    x — Guard (true-listp x).
    Returns
    elem-equal? — Type (booleanp elem-equal?).

    Definitions and Theorems

    Function: list-elements-equal

    (defun list-elements-equal (e x)
           (declare (xargs :guard (true-listp x)))
           (let ((__function__ 'list-elements-equal))
                (declare (ignorable __function__))
                (if (endp x)
                    t
                    (and (equal (car x) e)
                         (list-elements-equal e (cdr x))))))

    Theorem: booleanp-of-list-elements-equal

    (defthm booleanp-of-list-elements-equal
            (b* ((elem-equal? (list-elements-equal e x)))
                (booleanp elem-equal?))
            :rule-classes :type-prescription)