File: Rewrite_Rules_are_Generated_from_DEFTHM_Events.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 (42 lines) | stat: -rw-r--r-- 1,272 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
<html>
<head><title>Rewrite_Rules_are_Generated_from_DEFTHM_Events.html  --  ACL2 Version 3.1</title></head>
<body text=#000000 bgcolor="#FFFFFF">
<h2>Rewrite Rules are Generated from DEFTHM Events</h2>
<p>
By reading the documentation of <code><a href="DEFTHM.html">defthm</a></code> <a href="A_Tiny_Warning_Sign.html"><img src=twarning.gif></a> (and
especially of its :<a href="RULE-CLASSES.html">rule-classes</a> <a href="A_Tiny_Warning_Sign.html"><img src=twarning.gif></a> argument)
you would learn that
when we submitted the command

<pre>
<b>(defthm associativity-of-app</B>
  <b>(equal (app (app a b) c)</B>
         <b>(app a (app b c))))</B><p>

</pre>

we not only command the system to prove that <code>app</code> is an associative
function but

<pre>
  * <b>we commanded it to use that fact as a rewrite rule</B>.
</pre>
<p>

That means that every time the system encounters a term of the form

<pre>
(app (app <b>x</B> <b>y</B>) <b>z</B>)
</pre>

it will replace it with 

<pre>
(app <b>x</B> (app <b>y</B> <b>z</B>))!
</pre>
<p>

<a href="You_Must_Think_about_the_Use_of_a_Formula_as_a_Rule.html"><img src=walking.gif></a>
<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>