• 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
        • Atj
        • Aij
        • Language
          • Syntax
          • Semantics
            • Primitive-function-macros
            • Primitive-values
            • Floating-point-placeholders
            • Pointers
            • Floating-point-value-set-parameters
            • Values
            • Primitive-operations
              • Integer-operations
              • Floating-point-operations
              • Boolean-operations
                • Boolean-xor
                • Boolean-neq
                • Boolean-ior
                • Boolean-eq
                • Boolean-and
                • Boolean-not
              • Primitive-conversions
              • Reference-values
        • Taspi
        • Riscv
        • Bitcoin
        • 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
        • Aleo
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Community
      • Proof-automation
      • ACL2
      • Macro-libraries
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Boolean-operations

    Boolean-not

    Logical complement ! [JLS14:4.2.5] [JLS14:15.15.6].

    Signature
    (boolean-not operand) → result
    Arguments
    operand — Guard (boolean-valuep operand).
    Returns
    result — Type (boolean-valuep result).

    Definitions and Theorems

    Function: boolean-not

    (defun boolean-not (operand)
      (declare (xargs :guard (boolean-valuep operand)))
      (b* ((x (boolean-value->bool operand)))
        (boolean-value (not x))))

    Theorem: boolean-valuep-of-boolean-not

    (defthm boolean-valuep-of-boolean-not
      (b* ((result (boolean-not operand)))
        (boolean-valuep result))
      :rule-classes :rewrite)

    Theorem: boolean-not-of-boolean-value-fix-operand

    (defthm boolean-not-of-boolean-value-fix-operand
      (equal (boolean-not (boolean-value-fix operand))
             (boolean-not operand)))

    Theorem: boolean-not-boolean-value-equiv-congruence-on-operand

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