• 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
              • Aexp-case
              • Aexp-fix
              • Aexpp
              • Aexp-count
              • Aexp-equiv
              • Aexp-mul
              • Aexp-add
              • Aexp-var
                • Make-aexp-var
                • Aexp-var->name
                  • Change-aexp-var
                • Aexp-const
                • Aexp-kind
              • Bexp
              • 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
    • Aexp-var

    Aexp-var->name

    Get the name field from a aexp-var.

    Signature
    (aexp-var->name x) → name
    Arguments
    x — Guard (aexpp x).
    Returns
    name — Type (stringp name).

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

    Definitions and Theorems

    Function: aexp-var->name$inline

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

    Theorem: stringp-of-aexp-var->name

    (defthm stringp-of-aexp-var->name
      (b* ((name (aexp-var->name$inline x)))
        (stringp name))
      :rule-classes :rewrite)

    Theorem: aexp-var->name$inline-of-aexp-fix-x

    (defthm aexp-var->name$inline-of-aexp-fix-x
      (equal (aexp-var->name$inline (aexp-fix x))
             (aexp-var->name$inline x)))

    Theorem: aexp-var->name$inline-aexp-equiv-congruence-on-x

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

    Theorem: aexp-var->name-when-wrong-kind

    (defthm aexp-var->name-when-wrong-kind
      (implies (not (equal (aexp-kind x) :var))
               (equal (aexp-var->name x)
                      (str-fix nil))))