• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Set
        • Soft
        • C
        • Bv
        • Imp-language
        • Event-macros
        • 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
          • Bitcoin
          • Ethereum
          • Yul
          • Zcash
          • ACL2-programming-language
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Lists-light
          • Axe
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Boolean-operations

    Boolean-and

    Logical conjunction & [JLS14:4.2.5] [JLS14:15.22.2].

    Signature
    (boolean-and operand-left operand-right) → result
    Arguments
    operand-left — Guard (boolean-valuep operand-left).
    operand-right — Guard (boolean-valuep operand-right).
    Returns
    result — Type (boolean-valuep result).

    Definitions and Theorems

    Function: boolean-and

    (defun boolean-and (operand-left operand-right)
      (declare (xargs :guard (and (boolean-valuep operand-left)
                                  (boolean-valuep operand-right))))
      (b* ((x (boolean-value->bool operand-left))
           (y (boolean-value->bool operand-right)))
        (boolean-value (and x y))))

    Theorem: boolean-valuep-of-boolean-and

    (defthm boolean-valuep-of-boolean-and
      (b* ((result (boolean-and operand-left operand-right)))
        (boolean-valuep result))
      :rule-classes :rewrite)

    Theorem: boolean-and-commutative

    (defthm boolean-and-commutative
      (equal (boolean-and x y)
             (boolean-and y x)))

    Theorem: boolean-and-of-boolean-value-fix-operand-left

    (defthm boolean-and-of-boolean-value-fix-operand-left
      (equal (boolean-and (boolean-value-fix operand-left)
                          operand-right)
             (boolean-and operand-left operand-right)))

    Theorem: boolean-and-boolean-value-equiv-congruence-on-operand-left

    (defthm boolean-and-boolean-value-equiv-congruence-on-operand-left
      (implies (boolean-value-equiv operand-left operand-left-equiv)
               (equal (boolean-and operand-left operand-right)
                      (boolean-and operand-left-equiv operand-right)))
      :rule-classes :congruence)

    Theorem: boolean-and-of-boolean-value-fix-operand-right

    (defthm boolean-and-of-boolean-value-fix-operand-right
      (equal (boolean-and operand-left
                          (boolean-value-fix operand-right))
             (boolean-and operand-left operand-right)))

    Theorem: boolean-and-boolean-value-equiv-congruence-on-operand-right

    (defthm boolean-and-boolean-value-equiv-congruence-on-operand-right
      (implies (boolean-value-equiv operand-right operand-right-equiv)
               (equal (boolean-and operand-left operand-right)
                      (boolean-and operand-left operand-right-equiv)))
      :rule-classes :congruence)