• 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
                • Make-bexp-less
                • Bexp-less->right
                • Bexp-less->left
                  • Change-bexp-less
                • 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-less

    Bexp-less->left

    Get the left field from a bexp-less.

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

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

    Definitions and Theorems

    Function: bexp-less->left$inline

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

    Theorem: aexpp-of-bexp-less->left

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

    Theorem: bexp-less->left$inline-of-bexp-fix-x

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

    Theorem: bexp-less->left$inline-bexp-equiv-congruence-on-x

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

    Theorem: bexp-less->left-when-wrong-kind

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