• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Debugging
    • Projects
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
      • X86isa
        • Program-execution
        • Introduction
        • X86isa-build-instructions
        • Publications
        • Contributors
        • Machine
        • Implemented-opcodes
        • Proof-utilities
          • System-level-marking-view-proof-utilities
          • Non-marking-view-proof-utilities
          • App-view-proof-utilities
          • Subset-p
          • Disjoint-p
          • Pos
          • Member-p
          • No-duplicates-p
            • Common-system-level-utils
            • Debugging-code-proofs
            • General-memory-utils
            • X86-row-wow-thms
          • To-do
          • Concrete-simulation-examples
          • Model-validation
          • Utils
          • Debugging-code-proofs
        • Execloader
        • Axe
      • Testing-utilities
      • Math
    • Proof-utilities

    No-duplicates-p

    Signature
    (no-duplicates-p l) → *
    Arguments
    l — Guard (true-listp l).

    Definitions and Theorems

    Function: no-duplicates-p

    (defun no-duplicates-p (l)
           (declare (xargs :guard (true-listp l)))
           (let ((__function__ 'no-duplicates-p))
                (declare (ignorable __function__))
                (cond ((endp l) t)
                      ((member-p (car l) (cdr l)) nil)
                      (t (no-duplicates-p (cdr l))))))

    Theorem: no-duplicates-p-and-append

    (defthm no-duplicates-p-and-append
            (implies (no-duplicates-p (append a b))
                     (and (no-duplicates-p a)
                          (no-duplicates-p b)))
            :rule-classes (:forward-chaining :rewrite))