• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
      • B*
      • Defunc
      • Fty
        • Deftagsum
        • Defprod
        • Defflexsum
        • Defbitstruct
        • Deflist
        • Defalist
        • Defbyte
          • Defbytelist
          • Defbyte-standard-instances
            • Ubyte5
            • Ubyte8
            • Ubyte32
            • Ubyte12
            • Ubyte64
            • Ubyte16
            • Ubyte128
            • Sbyte8
            • Sbyte64
              • Sbyte64p
              • Sbyte64-fix
                • Sbyte64-ihs-theorems
              • Sbyte32
              • Sbyte16
              • Sbyte128
              • Ubyte20
              • Ubyte11
              • Ubyte4
              • Ubyte256
              • Sbyte256
              • Ubyte7
              • Ubyte6
              • Ubyte3
              • Ubyte2
              • Ubyte1
              • Sbyte4
              • Sbyte3
              • Sbyte2
              • Sbyte1
              • Defbyte-standard-instances-ihs-theorems
              • Defubyte
              • Defsbyte
            • Defbyte-ihs-theorems
            • Defbyte-implementation
          • Deffixequiv
          • Defresult
          • Deffixtype
          • Defoption
          • Fty-discipline
          • Fold
          • Fty-extensions
          • Defsubtype
          • Defset
          • Deftypes
          • Specific-types
          • Defflatsum
          • Deflist-of-len
          • Defbytelist
          • Fty::basetypes
          • Defomap
          • Defvisitors
          • Deffixtype-alias
          • Deffixequiv-sk
          • Defunit
          • Multicase
          • Deffixequiv-mutual
          • Fty::baselists
          • Def-enumcase
          • Defmap
        • Apt
        • Std/util
        • Defdata
        • Defrstobj
        • Seq
        • Match-tree
        • Defrstobj
        • With-supporters
        • Def-partial-measure
        • Template-subst
        • Soft
        • Defthm-domain
        • Event-macros
        • Def-universal-equiv
        • Def-saved-obligs
        • With-supporters-after
        • Definec
        • Sig
        • Outer-local
        • Data-structures
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Sbyte64

    Sbyte64-fix

    Fixer for sbyte64.

    Signature
    (sbyte64-fix x) → fixed-x
    Arguments
    x — Guard (sbyte64p x).
    Returns
    fixed-x — Type (sbyte64p fixed-x).

    Definitions and Theorems

    Function: sbyte64-fix

    (defun sbyte64-fix (x)
      (declare (xargs :guard (sbyte64p x)))
      (mbe :logic (if (sbyte64p x) x 0)
           :exec x))

    Theorem: sbyte64p-of-sbyte64-fix

    (defthm sbyte64p-of-sbyte64-fix
      (b* ((fixed-x (sbyte64-fix x)))
        (sbyte64p fixed-x))
      :rule-classes :rewrite)

    Theorem: sbyte64-fix-when-sbyte64p

    (defthm sbyte64-fix-when-sbyte64p
      (implies (sbyte64p x)
               (equal (sbyte64-fix x) x)))