• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
        • Acre-internals
          • Regex
          • Match-string-at
          • Matchstatelist-measure
          • Parse-primitive
          • Matches-remove-zero-length
          • Parse-repeatop
          • Parse-repeatbase
          • Matchstatelist-in-bounds
          • Parse-range
          • Parse-charset-set
          • Parse-charset-atom
          • Match-regex-locs
          • Parse-octal-charcode
          • Parse-k-backref
          • Parse-g-backref
          • Matchstatelist-all-have-backref
          • Parse-repeatmod
          • Parse-charset-elem
          • Parse-charset-aux
          • Parse-hex-charcode
          • Parse-charset
          • Matchstatelist-indices-lte
          • Matchstatelist-indices-gte
          • Match-exact
          • Matches-add-backref
          • Matchresult
          • Preproc-legible-aux
          • Maybe-backref
          • Match-charset
          • Undup-equiv
            • Find-substr
            • Maybe-backref-extract-substr
            • Matchstatelist-min-index
            • Matchstate-in-bounds
            • Match-add-backref
            • Undup
            • Backref-alist-in-bounds
            • Backref
            • Matchstate
            • Matchresult->matched-substr
            • Matchresult->captured-substr!
            • Matchresult->captured-substr
            • Maybe-backref-in-bounds
            • Matchmode
            • Backref-extract-substr
            • Charset-range
            • Matchstate-measure
            • Backref-in-bounds
            • Rev-keys
            • Parse-regex
            • Undup-exec
            • Get-charset
            • Regex-concat2
            • Preproc-legible
            • Matchresult-in-bounds
            • Regex-disjunct2
            • Backref-alist
            • Named-captures-bindings
            • Captures-bindings
            • Matchstatelist
            • Charset-char-regex
            • Repeatmod-p
          • Parse-and-match-regex
          • Match-regex
          • Parse
          • Matchresult->matchedp
          • Match
        • Milawa
        • Smtlink
        • Abnf
        • Vwsim
        • Isar
        • Wp-gen
        • Dimacs-reader
        • Pfcs
        • Legacy-defrstobj
        • Proof-checker-array
        • Soft
        • C
        • Farray
        • Rp-rewriter
        • Instant-runoff-voting
        • 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
    • Acre-internals

    Undup-equiv

    Signature
    (undup-equiv x y) → *
    Arguments
    x — Guard (true-listp x).
    y — Guard (true-listp y).

    Definitions and Theorems

    Function: undup-equiv

    (defun undup-equiv (x y)
      (declare (xargs :guard (and (true-listp x) (true-listp y))))
      (let ((__function__ 'undup-equiv))
        (declare (ignorable __function__))
        (equal (undup x) (undup y))))

    Theorem: undup-equiv-is-an-equivalence

    (defthm undup-equiv-is-an-equivalence
      (and (booleanp (undup-equiv x y))
           (undup-equiv x x)
           (implies (undup-equiv x y)
                    (undup-equiv y x))
           (implies (and (undup-equiv x y)
                         (undup-equiv y z))
                    (undup-equiv x z)))
      :rule-classes (:equivalence))

    Theorem: undup-under-undup-equiv

    (defthm undup-under-undup-equiv
      (undup-equiv (undup x) x))

    Theorem: append-of-undup-under-undup-equiv-1

    (defthm append-of-undup-under-undup-equiv-1
      (undup-equiv (append (undup x) y)
                   (append x y)))

    Theorem: append-of-undup-under-undup-equiv-2

    (defthm append-of-undup-under-undup-equiv-2
      (undup-equiv (append x (undup y))
                   (append x y)))

    Theorem: undup-equiv-refines-set-equiv

    (defthm undup-equiv-refines-set-equiv
      (implies (undup-equiv x y)
               (set-equiv x y))
      :rule-classes (:refinement))

    Theorem: undup-equiv-implies-undup-equiv-append-1

    (defthm undup-equiv-implies-undup-equiv-append-1
      (implies (undup-equiv a a-equiv)
               (undup-equiv (append a b)
                            (append a-equiv b)))
      :rule-classes (:congruence))

    Theorem: undup-equiv-implies-undup-equiv-append-2

    (defthm undup-equiv-implies-undup-equiv-append-2
      (implies (undup-equiv b b-equiv)
               (undup-equiv (append a b)
                            (append a b-equiv)))
      :rule-classes (:congruence))

    Theorem: undup-equiv-implies-equal-undup-1

    (defthm undup-equiv-implies-equal-undup-1
      (implies (undup-equiv x x-equiv)
               (equal (undup x) (undup x-equiv)))
      :rule-classes (:congruence))

    Theorem: undup-equiv-of-list-fix-x

    (defthm undup-equiv-of-list-fix-x
      (equal (undup-equiv (list-fix x) y)
             (undup-equiv x y)))

    Theorem: undup-equiv-list-equiv-congruence-on-x

    (defthm undup-equiv-list-equiv-congruence-on-x
      (implies (list-equiv x x-equiv)
               (equal (undup-equiv x y)
                      (undup-equiv x-equiv y)))
      :rule-classes :congruence)

    Theorem: undup-equiv-of-list-fix-y

    (defthm undup-equiv-of-list-fix-y
      (equal (undup-equiv x (list-fix y))
             (undup-equiv x y)))

    Theorem: undup-equiv-list-equiv-congruence-on-y

    (defthm undup-equiv-list-equiv-congruence-on-y
      (implies (list-equiv y y-equiv)
               (equal (undup-equiv x y)
                      (undup-equiv x y-equiv)))
      :rule-classes :congruence)