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
|
<html>
<head><title>The_Admission_of_App.html -- ACL2 Version 3.1</title></head>
<body text=#000000 bgcolor="#FFFFFF">
<h2>The Admission of App</h2>
<p>
Here is what it looks like to submit the definition of <code>app</code> to ACL2:<p>
<img src=green-line.gif><p>
<pre>
ACL2 !><b>(defun app (x y)</B>
<b>(cond ((endp x) y)</B>
<b>(t (cons (car x) </B>
<b>(app (cdr x) y)))))</B><p>
The admission of APP is trivial, using the relation O< (which
is known to be well-founded on the domain recognized by O-P)
and the measure (ACL2-COUNT X). We observe that the type of APP is
described by the theorem (OR (CONSP (APP X Y)) (EQUAL (APP X Y) Y)).
We used primitive type reasoning.<p>
Summary
Form: ( DEFUN APP ...)
Rules: ((:FAKE-RUNE-FOR-TYPE-SET NIL))
Warnings: None
Time: 0.03 seconds (prove: 0.00, print: 0.00, other: 0.03)
APP
</pre>
<p>
<img src=green-line.gif><p>
The text between the lines above is one interaction with the ACL2 command
loop.<p>
Above you see the user's <b>input</B> and how the system responds.
This little example shows you what the syntax looks like and is a
very typical <b>successful</B> interaction with the definitional
principle.<p>
Let's look at it a little more closely.<p>
<a href="Revisiting_the_Admission_of_App.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>
|