• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Pfcs
      • Wp-gen
      • Dimacs-reader
      • Legacy-defrstobj
      • Proof-checker-array
      • Soft
      • C
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
        • Semantics
        • Abstract-syntax
          • Aexp
            • Aexp-case
            • Aexp-fix
            • Aexpp
            • Aexp-count
            • Aexp-equiv
            • Aexp-mul
            • Aexp-add
              • Make-aexp-add
              • Aexp-add->right
                • Aexp-add->left
                • Change-aexp-add
              • Aexp-var
              • Aexp-const
              • Aexp-kind
            • Bexp
            • 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
    • Aexp-add

    Aexp-add->right

    Get the right field from a aexp-add.

    Signature
    (aexp-add->right x) → right
    Arguments
    x — Guard (aexpp x).
    Returns
    right — Type (aexpp right).

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

    Definitions and Theorems

    Function: aexp-add->right$inline

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

    Theorem: aexpp-of-aexp-add->right

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

    Theorem: aexp-add->right$inline-of-aexp-fix-x

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

    Theorem: aexp-add->right$inline-aexp-equiv-congruence-on-x

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

    Theorem: aexp-add->right-when-wrong-kind

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