• 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
        • Bitcoin
        • Ethereum
        • Yul
          • Transformations
          • Language
            • Abstract-syntax
            • Dynamic-semantics
            • Concrete-syntax
            • Static-soundness
            • Static-semantics
              • Static-safety-checking
                • Check-safe-statements/blocks/cases/fundefs
                • Check-safe-expressions
                • Check-safe-fundef-list
                • Check-safe-variable-multi
                • Check-safe-variable-single
                • Check-safe-assign-multi
                • Check-safe-assign-single
                • Check-safe-path
                • Check-safe-extends-varset
                • Vars+modes
                • Add-vars
                • Add-var
                • Add-funtypes
                • Check-safe-literal
                • Funtype
                • Get-funtype
                • Check-var
                • Check-safe-top-block
                • Check-safe-path-list
                • Vars+modes-result
                • Funtype-result
                • Funtable-result
                • Funtable-for-fundefs
                • Funtype-for-fundef
                • Funtable
                  • Funtablep
                  • Funtable-fix
                    • Funtable-equiv
                • Static-shadowing-checking
                • Mode-set-result
                • Literal-evaluation
                • Static-identifier-checking
                • Static-safety-checking-evm
                • Mode-set
                • Modes
              • Errors
            • Yul-json
          • 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
    • Funtable

    Funtable-fix

    (funtable-fix x) is a usual ACL2::fty omap fixing function.

    Signature
    (funtable-fix x) → *
    Arguments
    x — Guard (funtablep x).

    Definitions and Theorems

    Function: funtable-fix

    (defun funtable-fix (x)
      (declare (xargs :guard (funtablep x)))
      (mbe :logic (if (funtablep x) x nil)
           :exec x))

    Theorem: funtablep-of-funtable-fix

    (defthm funtablep-of-funtable-fix
      (funtablep (funtable-fix x)))

    Theorem: funtable-fix-when-funtablep

    (defthm funtable-fix-when-funtablep
      (implies (funtablep x)
               (equal (funtable-fix x) x)))

    Theorem: emptyp-funtable-fix

    (defthm emptyp-funtable-fix
      (implies (or (omap::emptyp x)
                   (not (funtablep x)))
               (omap::emptyp (funtable-fix x))))

    Theorem: emptyp-of-funtable-fix-to-not-funtable-or-emptyp

    (defthm emptyp-of-funtable-fix-to-not-funtable-or-emptyp
      (equal (omap::emptyp (funtable-fix x))
             (or (not (funtablep x))
                 (omap::emptyp x))))

    Function: funtable-equiv$inline

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

    Theorem: funtable-equiv-is-an-equivalence

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

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

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

    Theorem: funtable-fix-under-funtable-equiv

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

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

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

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

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

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

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

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

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