• 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
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • Java
        • Atj
        • Aij
        • Language
          • Syntax
          • Semantics
            • Primitive-function-macros
            • Primitive-values
              • Floating-pointx-value
              • Doublex-value-fns
              • Primitivex-value
              • Floatx-value-fns
              • Primitive-value
              • Numericx-value
              • Numeric-value
              • Integral-value
              • Int-value
              • Char-value
              • Byte-value
              • Short-value
              • Long-value
              • Float-value
                • Float-valuep
                • Float-value-fix
                  • Float-value-equiv
                  • Make-float-value
                  • Float-value->float
                  • Change-float-value
                • Double-value
                • Boolean-value
                • Floating-point-value
                • Disjoint-primitive-values
                • Short-value-list
                • Long-value-list
                • Int-value-list
                • Float-value-list
                • Double-value-list
                • Char-value-list
                • Byte-value-list
                • Boolean-value-list
              • Floating-point-placeholders
              • Pointers
              • Floating-point-value-set-parameters
              • Values
              • Primitive-operations
              • Primitive-conversions
              • Reference-values
        • Taspi
        • Riscv
        • Bitcoin
        • 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
        • Aleo
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Community
      • Proof-automation
      • ACL2
      • Macro-libraries
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Float-value

    Float-value-fix

    Fixing function for float-value structures.

    Signature
    (float-value-fix x) → new-x
    Arguments
    x — Guard (float-valuep x).
    Returns
    new-x — Type (float-valuep new-x).

    Definitions and Theorems

    Function: float-value-fix$inline

    (defun float-value-fix$inline (x)
      (declare (xargs :guard (float-valuep x)))
      (let ((__function__ 'float-value-fix))
        (declare (ignorable __function__))
        (mbe :logic
             (b* ((float (float-value-abs-fix (std::da-nth 0 (cdr x)))))
               (cons :float (list float)))
             :exec x)))

    Theorem: float-valuep-of-float-value-fix

    (defthm float-valuep-of-float-value-fix
      (b* ((new-x (float-value-fix$inline x)))
        (float-valuep new-x))
      :rule-classes :rewrite)

    Theorem: float-value-fix-when-float-valuep

    (defthm float-value-fix-when-float-valuep
      (implies (float-valuep x)
               (equal (float-value-fix x) x)))

    Function: float-value-equiv$inline

    (defun float-value-equiv$inline (acl2::x acl2::y)
      (declare (xargs :guard (and (float-valuep acl2::x)
                                  (float-valuep acl2::y))))
      (equal (float-value-fix acl2::x)
             (float-value-fix acl2::y)))

    Theorem: float-value-equiv-is-an-equivalence

    (defthm float-value-equiv-is-an-equivalence
      (and (booleanp (float-value-equiv x y))
           (float-value-equiv x x)
           (implies (float-value-equiv x y)
                    (float-value-equiv y x))
           (implies (and (float-value-equiv x y)
                         (float-value-equiv y z))
                    (float-value-equiv x z)))
      :rule-classes (:equivalence))

    Theorem: float-value-equiv-implies-equal-float-value-fix-1

    (defthm float-value-equiv-implies-equal-float-value-fix-1
      (implies (float-value-equiv acl2::x x-equiv)
               (equal (float-value-fix acl2::x)
                      (float-value-fix x-equiv)))
      :rule-classes (:congruence))

    Theorem: float-value-fix-under-float-value-equiv

    (defthm float-value-fix-under-float-value-equiv
      (float-value-equiv (float-value-fix acl2::x)
                         acl2::x)
      :rule-classes (:rewrite :rewrite-quoted-constant))

    Theorem: equal-of-float-value-fix-1-forward-to-float-value-equiv

    (defthm equal-of-float-value-fix-1-forward-to-float-value-equiv
      (implies (equal (float-value-fix acl2::x)
                      acl2::y)
               (float-value-equiv acl2::x acl2::y))
      :rule-classes :forward-chaining)

    Theorem: equal-of-float-value-fix-2-forward-to-float-value-equiv

    (defthm equal-of-float-value-fix-2-forward-to-float-value-equiv
      (implies (equal acl2::x (float-value-fix acl2::y))
               (float-value-equiv acl2::x acl2::y))
      :rule-classes :forward-chaining)

    Theorem: float-value-equiv-of-float-value-fix-1-forward

    (defthm float-value-equiv-of-float-value-fix-1-forward
      (implies (float-value-equiv (float-value-fix acl2::x)
                                  acl2::y)
               (float-value-equiv acl2::x acl2::y))
      :rule-classes :forward-chaining)

    Theorem: float-value-equiv-of-float-value-fix-2-forward

    (defthm float-value-equiv-of-float-value-fix-2-forward
      (implies (float-value-equiv acl2::x (float-value-fix acl2::y))
               (float-value-equiv acl2::x acl2::y))
      :rule-classes :forward-chaining)