• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Set
        • C
        • Soft
        • Bv
        • Imp-language
        • Ethereum
        • Event-macros
        • Java
        • Riscv
        • Bitcoin
        • Zcash
        • Yul
          • Transformations
          • Language
            • Abstract-syntax
              • Escape
              • Swcase-list->value-list
              • Hex-digit-list->chars
              • Fundef-list->name-list
              • Literal
              • Path
              • Hex-string-rest-element
              • Plain-string
              • String-element
              • Hex-string-content-option
              • Hex-string-content
              • Identifier
              • Funcall-option
              • Expression-option
              • Statement-option
              • Literal-option
              • Identifier-option
              • Hex-string
              • Hex-quad
              • Hex-digit
              • Hex-pair
              • Data-value
              • Data-item
              • Statements-to-fundefs
              • String-element-list-result
              • Identifier-identifier-map-result
              • Swcase-result
              • String-element-result
              • Statement-result
              • Literal-result
              • Identifier-set-result
              • Identifier-result
              • Identifier-list-result
              • Fundef-result
              • Funcall-result
              • Expression-result
              • Escape-result
              • Path-result
              • Block-result
              • Objects
              • Statements/blocks/cases/fundefs
              • Identifier-list
              • Identifier-set
              • Identifier-identifier-map
              • Identifier-identifier-alist
                • Identifier-identifier-alistp
                • Identifier-identifier-alist-fix
                  • Identifier-identifier-alist-equiv
                • Hex-string-rest-element-list
                • String-element-list
                • Path-list
                • Hex-digit-list
                • Literal-list
                • Fundef-list
                • Expressions/funcalls
                • Abstract-syntax-induction-schemas
              • Dynamic-semantics
              • Concrete-syntax
              • Static-soundness
              • Static-semantics
              • Errors
            • Yul-json
          • ACL2-programming-language
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Axe
          • Lists-light
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Identifier-identifier-alist

    Identifier-identifier-alist-fix

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

    Signature
    (identifier-identifier-alist-fix x) → fty::newx
    Arguments
    x — Guard (identifier-identifier-alistp x).
    Returns
    fty::newx — Type (identifier-identifier-alistp fty::newx).

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

    Definitions and Theorems

    Function: identifier-identifier-alist-fix$inline

    (defun identifier-identifier-alist-fix$inline (x)
      (declare (xargs :guard (identifier-identifier-alistp x)))
      (let ((__function__ 'identifier-identifier-alist-fix))
        (declare (ignorable __function__))
        (mbe :logic
             (if (atom x)
                 nil
               (if (consp (car x))
                   (cons (cons (identifier-fix (caar x))
                               (identifier-fix (cdar x)))
                         (identifier-identifier-alist-fix (cdr x)))
                 (identifier-identifier-alist-fix (cdr x))))
             :exec x)))

    Theorem: identifier-identifier-alistp-of-identifier-identifier-alist-fix

    (defthm
        identifier-identifier-alistp-of-identifier-identifier-alist-fix
      (b* ((fty::newx (identifier-identifier-alist-fix$inline x)))
        (identifier-identifier-alistp fty::newx))
      :rule-classes :rewrite)

    Theorem: identifier-identifier-alist-fix-when-identifier-identifier-alistp

    (defthm
      identifier-identifier-alist-fix-when-identifier-identifier-alistp
      (implies (identifier-identifier-alistp x)
               (equal (identifier-identifier-alist-fix x)
                      x)))

    Function: identifier-identifier-alist-equiv$inline

    (defun identifier-identifier-alist-equiv$inline (acl2::x acl2::y)
      (declare
           (xargs :guard (and (identifier-identifier-alistp acl2::x)
                              (identifier-identifier-alistp acl2::y))))
      (equal (identifier-identifier-alist-fix acl2::x)
             (identifier-identifier-alist-fix acl2::y)))

    Theorem: identifier-identifier-alist-equiv-is-an-equivalence

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

    Theorem: identifier-identifier-alist-equiv-implies-equal-identifier-identifier-alist-fix-1

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

    Theorem: identifier-identifier-alist-fix-under-identifier-identifier-alist-equiv

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

    Theorem: equal-of-identifier-identifier-alist-fix-1-forward-to-identifier-identifier-alist-equiv

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

    Theorem: equal-of-identifier-identifier-alist-fix-2-forward-to-identifier-identifier-alist-equiv

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

    Theorem: identifier-identifier-alist-equiv-of-identifier-identifier-alist-fix-1-forward

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

    Theorem: identifier-identifier-alist-equiv-of-identifier-identifier-alist-fix-2-forward

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

    Theorem: cons-of-identifier-fix-k-under-identifier-identifier-alist-equiv

    (defthm
       cons-of-identifier-fix-k-under-identifier-identifier-alist-equiv
      (identifier-identifier-alist-equiv
           (cons (cons (identifier-fix acl2::k) acl2::v)
                 acl2::x)
           (cons (cons acl2::k acl2::v) acl2::x)))

    Theorem: cons-identifier-equiv-congruence-on-k-under-identifier-identifier-alist-equiv

    (defthm
     cons-identifier-equiv-congruence-on-k-under-identifier-identifier-alist-equiv
     (implies (identifier-equiv acl2::k k-equiv)
              (identifier-identifier-alist-equiv
                   (cons (cons acl2::k acl2::v) acl2::x)
                   (cons (cons k-equiv acl2::v) acl2::x)))
     :rule-classes :congruence)

    Theorem: cons-of-identifier-fix-v-under-identifier-identifier-alist-equiv

    (defthm
       cons-of-identifier-fix-v-under-identifier-identifier-alist-equiv
      (identifier-identifier-alist-equiv
           (cons (cons acl2::k (identifier-fix acl2::v))
                 acl2::x)
           (cons (cons acl2::k acl2::v) acl2::x)))

    Theorem: cons-identifier-equiv-congruence-on-v-under-identifier-identifier-alist-equiv

    (defthm
     cons-identifier-equiv-congruence-on-v-under-identifier-identifier-alist-equiv
     (implies (identifier-equiv acl2::v v-equiv)
              (identifier-identifier-alist-equiv
                   (cons (cons acl2::k acl2::v) acl2::x)
                   (cons (cons acl2::k v-equiv) acl2::x)))
     :rule-classes :congruence)

    Theorem: cons-of-identifier-identifier-alist-fix-y-under-identifier-identifier-alist-equiv

    (defthm
     cons-of-identifier-identifier-alist-fix-y-under-identifier-identifier-alist-equiv
     (identifier-identifier-alist-equiv
          (cons acl2::x
                (identifier-identifier-alist-fix acl2::y))
          (cons acl2::x acl2::y)))

    Theorem: cons-identifier-identifier-alist-equiv-congruence-on-y-under-identifier-identifier-alist-equiv

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

    Theorem: identifier-identifier-alist-fix-of-acons

    (defthm identifier-identifier-alist-fix-of-acons
     (equal
       (identifier-identifier-alist-fix (cons (cons acl2::a acl2::b) x))
       (cons (cons (identifier-fix acl2::a)
                   (identifier-fix acl2::b))
             (identifier-identifier-alist-fix x))))

    Theorem: identifier-identifier-alist-fix-of-append

    (defthm identifier-identifier-alist-fix-of-append
      (equal (identifier-identifier-alist-fix (append std::a std::b))
             (append (identifier-identifier-alist-fix std::a)
                     (identifier-identifier-alist-fix std::b))))

    Theorem: consp-car-of-identifier-identifier-alist-fix

    (defthm consp-car-of-identifier-identifier-alist-fix
      (equal (consp (car (identifier-identifier-alist-fix x)))
             (consp (identifier-identifier-alist-fix x))))