• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • ACL2
    • Macro-libraries
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Set
        • Soft
        • C
          • Syntax-for-tools
            • Disambiguator
              • Dimb-exprs/decls/stmts
              • Dimb-make/adjust-expr-binary
              • Dimb-params-to-names
              • Dimb-transunit
              • Dimb-cast/call-to-call
              • Dimb-dirdeclor
              • Dimb-make/adjust-expr-cast
              • Dimb-fundef
              • Dimb-make/adjust-expr-unary
              • Dimb-expr
              • Dimb-amb-declor/absdeclor
              • Dimb-cast/call-to-cast
              • Dimb-declor
              • Dimb-cast/addsub-to-cast
              • Dimb-cast/addsub-to-addsub
              • Dimb-transunit-ensemble
              • Dimb-add-ident
              • Dimb-kind
              • Dimb-amb-expr/tyname
              • Dimb-cast/mul-to-cast
              • Dimb-cast/and-to-cast
              • Dimb-cast/mul-to-mul
              • Dimb-cast/and-to-and
              • Dimb-kind-option
              • Dimb-type-spec
              • Dimb-extdecl-list
              • Dimb-extdecl
              • Dimb-lookup-ident
              • Dimb-param-declor
              • Dimb-decl-spec
              • Dimb-param-declon
              • Dimb-add-idents-objfun
              • Dimb-add-ident-objfun
              • Dimb-table
              • Dimb-amb-decl/stmt
              • Dimb-pop-scope
              • Dimb-push-scope
              • Dimb-initdeclor
              • Dimb-declor-option
              • Dimb-enumspec
              • Dimb-decl
              • Dimb-stmt
              • Dimb-scope
                • Dimb-scopep
                • Dimb-scope-fix
                  • Dimb-scope-equiv
                • Dimb-structdeclor
                • Dimb-initdeclor-list
                • Dimb-decl-spec-list
                • Dimb-absdeclor
                • Dimb-init-table
                • Dimb-dirabsdeclor
                • Dimb-align-spec
                • Dimb-struni-spec
                • Irr-dimb-table
                • Irr-dimb-kind
                • Dimb-spec/qual-list
                • Dimb-spec/qual
                • Dimb-param-declon-list
                • Dimb-label
                • Dimb-enumer-list
                • Dimb-enumer
                • Dimb-dirabsdeclor-option
                • Dimb-block-item
                • Dimb-structdeclor-list
                • Dimb-structdecl-list
                • Dimb-statassert
                • Dimb-desiniter-list
                • Dimb-desiniter
                • Dimb-decl-list
                • Dimb-const-expr-option
                • Dimb-absdeclor-option
                • Dimb-structdecl
                • Dimb-member-designor
                • Dimb-initer-option
                • Dimb-initer
                • Dimb-genassoc-list
                • Dimb-genassoc
                • Dimb-expr-option
                • Dimb-expr-list
                • Dimb-designor-list
                • Dimb-designor
                • Dimb-const-expr
                • Dimb-block-item-list
                • Dimb-tyname
              • Abstract-syntax
              • Parser
              • Validator
              • Printer
              • Formalized-subset
              • Mapping-to-language-definition
              • Input-files
              • Defpred
              • Output-files
              • Abstract-syntax-operations
              • Validation-information
              • Implementation-environments
              • Concrete-syntax
              • Ascii-identifiers
              • Unambiguity
              • Preprocessing
              • Abstraction-mapping
              • Standard
              • Purity
            • Atc
            • Language
            • Representation
            • Transformation-tools
            • Insertion-sort
            • Pack
          • Bv
          • Imp-language
          • Event-macros
          • Java
          • Bitcoin
          • Ethereum
          • Yul
          • 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
    • Dimb-scope

    Dimb-scope-fix

    (dimb-scope-fix x) is an ACL2::fty alist fixing function that follows the fix-keys strategy.

    Signature
    (dimb-scope-fix x) → fty::newx
    Arguments
    x — Guard (dimb-scopep x).
    Returns
    fty::newx — Type (dimb-scopep fty::newx).

    Note that in the execution this is just an inline identity function.

    Definitions and Theorems

    Function: dimb-scope-fix$inline

    (defun dimb-scope-fix$inline (x)
      (declare (xargs :guard (dimb-scopep x)))
      (let ((__function__ 'dimb-scope-fix))
        (declare (ignorable __function__))
        (mbe :logic
             (if (atom x)
                 nil
               (if (consp (car x))
                   (cons (cons (ident-fix (caar x))
                               (dimb-kind-fix (cdar x)))
                         (dimb-scope-fix (cdr x)))
                 (dimb-scope-fix (cdr x))))
             :exec x)))

    Theorem: dimb-scopep-of-dimb-scope-fix

    (defthm dimb-scopep-of-dimb-scope-fix
      (b* ((fty::newx (dimb-scope-fix$inline x)))
        (dimb-scopep fty::newx))
      :rule-classes :rewrite)

    Theorem: dimb-scope-fix-when-dimb-scopep

    (defthm dimb-scope-fix-when-dimb-scopep
      (implies (dimb-scopep x)
               (equal (dimb-scope-fix x) x)))

    Function: dimb-scope-equiv$inline

    (defun dimb-scope-equiv$inline (acl2::x acl2::y)
      (declare (xargs :guard (and (dimb-scopep acl2::x)
                                  (dimb-scopep acl2::y))))
      (equal (dimb-scope-fix acl2::x)
             (dimb-scope-fix acl2::y)))

    Theorem: dimb-scope-equiv-is-an-equivalence

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

    Theorem: dimb-scope-equiv-implies-equal-dimb-scope-fix-1

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

    Theorem: dimb-scope-fix-under-dimb-scope-equiv

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

    Theorem: equal-of-dimb-scope-fix-1-forward-to-dimb-scope-equiv

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

    Theorem: equal-of-dimb-scope-fix-2-forward-to-dimb-scope-equiv

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

    Theorem: dimb-scope-equiv-of-dimb-scope-fix-1-forward

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

    Theorem: dimb-scope-equiv-of-dimb-scope-fix-2-forward

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

    Theorem: cons-of-ident-fix-k-under-dimb-scope-equiv

    (defthm cons-of-ident-fix-k-under-dimb-scope-equiv
      (dimb-scope-equiv (cons (cons (ident-fix acl2::k) acl2::v)
                              acl2::x)
                        (cons (cons acl2::k acl2::v) acl2::x)))

    Theorem: cons-ident-equiv-congruence-on-k-under-dimb-scope-equiv

    (defthm cons-ident-equiv-congruence-on-k-under-dimb-scope-equiv
      (implies (ident-equiv acl2::k k-equiv)
               (dimb-scope-equiv (cons (cons acl2::k acl2::v) acl2::x)
                                 (cons (cons k-equiv acl2::v) acl2::x)))
      :rule-classes :congruence)

    Theorem: cons-of-dimb-kind-fix-v-under-dimb-scope-equiv

    (defthm cons-of-dimb-kind-fix-v-under-dimb-scope-equiv
      (dimb-scope-equiv (cons (cons acl2::k (dimb-kind-fix acl2::v))
                              acl2::x)
                        (cons (cons acl2::k acl2::v) acl2::x)))

    Theorem: cons-dimb-kind-equiv-congruence-on-v-under-dimb-scope-equiv

    (defthm cons-dimb-kind-equiv-congruence-on-v-under-dimb-scope-equiv
      (implies (dimb-kind-equiv acl2::v v-equiv)
               (dimb-scope-equiv (cons (cons acl2::k acl2::v) acl2::x)
                                 (cons (cons acl2::k v-equiv) acl2::x)))
      :rule-classes :congruence)

    Theorem: cons-of-dimb-scope-fix-y-under-dimb-scope-equiv

    (defthm cons-of-dimb-scope-fix-y-under-dimb-scope-equiv
      (dimb-scope-equiv (cons acl2::x (dimb-scope-fix acl2::y))
                        (cons acl2::x acl2::y)))

    Theorem: cons-dimb-scope-equiv-congruence-on-y-under-dimb-scope-equiv

    (defthm cons-dimb-scope-equiv-congruence-on-y-under-dimb-scope-equiv
      (implies (dimb-scope-equiv acl2::y y-equiv)
               (dimb-scope-equiv (cons acl2::x acl2::y)
                                 (cons acl2::x y-equiv)))
      :rule-classes :congruence)

    Theorem: dimb-scope-fix-of-acons

    (defthm dimb-scope-fix-of-acons
      (equal (dimb-scope-fix (cons (cons acl2::a acl2::b) x))
             (cons (cons (ident-fix acl2::a)
                         (dimb-kind-fix acl2::b))
                   (dimb-scope-fix x))))

    Theorem: dimb-scope-fix-of-append

    (defthm dimb-scope-fix-of-append
      (equal (dimb-scope-fix (append std::a std::b))
             (append (dimb-scope-fix std::a)
                     (dimb-scope-fix std::b))))

    Theorem: consp-car-of-dimb-scope-fix

    (defthm consp-car-of-dimb-scope-fix
      (equal (consp (car (dimb-scope-fix x)))
             (consp (dimb-scope-fix x))))