• 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
        • Bv
        • Imp-language
        • Event-macros
        • Java
        • Bitcoin
        • Ethereum
        • Yul
        • Zcash
        • ACL2-programming-language
          • Primitive-functions
          • Translated-terms
          • Values
            • Value
            • Symbol-value
              • Symbol-value-fix
                • Symbol-value-equiv
                • Symbol-valuep
                • Make-symbol-value
                • Symbol-value->package
                • Symbol-value->name
                • Change-symbol-value
              • Lower-symbol
              • Lift-symbol-list
              • Symbol-value-option
              • Value-option
              • Lift-value
              • Lift-symbol
              • Value-rational->get
              • Value-integer->get
              • Value-case-rational
              • Value-case-integer
              • Value-symbol-list
              • Lower-value
              • Value-list-of
              • Value-list
              • Symbol-value-list
              • Symbol-value-set
              • Value-t
              • Value-nil
            • Evaluation
            • Program-equivalence
            • Functions
            • Packages
            • Programs
            • Interpreter
            • Evaluation-states
          • 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
    • Symbol-value

    Symbol-value-fix

    Fixing function for symbol-value structures.

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

    Definitions and Theorems

    Function: symbol-value-fix$inline

    (defun symbol-value-fix$inline (x)
      (declare (xargs :guard (symbol-valuep x)))
      (let ((__function__ 'symbol-value-fix))
        (declare (ignorable __function__))
        (mbe :logic
             (b* ((package (str-fix (cdr (std::da-nth 0 x))))
                  (name (str-fix (cdr (std::da-nth 1 x)))))
               (list (cons 'package package)
                     (cons 'name name)))
             :exec x)))

    Theorem: symbol-valuep-of-symbol-value-fix

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

    Theorem: symbol-value-fix-when-symbol-valuep

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

    Function: symbol-value-equiv$inline

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

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

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

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

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

    Theorem: symbol-value-fix-under-symbol-value-equiv

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

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

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

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

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

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

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

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

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