File: new_definition.doc

package info (click to toggle)
hol-light 20120602-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 23,452 kB
  • sloc: ml: 348,797; cpp: 438; java: 279; makefile: 252; sh: 183; yacc: 108; perl: 78; ansic: 57; sed: 39
file content (48 lines) | stat: -rw-r--r-- 1,658 bytes parent folder | download | duplicates (4)
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
\DOC new_definition

\TYPE {new_definition : term -> thm}

\SYNOPSIS
Declare a new constant and a definitional axiom.

\DESCRIBE
The function {new_definition} provides a facility for definitional extensions.
It takes a term giving the desired definition.  The value returned by
{new_definition} is a theorem stating the definition requested by the user.

Let {v_1},...,{v_n} be tuples of distinct variables, containing the variables
{x_1,...,x_m}.  Evaluating {new_definition `c v_1 ... v_n = t`}, where {c} is a 
variable whose name is not already used as a constant, declares {c} to be a new
constant and returns the theorem: 
{
   |- !x_1 ... x_m. c v_1 ... v_n = t
}
Optionally, the definitional term argument may have any of its variables
universally quantified. 

\FAILURE
{new_definition} fails if {c} is already a constant or if the definition does
not have the right form.

\EXAMPLE
A NAND relation on signals indexed by `time' can be defined as follows.
{
  # new_definition
       `NAND2   (in_1,in_2) out <=> !t:num. out t <=> ~(in_1 t /\ in_2 t)`;;
  val it : thm =
    |- !out in_1 in_2.
           NAND2 (in_1,in_2) out <=> (!t. out t <=> ~(in_1 t /\ in_2 t))
}

\COMMENTS
Note that the conclusion of the theorem returned is essentially the same as the
term input by the user, except that {c} was a variable in the original term but 
is a constant in the returned theorem. The function {define} is significantly 
more flexible in the kinds of definition it allows, but for some purposes this 
more basic principle is fine.

\SEEALSO
define, new_basic_definition, new_inductive_definition,
new_recursive_definition, new_specification.

\ENDDOC