• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • 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
        • C
        • Soft
        • Bv
        • Imp-language
          • Semantics
          • Abstract-syntax
            • Aexp
            • Bexp
              • Bexp-case
              • Bexp-fix
              • Bexpp
              • Bexp-count
              • Bexp-equiv
              • Bexp-less
              • Bexp-equal
                • Make-bexp-equal
                • Bexp-equal->right
                  • Bexp-equal->left
                  • Change-bexp-equal
                • Bexp-and
                • Bexp-const
                • Bexp-not
                • Bexp-kind
              • Comm
              • Comm-list
              • Command-fixtypes
            • Interpreter
          • Ethereum
          • Event-macros
          • Java
          • Riscv
          • Bitcoin
          • Zcash
          • Yul
          • ACL2-programming-language
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Axe
          • Lists-light
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Bexp-equal

    Bexp-equal->right

    Get the right field from a bexp-equal.

    Signature
    (bexp-equal->right x) → right
    Arguments
    x — Guard (bexpp x).
    Returns
    right — Type (aexpp right).

    This is an ordinary field accessor created by fty::defprod.

    Definitions and Theorems

    Function: bexp-equal->right$inline

    (defun bexp-equal->right$inline (x)
      (declare (xargs :guard (bexpp x)))
      (declare (xargs :guard (equal (bexp-kind x) :equal)))
      (let ((__function__ 'bexp-equal->right))
        (declare (ignorable __function__))
        (mbe :logic
             (b* ((x (and (equal (bexp-kind x) :equal) x)))
               (aexp-fix (std::da-nth 1 (cdr x))))
             :exec (std::da-nth 1 (cdr x)))))

    Theorem: aexpp-of-bexp-equal->right

    (defthm aexpp-of-bexp-equal->right
      (b* ((right (bexp-equal->right$inline x)))
        (aexpp right))
      :rule-classes :rewrite)

    Theorem: bexp-equal->right$inline-of-bexp-fix-x

    (defthm bexp-equal->right$inline-of-bexp-fix-x
      (equal (bexp-equal->right$inline (bexp-fix x))
             (bexp-equal->right$inline x)))

    Theorem: bexp-equal->right$inline-bexp-equiv-congruence-on-x

    (defthm bexp-equal->right$inline-bexp-equiv-congruence-on-x
      (implies (bexp-equiv x x-equiv)
               (equal (bexp-equal->right$inline x)
                      (bexp-equal->right$inline x-equiv)))
      :rule-classes :congruence)

    Theorem: bexp-equal->right-when-wrong-kind

    (defthm bexp-equal->right-when-wrong-kind
      (implies (not (equal (bexp-kind x) :equal))
               (equal (bexp-equal->right x)
                      (aexp-fix nil))))