• 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
              • Ihs/logextu-lemmas
              • Logextu-basics
            • Logcons
            • 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
  • Logops-definitions

Logextu

Logical sign extension, unsigned version. (logextu final-size ext-size i) "sign-extends" i with (logext ext-size i), then truncates the result to final-size bits, creating an unsigned integer.

Signature
(logextu final-size ext-size i) → nat
Arguments
final-size — Guard (and (integerp final-size) (<= 0 final-size)).
ext-size — Guard (and (integerp ext-size) (< 0 ext-size)).
i — Guard (integerp i).
Returns
nat — Type (natp nat).

Definitions and Theorems

Function: logextu$inline

(defun logextu$inline (final-size ext-size i)
  (declare
       (xargs :guard (and (and (integerp final-size)
                               (<= 0 final-size))
                          (and (integerp ext-size) (< 0 ext-size))
                          (integerp i))))
  (let ((__function__ 'logextu))
    (declare (ignorable __function__))
    (loghead final-size (logext ext-size i))))

Theorem: logextu-type

(defthm logextu-type
  (b* ((nat (logextu$inline final-size ext-size i)))
    (natp nat))
  :rule-classes :type-prescription)

Subtopics

Ihs/logextu-lemmas
Lemmas about logextu from the logops-lemmas book.
Logextu-basics