• 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
  • Dynamic-semantics

Logical-operations

Leo logical operations.

These are conjunction, disjunction, negated conjunction, and negated disjunction. They are all binary.

There is also a unary logical operation, op-not, that is allowed on both boolean and integer values.

The operations here are only allowed on boolean values. We formalize them via ACL2 functions over all Leo values, defined so that they return an error on non-boolean values. This is part of our defensive definition of the Leo dynamic semantics, in which attempts to apply operations on operands of the wrong type result in errors.

Subtopics

Op-nor
Leo boolean negated disjunction operation.
Op-nand
Leo boolean negated conjunction operation.
Op-or
Leo boolean disjunction operation.
Op-and
Leo boolean conjunction operation.