• 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
      • Taspi
      • Bitcoin
      • Riscv
      • Des
      • Ethereum
      • X86isa
      • Sha-2
      • Yul
        • Transformations
        • Language
          • Abstract-syntax
            • Escape
            • Swcase-list->value-list
            • Hex-digit-list->chars
            • Fundef-list->name-list
            • Literal
            • Path
            • Hex-string-rest-element
            • Plain-string
            • String-element
            • Hex-string-content-option
            • Hex-string-content
            • Identifier
            • Funcall-option
            • Expression-option
            • Statement-option
            • Literal-option
            • Identifier-option
              • Identifier-option-fix
              • Identifier-option-equiv
                • Identifier-option-case
                • Identifier-option-some
                • Identifier-option-none
                • Identifier-optionp
              • Hex-string
              • Hex-quad
              • Hex-digit
              • Hex-pair
              • Data-value
              • Data-item
              • Statements-to-fundefs
              • String-element-list-result
              • Identifier-identifier-map-result
              • Swcase-result
              • String-element-result
              • Statement-result
              • Literal-result
              • Identifier-set-result
              • Identifier-result
              • Identifier-list-result
              • Fundef-result
              • Funcall-result
              • Expression-result
              • Escape-result
              • Path-result
              • Block-result
              • Objects
              • Statements/blocks/cases/fundefs
              • Identifier-list
              • Identifier-set
              • Identifier-identifier-map
              • Identifier-identifier-alist
              • Hex-string-rest-element-list
              • String-element-list
              • Path-list
              • Hex-digit-list
              • Literal-list
              • Fundef-list
              • Expressions/funcalls
              • Abstract-syntax-induction-schemas
            • Dynamic-semantics
            • Concrete-syntax
            • Static-soundness
            • Static-semantics
            • Errors
          • Yul-json
        • Zcash
        • Proof-checker-itp13
        • Regex
        • ACL2-programming-language
        • Json
        • Jfkr
        • Equational
        • Cryptography
        • Poseidon
        • Where-do-i-place-my-book
        • Axe
        • Bigmems
        • Builtins
        • Execloader
        • Aleo
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Identifier-option

    Identifier-option-equiv

    Basic equivalence relation for identifier-option structures.

    Definitions and Theorems

    Function: identifier-option-equiv$inline

    (defun identifier-option-equiv$inline (acl2::x acl2::y)
      (declare (xargs :guard (and (identifier-optionp acl2::x)
                                  (identifier-optionp acl2::y))))
      (equal (identifier-option-fix acl2::x)
             (identifier-option-fix acl2::y)))

    Theorem: identifier-option-equiv-is-an-equivalence

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

    Theorem: identifier-option-equiv-implies-equal-identifier-option-fix-1

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

    Theorem: identifier-option-fix-under-identifier-option-equiv

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

    Theorem: equal-of-identifier-option-fix-1-forward-to-identifier-option-equiv

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

    Theorem: equal-of-identifier-option-fix-2-forward-to-identifier-option-equiv

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

    Theorem: identifier-option-equiv-of-identifier-option-fix-1-forward

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

    Theorem: identifier-option-equiv-of-identifier-option-fix-2-forward

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