• 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
            • Atj-implementation
              • Atj-types
              • Atj-java-primitive-array-model
              • Atj-java-abstract-syntax
              • Atj-input-processing
              • Atj-java-pretty-printer
              • Atj-code-generation
              • Atj-java-primitives
              • Atj-java-primitive-arrays
              • Atj-type-macros
              • Atj-java-syntax-operations
              • Atj-fn
              • Atj-library-extensions
              • Atj-java-input-types
              • Atj-test-structures
                • Atj-test-value
                  • Atj-test-value-fix
                    • Atj-test-value-case
                    • Atj-test-valuep
                    • Atj-test-value-equiv
                    • Atj-test-value-kind
                    • Atj-test-value-ACL2
                    • Atj-test-value-jshort[]
                    • Atj-test-value-jshort
                    • Atj-test-value-jlong[]
                    • Atj-test-value-jlong
                    • Atj-test-value-jint[]
                    • Atj-test-value-jint
                    • Atj-test-value-jchar[]
                    • Atj-test-value-jchar
                    • Atj-test-value-jbyte[]
                    • Atj-test-value-jbyte
                    • Atj-test-value-jboolean[]
                    • Atj-test-value-jboolean
                  • Atj-test
                  • Atj-test-value-of-type
                  • Atj-test-values-of-types
                  • Atj-test-value-to-type
                  • Atj-test-values-to-types
                  • Atj-test-value-ACL2-list
                  • Atj-test-value-list
                  • Atj-test-list
                • Aij-notions
                • Atj-macro-definition
              • Atj-tutorial
            • Aij
            • Language
          • 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
    • Atj-test-value

    Atj-test-value-fix

    Fixing function for atj-test-value structures.

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

    Definitions and Theorems

    Function: atj-test-value-fix$inline

    (defun atj-test-value-fix$inline (x)
     (declare (xargs :guard (atj-test-valuep x)))
     (let ((__function__ 'atj-test-value-fix))
      (declare (ignorable __function__))
      (mbe
       :logic
       (case (atj-test-value-kind x)
        (:acl2 (b* ((get (identity (std::da-nth 0 (cdr x)))))
                 (cons :acl2 (list get))))
        (:jboolean
             (b* ((get (boolean-value-fix (std::da-nth 0 (cdr x)))))
               (cons :jboolean (list get))))
        (:jchar (b* ((get (char-value-fix (std::da-nth 0 (cdr x)))))
                  (cons :jchar (list get))))
        (:jbyte (b* ((get (byte-value-fix (std::da-nth 0 (cdr x)))))
                  (cons :jbyte (list get))))
        (:jshort (b* ((get (short-value-fix (std::da-nth 0 (cdr x)))))
                   (cons :jshort (list get))))
        (:jint (b* ((get (int-value-fix (std::da-nth 0 (cdr x)))))
                 (cons :jint (list get))))
        (:jlong (b* ((get (long-value-fix (std::da-nth 0 (cdr x)))))
                  (cons :jlong (list get))))
        (:jboolean[]
             (b* ((get (boolean-array-fix (std::da-nth 0 (cdr x)))))
               (cons :jboolean[] (list get))))
        (:jchar[] (b* ((get (char-array-fix (std::da-nth 0 (cdr x)))))
                    (cons :jchar[] (list get))))
        (:jbyte[] (b* ((get (byte-array-fix (std::da-nth 0 (cdr x)))))
                    (cons :jbyte[] (list get))))
        (:jshort[] (b* ((get (short-array-fix (std::da-nth 0 (cdr x)))))
                     (cons :jshort[] (list get))))
        (:jint[] (b* ((get (int-array-fix (std::da-nth 0 (cdr x)))))
                   (cons :jint[] (list get))))
        (:jlong[] (b* ((get (long-array-fix (std::da-nth 0 (cdr x)))))
                    (cons :jlong[] (list get)))))
       :exec x)))

    Theorem: atj-test-valuep-of-atj-test-value-fix

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

    Theorem: atj-test-value-fix-when-atj-test-valuep

    (defthm atj-test-value-fix-when-atj-test-valuep
      (implies (atj-test-valuep x)
               (equal (atj-test-value-fix x) x)))

    Function: atj-test-value-equiv$inline

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

    Theorem: atj-test-value-equiv-is-an-equivalence

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

    Theorem: atj-test-value-equiv-implies-equal-atj-test-value-fix-1

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

    Theorem: atj-test-value-fix-under-atj-test-value-equiv

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

    Theorem: equal-of-atj-test-value-fix-1-forward-to-atj-test-value-equiv

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

    Theorem: equal-of-atj-test-value-fix-2-forward-to-atj-test-value-equiv

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

    Theorem: atj-test-value-equiv-of-atj-test-value-fix-1-forward

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

    Theorem: atj-test-value-equiv-of-atj-test-value-fix-2-forward

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

    Theorem: atj-test-value-kind$inline-of-atj-test-value-fix-x

    (defthm atj-test-value-kind$inline-of-atj-test-value-fix-x
      (equal (atj-test-value-kind$inline (atj-test-value-fix x))
             (atj-test-value-kind$inline x)))

    Theorem: atj-test-value-kind$inline-atj-test-value-equiv-congruence-on-x

    (defthm
        atj-test-value-kind$inline-atj-test-value-equiv-congruence-on-x
      (implies (atj-test-value-equiv x x-equiv)
               (equal (atj-test-value-kind$inline x)
                      (atj-test-value-kind$inline x-equiv)))
      :rule-classes :congruence)

    Theorem: consp-of-atj-test-value-fix

    (defthm consp-of-atj-test-value-fix
      (consp (atj-test-value-fix x))
      :rule-classes :type-prescription)