export_theory : unit -> unit
If the current theory segment is named thy, then export_theory() will create ML files thyTheory.sig and thyTheory.sml, in the current directory at the time export_theory is invoked. These files need to be compiled before they become usable. In the standard way of doing things, the Holmake facility will handle this task.
Once a theory segment has been exported and compiled, it is available for use. It can be brought into an interactive proof session via
load "thyTheory";
When the segment is loaded, its parents, axioms, theorems, and definitions are incorporated into the current theory (recall that this notion is different than the current theory segment).
- save_thm("foo", REFL (Term `x:bool`)); > val it = |- x = x : thm - export_theory(); Exporting theory "scratch" ... done. > val it = () : unit