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 (**************************************************************************)
36 type joint_recursion_kind =
37 [ `Recursive of int list
39 | `Inductive of int (* paramsno *)
40 | `CoInductive of int (* paramsno *)
44 type var_or_const = Var | Const;;
46 type 'term declaration =
47 { dec_name : string option;
55 type 'term definition =
56 { def_name : string option;
63 type 'term inductive =
65 inductive_kind : bool;
66 inductive_type : 'term;
67 inductive_constructors : 'term declaration list
71 type 'term decl_context_element =
72 [ `Declaration of 'term declaration
73 | `Hypothesis of 'term declaration
77 type ('term,'proof) def_context_element =
79 | `Definition of 'term definition
83 type ('term,'proof) in_joint_context_element =
84 [ `Inductive of 'term inductive
85 | 'term decl_context_element
86 | ('term,'proof) def_context_element
90 type ('term,'proof) joint =
92 joint_kind : joint_recursion_kind ;
93 joint_defs : ('term,'proof) in_joint_context_element list
97 type ('term,'proof) joint_context_element =
98 [ `Joint of ('term,'proof) joint ]
102 { proof_name : string option;
104 proof_context : 'term in_proof_context_element list ;
105 proof_apply_context: 'term proof list;
106 proof_conclude : 'term conclude_item
109 and 'term in_proof_context_element =
110 [ 'term decl_context_element
111 | ('term,'term proof) def_context_element
112 | ('term,'term proof) joint_context_element
115 and 'term conclude_item =
117 conclude_aref : string;
118 conclude_method : string;
119 conclude_args : ('term arg) list ;
120 conclude_conclusion : 'term option
128 | ArgProof of 'term proof
129 | ArgMethod of string (* ???? *)
133 premise_xref : string ;
134 premise_binder : string option;
135 premise_n : int option;
146 type 'term conjecture = id * int * 'term context * 'term
148 and 'term context = 'term hypothesis list
150 and 'term hypothesis =
151 ['term decl_context_element | ('term,'term proof) def_context_element ] option
154 type 'term in_object_context_element =
155 [ `Decl of var_or_const * 'term decl_context_element
156 | `Def of var_or_const * 'term * ('term,'term proof) def_context_element
157 | ('term,'term proof) joint_context_element
163 UriManager.uri list * (* params *)
164 'term conjecture list option * (* optional metasenv *)
165 'term in_object_context_element (* actual object *)