• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
        • Deftreeops
        • Defdefparse
        • Defgrammar
        • Tree-utilities
        • Notation
          • Syntax-abstraction
          • Semantics
            • Tree-terminatedp
            • Tree->string
            • String-has-finite-parse-trees-p
            • Parse-trees-of-string-p
            • Tree-match-element-p
            • Parse-treep
            • Symbol
            • String-unambiguousp
            • Tree-match-num-val-p
            • Nat-match-insensitive-char-p
            • Nats-match-insensitive-chars-p
            • Tree-option
            • String-parsablep
            • Lookup-rulename
            • Nats-match-sensitive-chars-p
            • Numrep-match-repeat-range-p
            • Tree-match-char-val-p
            • Tree-list-match-repetition-p
            • String-ambiguousp
            • Parse
            • Tree-match-prose-val-p
            • Nat-match-sensitive-char-p
            • Theorems-about-terminated-trees-matching-elements
            • Tree-option-result
            • Tree-list-result
            • Tree-list-list-result
            • Tree-result
              • Tree-resultp
              • Tree-result-fix
              • Tree-result-equiv
                • Tree-result-ok
                • Tree-result-err
                • Tree-result-kind
              • Tree-list-list-match-concatenation-p
              • Languagep
              • Terminal-string-for-rules-p
              • Tree-list-list-match-alternation-p
              • Tree-list-match-element-p
              • Parse!
              • String
              • Tree-set
              • Trees
            • Abstract-syntax
            • Core-rules
            • Concrete-syntax
          • Grammar-parser
          • Meta-circular-validation
          • Parsing-primitives-defresult
          • Parsing-primitives-seq
          • Operations
          • Examples
          • Differences-with-paper
          • Constructor-utilities
          • Grammar-printer
          • Parsing-tools
        • 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
        • 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
    • Tree-result

    Tree-result-equiv

    Basic equivalence relation for tree-result structures.

    Definitions and Theorems

    Function: tree-result-equiv$inline

    (defun tree-result-equiv$inline (acl2::x acl2::y)
      (declare (xargs :guard (and (tree-resultp acl2::x)
                                  (tree-resultp acl2::y))))
      (equal (tree-result-fix acl2::x)
             (tree-result-fix acl2::y)))

    Theorem: tree-result-equiv-is-an-equivalence

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

    Theorem: tree-result-equiv-implies-equal-tree-result-fix-1

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

    Theorem: tree-result-fix-under-tree-result-equiv

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

    Theorem: equal-of-tree-result-fix-1-forward-to-tree-result-equiv

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

    Theorem: equal-of-tree-result-fix-2-forward-to-tree-result-equiv

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

    Theorem: tree-result-equiv-of-tree-result-fix-1-forward

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

    Theorem: tree-result-equiv-of-tree-result-fix-2-forward

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