• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
    • Math
      • 100-theorems
      • Arithmetic
      • Bit-vectors
        • Sparseint
        • Bitops
        • Bv
        • Ihs
          • Logops-definitions
            • Logops-byte-functions
            • Defword
            • Defbytetype
            • Logext
            • Logrev
            • Loghead
            • Logops-bit-functions
            • Logtail
            • Logapp
            • Logsat
            • Binary--
            • Logcdr
            • Logcar
            • Logbit
            • Logextu
            • Logcons
              • Ihs/logcons-lemmas
                • Logcons-basics
              • Lshu
              • Logrpl
              • Ashu
              • Logmaskp
              • Lognotu
              • Logmask
              • Imod
              • Ifloor
              • Bfix
              • Bitmaskp
              • Logite
              • Expt2
              • Zbp
              • *logops-functions*
              • Word/bit-macros
              • Logops-definitions-theory
              • Logops-functions
              • Lbfix
              • Logextu-guard
              • Lshu-guard
              • Logtail-guard
              • Logrpl-guard
              • Logrev-guard
              • Lognotu-guard
              • Logmask-guard
              • Loghead-guard
              • Logext-guard
              • Logbit-guard
              • Logapp-guard
              • Ashu-guard
            • Math-lemmas
            • Ihs-theories
            • Ihs-init
            • Logops
          • Rtl
        • Algebra
      • Testing-utilities
    • Logcons
    • Logops-lemmas

    Ihs/logcons-lemmas

    Basic lemmas relating logcons to logcar and logcdr, from the logops-lemmas book.

    Definitions and Theorems

    Theorem: logcar-logcons

    (defthm logcar-logcons
      (implies (and (bitp b) (integerp i))
               (equal (logcar (logcons b i)) b)))

    Theorem: logcdr-logcons

    (defthm logcdr-logcons
      (implies (and (bitp b) (integerp i))
               (equal (logcdr (logcons b i)) i)))

    Theorem: equal-logcons

    (defthm equal-logcons
      (implies (and (integerp i)
                    (integerp logcdr)
                    (bitp logcar))
               (equal (equal (logcons logcar logcdr) i)
                      (and (equal (logcar i) logcar)
                           (equal (logcdr i) logcdr)))))

    Theorem: logcar-logcdr-elim

    (defthm logcar-logcdr-elim
      (implies (integerp i)
               (equal (logcons (logcar i) (logcdr i))
                      i))
      :rule-classes (:rewrite :elim))