• 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
          • Isodata
          • Simplify-defun
          • Tailrec
          • Schemalg
          • Restrict
          • Expdata
          • Casesplit
          • Simplify-term
          • Simplify-defun-sk
          • Parteval
            • Parteval-implementation
              • Parteval-event-generation
                • Parteval-gen-everything
                • Parteval-gen-new-fn
                • Parteval-gen-old-to-new-thm-instances
                • Parteval-gen-old-to-new-thm
                • Parteval-gen-new-fn-verify-guards
                  • Parteval-gen-new-fn-body
                  • Parteval-transform-rec-args
                  • Parteval-transform-rec-calls-in-term
                  • Parteval-gen-static-equalities
                • Parteval-fn
                • Parteval-input-processing
                • Parteval-macro-definition
            • Solve
            • Wrap-output
            • Propagate-iso
            • Simplify
            • Finite-difference
            • Drop-irrelevant-params
            • Copy-function
            • Lift-iso
            • Rename-params
            • Utilities
            • Simplify-term-programmatic
            • Simplify-defun-sk-programmatic
            • Simplify-defun-programmatic
            • Simplify-defun+
            • Common-options
            • Common-concepts
          • Error-checking
          • Fty-extensions
          • Isar
          • Kestrel-utilities
          • Set
          • C
          • 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
    • Parteval-event-generation

    Parteval-gen-new-fn-verify-guards

    Generate the event to verify the guards of the new function.

    Signature
    (parteval-gen-new-fn-verify-guards 
         old$ 
         static$ new-name$ thm-name$ case wrld) 
     
      → 
    local-event
    Arguments
    old$ — Guard (symbolp old$).
    static$ — Guard (symbol-alistp static$).
    new-name$ — Guard (symbolp new-name$).
    thm-name$ — Guard (symbolp thm-name$).
    case — Guard (member case '(1 2 3)).
    wrld — Guard (plist-worldp wrld).
    Returns
    local-event — A pseudo-event-formp.

    We instruct ACL2 not to simplify the guard conjecture, and accordingly to use the unsimplified guard theorem of old. This increases the robustness of the generated proof.

    Definitions and Theorems

    Function: parteval-gen-new-fn-verify-guards

    (defun parteval-gen-new-fn-verify-guards
           (old$ static$ new-name$ thm-name$ case wrld)
     (declare (xargs :guard (and (symbolp old$)
                                 (symbol-alistp static$)
                                 (symbolp new-name$)
                                 (symbolp thm-name$)
                                 (member case '(1 2 3))
                                 (plist-worldp wrld))))
     (let ((__function__ 'parteval-gen-new-fn-verify-guards))
      (declare (ignorable __function__))
      (b*
       ((guard-thm-instance
             (cons ':instance
                   (cons (cons ':guard-theorem
                               (cons old$ '(nil)))
                         (cons ':extra-bindings-ok
                               (alist-to-doublets static$)))))
        (old-to-new-instances? (and (= case 2)
                                    (parteval-gen-old-to-new-thm-instances
                                         (recursive-calls old$ wrld)
                                         old$ static$ thm-name$ wrld)))
        (hints
         (cons
              (cons '"Goal"
                    (cons ':in-theory
                          (cons 'nil
                                (cons ':use
                                      (cons (cons guard-thm-instance
                                                  old-to-new-instances?)
                                            'nil)))))
              'nil)))
       (cons
        'local
        (cons
           (cons 'verify-guards
                 (cons new-name$
                       (cons ':hints
                             (cons hints '(:guard-simplify :limited)))))
           'nil)))))