• 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
        • Soft
        • C
        • Bv
        • Imp-language
        • Event-macros
        • Java
        • Riscv
          • Specification
            • Semantics
            • Features
            • Instructions
              • Instr
              • Op-funct
              • Op-32-funct
              • Op-imm-funct
              • Load-funct
              • Instr-validp
              • Branch-funct
              • Op-imms-funct
              • Store-funct
                • Store-funct-fix
                  • Store-funct-case
                  • Store-funct-equiv
                  • Store-funct-p
                  • Store-funct-sw
                  • Store-funct-sh
                  • Store-funct-sd
                  • Store-funct-sb
                  • Store-funct-kind
                • Op-imms-32-funct
                • Instr-option
                • Op-imm-32-funct
              • Encoding
              • States
              • Reads-over-writes
              • Semantics-equivalences
              • Decoding
              • Execution
            • Executable
            • Specialized
            • Optimized
          • 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
    • Store-funct

    Store-funct-fix

    Fixing function for store-funct structures.

    Signature
    (store-funct-fix x) → new-x
    Arguments
    x — Guard (store-funct-p x).
    Returns
    new-x — Type (store-funct-p new-x).

    Definitions and Theorems

    Function: store-funct-fix$inline

    (defun store-funct-fix$inline (x)
      (declare (xargs :guard (store-funct-p x)))
      (let ((__function__ 'store-funct-fix))
        (declare (ignorable __function__))
        (mbe :logic
             (case (store-funct-kind x)
               (:sb (cons :sb (list)))
               (:sh (cons :sh (list)))
               (:sw (cons :sw (list)))
               (:sd (cons :sd (list))))
             :exec x)))

    Theorem: store-funct-p-of-store-funct-fix

    (defthm store-funct-p-of-store-funct-fix
      (b* ((new-x (store-funct-fix$inline x)))
        (store-funct-p new-x))
      :rule-classes :rewrite)

    Theorem: store-funct-fix-when-store-funct-p

    (defthm store-funct-fix-when-store-funct-p
      (implies (store-funct-p x)
               (equal (store-funct-fix x) x)))

    Function: store-funct-equiv$inline

    (defun store-funct-equiv$inline (acl2::x acl2::y)
      (declare (xargs :guard (and (store-funct-p acl2::x)
                                  (store-funct-p acl2::y))))
      (equal (store-funct-fix acl2::x)
             (store-funct-fix acl2::y)))

    Theorem: store-funct-equiv-is-an-equivalence

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

    Theorem: store-funct-equiv-implies-equal-store-funct-fix-1

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

    Theorem: store-funct-fix-under-store-funct-equiv

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

    Theorem: equal-of-store-funct-fix-1-forward-to-store-funct-equiv

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

    Theorem: equal-of-store-funct-fix-2-forward-to-store-funct-equiv

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

    Theorem: store-funct-equiv-of-store-funct-fix-1-forward

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

    Theorem: store-funct-equiv-of-store-funct-fix-2-forward

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

    Theorem: store-funct-kind$inline-of-store-funct-fix-x

    (defthm store-funct-kind$inline-of-store-funct-fix-x
      (equal (store-funct-kind$inline (store-funct-fix x))
             (store-funct-kind$inline x)))

    Theorem: store-funct-kind$inline-store-funct-equiv-congruence-on-x

    (defthm store-funct-kind$inline-store-funct-equiv-congruence-on-x
      (implies (store-funct-equiv x x-equiv)
               (equal (store-funct-kind$inline x)
                      (store-funct-kind$inline x-equiv)))
      :rule-classes :congruence)

    Theorem: consp-of-store-funct-fix

    (defthm consp-of-store-funct-fix
      (consp (store-funct-fix x))
      :rule-classes :type-prescription)