• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • 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$
        • Defmacro
        • Loop$-primer
        • Fast-alists
        • Defconst
        • Evaluation
        • Guard
        • Equality-variants
        • Compilation
        • Hons
        • ACL2-built-ins
        • Developers-guide
        • System-attachments
        • Advanced-features
        • Set-check-invariant-risk
        • Numbers
          • Df
          • Unsigned-byte-p
          • Posp
          • Natp
          • <
          • +
          • Bitp
          • Zero-test-idioms
          • Nat-listp
          • Integerp
          • *
          • -
          • Zp
          • Signed-byte-p
            • Defbyte
            • Defbytelist
            • Bitops/signed-byte-p
            • Signed-byte-fix
            • Bytep
            • Nibblep
              • Nibble
                • Nibble-list
                • Nibble-fix
                • Nibblep-additional-theorems
              • Nibblep-additional-theorems
            • Signed-byte-listp
            • Signed-byte-p-logops
            • Ihs/signed-byte-p-lemmas
            • Signed-byte-p*
            • Signed-byte-p-basics
          • Logbitp
          • Sharp-f-reader
          • Expt
          • <=
          • Ash
          • Rationalp
          • =
          • Nfix
          • Logand
          • Floor
          • Random$
          • Integer-listp
          • Complex
          • Numbers-introduction
          • Truncate
          • Code-char
          • Char-code
          • Integer-length
          • Zip
          • Logior
          • Sharp-u-reader
          • Mod
          • Unary--
          • Boole$
          • /
          • Logxor
          • Ifix
          • Lognot
          • Integer-range-p
          • Allocate-fixnum-range
          • ACL2-numberp
          • Sharp-d-reader
          • Mod-expt
          • Ceiling
          • Round
          • Logeqv
          • Fix
          • Explode-nonnegative-integer
          • Max
          • Evenp
          • Zerop
          • Abs
          • Nonnegative-integer-quotient
          • Rfix
          • 1+
          • Pos-listp
          • Signum
          • Rem
          • Real/rationalp
          • Rational-listp
          • >=
          • >
          • Logcount
          • ACL2-number-listp
          • /=
          • Unary-/
          • Realfix
          • Complex/complex-rationalp
          • Logtest
          • Logandc1
          • Logorc1
          • Logandc2
          • Denominator
          • 1-
          • Numerator
          • Logorc2
          • The-number
          • Int=
          • Complex-rationalp
          • Min
          • Lognor
          • Zpf
          • Oddp
          • Minusp
          • Lognand
          • Imagpart
          • Conjugate
          • Realpart
          • Plusp
        • Efficiency
        • Irrelevant-formals
        • Introduction-to-programming-in-ACL2-for-those-who-know-lisp
        • Redefining-programs
        • Lists
        • 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
      • Debugging
      • Miscellaneous
      • Output-controls
      • Macros
      • Interfacing-tools
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
    • Math
    • Testing-utilities
  • Fty-extensions
  • Specific-types
  • Nibblep

Nibble

A fixtype of (unsigned 4-bit) nibbles.

We use fty::defbyte to generate this fixtype, along with the recognizer, fixer, and equivalence. The recognizer is identical to nibblep.

Definitions and Theorems

Function: nibble-equiv$inline

(defun nibble-equiv$inline (x y)
  (declare (xargs :guard (and (nibblep x) (nibblep y))))
  (equal (nibble-fix x) (nibble-fix y)))

Theorem: nibble-equiv-is-an-equivalence

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

Theorem: nibble-equiv-implies-equal-nibble-fix-1

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

Theorem: nibble-fix-under-nibble-equiv

(defthm nibble-fix-under-nibble-equiv
  (nibble-equiv (nibble-fix x) x)
  :rule-classes (:rewrite :rewrite-quoted-constant))

Theorem: equal-of-nibble-fix-1-forward-to-nibble-equiv

(defthm equal-of-nibble-fix-1-forward-to-nibble-equiv
  (implies (equal (nibble-fix x) y)
           (nibble-equiv x y))
  :rule-classes :forward-chaining)

Theorem: equal-of-nibble-fix-2-forward-to-nibble-equiv

(defthm equal-of-nibble-fix-2-forward-to-nibble-equiv
  (implies (equal x (nibble-fix y))
           (nibble-equiv x y))
  :rule-classes :forward-chaining)

Theorem: nibble-equiv-of-nibble-fix-1-forward

(defthm nibble-equiv-of-nibble-fix-1-forward
  (implies (nibble-equiv (nibble-fix x) y)
           (nibble-equiv x y))
  :rule-classes :forward-chaining)

Theorem: nibble-equiv-of-nibble-fix-2-forward

(defthm nibble-equiv-of-nibble-fix-2-forward
  (implies (nibble-equiv x (nibble-fix y))
           (nibble-equiv x y))
  :rule-classes :forward-chaining)

Subtopics

Nibble-list
A fixtype of true lists of (unsigned 4-bit) nibbles.
Nibble-fix
Fixer for nibble.
Nibblep-additional-theorems
Additional theorems about nibble.