1 (* Copyright (C) 2003-2005, HELM Team.
3 * This file is part of HELM, an Hypertextual, Electronic
4 * Library of Mathematics, developed at the Computer Science
5 * Department, University of Bologna, Italy.
7 * HELM is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
12 * HELM is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with HELM; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
22 * For details, see the HELM World-Wide-Web page,
23 * http://cs.unibo.it/helm/.
29 module N = CicNotationPt
31 (* grafite ast constructors *************************************************)
33 let floc = H.dummy_floc
35 let mk_note str = G.Comment (floc, G.Note (floc, str))
37 let mk_theorem name t =
38 let obj = N.Theorem (`Theorem, name, t, None) in
39 G.Executable (floc, G.Command (floc, G.Obj (floc, obj)))
41 let mk_tactic tactic =
42 G.Executable (floc, G.Tactical (floc, G.Tactic (floc, tactic), None))
45 let tactic = G.Exact (floc, t) in
48 (* interface functions ******************************************************)
50 let content2procedural ~ids_to_inner_sorts prefix (_, params, xmenv, obj) =
51 if List.length params > 0 || xmenv <> None then assert false;
53 | `Def (C.Const, t, `Proof {
54 C.proof_name = Some name; C.proof_context = [];
55 C.proof_apply_context = []; C.proof_conclude = {
56 C.conclude_conclusion = Some b
59 [mk_theorem name t; mk_exact b]