• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • C
      • Proof-checker-array
      • Soft
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Ethereum
      • Leftist-trees
      • 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
        • Taspi
        • Bitcoin
        • Zcash
        • Des
        • X86isa
        • Sha-2
        • Yul
        • Proof-checker-itp13
        • Regex
        • ACL2-programming-language
        • Json
        • Jfkr
        • Equational
        • Cryptography
        • Axe
        • Poseidon
        • Where-do-i-place-my-book
        • Aleo
        • 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
    • 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)