• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • Proof-checker-array
      • Soft
      • C
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • Java
      • Riscv
      • Taspi
      • Bitcoin
      • Des
      • Ethereum
      • X86isa
      • Sha-2
      • Yul
      • Zcash
      • Proof-checker-itp13
      • Regex
      • ACL2-programming-language
      • Json
      • Jfkr
      • Equational
      • Cryptography
      • Poseidon
      • Where-do-i-place-my-book
      • Axe
      • Aleo
        • Aleobft
        • Aleovm
        • Leo
          • Grammar
          • Early-version
            • Json2ast
            • Testing
            • Definition
              • Flattening
              • Abstract-syntax
              • Dynamic-semantics
                • Execution
                • Values
                  • Int-valuep
                  • Value-option
                  • Type-of-value
                  • Value-option-result
                  • Value-list-result
                  • Name+value
                  • Value-result
                  • Make-int-value
                  • Type-map-of-value-map
                  • Name+type-of-name+value
                  • Int-value-bound-theorems
                  • Int-value-to-int
                  • Int-value-numbits
                  • Value/valuelist
                    • Value
                      • Valuep
                      • Value-case
                      • Value-equiv
                        • Value-struct
                        • Value-kind
                        • Value-u64
                        • Value-u32
                        • Value-u16
                        • Value-u128
                        • Value-tuple
                        • Value-string
                        • Value-i64
                        • Value-i32
                        • Value-i16
                        • Value-i128
                        • Value-bool
                        • Value-address
                        • Value-u8
                        • Value-scalar
                        • Value-i8
                        • Value-group
                        • Value-field
                        • Value-fix
                        • Value-count
                      • Value-list
                      • Value-map
                    • *most-positive-i8*
                    • *most-positive-i64*
                    • *most-positive-i32*
                    • *most-positive-i16*
                    • *most-positive-i128*
                    • *most-negative-i8*
                    • *most-negative-i64*
                    • *most-negative-i32*
                    • *most-negative-i16*
                    • *most-negative-i128*
                    • *greatest-u8*
                    • *greatest-u64*
                    • *greatest-u32*
                    • *greatest-u16*
                    • *greatest-u128*
                  • Dynamic-environments
                  • Arithmetic-operations
                  • Curve-parameterization
                  • Shift-operations
                  • Errors
                  • Value-expressions
                  • Locations
                  • Input-execution
                  • Edwards-bls12-generator
                  • Equality-operations
                  • Logical-operations
                  • Program-execution
                  • Ordering-operations
                  • Bitwise-operations
                  • Literal-evaluation
                  • Type-maps-for-struct-components
                  • Output-execution
                  • Tuple-operations
                  • Struct-operations
                • Compilation
                • Static-semantics
                • Concrete-syntax
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Community
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Value

    Value-equiv

    Basic equivalence relation for value structures.

    Definitions and Theorems

    Function: value-equiv$inline

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

    Theorem: value-equiv-is-an-equivalence

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

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

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

    Theorem: value-fix-under-value-equiv

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

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

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

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

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

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

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

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

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