• 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
      • Taspi
      • Bitcoin
      • Riscv
        • Instructions
          • Instr
          • Op-funct
          • Op-32-funct
          • Op-imm-funct
          • Load-funct
          • 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-validp
            • Instr-option
            • Op-imm-32-funct
          • States
          • Decoding
          • Encoding
          • Features
          • Semantics
          • Execution
        • 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
        • Bigmems
        • Builtins
        • Execloader
        • Aleo
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • 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)