• 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
        • Semantics
          • Step
          • Write-var
          • Outcome
          • Beval
          • Read-var
          • Config
          • Terminatingp
          • Aeval
          • Step*
          • Stepn
          • Env
            • Envp
            • Env-fix
              • Env-equiv
          • Abstract-syntax
          • Interpreter
        • Sidekick
        • Leftist-trees
        • Java
        • Taspi
        • Bitcoin
        • Riscv
        • 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
    • Env

    Env-fix

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

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

    Definitions and Theorems

    Function: env-fix

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

    Theorem: envp-of-env-fix

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

    Theorem: env-fix-when-envp

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

    Theorem: emptyp-env-fix

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

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

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

    Function: env-equiv$inline

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

    Theorem: env-equiv-is-an-equivalence

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

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

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

    Theorem: env-fix-under-env-equiv

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

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

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

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

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

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

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

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

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