• 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
        • Semantics
        • Abstract-syntax
          • Aexp
          • Bexp
            • Bexp-case
            • Bexp-fix
            • Bexpp
            • Bexp-count
            • Bexp-equiv
            • Bexp-less
            • Bexp-equal
            • Bexp-and
              • Make-bexp-and
              • Bexp-and->right
                • Bexp-and->left
                • Change-bexp-and
              • Bexp-const
              • Bexp-not
              • Bexp-kind
            • Comm
            • Comm-list
            • Command-fixtypes
          • Interpreter
        • Sidekick
        • Leftist-trees
        • Java
        • Taspi
        • Riscv
        • 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
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Community
      • Proof-automation
      • ACL2
      • Macro-libraries
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Bexp-and

    Bexp-and->right

    Get the right field from a bexp-and.

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

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

    Definitions and Theorems

    Function: bexp-and->right$inline

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

    Theorem: bexpp-of-bexp-and->right

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

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

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

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

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

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

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