src/Pure/pure_thy.ML
changeset 26463 9283b4185fdf
parent 26457 9385d441cec6
child 26471 f4c956461353
equal deleted inserted replaced
26462:dac4e2bce00d 26463:9283b4185fdf
   144      (ref (Thms {theorems = _, all_facts = all_facts1}),
   144      (ref (Thms {theorems = _, all_facts = all_facts1}),
   145       ref (Thms {theorems = _, all_facts = all_facts2})) =
   145       ref (Thms {theorems = _, all_facts = all_facts2})) =
   146     ref (make_thms NameSpace.empty_table (Facts.merge (all_facts1, all_facts2)));
   146     ref (make_thms NameSpace.empty_table (Facts.merge (all_facts1, all_facts2)));
   147 );
   147 );
   148 
   148 
   149 val _ = Context.>> TheoremsData.init;
   149 val _ = Context.>> (Context.map_theory TheoremsData.init);
   150 
   150 
   151 val get_theorems_ref = TheoremsData.get;
   151 val get_theorems_ref = TheoremsData.get;
   152 val get_theorems = (fn Thms args => args) o ! o get_theorems_ref;
   152 val get_theorems = (fn Thms args => args) o ! o get_theorems_ref;
   153 val theorems_of = #theorems o get_theorems;
   153 val theorems_of = #theorems o get_theorems;
   154 val all_facts_of = #all_facts o get_theorems;
   154 val all_facts_of = #all_facts o get_theorems;
   421 
   421 
   422 val typ = SimpleSyntax.read_typ;
   422 val typ = SimpleSyntax.read_typ;
   423 val term = SimpleSyntax.read_term;
   423 val term = SimpleSyntax.read_term;
   424 val prop = SimpleSyntax.read_prop;
   424 val prop = SimpleSyntax.read_prop;
   425 
   425 
   426 val _ = Context.>>
   426 val _ = Context.>> (Context.map_theory
   427   (Sign.add_types
   427   (Sign.add_types
   428    [("fun", 2, NoSyn),
   428    [("fun", 2, NoSyn),
   429     ("prop", 0, NoSyn),
   429     ("prop", 0, NoSyn),
   430     ("itself", 1, NoSyn),
   430     ("itself", 1, NoSyn),
   431     ("dummy", 0, NoSyn)]
   431     ("dummy", 0, NoSyn)]
   513    [("prop_def", prop "(CONST prop :: prop => prop) (A::prop) == A::prop"),
   513    [("prop_def", prop "(CONST prop :: prop => prop) (A::prop) == A::prop"),
   514     ("term_def", prop "(CONST Pure.term :: 'a => prop) (x::'a) == (!!A::prop. A ==> A)"),
   514     ("term_def", prop "(CONST Pure.term :: 'a => prop) (x::'a) == (!!A::prop. A ==> A)"),
   515     ("conjunction_def", prop "(A && B) == (!!C::prop. (A ==> B ==> C) ==> C)")] #> snd
   515     ("conjunction_def", prop "(A && B) == (!!C::prop. (A ==> B ==> C) ==> C)")] #> snd
   516   #> Sign.hide_consts false ["conjunction", "term"]
   516   #> Sign.hide_consts false ["conjunction", "term"]
   517   #> add_thmss [(("nothing", []), [])] #> snd
   517   #> add_thmss [(("nothing", []), [])] #> snd
   518   #> Theory.add_axioms_i Proofterm.equality_axms);
   518   #> Theory.add_axioms_i Proofterm.equality_axms));
   519 
   519 
   520 end;
   520 end;
   521 
   521