• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
      • Theories
      • Rule-classes
      • Proof-builder
      • Recursion-and-induction
      • Hons-and-memoization
      • Events
      • Parallelism
      • History
      • Programming
      • Operational-semantics
      • Real
      • Start-here
      • Debugging
      • Miscellaneous
        • Term
          • Lambda
          • Pseudo-termp
            • Pseudo-term-fty
              • Pseudo-term-lambda
              • Pseudo-term-call
              • Pseudo-term-fncall
              • Pseudo-lambda
              • Pseudo-term-var
              • Pseudo-term-quote
              • Pseudo-term-kind
                • Pseudo-fnsym
                • Pseudo-term-null
                • Pseudo-term-case
                • Pseudo-term-count
                • Def-ev-pseudo-term-fty-support
                • Def-ev-pseudo-term-congruence
                • Pseudo-term-fix
                • Pseudo-var
                • Pseudo-term-list-fix
                • Pseudo-fn
              • Std/typed-lists/pseudo-term-listp
            • Term-order
            • Pseudo-term-listp
            • Guard-holders
            • Termp
            • Termify
            • L<
            • Kwote
            • Kwote-lst
          • Ld
          • Hints
          • Type-set
          • Ordinals
          • Clause
          • ACL2-customization
          • With-prover-step-limit
          • Set-prover-step-limit
          • With-prover-time-limit
          • Local-incompatibility
          • Set-case-split-limitations
          • Subversive-recursions
          • Specious-simplification
          • Defsum
          • Gcl
          • Oracle-timelimit
          • Thm
          • Defopener
          • Case-split-limitations
          • Set-gc-strategy
          • Default-defun-mode
          • Top-level
          • Reader
          • Ttags-seen
          • Adviser
          • Ttree
          • Abort-soft
          • Defsums
          • Gc$
          • With-timeout
          • Coi-debug::fail
          • Expander
          • Gc-strategy
          • Coi-debug::assert
          • Sin-cos
          • Def::doc
          • Syntax
          • Subversive-inductions
        • Output-controls
        • Macros
        • Interfacing-tools
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Pseudo-term-fty

    Pseudo-term-kind

    Return the kind of a pseudo-term input (a keyword symbol).

    Signature
    (pseudo-term-kind x) → kind
    Arguments
    x — Guard (pseudo-termp x).
    Returns
    kind — Type (symbolp kind).

    Definitions and Theorems

    Function: pseudo-term-kind$inline

    (defun pseudo-term-kind$inline (x)
      (declare (xargs :guard (pseudo-termp x)))
      (let ((__function__ 'pseudo-term-kind))
        (declare (ignorable __function__))
        (b* ((x (pseudo-term-fix x))
             ((when (atom x)) (if x :var :null))
             (fn (car x))
             ((when (eq fn 'quote)) :quote)
             ((when (consp fn)) :lambda))
          :fncall)))

    Theorem: symbolp-of-pseudo-term-kind

    (defthm symbolp-of-pseudo-term-kind
      (b* ((kind (pseudo-term-kind$inline x)))
        (symbolp kind))
      :rule-classes :type-prescription)

    Theorem: pseudo-term-kind-possibilities

    (defthm pseudo-term-kind-possibilities
      (or (equal (pseudo-term-kind x) :null)
          (equal (pseudo-term-kind x) :var)
          (equal (pseudo-term-kind x) :quote)
          (equal (pseudo-term-kind x) :lambda)
          (equal (pseudo-term-kind x) :fncall))
      :rule-classes
      ((:forward-chaining :trigger-terms ((pseudo-term-kind x)))))

    Theorem: pseudo-term-kind$inline-of-pseudo-term-fix-x

    (defthm pseudo-term-kind$inline-of-pseudo-term-fix-x
      (equal (pseudo-term-kind$inline (pseudo-term-fix x))
             (pseudo-term-kind$inline x)))

    Theorem: pseudo-term-kind$inline-pseudo-term-equiv-congruence-on-x

    (defthm pseudo-term-kind$inline-pseudo-term-equiv-congruence-on-x
      (implies (pseudo-term-equiv x x-equiv)
               (equal (pseudo-term-kind$inline x)
                      (pseudo-term-kind$inline x-equiv)))
      :rule-classes :congruence)