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

    Defisar-commands

    Execute a sequence of commands.

    Signature
    (defisar-commands commands name formula hyps events facts 
                      bindings disable rule-classes ctx state) 
     
      → 
    (mv erp events state)
    Arguments
    commands — Guard (true-listp commands).
    name — Guard (symbolp name).
    hyps — Guard (true-listp hyps).
    events — Guard (pseudo-event-form-listp events).
    facts — Guard (keyword-fact-info-alistp facts).
    bindings — Guard (symbol-alistp bindings).
    disable — Guard (booleanp disable).
    Returns
    events — Type (pseudo-event-form-listp events), given (and (pseudo-event-form-listp events) (keyword-fact-info-alistp facts)) .

    Definitions and Theorems

    Function: defisar-commands

    (defun defisar-commands
           (commands name formula hyps events facts
                     bindings disable rule-classes ctx state)
     (declare (xargs :stobjs (state)))
     (declare (xargs :guard (and (true-listp commands)
                                 (symbolp name)
                                 (true-listp hyps)
                                 (pseudo-event-form-listp events)
                                 (keyword-fact-info-alistp facts)
                                 (symbol-alistp bindings)
                                 (booleanp disable))))
     (let ((__function__ 'defisar-commands))
      (declare (ignorable __function__))
      (b* (((when (endp commands))
            (value (cons '(cw-event "~%~%~%~s0~s1~s0~%"
                                    "!!!!!!!!!!!!!!!!!!!!"
                                    " The proof is partial (no :QED). ")
                         events)))
           (command (car commands))
           ((unless (and (true-listp command)
                         (consp command)))
            (er-soft+ ctx t nil
                      "Malformed proof command ~x0." command))
           (command-name (car command))
           ((unless (keywordp command-name))
            (er-soft+ ctx t nil
                      "Non-keyword proof command name ~x0."
                      command-name)))
       (case command-name
        (:assume
            (b* (((mv erp (list events facts) state)
                  (defisar-assume (cdr command)
                                  name
                                  hyps events facts bindings ctx state))
                 ((when erp) (mv erp nil state)))
              (defisar-commands (cdr commands)
                                name formula hyps events facts bindings
                                disable rule-classes ctx state)))
        (:let
             (b* (((mv erp bindings state)
                   (defisar-let (cdr command)
                                bindings ctx state))
                  ((when erp) (mv erp nil state)))
               (defisar-commands (cdr commands)
                                 name formula hyps events facts bindings
                                 disable rule-classes ctx state)))
        (:derive
            (b* (((mv erp (list events facts) state)
                  (defisar-derive (cdr command)
                                  name events facts bindings ctx state))
                 ((when erp) (mv erp nil state)))
              (defisar-commands (cdr commands)
                                name formula hyps events facts bindings
                                disable rule-classes ctx state)))
        (:qed
             (b* (((run-unless (endp (cdr commands)))
                   (cw "Commands ~x0 found after :QED."
                       (cdr commands))))
               (value (defisar-qed name formula
                                   events facts disable rule-classes))))
        (t (er-soft+ ctx t nil "Unrecognized command ~x0."
                     command-name))))))

    Theorem: pseudo-event-form-listp-of-defisar-commands.events

    (defthm pseudo-event-form-listp-of-defisar-commands.events
     (implies
         (and (pseudo-event-form-listp events)
              (keyword-fact-info-alistp facts))
         (b* (((mv ?erp ?events acl2::?state)
               (defisar-commands commands
                                 name formula hyps events facts bindings
                                 disable rule-classes ctx state)))
           (pseudo-event-form-listp events)))
     :rule-classes :rewrite)