• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
      • Theories
      • Rule-classes
      • Proof-builder
      • Recursion-and-induction
      • Hons-and-memoization
      • Events
      • Parallelism
      • History
      • Programming
        • Defun
        • Declare
        • System-utilities
        • Stobj
        • State
        • Mutual-recursion
        • Memoize
        • Mbe
        • Io
        • Defpkg
        • Apply$
        • Loop$
        • Programming-with-state
        • Arrays
        • Characters
        • Time$
        • Defconst
        • Fast-alists
        • Defmacro
        • Loop$-primer
        • Evaluation
        • Guard
        • Equality-variants
        • Compilation
        • Hons
        • ACL2-built-ins
        • Developers-guide
        • System-attachments
        • Advanced-features
        • Set-check-invariant-risk
        • Numbers
        • Efficiency
        • Irrelevant-formals
        • Introduction-to-programming-in-ACL2-for-those-who-know-lisp
        • Redefining-programs
        • Lists
          • Member
          • Append
          • List
          • Nth
          • Len
          • True-listp
          • String-listp
          • Nat-listp
          • Character-listp
          • Symbol-listp
          • True-list-listp
          • Length
          • Search
          • Intersection$
          • Union$
          • Remove-duplicates
          • Position
          • Update-nth
          • Take
          • Set-difference$
          • Nthcdr
          • Subsetp
          • No-duplicatesp
          • Concatenate
          • Remove
          • Remove1
            • Std/lists/remove1-equal
            • Intersectp
            • Endp
            • Keyword-value-listp
            • Integer-listp
            • Reverse
            • Add-to-set
            • List-utilities
            • Set-size
            • Revappend
            • Subseq
            • Make-list
            • Lists-light
            • Boolean-listp
            • Butlast
            • Pairlis$
            • Substitute
            • Count
            • Keyword-listp
            • List*
            • Last
            • Eqlable-listp
            • Integer-range-listp
            • Rational-listp
            • Pos-listp
            • Evens
            • Atom-listp
            • ACL2-number-listp
            • Typed-list-utilities
            • Odds
            • List$
            • Listp
            • Standard-char-listp
            • Last-cdr
            • Pairlis
            • Proper-consp
            • Improper-consp
            • Pairlis-x2
            • Pairlis-x1
            • Merge-sort-lexorder
            • Fix-true-list
            • Real-listp
          • Invariant-risk
          • Errors
          • Defabbrev
          • Conses
          • Alists
          • Set-register-invariant-risk
          • Strings
          • Program-wrapper
          • Get-internal-time
          • Basics
          • Packages
          • Oracle-eval
          • Defmacro-untouchable
          • <<
          • Primitive
          • Revert-world
          • Unmemoize
          • Set-duplicate-keys-action
          • Symbols
          • Def-list-constructor
          • Easy-simplify-term
          • Defiteration
          • Fake-oracle-eval
          • Defopen
          • Sleep
        • Operational-semantics
        • Real
        • Start-here
        • Miscellaneous
        • Output-controls
        • Bdd
        • Macros
        • Installation
        • Mailing-lists
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Std/lists
    • Remove1

    Std/lists/remove1-equal

    Lemmas about remove1 available in the std/lists library.

    Definitions and Theorems

    Theorem: len-of-remove1-equal

    (defthm len-of-remove1-equal
      (equal (len (remove1-equal x l))
             (if (member-equal x l)
                 (- (len l) 1)
               (len l))))

    Theorem: assoc-equal-of-remove1-equal

    (defthm assoc-equal-of-remove1-equal
      (implies (and (not (equal key1 nil))
                    (not (consp (assoc-equal key1 alist))))
               (not (consp (assoc-equal key1 (remove1-equal x alist)))))
      :rule-classes (:rewrite :type-prescription))

    Theorem: member-equal-of-remove1-equal

    (defthm member-equal-of-remove1-equal
      (implies (not (equal x1 x2))
               (iff (member-equal x1 (remove1-equal x2 l))
                    (member-equal x1 l))))

    Theorem: subsetp-equal-of-remove1-equal-left

    (defthm subsetp-equal-of-remove1-equal-left
      (implies (subsetp-equal x y)
               (subsetp-equal (remove1-equal a x) y)))