• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • 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
        • C
          • Syntax-for-tools
            • Formalized-subset
            • Mapping-to-language-definition
            • Input-files
            • Compilation-database
            • Printer
            • Output-files
            • Abstract-syntax-operations
            • Implementation-environments
            • Abstract-syntax
              • Abstract-syntax-trees
              • Abstract-syntax-irrelevants
              • Type-specifier-lists
              • Ascii-identifiers
              • Abstraction-mapping
              • Standard
              • Storage-specifier-lists
              • Code-ensembles
              • Purity
                • Abstract-syntax-purep
                  • Exprs/decls/stmts-purep
                  • Binop-purep
                    • Unop-purep
                    • Typequal/attribspec-list-purep
                    • Typequal/attribspec-list-list-purep
                    • Typequal/attribspec-purep
                    • Struni-spec-purep
                    • Struct-declor-purep
                    • Struct-declor-list-purep
                    • Struct-declon-purep
                    • Struct-declon-list-purep
                    • Statassert-purep
                    • Spec/qual-purep
                    • Spec/qual-list-purep
                    • Param-declor-purep
                    • Param-declon-purep
                    • Param-declon-list-purep
                    • Member-designor-purep
                    • Initer-option-purep
                    • Initdeclor-purep
                    • Initdeclor-list-purep
                    • Genassoc-list-purep
                    • Expr-option-purep
                    • Enumer-list-purep
                    • Dirabsdeclor-purep
                    • Dirabsdeclor-option-purep
                    • Desiniter-list-purep
                    • Designor-list-purep
                    • Declor-option-purep
                    • Decl-spec-list-purep
                    • Const-expr-purep
                    • Const-expr-option-purep
                    • Block-item-purep
                    • Block-item-list-purep
                    • Attrib-spec-purep
                    • Attrib-spec-list-purep
                    • Attrib-list-purep
                    • Asm-output-purep
                    • Asm-output-list-purep
                    • Asm-input-list-purep
                    • Amb-expr/tyname-purep
                    • Amb-decl/stmt-purep
                    • Amb-declor/absdeclor-purep
                    • Align-spec-purep
                    • Absdeclor-option-purep
                    • Type-spec-purep
                    • Tyname-purep
                    • Stmt-purep
                    • Label-purep
                    • Initer-purep
                    • Genassoc-purep
                    • Expr-purep
                    • Expr-list-purep
                    • Enumer-purep
                    • Enum-spec-purep
                    • Dirdeclor-purep
                    • Desiniter-purep
                    • Designor-purep
                    • Declor-purep
                    • Decl-spec-purep
                    • Decl-purep
                    • Decl-list-purep
                    • Comp-stmt-purep
                    • Attrib-purep
                    • Asm-stmt-purep
                    • Asm-input-purep
                    • Absdeclor-purep
                • Make-self-code-ensemble
              • Concrete-syntax
              • Disambiguation
              • Validation
              • Gcc-builtins
              • Preprocessing
              • Parsing
            • Atc
            • Transformation-tools
            • Language
            • Representation
            • Insertion-sort
            • Pack
          • Soft
          • Bv
          • Imp-language
          • Ethereum
          • Event-macros
          • Java
          • Riscv
          • Bitcoin
          • Zcash
          • Yul
          • ACL2-programming-language
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Axe
          • Lists-light
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Abstract-syntax-purep

    Binop-purep

    Signature
    (binop-purep binop) → fty::result
    Arguments
    binop — Guard (binopp binop).
    Returns
    fty::result — Type (booleanp fty::result).

    Definitions and Theorems

    Function: binop-purep

    (defun binop-purep (binop)
      (declare (xargs :guard (binopp binop)))
      (declare (ignorable binop))
      (let ((__function__ 'binop-purep))
        (declare (ignorable __function__))
        (binop-case binop
                    :mul t
                    :div t
                    :rem t
                    :add t
                    :sub t
                    :shl t
                    :shr t
                    :lt t
                    :gt t
                    :le t
                    :ge t
                    :eq t
                    :ne t
                    :bitand t
                    :bitxor t
                    :bitior t
                    :logand t
                    :logor t
                    :asg nil
                    :asg-mul nil
                    :asg-div nil
                    :asg-rem nil
                    :asg-add nil
                    :asg-sub nil
                    :asg-shl nil
                    :asg-shr nil
                    :asg-and nil
                    :asg-xor nil
                    :asg-ior nil)))

    Theorem: booleanp-of-binop-purep

    (defthm booleanp-of-binop-purep
      (b* ((fty::result (binop-purep binop)))
        (booleanp fty::result))
      :rule-classes :rewrite)

    Theorem: binop-purep-of-binop-fix-binop

    (defthm binop-purep-of-binop-fix-binop
      (equal (binop-purep (binop-fix binop))
             (binop-purep binop)))

    Theorem: binop-purep-binop-equiv-congruence-on-binop

    (defthm binop-purep-binop-equiv-congruence-on-binop
      (implies (binop-equiv binop binop-equiv)
               (equal (binop-purep binop)
                      (binop-purep binop-equiv)))
      :rule-classes :congruence)