• 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
      • Riscv
      • Taspi
      • 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
        • Aleobft
        • Aleovm
        • Leo
          • Grammar
          • Early-version
            • Json2ast
            • Testing
            • Definition
              • Flattening
              • Abstract-syntax
              • Dynamic-semantics
              • Compilation
              • Static-semantics
                • Type-checking
                • Static-environments
                  • Var/const-sinfo
                  • Ident-sinfo
                  • Function-sinfo
                  • Var/const-sinfo-option
                  • Struct-sinfo-option
                  • Struct-sinfo
                  • Ident-sinfo-option
                  • Function-sinfo-option
                  • Senv-option
                  • Add-var/const-sinfo
                  • Add-ident-sinfo
                  • Senv
                  • Add-struct-sinfo
                  • Add-function-sinfo
                  • Get-var/const-sinfo
                  • Get-struct-sinfo
                  • Get-function-sinfo
                  • Ident-senv
                    • Ident-senv-fix
                      • Ident-senvp
                      • Ident-senv-equiv
                    • Get-ident-sinfo
                    • Senv-result
                    • Var/const-sinfo-list
                    • Init-senv
                  • Curve-parameterization
                  • Function-recursion
                  • Struct-recursion
                  • Input-checking
                  • Program-checking
                  • Type-maps-for-struct-components
                  • Program-and-input-checking
                  • Output-checking
                • Concrete-syntax
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Community
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Ident-senv

    Ident-senv-fix

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

    Signature
    (ident-senv-fix x) → *
    Arguments
    x — Guard (ident-senvp x).

    Definitions and Theorems

    Function: ident-senv-fix

    (defun ident-senv-fix (x)
      (declare (xargs :guard (ident-senvp x)))
      (mbe :logic (if (ident-senvp x) x nil)
           :exec x))

    Theorem: ident-senvp-of-ident-senv-fix

    (defthm ident-senvp-of-ident-senv-fix
      (ident-senvp (ident-senv-fix x)))

    Theorem: ident-senv-fix-when-ident-senvp

    (defthm ident-senv-fix-when-ident-senvp
      (implies (ident-senvp x)
               (equal (ident-senv-fix x) x)))

    Theorem: emptyp-ident-senv-fix

    (defthm emptyp-ident-senv-fix
      (implies (or (omap::emptyp x)
                   (not (ident-senvp x)))
               (omap::emptyp (ident-senv-fix x))))

    Theorem: emptyp-of-ident-senv-fix-to-not-ident-senv-or-emptyp

    (defthm emptyp-of-ident-senv-fix-to-not-ident-senv-or-emptyp
      (equal (omap::emptyp (ident-senv-fix x))
             (or (not (ident-senvp x))
                 (omap::emptyp x))))

    Function: ident-senv-equiv$inline

    (defun ident-senv-equiv$inline (acl2::x acl2::y)
      (declare (xargs :guard (and (ident-senvp acl2::x)
                                  (ident-senvp acl2::y))))
      (equal (ident-senv-fix acl2::x)
             (ident-senv-fix acl2::y)))

    Theorem: ident-senv-equiv-is-an-equivalence

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

    Theorem: ident-senv-equiv-implies-equal-ident-senv-fix-1

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

    Theorem: ident-senv-fix-under-ident-senv-equiv

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

    Theorem: equal-of-ident-senv-fix-1-forward-to-ident-senv-equiv

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

    Theorem: equal-of-ident-senv-fix-2-forward-to-ident-senv-equiv

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

    Theorem: ident-senv-equiv-of-ident-senv-fix-1-forward

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

    Theorem: ident-senv-equiv-of-ident-senv-fix-2-forward

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