File: USING-COMPUTED-HINTS-1.html

package info (click to toggle)
acl2 3.1-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 36,712 kB
  • ctags: 38,396
  • sloc: lisp: 464,023; makefile: 5,470; sh: 86; csh: 47; cpp: 25; ansic: 22
file content (66 lines) | stat: -rw-r--r-- 1,509 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<html>
<head><title>USING-COMPUTED-HINTS-1.html  --  ACL2 Version 3.1</title></head>
<body text=#000000 bgcolor="#FFFFFF">
<h2>USING-COMPUTED-HINTS-1</h2>Driving Home the Basics
<pre>Major Section:  <a href="MISCELLANEOUS.html">MISCELLANEOUS</a>
</pre><p>
<p>
The common hint

<pre>
("Subgoal 3.2.1''" :use lemma42)
</pre>

has the same effect as the computed hint

<pre>
(if (equal id '((0) (3 2 1) . 2))
    '(:use lemma42)
    nil)
</pre>

which, of course, is equivalent to

<pre>
(and (equal id '((0) (3 2 1) . 2))
     '(:use lemma42))
</pre>

which is also equivalent to the computed hint

<pre>
my-special-hint
</pre>

provided the following <code>defun</code> has first been executed

<pre>
(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))
</pre>

It is permitted for the <code>defun</code> to be in :LOGIC mode
(see <a href="DEFUN-MODE.html">defun-mode</a>) also.<p>

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


<pre>
(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))))<p>

(defthm main (big-thm a b c)
  :hints (my-special-hint))
</pre>

<br><br><br><a href="acl2-doc.html"><img src="llogo.gif"></a> <a href="acl2-doc-index.html"><img src="index.gif"></a>
</body>
</html>