tis a ``symbol'' and 3 is an ``integer.'' Roughly speaking the objects of ACL2 can be partitioned into the following types:
3, -22/7, #c(3 5/2)Characters
#\A, #\a, #\SpaceStrings
"This is a string."Symbols
'abc, 'smith::abcConses (or Ordered Pairs)
'((a . 1) (b . 2))
When proving theorems it is important to know the types of object
returned by a term. ACL2 uses a complicated heuristic algorithm,
type-set , to determine what types of objects a
term may produce. The user can more or less program the
type-set algorithm by proving
ACL2 is an ``untyped'' logic in the sense that the syntax is not
typed: It is legal to apply a function symbol of n arguments to any
n terms, regardless of the types of the argument terms. Thus, it is
permitted to write such odd expressions as
(+ t 3) which sums the
t and the integer 3. Common Lisp does not prohibit such
expressions. We like untyped languages because they are simple to
describe, though proving theorems about them can be awkward because,
unless one is careful in the way one defines or states things,
unusual cases (like
(+ t 3)) can arise.
To make theorem proving easier in ACL2, the axioms actually define a
value for such terms. The value of
(+ t 3) is 3; under the ACL2
axioms, non-numeric arguments to
+ are treated as though they
You might immediately wonder about our claim that ACL2 is Common
(+ t 3) is ``an error'' (and will sometimes even
``signal an error'') in Common Lisp. It is to handle this problem that
ACL2 has guards. We will discuss guards later in the Walking Tour.
However, many new users simply ignore the issue of guards entirely.
You should now return to the Walking Tour.