equal
deleted
inserted
replaced
157 |
157 |
158 |
158 |
159 (* add *) |
159 (* add *) |
160 |
160 |
161 fun add b rough_classification terms rules lthy = |
161 fun add b rough_classification terms rules lthy = |
162 let |
162 let val thms0 = map Thm.trim_context (map (Drule.mk_term o Thm.cterm_of lthy) terms @ rules) in |
163 val pos = Position.thread_data (); |
|
164 val thms0 = map Thm.trim_context (map (Drule.mk_term o Thm.cterm_of lthy) terms @ rules); |
|
165 in |
|
166 lthy |> Local_Theory.declaration {syntax = false, pervasive = true} |
163 lthy |> Local_Theory.declaration {syntax = false, pervasive = true} |
167 (fn phi => fn context => |
164 (fn phi => fn context => |
168 let |
165 let |
|
166 val pos = Position.thread_data (); |
169 val name = Name_Space.full_name (Name_Space.naming_of context) (Morphism.binding phi b); |
167 val name = Name_Space.full_name (Name_Space.naming_of context) (Morphism.binding phi b); |
170 val (terms', rules') = |
168 val (terms', rules') = |
171 map (Thm.transfer (Context.theory_of context)) thms0 |
169 map (Thm.transfer (Context.theory_of context)) thms0 |
172 |> Morphism.fact phi |
170 |> Morphism.fact phi |
173 |> chop (length terms) |
171 |> chop (length terms) |