1 (* Copyright (C) 2000, 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/.
26 (**************************************************************************)
30 (* Andrea Asperti <asperti@cs.unibo.it> *)
33 (**************************************************************************)
38 type joint_recursion_kind =
39 [ `Recursive of int list
41 | `Inductive of int (* paramsno *)
42 | `CoInductive of int (* paramsno *)
46 type var_or_const = Var | Const;;
48 type 'term declaration =
49 { dec_name : string option;
57 type 'term definition =
58 { def_name : string option;
65 type 'term inductive =
67 inductive_name : string;
68 inductive_kind : bool;
69 inductive_type : 'term;
70 inductive_constructors : 'term declaration list
74 type 'term decl_context_element =
75 [ `Declaration of 'term declaration
76 | `Hypothesis of 'term declaration
80 type ('term,'proof) def_context_element =
82 | `Definition of 'term definition
86 type ('term,'proof) in_joint_context_element =
87 [ `Inductive of 'term inductive
88 | 'term decl_context_element
89 | ('term,'proof) def_context_element
93 type ('term,'proof) joint =
95 joint_kind : joint_recursion_kind ;
96 joint_defs : ('term,'proof) in_joint_context_element list
100 type ('term,'proof) joint_context_element =
101 [ `Joint of ('term,'proof) joint ]
105 { proof_name : string option;
107 proof_context : 'term in_proof_context_element list ;
108 proof_apply_context: 'term proof list;
109 proof_conclude : 'term conclude_item
112 and 'term in_proof_context_element =
113 [ 'term decl_context_element
114 | ('term,'term proof) def_context_element
115 | ('term,'term proof) joint_context_element
118 and 'term conclude_item =
120 conclude_aref : string;
121 conclude_method : string;
122 conclude_args : ('term arg) list ;
123 conclude_conclusion : 'term option
131 | ArgProof of 'term proof
132 | ArgMethod of string (* ???? *)
136 premise_xref : string ;
137 premise_binder : string option;
138 premise_n : int option;
149 type 'term conjecture = id * int * 'term context * 'term
151 and 'term context = 'term hypothesis list
153 and 'term hypothesis =
154 ['term decl_context_element | ('term,'term proof) def_context_element ] option
157 type 'term in_object_context_element =
158 [ `Decl of var_or_const * 'term decl_context_element
159 | `Def of var_or_const * 'term * ('term,'term proof) def_context_element
160 | ('term,'term proof) joint_context_element
166 UriManager.uri list * (* params *)
167 'term conjecture list option * (* optional metasenv *)
168 'term in_object_context_element (* actual object *)