• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
      • Std/lists
      • Std/alists
      • Obags
      • Std/util
      • Std/strings
      • Std/osets
      • Std/io
      • Std/basic
      • Std/system
        • Fresh-logical-name-with-$s-suffix
        • Irrelevant-formals-info
        • Std/system/function-queries
          • Defun-sk-queries
          • Tail-recursive-p
          • Termination-theorem$
          • Unwrapped-nonexec-body+
          • Measure
            • Termination-theorem-example
            • Measure-debug
            • Make-termination-theorem
            • Termination-theorem
              • Make-termination-theorem
              • ACL2-pc::prove-termination
              • Tthm
            • Arity+
            • Ubody
            • Ruler-extenders+
            • Recursive-calls
            • Guard-theorem-no-simplify$
            • Well-founded-relation+
            • Unwrapped-nonexec-body
            • Measured-subset+
            • Ruler-extenders
            • Measure+
            • Number-of-results+
            • Induction-machine+
            • Non-executablep+
            • Pure-raw-p
            • Irecursivep+
            • Formals+
            • Stobjs-out+
            • Definedp+
            • Number-of-results
            • Induction-machine
            • Ubody+
            • Guard-theorem-no-simplify
            • Uguard
            • Rawp
            • Defchoose-queries
            • Uguard+
            • Stobjs-in+
            • No-stobjs-p+
            • Irecursivep
            • Well-founded-relation
            • Definedp
            • Guard-verified-p+
            • Primitivep+
            • No-stobjs-p
            • Measured-subset
            • Guard-verified-p
            • Primitivep
            • Non-executablep
            • Fundef-disabledp
            • Ibody
            • Fundef-enabledp
            • Std/system/arity
          • Std/system/term-queries
          • Std/system/term-transformations
          • Std/system/enhanced-utilities
          • Install-not-normalized-event
          • Install-not-normalized-event-lst
          • Std/system/term-function-recognizers
          • Genvar$
          • Std/system/event-name-queries
          • Pseudo-tests-and-call-listp
          • Maybe-pseudo-event-formp
          • Add-suffix-to-fn-or-const
          • Chk-irrelevant-formals-ok
          • Table-alist+
          • Pseudo-tests-and-callp
          • Add-suffix-to-fn-or-const-lst
          • Known-packages+
          • Add-suffix-to-fn-lst
          • Unquote-term
          • Event-landmark-names
          • Add-suffix-lst
          • Std/system/theorem-queries
          • Unquote-term-list
          • Std/system/macro-queries
          • Pseudo-command-landmark-listp
          • Install-not-normalized$
          • Pseudo-event-landmark-listp
          • Known-packages
          • Std/system/partition-rest-and-keyword-args
          • Rune-enabledp
          • Rune-disabledp
          • Included-books
          • Std/system/pseudo-event-formp
          • Std/system/plist-worldp-with-formals
          • Std/system/w
          • Std/system/geprops
          • Std/system/arglistp
          • Std/system/constant-queries
        • Std/typed-lists
        • Std/bitsets
        • Std/testing
        • Std/typed-alists
        • Std/stobjs
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Proof-builder-commands
    • Verify-termination
    • Termination-theorem

    ACL2-pc::prove-termination

    (macro) Prove termination efficiently by using a previous termination theorem.

    Example:
    (prove-termination f1 (disable h))
    
    Example of typical usage:
    (defun f2 (x)
      (declare
       (xargs :hints
              (("Goal"
                :instructions
                ((prove-termination
                  f1
                  (disable h)))))))
      (f2-body x))
    
    General Forms:
    (prove-termination fn)
    (prove-termination fn thy)
    (prove-termination fn thy alt-thy)
    (prove-termination fn thy alt-thy verbose)

    where fn is a known function symbol and thy and alt-thy, when supplied and non-nil, are theory expressions.

    This proof-builder macro attempts to prove a theorem, typically a termination proof obligation, by applying the hint :termination-theorem fn in a carefully controlled, efficient manner (using the :fancy-use proof-builder macro). This proof is attempted in the theory, thy, if supplied and non-nil, else in the current-theory. If that proof fails, then a single, ordinary prover call is made with that :use hint and in the following theory: alt-thy if supplied and non-nil, else thy if supplied and non-nil, else the current-theory. If the proof has not yet succeeded and the original theory is not nil or (current-theory :here), then a final proof is attempted in the same careful manner as the first proof attempt.

    Output is inhibited by default. However, if verbose is t then output is as specified by the enclosing environment; and if verbose is any other non-nil value, then output is mostly inhibited for that attempt by use of the proof-builder command, :quiet. In all of those non-nil cases for the verbose input, a little message will be started at the beginning of the second and third proof attempts, if any.

    For a few small examples, see community book kestrel/utilities/proof-builder-macros-tests.lisp.

    For a way to use lemma instances other than termination theorems, see ACL2-pc::fancy-use.

    Hacker tip: Invoke (trace$ acl2::pc-fancy-use-fn) to see the proof-builder instruction created when invoking prove-termination.