• 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
        • Syntax-for-tools
        • Atc
        • Language
          • Abstract-syntax
            • Tyspecseq
            • Expr
            • Binop
            • Fileset
            • Obj-declor
            • Ident
            • Iconst
            • Obj-adeclor
            • Const
            • Fundef
            • Unop
            • File
            • Tag-declon
            • Fun-declor
            • Obj-declon
            • Iconst-length
            • Abstract-syntax-operations
              • Tyspec+declor-to-ident+params+tyname
              • Fundef-list-to-fun-declon-list
              • Fundef-list->name-list
              • Ident+tyname-to-tyspec+declor
              • Tyspec+declor-to-ident+tyname
              • Obj-declon-to-ident+scspec+tyname+init
              • Ident+adeclor-to-obj-declor
              • Ident+adeclor-to-fun-declor
              • Fun-adeclor-to-params+declor
              • Param-declon-list-to-ident+tyname-lists
              • Obj-declor-to-ident+adeclor
              • Fun-declor-to-ident+adeclor
              • Expr-constp
              • Fundef-to-fun-declon
              • Param-declon-to-ident+tyname
              • Ext-declon-list->fundef-list
              • Struct-declon-to-ident+tyname
              • Unop-nonpointerp
              • Binop-strictp
                • Expr-list-constp
                • Binop-purep
                • Fundef->name
              • Label
              • Struct-declon
              • Initer
              • Ext-declon
              • Fun-adeclor
              • Expr-option
              • Iconst-base
              • Initer-option
              • Iconst-option
              • Tyspecseq-option
              • Stmt-option
              • Scspecseq
              • Param-declon
              • Obj-declon-option
              • File-option
              • Tyname
              • Transunit
              • Fun-declon
              • Transunit-result
              • Param-declon-list
              • Struct-declon-list
              • Expr-list
              • Tyspecseq-list
              • Ident-set
              • Ident-list
              • Ext-declon-list
              • Unop-list
              • Tyname-list
              • Fundef-list
              • Fun-declon-list
              • Binop-list
              • Stmt-fixtypes
              • Expr-fixtypes
            • Integer-ranges
            • Implementation-environments
            • Dynamic-semantics
            • Static-semantics
            • Grammar
            • Integer-formats
            • Types
            • Portable-ascii-identifiers
            • Values
            • Integer-operations
            • Computation-states
            • Object-designators
            • Operations
            • Errors
            • Tag-environments
            • Function-environments
            • Character-sets
            • Flexible-array-member-removal
            • Arithmetic-operations
            • Pointer-operations
            • Bytes
            • Keywords
            • Real-operations
            • Array-operations
            • Scalar-operations
            • Structure-operations
          • Representation
          • Transformation-tools
          • Insertion-sort
          • Pack
        • Farray
        • Rp-rewriter
        • Instant-runoff-voting
        • Imp-language
        • Sidekick
        • Leftist-trees
        • Java
        • Taspi
        • Bitcoin
        • Riscv
        • 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
        • Bigmems
        • Builtins
        • Execloader
        • Aleo
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Abstract-syntax-operations

    Binop-strictp

    Check if a binary operator is strict.

    Signature
    (binop-strictp op) → yes/no
    Arguments
    op — Guard (binopp op).
    Returns
    yes/no — Type (booleanp yes/no).

    All the binary operators except logical conjunction and disjunction are strict.

    Definitions and Theorems

    Function: binop-strictp

    (defun binop-strictp (op)
      (declare (xargs :guard (binopp op)))
      (let ((__function__ 'binop-strictp))
        (declare (ignorable __function__))
        (and (member-eq (binop-kind op)
                        (list :mul
                              :div :rem
                              :add :sub
                              :shl :shr
                              :lt :gt
                              :le :ge
                              :eq :ne
                              :bitand :bitxor
                              :bitior :asg
                              :asg-mul :asg-div
                              :asg-rem :asg-add
                              :asg-sub :asg-shl
                              :asg-shr :asg-and
                              :asg-xor :asg-ior))
             t)))

    Theorem: booleanp-of-binop-strictp

    (defthm booleanp-of-binop-strictp
      (b* ((yes/no (binop-strictp op)))
        (booleanp yes/no))
      :rule-classes :rewrite)

    Theorem: binop-strictp-of-binop-fix-op

    (defthm binop-strictp-of-binop-fix-op
      (equal (binop-strictp (binop-fix op))
             (binop-strictp op)))

    Theorem: binop-strictp-binop-equiv-congruence-on-op

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