• 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
            • 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

    Ifloor

    (ifloor i j) is the same as floor, except that it coerces its arguments to integers.

    Signature
    (ifloor i j) → int
    Arguments
    i — Guard (integerp i).
    j — Guard (and (integerp j) (not (= 0 j))).
    Returns
    int — Type (integerp int).

    Definitions and Theorems

    Function: ifloor$inline

    (defun ifloor$inline (i j)
      (declare (xargs :guard (and (integerp i)
                                  (and (integerp j) (not (= 0 j))))))
      (let ((__function__ 'ifloor))
        (declare (ignorable __function__))
        (mbe :logic (floor (ifix i) (ifix j))
             :exec (floor i j))))

    Theorem: ifloor-type

    (defthm ifloor-type
      (b* ((int (ifloor$inline i j)))
        (integerp int))
      :rule-classes :type-prescription)