Added some more theorems to NominalData.
authorberghofe
Fri, 26 Sep 2008 14:52:27 +0200
changeset 28372 291e7a158e95
parent 28371 471a356fdea9
child 28373 5e2c526cfaf0
Added some more theorems to NominalData.
src/HOL/Nominal/nominal_atoms.ML
--- a/src/HOL/Nominal/nominal_atoms.ML	Fri Sep 26 14:51:27 2008 +0200
+++ b/src/HOL/Nominal/nominal_atoms.ML	Fri Sep 26 14:52:27 2008 +0200
@@ -11,6 +11,7 @@
   type atom_info
   val get_atom_infos : theory -> atom_info Symtab.table
   val get_atom_info : theory -> string -> atom_info option
+  val the_atom_info : theory -> string -> atom_info
   val atoms_of : theory -> string list
   val mk_permT : typ -> typ
 end
@@ -29,7 +30,10 @@
 type atom_info =
   {pt_class : string,
    fs_class : string,
-   cp_classes : (string * string) list};
+   cp_classes : (string * string) list,
+   at_inst : thm,
+   pt_inst : thm,
+   dj_thms : thm list};
 
 structure NominalData = TheoryDataFun
 (
@@ -40,14 +44,21 @@
   fun merge _ x = Symtab.merge (K true) x;
 );
 
-fun make_atom_info ((pt_class, fs_class), cp_classes) =
+fun make_atom_info (((((pt_class, fs_class), cp_classes), at_inst), pt_inst), dj_thms) =
   {pt_class = pt_class,
    fs_class = fs_class,
-   cp_classes = cp_classes};
+   cp_classes = cp_classes,
+   at_inst = at_inst,
+   pt_inst = pt_inst,
+   dj_thms = dj_thms};
 
 val get_atom_infos = NominalData.get;
 val get_atom_info = Symtab.lookup o NominalData.get;
 
+fun the_atom_info thy name = (case get_atom_info thy name of
+      SOME info => info
+    | NONE => error ("Unknown atom type " ^ quote name));
+
 fun atoms_of thy = map fst (Symtab.dest (NominalData.get thy));
 
 fun mk_permT T = HOLogic.listT (HOLogic.mk_prodT (T, T));
@@ -949,7 +960,9 @@
       NominalData.map (fold Symtab.update (full_ak_names ~~ map make_atom_info
         (pt_ax_classes ~~
          fs_ax_classes ~~
-         map (fn cls => full_ak_names ~~ cls) cp_ax_classes))) thy33
+         map (fn cls => full_ak_names ~~ cls) cp_ax_classes ~~
+         prm_cons_thms ~~ prm_inst_thms ~~
+         map flat dj_thms))) thy33
     end;