• 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
        • Soft
        • C
          • Syntax-for-tools
            • Disambiguator
            • Parser
            • Validator
            • Printer
            • Formalized-subset
            • Mapping-to-language-definition
            • Input-files
            • Defpred
            • Abstract-syntax-operations
            • Validation-information
              • Abstract-syntax-annop
              • Types
              • Valid-ord-info
              • Lifetime
              • Stmt-type
              • Expr-type
              • Valid-table
              • Valid-defstatus
              • Valid-ord-info-option
              • Linkage-option
              • Linkage
              • Lifetime-option
              • Iconst-info
              • Var-info
              • Binary-info
                • Binary-info-fix
                  • Binary-info-equiv
                  • Make-binary-info
                  • Change-binary-info
                  • Binary-info->type
                  • Binary-info->table
                  • Binary-infop
                • Valid-scope
                • Expr-null-pointer-constp
                • Transunit-info
                • Const-expr-null-pointer-constp
                • Unary-info
                • Tyname-info
                • Block-item-list-type
                • Block-item-type
                • Valid-ord-scope
                • Code-ensemble-annop
                • Coerce-transunit-info
                • Coerce-var-info
                • Coerce-unary-info
                • Coerce-tyname-info
                • Coerce-iconst-info
                • Coerce-binary-info
                • Irr-transunit-info
                • Irr-iconst-info
                • Irr-binary-info
                • Irr-var-info
                • Irr-valid-table
                • Irr-unary-info
                • Irr-tyname-info
                • Valid-scope-list
                • Irr-linkage
                • Irr-lifetime
              • Output-files
              • Concrete-syntax
              • Unambiguity
              • Ascii-identifiers
              • Preprocessing
              • Abstract-syntax
              • Implementation-environments
              • Standard
              • Gcc-builtins
              • Code-ensembles
              • Purity
            • Atc
            • Language
            • Transformation-tools
            • Representation
            • Insertion-sort
            • Pack
          • Bv
          • Imp-language
          • Event-macros
          • Java
          • Riscv
          • Ethereum
          • Bitcoin
          • Zcash
          • Yul
          • 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
    • Binary-info

    Binary-info-fix

    Fixing function for binary-info structures.

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

    Definitions and Theorems

    Function: binary-info-fix$inline

    (defun binary-info-fix$inline (x)
      (declare (xargs :guard (binary-infop x)))
      (let ((__function__ 'binary-info-fix))
        (declare (ignorable __function__))
        (mbe :logic
             (b* ((type (type-fix (cdr (std::da-nth 0 x))))
                  (table (valid-table-fix (cdr (std::da-nth 1 x)))
    ))
               (list (cons 'type type)
                     (cons 'table table)))
             :exec x)))

    Theorem: binary-infop-of-binary-info-fix

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

    Theorem: binary-info-fix-when-binary-infop

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

    Function: binary-info-equiv$inline

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

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

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

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

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

    Theorem: binary-info-fix-under-binary-info-equiv

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

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

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

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

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

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

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

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

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