• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
    • Testing-utilities
    • Math
      • Arithmetic
      • Bit-vectors
        • Sparseint
        • Bitops
          • Bitops/merge
          • Bitops-compatibility
          • Bitops-books
          • Logbitp-reasoning
          • Bitops/signed-byte-p
          • Fast-part-select
          • Bitops/integer-length
          • Bitops/extra-defs
          • Install-bit
          • Trailing-0-count
          • Bitops/defaults
          • Logbitp-mismatch
          • Trailing-1-count
          • Bitops/rotate
          • Bitops/equal-by-logbitp
          • Bitops/ash-bounds
            • Self-bounds-for-ash
            • Self-bounds-for-logtail
            • Monotonicity-properties-of-ash
              • (= 0 (ash 1 x))
            • Bitops/fast-logrev
            • Limited-shifts
            • Bitops/part-select
            • Bitops/parity
            • Bitops/saturate
            • Bitops/part-install
            • Bitops/logbitp-bounds
            • Bitops/ihsext-basics
            • Bitops/fast-rotate
            • Bitops/fast-logext
            • Bitops/ihs-extensions
          • Bv
          • Ihs
          • Rtl
        • Algebra
    • Bitops/ash-bounds
    • Ash

    Monotonicity-properties-of-ash

    Lemmas about (ash a b) versus (ash a c).

    These are basic lemmas about:

    • (< (ASH A B) (ASH A C))
    • (= (ASH A B) (ASH A C))

    BOZO these only address when A is positive and B/C are naturals. We should extend these to negative numbers.

    Definitions and Theorems

    Theorem: (< (ash a b) (ash a c))

    (defthm |(< (ash a b) (ash a c))|
            (implies (and (posp a) (natp b) (natp c))
                     (equal (< (ash a b) (ash a c))
                            (< b c))))

    Theorem: (= (ash a b) (ash a c))

    (defthm |(= (ash a b) (ash a c))|
            (implies (and (posp a) (natp b) (natp c))
                     (equal (equal (ash a b) (ash a c))
                            (equal b c))))