• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • 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
        • Soft
        • C
        • Bv
        • Imp-language
        • Event-macros
        • Java
          • Atj
            • Atj-implementation
              • Atj-types
              • Atj-java-primitive-array-model
              • Atj-java-abstract-syntax
                • Jbinop
                • Jmethod
                • Jtype
                • Jfield
                  • Jfield-fix
                    • Make-jfield
                    • Jfieldp
                    • Jfield-equiv
                    • Change-jfield
                    • Jfield->volatile?
                    • Jfield->transient?
                    • Jfield->static?
                    • Jfield->init?
                    • Jfield->final?
                    • Jfield->access
                    • Jfield->type
                    • Jfield->name
                  • Jexprs
                  • Jliteral
                  • Junop
                  • Jlocvar
                  • Jcunit
                  • Jaccess
                  • Maybe-jexpr
                  • Jparam
                  • Jimport
                  • Jcinitializer
                  • Jresult
                  • Jstatems+jblocks
                  • Jexpr-get-field
                  • Jliteral-long-dec-nouscores
                  • Nat-to-dec-chars-theorems
                  • Jmethods-to-jcbody-elements
                  • Jclasses-to-jcbody-elements
                  • Jblock-locvar-final
                  • Jblock-locvar
                  • Jliteral-int-dec-nouscores
                  • Jfields-to-jcbody-elements
                  • Jblock-for
                  • Jblock-smethod
                  • Jblock-imethod
                  • Jblock-ifelse
                  • Jblock-asg-name
                  • Jparam-list->types
                  • Jparam-list->names
                  • Jexpr-lit-long-dec-nouscores
                  • Jexpr-lit-int-dec-nouscores
                  • Jexpr-literal-string
                  • Jexpr-literal-floating
                  • Jexpr-literal-character
                  • Jblock-while
                  • Jblock-method
                  • Jblock-if
                  • Jblock-expr
                  • Jblock-do
                  • Jblock-asg
                  • Jexpr-name-list
                  • Jblock-throw
                  • Jblock-return
                  • Jparam-list
                  • Jimport-list
                  • Jexpr-literal-true
                  • Jexpr-literal-null
                  • Jexpr-literal-false
                  • Jexpr-literal-1
                  • Jexpr-literal-0
                  • Jclass-list
                  • Jblock-continue
                  • Jtype-short
                  • Jtype-long
                  • Jtype-list
                  • Jtype-int
                  • Jtype-float
                  • Jtype-double
                  • Jtype-char
                  • Jtype-byte
                  • Jtype-boolean
                  • Jmethod-list
                  • Jliteral-list
                  • Jfield-list
                  • Jblock-list
                  • Jblock-break
                  • Jclasses+jcmembers
                • 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
                • Aij-notions
                • Atj-macro-definition
              • Atj-tutorial
            • Aij
            • Language
          • Bitcoin
          • Ethereum
          • Yul
          • Zcash
          • ACL2-programming-language
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Lists-light
          • Axe
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Jfield

    Jfield-fix

    Fixing function for jfield structures.

    Signature
    (jfield-fix x) → new-x
    Arguments
    x — Guard (jfieldp x).
    Returns
    new-x — Type (jfieldp new-x).

    Definitions and Theorems

    Function: jfield-fix$inline

    (defun jfield-fix$inline (x)
      (declare (xargs :guard (jfieldp x)))
      (let ((__function__ 'jfield-fix))
        (declare (ignorable __function__))
        (mbe :logic
             (b* ((access (jaccess-fix (cdr (std::da-nth 0 x))))
                  (static? (acl2::bool-fix (cdr (std::da-nth 1 x))))
                  (final? (acl2::bool-fix (cdr (std::da-nth 2 x))))
                  (transient? (acl2::bool-fix (cdr (std::da-nth 3 x))))
                  (volatile? (acl2::bool-fix (cdr (std::da-nth 4 x))))
                  (type (jtype-fix (cdr (std::da-nth 5 x))))
                  (name (str-fix (cdr (std::da-nth 6 x))))
                  (init? (maybe-jexpr-fix (cdr (std::da-nth 7 x)))))
               (list (cons 'access access)
                     (cons 'static? static?)
                     (cons 'final? final?)
                     (cons 'transient? transient?)
                     (cons 'volatile? volatile?)
                     (cons 'type type)
                     (cons 'name name)
                     (cons 'init? init?)))
             :exec x)))

    Theorem: jfieldp-of-jfield-fix

    (defthm jfieldp-of-jfield-fix
      (b* ((new-x (jfield-fix$inline x)))
        (jfieldp new-x))
      :rule-classes :rewrite)

    Theorem: jfield-fix-when-jfieldp

    (defthm jfield-fix-when-jfieldp
      (implies (jfieldp x)
               (equal (jfield-fix x) x)))

    Function: jfield-equiv$inline

    (defun jfield-equiv$inline (acl2::x acl2::y)
      (declare (xargs :guard (and (jfieldp acl2::x)
                                  (jfieldp acl2::y))))
      (equal (jfield-fix acl2::x)
             (jfield-fix acl2::y)))

    Theorem: jfield-equiv-is-an-equivalence

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

    Theorem: jfield-equiv-implies-equal-jfield-fix-1

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

    Theorem: jfield-fix-under-jfield-equiv

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

    Theorem: equal-of-jfield-fix-1-forward-to-jfield-equiv

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

    Theorem: equal-of-jfield-fix-2-forward-to-jfield-equiv

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

    Theorem: jfield-equiv-of-jfield-fix-1-forward

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

    Theorem: jfield-equiv-of-jfield-fix-2-forward

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