• 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
                • Execution
                • Values
                • Dynamic-environments
                  • Call-dinfo
                  • Denv
                  • Update-var/const-dinfo-in-scope-list
                  • Update-var/const-dinfo-in-scope
                  • Var/const-dinfo
                  • Update-var/const-dinfo
                  • Add-var/const-dinfo-to-scope
                  • Add-var/const-dinfo
                  • Var/const-dinfo-option
                  • Get-var/const-dinfo-from-scope-list
                  • Denv-option
                  • Get-var/const-dinfo-from-scope
                  • Vcscope-dinfo-option
                  • Vcscope-dinfo-list-option
                  • Vcscope-dinfo
                  • Screens
                  • Get-var/const-dinfo
                  • Vcscope-dinfo-option-result
                  • Vcscope-dinfo-list-result
                  • Vcscope-dinfo-result
                  • Dynamic-struct-environments
                    • Struct-dinfo-option
                    • Add-struct-dinfo
                    • Struct-dinfo
                    • Struct-denv-option
                    • Get-struct-dinfo
                    • Struct-denv
                      • Struct-denvp
                      • Struct-denv-fix
                        • Struct-denv-equiv
                      • Init-struct-denv
                    • Dynamic-function-environments
                    • Denv-result
                    • Init-denv
                    • Vcscope-dinfo-list
                    • Call-dinfo-list
                  • Arithmetic-operations
                  • Curve-parameterization
                  • Shift-operations
                  • Errors
                  • Value-expressions
                  • Locations
                  • Input-execution
                  • Edwards-bls12-generator
                  • Equality-operations
                  • Logical-operations
                  • Program-execution
                  • Ordering-operations
                  • Bitwise-operations
                  • Literal-evaluation
                  • Type-maps-for-struct-components
                  • Output-execution
                  • Tuple-operations
                  • Struct-operations
                • Compilation
                • Static-semantics
                • 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
    • Struct-denv

    Struct-denv-fix

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

    Signature
    (struct-denv-fix x) → *
    Arguments
    x — Guard (struct-denvp x).

    Definitions and Theorems

    Function: struct-denv-fix

    (defun struct-denv-fix (x)
      (declare (xargs :guard (struct-denvp x)))
      (mbe :logic (if (struct-denvp x) x nil)
           :exec x))

    Theorem: struct-denvp-of-struct-denv-fix

    (defthm struct-denvp-of-struct-denv-fix
      (struct-denvp (struct-denv-fix x)))

    Theorem: struct-denv-fix-when-struct-denvp

    (defthm struct-denv-fix-when-struct-denvp
      (implies (struct-denvp x)
               (equal (struct-denv-fix x) x)))

    Theorem: emptyp-struct-denv-fix

    (defthm emptyp-struct-denv-fix
      (implies (or (omap::emptyp x)
                   (not (struct-denvp x)))
               (omap::emptyp (struct-denv-fix x))))

    Theorem: emptyp-of-struct-denv-fix-to-not-struct-denv-or-emptyp

    (defthm emptyp-of-struct-denv-fix-to-not-struct-denv-or-emptyp
      (equal (omap::emptyp (struct-denv-fix x))
             (or (not (struct-denvp x))
                 (omap::emptyp x))))

    Function: struct-denv-equiv$inline

    (defun struct-denv-equiv$inline (acl2::x acl2::y)
      (declare (xargs :guard (and (struct-denvp acl2::x)
                                  (struct-denvp acl2::y))))
      (equal (struct-denv-fix acl2::x)
             (struct-denv-fix acl2::y)))

    Theorem: struct-denv-equiv-is-an-equivalence

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

    Theorem: struct-denv-equiv-implies-equal-struct-denv-fix-1

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

    Theorem: struct-denv-fix-under-struct-denv-equiv

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

    Theorem: equal-of-struct-denv-fix-1-forward-to-struct-denv-equiv

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

    Theorem: equal-of-struct-denv-fix-2-forward-to-struct-denv-equiv

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

    Theorem: struct-denv-equiv-of-struct-denv-fix-1-forward

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

    Theorem: struct-denv-equiv-of-struct-denv-fix-2-forward

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