• 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
        • Syntax-for-tools
        • Atc
        • Language
          • Abstract-syntax
          • Integer-ranges
          • Implementation-environments
          • Dynamic-semantics
          • Static-semantics
          • Grammar
          • Integer-formats
          • Types
          • Portable-ascii-identifiers
          • Values
          • Integer-operations
          • Computation-states
          • Object-designators
          • Operations
          • Errors
          • Tag-environments
          • Function-environments
            • Init-fun-env
            • Fun-info
            • Fun-info-option
            • Fun-env-extend
            • Fun-env-result
            • Fun-env-lookup
            • Fun-info-from-fundef
            • Fun-env
              • Fun-envp
              • Fun-env-fix
                • Fun-env-equiv
            • Character-sets
            • Flexible-array-member-removal
            • Arithmetic-operations
            • Pointer-operations
            • Bytes
            • Keywords
            • Real-operations
            • Array-operations
            • Scalar-operations
            • Structure-operations
          • Representation
          • Transformation-tools
          • Insertion-sort
          • Pack
        • Farray
        • Rp-rewriter
        • Instant-runoff-voting
        • Imp-language
        • Sidekick
        • Leftist-trees
        • Java
        • Taspi
        • Riscv
        • Bitcoin
        • 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
        • Aleo
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Community
      • Proof-automation
      • ACL2
      • Macro-libraries
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Fun-env

    Fun-env-fix

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

    Signature
    (fun-env-fix x) → *
    Arguments
    x — Guard (fun-envp x).

    Definitions and Theorems

    Function: fun-env-fix

    (defun fun-env-fix (x)
      (declare (xargs :guard (fun-envp x)))
      (mbe :logic (if (fun-envp x) x nil)
           :exec x))

    Theorem: fun-envp-of-fun-env-fix

    (defthm fun-envp-of-fun-env-fix
      (fun-envp (fun-env-fix x)))

    Theorem: fun-env-fix-when-fun-envp

    (defthm fun-env-fix-when-fun-envp
      (implies (fun-envp x)
               (equal (fun-env-fix x) x)))

    Theorem: emptyp-fun-env-fix

    (defthm emptyp-fun-env-fix
      (implies (or (omap::emptyp x) (not (fun-envp x)))
               (omap::emptyp (fun-env-fix x))))

    Theorem: emptyp-of-fun-env-fix-to-not-fun-env-or-emptyp

    (defthm emptyp-of-fun-env-fix-to-not-fun-env-or-emptyp
      (equal (omap::emptyp (fun-env-fix x))
             (or (not (fun-envp x))
                 (omap::emptyp x))))

    Function: fun-env-equiv$inline

    (defun fun-env-equiv$inline (acl2::x acl2::y)
      (declare (xargs :guard (and (fun-envp acl2::x)
                                  (fun-envp acl2::y))))
      (equal (fun-env-fix acl2::x)
             (fun-env-fix acl2::y)))

    Theorem: fun-env-equiv-is-an-equivalence

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

    Theorem: fun-env-equiv-implies-equal-fun-env-fix-1

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

    Theorem: fun-env-fix-under-fun-env-equiv

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

    Theorem: equal-of-fun-env-fix-1-forward-to-fun-env-equiv

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

    Theorem: equal-of-fun-env-fix-2-forward-to-fun-env-equiv

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

    Theorem: fun-env-equiv-of-fun-env-fix-1-forward

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

    Theorem: fun-env-equiv-of-fun-env-fix-2-forward

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