19 val add_defs: (bool * bool) * ((binding * string) * Attrib.src list) list -> theory -> theory |
19 val add_defs: (bool * bool) * ((binding * string) * Attrib.src list) list -> theory -> theory |
20 val declaration: {syntax: bool, pervasive: bool} -> |
20 val declaration: {syntax: bool, pervasive: bool} -> |
21 Symbol_Pos.source -> local_theory -> local_theory |
21 Symbol_Pos.source -> local_theory -> local_theory |
22 val simproc_setup: string * Position.T -> string list -> Symbol_Pos.source -> |
22 val simproc_setup: string * Position.T -> string list -> Symbol_Pos.source -> |
23 string list -> local_theory -> local_theory |
23 string list -> local_theory -> local_theory |
24 val hide_class: bool -> xstring list -> theory -> theory |
|
25 val hide_type: bool -> xstring list -> theory -> theory |
|
26 val hide_const: bool -> xstring list -> theory -> theory |
|
27 val hide_fact: bool -> xstring list -> theory -> theory |
|
28 val have: (Attrib.binding * (string * string list) list) list -> bool -> Proof.state -> Proof.state |
24 val have: (Attrib.binding * (string * string list) list) list -> bool -> Proof.state -> Proof.state |
29 val hence: (Attrib.binding * (string * string list) list) list -> bool -> Proof.state -> Proof.state |
25 val hence: (Attrib.binding * (string * string list) list) list -> bool -> Proof.state -> Proof.state |
30 val show: (Attrib.binding * (string * string list) list) list -> bool -> Proof.state -> Proof.state |
26 val show: (Attrib.binding * (string * string list) list) list -> bool -> Proof.state -> Proof.state |
31 val thus: (Attrib.binding * (string * string list) list) list -> bool -> Proof.state -> Proof.state |
27 val thus: (Attrib.binding * (string * string list) list) list -> bool -> Proof.state -> Proof.state |
32 val qed: Method.text_range option -> Toplevel.transition -> Toplevel.transition |
28 val qed: Method.text_range option -> Toplevel.transition -> Toplevel.transition |
181 \lhss = " ^ ML_Syntax.print_strings lhss ^ ", proc = proc, \ |
177 \lhss = " ^ ML_Syntax.print_strings lhss ^ ", proc = proc, \ |
182 \identifier = Library.maps ML_Context.thms " ^ ML_Syntax.print_strings identifier ^ "})") |
178 \identifier = Library.maps ML_Context.thms " ^ ML_Syntax.print_strings identifier ^ "})") |
183 |> Context.proof_map; |
179 |> Context.proof_map; |
184 |
180 |
185 |
181 |
186 (* hide names *) |
|
187 |
|
188 fun hide_names intern check hide fully xnames thy = |
|
189 let |
|
190 val names = map (intern thy) xnames; |
|
191 val bads = filter_out (check thy) names; |
|
192 in |
|
193 if null bads then fold (hide fully) names thy |
|
194 else error ("Attempt to hide undeclared item(s): " ^ commas_quote bads) |
|
195 end; |
|
196 |
|
197 val hide_class = hide_names Sign.intern_class (can o Sign.certify_class) Sign.hide_class; |
|
198 val hide_type = hide_names Sign.intern_type Sign.declared_tyname Sign.hide_type; |
|
199 val hide_const = hide_names Sign.intern_const Sign.declared_const Sign.hide_const; |
|
200 val hide_fact = |
|
201 hide_names Global_Theory.intern_fact Global_Theory.defined_fact Global_Theory.hide_fact; |
|
202 |
|
203 |
|
204 (* goals *) |
182 (* goals *) |
205 |
183 |
206 fun goal opt_chain goal stmt int = |
184 fun goal opt_chain goal stmt int = |
207 opt_chain #> goal NONE (K I) stmt int; |
185 opt_chain #> goal NONE (K I) stmt int; |
208 |
186 |