• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
      • Theories
      • Rule-classes
      • Proof-builder
      • Recursion-and-induction
      • Hons-and-memoization
      • Events
      • Parallelism
      • History
      • Programming
      • Operational-semantics
      • Real
      • Start-here
      • Miscellaneous
        • Term
        • Ld
        • Hints
          • Lemma-instance
          • Computed-hints
          • Override-hints
          • Hints-and-the-waterfall
          • Goal-spec
          • Termination-theorem-example
          • Consideration
          • Hint-wrapper
          • Default-hints
          • Guard-theorem-example
          • Do-not-hint
          • Guard-theorem
          • Using-computed-hints
            • Using-computed-hints-7
            • Using-computed-hints-6
            • Using-computed-hints-4
            • Using-computed-hints-3
            • Using-computed-hints-2
            • Using-computed-hints-8
            • Using-computed-hints-5
            • Using-computed-hints-1
            • Termination-theorem
            • Custom-keyword-hints
            • Do-not
          • Type-set
          • Ordinals
          • Clause
          • With-prover-step-limit
          • ACL2-customization
          • Set-prover-step-limit
          • With-prover-time-limit
          • Local-incompatibility
          • Set-case-split-limitations
          • Subversive-recursions
          • Specious-simplification
          • Set-subgoal-loop-limits
          • Gcl
          • Defsum
          • Oracle-timelimit
          • Thm
          • Defopener
          • Case-split-limitations
          • Set-gc-strategy
          • Default-defun-mode
          • Top-level
          • Reader
          • Divp-by-casting
          • Ttags-seen
          • Adviser
          • Ttree
          • Abort-soft
          • Defsums
          • Gc$
          • With-timeout
          • Coi-debug::fail
          • Expander
          • Gc-strategy
          • Coi-debug::assert
          • Sin-cos
          • Majority-vote
          • Def::doc
          • Syntax
          • Subgoal-loop-limits
          • Subversive-inductions
        • Output-controls
        • Bdd
        • Macros
        • Installation
        • Mailing-lists
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Using-computed-hints

    Using-computed-hints-1

    Driving Home the Basics

    The common hint

    ("Subgoal 3.2.1''" :use lemma42)

    has the same effect as the computed hint

    (if (equal id '((0) (3 2 1) . 2))
        '(:use lemma42)
        nil)

    which, of course, is equivalent to

    (and (equal id '((0) (3 2 1) . 2))
         '(:use lemma42))

    which is also equivalent to the computed hint

    my-special-hint

    provided the following defun has first been executed

    (defun my-special-hint (id clause world)
      (declare (xargs :mode :program)
               (ignore clause world))
      (if (equal id '((0) (3 2 1) . 2))
          '(:use lemma42)
          nil))

    It is permitted for the defun to be in :LOGIC mode (see defun-mode) also.

    Just to be concrete, the following three events all behave the same way (if my-special-hint is as above):

    (defthm main (big-thm a b c)
      :hints (("Subgoal 3.2.1''" :use lemma42)))
    
    (defthm main (big-thm a b c)
      :hints ((and (equal id '((0) (3 2 1) . 2)) '(:use lemma42))))
    
    (defthm main (big-thm a b c)
      :hints (my-special-hint))