• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • Proof-checker-array
      • Soft
      • C
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • Java
      • Taspi
      • Bitcoin
      • Riscv
      • Des
      • Ethereum
      • X86isa
      • Sha-2
      • Yul
      • Zcash
      • Proof-checker-itp13
      • Regex
      • ACL2-programming-language
      • Json
      • Jfkr
      • Equational
      • Cryptography
      • Poseidon
      • Where-do-i-place-my-book
      • Axe
      • Bigmems
      • Builtins
      • Execloader
      • Aleo
      • Solidity
        • Values
          • Integer-values
            • Integer-operations
              • Def-uint/int-binary-op
              • Def-uint/int-unary-op
              • Def-uint/int-comparison
              • Uint-mod
              • Uint-div
              • Uint-shr
              • Uint-shl
              • Int-mod
              • Int-div
              • Uint-xor
              • Uint-sub
              • Uint-mul
              • Uint-ior
              • Uint-exp
              • Uint-and
              • Uint-add
              • Int-xor
              • Int-sub
              • Int-mul
              • Int-ior
              • Int-and
              • Int-add
              • Uint-le
              • Uint-ge
              • Uint-ne
              • Uint-lt
              • Uint-gt
              • Uint-eq
              • Int-ne
              • Int-lt
              • Int-le
              • Int-gt
              • Int-ge
              • Int-eq
              • Uint-minus
              • Uint-not
              • Int-not
                • Int-minus
              • Bit-size
              • Uint
              • Int
            • Boolean-values
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Integer-operations

    Int-not

    Bitwise negation of signed integer values.

    Signature
    (int-not operand) → result
    Arguments
    operand — Guard (intp operand).
    Returns
    result — Type (intp result).

    Definitions and Theorems

    Function: int-not

    (defun int-not (operand)
      (declare (xargs :guard (intp operand)))
      (b* ((size (int->size operand))
           (x (int->value operand)))
        (make-int :size (int->size operand)
                  :value (logext size (lognot x)))))

    Theorem: intp-of-int-not

    (defthm intp-of-int-not
      (b* ((result (int-not operand)))
        (intp result))
      :rule-classes :rewrite)

    Theorem: int-not-of-int-fix-operand

    (defthm int-not-of-int-fix-operand
      (equal (int-not (int-fix operand))
             (int-not operand)))

    Theorem: int-not-int-equiv-congruence-on-operand

    (defthm int-not-int-equiv-congruence-on-operand
      (implies (int-equiv operand operand-equiv)
               (equal (int-not operand)
                      (int-not operand-equiv)))
      :rule-classes :congruence)