• 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
      • Riscv
      • Taspi
      • 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
        • Aleobft
        • Aleovm
        • Leo
          • Grammar
          • Early-version
            • Json2ast
            • Testing
            • Definition
              • Flattening
              • Abstract-syntax
              • Dynamic-semantics
                • Execution
                • Values
                • Dynamic-environments
                • Arithmetic-operations
                • Curve-parameterization
                • Shift-operations
                • Errors
                • Value-expressions
                • Locations
                • Input-execution
                • Edwards-bls12-generator
                • Equality-operations
                • Logical-operations
                  • Op-nor
                  • Op-nand
                  • Op-or
                  • Op-and
                  • Program-execution
                  • Ordering-operations
                  • Bitwise-operations
                  • Literal-evaluation
                  • Type-maps-for-struct-components
                  • Output-execution
                  • Tuple-operations
                  • Struct-operations
                • Compilation
                • Static-semantics
                • Concrete-syntax
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Community
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Logical-operations

    Op-and

    Leo boolean conjunction operation.

    Signature
    (op-and left right) → result
    Arguments
    left — Guard (valuep left).
    right — Guard (valuep right).
    Returns
    result — Type (value-resultp result).

    Definitions and Theorems

    Function: op-and

    (defun op-and (left right)
      (declare (xargs :guard (and (valuep left) (valuep right))))
      (let ((__function__ 'op-and))
        (declare (ignorable __function__))
        (if (and (value-case left :bool)
                 (value-case right :bool))
            (value-bool (and (value-bool->get left)
                             (value-bool->get right)))
          (reserrf (list :op-and (value-fix left)
                         (value-fix right))))))

    Theorem: value-resultp-of-op-and

    (defthm value-resultp-of-op-and
      (b* ((result (op-and left right)))
        (value-resultp result))
      :rule-classes :rewrite)

    Theorem: op-and-of-value-fix-left

    (defthm op-and-of-value-fix-left
      (equal (op-and (value-fix left) right)
             (op-and left right)))

    Theorem: op-and-value-equiv-congruence-on-left

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

    Theorem: op-and-of-value-fix-right

    (defthm op-and-of-value-fix-right
      (equal (op-and left (value-fix right))
             (op-and left right)))

    Theorem: op-and-value-equiv-congruence-on-right

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