src/Pure/Isar/specification.ML
changeset 66251 cd935b7cb3fb
parent 66248 df85956228c2
child 69992 bd3c10813cc4
equal deleted inserted replaced
66250:56a87a5093be 66251:cd935b7cb3fb
   264 
   264 
   265     val th = prove lthy2 raw_th;
   265     val th = prove lthy2 raw_th;
   266     val lthy3 = lthy2 |> Spec_Rules.add Spec_Rules.Equational ([lhs], [th]);
   266     val lthy3 = lthy2 |> Spec_Rules.add Spec_Rules.Equational ([lhs], [th]);
   267 
   267 
   268     val ([(def_name, [th'])], lthy4) = lthy3
   268     val ([(def_name, [th'])], lthy4) = lthy3
   269       |> Local_Theory.notes [((name, Code.add_default_eqn_attrib Code.Equation :: atts), [([th], [])])];
   269       |> Local_Theory.notes [((name, atts), [([th], [])])];
   270 
   270 
   271     val lhs' = Morphism.term (Local_Theory.target_morphism lthy4) lhs;
   271     val lthy5 = lthy4
       
   272       |> Code.declare_default_eqns [(th', true)];
       
   273 
       
   274     val lhs' = Morphism.term (Local_Theory.target_morphism lthy5) lhs;
   272 
   275 
   273     val _ =
   276     val _ =
   274       Proof_Display.print_consts int (Position.thread_data ()) lthy4
   277       Proof_Display.print_consts int (Position.thread_data ()) lthy5
   275         (member (op =) (Term.add_frees lhs' [])) [(x, T)];
   278         (member (op =) (Term.add_frees lhs' [])) [(x, T)];
   276   in ((lhs, (def_name, th')), lthy4) end;
   279   in ((lhs, (def_name, th')), lthy5) end;
   277 
   280 
   278 val definition' = gen_def check_spec_open (K I);
   281 val definition' = gen_def check_spec_open (K I);
   279 fun definition xs ys As B = definition' xs ys As B false;
   282 fun definition xs ys As B = definition' xs ys As B false;
   280 val definition_cmd = gen_def read_spec_open Attrib.check_src;
   283 val definition_cmd = gen_def read_spec_open Attrib.check_src;
   281 
   284