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
|
<html>
<head><title>ACL2-PC_colon__colon_DIVE.html -- ACL2 Version 3.1</title></head>
<body text=#000000 bgcolor="#FFFFFF">
<h3>ACL2-PC::DIVE</h3>(primitive)
<code> </code>move to the indicated subterm
<pre>Major Section: <a href="PROOF-CHECKER-COMMANDS.html">PROOF-CHECKER-COMMANDS</a>
</pre><p>
<pre>
Examples:
(DIVE 1) -- assign the new current subterm to be the first
argument of the existing current subterm
(DIVE 1 2) -- assign the new current subterm to be the result of
first taking the 1st argument of the existing
current subterm, and then the 2nd argument of that
</pre>
For example, if the current subterm is
<pre>
(* (+ a b) c),
</pre>
then after <code>(dive 1)</code> it is
<pre>
(+ a b).
</pre>
If after that, then <code>(dive 2)</code> is invoked, the new current subterm
will be
<pre>
b.
</pre>
Instead of <code>(dive 1)</code> followed by <code>(dive 2)</code>, the same current subterm
could be obtained by instead submitting the single instruction
<code>(dive 1 2)</code>.
<p>
<pre>
General Form:
(dive &rest naturals-list)
</pre>
If <code>naturals-list</code> is a non-empty list <code>(n_1 ... n_k)</code> of natural
numbers, let the new current subterm be the result of selecting the
<code>n_1</code>-st argument of the current subterm, and then the <code>n_2</code>-th subterm
of that, ..., finally the <code>n_k</code>-th subterm.<p>
<strong>Note:</strong> <code>Dive</code> is related to the command <code>pp</code>, in that the diving is done
according to raw (translated, internal form) syntax. Use the
command <code>dv</code> if you want to dive according to the syntax displayed by
the command <code>p</code>. Note that <code>(dv n)</code> can be abbreviated by simply <code>n</code>.
<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>
|