equal
deleted
inserted
replaced
170 |
170 |
171 fun def' constname rhs thy = |
171 fun def' constname rhs thy = |
172 let |
172 let |
173 val rhs = term_of rhs |
173 val rhs = term_of rhs |
174 val typ = type_of rhs |
174 val typ = type_of rhs |
175 val thy1 = Sign.add_consts_i [(Binding.name constname, typ, NoSyn)] thy |
175 val thy1 = Sign.add_consts [(Binding.name constname, typ, NoSyn)] thy |
176 val eq = Logic.mk_equals (Const (Sign.intern_const thy1 constname, typ), rhs) |
176 val eq = Logic.mk_equals (Const (Sign.intern_const thy1 constname, typ), rhs) |
177 val (thms, thy2) = Global_Theory.add_defs false |
177 val (thms, thy2) = Global_Theory.add_defs false |
178 [((Binding.suffix_name "_hldef" (Binding.name constname), eq), [])] thy1 |
178 [((Binding.suffix_name "_hldef" (Binding.name constname), eq), [])] thy1 |
179 val def_thm = freezeT (hd thms) |
179 val def_thm = freezeT (hd thms) |
180 in |
180 in |