• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • C
      • Proof-checker-array
      • Soft
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Ethereum
      • Leftist-trees
      • Java
      • Riscv
      • Taspi
      • Bitcoin
      • Zcash
      • Des
      • X86isa
      • Sha-2
      • Yul
      • Proof-checker-itp13
      • Regex
      • ACL2-programming-language
        • Primitive-functions
        • Translated-terms
        • Values
          • Value
            • Valuep
            • Value-case
            • Value-fix
            • Value-equiv
            • Value-count
            • Value-cons
              • Make-value-cons
              • Value-cons->cdr
                • Value-cons->car
                • Change-value-cons
              • Value-symbol
              • Value-string
              • Value-number
              • Value-character
              • Value-kind
            • Symbol-value
            • Lower-symbol
            • Lift-symbol-list
            • Symbol-value-option
            • Value-option
            • Lift-value
            • Lift-symbol
            • Value-rational->get
            • Value-integer->get
            • Value-case-rational
            • Value-case-integer
            • Value-symbol-list
            • Lower-value
            • Value-list-of
            • Value-list
            • Symbol-value-list
            • Symbol-value-set
            • Value-t
            • Value-nil
          • Evaluation
          • Program-equivalence
          • Functions
          • Packages
          • Programs
          • Interpreter
          • Evaluation-states
        • Json
        • Jfkr
        • Equational
        • Cryptography
        • Axe
        • Poseidon
        • Where-do-i-place-my-book
        • Aleo
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Community
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Value-cons

    Value-cons->cdr

    Get the cdr field from a value-cons.

    Signature
    (value-cons->cdr x) → cdr
    Arguments
    x — Guard (valuep x).
    Returns
    cdr — Type (valuep cdr).

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

    Definitions and Theorems

    Function: value-cons->cdr$inline

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

    Theorem: valuep-of-value-cons->cdr

    (defthm valuep-of-value-cons->cdr
      (b* ((cdr (value-cons->cdr$inline x)))
        (valuep cdr))
      :rule-classes :rewrite)

    Theorem: value-cons->cdr$inline-of-value-fix-x

    (defthm value-cons->cdr$inline-of-value-fix-x
      (equal (value-cons->cdr$inline (value-fix x))
             (value-cons->cdr$inline x)))

    Theorem: value-cons->cdr$inline-value-equiv-congruence-on-x

    (defthm value-cons->cdr$inline-value-equiv-congruence-on-x
      (implies (value-equiv x x-equiv)
               (equal (value-cons->cdr$inline x)
                      (value-cons->cdr$inline x-equiv)))
      :rule-classes :congruence)

    Theorem: value-cons->cdr-when-wrong-kind

    (defthm value-cons->cdr-when-wrong-kind
      (implies (not (equal (value-kind x) :cons))
               (equal (value-cons->cdr x)
                      (value-fix nil))))