• 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
        • Soft
        • C
          • Syntax-for-tools
            • Disambiguator
            • Abstract-syntax
            • Parser
            • Validator
            • Printer
            • Formalized-subset
            • Mapping-to-language-definition
            • Input-files
            • Defpred
            • Output-files
            • Abstract-syntax-operations
            • Validation-information
            • Implementation-environments
            • Concrete-syntax
            • Ascii-identifiers
            • Unambiguity
            • Preprocessing
            • Abstraction-mapping
            • Standard
            • Purity
              • Abstract-syntax-purep
                • Exprs/decls/stmts-purep
                • Binop-purep
                  • Unop-purep
                  • Typequal/attribspec-list-list-purep
                  • Typequal/attribspec-list-purep
                  • Structdeclor-list-purep
                  • Param-declon-list-purep
                  • Structdecl-list-purep
                  • Spec/qual-list-purep
                  • Initdeclor-list-purep
                  • Genassoc-list-purep
                  • Enumer-list-purep
                  • Desiniter-list-purep
                  • Designor-list-purep
                  • Decl-spec-list-purep
                  • Block-item-list-purep
                  • Attrib-spec-list-purep
                  • Attrib-list-purep
                  • Asm-output-list-purep
                  • Asm-input-list-purep
                  • Expr-list-purep
                  • Decl-list-purep
                  • Typequal/attribspec-purep
                  • Struni-spec-purep
                  • Structdeclor-purep
                  • Structdecl-purep
                  • Statassert-purep
                  • Spec/qual-purep
                  • Param-declor-purep
                  • Param-declon-purep
                  • Member-designor-purep
                  • Initer-option-purep
                  • Initdeclor-purep
                  • Expr-option-purep
                  • Dirabsdeclor-purep
                  • Dirabsdeclor-option-purep
                  • Declor-option-purep
                  • Const-expr-purep
                  • Const-expr-option-purep
                  • Block-item-purep
                  • Attrib-spec-purep
                  • Asm-output-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
                  • Enumspec-purep
                  • Enumer-purep
                  • Dirdeclor-purep
                  • Desiniter-purep
                  • Designor-purep
                  • Declor-purep
                  • Decl-spec-purep
                  • Decl-purep
                  • Attrib-purep
                  • Asm-stmt-purep
                  • Asm-input-purep
                  • Absdeclor-purep
            • Atc
            • Language
            • Representation
            • Transformation-tools
            • Insertion-sort
            • Pack
          • Bv
          • Imp-language
          • Event-macros
          • Java
          • Riscv
          • 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
    • 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)