• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Fty-extensions
        • Isar
          • Defisar
            • Defisar-implementation
              • Keyword-fact-info-alistp
              • Defisar-assume
              • Defisar-derive
              • Defisar-commands
              • Fact-infop
              • Defisar-qed
                • Defisar-let
                • Defisar-derive-thm-hyps
                • Defisar-proof
                • Defisar-fn
                • Fact-info-listp
                • Fact-info-list->thm-name-list
                • Defisar-formula-to-hyps+concl
                • Defisar-macro-definition-synonym
                • Defisar-macro-definition
          • Kestrel-utilities
          • Set
          • Soft
          • C
          • Bv
          • Imp-language
          • Event-macros
          • Java
          • Bitcoin
          • Ethereum
          • Yul
          • Zcash
          • ACL2-programming-language
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Lists-light
          • Axe
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Defisar-implementation

    Defisar-qed

    Execute the :qed command.

    Signature
    (defisar-qed name formula events facts disable rule-classes) 
      → 
    new-events
    Arguments
    name — Guard (symbolp name).
    events — Guard (pseudo-event-form-listp events).
    facts — Guard (keyword-fact-info-alistp facts).
    disable — Guard (booleanp disable).
    Returns
    new-events — Type (pseudo-event-form-listp new-events), given (pseudo-event-form-listp events).

    Definitions and Theorems

    Function: defisar-qed

    (defun defisar-qed (name formula
                             events facts disable rule-classes)
     (declare (xargs :guard (and (symbolp name)
                                 (pseudo-event-form-listp events)
                                 (keyword-fact-info-alistp facts)
                                 (booleanp disable))))
     (let ((__function__ 'defisar-qed))
      (declare (ignorable __function__))
      (b*
       ((fact-infos (strip-cdrs facts))
        (fact-thm-names (fact-info-list->thm-name-list fact-infos))
        (hints
            (cons (cons '"Goal"
                        (cons ':in-theory
                              (cons 'nil
                                    (cons ':use
                                          (cons fact-thm-names 'nil)))))
                  'nil))
        (defthm/defthmd (if disable 'defthmd 'defthm))
        (local-thm
         (cons
          'local
          (cons
           (cons
            defthm/defthmd
            (cons name
                  (cons formula
                        (cons ':hints
                              (cons hints
                                    (cons ':rule-classes
                                          (cons rule-classes 'nil)))))))
           'nil)))
        (local-thm (restore-output local-thm))
        (exported-thm
             (cons defthm/defthmd
                   (cons name
                         (cons formula
                               (cons ':rule-classes
                                     (cons rule-classes 'nil))))))
        (print-event
             '(cw-event "~%~%~%~s0~%~x1~%~%"
                        "****************************************"
                        '(:qed)))
        (events (list* exported-thm
                       local-thm print-event events)))
       events)))

    Theorem: pseudo-event-form-listp-of-defisar-qed

    (defthm pseudo-event-form-listp-of-defisar-qed
     (implies
      (pseudo-event-form-listp events)
      (b* ((new-events (defisar-qed name formula
                                    events facts disable rule-classes)))
        (pseudo-event-form-listp new-events)))
     :rule-classes :rewrite)