new_type_definition : string * thm -> thm

SYNOPSIS
Defines a new type constant or type operator.

DESCRIBE
The ML function new_type_definition implements the primitive HOL rule of definition for introducing new type constants or type operators into the logic. If t is a term of type ty->bool containing n distinct type variables, then evaluating:
   new_type_definition (tyop, |- ?x. t x)
results in tyop being declared as a new n-ary type operator in the current theory and returned by the call to new_type_definition. This new type operator is characterized by a definitional axiom of the form:
   |- ?rep:('a,...,'n)op->tyop. TYPE_DEFINITION t rep
which is stored as a definition in the current theory segment under the automatically-generated name op_TY_DEF. The constant TYPE_DEFINITION in this axiomatic characterization of tyop is defined by:
   |- TYPE_DEFINITION (P:'a->bool) (rep:'b->'a) =
         (!x' x''. (rep x' = rep x'') ==> (x' = x'')) /\
         (!x. P x = (?x'. x = rep x'))
Thus |- ?rep. TYPE_DEFINITION P rep asserts that there is a bijection between the newly defined type ('a,...,'n)tyop and the set of values of type ty that satisfy P.

FAILURE
Executing new_type_definition(tyop,th) fails if th is not an assumption-free theorem of the form |- ?x. t x. Failure also occurs if the type of t is not of the form ty->bool.

SEEALSO  define_new_type_bijections,   prove_abs_fn_one_one,   prove_abs_fn_onto,   prove_rep_fn_one_one,   prove_rep_fn_onto

HOL  Kananaskis 0