|     26     HOLogic.mk_Collect ("a", @{typ atom}, HOLogic.mk_eq (mk_sort_of a, s)) |     26     HOLogic.mk_Collect ("a", @{typ atom}, HOLogic.mk_eq (mk_sort_of a, s)) | 
|     27   end |     27   end | 
|     28  |     28  | 
|     29 fun add_atom_decl (name : binding, arg : binding option) (thy : theory) = |     29 fun add_atom_decl (name : binding, arg : binding option) (thy : theory) = | 
|     30   let |     30   let | 
|     31     val _ = Theory.requires thy (Context.theory_name @{theory}) "nominal logic"; |         | 
|     32     val str = Sign.full_name thy name; |     31     val str = Sign.full_name thy name; | 
|     33  |     32  | 
|     34     (* typedef *) |     33     (* typedef *) | 
|     35     val set = atom_decl_set str; |     34     val set = atom_decl_set str; | 
|     36     val tac = rtac @{thm exists_eq_simple_sort} 1; |     35     fun tac _ = rtac @{thm exists_eq_simple_sort} 1; | 
|     37     val ((full_tname, info  as ({Rep_name, Abs_name, ...}, {type_definition, ...})), thy) = |     36     val ((full_tname, info as ({Rep_name, Abs_name, ...}, {type_definition, ...})), thy) = | 
|     38       Typedef.add_typedef_global (name, [], NoSyn) set NONE tac thy; |     37       Typedef.add_typedef_global false (name, [], NoSyn) set NONE tac thy; | 
|     39  |     38  | 
|     40     (* definition of atom and permute *) |     39     (* definition of atom and permute *) | 
|     41     val newT = #abs_type (fst info); |     40     val newT = #abs_type (fst info); | 
|     42     val RepC = Const (Rep_name, newT --> @{typ atom}); |     41     val RepC = Const (Rep_name, newT --> @{typ atom}); | 
|     43     val AbsC = Const (Abs_name, @{typ atom} --> newT); |     42     val AbsC = Const (Abs_name, @{typ atom} --> newT); |