• 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
        • Soft
        • Bv
        • Imp-language
        • Ethereum
        • Event-macros
        • Java
          • Atj
          • Aij
          • Language
            • Syntax
            • Semantics
              • Primitive-function-macros
              • Primitive-values
              • Floating-point-placeholders
                • Floating-point-value-placeholders
                • Floating-point-operation-placeholders
                • Floating-point-conversion-placeholders
                • Floating-point-macro-placeholders
                  • Def-primitive-unary/binary-abs-predicate
                    • Def-primitive-unary/binary-abs-term
                    • Def-primitive-unary-abs
                    • Def-primitive-binary-abs
                • Pointers
                • Floating-point-value-set-parameters
                • Values
                • Primitive-operations
                • Primitive-conversions
                • Reference-values
          • 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
    • Floating-point-macro-placeholders

    Def-primitive-unary/binary-abs-predicate

    Predicate for the result of a function introduced via def-primitive-unary-abs or def-primitive-binary-abs.

    Signature
    (def-primitive-unary/binary-abs-predicate type) → predicate
    Arguments
    type — Guard (primitive-typep type).
    Returns
    predicate — Type (symbolp predicate).

    Definitions and Theorems

    Function: def-primitive-unary/binary-abs-predicate

    (defun def-primitive-unary/binary-abs-predicate (type)
      (declare (xargs :guard (primitive-typep type)))
      (let ((__function__ 'def-primitive-unary/binary-abs-predicate))
        (declare (ignorable __function__))
        (primitive-type-case type
                             :boolean 'booleanp
                             :char 'ubyte16p
                             :byte 'sbyte8p
                             :short 'sbyte16p
                             :int 'sbyte32p
                             :long 'sbyte64p
                             :float 'float-value-abs-p
                             :double 'double-value-abs-p)))

    Theorem: symbolp-of-def-primitive-unary/binary-abs-predicate

    (defthm symbolp-of-def-primitive-unary/binary-abs-predicate
      (b* ((predicate (def-primitive-unary/binary-abs-predicate type)))
        (symbolp predicate))
      :rule-classes :rewrite)

    Theorem: def-primitive-unary/binary-abs-predicate-of-primitive-type-fix-type

    (defthm
     def-primitive-unary/binary-abs-predicate-of-primitive-type-fix-type
     (equal (def-primitive-unary/binary-abs-predicate
                 (primitive-type-fix type))
            (def-primitive-unary/binary-abs-predicate type)))

    Theorem: def-primitive-unary/binary-abs-predicate-primitive-type-equiv-congruence-on-type

    (defthm
     def-primitive-unary/binary-abs-predicate-primitive-type-equiv-congruence-on-type
     (implies
          (primitive-type-equiv type type-equiv)
          (equal (def-primitive-unary/binary-abs-predicate type)
                 (def-primitive-unary/binary-abs-predicate type-equiv)))
     :rule-classes :congruence)