• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • Proof-checker-array
      • Soft
      • C
      • Farray
      • Rp-rewriter
      • Riscv
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • Java
      • Taspi
      • Bitcoin
      • Des
      • Ethereum
      • X86isa
      • Sha-2
      • Yul
      • Zcash
      • Proof-checker-itp13
      • Regex
      • ACL2-programming-language
        • Primitive-functions
        • Translated-terms
        • Values
          • Value
          • 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
        • Poseidon
        • Where-do-i-place-my-book
        • Axe
        • Aleo
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Community
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Values

    Lower-value

    Lower a meta-level value to an ACL2 good value.

    Signature
    (lower-value xval) → x
    Arguments
    xval — Guard (valuep xval).
    Returns
    x — Type (good-valuep x).

    This is the inverse of lift-value.

    Definitions and Theorems

    Function: lower-value

    (defun lower-value (xval)
      (declare (xargs :guard (valuep xval)))
      (let ((__function__ 'lower-value))
        (declare (ignorable __function__))
        (value-case xval
                    :number (value-number->get xval)
                    :character (value-character->get xval)
                    :string (value-string->get xval)
                    :symbol (lower-symbol (value-symbol->get xval))
                    :cons (cons (lower-value (value-cons->car xval))
                                (lower-value (value-cons->cdr xval))))))

    Theorem: good-valuep-of-lower-value

    (defthm good-valuep-of-lower-value
      (b* ((x (lower-value xval)))
        (good-valuep x))
      :rule-classes :rewrite)

    Theorem: lower-value-of-value-fix-xval

    (defthm lower-value-of-value-fix-xval
      (equal (lower-value (value-fix xval))
             (lower-value xval)))

    Theorem: lower-value-value-equiv-congruence-on-xval

    (defthm lower-value-value-equiv-congruence-on-xval
      (implies (value-equiv xval xval-equiv)
               (equal (lower-value xval)
                      (lower-value xval-equiv)))
      :rule-classes :congruence)