• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • C
        • Syntax-for-tools
        • Atc
        • Transformation-tools
          • Simpadd0
          • Proof-generation
          • Split-gso
          • Wrap-fn
          • Constant-propagation
          • Specialize
          • Split-fn
          • Split-fn-when
          • Split-all-gso
          • Copy-fn
          • Variables-in-computation-states
          • Rename
          • Utilities
          • Proof-generation-theorems
          • Input-processing
            • Process-const-old
            • Process-const-new
          • Language
          • Representation
          • Insertion-sort
          • Pack
        • 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
        • 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
    • Input-processing

    Process-const-new

    Process the :const-new input of a transformation.

    Signature
    (process-const-new const-new suppliedp) → (mv erp const-new)
    Arguments
    suppliedp — Guard (booleanp suppliedp).
    Returns
    const-new — Type (symbolp const-new).

    We check that the input was supplied and that it is a symbol. For now we do not check that it is a fresh constant name not already present in the world, but we may extend this function to do that. We return the input unchanged if successful, but with a stronger type provided by the return theorem.

    Definitions and Theorems

    Function: process-const-new

    (defun process-const-new (const-new suppliedp)
     (declare (xargs :guard (booleanp suppliedp)))
     (let ((__function__ 'process-const-new))
      (declare (ignorable __function__))
      (b*
       (((reterr) nil)
        ((unless suppliedp)
         (reterr (msg "The :CONST-NEW input must be supplied.")))
        ((unless (symbolp const-new))
         (reterr
          (msg
           "The :CONST-NEW must be a symbol, ~
                          but it is ~x0 instead."
           const-new))))
       (retok const-new))))

    Theorem: symbolp-of-process-const-new.const-new

    (defthm symbolp-of-process-const-new.const-new
      (b* (((mv acl2::?erp ?const-new)
            (process-const-new const-new suppliedp)))
        (symbolp const-new))
      :rule-classes :rewrite)