• 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
          • Syntax-for-tools
          • Atc
          • Transformation-tools
          • Language
            • Abstract-syntax
              • Tyspecseq
              • Expr
                • Exprp
                • Expr-case
                • Expr-binary
                • Expr-equiv
                • Expr-cond
                • Expr-unary
                • Expr-memberp
                • Expr-member
                • Expr-cast
                • Expr-call
                • Expr-arrsub
                • Expr-kind
                • Expr-const
                • Expr-preinc
                  • Make-expr-preinc
                  • Expr-preinc->arg
                    • Change-expr-preinc
                  • Expr-predec
                  • Expr-postinc
                  • Expr-postdec
                  • Expr-ident
                  • Expr-fix
                  • Expr-count
                • Binop
                • Fileset
                • Obj-declor
                • Abstract-syntax-operations
                • Iconst
                • Obj-adeclor
                • Const
                • Fundef
                • Unop
                • File
                • Tag-declon
                • Fun-declor
                • Obj-declon
                • Iconst-length
                • Label
                • Struct-declon
                • Initer
                • Ext-declon
                • Fun-adeclor
                • Expr-option
                • Iconst-base
                • Initer-option
                • Iconst-option
                • Tyspecseq-option
                • Stmt-option
                • Scspecseq
                • Param-declon
                • Obj-declon-option
                • File-option
                • Tyname
                • Transunit
                • Fun-declon
                • Transunit-result
                • Param-declon-list
                • Struct-declon-list
                • Expr-list
                • Tyspecseq-list
                • Identifiers
                • Ext-declon-list
                • Unop-list
                • Tyname-list
                • Fundef-list
                • Fun-declon-list
                • Binop-list
                • Stmt-fixtypes
                • Expr-fixtypes
                  • Expr
                    • Exprp
                    • Expr-case
                    • Expr-binary
                    • Expr-equiv
                    • Expr-cond
                    • Expr-unary
                    • Expr-memberp
                    • Expr-member
                    • Expr-cast
                    • Expr-call
                    • Expr-arrsub
                    • Expr-kind
                    • Expr-const
                    • Expr-preinc
                      • Make-expr-preinc
                      • Expr-preinc->arg
                        • Change-expr-preinc
                      • Expr-predec
                      • Expr-postinc
                      • Expr-postdec
                      • Expr-ident
                      • Expr-fix
                      • Expr-count
                    • Expr-list
                • Integer-ranges
                • Implementation-environments
                • Dynamic-semantics
                • Static-semantics
                • Grammar
                • Types
                • Integer-formats-definitions
                • Computation-states
                • Portable-ascii-identifiers
                • Values
                • Integer-operations
                • Object-designators
                • Operations
                • Errors
                • Tag-environments
                • Function-environments
                • Character-sets
                • Flexible-array-member-removal
                • Arithmetic-operations
                • Pointer-operations
                • Real-operations
                • Array-operations
                • Scalar-operations
                • Structure-operations
              • Representation
              • Insertion-sort
              • Pack
            • Soft
            • Bv
            • Imp-language
            • 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
      • Expr-preinc

      Expr-preinc->arg

      Get the arg field from a expr-preinc.

      Signature
      (expr-preinc->arg x) → arg
      Arguments
      x — Guard (exprp x).
      Returns
      arg — Type (exprp arg).

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

      Definitions and Theorems

      Function: expr-preinc->arg$inline

      (defun expr-preinc->arg$inline (x)
        (declare (xargs :guard (exprp x)))
        (declare (xargs :guard (equal (expr-kind x) :preinc)))
        (mbe :logic
             (b* ((x (and (equal (expr-kind x) :preinc) x)))
               (expr-fix (std::da-nth 0 (cdr x))))
             :exec (std::da-nth 0 (cdr x))))

      Theorem: exprp-of-expr-preinc->arg

      (defthm exprp-of-expr-preinc->arg
        (b* ((arg (expr-preinc->arg$inline x)))
          (exprp arg))
        :rule-classes :rewrite)

      Theorem: expr-preinc->arg$inline-of-expr-fix-x

      (defthm expr-preinc->arg$inline-of-expr-fix-x
        (equal (expr-preinc->arg$inline (expr-fix x))
               (expr-preinc->arg$inline x)))

      Theorem: expr-preinc->arg$inline-expr-equiv-congruence-on-x

      (defthm expr-preinc->arg$inline-expr-equiv-congruence-on-x
        (implies (expr-equiv x x-equiv)
                 (equal (expr-preinc->arg$inline x)
                        (expr-preinc->arg$inline x-equiv)))
        :rule-classes :congruence)

      Theorem: expr-preinc->arg-when-wrong-kind

      (defthm expr-preinc->arg-when-wrong-kind
        (implies (not (equal (expr-kind x) :preinc))
                 (equal (expr-preinc->arg x)
                        (expr-fix nil))))