• 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
            • Schemalg-implementation
              • Schemalg-event-generation
                • Schemalg-gen-everything
                • Schemalg-gen-x-z1...zm
                • Schemalg-gen-old-if-new
                • Schemalg-gen-equal-algo
                • Schemalg-gen-algo-divconq-list-0-1-2
                • Schemalg-gen-algo-correct-divconq-list-0-1-2
                • Schemalg-gen-algo-correct-divconq-list-0-1
                • Schemalg-gen-spec-2
                • Schemalg-gen-algo-correct-divconq-oset-0-1
                • Schemalg-gen-algo-correct
                  • Schemalg-gen-algo-divconq-oset-0-1
                  • Schemalg-gen-spec-1-divconq-oset-0-1
                  • Schemalg-gen-spec-1-divconq-list-0-1
                  • Schemalg-gen-algo-divconq-list-0-1
                  • Schemalg-gen-algo
                  • Schemalg-gen-spec-1
                  • Schemalg-gen-spec-1-divconq-list-0-1-2
                  • Schemalg-gen-spec-0
                  • Schemalg-gen-spec-0-divconq-oset-0-1
                  • Schemalg-gen-spec-0-divconq-list-0-1-2
                  • Schemalg-gen-spec-0-divconq-list-0-1
                  • Schemalg-gen-new
                  • Schemalg-gen-?f1...?fp
                  • Schemalg-gen-x-z1...zm-aux
                • Schemalg-fn
                • Schemalg-macro-definition
                • Schemalg-input-processing
              • Schemalg-divconq-oset-0-1
              • Schemalg-divconq-list-0-1
            • Restrict
            • Expdata
            • Casesplit
            • Simplify-term
            • Simplify-defun-sk
            • Parteval
            • 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
    • Schemalg-event-generation

    Schemalg-gen-algo-correct

    Generate a local theorem asserting the correctness of algo[?f1]...[?fp].

    Signature
    (schemalg-gen-algo-correct schema x-x1...xn 
                               x-a1...am x y iorel algo spec-0 
                               spec-1 spec-2 names-to-avoid wrld) 
     
      → 
    (mv event name updated-names-to-avoid)
    Arguments
    schema — Guard (keywordp schema).
    x-x1...xn — Guard (symbol-listp x-x1...xn).
    x-a1...am — Guard (symbol-listp x-a1...am).
    x — Guard (symbolp x).
    y — Guard (symbolp y).
    iorel — Guard (pseudo-lambdap iorel).
    algo — Guard (symbolp algo).
    spec-0 — Guard (symbolp spec-0).
    spec-1 — Guard (symbolp spec-1).
    spec-2 — Guard (symbolp spec-2).
    names-to-avoid — Guard (symbol-listp names-to-avoid).
    wrld — Guard (plist-worldp wrld).
    Returns
    event — A pseudo-event-formp.
    name — A symbolp.
    updated-names-to-avoid — A symbol-listp.

    This is the theorem \mathit{COR} in the design notes. It is not described in the user documentation, because it is generated only locally.

    Definitions and Theorems

    Function: schemalg-gen-algo-correct

    (defun schemalg-gen-algo-correct
           (schema x-x1...xn
                   x-a1...am x y iorel algo spec-0
                   spec-1 spec-2 names-to-avoid wrld)
     (declare (xargs :guard (and (keywordp schema)
                                 (symbol-listp x-x1...xn)
                                 (symbol-listp x-a1...am)
                                 (symbolp x)
                                 (symbolp y)
                                 (pseudo-lambdap iorel)
                                 (symbolp algo)
                                 (symbolp spec-0)
                                 (symbolp spec-1)
                                 (symbolp spec-2)
                                 (symbol-listp names-to-avoid)
                                 (plist-worldp wrld))))
     (let ((__function__ 'schemalg-gen-algo-correct))
      (declare (ignorable __function__))
      (case schema
        (:divconq-list-0-1 (schemalg-gen-algo-correct-divconq-list-0-1
                                x-x1...xn x-a1...am x y iorel
                                algo spec-0 spec-1 names-to-avoid wrld))
        (:divconq-list-0-1-2 (schemalg-gen-algo-correct-divconq-list-0-1-2
                                  x-x1...xn
                                  x-a1...am x y iorel algo spec-0
                                  spec-1 spec-2 names-to-avoid wrld))
        (:divconq-oset-0-1 (schemalg-gen-algo-correct-divconq-oset-0-1
                                x-x1...xn x-a1...am x y iorel
                                algo spec-0 spec-1 names-to-avoid wrld))
        (t (prog2$ (raise "Internal error: unknown schema ~x0."
                          schema)
                   (mv '(irrelevant)
                       nil names-to-avoid))))))