• 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
          • Language
            • Abstract-syntax
            • Integer-ranges
            • Implementation-environments
            • Dynamic-semantics
            • Static-semantics
            • Grammar
            • Integer-formats
            • Types
            • Portable-ascii-identifiers
            • Values
              • Pointer
              • Member-types-of-member-values
              • Member-value-list->value-list
              • Member-value-list->name-list
              • Expr-value
                • Expr-value-fix
                  • Expr-value-equiv
                  • Expr-valuep
                  • Make-expr-value
                  • Expr-value->object
                  • Expr-value->value
                  • Change-expr-value
                • Type-list-of-value-list
                • Type-of-value
                • Value-option
                • Init-value
                • Value-result
                • Type-of-value-option
                • Value-list-result
                • Member-value-list-result
                • Init-value-result
                • Expr-value-result
                • Value-option-result
                • Signed/unsigned-byte-p-of-integer-values
                • Member-type-of-member-value
                • Bounds-of-integer-values
                • Value-promoted-arithmeticp
                • Init-type-of-init-value
                • Value-unsigned-integerp
                • Value-signed-integerp
                • Value-integerp
                • Value-arithmeticp
                • Value-scalarp
                • Value-realp
                • Values/membervalues
              • Integer-operations
              • Computation-states
              • Object-designators
              • Operations
              • Errors
              • Tag-environments
              • Function-environments
              • Character-sets
              • Flexible-array-member-removal
              • Arithmetic-operations
              • Pointer-operations
              • Bytes
              • Keywords
              • Real-operations
              • Array-operations
              • Scalar-operations
              • Structure-operations
            • 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
    • Expr-value

    Expr-value-fix

    Fixing function for expr-value structures.

    Signature
    (expr-value-fix x) → new-x
    Arguments
    x — Guard (expr-valuep x).
    Returns
    new-x — Type (expr-valuep new-x).

    Definitions and Theorems

    Function: expr-value-fix$inline

    (defun expr-value-fix$inline (x)
     (declare (xargs :guard (expr-valuep x)))
     (let ((__function__ 'expr-value-fix))
      (declare (ignorable __function__))
      (mbe :logic
           (b* ((value (value-fix (cdr (std::da-nth 0 x))))
                (object (objdesign-option-fix (cdr (std::da-nth 1 x)))))
             (list (cons 'value value)
                   (cons 'object object)))
           :exec x)))

    Theorem: expr-valuep-of-expr-value-fix

    (defthm expr-valuep-of-expr-value-fix
      (b* ((new-x (expr-value-fix$inline x)))
        (expr-valuep new-x))
      :rule-classes :rewrite)

    Theorem: expr-value-fix-when-expr-valuep

    (defthm expr-value-fix-when-expr-valuep
      (implies (expr-valuep x)
               (equal (expr-value-fix x) x)))

    Function: expr-value-equiv$inline

    (defun expr-value-equiv$inline (acl2::x acl2::y)
      (declare (xargs :guard (and (expr-valuep acl2::x)
                                  (expr-valuep acl2::y))))
      (equal (expr-value-fix acl2::x)
             (expr-value-fix acl2::y)))

    Theorem: expr-value-equiv-is-an-equivalence

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

    Theorem: expr-value-equiv-implies-equal-expr-value-fix-1

    (defthm expr-value-equiv-implies-equal-expr-value-fix-1
      (implies (expr-value-equiv acl2::x x-equiv)
               (equal (expr-value-fix acl2::x)
                      (expr-value-fix x-equiv)))
      :rule-classes (:congruence))

    Theorem: expr-value-fix-under-expr-value-equiv

    (defthm expr-value-fix-under-expr-value-equiv
      (expr-value-equiv (expr-value-fix acl2::x)
                        acl2::x)
      :rule-classes (:rewrite :rewrite-quoted-constant))

    Theorem: equal-of-expr-value-fix-1-forward-to-expr-value-equiv

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

    Theorem: equal-of-expr-value-fix-2-forward-to-expr-value-equiv

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

    Theorem: expr-value-equiv-of-expr-value-fix-1-forward

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

    Theorem: expr-value-equiv-of-expr-value-fix-2-forward

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