• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • 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
        • Soft
        • C
          • Syntax-for-tools
          • Atc
            • Atc-implementation
              • Atc-abstract-syntax
              • Atc-pretty-printer
              • Atc-event-and-code-generation
              • Fty-pseudo-term-utilities
              • Atc-term-recognizers
              • Atc-input-processing
              • Atc-shallow-embedding
                • Defstruct
                  • Defstruct-implementation
                    • Defstruct-info
                      • Defstruct-info-fix
                        • Make-defstruct-info
                        • Defstruct-infop
                        • Defstruct-info-equiv
                        • Change-defstruct-info
                        • Defstruct-info->pointer-type-to-quoted-thm
                        • Defstruct-info->fixer-recognizer-thm
                        • Defstruct-info->type-to-quoted-thm
                        • Defstruct-info->type-of-value-thm
                        • Defstruct-info->value-kind-thm
                        • Defstruct-info->not-error-thm
                        • Defstruct-info->members
                        • Defstruct-info->flexiblep-thm
                        • Defstruct-info->valuep-thm
                        • Defstruct-info->recognizer
                        • Defstruct-info->flexiblep
                        • Defstruct-info->fixtype
                        • Defstruct-info->fixer
                        • Defstruct-info->call
                        • Defstruct-info->tag
                      • Defstruct-gen-recognizer
                      • Defstruct-gen-integer-member-ops
                      • Defstruct-gen-constructor
                      • Defstruct-gen-array-member-ops
                      • Defstruct-gen-recognizer-conjuncts
                      • Defstruct-member-info
                      • Defstruct-member-info-list->memtype-list
                      • Defstruct-process-members
                      • Defstruct-gen-fixer
                      • Defstruct-gen-member-ops
                      • Defstruct-process-inputs
                      • Defstruct-gen-fixing-term
                      • Defstruct-info-option
                      • Defstruct-gen-everything
                      • Defstruct-gen-all-member-ops
                      • Defstruct-gen-recognizer-all-conjuncts
                      • Defstruct-info->writer-element-list
                      • Defstruct-info->reader-element-list
                      • Defstruct-gen-fixtype
                      • Defstruct-info->writer-list
                      • Defstruct-info->reader-list
                      • Defstruct-fn
                      • Defstruct-table-record-event
                      • Defstruct-table-lookup
                      • Irr-defstruct-info
                      • Defstruct-info->writer-element-list-aux
                      • Defstruct-info->reader-element-list-aux
                      • Defstruct-info->writer-list-aux
                      • Defstruct-info->reader-list-aux
                      • Defstruct-member-info-list
                      • Defstruct-table-definition
                      • *defstruct-table*
                      • Defstruct-macro-implementtion
                  • Defobject
                  • Atc-let-designations
                  • Pointer-types
                  • Atc-conditional-expressions
                • Atc-process-inputs-and-gen-everything
                • Atc-table
                • Atc-fn
                • Atc-pretty-printing-options
                • Atc-types
                • Atc-macro-definition
              • Atc-tutorial
            • 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
    • Defstruct-info

    Defstruct-info-fix

    Fixing function for defstruct-info structures.

    Signature
    (defstruct-info-fix x) → new-x
    Arguments
    x — Guard (defstruct-infop x).
    Returns
    new-x — Type (defstruct-infop new-x).

    Definitions and Theorems

    Function: defstruct-info-fix$inline

    (defun defstruct-info-fix$inline (x)
     (declare (xargs :guard (defstruct-infop x)))
     (let ((__function__ 'defstruct-info-fix))
      (declare (ignorable __function__))
      (mbe
        :logic
        (b*
         ((tag (ident-fix (cdr (std::da-nth 0 x))))
          (members
               (defstruct-member-info-list-fix (cdr (std::da-nth 1 x))))
          (flexiblep (acl2::bool-fix (cdr (std::da-nth 2 x))))
          (fixtype (symbol-fix (cdr (std::da-nth 3 x))))
          (recognizer (symbol-fix (cdr (std::da-nth 4 x))))
          (fixer (symbol-fix (cdr (std::da-nth 5 x))))
          (fixer-recognizer-thm (symbol-fix (cdr (std::da-nth 6 x))))
          (not-error-thm (symbol-fix (cdr (std::da-nth 7 x))))
          (valuep-thm (symbol-fix (cdr (std::da-nth 8 x))))
          (value-kind-thm (symbol-fix (cdr (std::da-nth 9 x))))
          (type-of-value-thm (symbol-fix (cdr (std::da-nth 10 x))))
          (flexiblep-thm (symbol-fix (cdr (std::da-nth 11 x))))
          (type-to-quoted-thm (symbol-fix (cdr (std::da-nth 12 x))))
          (pointer-type-to-quoted-thm
               (symbol-fix (cdr (std::da-nth 13 x))))
          (call (acl2::pseudo-event-form-fix (cdr (std::da-nth 14 x)))))
         (list (cons 'tag tag)
               (cons 'members members)
               (cons 'flexiblep flexiblep)
               (cons 'fixtype fixtype)
               (cons 'recognizer recognizer)
               (cons 'fixer fixer)
               (cons 'fixer-recognizer-thm
                     fixer-recognizer-thm)
               (cons 'not-error-thm not-error-thm)
               (cons 'valuep-thm valuep-thm)
               (cons 'value-kind-thm value-kind-thm)
               (cons 'type-of-value-thm
                     type-of-value-thm)
               (cons 'flexiblep-thm flexiblep-thm)
               (cons 'type-to-quoted-thm
                     type-to-quoted-thm)
               (cons 'pointer-type-to-quoted-thm
                     pointer-type-to-quoted-thm)
               (cons 'call call)))
        :exec x)))

    Theorem: defstruct-infop-of-defstruct-info-fix

    (defthm defstruct-infop-of-defstruct-info-fix
      (b* ((new-x (defstruct-info-fix$inline x)))
        (defstruct-infop new-x))
      :rule-classes :rewrite)

    Theorem: defstruct-info-fix-when-defstruct-infop

    (defthm defstruct-info-fix-when-defstruct-infop
      (implies (defstruct-infop x)
               (equal (defstruct-info-fix x) x)))

    Function: defstruct-info-equiv$inline

    (defun defstruct-info-equiv$inline (acl2::x acl2::y)
      (declare (xargs :guard (and (defstruct-infop acl2::x)
                                  (defstruct-infop acl2::y))))
      (equal (defstruct-info-fix acl2::x)
             (defstruct-info-fix acl2::y)))

    Theorem: defstruct-info-equiv-is-an-equivalence

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

    Theorem: defstruct-info-equiv-implies-equal-defstruct-info-fix-1

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

    Theorem: defstruct-info-fix-under-defstruct-info-equiv

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

    Theorem: equal-of-defstruct-info-fix-1-forward-to-defstruct-info-equiv

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

    Theorem: equal-of-defstruct-info-fix-2-forward-to-defstruct-info-equiv

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

    Theorem: defstruct-info-equiv-of-defstruct-info-fix-1-forward

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

    Theorem: defstruct-info-equiv-of-defstruct-info-fix-2-forward

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