set_list_thm_database: {{Aux_thms: thm list, Fold_thms: thm list}} -> unitA call set_list_thm_database{{Fold_thms=fold_thms,Aux_thms=aux_thms}} replaces the existing database with the theorems given as the arguments. The Fold_thms field of the record contains the new fold definitions. The Aux_thms field contains the new auxiliary theorems. Theorems which do not have an appropriate form will be ignored.
The following is an example of a fold definition in the database:
|- !l. SUM l = FOLDR $+ 0 l
The following is an example of an auxiliary theorem:
|- MONOID $+ 0
set_list_thm_database
{{Fold_thms = [theorem "list" "SUM_FOLDR"],
Aux_thms = [theorem "arithmetic" "MONOID_ADD_0"]}};
- val MULTL = new_definition("MULTL",(--`MULTL l = FOLDR $* 1 l`--));
val MULTL = |- !l. MULTL l = FOLDR $* 1 l : thm
- let val {{Fold_thms = fold_thms, Aux_thms = aux_thms}} = list_thm_database()
= in
= set_list_thm_database{{Fold_thms = MULTL::fold_thms,Aux_thms = aux_thms}}
= end;
val it = () : unit
- LIST_CONV (--`MULTL (CONS x l)`--);
|- MULTL (CONS x l) = x * MULTL l