src/Pure/pure_thy.ML
changeset 9318 4c3fb0786022
parent 9238 ad37b21c0dc6
child 9534 0d14a9e7930c
equal deleted inserted replaced
9317:7a72952ca068 9318:4c3fb0786022
     1 (*  Title:      Pure/pure_thy.ML
     1 (*  Title:      Pure/pure_thy.ML
     2     ID:         $Id$
     2     ID:         $Id$
     3     Author:     Markus Wenzel, TU Muenchen
     3     Author:     Markus Wenzel, TU Muenchen
       
     4     License:    GPL (GNU GENERAL PUBLIC LICENSE)
     4 
     5 
     5 Theorem database, derived theory operations, and the ProtoPure theory.
     6 Theorem database, derived theory operations, and the ProtoPure theory.
     6 *)
     7 *)
     7 
     8 
     8 signature BASIC_PURE_THY =
     9 signature BASIC_PURE_THY =
    36     (thm list * theory attribute list) list) list -> theory -> theory * (string * thm list) list
    37     (thm list * theory attribute list) list) list -> theory -> theory * (string * thm list) list
    37   val add_axioms: ((bstring * string) * theory attribute list) list -> theory -> theory * thm list
    38   val add_axioms: ((bstring * string) * theory attribute list) list -> theory -> theory * thm list
    38   val add_axioms_i: ((bstring * term) * theory attribute list) list -> theory -> theory * thm list
    39   val add_axioms_i: ((bstring * term) * theory attribute list) list -> theory -> theory * thm list
    39   val add_axiomss: ((bstring * string list) * theory attribute list) list -> theory -> theory * thm list list
    40   val add_axiomss: ((bstring * string list) * theory attribute list) list -> theory -> theory * thm list list
    40   val add_axiomss_i: ((bstring * term list) * theory attribute list) list -> theory -> theory * thm list list
    41   val add_axiomss_i: ((bstring * term list) * theory attribute list) list -> theory -> theory * thm list list
    41   val add_defs: ((bstring * string) * theory attribute list) list -> theory -> theory * thm list
    42   val add_defs: bool -> ((bstring * string) * theory attribute list) list
    42   val add_defs_i: ((bstring * term) * theory attribute list) list -> theory -> theory * thm list
    43     -> theory -> theory * thm list
    43   val add_defss: ((bstring * string list) * theory attribute list) list -> theory -> theory * thm list list
    44   val add_defs_i: bool -> ((bstring * term) * theory attribute list) list
    44   val add_defss_i: ((bstring * term list) * theory attribute list) list -> theory -> theory * thm list list
    45     -> theory -> theory * thm list
       
    46   val add_defss: bool -> ((bstring * string list) * theory attribute list) list
       
    47     -> theory -> theory * thm list list
       
    48   val add_defss_i: bool -> ((bstring * term list) * theory attribute list) list
       
    49     -> theory -> theory * thm list list
    45   val get_name: theory -> string
    50   val get_name: theory -> string
    46   val put_name: string -> theory -> theory
    51   val put_name: string -> theory -> theory
    47   val global_path: theory -> theory
    52   val global_path: theory -> theory
    48   val local_path: theory -> theory
    53   val local_path: theory -> theory
    49   val begin_theory: string -> theory list -> theory
    54   val begin_theory: string -> theory list -> theory
   321 in
   326 in
   322   val add_axioms    = add_singles Theory.add_axioms;
   327   val add_axioms    = add_singles Theory.add_axioms;
   323   val add_axioms_i  = add_singles Theory.add_axioms_i;
   328   val add_axioms_i  = add_singles Theory.add_axioms_i;
   324   val add_axiomss   = add_multis Theory.add_axioms;
   329   val add_axiomss   = add_multis Theory.add_axioms;
   325   val add_axiomss_i = add_multis Theory.add_axioms_i;
   330   val add_axiomss_i = add_multis Theory.add_axioms_i;
   326   val add_defs      = add_singles Theory.add_defs;
   331   val add_defs      = add_singles o Theory.add_defs;
   327   val add_defs_i    = add_singles Theory.add_defs_i;
   332   val add_defs_i    = add_singles o Theory.add_defs_i;
   328   val add_defss     = add_multis Theory.add_defs;
   333   val add_defss     = add_multis o Theory.add_defs;
   329   val add_defss_i   = add_multis Theory.add_defs_i;
   334   val add_defss_i   = add_multis o Theory.add_defs_i;
   330 end;
   335 end;
   331 
   336 
   332 
   337 
   333 
   338 
   334 (*** derived theory operations ***)
   339 (*** derived theory operations ***)
   449     ("TYPE", "'a itself", NoSyn),
   454     ("TYPE", "'a itself", NoSyn),
   450     (dummy_patternN, "'a", Delimfix "'_")]
   455     (dummy_patternN, "'a", Delimfix "'_")]
   451   |> Theory.add_modesyntax ("", false)
   456   |> Theory.add_modesyntax ("", false)
   452     [("Goal", "prop => prop", Mixfix ("_", [0], 0))]
   457     [("Goal", "prop => prop", Mixfix ("_", [0], 0))]
   453   |> local_path
   458   |> local_path
   454   |> (#1 oo (add_defs o map Thm.no_attributes))
   459   |> (#1 oo (add_defs false o map Thm.no_attributes))
   455    [("flexpair_def", "(t =?= u) == (t == u::'a::{})"),
   460    [("flexpair_def", "(t =?= u) == (t == u::'a::{})"),
   456     ("Goal_def", "GOAL (PROP A) == PROP A")]
   461     ("Goal_def", "GOAL (PROP A) == PROP A")]
   457   |> (#1 o add_thmss [(("nothing", []), [])])
   462   |> (#1 o add_thmss [(("nothing", []), [])])
   458   |> end_theory;
   463   |> end_theory;
   459 
   464